zx 2 年之前
父节点
当前提交
54d99b7392

+ 19 - 14
src/main/java/com/steerinfo/dil/controller/TmsshipShipLocationController.java

@@ -139,21 +139,26 @@ public class TmsshipShipLocationController extends BaseRESTfulController {
             @ApiImplicitParam(name = "apiId", value = "59", required = false, dataType = "BigDecimal"),
     })
     @PostMapping(value = "/getShipLocationList")
-    public RESTfulResult getShipLocationList(@RequestBody(required = false) Map<String,Object> mapVal){
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        //通过时间查询数据
-        Object dayTime = mapVal.get("dayTime");
-        Date date;
-        String timeFormat;
-        if(dayTime != null){
-
-             date = new Date((long) dayTime);
-             timeFormat = sdf.format(date);
-        }else {
-             date = new Date();
-            timeFormat = sdf.format(date);
+    public RESTfulResult getShipLocationList(@RequestBody(required = false) Map<String,Object> mapVal,
+                                             String con
+                                           ){
+        if (con!=null&&!"".equals(con)){
+            mapVal.put("con",con);
         }
-        mapVal.put("dayTime", timeFormat);
+//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+//        //通过时间查询数据
+//        Object dayTime = mapVal.get("dayTime");
+//        Date date;
+//        String timeFormat;
+//        if(dayTime != null){
+//
+//             date = new Date((long) dayTime);
+//             timeFormat = sdf.format(date);
+//        }else {
+//             date = new Date();
+//            timeFormat = sdf.format(date);
+//        }
+//        mapVal.put("dayTime", timeFormat);
         List<Map<String, Object>> columnList = tmsshipShipLocationService.selectShipLocationList(mapVal);
         return success(columnList);
     }

+ 3 - 0
src/main/resources/com/steerinfo/dil/mapper/TmsshipShipLocationMapper.xml

@@ -499,6 +499,9 @@
            LEFT JOIN RMS_CAPACITY rc
                      ON rc.CAPACITY_ID = oic.CAPACITY_ID
     WHERE tsl.DELETED = 0 and tlsr.DELETED = 0 and ada.DELETED=0 and oic.DELETED=0 and osi.DELETED=0
+  <if test="con!=null">
+    and  (instr(rc.CAPACITY_NUMBER,#{con}) > 0 or instr(rm.MATERIAL_NAME,#{con}) > 0 or   instr(db.RESULT_FOREIGN_SHIP_NAME,#{con}) > 0  )
+  </if>
   </select>
 
   <select id="selectShipLocation" parameterType="DECIMAL" resultType="java.util.Map">