Tiroble 3 anos atrás
pai
commit
8814ea7249

+ 17 - 0
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.controller;
 
+import com.steerinfo.dil.config.ImageFileUtils;
 import com.steerinfo.dil.feign.TmsshipFeign;
 import com.steerinfo.dil.feign.TmsTrainFeign;
 import com.steerinfo.dil.feign.TmsTruckFeign;
@@ -35,6 +36,8 @@ public class TMSController extends BaseRESTfulController {
     TmsshipFeign tmsshipFeign;
     @Autowired
     UniversalMapper universalMapper;
+    @Autowired
+    private ImageFileUtils imageFileUtils;
     /*======================================船运==========================================*/
 
     /**
@@ -2163,4 +2166,18 @@ public class TMSController extends BaseRESTfulController {
     public Map<String,Object> getReceivingPhoto(@RequestParam String orderNumber){
         return tmsTruckFeign.getReceivingPhoto(orderNumber);
     }
+    @ApiOperation("展示收货的照片")
+    @PostMapping("/getReceivingPhotoByUrl")
+    public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber) throws Exception {
+        Map<String,Object> map=tmsTruckFeign.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);
+        }
+        return map;
+    }
 }

+ 5 - 0
src/main/java/com/steerinfo/dil/feign/TmsTruckFeign.java

@@ -595,6 +595,11 @@ public interface TmsTruckFeign {
                                                   @RequestParam(name = "apiId",defaultValue = "472") Integer apiId,
                                                   @RequestParam(name = "pageNum") Integer pageNum,
                                                   @RequestParam(name = "pageSize") Integer pageSize);
+
+
+    @ApiOperation(value = "获取收货作业照片")
+    @PostMapping("/api/v1/truckTms/tmstruckreceiptresults/getReceivingPhotoByUrl")
+    public Map<String,Object> getReceivingPhotoByUrl(@RequestParam String orderNumber);
 }