Browse Source

修改SQL

zhangyuewww 4 years ago
parent
commit
5a09d91f86

+ 4 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/InOutWarehouseTaskMapper.xml

@@ -25,7 +25,7 @@
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
     <!-- 获得出入库任务列表 -->
@@ -66,7 +66,7 @@
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
         ORDER BY task_status DESC , establish_date DESC
         <if test="currentPage != null and currentPage != ''">
@@ -109,7 +109,7 @@
         and a.delete_flag = '0'
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(a.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(a.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(a.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
         group by b.id
         ORDER BY a.task_status DESC , a.establish_date DESC
@@ -135,7 +135,7 @@
         and a.delete_flag = '0'
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(a.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(a.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(a.in_out_task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
 </mapper>

+ 6 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranTaskInfoMapper.xml

@@ -23,16 +23,18 @@
             OR lower(t.start_city) like lower(CONCAT('%',#{start},'%'))
             OR lower(t.start_area) like lower(CONCAT('%',#{start},'%'))
             OR lower(t.start_detailed_address) like lower(CONCAT('%',#{start},'%'))
+            OR lower(CONCAT(t.start_private,t.start_city,t.start_area,t.start_detailed_address)) like lower(CONCAT('%',#{start},'%')))
         </if>
         <if test="end != null and end != ''">
             AND (lower(t.end_private) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_city) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_area) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_detailed_address) like lower(CONCAT('%',#{end},'%'))
+            OR lower(CONCAT(t.end_private,t.end_city,t.end_area,t.end_detailed_address)) like lower(CONCAT('%',#{end},'%')))
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(t.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(t.task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(t.task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
     <!-- 获得运输任务列表 -->
@@ -75,16 +77,18 @@
             OR lower(t.start_city) like lower(CONCAT('%',#{start},'%'))
             OR lower(t.start_area) like lower(CONCAT('%',#{start},'%'))
             OR lower(t.start_detailed_address) like lower(CONCAT('%',#{start},'%'))
+            OR lower(CONCAT(t.start_private,t.start_city,t.start_area,t.start_detailed_address)) like lower(CONCAT('%',#{start},'%')))
         </if>
         <if test="end != null and end != ''">
             AND (lower(t.end_private) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_city) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_area) like lower(CONCAT('%',#{end},'%'))
             OR lower(t.end_detailed_address) like lower(CONCAT('%',#{end},'%'))
+            OR lower(CONCAT(t.end_private,t.end_city,t.end_area,t.end_detailed_address)) like lower(CONCAT('%',#{end},'%')))
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(t.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(t.task_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(t.task_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
         group by p.info_id
         ORDER BY t.status DESC , t.update_date DESC