瀏覽代碼

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/DAL-DAZHOU-API

luobang 2 年之前
父節點
當前提交
403b2b2d2c

+ 1 - 1
src/main/java/com/steerinfo/dil/config/ImageFileUtils.java

@@ -1,7 +1,7 @@
 package com.steerinfo.dil.config;
 
 import com.steerinfo.framework.utils.misc.IdGenerator;
-import com.steerinfo.framework.utils.upload.UploadUtils;
+import com.steerinfo.dil.util.UploadUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;

+ 5 - 0
src/main/java/com/steerinfo/dil/controller/BMSController.java

@@ -805,4 +805,9 @@ public class BMSController extends BaseRESTfulController {
     public Map<String,Object> newInwardSettle(@RequestBody  Map<String,Object> map){
         return bmstruckFeign.newInwardSettle(map);
     }
+
+    @PostMapping("/getWetDryDetails")
+    public Map<String,Object> getWetDryDetails(@RequestBody  Map<String,Object> map){
+        return bmsshipFeign.getWetDryDetails(map);
+    }
 }

+ 24 - 4
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -316,9 +316,10 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getUnLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                  Integer pageNum,
                                                  Integer pageSize,
-                                                 Integer apiId) {
+                                                 Integer apiId,
+                                                 String con) {
 
-        return tmsshipFeign.getUnLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
+        return tmsshipFeign.getUnLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
     }
 
     @PostMapping("getUnloadShip/{resultId}")
@@ -463,11 +464,12 @@ public class TMSController extends BaseRESTfulController {
                                                            Integer pageNum,
                                                            Integer pageSize,
                                                            Integer apiId,
-                                                           String status) {
+                                                           String status,
+                                                           String con) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getShipMentInstructionsList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,status);
+        return tmsshipFeign.getShipMentInstructionsList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,status,con);
     }
 
     @PostMapping("getShipmentInstructions/{instructionsId}")
@@ -731,6 +733,24 @@ public class TMSController extends BaseRESTfulController {
         return tmsshipFeign.getDownShipDynamaics(map);
     }
 
+    @PostMapping("getControlLines")
+    @ApiOperation(value = "查询控制线等闸")
+    Map<String, Object> getControlLines(@RequestBody Map<String, Object> map) {
+        return tmsshipFeign.getControlLines(map);
+    }
+
+    @PostMapping("updateControlLine")
+    @ApiOperation(value = "修改控制线等闸")
+    Map<String, Object> updateControlLine(@RequestBody Map<String, Object> map) {
+        return tmsshipFeign.updateControlLine(map);
+    }
+
+    @PostMapping("getControlLinesTable")
+    @ApiOperation(value = "控制线等闸表格")
+    Map<String, Object> getControlLinesTable(@RequestBody Map<String, Object> map) {
+        return tmsshipFeign.getControlLinesTable(map);
+    }
+
     /**
      * 下拉框
      *

+ 11 - 0
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -1084,4 +1084,15 @@ public class UniversalController extends BaseRESTfulController {
         return success(mapList);
     }
 
+    @ApiOperation(value = "查询派车状态")
+    @PostMapping("/getDispachSwitch")
+    public RESTfulResult getDispachSwitch(){
+        return success(universalMapper.getDispachSwitch());
+    }
+
+    @ApiOperation(value = "修改派车开关")
+    @PostMapping("/updateDispachSwitch")
+    public RESTfulResult updateDispachSwitch(@RequestBody Map<String,Object> map){
+        return success(universalMapper.updateDispachSwitch(map));
+    }
 }

+ 18 - 1
src/main/java/com/steerinfo/dil/controller/WMSHController.java

@@ -117,6 +117,23 @@ public class WMSHController extends BaseRESTfulController {
         return wmshFeign.getLoadPortStockList(mapValue, pageNum, pageSize, apiId,con);
     }
 
+    @PostMapping("getDownPortStockList")
+    @ApiOperation(value = "下游港口库存")
+    public RESTfulResult getDownPortStockList(@RequestBody(required = false) Map<String, Object> mapValue) {
+        if (mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        return wmshFeign.getDownPortStockList(mapValue);
+    }
+
+    @PostMapping("getRunStockList")
+    @ApiOperation(value = "在途库存")
+    public RESTfulResult getRunStockList(@RequestBody(required = false) Map<String, Object> mapValue) {
+        if (mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        return wmshFeign.getRunStockList(mapValue);
+    }
     /**
      * 查询所有港存库入库实绩
      *
@@ -184,7 +201,7 @@ public class WMSHController extends BaseRESTfulController {
     }
 
     @PostMapping("clearWmshGridMaterial")
-    @ApiOperation(value = "添加港存库入库实绩")
+    @ApiOperation(value = "清场远程调用")
     RESTfulResult clearWmshGridMaterial(@RequestBody Map<String, Object> wmshInboundResult) {
         return wmshFeign.clearWmshGridMaterial(wmshInboundResult);
     }

+ 3 - 0
src/main/java/com/steerinfo/dil/feign/BmsshipFeign.java

@@ -325,4 +325,7 @@ public interface BmsshipFeign {
 
     @PostMapping(value = "/api/v1/bmsship/bmsporthandlingfee/editShipFeeStatement")
     Map<String, Object> editShipFeeStatement(@RequestBody(required = false) Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/bmsship/bmsporthandlingfee/getWetDryDetails")
+    Map<String, Object> getWetDryDetails(@RequestBody(required = false) Map<String, Object> map);
 }

+ 12 - 2
src/main/java/com/steerinfo/dil/feign/TmsshipFeign.java

@@ -283,7 +283,8 @@ public interface TmsshipFeign {
     Map<String, Object> getUnLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                           @RequestParam Integer pageNum,
                                           @RequestParam Integer pageSize,
-                                          @RequestParam Integer apiId);
+                                          @RequestParam Integer apiId,
+                                          @RequestParam(required = false) String con);
 
     /**
      * 查询卸船作业信息
@@ -457,7 +458,8 @@ public interface TmsshipFeign {
                                               @RequestParam Integer pageNum,
                                               @RequestParam Integer pageSize,
                                               @RequestParam Integer apiId,
-                                                    @RequestParam String status);
+                                                    @RequestParam String status,
+                                                    @RequestParam String con);
 
     /**
      * 查询装船指令
@@ -604,6 +606,14 @@ public interface TmsshipFeign {
     @PostMapping("api/v1/shipTms/shipdynamics/getDownShipDynamaics")
     Map<String, Object> getDownShipDynamaics(@RequestBody(required = false) Map<String,Object> map);
 
+    @PostMapping(value = "/api/v1/shipTms/shipdynamics/getControlLines")
+    Map<String, Object> getControlLines(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/shipTms/shipdynamics/updateControlLine")
+    Map<String, Object> updateControlLine(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/shipTms/shipdynamics/getControlLinesTable")
+    Map<String, Object> getControlLinesTable(@RequestBody Map<String, Object> map);
     /**
      * 展示货权转移
      *

+ 6 - 0
src/main/java/com/steerinfo/dil/feign/WMSHFeign.java

@@ -49,6 +49,12 @@ public interface WMSHFeign {
                                        @RequestParam Integer apiId,
                                        @RequestParam String con);
 
+    @PostMapping(value = "/api/v1/wmsh/wmshgridmaterials/getDownPortStockList")
+    RESTfulResult getDownPortStockList(@RequestBody(required = false) Map<String, Object> mapValue);
+
+    @PostMapping(value = "/api/v1/wmsh/wmshgridmaterials/getRunStockList")
+    RESTfulResult getRunStockList(@RequestBody(required = false) Map<String, Object> mapValue);
+
     /**
      * 查询所有港存库入库实绩
      *

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -258,4 +258,8 @@ public interface UniversalMapper {
     int delectQueueS(BigDecimal capacityIdS);
     //删除多拼数据
     int delectQueueM(BigDecimal capacityIdM);
+
+    Map<String, Object> getDispachSwitch();
+
+    int updateDispachSwitch(Map<String, Object> map);
 }

+ 75 - 0
src/main/java/com/steerinfo/dil/util/UploadUtils.java

@@ -0,0 +1,75 @@
+package com.steerinfo.dil.util;
+
+import com.google.common.io.Files;
+import com.steerinfo.framework.exception.BaseException;
+import com.steerinfo.framework.utils.io.FileUtils;
+import com.steerinfo.framework.utils.misc.IdGenerator;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * @author lyg
+ * @Description:
+ * @CreateTime 2022/7/15 19:05
+ * @Version:1.0
+ */
+
+    public class UploadUtils {
+        public UploadUtils() {
+        }
+
+        public static String uploadFile(MultipartFile file, IdGenerator idGenerator, String uploadPath, String imgPath) {
+            String profilePhoto = null;
+            if (file != null) {
+                String fileId = idGenerator.getNextStr();
+                String fileName = file.getOriginalFilename();
+                String ext = Files.getFileExtension(fileName.toLowerCase());
+                try {
+                    String filePath = uploadPath + imgPath + fileId + "." + ext;
+                    File newFile = new File(filePath);
+                    FileUtils.makesureParentDirExists(newFile);
+                    Files.write(file.getBytes(), newFile);
+                } catch (IOException var10) {
+                    throw new BaseException("上传文件为空:" + var10.getMessage());
+                }
+
+                profilePhoto = uploadPath + imgPath + fileId + "." + ext;
+            }
+
+            return profilePhoto;
+        }
+
+        public static byte[] imageToByte(String imgUrl) {
+            if (StringUtils.isEmpty(imgUrl)) {
+                return null;
+            } else {
+                File file = new File(imgUrl);
+                byte[] data = null;
+                if (file.exists()) {
+                    String ext = Files.getFileExtension(imgUrl.toLowerCase());
+                    ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+                    try {
+                        BufferedImage bi = ImageIO.read(file);
+                        ImageIO.write(bi, ext, out);
+                        data = out.toByteArray();
+                    } catch (FileNotFoundException var7) {
+                        var7.printStackTrace();
+                    } catch (IOException var8) {
+                        var8.printStackTrace();
+                    }
+                }
+
+                return data;
+            }
+        }
+    }
+
+

+ 9 - 0
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -1399,4 +1399,13 @@
         on qql.capacity_id=oo.capacity_id
         where oo.order_id=#{orderId}
     </select>
+    <select id="getDispachSwitch" resultType="java.util.Map">
+        SELECT IS_OK "isOk" FROM AMS_DISPATCH_SWITCH
+        fetch NEXT 1 rows only
+    </select>
+
+    <update id="updateDispachSwitch">
+        UPDATE AMS_DISPATCH_SWITCH SET IS_OK=#{isOk}
+    </update>
+
 </mapper>