Quellcode durchsuchen

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

Redeem vor 1 Jahr
Ursprung
Commit
9b2e913078

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

+ 12 - 3
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -428,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 = "查询发货单第几次退库")
@@ -726,4 +726,13 @@ public class AMScontroller {
     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);
+    }
 }

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

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

@@ -687,4 +687,16 @@ public class TMSController extends BaseRESTfulController {
     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);
+    }
 }

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

@@ -226,4 +226,11 @@ public class UniversalController extends BaseRESTfulController {
         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);
+    }
 }

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

@@ -166,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);
@@ -265,6 +265,9 @@ public interface AmsFeign {
                                  @RequestParam Integer pageSize);
 
     @PostMapping(value = "api/v1/ams/amstransrequirements/getUpdateDlivDirno")
-    public RESTfulResult getUpdateDlivDirno(@RequestBody Map<String, Object> map);
+    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);
+}

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

@@ -248,6 +248,12 @@ public interface TmsFeign {
     @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);
 }
 
 

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

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

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

@@ -43,15 +43,15 @@ 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:172.16.90.214:8093}
+    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}
+    url: ${RMSFEIGN_URL:172.16.90.214:8060}
   IntegrationFeign:
     url: ${INTEGRATIONFEIGN_URL:localhost:8066}
   OTMSFeign:
@@ -62,6 +62,8 @@ openfeign:
     url: ${WEBSOCKETFEIGN_URL:localhost:8000}
   SSOFeign:
     url: ${SSOFEIGN_URL:172.16.90.214:9001}
+  REPORTFeign:
+    url: ${REPORTFEIGN_URL:localhost:8055}
 
 
 #远程调用

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

@@ -47,6 +47,8 @@ openfeign:
     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}
 
 
 #远程调用

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

@@ -917,4 +917,55 @@
         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>