Tiroble 3 년 전
부모
커밋
d50cd64a0a

+ 74 - 17
src/main/java/com/steerinfo/dil/controller/OTMSController.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.config.ImageFileUtils;
+import com.steerinfo.dil.feign.OtmsFeign;
 import com.steerinfo.dil.feign.TmsTruckFeign;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
@@ -24,15 +25,18 @@ import java.util.Map;
 @RestController
 @RequestMapping("${api.version}/otms")
 public class OTMSController {
+
     @Autowired
-    private TmsTruckFeign tmsTruckFeign;
+    private OtmsFeign otmsFeign;
     @Autowired
     private ImageFileUtils imageFileUtils;
     @ApiOperation(value="全路径展示接口")
     @PostMapping("/fullPath")
     public Object fullPath(@RequestParam("orderNumber") String orderNumber) throws Exception {
-        return tmsTruckFeign.fullPath(orderNumber);
+        return otmsFeign.fullPath(orderNumber);
     }
+
+    @ApiOperation(value = "在途订单列表")
     @PostMapping("/getInTransitTransportation")
     public RESTfulResult getInTransitTransportation(@RequestBody(required=false)   Map<String,Object> mapValue,
                                                     @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
@@ -40,9 +44,10 @@ public class OTMSController {
                                                     @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
     )
     {
-        return tmsTruckFeign.getInTransitTransportation(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
+        return otmsFeign.getInTransitTransportation(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
     }
 
+    @ApiOperation(value = "有异常订单列表")
     @PostMapping("/getHaveAbnormalTruckOrderInfo")
     public RESTfulResult getHaveAbnormalTruckOrderInfo(@RequestBody(required=false)   Map<String,Object> mapValue,
                                                     @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
@@ -50,10 +55,10 @@ public class OTMSController {
                                                     @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
     )
     {
-        return tmsTruckFeign.getHaveAbnormalTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
+        return otmsFeign.getHaveAbnormalTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
     }
 
-    @ApiOperation("查询在途运输")
+    @ApiOperation("已完成订单列表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
             @ApiImplicitParam(name = "apiId", value = "动态表头", required = false, dataType = "Integer"),
@@ -66,12 +71,13 @@ public class OTMSController {
                                                  @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
                                                  @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
     ){
-        return tmsTruckFeign.getFinishTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
+        return otmsFeign.getFinishTruckOrderInfo(mapValue!=null?mapValue:new HashMap<>(),apiId,pageNum,pageSize);
     }
 
+    @ApiOperation(value = "获得抵达实集")
     @PostMapping(value = "/addtmstruckArrivalResult")
     public RESTfulResult addtmstruckArrivalResult(@RequestParam("orderNumber") String orderNumber, @RequestParam("resultArrivalAddress")String resultArrivalAddress, MultipartFile file){
-        return tmsTruckFeign.addtmstruckArrivalResult(orderNumber,resultArrivalAddress,file);
+        return otmsFeign.addtmstruckArrivalResult(orderNumber,resultArrivalAddress,file);
     }
 
     @PostMapping(value = "/addTmstruckReceiptResult")
@@ -79,34 +85,35 @@ public class OTMSController {
         List<MultipartFile> files = new ArrayList<>();
         files.add(request.getFile("file0"));
         files.add(request.getFile("file1"));
+        if (request.getFile("file2")!=null){
+            files.add(request.getFile("file2"));
+        }
         Map<String,Object> mapValue=new HashMap<>();
         for (int i=0;i<files.size();i++){
             MultipartFile file=files.get(i);
             String url = imageFileUtils.updateFile(file);
             mapValue.put("url"+i,url);
         }
-        return tmsTruckFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
+        return otmsFeign.addTmstruckReceiptResult(mapValue,num,orderNumber,resultArrivalAddress,imgcount3,imgcount4);
     }
 
+    @ApiOperation(value="查询当前报警类型")
     @PostMapping(value = "/selectWarnSwitch")
     public RESTfulResult selectWarnSwitch(){
-        return tmsTruckFeign.selectWarnSwitch();
+        return otmsFeign.selectWarnSwitch();
     }
 
-    /**是否开启运输报警状态
-     * warnSwitchaddTmstruckTotalResult
-     * @param
-     * @returninTransitOrderMileage
-     */
+
     @ApiOperation(value="是否开启运输报警状态")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "warnSwitch", value = "运输报警状态", required = false, dataType = "String")
     })
     @PostMapping(value = "/inTransitWarn")
     public RESTfulResult inTransitWarn(@RequestParam String warnSwitch,@RequestParam String radio){
-        return tmsTruckFeign.inTransitWarn(warnSwitch,radio);
+        return otmsFeign.inTransitWarn(warnSwitch,radio);
     }
 
+    @ApiOperation(value="获得异常信息")
     @PostMapping("/getTransportAbnormalInfo")
     public RESTfulResult getTransportAbnormalInfo(@RequestBody(required=false) Map<String,Object> mapValue,
                                                   @RequestParam(name = "apiId",defaultValue = "472") Integer apiId,
@@ -115,12 +122,62 @@ public class OTMSController {
                                                   @RequestParam(name = "pageSize") Integer pageSize){
         mapValue=mapValue!=null?mapValue:new HashMap<>();
         mapValue.put("orderNumbers",orderNumbers);
-        return tmsTruckFeign.getTransportAbnormalInfo(mapValue,apiId,pageNum,pageSize);
+        return otmsFeign.getTransportAbnormalInfo(mapValue,apiId,pageNum,pageSize);
     }
 
+    @ApiOperation(value="车牌号和时间查询路径")
     @PostMapping("/fullPathVisualizationByCarNumber")
     public Object fullPathVisualizationByCarNumber(@RequestBody HashMap mapValue) throws Exception{
-        return tmsTruckFeign.fullPathVisualizationByCarNumber(mapValue);
+        return otmsFeign.fullPathVisualizationByCarNumber(mapValue);
+    }
+
+    @ApiOperation("厂外抵达作业")
+    @PostMapping("/getArrivalResult")
+    public Map<String,Object> getArrivalResult(@RequestBody(required = false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               String con,
+                                               String startTime,
+                                               String endTime){
+        return otmsFeign.getArrivalResult(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize,con,startTime,endTime);
+    }
+
+    @ApiOperation("展示满货箱的照片")
+    @PostMapping("/getArrivalPhoto")
+    public String getArrivalPhoto(@RequestParam String orderNumber){
+        return otmsFeign.getArrivalPhoto(orderNumber);
+    }
+
+    @ApiOperation("厂外抵达作业")
+    @PostMapping("/getReceiptResult")
+    public Map<String,Object> getReceiptResult(@RequestBody(required = false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               String con,
+                                               String startTime,
+                                               String endTime){
+        return otmsFeign.getReceiptResult(mapValue==null?new HashMap<>():mapValue, apiId, pageNum, pageSize,con,startTime,endTime);
+    }
+
+    @ApiOperation("展示收货的照片")
+    @PostMapping("/getReceivingPhotoByUrl")
+    public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber) throws Exception {
+        Map<String,Object> map=otmsFeign.getReceivingPhotoByUrl(orderNumber);
+        if(map.containsKey("resultEmptyContainerPhoto") && map.get("resultEmptyContainerPhoto")!=null){
+            String resultEmptyContainerPhoto = (String) imageFileUtils.downloadFile(map.get("resultEmptyContainerPhoto").toString());
+            map.put("resultEmptyContainerPhoto",resultEmptyContainerPhoto);
+        }
+        if(map.containsKey("resultSignedNotePhoto") && map.get("resultSignedNotePhoto")!=null){
+            String resultSignedNotePhoto = (String) imageFileUtils.downloadFile(map.get("resultSignedNotePhoto").toString());
+            map.put("resultSignedNotePhoto",resultSignedNotePhoto);
+        }
+        if(map.containsKey("resultReceiveNotePhoto") && map.get("resultReceiveNotePhoto")!=null){
+            String resultSignedNotePhoto = (String) imageFileUtils.downloadFile(map.get("resultReceiveNotePhoto").toString());
+            map.put("resultReceiveNotePhoto",resultSignedNotePhoto);
+        }
+        return map;
     }
 
 }

+ 111 - 0
src/main/java/com/steerinfo/dil/feign/OtmsFeign.java

@@ -0,0 +1,111 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.HashMap;
+import java.util.Map;
+@FeignClient(value = "DAL-OTMS-API-DEV", url = "${openfeign.OTMSFeign.url}")
+public interface OtmsFeign {
+    //在途订单列表
+    @PostMapping("/api/v1/otms/pathDisplay/getInTransitTransportation")
+    public RESTfulResult getInTransitTransportation(@RequestBody Map<String,Object> mapValue,
+                                                    @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
+                                                    @RequestParam(required = false,name = "pageNum")Integer pageNum,
+                                                    @RequestParam(required = false,name = "pageSize")Integer pageSize);
+    //已完成订单列表
+    @PostMapping("/api/v1/otms/pathDisplay/getFinishTruckOrderInfo")
+    public RESTfulResult getFinishTruckOrderInfo(@RequestBody Map<String,Object> mapValue,
+                                                 @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
+                                                 @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
+                                                 @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize
+    );
+    //有异常订单列表
+    @PostMapping("/api/v1/otms/pathDisplay/getHaveAbnormalTruckOrderInfo")
+    public RESTfulResult getHaveAbnormalTruckOrderInfo(@RequestBody Map<String,Object> mapValue,
+                                                       @RequestParam(required = true,defaultValue = "468",name = "apiId")Integer apiId,
+                                                       @RequestParam(required = false,name = "pageNum")Integer pageNum,
+                                                       @RequestParam(required = false,name = "pageSize")Integer pageSize);
+    //车牌号和时间查询路径
+    @PostMapping("/api/v1/otms/pathDisplay/fullPathVisualizationByCarNumber")
+    public Object fullPathVisualizationByCarNumber(@RequestBody HashMap mapValue);
+
+    //改变当前报警类型
+    @PostMapping(value = "/api/v1/otms/pathDisplay/inTransitWarn")
+    public RESTfulResult inTransitWarn(@RequestParam String warnSwitch,@RequestParam String radio);
+
+
+    //查询当前报警类型
+    @PostMapping(value = "/api/v1/otms/pathDisplay/selectWarnSwitch")
+    public RESTfulResult selectWarnSwitch();
+
+    //通过运输订单号查询全路径
+    @PostMapping("/api/v1/otms/pathDisplay/fullPath")
+    public Object fullPath(@RequestParam("orderNumber") String orderNumber) throws Exception;
+
+    //获得抵达列表
+//    @PostMapping("/api/v1/otms/tmstruckarrivalresults/getArrivalResultInfo")
+//    Map<String, Object> getArrivalResultInfo(@RequestBody(required = false) Map<String, Object> mapValue,
+//                                         @RequestParam Integer apiId,
+//                                         @RequestParam Integer pageNum,
+//                                         @RequestParam Integer pageSize,
+//                                         @RequestParam String con,
+//                                         @RequestParam String startTime,
+//                                         @RequestParam String endTime
+//    );
+
+    //通过运输订单号获得抵达图片
+    @PostMapping("/api/v1/otms/tmstruckreceiptresults/getArrivalPhoto")
+    String getReceiptPhoto(@RequestParam String orderNumber);
+
+    //获取收货作业照片
+    @PostMapping("/api/v1/otms/tmstruckreceiptresults/getReceivingPhotoByUrl")
+    public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber);
+
+    //获得抵达实集
+    @PostMapping(value = "/api/v1/otms/tmstruckarrivalresults/addtmstruckArrivalResult",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    public RESTfulResult addtmstruckArrivalResult(@RequestParam("orderNumber")String orderNumber, @RequestParam("resultArrivalAddress")String resultArrivalAddress,@RequestPart("file") MultipartFile file);
+
+    //添加签收图片
+    @PostMapping(value = "/api/v1/otms/pathDisplay/addTmstruckReceiptResult")
+    public  RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  mapValaue  , @RequestParam("num") Integer num, @RequestParam("orderNumber")  String orderNumber, @RequestParam("resultArrivalAddress")String resultArrivalAddress, @RequestParam("imgcount3") Integer imgcount3, @RequestParam("imgcount4")Integer imgcount4);
+
+    //获得异常信息
+    @PostMapping("/api/v1/otms/pathDisplay/getTransportAbnormalInfo")
+    public RESTfulResult getTransportAbnormalInfo(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                  @RequestParam(name = "apiId",defaultValue = "472") Integer apiId,
+                                                  @RequestParam(name = "pageNum") Integer pageNum,
+                                                  @RequestParam(name = "pageSize") Integer pageSize);
+
+    //抵达信息列表
+    @PostMapping("/api/v1/otms/tmstruckreceiptresults/getArrivalResult")
+    Map<String, Object> getArrivalResult(@RequestBody(required = false) Map<String, Object> mapValue,
+                                         @RequestParam Integer apiId,
+                                         @RequestParam Integer pageNum,
+                                         @RequestParam Integer pageSize,
+                                         @RequestParam String con,
+                                         @RequestParam String startTime,
+                                         @RequestParam String endTime);
+
+    //获得抵达图片
+    @PostMapping("/api/v1/otms/tmstruckreceiptresults/getArrivalPhoto")
+    String getArrivalPhoto(@RequestParam String orderNumber);
+
+    //获得签收实绩
+    @PostMapping("/api/v1/otms/pathDisplay/getReceiptResult")
+    Map<String, Object> getReceiptResult(@RequestBody(required = false) Map<String, Object> mapValue,
+                                         @RequestParam Integer apiId,
+                                         @RequestParam Integer pageNum,
+                                         @RequestParam Integer pageSize,
+                                         @RequestParam String con,
+                                         @RequestParam String startTime,
+                                         @RequestParam String endTime
+    );
+}

+ 4 - 2
src/main/resources/application-dev.yml

@@ -35,9 +35,11 @@ openfeign:
     url: ${RMSFEIGN_HRL:172.16.33.162:8060}
   JoinFeign:
     url: ${JOINFEIGN_URL:172.16.33.162:8006}
+  OTMSFeign:
+    url: ${OTMSFEIGN_URL:172.16.33.162:8087}
 piction:
-  # path: /usr/share/nginx/html/image
-  #  path: /test/data/nginx/html/image
+  #path: /usr/share/nginx/html/image
+  #path: /test/data/nginx/html/image
   #path: C:\Users\24390\Desktop\work\a
   path: /shared
 

+ 2 - 0
src/main/resources/application-prod.yml

@@ -36,6 +36,8 @@ openfeign:
     url: ${RMSFEIGN_URL:172.16.33.166:8060}
   JoinFeign:
     url: ${JOINFEIGN_URL:172.16.33.166:8066}
+  OTMSFeign:
+    url: ${OTMSFEIGN_URL:172.16.33.166:8087}
 piction:
   # path: /usr/share/nginx/html/image
   #  path: /test/data/nginx/html/image