Redeem 1 gadu atpakaļ
vecāks
revīzija
4c363ac0cd

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

@@ -168,6 +168,33 @@ public class AMScontroller  extends BaseRESTfulController {
     }
 
 
+    @ApiOperation(value = "生产需求批量修改接口", notes = "生产需求批量修改接口")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")
+    })
+    @LogAround(foreignKeys = {"transRequirementId"}, foreignKeyTypes = {"生产需求"})
+    @PostMapping(value = "/productionRequirementBatchUpdate")
+    public Map<String, Object> productionRequirementBatchUpdate(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
+        map.put("insertUsername", map.get("userName").toString());
+        if (map.containsKey("requirementStartTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date requirementStartTime = simpleDateFormat.parse(map.get("requirementStartTime").toString());
+            map.put("requirementStartTime", requirementStartTime);
+        }
+
+        if (map.containsKey("requirementEndTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date requirementEndTime = simpleDateFormat.parse(map.get("requirementEndTime").toString());
+            map.put("requirementEndTime", requirementEndTime);
+        }
+        if (map.containsKey("dueTime")){
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date dueTime = simpleDateFormat.parse(map.get("dueTime").toString());
+            map.put("dueTime", dueTime);
+        }
+        return amsFeign.productionRequirementBatchUpdate(map);
+    }
+
     @ApiOperation(value = "生产需求状态修改接口", notes = "生产需求状态修改接口")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "map", value = "json格式具体参数", required = true, dataType = "Map<String,Object>")

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

@@ -237,19 +237,19 @@ public class SystemFileController extends BaseRESTfulController {
 
     @PostMapping("/previewfile2")
     public RESTfulResult previewfile2(@RequestBody HashMap parmas) {
-
+        try {
         SystemFile value = systemFileMapper.selectByPrimaryKey(parmas.get("id").toString());
-
+        if (value==null){
+            return failed(1,"该文件不存在!请查验文件是否被清除或已损坏!");
+        }
         String fileName = value.getFilename();
         String filepath = value.getFilepath();
         if (fileName == null || fileName.isEmpty()) {
-            return failed("该图片不存在!");
+            return failed(1,"该文件不存在!");
         }
         if (filepath == null || filepath.isEmpty()) {
-            return failed("该图片地址不存在!");
+            return failed(1,"该文件地址不存在!");
         }
-
-        try {
             String result = ftpFileUtil.downloadFile(fileName, filepath);
             return success(result);
         } catch (IOException e) {

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

@@ -89,11 +89,10 @@ public class TMSController extends BaseRESTfulController {
 
     @ApiOperation(value = "修改车辆实绩")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
-    @PutMapping(value = "/comprehensiveresultsupadete/{id}")
+    @PostMapping(value = "/comprehensiveresultsupadete")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计算公式"})
-    public Map<String, Object> comprehensiveresultsUpdate(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map) {
-        map.put("updateUsername", map.get("userName").toString());
-        return tmsFeign.updateAmsSalaryContrac(id, map);
+    public Map<String, Object> comprehensiveresultsUpdate(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsFeign.updateAmsSalaryContrac(map);
     }
 
     @ApiOperation(value = "派发运输订单")
@@ -107,11 +106,21 @@ public class TMSController extends BaseRESTfulController {
     @ApiOperation(value = "批量派发运输订单")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/batchDispatch")
+    @RequestLimit(seconds = 100)
     @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
     public Map<String, Object> batchDispatch(@RequestBody(required = false) Map<String, Object> map) {
         return tmsFeign.batchDispatch(map);
     }
 
+    @ApiOperation(value = "批量派发运输订单")
+    @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
+    @PostMapping(value = "/batchDispatchSc")
+    @RequestLimit(seconds = 100)
+    @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"运输订单"})
+    public Map<String, Object> batchDispatchSc(@RequestBody(required = false) Map<String, Object> map) {
+        return tmsFeign.batchDispatchSc(map);
+    }
+
     @ApiOperation(value = "修改运输订单")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/updateTransOrder")
@@ -641,6 +650,7 @@ public class TMSController extends BaseRESTfulController {
         map.put("weightOld",weightOld);
         map.put("diff",DataChange.dataToBigDecimal(map.get("weight").toString()).subtract(weightOld));
         map.put("orderList",orderList);
+        map.put("requirementSerialNumber",orderList.get(0).get("requirementSerialNumber"));
         map.put("transPlanId",orderList.get(0).get("transPlanId"));
         map.put("materialId",orderList.get(0).get("materialId"));
         map.put("unloadPointId",orderList.get(0).get("unloadPointId"));
@@ -729,4 +739,11 @@ public class TMSController extends BaseRESTfulController {
     public RESTfulResult updateWeight(@RequestBody  Map<String,Object> map) {
         return tmsFeign.updateWeight(map);
     }
+
+    @ApiOperation("checkWeightResult")
+    @PostMapping("/checkWeightResult")
+    @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计量实绩"})
+    public Map<String,Object> checkWeightResult(@RequestBody  Map<String,Object> map) {
+        return tmsFeign.checkWeightResult(map);
+    }
 }

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

@@ -51,6 +51,7 @@ public class UniversalController extends BaseRESTfulController {
     @Autowired
     private ImageFileUtils imageFileUtils;
 
+
     @ApiModelProperty(value = "边输边查物资大类")
     @PostMapping("/getMaterialTypeByLike")
     public RESTfulResult getMaterialTypeByLike(@RequestBody(required = false) Map<String,Object> map) {

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

@@ -57,6 +57,10 @@ public interface AmsFeign {
                                                    @RequestParam  Integer pageSize);
     @PostMapping(value = "api/v1/ams/amstransrequirements/productionStatusUpdate")
     Map<String, Object> productionStatusUpdate(Map<String, Object> map);
+
+    @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementBatchUpdate")
+    Map<String, Object> productionRequirementBatchUpdate(Map<String, Object> map);
+
     @PostMapping(value = "api/v1/ams/amstransrequirements/productionRequirementChange")
     Map<String, Object> productionRequirementChange(Map<String, Object> map);
 

+ 8 - 2
src/main/java/com/steerinfo/dil/feign/TmsFeign.java

@@ -32,8 +32,8 @@ public interface TmsFeign {
     @PostMapping("api/v1/tms/tmscomprehensiveresults/add")
     Map<String, Object> insertAmsSalaryContrac(@RequestBody(required = false) Map<String, Object> map);
 
-    @PutMapping("api/v1/tms/tmscomprehensiveresults/{id}")
-    Map<String, Object> updateAmsSalaryContrac(@PathVariable BigDecimal id, @RequestBody(required = false) Map<String, Object> map);
+    @PostMapping("api/v1/tms/tmscomprehensiveresults/tmscomprehensiveresultsupdate")
+    Map<String, Object> updateAmsSalaryContrac(@RequestBody(required = false) Map<String, Object> map);
 
     @PutMapping("api/v1/tms/tmscomprehensiveresults/logicdelete")
     Map<String, Object> logicdeleteAmsSaalryContrac(@RequestBody(required = false) Map<String, Object> map);
@@ -257,6 +257,12 @@ public interface TmsFeign {
 
     @PostMapping(value = "/api/v1/tms/tmsrouteresults/uploadLocation")
     RESTfulResult uploadLocation(@RequestBody Map<String, Object> map);
+
+    @PostMapping("api/v1/tms/omstransorders/batchDispatchSc")
+    Map<String, Object> batchDispatchSc(@RequestBody(required = false) Map<String, Object> map);
+
+    @PostMapping("api/v1/tms/tmsweightresults/checkWeightResult")
+    Map<String, Object> checkWeightResult(@RequestBody(required = false) Map<String, Object> map);
 }
 
 

+ 11 - 26
src/main/resources/application-dev.yml

@@ -10,28 +10,13 @@ spring:
   mvc:
     async:
       request-timeout: 15000
-#  redis:
-#    # Redis本地服务器地址,注意要开启redis服务,即那个redis-server.exe
-#    host: 127.0.0.1
-#    # Redis服务器端口,默认为6379.若有改动按改动后的来
-#    port: 6379
-#    #Redis服务器连接密码,默认为空,若有设置按设置的来
-#    password:
-#    jedis:
-#      pool:
-#        # 连接池最大连接数,若为负数则表示没有任何限制
-#        max-active: 8
-#        # 连接池最大阻塞等待时间,若为负数则表示没有任何限制
-#        max-wait: -1
-#        # 连接池中的最大空闲连接
-#        max-idle: 8
-
 
 server:
   port: 8080
   tomcat:
     max-threads: 1000
     accept-count: 800
+    basedir: /tomcat/baseDir
 eureka:
   client:
     registerWithEureka: false
@@ -41,27 +26,27 @@ openfeign:
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:172.16.90.214:8083}
   AmsFeign:
-    url: ${AMSFEIGN_URL:localhost:8079}
+    url: ${AMSFEIGN_URL:172.16.90.214:8079}
   BmsFeign:
     url: ${BMSFEIGN_URL:172.16.90.214:8078}
   TmsFeign:
-    url: ${TMSFEIGN_URL:localhost:8086}
+    url: ${TMSFEIGN_URL:172.16.90.214:8086}
   WMSFeign:
-    url: ${WMSFEIGN_URL:localhost:8093}
+    url: ${WMSFEIGN_URL:172.16.90.214:8093}
   OMSFeign:
     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}
+    url: ${INTEGRATIONFEIGN_URL:172.16.90.214:8066}
   OTMSFeign:
-    url: ${OTMSFEIGN_URL:localhost:8038}
+    url: ${OTMSFEIGN_URL:172.16.90.214:8038}
   EmsFeign:
-    url: ${TMSFEIGN_URL:localhost:8096}
-  WebSocketFeign:
-    url: ${WEBSOCKETFEIGN_URL:localhost:8000}
+    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:localhost:8055}
 
@@ -74,7 +59,7 @@ feign:
     config:
       default:  #默认配置,连接时间要短,读取时间要长
         connectTimeout: 1000 #单位毫秒
-        readTimeout: 150000 #单位毫秒
+        readTimeout: 30000 #单位毫秒
 #熔断器
 hystrix:
   command:

+ 17 - 16
src/main/resources/application-prod.yml

@@ -1,9 +1,9 @@
 #正式环境配置文件
 spring:
   datasource:
-    url: jdbc:oracle:thin:@172.16.90.214:1521/gxmes
-    password: gxmestest
-    username: gxmestest
+    url: jdbc:oracle:thin:@172.16.90.197:1521/ATTMS
+    password: SSO
+    username: SSO
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: antai-api
@@ -24,31 +24,31 @@ eureka:
 
 openfeign:
   ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:172.16.90.214:8083}
+    url: ${COLUMNDATAFEIGN_URL:172.16.90.202:8083}
   AmsFeign:
-    url: ${AMSFEIGN_URL:localhost:8079}
+    url: ${AMSFEIGN_URL:172.16.90.202:8079}
   BmsFeign:
-    url: ${BMSFEIGN_URL:172.16.90.214:8078}
+    url: ${BMSFEIGN_URL:172.16.90.202:8078}
   TmsFeign:
-    url: ${TMSFEIGN_URL:localhost:8086}
+    url: ${TMSFEIGN_URL:172.16.90.202:8086}
   WMSFeign:
-    url: ${WMSFEIGN_URL:172.16.90.214:8093}
+    url: ${WMSFEIGN_URL:172.16.90.202:8093}
   OMSFeign:
-    url: ${OMSFEIGN_URL:172.16.90.214:8095}
+    url: ${OMSFEIGN_URL:172.16.90.202:8095}
   RmsFeign:
-    url: ${RMSFEIGN_URL:localhost:8060}
+    url: ${RMSFEIGN_URL:172.16.90.202:8060}
   IntegrationFeign:
-    url: ${INTEGRATIONFEIGN_URL:172.16.90.214:8066}
+    url: ${INTEGRATIONFEIGN_URL:172.16.90.202:8066}
   OTMSFeign:
-    url: ${OTMSFEIGN_URL:172.16.90.214:8038}
+    url: ${OTMSFEIGN_URL:172.16.90.202:8038}
   EmsFeign:
-    url: ${TMSFEIGN_URL:192.168.0.118:8096}
+    url: ${TMSFEIGN_URL:172.16.90.202:8096}
   SSOFeign:
-    url: ${SSOFEIGN_URL:172.16.90.214:9001}
+    url: ${SSOFEIGN_URL:172.16.90.202:9001}
   WebSocketFeign:
-    url: ${WEBSOCKETFEIGN_URL:172.16.90.214:8000}
+    url: ${WEBSOCKETFEIGN_URL:172.16.90.202:8000}
   REPORTFeign:
-    url: ${REPORTFEIGN_URL:localhost:8055}
+    url: ${REPORTFEIGN_URL:172.16.90.202:8055}
 
 
 #远程调用
@@ -60,6 +60,7 @@ feign:
       default:  #默认配置,连接时间要短,读取时间要长
         connectTimeout: 1000 #单位毫秒
         readTimeout: 30000 #单位毫秒
+
 #熔断器
 hystrix:
   command:

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

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

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

@@ -323,6 +323,7 @@
         PERSONNEL_NAME "personnelName",
         PERSONNEL_POST "personnelPost",
         PERSONNEL_PHONE "personnelPhone",
+        INNNER_CODE "innerCode",
         to_char(SSO_ID) "ssoId",
         PERSONNEL_ID "id",
         PERSONNEL_ID "value",
@@ -377,6 +378,7 @@
         PERSONNEL_NAME "personnelName",
         PERSONNEL_POST "personnelPost",
         PERSONNEL_PHONE "personnelPhone",
+        to_char(SSO_ID) "ssoId",
         PERSONNEL_ID "id",
         PERSONNEL_ID "value",
         PERSONNEL_NAME "label",
@@ -894,6 +896,7 @@
             OOC .ORDER_CHILD_ID "transOrderChildId",
             TUR .RESULT_ID "resultId",
             TUR .ACTUAL_TONNAGE "unloadWeightOld",
+            ATR .SERIAL_NUMBER  "requirementSerialNumber",
             APC .TRANS_PLAN_ID "transPlanId",
             ARC .RECEIVING_POINT_ID "unloadPointId",
             APC .MATERIAL_ID "materialId",