liyg před 2 roky
rodič
revize
1e045c11f8

+ 2 - 2
src/main/java/com/steerinfo/dil/controller/TmstruckTimeTaskResultController.java

@@ -252,8 +252,8 @@ public class TmstruckTimeTaskResultController extends BaseRESTfulController {
             mapValue=new HashMap<>();
         }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
-        if (con!=null&&!con.equals("undifined")&&!con.equals("")){
-            mapValue.put("con","%" + con + "%");
+        if (con!=null){
+            mapValue.put("con",con);
         }
         if (userId!=null&&!userId.equals("undifined")&&!userId.equals("")){
             mapValue.put("userId",userId);

+ 2 - 3
src/main/resources/com/steerinfo/dil/mapper/TmstruckTimeTaskResultMapper.xml

@@ -779,9 +779,8 @@
     <if test="orderType!=null">
       AND OO.ORDER_TYPE in (#{orderType},11)
     </if>
-    <if test="con!=null">
-      AND RC.CAPACITY_NUMBER LIKE #{con} or RM.MATERIAL_NAME LIKE #{con}
-      or RS.SHIPPER_NAME LIKE #{con}
+    <if test="con!=null and con != ''">
+      AND RC.CAPACITY_NUMBER || RM.MATERIAL_NAME ||  RS.SHIPPER_NAME LIKE CONCAT('%',CONCAT(#{con},'%'))
     </if>
     <if test="userId!=null">
       AND  instr(AIR.INSERT_USERNAME,#{userId}) > 0