From 7de0a4c084e43effe510d65ef2a051278dbe0788 Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Wed, 25 Feb 2026 17:39:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(mapper):=20=E5=88=86=E9=A1=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD=E5=88=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E3=80=81=E5=85=B3=E6=9C=BA=E8=AE=B0=E5=BD=95=E5=92=8C=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E6=8A=A5=E5=91=8A=E6=98=A0=E5=B0=84=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 BaseOrderInfoMapper.xml 中添加 beginTime 和 endTime 时间范围查询条件 - 在 DmsRecordShutDownMapper.xml 中添加 shut_begin_time 时间范围查询支持 - 在 ReportQualityInspectionMapper.xml 中添加 inspector_time 时间范围查询功能 - 支持通过 params 参数传递的时间范围查询 - 使用 Oracle 的 to_date 函数进行日期格式转换 - 实现了统一的时间范围过滤逻辑 --- .../src/main/resources/mapper/base/BaseOrderInfoMapper.xml | 6 ++++++ .../main/resources/mapper/dms/DmsRecordShutDownMapper.xml | 3 +++ .../mapper/report/ReportQualityInspectionMapper.xml | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml index 04e13da..3aef39c 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseOrderInfoMapper.xml @@ -96,6 +96,9 @@ and oi.execution_status = #{executionStatus} and oi.begin_date = #{beginDate} and oi.end_date = #{endDate} + + and oi.begin_date between to_date(#{beginTime}, 'yyyy-mm-dd') and to_date(#{endTime}, 'yyyy-mm-dd') + and oi.factory_code = #{factoryCode} and is_flag = #{isFlag} and oi.created_by = #{createdBy} @@ -105,6 +108,9 @@ and oi.complete_date = #{completeDate} and oi.is_release = #{isRelease} and oi.work_center_code = #{workCenterCode} + + and oi.begin_date between to_date(#{params.beginTime}, 'yyyy-mm-dd') and to_date(#{params.endTime}, 'yyyy-mm-dd') + and oi.begin_date between to_date(#{params.beginEndTime}, 'yyyy-mm-dd') and to_date(#{params.endEndTime}, 'yyyy-mm-dd') diff --git a/aucma-dms/src/main/resources/mapper/dms/DmsRecordShutDownMapper.xml b/aucma-dms/src/main/resources/mapper/dms/DmsRecordShutDownMapper.xml index d9aacee..efbbc0f 100644 --- a/aucma-dms/src/main/resources/mapper/dms/DmsRecordShutDownMapper.xml +++ b/aucma-dms/src/main/resources/mapper/dms/DmsRecordShutDownMapper.xml @@ -53,6 +53,9 @@ and r.shut_type_id = #{shutType} and r.shut_reason = #{shutReason} + + and r.shut_begin_time between #{beginTime} and #{endTime} + and r.shut_begin_time between #{params.beginTime} and #{params.endTime} diff --git a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml index 3e528d6..7c7a093 100644 --- a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml +++ b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml @@ -91,6 +91,12 @@ and rqi.is_flag = #{isFlag} and rqi.updated_by = #{updatedBy} and rqi.updated_time = #{updatedTime} + + AND rqi.inspector_time BETWEEN TO_DATE(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{endTime}, 'YYYY-MM-DD HH24:MI:SS') + + + 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') + AND rqi.inspector_time BETWEEN TO_DATE(#{beginBeginTime}, 'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{endBeginTime}, 'YYYY-MM-DD HH24:MI:SS')