Przeglądaj źródła

Merge branch 'master' of https://gitee.com/antai-wuliu/ANTAI-API

zhangym 1 rok temu
rodzic
commit
78ce16b5a7
22 zmienionych plików z 876 dodań i 109 usunięć
  1. 8 3
      src/main/java/com/steerinfo/dil/config/RequestFilter.java
  2. 1 1
      src/main/java/com/steerinfo/dil/config/SessionInterceptor.java
  3. 62 5
      src/main/java/com/steerinfo/dil/controller/AMScontroller.java
  4. 157 31
      src/main/java/com/steerinfo/dil/controller/RMScontroller.java
  5. 37 0
      src/main/java/com/steerinfo/dil/controller/ReportController.java
  6. 73 28
      src/main/java/com/steerinfo/dil/controller/SystemFileController.java
  7. 31 0
      src/main/java/com/steerinfo/dil/controller/TMSController.java
  8. 16 1
      src/main/java/com/steerinfo/dil/controller/UniversalController.java
  9. 127 0
      src/main/java/com/steerinfo/dil/controller/WMSController.java
  10. 48 0
      src/main/java/com/steerinfo/dil/controller/WebSocketController.java
  11. 32 0
      src/main/java/com/steerinfo/dil/feign/ATWmsFeign.java
  12. 25 2
      src/main/java/com/steerinfo/dil/feign/AmsFeign.java
  13. 19 0
      src/main/java/com/steerinfo/dil/feign/ReportFeign.java
  14. 29 0
      src/main/java/com/steerinfo/dil/feign/RmsFeign.java
  15. 16 0
      src/main/java/com/steerinfo/dil/feign/TmsFeign.java
  16. 6 0
      src/main/java/com/steerinfo/dil/feign/WMSFeign.java
  17. 33 0
      src/main/java/com/steerinfo/dil/feign/WebSocketFeign.java
  18. 4 0
      src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java
  19. 2 2
      src/main/java/com/steerinfo/dil/util/ExcelToolUtils.java
  20. 6 2
      src/main/resources/application-dev.yml
  21. 6 1
      src/main/resources/application-prod.yml
  22. 138 33
      src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

+ 8 - 3
src/main/java/com/steerinfo/dil/config/RequestFilter.java

@@ -34,6 +34,7 @@ public class RequestFilter implements Filter {
            String roleCodes = httpRequest.getHeader("rolecodes");
            String dilCompanyList = httpRequest.getHeader("dilCompanyList");
            String rootCompanyMap = httpRequest.getHeader("rootCompanyMap");
+           String accessToken = httpRequest.getHeader("accessToken");
            //获取cookie用户数据
            if (cookies != null && cookies.length > 0) {
                for (Cookie cookie : cookies) {
@@ -49,6 +50,8 @@ public class RequestFilter implements Filter {
                        dilCompanyList = URLDecoder.decode(cookie.getValue(),"utf-8");
                    } else if (cookie.getName().equals("rootCompanyMap") && rootCompanyMap == null) {
                        rootCompanyMap = URLDecoder.decode(cookie.getValue(),"utf-8");
+                   } else if (cookie.getName().equals("accessToken") && accessToken == null) {
+                       accessToken = URLDecoder.decode(cookie.getValue(), "utf-8");
                    }
                    else if (userId != null && userName != null && orgCode != null && roleCodes != null && dilCompanyList != null && rootCompanyMap != null) {
                        //都查到了,退出
@@ -67,9 +70,10 @@ public class RequestFilter implements Filter {
            httpRequest.setAttribute("userId", userId);
            httpRequest.setAttribute("userName", userName);
            httpRequest.setAttribute("orgCode", orgCode);
-           httpRequest.setAttribute("roleCodes", roleCodes);
+           Object roleCodesObject = JSONObject.parse(roleCodes);
+           httpRequest.setAttribute("roleCodes", roleCodesObject);
            Object dilCompanyListObject = JSONObject.parse(dilCompanyList);
-           httpRequest.setAttribute("dilCompanyList",dilCompanyListObject);;
+           httpRequest.setAttribute("dilCompanyList",dilCompanyListObject);
            Object rootCompanyMapObject = JSONObject.parse(rootCompanyMap);
            httpRequest.setAttribute("rootCompanyMap",rootCompanyMapObject);
            //获取RequestBody数据
@@ -85,9 +89,10 @@ public class RequestFilter implements Filter {
                params.put("userId", userId);
                params.put("userName", userName);
                params.put("orgCode", orgCode);
-               params.put("roleCodes",roleCodes);
+               params.put("roleCodes",roleCodesObject);
                params.put("dilCompanyList",dilCompanyListObject);
                params.put("rootCompanyMap",rootCompanyMapObject);
+               params.put("accessToken",accessToken);
                //将新的RequestBody写入新的请求对象保存
                ServletRequest requestWrapper = new RequestWrapper(httpRequest, params.toJSONString());
                chain.doFilter(requestWrapper, response);

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

@@ -39,7 +39,7 @@ public class SessionInterceptor extends HandlerInterceptorAdapter {
             //无权访问
             response.setCharacterEncoding("UTF-8");
             response.setContentType("application/json; charset=utf-8");
-            RESTfulResult result =new RESTfulResult("500", "无权访问", "无权访问");
+            RESTfulResult result =new RESTfulResult("500", "无权访问111", "无权访问");
             response.getWriter().write(JSONObject.toJSONString(result));
             return false;
         }

+ 62 - 5
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -92,6 +92,14 @@ public class AMScontroller {
         return amsFeign.purchaseRequirementAdd(map);
     }
 
+    @ApiOperation(value = "同步生产调拨订单")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @PostMapping(value = "/productionOrderSync")
+    @LogAround(foreignKeys = {"orderId"}, foreignKeyTypes = {"采购订单"})
+    public Map<String, Object> productionOrderSync(@RequestBody(required = false) Map<String, Object> map) {
+        return amsFeign.productionOrderSync(map);
+    }
+
     @ApiOperation(value = "生产需求新增接口", notes = "生产需求新增接口")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
@@ -116,8 +124,6 @@ public class AMScontroller {
             Date dueTime = simpleDateFormat.parse(map.get("dueTime").toString());
             map.put("dueTime", dueTime);
         }
-
-
         return amsFeign.productionRequirementAdd(map);
     }
 
@@ -422,9 +428,9 @@ public class AMScontroller {
 
     @ApiOperation(value = "撤销退货", notes = "根据发货单号将发货单的退货记录清除")
     @ApiImplicitParam(name = "id", value = "查询内容", required = false, dataType = "String")
-    @PostMapping(value = "revokeReturnGoods/{id}")
-    public RESTfulResult revokeReturnGoods(@PathVariable("id") String id) {
-        return amsFeign.revokeReturnGoods(id);
+    @PostMapping(value = "revokeReturnGoods")
+    public RESTfulResult revokeReturnGoods(@RequestBody Map<String, Object> params) {
+        return amsFeign.revokeReturnGoods(params);
     }
 
     @ApiOperation(value = "查询发货单第几次退库", notes = "查询发货单第几次退库")
@@ -677,5 +683,56 @@ public class AMScontroller {
         return amsFeign.requirementApproveDetails(map);
     }
 
+    @ApiOperation(value = "展示订单执行情况")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/getOrderStatus")
+    RESTfulResult getOrderStatus(@RequestBody(required = false) Map<String, Object> map,
+                                                             Integer apiId,
+                                                             Integer pageNum,
+                                                             Integer pageSize
+    ) {
+        return amsFeign.getOrderStatus(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+
+    }
+
 
+    @ApiOperation(value = "展示调拨订单信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/getamsproductionordersyncs")
+    RESTfulResult getamsproductionordersyncs(@RequestBody(required = false) Map<String, Object> map,
+                                 Integer apiId,
+                                 Integer pageNum,
+                                 Integer pageSize
+    ) {
+        return amsFeign.getamsproductionordersyncs(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+
+    }
+
+    @ApiOperation(value = "查询发运通知单修改需要内容", notes = "查询发运通知单修改需要内容")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/getUpdateDlivDirno")
+    public RESTfulResult getUpdateDlivDirno(@RequestBody Map<String, Object> map) {
+        return amsFeign.getUpdateDlivDirno(map);
+    }
+
+    @ApiOperation(value = "发运通知单修改", notes = "发运通知单修改")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @PostMapping(value = "/saleUpdate")
+    public RESTfulResult saleUpdate(@RequestBody Map<String, Object> map) {
+        return amsFeign.saleUpdate(map);
+    }
 }

+ 157 - 31
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -107,22 +107,25 @@ public class RMScontroller extends BaseRESTfulController {
         //获取Excel中包含的对象数组
         List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
         map.put("list", list);
-        Set<String> materialTypeSet = new HashSet<>();
+        Set<String> set = new HashSet<>();
         for (Map<String, Object> item : list) {
             //校验行
             if(
                     item.get("名称")==null || item.get("名称").equals("")
+                    || item.get("编码")==null || item.get("编码").equals("")
+                    || item.get("NC主键")==null || item.get("NC主键").equals("")
             ){
-                throw new Exception("单元格数据异常(名称),请检查模板或数据是否正确!");
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
             }
-            materialTypeSet.add(item.get("名称").toString());
+            set.add(item.get("NC主键").toString());
+            map.put(item.get("NC主键").toString(),item);
         }
         //去重
-        String[] materialTypes = materialTypeSet.toArray(new String[0]);
-        if (materialTypes.length != list.size()) {
-            throw new Exception("名称不允许重复!");
+        String[] setList = set.toArray(new String[0]);
+        if (setList.length != list.size()) {
+            throw new Exception("NC主键不允许重复!");
         }
-        map.put("materialTypes",materialTypes);
+        map.put("setList",setList);
         map.put("userId",userId);
         map.put("userName",userName);
         map.put("remark",remark);
@@ -160,6 +163,13 @@ public class RMScontroller extends BaseRESTfulController {
         return rmsFeign.getMaterialTypeById(id);
     }
 
+    @ApiOperation(value = "物资树形结构", notes = "")
+    @ApiImplicitParam(name = "rmsMaterialType", value = "rmsMaterialType", required = true, dataType = "rmsMaterialType")
+    @PostMapping(value = "/getMaterialTree")
+    public Map<String, Object> getMaterialTree(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.getMaterialTree(map);
+    }
+
 
     //====================物资
     @ApiOperation(value = "获取物资列表")
@@ -218,6 +228,41 @@ public class RMScontroller extends BaseRESTfulController {
         return rmsFeign.syncMaterial(map);
     }
 
+    @ApiOperation("导入物资")
+    @PostMapping("/importMaterial")
+    public RESTfulResult importMaterial(@RequestBody MultipartFile file,
+                                                 String remark,
+                                                 String userId,
+                                                 String userName) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        //获取Excel中包含的对象数组
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
+        Set<String> set = new HashSet<>();
+        for (Map<String, Object> item : list) {
+            //校验行
+            if(
+                    item.get("名称")==null || item.get("名称").equals("")
+                            || item.get("编码")==null || item.get("编码").equals("")
+                            || item.get("类型")==null || item.get("类型").equals("")
+                            || item.get("NC主键")==null || item.get("NC主键").equals("")
+            ){
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
+            }
+            set.add(item.get("NC主键").toString());
+            map.put(item.get("NC主键").toString(),item);
+        }
+        //去重
+        String[] setList = set.toArray(new String[0]);
+        if (setList.length != list.size()) {
+            throw new Exception("NC主键不允许重复!");
+        }
+        map.put("setList",setList);
+        map.put("userId",userId);
+        map.put("userName",userName);
+        return rmsFeign.importMaterial(map);
+    }
+
     //====================作业点
     @ApiOperation(value = "获取作业点列表")
     @ApiImplicitParams({
@@ -267,31 +312,31 @@ public class RMScontroller extends BaseRESTfulController {
                                          String userName) throws Exception {
         Map<String, Object> map = new HashMap<>();
         //获取Excel中包含的对象数组
-        List<Map<String, Object>> excelList = ExcelToolUtils.getExcelList(file, 0);
-        map.put("list", excelList);
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
         Set<String> set = new HashSet<>();
-        for (Map<String, Object> item : excelList) {
+        for (Map<String, Object> item : list) {
             //校验行
             if(
-                    item.get("作业点名称")==null || item.get("作业点名称").equals("")
-                            || item.get("作业点类型")==null || item.get("作业点类型").equals("")
-                            || item.get("作业点状态")==null || item.get("作业点状态").equals("")
-                            || item.get("环保标准")==null || item.get("环保标准").equals("")
+                    item.get("名称")==null || item.get("名称").equals("")
+                            || item.get("编码")==null || item.get("编码").equals("")
+                            || item.get("类型")==null || item.get("类型").equals("")
+                            || item.get("NC主键")==null || item.get("NC主键").equals("")
                             || item.get("所属单位")==null || item.get("所属单位").equals("")
             ){
-                throw new Exception("单元格数据异常(作业点名称/作业点类型/作业点状态/环保标准/所属单位),请检查模板或数据是否正确!");
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
             }
             //隔开用于查询是否数据库存在
-            set.add(item.get("作业点名称").toString());
+            set.add(item.get("NC主键").toString());
             //key-value结构方便数据库去重后获取值
-            map.put(item.get("作业点名称").toString(),item);
+            map.put(item.get("NC主键").toString(),item);
         }
         //去重
-        String[] list = set.toArray(new String[0]);
-        if (list.length != excelList.size()) {
-            throw new Exception("手机号不允许重复!");
+        String[] setList = set.toArray(new String[0]);
+        if (setList.length != list.size()) {
+            throw new Exception("NC主键不允许重复!");
         }
-        map.put("list",list);
+        map.put("setList",setList);
         map.put("userId",userId);
         map.put("userName",userName);
         return rmsFeign.importOperationPoint(map);
@@ -383,23 +428,23 @@ public class RMScontroller extends BaseRESTfulController {
             //校验行
             if(
                     item.get("姓名")==null || item.get("姓名").equals("")
-                            || item.get("岗位")==null || item.get("岗位").equals("")
-                            || item.get("联系电话")==null || item.get("联系电话").equals("")
-                            || item.get("身份证号码")==null || item.get("身份证号码").equals("")
+                            || item.get("编码")==null || item.get("编码").equals("")
+                            || item.get("身份证号")==null || item.get("身份证号").equals("")
                             || item.get("所属单位")==null || item.get("所属单位").equals("")
-                            || item.get("授权角色")==null || item.get("授权角色").equals("")
+                            || item.get("NC主键")==null || item.get("NC主键").equals("")
             ){
-                throw new Exception("单元格数据异常(姓名/岗位/联系电话/身份证号码/所属单位/授权角色),请检查模板或数据是否正确!");
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
             }
             //隔开用于查询是否数据库存在
-            set.add(item.get("联系电话").toString() +"-"+item.get("所属单位").toString());
+            set.add(item.get("NC主键").toString() + item.get("所属单位").toString());
+            map.put(item.get("NC主键").toString() + item.get("所属单位").toString(),item);
         }
         //去重
-        String[] array = set.toArray(new String[0]);
-        if (array.length != list.size()) {
-            throw new Exception("手机号-所属单位不允许重复!");
+        String[] setList = set.toArray(new String[0]);
+        if (setList.length != list.size()) {
+            throw new Exception("NC主键-所属单位不允许重复!");
         }
-        map.put("list", list);
+        map.put("setList", setList);
         map.put("userId",userId);
         map.put("userName",userName);
         return rmsFeign.importPersonnel(map);
@@ -463,6 +508,42 @@ public class RMScontroller extends BaseRESTfulController {
         return rmsFeign.syncCompany(map);
     }
 
+    @ApiOperation("导入公司")
+    @PostMapping("/importCompany")
+    public RESTfulResult importCompany(@RequestBody MultipartFile file,
+                                                 String remark,
+                                                 String userId,
+                                                 String userName) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        //获取Excel中包含的对象数组
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
+        Set<String> set = new HashSet<>();
+        for (Map<String, Object> item : list) {
+            //校验行
+            if(
+                    item.get("名称")==null || item.get("名称").equals("")
+                    || item.get("编码")==null || item.get("编码").equals("")
+                    || item.get("类型")==null || item.get("类型").equals("")
+                    || item.get("NC主键")==null || item.get("NC主键").equals("")
+            ){
+                throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
+            }
+            set.add(item.get("NC主键").toString()+item.get("类型").toString());
+            map.put(item.get("NC主键").toString()+item.get("类型").toString(),item);
+        }
+        //去重
+        String[] setList = set.toArray(new String[0]);
+        if (setList.length != list.size()) {
+            throw new Exception("NC主键-类型不允许重复!");
+        }
+        map.put("setList",setList);
+        map.put("userId",userId);
+        map.put("userName",userName);
+        map.put("remark",remark);
+        return rmsFeign.importCompany(map);
+    }
+
     //运力
     @ApiOperation(value = "新增运力信息", notes = "根据rmsCapacity对象创建")
     @ApiImplicitParam(name = "rmsCapacity", value = "详细实体rmsCapacity", required = true, dataType = "rmsCapacity")
@@ -1233,4 +1314,49 @@ public class RMScontroller extends BaseRESTfulController {
     public Map<String, Object> deleteFuelType(@RequestBody(required = false) Map<String, Object> map) {
         return rmsFeign.deleteFuelType(map);
     }
+
+    @ApiOperation(value="新增地图顶点")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {"vertexId"},foreignKeyTypes = {"地图顶点"})
+    @PostMapping("/addVertex")
+    public Map<String, Object> addVertex(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.addVertex(map);
+    }
+
+    @ApiOperation(value="查询地图顶点")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @PostMapping("/getVertex")
+    public Map<String, Object> getVertex() {
+        return rmsFeign.getVertex();
+    }
+
+    @ApiOperation(value="新增地图边线")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {},foreignKeyTypes = {"地图边线"})
+    @PostMapping("/addEdge")
+    public Map<String, Object> addEdge(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.addEdge(map);
+    }
+
+    @ApiOperation(value="删除地图边线")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @LogAround(foreignKeys = {},foreignKeyTypes = {"地图边线"})
+    @PostMapping("/deleteEdge")
+    public Map<String, Object> deleteVertex(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.deleteEdge(map);
+    }
+
+    @ApiOperation(value="查询地图边线")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @PostMapping("/getEdge")
+    public Map<String, Object> getEdge() {
+        return rmsFeign.getEdge();
+    }
+
+    @ApiOperation(value="查询导航信息")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @PostMapping("/navigation")
+    public Map<String, Object> navigation(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.navigation(map);
+    }
 }

+ 37 - 0
src/main/java/com/steerinfo/dil/controller/ReportController.java

@@ -0,0 +1,37 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.ReportFeign;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@RestController
+@RequestMapping("${api.version}/report")
+public class ReportController {
+
+    @Autowired
+    ReportFeign reportFeign;
+
+    @ApiOperation(value="展示汽运监控")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/getQYMonitors")
+    Map<String, Object> getQYMonitors(@RequestBody(required=false) HashMap<String,Object> mapValue,
+                                        Integer apiId,
+                                        Integer pageNum,
+                                        Integer pageSize){
+        return reportFeign.getQYMonitors(mapValue == null ? new HashMap<>() : mapValue,apiId,pageNum,pageSize);
+    }
+}

+ 73 - 28
src/main/java/com/steerinfo/dil/controller/SystemFileController.java

@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.MultiValueMap;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartRequest;
@@ -157,11 +158,11 @@ public class SystemFileController extends BaseRESTfulController {
     public RESTfulResult insertFiles(String[] fileUuids, String[] fileNames, String[] fileTypes, Map<Object, MultipartFile> FileList, MultipartRequest request) throws Exception {
 
 
-        List<MultipartFile> files  = new ArrayList<>();
-        int index=-1;
-        for(int j = 0 ; j < fileTypes.length ; j ++ ) {
-            for(int i=0;i<21;i++) {
-                MultipartFile file = request.getFile("file" +j +"" + i);
+        List<MultipartFile> files = new ArrayList<>();
+        int index = -1;
+        for (int j = 0; j < fileTypes.length; j++) {
+            for (int i = 0; i < 21; i++) {
+                MultipartFile file = request.getFile("file" + j + "" + i);
                 if (file != null) {
                     files.add(file);
                     if (index < 0) {
@@ -171,7 +172,7 @@ public class SystemFileController extends BaseRESTfulController {
             }
         }
 
-        if(files.size() == 0) {
+        if (files.size() == 0) {
             return failed("传输失败");
         }
         for (int i = 0; i < fileUuids.length; i++) {
@@ -233,22 +234,22 @@ public class SystemFileController extends BaseRESTfulController {
 
         SystemFile value = systemFileMapper.selectByPrimaryKey(parmas.get("id").toString());
 
-            String fileName = value.getFilename();
-            String filepath = value.getFilepath();
-            if (fileName == null || fileName.isEmpty()) {
-                return failed("该图片不存在!");
-            }
-            if (filepath == null || filepath.isEmpty()) {
-                return failed("该图片地址不存在!");
-            }
+        String fileName = value.getFilename();
+        String filepath = value.getFilepath();
+        if (fileName == null || fileName.isEmpty()) {
+            return failed("该图片不存在!");
+        }
+        if (filepath == null || filepath.isEmpty()) {
+            return failed("该图片地址不存在!");
+        }
 
-            try {
-                String result = ftpFileUtil.downloadFile(fileName, filepath);
-                return success(result);
-            } catch (IOException e) {
-                e.getMessage();
-                return failed();
-            }
+        try {
+            String result = ftpFileUtil.downloadFile(fileName, filepath);
+            return success(result);
+        } catch (IOException e) {
+            e.getMessage();
+            return failed();
+        }
 
     }
 
@@ -303,22 +304,24 @@ public class SystemFileController extends BaseRESTfulController {
 
     @PostMapping("/previewfileList")
     public RESTfulResult previewfileList(@RequestBody HashMap map) {
-        String uuid =  map.get("uuid").toString();
+        String uuid = map.get("uuid").toString();
         String[] uuidList = uuid.split(";");
         //遍历数组,去找文件名称和路径
-        List<Map<String,Object>> mapList = systemFileMapper.getFileInfo(uuidList);
-        List<Map<String,Object>> resultList = new ArrayList<>();
-        for (Map<String,Object> parmas : mapList) {
+        List<Map<String, Object>> mapList = systemFileMapper.getFileInfo(uuidList);
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        for (Map<String, Object> parmas : mapList) {
             String filename = parmas.get("FILENAME").toString();
             String filepath = parmas.get("FILEPATH").toString();
-            if (filename == null ||filename.isEmpty()) {
+            if (filename == null || filename.isEmpty()) {
                 return failed("该图片不存在!");
             }
-            if (filepath == null ||filepath.isEmpty()) {
+            if (filepath == null || filepath.isEmpty()) {
                 return failed("该图片地址不存在!");
             }
             try {
-                Map<String,Object> result = ftpFileUtil.downloadFileNew(filename, filepath);
+                Map<String, Object> result = ftpFileUtil.downloadFileNew(filename, filepath);
+                //如果是返回base64,则给这个;网络路径则给netUrl
+                result.put("dataType","base");
                 resultList.add(result);
             } catch (IOException e) {
                 e.getMessage();
@@ -330,4 +333,46 @@ public class SystemFileController extends BaseRESTfulController {
     }
 
 
+    @PostMapping("/insertFilesReal")
+    public RESTfulResult insertFilesReal(MultipartRequest request, String[] uuidTypes) throws Exception {
+        //List<MultipartFile> files  = new ArrayList<>();
+        //获取多个文件
+        MultiValueMap<String, MultipartFile> multiFileMap = request.getMultiFileMap();
+        List<MultipartFile> files = multiFileMap.get("file");
+        System.out.println(uuidTypes + "uuidTypes");
+        System.out.println(request);
+        if (files.size() == 0) {
+            return failed("传输失败");
+        }
+        int index = 0;
+        for (MultipartFile file : files) {
+            String uuidType = uuidTypes[index];
+            String fileMediaType = file.getContentType();
+            String newName = uuidType.split(";")[0];
+            if (fileMediaType != null && fileMediaType.contains("image")) {
+                newName = uuidType.split(";")[0] + "." +fileMediaType.split("/")[1];
+            }
+            String uuid = uuidType.split(";")[0];
+            String fileType = uuidType.split(";")[1];
+            InputStream inputStream = file.getInputStream();
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("/yyyy/MM/dd");
+            String filePath = simpleDateFormat.format(new Date()) + "/" + fileType;
+            boolean result = ftpFileUtil.uploadToFtp(inputStream, filePath, newName, false);
+            inputStream.close();
+            if (result) {
+                SystemFile uploadFile = new SystemFile();
+                uploadFile.setFilename(newName);
+                uploadFile.setFilepath(filePath + "/" + newName);
+                uploadFile.setId(uuid);
+                SystemFile modela = systemFileService.add(uploadFile);
+                if (modela != null) {
+                    uuid += "," + modela.getId();
+                }
+            } else {
+                return failed(null, "上传文件失败");
+            }
+            index++;
+        }
+        return success();
+}
 }

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

@@ -669,4 +669,35 @@ public class TMSController extends BaseRESTfulController {
     Map<String,Object> dispatchTask(@RequestBody Map<String,Object> map) {
         return tmsFeign.dispatchTask(map);
     }
+
+    @ApiOperation("获取销售派车单信息")
+    @PostMapping("/getDlivDirnoSeqList/{id}")
+    public RESTfulResult getDlivDirnoSeqList(@PathVariable("id") String id) {
+        return tmsFeign.getDlivDirnoSeqList(id);
+    }
+
+    @ApiOperation("修改销售派车单信息")
+    @PostMapping("/updateDlivDirnoSeq")
+    @LogAround(foreignKeys = {"planChildId"}, foreignKeyTypes = {"修改销售运单"})
+    public RESTfulResult updateDlivDirnoSeq(@RequestBody Map<String,Object> map) {
+        return tmsFeign.updateDlivDirnoSeq(map);
+    }
+
+    @ApiOperation("查询销售派车单装车信息")
+    @PostMapping("/selectDlivDirnoSeqDetails")
+    public RESTfulResult selectDlivDirnoSeqDetails(@RequestBody  Map<String,Object> map) {
+        return tmsFeign.selectDlivDirnoSeqDetails(map);
+    }
+
+    @ApiOperation("查询订单厂内轨迹")
+    @PostMapping("/getPathByOrder")
+    public RESTfulResult getPathByOrder(@RequestBody  Map<String,Object> map) {
+        return tmsFeign.getPathByOrder(map);
+    }
+
+    @ApiOperation("上传定位,更新路径")
+    @PostMapping("/uploadLocation")
+    public RESTfulResult uploadLocation(@RequestBody  Map<String,Object> map) {
+        return tmsFeign.uploadLocation(map);
+    }
 }

+ 16 - 1
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -65,6 +65,8 @@ public class UniversalController extends BaseRESTfulController {
         return success(list);
     }
 
+
+
     @ApiModelProperty(value = "边输边查运力类型")
     @PostMapping("/getCapacityTypeByLike")
     public RESTfulResult getCapacityTypeByLike(@RequestBody(required = false) Map<String,Object> map) {
@@ -103,7 +105,6 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查人员")
     @PostMapping("/getPersonnelByLike")
     public RESTfulResult getPersonnelByLike(@RequestBody(required = false) Map<String,Object> map) {
-        DataChange.getMonthStartEnd(map);
         List<Map<String, Object>> list = universalMapper.getPersonnelByLike(map);
         return success(list);
     }
@@ -218,4 +219,18 @@ public class UniversalController extends BaseRESTfulController {
         List<Map<String, Object>> demandRules = universalMapper.getDemandRulesCode(map);
         return success(demandRules);
     }
+
+    @ApiOperation("获取身份证内码,用于判断该车辆是否有")
+    @PostMapping("/getIdCardCode")
+    public RESTfulResult getIdCardCode(@RequestBody Map<String,Object> map) {
+        String idCardCode = universalMapper.getIdCardCode(map);
+        return success(idCardCode);
+    }
+
+    @ApiOperation("根据物料编码获取物料信息")
+    @PostMapping("/getMaterial")
+    public RESTfulResult getMaterial(@RequestBody Map<String,Object> map) {
+        List<Map<String, Object>> material = universalMapper.getMaterial(map);
+        return success(material);
+    }
 }

+ 127 - 0
src/main/java/com/steerinfo/dil/controller/WMSController.java

@@ -1,9 +1,12 @@
 package com.steerinfo.dil.controller;
 
 import com.steerinfo.dil.annotaion.LogAround;
+import com.steerinfo.dil.feign.ATWmsFeign;
 import com.steerinfo.dil.feign.WMSFeign;
 import com.steerinfo.dil.model.WmsSlmDlivDir;
 import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -32,6 +35,12 @@ public class WMSController extends BaseRESTfulController {
     @Autowired
     WMSFeign wmsFeign;
 
+    @Autowired
+    ATWmsFeign atWmsFeign;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
     @ApiOperation(value = "查询", notes = "分页查询销售订单")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "params", value = "查询条件", required = false, dataType = "HashMap"),
@@ -164,6 +173,21 @@ public class WMSController extends BaseRESTfulController {
         return wmsFeign.getGridMaterialList(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
     }
 
+    @ApiOperation(value = "查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping(value = "/getGridMaterialDailyReport")
+    public Map<String, Object> getGridMaterialDailyReport(@RequestBody(required = false) Map<String, Object> map, Integer apiId,
+                                                   Integer pageNum,
+                                                   Integer pageSize) {
+        return wmsFeign.getGridMaterialDailyReport(map == null ? new HashMap<>() : map, apiId, pageNum, pageSize);
+    }
+
+
 
     @ApiOperation(value = "查询入库实绩")
     @ApiImplicitParams({
@@ -208,5 +232,108 @@ public class WMSController extends BaseRESTfulController {
     public Map<String, Object> outbound(@RequestBody(required = false) Map<String, Object> map){
         return wmsFeign.outbound(map);
     }
+
+    @PostMapping("/selectkcmx")
+    public RESTfulResult selectkcmx(@RequestBody HashMap map,
+                             Integer apiId,
+                             Integer pageNum,
+                             Integer pageSize){
+
+        if (map.get("createTime") != null) {
+            ArrayList arrayList = (ArrayList)map.get("createTime");
+            map.put("starttime", arrayList.get(0).toString());
+            map.put("endtime", arrayList.get(1).toString());
+        }
+
+         if (map.get("inDt") != null) {
+                ArrayList arrayList = (ArrayList)map.get("inDt");
+                map.put("indtstart", arrayList.get(0).toString());
+                map.put("indtend", arrayList.get(1).toString());
+        }
+        RESTfulResult selectkcmx = atWmsFeign.wuliuSelectkcmx(map, pageNum, pageSize);
+        Map<String, Object> data = (Map<String, Object>)selectkcmx.getData();
+        List<Map<String, Object>> list = (List<Map<String,Object>>)data.get("list");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,list);
+        pageList.setTotal((int)data.get("total"));
+        return success(pageList);
+    }
+
+    @PostMapping("/selectbybatchno")
+    public RESTfulResult selectbybatchno(@RequestBody HashMap map,
+                             Integer apiId,
+                             Integer pageNum,
+                             Integer pageSize){
+
+        if (map.get("createTime") != null) {
+            ArrayList arrayList = (ArrayList)map.get("createTime");
+            map.put("starttime", arrayList.get(0).toString());
+            map.put("endtime", arrayList.get(1).toString());
+        }
+
+        if (map.get("inDt") != null) {
+            ArrayList arrayList = (ArrayList)map.get("inDt");
+            map.put("indtstart", arrayList.get(0).toString());
+            map.put("indtend", arrayList.get(1).toString());
+        }
+
+        RESTfulResult selectkcmx = atWmsFeign.wuliuSelectbybatchno(map, pageNum, pageSize);
+        Map<String, Object> data = (Map<String, Object>)selectkcmx.getData();
+        List<Map<String, Object>> list = (List<Map<String,Object>>)data.get("list");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,list);
+        pageList.setTotal((int)data.get("total"));
+        return success(pageList);
+    }
+
+    @PostMapping("/selectbyprod")
+    public RESTfulResult selectbyprod(@RequestBody HashMap map,
+                                         Integer apiId,
+                                         Integer pageNum,
+                                         Integer pageSize){
+
+        if (map.get("createTime") != null) {
+            ArrayList arrayList = (ArrayList)map.get("createTime");
+            map.put("starttime", arrayList.get(0).toString());
+            map.put("endtime", arrayList.get(1).toString());
+        }
+
+        if (map.get("inDt") != null) {
+            ArrayList arrayList = (ArrayList)map.get("inDt");
+            map.put("indtstart", arrayList.get(0).toString());
+            map.put("indtend", arrayList.get(1).toString());
+        }
+
+        RESTfulResult selectkcmx = atWmsFeign.wuliuSelectbyprod(map, pageNum, pageSize);
+        Map<String, Object> data = (Map<String, Object>)selectkcmx.getData();
+        List<Map<String, Object>> list = (List<Map<String,Object>>)data.get("list");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,list);
+        pageList.setTotal((int)data.get("total"));
+        return success(pageList);
+    }
+
+    @PostMapping("/selectbybuttress")
+    public RESTfulResult selectbybuttress(@RequestBody HashMap map,
+                                      Integer apiId,
+                                      Integer pageNum,
+                                      Integer pageSize){
+
+        if (map.get("createTime") != null) {
+            ArrayList arrayList = (ArrayList)map.get("createTime");
+            map.put("starttime", arrayList.get(0).toString());
+            map.put("endtime", arrayList.get(1).toString());
+        }
+
+        if (map.get("inDt") != null) {
+            ArrayList arrayList = (ArrayList)map.get("inDt");
+            map.put("indtstart", arrayList.get(0).toString());
+            map.put("indtend", arrayList.get(1).toString());
+        }
+
+        RESTfulResult selectkcmx = atWmsFeign.wuliuSelectbybuttress(map, pageNum, pageSize);
+        Map<String, Object> data = (Map<String, Object>)selectkcmx.getData();
+        List<Map<String, Object>> list = (List<Map<String,Object>>)data.get("list");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId,list);
+        pageList.setTotal((int)data.get("total"));
+        return success(pageList);
+    }
 }
 

+ 48 - 0
src/main/java/com/steerinfo/dil/controller/WebSocketController.java

@@ -0,0 +1,48 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.WebSocketFeign;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @ClassName WebSocketController
+ * @Description TODO
+ * @date 2024-02-27 10:22
+ * @Version 1.0
+ */
+@RequestMapping("${api.version}/websocket")
+@RestController
+public class WebSocketController {
+    @Autowired
+    WebSocketFeign webSocketFeign;
+    @PostMapping("/readWebsocket/{id}")
+    public RESTfulResult readWebsocket(@PathVariable("id") String sendId){
+        return webSocketFeign.readWebsocket(sendId);
+    }
+
+    @PostMapping("/sendWebsocket/{id}")
+    public RESTfulResult sendWebsocket(@PathVariable("id") String webSocketId, @RequestBody HashMap<String,Object> map, HttpServletRequest request){
+        return webSocketFeign.sendWebsocket(webSocketId,map);
+    }
+
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        return webSocketFeign.list(parmas, pageNum, pageSize);
+    }
+
+    @GetMapping("/getMessageCount/{id}")
+    public RESTfulResult getMessageCount(@PathVariable String id,@RequestParam()String readFlag){
+        return webSocketFeign.getMessageCount(id,readFlag);
+    }
+
+    @GetMapping("/getBaseWebsocketPush")
+    public RESTfulResult getBaseWebsocketPush(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        return webSocketFeign.basewebsocketpushsList(parmas,pageNum,pageSize);
+    }
+}

+ 32 - 0
src/main/java/com/steerinfo/dil/feign/ATWmsFeign.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.HashMap;
+
+@FeignClient(value = "antwms-service", url = "http://192.168.1.16:8802/")  //http://192.168.0.244:8002/
+public interface ATWmsFeign {
+
+    /**
+     * 库存查询
+     * @param parmas
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "antai.maketx/v1/wmsproductdetails/wuliuSelectkcmx")
+    RESTfulResult wuliuSelectkcmx(@RequestBody HashMap parmas, @RequestParam Integer pageNum,@RequestParam Integer pageSize);
+
+    @GetMapping(value = "antai.maketx/v1/wmsproductdetails/wuliuSelectbybatchno")
+    RESTfulResult wuliuSelectbybatchno(@RequestBody HashMap parmas, @RequestParam Integer pageNum,@RequestParam Integer pageSize);
+
+    @GetMapping(value = "antai.maketx/v1/wmsproductdetails/wuliuSelectbyprod")
+    RESTfulResult wuliuSelectbyprod(@RequestBody HashMap parmas, @RequestParam Integer pageNum,@RequestParam Integer pageSize);
+
+    @GetMapping(value = "antai.maketx/v1/wmsproductdetails/wuliuSelectbybuttress")
+    RESTfulResult wuliuSelectbybuttress(@RequestBody HashMap parmas, @RequestParam Integer pageNum,@RequestParam Integer pageSize);
+}

+ 25 - 2
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -41,6 +41,10 @@ public interface AmsFeign {
     @PostMapping(value = "api/v1/ams/amstransrequirements/purchaseRequirementAdd")
     Map<String, Object> purchaseRequirementAdd(Map<String, Object> map);
 
+
+    @PostMapping(value = "api/v1/ams/amsorders/productionOrderSync")
+    Map<String, Object> productionOrderSync(@RequestBody(required = false) Map<String, Object> map);
+
     @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementAdd")
     Map<String, Object> productionRequirementAdd(Map<String, Object> map);
 
@@ -162,8 +166,8 @@ public interface AmsFeign {
     @PostMapping(value = "api/v1/ams/amsrequirementchilds/returnGoods")
     RESTfulResult returnGoods(@RequestBody(required = false) HashMap<String, Object> params);
 
-    @PostMapping(value = "api/v1/ams/amsrequirementchilds/revokeReturnGoods/{id}")
-    RESTfulResult revokeReturnGoods(@PathVariable("id") String id);
+    @PostMapping(value = "api/v1/ams/amsrequirementchilds/revokeReturnGoods")
+    RESTfulResult revokeReturnGoods(@RequestBody Map<String, Object> params);
 
     @GetMapping(value = "api/v1/ams/amsrequirementchilds/getcut/{dlivDirno}")
     RESTfulResult getcut(@PathVariable String dlivDirno);
@@ -247,4 +251,23 @@ public interface AmsFeign {
     @PostMapping(value = "api/v1/ams/amstransrequirements/requirementApproveDetails")
     Map<String, Object> requirementApproveDetails(@RequestBody Map<String, Object> map);
 
+    @PostMapping(value = "api/v1/ams/amsorders/getOrderStatus")
+    RESTfulResult getOrderStatus(@RequestBody Map<String, Object> objectMap,
+                                 @RequestParam Integer apiId,
+                                 @RequestParam Integer pageNum,
+                                 @RequestParam Integer pageSize);
+
+
+    @PostMapping(value = "api/v1/ams/amsproductionordersyncs/getamsproductionordersyncs")
+    RESTfulResult getamsproductionordersyncs(@RequestBody Map<String, Object> objectMap,
+                                 @RequestParam Integer apiId,
+                                 @RequestParam Integer pageNum,
+                                 @RequestParam Integer pageSize);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/getUpdateDlivDirno")
+    RESTfulResult getUpdateDlivDirno(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/saleUpdate")
+    RESTfulResult saleUpdate(@RequestBody Map<String, Object> map);
+
 }

+ 19 - 0
src/main/java/com/steerinfo/dil/feign/ReportFeign.java

@@ -0,0 +1,19 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@FeignClient(value = "ANTAI-REPORT-API", url = "${openfeign.REPORTFeign.url}")
+public interface ReportFeign {
+
+    @PostMapping(value = "api/v1/report/monitors/getQYMonitors")
+    Map<String, Object> getQYMonitors(@RequestBody(required = false) HashMap<String, Object> map,
+                                        @RequestParam Integer apiId,
+                                        @RequestParam  Integer pageNum,
+                                        @RequestParam  Integer pageSize);
+}

+ 29 - 0
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -95,6 +95,9 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmsmaterialtype/getMaterialTypeById/{id}")
     Map<String, Object> getMaterialTypeById(@PathVariable("id") BigDecimal id);
 
+    @PostMapping(value = "api/v1/rms/rmsmaterialtype/getMaterialTree")
+    Map<String, Object> getMaterialTree(@RequestBody(required = false) Map<String, Object> map);
+
     //==============物资
     //查询物资List
     @PostMapping(value = "api/v1/rms/rmsmaterial/getMaterialList")
@@ -122,6 +125,9 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmsmaterial/syncMaterial")
     Map<String, Object> syncMaterial(@RequestBody(required = false) Map<String, Object> map);
 
+    @PostMapping(value = "api/v1/rms/rmsmaterial/importMaterial")
+    RESTfulResult importMaterial(@RequestBody(required = false) Map<String, Object> map);
+
     //==============作业点
     //查询作业点List
     @PostMapping(value = "api/v1/rms/rmsoperationpoint/getOperationPointList")
@@ -207,6 +213,11 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmscompany/syncCompany")
     Map<String, Object> syncCompany(@RequestBody(required = false) Map<String, Object> map);
 
+    //导入公司
+    @PostMapping(value = "api/v1/rms/rmscompany/importCompany")
+    RESTfulResult importCompany(@RequestBody(required = false) Map<String, Object> map);
+
+
 
     //===========运力
     //新增运力
@@ -680,6 +691,24 @@ public interface RmsFeign {
 
     @PostMapping(value = "api/v1/rms/rmsfueltypes/deleteFuelType")
     Map<String, Object> deleteFuelType(@RequestBody(required = false) Map<String, Object> mapValue);
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/addVertex")
+    Map<String, Object> addVertex(@RequestBody(required = false) Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/getVertex")
+    Map<String, Object> getVertex();
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/addEdge")
+    Map<String, Object> addEdge(@RequestBody(required = false) Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/deleteEdge")
+    Map<String, Object> deleteEdge(@RequestBody(required = false) Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/getEdge")
+    Map<String, Object> getEdge();
+
+    @PostMapping(value = "api/v1/rms/rmsmapvertexs/navigation")
+    Map<String, Object> navigation(@RequestBody(required = false) Map<String, Object> map);
 }
 
 

+ 16 - 0
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -4,6 +4,7 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import oracle.jdbc.proxy.annotation.Post;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
@@ -238,6 +239,21 @@ public interface TmsFeign {
     @PostMapping(value = "/api/v1/tms/omstransorders/dispatchTask")
     Map<String, Object> dispatchTask(@RequestBody Map<String, Object> map);
 
+    @PostMapping(value = "/api/v1/tms/omstransorders/getDlivDirnoSeqList/{id}")
+    RESTfulResult getDlivDirnoSeqList(@PathVariable("id") String id);
+
+    @PostMapping(value = "/api/v1/tms/omstransorders/updateDlivDirnoSeq")
+    RESTfulResult updateDlivDirnoSeq(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/tms/omstransorders/selectDlivDirnoSeqDetails")
+    RESTfulResult selectDlivDirnoSeqDetails(@RequestBody Map<String, Object> map);
+
+
+    @PostMapping(value = "/api/v1/tms/tmsrouteresults/getPathByOrder")
+    RESTfulResult getPathByOrder(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/tms/tmsrouteresults/uploadLocation")
+    RESTfulResult uploadLocation(@RequestBody Map<String, Object> map);
 }
 
 

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

@@ -75,6 +75,12 @@ public interface WMSFeign {
                              @RequestParam Integer pageNum,
                              @RequestParam Integer pageSize);
 
+
+    @PostMapping("api/v1/wms/wmsgridmaterials/getGridMaterialDailyReport")
+    Map<String, Object> getGridMaterialDailyReport(@RequestBody(required = false) Map<String, Object> map, @RequestParam Integer apiId,
+                                            @RequestParam Integer pageNum,
+                                            @RequestParam Integer pageSize);
+
     @PostMapping("api/v1/wms/wmsinboundresults/getInboundList")
     Map<String, Object> getInboundList(@RequestBody(required = false) Map<String, Object> map, @RequestParam Integer apiId,
                                        @RequestParam Integer pageNum,

+ 33 - 0
src/main/java/com/steerinfo/dil/feign/WebSocketFeign.java

@@ -0,0 +1,33 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import io.swagger.annotations.ApiImplicitParam;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+/**
+ * @ClassName WebSocketFeign
+ * @Description TODO
+ * @date 2024-02-27 9:31
+ * @Version 1.0
+ */
+
+@FeignClient(name = "WEBSOCKET-API", url = "${openfeign.WebSocketFeign.url}")
+public interface WebSocketFeign {
+    @PostMapping("api/v1/websocket/basewebsocketsends/readWebsocket/{id}")
+    RESTfulResult readWebsocket(@PathVariable("id") String sendId);
+    @PostMapping("api/v1/websocket/basewebsocketsends/sendWebsocket/{id}")
+    RESTfulResult sendWebsocket(@PathVariable("id") String webSocketId, @RequestBody HashMap<String,Object> map);
+    @GetMapping("api/v1/websocket/basewebsocketsends/")
+    RESTfulResult list(@RequestParam("parmas")HashMap<String,Object> parmas,@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);
+    @GetMapping("api/v1/websocket/basewebsocketsends/getMessageCount/{id}")
+    RESTfulResult getMessageCount(@PathVariable String id,@RequestParam()String readFlag);
+    @GetMapping("api/v1/websocket/basewebsocketpushs/")
+    RESTfulResult basewebsocketpushsList(@RequestParam("parmas")HashMap<String,Object> parmas,@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);
+    @GetMapping("api/v1/websocket/basewebsocketpushs/noPage")
+    RESTfulResult noPage(@RequestParam HashMap<String,Object> parmas);
+    @GetMapping("api/v1/websocket/basewebsocketpushs/{id}")
+    RESTfulResult get(@PathVariable String id);
+}

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

@@ -69,4 +69,8 @@ public interface UniversalMapper {
 
     List<Map<String, Object>> getDemandRulesCode(Map<String, Object> map);
 
+    String getIdCardCode(Map<String, Object> map);
+
+    List<Map<String, Object>> getMaterial(Map<String, Object> map);
+
 }

+ 2 - 2
src/main/java/com/steerinfo/dil/util/ExcelToolUtils.java

@@ -465,8 +465,8 @@ public class ExcelToolUtils {
             }
             // 获取表格中最后一行的行号
             int lastRowNum = sheet.getLastRowNum();
-            if (lastRowNum < startRow) {
-                throw new Exception("第"+sheetIndex+"个工作簿无数据!请检查Excel!");
+            if (lastRowNum <= startRow) {
+                throw new Exception("第"+(sheetIndex+1)+"个工作簿无数据!请检查Excel!");
             }
             // 定义行变量和单元格变量
             Row row = null;

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

@@ -43,13 +43,13 @@ openfeign:
   AmsFeign:
     url: ${AMSFEIGN_URL:localhost:8079}
   BmsFeign:
-    url: ${BMSFEIGN_URL:localhost:8078}
+    url: ${BMSFEIGN_URL:172.16.90.214:8078}
   TmsFeign:
     url: ${TMSFEIGN_URL:localhost:8086}
   WMSFeign:
     url: ${WMSFEIGN_URL:localhost:8093}
   OMSFeign:
-    url: ${OMSFEIGN_URL:localhost:8095}
+    url: ${OMSFEIGN_URL:172.16.90.214:8095}
   RmsFeign:
     url: ${RMSFEIGN_URL:localhost:8060}
   IntegrationFeign:
@@ -58,8 +58,12 @@ openfeign:
     url: ${OTMSFEIGN_URL:localhost:8038}
   EmsFeign:
     url: ${TMSFEIGN_URL:localhost:8096}
+  WebSocketFeign:
+    url: ${WEBSOCKETFEIGN_URL:localhost:8000}
   SSOFeign:
     url: ${SSOFEIGN_URL:172.16.90.214:9001}
+  REPORTFeign:
+    url: ${REPORTFEIGN_URL:localhost:8055}
 
 
 #远程调用

+ 6 - 1
src/main/resources/application-prod.yml

@@ -16,6 +16,7 @@ server:
   tomcat:
     max-threads: 1000
     accept-count: 800
+    basedir: /tomcat/baseDir
 eureka:
   client:
     registerWithEureka: false
@@ -44,6 +45,10 @@ openfeign:
     url: ${TMSFEIGN_URL:172.16.90.214:8096}
   SSOFeign:
     url: ${SSOFEIGN_URL:172.16.90.214:9001}
+  WebSocketFeign:
+    url: ${WEBSOCKETFEIGN_URL:172.16.90.214:8000}
+  REPORTFeign:
+    url: ${REPORTFEIGN_URL:172.16.90.214:8055}
 
 
 #远程调用
@@ -54,7 +59,7 @@ feign:
     config:
       default:  #默认配置,连接时间要短,读取时间要长
         connectTimeout: 1000 #单位毫秒
-        readTimeout: 15000 #单位毫秒
+        readTimeout: 30000 #单位毫秒
 #熔断器
 hystrix:
   command:

+ 138 - 33
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -138,20 +138,53 @@
             <if test="businessCompanyId!=null and businessCompanyId!=''">
                 AND RC.COMPANY_ID = #{businessCompanyId}
             </if>
+            <if test="supplierCompanyId!=null and supplierCompanyId!=''">
+                AND RC.COMPANY_ID = #{supplierCompanyId}
+            </if>
+            <if test="receiveCompanyId!=null and receiveCompanyId!=''">
+                AND RC.COMPANY_ID = #{receiveCompanyId}
+            </if>
             <if test="carrierId!=null and carrierId!=''">
                 AND RC.COMPANY_ID = #{carrierId}
             </if>
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE(RC.COMPANY_NAME, #{index})
             </if>
-            <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
-                AND RC.COMPANY_ID in
+            <if test="roleCodes.contains('shippingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '发货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('recevingCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '收货单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('carrierCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
+                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
+                    <if test="companyType == '承运单位'">
+                        #{item.companyId}
+                    </if>
+                </foreach>
+            </if>
+            <if test="roleCodes.contains('businessCompany') and dilCompanyList != null and dilCompanyList.size > 0">
+                or RC.COMPANY_ID in
                 <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
-                    #{item.companyId}
+                    <if test="companyType == '业务单位'">
+                        #{item.companyId}
+                    </if>
                 </foreach>
             </if>
         </where>
         <if test="noRow == null">
+            order by LENGTH(company_name)
             FETCH NEXT 10 ROWS ONLY
         </if>
         )
@@ -207,13 +240,14 @@
         select * from(
         select * from(
         select
-        MATERIAL_TYPE_ID "materialTypeId",
-        MATERIAL_TYPE_NAME "materialTypeName",
+        MATERIAL_TYPE_ID "operationsNameId",
+        MATERIAL_TYPE_NAME "operationsName",
         MATERIAL_TYPE_ID "id",
         MATERIAL_TYPE_ID "value",
         MATERIAL_TYPE_NAME "label",
         MATERIAL_TYPE_NAME "text",
-        REMARK "remark"
+        REMARK "remark",
+        'operationsName' "prop"
         from RMS_MATERIAL_TYPE
         where DELETED = 0
         )
@@ -224,23 +258,12 @@
             <if test="remark!=null and remark!=''">
                 AND REGEXP_LIKE("remark", #{remark})
             </if>
-            <if test="materialTypeId!=null and materialTypeId!=''">
-                AND "materialTypeId" =  #{materialTypeId}
-            </if>
-           <if test="id!=null and id.size>0 and !(index!=null and index!='')">
-                AND "id" in
-                <foreach collection="id" item="item"  open="(" close=")" separator="," >
-                    #{item}
-                </foreach>
-            </if>
         </where>
         FETCH NEXT 10 ROWS ONLY
         )
         <if test="id!=null and id.size>0">
         UNION
             select
-            MATERIAL_TYPE_ID "materialTypeId",
-            MATERIAL_TYPE_NAME "materialTypeName",
             MATERIAL_TYPE_ID "id",
             MATERIAL_TYPE_ID "value",
             MATERIAL_TYPE_NAME "label",
@@ -331,6 +354,9 @@
         'personnelName' "prop"
         from RMS_PERSONNEL
         where DELETED = 0
+        <if test="isNC!=null">
+            AND SOURCE_ID IS NOT NULL
+        </if>
         )
         <where>
             <if test="personnelPost!=null and personnelPost!=''">
@@ -400,12 +426,6 @@
             <if test="capacityId!=null and capacityId!=''">
                 AND RCA .CAPACITY_ID = #{capacityId}
             </if>
-            <if test="id!=null and id.size>0 and !(index!=null and index!='')">
-                AND RCA .CAPACITY_ID in
-                <foreach collection="id" item="item"  open="(" close=")" separator="," >
-                    #{item}
-                </foreach>
-            </if>
             FETCH NEXT 10 ROWS ONLY
         )
         <if test="id!=null and id.size>0">
@@ -458,12 +478,16 @@
         select
         RC.TRANS_RANGE_ID "transrangeId",
             RC.TRANS_RANGE_NAME "transrangeName",
+        RC.TRANS_RANGE_ID "operationRangeId",
+        RC.TRANS_RANGE_NAME "operationRangeName",
         RC.TRANS_RANGE_ID "id",
         RC.TRANS_RANGE_ID "value",
         RC.TRANS_RANGE_NAME "label",
         RC.TRANS_RANGE_NAME "text",
         rc.START_POINT_ID   "shippingPointId",
-        rc.END_POINT_ID     "receivingPointId"
+        rc.END_POINT_ID     "receivingPointId",
+        rc.LINE_ID  "lineId",
+        'operationRangeName' "prop"
         from RMS_TRANS_RANGE RC
         where DELETED = 0
         )
@@ -519,7 +543,9 @@
         RCT.CAPACITY_TYPE_NAME "text",
         RCT .CAPACITY_MAX_LOAD "capacityMaxLoad",
         '[' || listagg (RCFT .FUEL_TYPE_ID, ',') WITHIN GROUP (ORDER BY RCT .CAPACITY_TYPE_ID) || ']' "fuelTypeIds",
-        listagg (RFT .FUEL_TYPE_NAME, '/') WITHIN GROUP (ORDER BY RCT .CAPACITY_TYPE_ID) "fuelTypes"
+
+        listagg (RFT .FUEL_TYPE_NAME, '/') WITHIN GROUP (ORDER BY RCT .CAPACITY_TYPE_ID) "fuelTypes",
+        'capacityTypeName' "prop"
         from RMS_CAPACITY_TYPE RCT
         LEFT JOIN RMS_CAPACITY_FUEL_TYPE RCFT ON RCFT.CAPACITY_TYPE_ID = RCT .CAPACITY_TYPE_ID
         LEFT JOIN RMS_FUEL_TYPE RFT ON RFT .FUEL_TYPE_ID = RCFT.FUEL_TYPE_ID
@@ -568,7 +594,9 @@
         RL.LINE_NAME "label",
         RL.LINE_NAME "text",
         NVL(RL_TEMP."points",'无') "points",
-        RL.LINE_TYPE    "lineType"
+
+        RL.LINE_TYPE    "lineType",
+        'lineName' "prop"
         from RMS_LINE RL
         LEFT JOIN
         (
@@ -636,13 +664,30 @@
         RC.MATERIAL_NAME "materialName",
         RC.MATERIAL_ID "id",
         RC.MATERIAL_ID "value",
-        RC.MATERIAL_NAME "label",
-        RC.MATERIAL_NAME "text"
+        RC.MATERIAL_CODE || '-' || RC.MATERIAL_NAME ||
+        (CASE WHEN RC.MATERIAL_SPECIFICATION IS NOT NULL
+        THEN '-' || RC.MATERIAL_SPECIFICATION
+        WHEN RC.MATERIAL_MODEL IS NOT NULL
+        THEN '-' || RC.MATERIAL_MODEL
+        ELSE ''
+        END) "label",
+
+        RC.MATERIAL_NAME "text",
+        'materialName' "prop"
         from RMS_MATERIAL RC
-        where DELETED = 0
         <where>
+            DELETED = 0
             <if test="index!=null and index!=''">
-                AND REGEXP_LIKE(RC.MATERIAL_NAME, #{index})
+                AND REGEXP_LIKE(RC.MATERIAL_CODE || '-' || RC.MATERIAL_NAME ||
+                (CASE WHEN RC.MATERIAL_SPECIFICATION IS NOT NULL
+                THEN '-' || RC.MATERIAL_SPECIFICATION
+                WHEN RC.MATERIAL_MODEL IS NOT NULL
+                THEN '-' || RC.MATERIAL_MODEL
+                ELSE ''
+                END), #{index})
+            </if>
+            <if test="materialId!=null and materialId!=''">
+                AND RC.MATERIAL_ID = #{materialId}
             </if>
         </where>
         FETCH NEXT 10 ROWS ONLY
@@ -650,11 +695,15 @@
         <if test="id!=null and id.size>0">
         UNION
             select
-            RC.MATERIAL_ID "materialId",
-            RC.MATERIAL_NAME "materialName",
             RC.MATERIAL_ID "id",
             RC.MATERIAL_ID "value",
-            RC.MATERIAL_NAME "label",
+            RC.MATERIAL_CODE || '-' || RC.MATERIAL_NAME ||
+            (CASE WHEN RC.MATERIAL_SPECIFICATION IS NOT NULL
+            THEN '-' || RC.MATERIAL_SPECIFICATION
+            WHEN RC.MATERIAL_MODEL IS NOT NULL
+            THEN '-' || RC.MATERIAL_MODEL
+            ELSE ''
+            END) "label",
             RC.MATERIAL_NAME "text"
             from RMS_MATERIAL RC
             WHERE RC.MATERIAL_ID in
@@ -862,5 +911,61 @@
             </if>
         </where>
     </select>
+    <select id="getIdCardCode" resultType="java.lang.String">
+        SELECT RC.INNNER_CODE FROM RMS_PERSONNEL RC
+        WHERE RC.PERSONNEL_JOB_NUMBER = #{jobNumber}
+        FETCH NEXT 1 ROWS ONLY
+    </select>
 
+    <select id="getMaterial" parameterType="java.util.Map" resultType="java.util.Map">
+        select t.prod_code_pk as "prodCodePk",
+               b.material_id as "materialId",
+               b.material_code as "prodCode",
+               b.material_name as "prodName",
+               b.material_model as "steelName",
+               t.create_emp as "createEmp",
+               t.create_time as "createTime",
+               b.material_specification as "specName",
+               nvl(substr(b.material_specification,
+                          decode(instr(b.material_specification, '/'),
+                                 0,
+                                 100,
+                                 instr(b.material_specification, '/')) + 1),
+                   12) * b.material_theoretical_weight / 1000 as "weight"
+        from rms_material b
+                 left join rms_material_map t
+                           on t.prod_code_l = b.material_code
+        <where>
+            <if test="prodCode != null and prodCode != ''">
+                and t.prod_code = #{prodCode}
+            </if>
+            <if test="materialId != null and materialId != ''">
+                and b.material_id = #{materialId}
+            </if>
+        </where>
+        union all
+        select '' as "prodCodePk",
+               b.material_id as "materialId",
+               b.material_code as "prodCode",
+               b.material_name as "prodName",
+               b.material_model as "steelName",
+               '' as "createEmp",
+               sysdate as "createTime",
+               b.material_specification as "specName",
+               nvl(substr(b.material_specification,
+                          decode(instr(b.material_specification, '/'),
+                                 0,
+                                 100,
+                                 instr(b.material_specification, '/')) + 1),
+                   12) * b.material_theoretical_weight / 1000 as "weight"
+        from rms_material b
+        <where>
+            <if test="prodCode != null and prodCode != ''">
+                and t.prod_code = #{prodCode}
+            </if>
+            <if test="materialId != null and materialId != ''">
+                and b.material_id = #{materialId}
+            </if>
+        </where>
+    </select>
 </mapper>