diff --git a/emis-biz/src/main/resources/mapper/EmisTmsPackDtlMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsPackDtlMapper.xml
index 39feeb7ff..535d703d5 100644
--- a/emis-biz/src/main/resources/mapper/EmisTmsPackDtlMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisTmsPackDtlMapper.xml
@@ -35,11 +35,11 @@
del_flag='0'
and id = #{id}
- and pack_no like concat('%', #{packNo}, '%')
- and bill_code = #{billCode}
+ and ( FIND_IN_SET(`pack_no`,#{packNo}) or pack_no like concat('%', #{packNo}, '%') )
+ and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
and scan_date = #{scanDate}
- and scan_status like concat('%', #{scanStatus}, '%')
- and pack_status like concat('%', #{packStatus}, '%')
+ and scan_status=#{scanStatus}
+ and pack_status=#{packStatus}
and scan_man like concat('%', #{scanMan}, '%')
and remark like concat('%', #{remark}, '%')
and tenant_id like concat('%', #{tenantId}, '%')
@@ -48,8 +48,29 @@
and create_time = #{createTime}
and update_by like concat('%', #{updateBy}, '%')
and update_time = #{updateTime}
- and create_site like concat('%', #{createSite}, '%')
- and update_site like concat('%', #{updateSite}, '%')
+ and create_site=#{createSite}
+ and update_site=#{updateSite}
+
+
+
+ and create_time = ]]> #{params.beginCreateTime}
+
+
+ and create_time #{params.endCreateTime}
+
+
+
+ and (
+ create_site in (
+ SELECT t1.site_code FROM (
+ SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
+ #{params.privSiteCode} ) pd
+ WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
+ UNION
+ SELECT #{params.privSiteCode} FROM dual
+ )
+ )
+
order by create_time desc
diff --git a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchDtlMapper.xml b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchDtlMapper.xml
index 712d34687..a08bceee2 100644
--- a/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchDtlMapper.xml
+++ b/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchDtlMapper.xml
@@ -34,13 +34,13 @@
del_flag='0'
and id = #{id}
- and bill_code like concat('%', #{billCode}, '%')
- and batch_no like concat('%', #{batchNo}, '%')
+ and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') )
+ and ( FIND_IN_SET(`batch_no`,#{batchNo}) or batch_no like concat('%', #{batchNo}, '%') )
and scan_date = #{scanDate}
- and scan_status like concat('%', #{scanStatus}, '%')
- and group_status like concat('%', #{groupStatus}, '%')
+ and scan_status=#{scanStatus}
+ and group_status=#{groupStatus}
and scan_man like concat('%', #{scanMan}, '%')
- and scan_site like concat('%', #{scanSite}, '%')
+ and scan_site =#{scanSite}
and remark like concat('%', #{remark}, '%')
and tenant_id like concat('%', #{tenantId}, '%')
and del_flag like concat('%', #{delFlag}, '%')
@@ -48,8 +48,28 @@
and create_time = #{createTime}
and update_by like concat('%', #{updateBy}, '%')
and update_time = #{updateTime}
- and create_site like concat('%', #{createSite}, '%')
- and update_site like concat('%', #{updateSite}, '%')
+ and create_site=#{createSite}
+ and update_site=#{updateSite}
+
+
+ and create_time = ]]> #{params.beginCreateTime}
+
+
+ and create_time #{params.endCreateTime}
+
+
+
+ and (
+ create_site in (
+ SELECT t1.site_code FROM (
+ SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
+ #{params.privSiteCode} ) pd
+ WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
+ UNION
+ SELECT #{params.privSiteCode} FROM dual
+ )
+ )
+
order by create_time desc