修复条件查询报错

This commit is contained in:
zhaoqing
2026-05-15 15:20:04 +08:00
parent 206c85aaf7
commit 151aa4f8b4
4 changed files with 11 additions and 13 deletions
@@ -672,8 +672,8 @@ public class BusinessDocumentOrderDTO extends BaseVOEntity{
@ApiModelProperty("$column.columnComment")
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date documentDate;
@@ -98,10 +98,8 @@ public class OriginalImportExportDocumentApi extends BaseController {
PageHelper.startPage(pageNo, pageSize);
List<BusinessDocumentOrderPO> orderList = businessDocumentOrderApplicationService.queryListAndMaterial(businessDocumentOrderDO);
// ✅ 批量查询货物列表并设置到订单
fillCargoInfo(orderList);
// ✅ 获取分页信息
Page<BusinessDocumentOrderPO> page = (Page<BusinessDocumentOrderPO>) orderList;
List<OrderWithMaterialDTO> resultList = convertToOrderWithMaterialList(orderList);
@@ -1200,7 +1200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- and ORG_NAME like concat('%', #{orgName}, '%')-->
<!-- </if>-->
<if test="organizationId != null ">
and ORGANIZATION_ID = #{organizationId}
and o.ORGANIZATION_ID = #{organizationId}
</if>
<!-- <if test="organizationName != null and organizationName != ''">-->
<!-- and ORGANIZATION_NAME like concat('%', #{organizationName}, '%')-->
@@ -10,28 +10,28 @@
FROM erp_enterprise_unit
WHERE del_flag = 1
<if test="erpEnterpriseUnitDO.erpCode != null and erpEnterpriseUnitDO.erpCode != ''">
AND erp_code LIKE CONCAT('%', #{do.erpCode}, '%')
AND erp_code LIKE CONCAT('%', #{erpCode}, '%')
</if>
<if test="erpEnterpriseUnitDO.erpName != null and erpEnterpriseUnitDO.erpName != ''">
AND erp_name LIKE CONCAT('%', #{do.erpName}, '%')
AND erp_name LIKE CONCAT('%', #{erpName}, '%')
</if>
<if test="erpEnterpriseUnitDO.pushStatus != null">
AND push_status = #{do.pushStatus}
AND push_status = #{pushStatus}
</if>
<if test="erpEnterpriseUnitDO.pushTimeFrom != null and erpEnterpriseUnitDO.pushTimeFrom != ''">
AND DATE_FORMAT(push_time, '%Y-%m-%d') &gt;= #{do.pushTimeFrom}
AND DATE_FORMAT(push_time, '%Y-%m-%d') &gt;= #{pushTimeFrom}
</if>
<if test="erpEnterpriseUnitDO.pushTimeTo != null and erpEnterpriseUnitDO.pushTimeTo != ''">
AND DATE_FORMAT(push_time, '%Y-%m-%d') &lt;= #{do.pushTimeTo}
AND DATE_FORMAT(push_time, '%Y-%m-%d') &lt;= #{pushTimeTo}
</if>
<if test="erpEnterpriseUnitDO.organizationId != null">
AND organization_id = #{do.organizationId}
AND organization_id = #{organizationId}
</if>
<if test="erpEnterpriseUnitDO.createTimeFrom != null and erpEnterpriseUnitDO.createTimeFrom != ''">
AND DATE_FORMAT(create_time, '%Y-%m-%d') &gt;= #{do.createTimeFrom}
AND DATE_FORMAT(create_time, '%Y-%m-%d') &gt;= #{createTimeFrom}
</if>
<if test="erpEnterpriseUnitDO.createTimeTo != null and erpEnterpriseUnitDO.createTimeTo != ''">
AND DATE_FORMAT(create_time, '%Y-%m-%d') &lt;= #{do.createTimeTo}
AND DATE_FORMAT(create_time, '%Y-%m-%d') &lt;= #{createTimeTo}
</if>
ORDER BY create_time DESC
</select>