按日期查询报错;

This commit is contained in:
王奎兴
2026-06-03 09:36:56 +08:00
parent 1382897b22
commit 32dde06899
4 changed files with 12 additions and 0 deletions
@@ -251,4 +251,6 @@ public class ReservationMaterialInventoryDO extends MaterialBaseDO {
@ApiModelProperty("入库时间 ")
@Excel(name = "入库时间 ")
private String createTimeEnd;
private String expiryDateStr;
private String productionDateStr;
}
@@ -191,5 +191,7 @@ public class ReservationMaterialInventoryDTO extends MaterialBaseDTO {
@ApiModelProperty("入库时间 ")
@Excel(name = "入库时间 ")
private String createTimeEnd;
private String expiryDate;
private String productionDate;
}
@@ -76,6 +76,8 @@ public class ReservationMaterialInventoryApi extends BaseController {
//转换实体
ReservationMaterialInventoryDO materialInventoryDO = materialInventoryAssembler.toDO(materialInventoryDTO);
materialInventoryDO.setExpiryDateStr(materialInventoryDTO.getExpiryDate());
materialInventoryDO.setProductionDateStr(materialInventoryDTO.getProductionDate());
startPage();
// 使用带批次属性的查询方法,批次属性值从库存表中获取
List<ReservationMaterialInventoryPO> list = materialInventoryApplicationService.queryListWithBatchAttributes(materialInventoryDO);
@@ -270,6 +270,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="boxPalletNo != null and boxPalletNo != ''">
and a.BOX_PALLET_NO like concat('%', #{boxPalletNo}, '%')
</if>
<if test="expiryDate != null and expiryDate != ''">
AND TO_CHAR(a.expiry_date, 'yyyy-MM-dd') = #{expiryDate}
</if>
<if test="productionDate != null and productionDate != ''">
AND TO_CHAR(a.production_date, 'yyyy-MM-dd') = #{productionDate}
</if>
</sql>
<select id="queryList" parameterType="com.mhd.oms.domain.reservationMaterialInventory.repository.todo.ReservationMaterialInventoryDO" resultMap="MaterialInventoryResult">