feat(mapper): 分页接口添加时间范围查询功能到订单、关机记录和质检报告映射器

- 在 BaseOrderInfoMapper.xml 中添加 beginTime 和 endTime 时间范围查询条件
- 在 DmsRecordShutDownMapper.xml 中添加 shut_begin_time 时间范围查询支持
- 在 ReportQualityInspectionMapper.xml 中添加 inspector_time 时间范围查询功能
- 支持通过 params 参数传递的时间范围查询
- 使用 Oracle 的 to_date 函数进行日期格式转换
- 实现了统一的时间范围过滤逻辑
master
zangch@mesnac.com 2 days ago
parent 2ae6bb79fe
commit 7de0a4c084

@ -96,6 +96,9 @@
<if test="executionStatus != null and executionStatus != ''">and oi.execution_status = #{executionStatus}</if>
<if test="beginDate != null ">and oi.begin_date = #{beginDate}</if>
<if test="endDate != null ">and oi.end_date = #{endDate}</if>
<if test="beginTime != null and endTime != null">
and oi.begin_date between to_date(#{beginTime}, 'yyyy-mm-dd') and to_date(#{endTime}, 'yyyy-mm-dd')
</if>
<if test="factoryCode != null and factoryCode != ''">and oi.factory_code = #{factoryCode}</if>
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and oi.created_by = #{createdBy}</if>
@ -105,6 +108,9 @@
<if test="completeDate != null ">and oi.complete_date = #{completeDate}</if>
<if test="isRelease != null ">and oi.is_release = #{isRelease}</if>
<if test="workCenterCode != null ">and oi.work_center_code = #{workCenterCode}</if>
<if test="params != null and params.beginTime != null and params.endTime != null">
and oi.begin_date between to_date(#{params.beginTime}, 'yyyy-mm-dd') and to_date(#{params.endTime}, 'yyyy-mm-dd')
</if>
<if test="params.beginEndTime != null and params.beginEndTime != '' and params.endEndTime != null and params.endEndTime != ''">
and oi.begin_date between to_date(#{params.beginEndTime}, 'yyyy-mm-dd') and
to_date(#{params.endEndTime}, 'yyyy-mm-dd')

@ -53,6 +53,9 @@
<where>
<if test="shutType != null ">and r.shut_type_id = #{shutType}</if>
<if test="shutReason != null and shutReason != ''">and r.shut_reason = #{shutReason}</if>
<if test="beginTime != null and endTime != null">
and r.shut_begin_time between #{beginTime} and #{endTime}
</if>
<if test="params != null and params.beginTime != null and params.endTime != null">
and r.shut_begin_time between #{params.beginTime} and #{params.endTime}
</if>

@ -91,6 +91,12 @@
<if test="isFlag != null ">and rqi.is_flag = #{isFlag}</if>
<if test="updatedBy != null and updatedBy != ''">and rqi.updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and rqi.updated_time = #{updatedTime}</if>
<if test="beginTime != null and endTime != null">
AND rqi.inspector_time BETWEEN TO_DATE(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="params != null and params.beginTime != null and params.endTime != null">
AND rqi.inspector_time BETWEEN TO_DATE(#{params.beginTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{params.endTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="beginBeginTime != null and beginBeginTime != '' and endBeginTime != null and endBeginTime != ''">
AND rqi.inspector_time BETWEEN TO_DATE(#{beginBeginTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{endBeginTime}, 'YYYY-MM-DD HH24:MI:SS')
</if>

Loading…
Cancel
Save