Forráskód Böngészése

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

Your Name 3 éve
szülő
commit
fbb0008959

+ 9 - 7
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
+import java.util.Arrays;
 import java.util.Date;
 import java.math.BigDecimal;
 
@@ -113,25 +114,26 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         return map.get("orderNumber") + "成功";
     }
 
+    //属于采购订单的订单类型(先计毛后计皮)
+    final private List<Integer> judgeOrderTypeList = Arrays.asList(5, 6, 7, 8, 9, 12, 14, 17, 18);
 
     /**
      * 生成汽运计量实体类
+     * @Author TXF
+     * @Date 2022/1/5 16:41
      * @param map
      * @return
-     */
+     **/
     public TmstruckWeightResult generateWeightResult(Map<String, Object> map) throws Exception {
         TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
         tmstruckWeightResult.setId(DataChange.dataToBigDecimal(map.get("weightTaskResultId")));
-        BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
+        Integer orderType = DataChange.dataToBigDecimal(map.get("orderTypee")).intValue();
         //磅单号
         tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
         String resultCrossWeightTime = (String) map.get("resultCrossWeightTime");
         tmstruckWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
         //如果是采购订单 先计毛再计皮
-        if("56789".contains(orderType.toString())
-                || orderType.intValue() == 12
-                || orderType.intValue() == 14
-        ){
+        if(judgeOrderTypeList.contains(orderType)){
             //如果毛重数据为空 则是第一次计量为毛重  此时第一次计量时间放皮重时间里面
             if(resultCrossWeightTime == null || resultCrossWeightTime.length() == 0){
                 addMaoWeightResult(tmstruckWeightResult, map);
@@ -152,7 +154,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 }
             }
         }
-        else if(orderType.intValue() == 10){
+        else if(orderType == 10){
             //查询还有几条没有净重的实绩
             Integer resultNum = tmstruckWeightResultMapper.selectNoNetWeightResult((String) map.get("orderNumber"));
             if(resultNum == 2){

+ 3 - 0
src/main/resources/application-dev.yml

@@ -6,3 +6,6 @@ spring:
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dal-dazhou-join-api
+
+server:
+  port: 8006

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

@@ -7,3 +7,5 @@ spring:
   application:
     name: dal-dazhou-join-api
 
+server:
+  port: 8066

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

@@ -1,7 +1,7 @@
 api.version: api/v1/join
 spring:
   profiles:
-    include: ${SPRING_PROFILES:dev}
+    include: ${SPRING_PROFILES:prod}
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8
@@ -53,5 +53,3 @@ mybatis:
     mapUnderscoreToCamelCase: true
     call-setters-on-nulls: true
 
-server:
-  port: 8066