Procházet zdrojové kódy

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

yourName před 1 rokem
rodič
revize
b75243d8d0

+ 4 - 0
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) {
                        //都查到了,退出
@@ -88,6 +91,7 @@ public class RequestFilter implements Filter {
                params.put("roleCodes",roleCodes);
                params.put("dilCompanyList",dilCompanyListObject);
                params.put("rootCompanyMap",rootCompanyMapObject);
+               params.put("accessToken",accessToken);
                //将新的RequestBody写入新的请求对象保存
                ServletRequest requestWrapper = new RequestWrapper(httpRequest, params.toJSONString());
                chain.doFilter(requestWrapper, response);

+ 9 - 0
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -719,4 +719,13 @@ public class AMScontroller {
         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);
+    }
 }

+ 29 - 0
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -1314,4 +1314,33 @@ 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>")
+    @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>")
+    @PostMapping("/navigation")
+    public Map<String, Object> navigation(@RequestBody(required = false) Map<String, Object> map) {
+        return rmsFeign.navigation(map);
+    }
 }

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

@@ -217,4 +217,11 @@ 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);
+    }
 }

+ 112 - 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"),
@@ -223,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);
+    }
 }
 

+ 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);
+}

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

@@ -264,4 +264,7 @@ public interface AmsFeign {
                                  @RequestParam Integer pageNum,
                                  @RequestParam Integer pageSize);
 
+    @PostMapping(value = "api/v1/ams/amstransrequirements/getUpdateDlivDirno")
+    public RESTfulResult getUpdateDlivDirno(@RequestBody Map<String, Object> map);
+
 }

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

@@ -691,6 +691,18 @@ 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/navigation")
+    Map<String, Object> navigation(@RequestBody(required = false) Map<String, Object> map);
 }
 
 

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

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

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

@@ -57,7 +57,7 @@ feign:
     config:
       default:  #默认配置,连接时间要短,读取时间要长
         connectTimeout: 1000 #单位毫秒
-        readTimeout: 15000 #单位毫秒
+        readTimeout: 30000 #单位毫秒
 #熔断器
 hystrix:
   command:

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,7 +1,7 @@
 api.version: api/v1
 spring:
   profiles:
-    include: ${SPRING_PROFILES:dev}
+    include: ${SPRING_PROFILES:prod}
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8

+ 26 - 3
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -651,13 +651,25 @@
         select
         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>
             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}
@@ -670,7 +682,13 @@
             select
             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
@@ -878,5 +896,10 @@
             </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>
 
 </mapper>