Explorar el Código

Merge remote-tracking branch 'origin/master'

zyf hace 2 años
padre
commit
41b0ce39da

+ 11 - 8
src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java

@@ -18,6 +18,7 @@ import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.Callable;
 
 /**
  * TmstruckEnfactoryResult RESTful接口:
@@ -86,14 +87,16 @@ public class TmstruckEnfactoryResultController extends BaseRESTfulController {
             @ApiImplicitParam(name = "mapValue", value = "门岗名称 运输订单号", required = false, dataType = "Map"),
     })
     @PostMapping("/enFactoryResultByPDA")
-    public RESTfulResult enFactoryResultByPDA(@RequestBody(required=false) Map<String,Object> mapValue){
-        int i = 0;
-        try {
-            i = tmstruckEnfactoryResultService.enFactoryResultByPDA(mapValue);
-        } catch (Exception e) {
-            return failed(e.getMessage());
-        }
-        return success(i);
+    public Callable<RESTfulResult> enFactoryResultByPDA(@RequestBody(required=false) Map<String,Object> mapValue){
+        return ()->{
+            try {
+                int i = tmstruckEnfactoryResultService.enFactoryResultByPDA(mapValue);
+                return success(i);
+            } catch (Exception e) {
+                return failed(e.getMessage());
+            }
+        };
+
     }
 
     @ApiOperation(value="通过门禁进厂")

+ 13 - 13
src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
 import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.Callable;
 
 /**
  * TmstruckLeaveFactoryResult RESTful接口:
@@ -109,19 +110,18 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
             @ApiImplicitParam(name = "orderNumber", value = "", required = false, dataType = "String"),
     })
     @PostMapping("/addLeaveFactoryResult")
-    public RESTfulResult addLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
-       //中交新路接口
-//        Map<String, Object> parem=tmstruckLeaveFactoryResultService.getTruckFactoryResult("WYSDD2021091000000002");
-//        parem.put("turnOf","0");
-//        routeService.saveRoute(parem);
-        int leaveFactory = 0;
-        try {
-            leaveFactory = tmstruckLeaveFactoryResultService.leaveFactoryByPDA(mapValue);
-        }catch (Exception e){
-            e.printStackTrace();
-            return failed(e.getMessage());
-        }
-        return  success(leaveFactory);
+    public Callable<RESTfulResult> addLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
+        return  () -> {
+            int leaveFactory = 0;
+            try {
+                leaveFactory = tmstruckLeaveFactoryResultService.leaveFactoryByPDA(mapValue);
+            }catch (Exception e){
+                e.printStackTrace();
+                return failed(e.getMessage());
+            }
+            return  success(leaveFactory);
+        };
+
     }
 
     @ApiOperation(value="APP查询汽车出厂实绩")

+ 2 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java

@@ -171,6 +171,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
      * @return
      */
     @Transactional(rollbackFor = Exception.class)
+    @Override
     public int leaveFactoryByPDA(Map<String, Object> map) throws Exception{
         int i = 0;
         String orderNumber = (String) map.get("orderNumber");
@@ -191,7 +192,7 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
             BigDecimal segmentSqe = DataChange.dataToBigDecimal(selectMap.get("segmentSqe"));
             BigDecimal orderSegmentSqe = DataChange.dataToBigDecimal(mesMap.get("orderSegmentSqe"));
             //如果当前路段顺序号 +1 不等于出厂路段顺序号 则不允许出厂
-            if(segmentSqe.intValue() != (orderSegmentSqe.intValue() + 1)){
+            if(segmentSqe.intValue() != (orderSegmentSqe.intValue() + 1) && orderType != 1){
                 throw  new Exception("该车作业环节未全部完成!");
             }
         }

+ 5 - 1
src/main/java/com/steerinfo/dil/service/impl/UtilsServiceImpl.java

@@ -184,7 +184,11 @@ public class UtilsServiceImpl implements IUtilsService {
         HashMap<Object, Object> sendMap = new HashMap<>();
         //将消息实体放入list中存到map中
         sendMap.put("messages", list);
-        imFeign.sendToUser(sendMap);
+        try {
+            imFeign.sendToUser(sendMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
     public int randomGetValue(List<Integer> dataList){

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

@@ -7,6 +7,9 @@ spring:
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dil-tms-truck-dev
+  mvc:
+    async:
+      request-timeout: 10000
   #Redis相关配置
   redis:
     host: 172.16.33.166

+ 22 - 1
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -1915,7 +1915,11 @@
                     RM.MATERIAL_ID  "materialId",
                     RM.MATERIAL_NAME  "materialName",
                     RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialSpe",
-                    R_CARRIER.CARRIER_ABBREVIATION "carrierName",
+                    (CASE WHEN ASO.SALE_ORDER_ISSELF_MENTION = '是'
+                        THEN '自提'
+                        ELSE R_CARRIER.CARRIER_ABBREVIATION
+                        END)
+                     "carrierName",
                     OO.ORDER_NUMBER "orderNo",
                     RRA.ADDRESS_PROVINCE || RRA.ADDRESS_DISTRICT ||
                     RRA.ADDRESS_TOWN || RRP.ADDRESS_DELIVERY_ADDRESS AS "addressPlace",
@@ -2063,6 +2067,22 @@
                         RSA.AREA_NAME like '%${item}%'
                     </foreach>
                     </if>
+                    <if test="orderStatusList != null">
+                        and <foreach collection="orderStatusList" item="item" open="(" separator="or" close=")">
+                        DECODE(OO.ORDER_STATUS ,2,'作业已完成',4,'物流公司已派单',5,'司机已接单',0,'未派发',7,'已关闭',8,'已关闭') like '%${item}%'
+                    </foreach>
+                    </if>
+                    <if test="addressPlaceList != null">
+                        and <foreach collection="addressPlaceList" item="item" open="(" separator="or" close=")">
+                        RRA.ADDRESS_PROVINCE || RRA.ADDRESS_DISTRICT ||
+                        RRA.ADDRESS_TOWN || RRP.ADDRESS_DELIVERY_ADDRESS like '%${item}%'
+                    </foreach>
+                    </if>
+                    <if test="materialSpeList != null">
+                        and <foreach collection="materialSpeList" item="item" open="(" separator="or" close=")">
+                        RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL like '%${item}%'
+                    </foreach>
+                    </if>
                     order by ASO.SALE_ORDER_ID DESC, OO.ORDER_ID  DESC
                      )
     </select>
@@ -2614,6 +2634,7 @@
         AND TWR.RESULT_NET_WEIGHT IS NULL
         AND ASOM.SALE_DATE_OF_RECEIPT  &lt; sysdate
         AND ASOM.SALE_DATE_OF_RECEIPT  > sysdate -1
+        AND ASO.INSERT_UPDATE_REMARK != '物流上传金蝶成功'
         <if test="remark != null" >
             and RSR.SALER_NAME || RCA.CAPACITY_NUMBER || RC.CONSIGNEE_COMPANY_NAME || R_CARRIER.CARRIER_ABBREVIATION || RM.MATERIAL_NAME || RM.MATERIAL_MODEL || RM.MATERIAL_SPECIFICATION LIKE #{remark}
         </if>

+ 1 - 1
src/main/resources/log4j.properties

@@ -1,5 +1,5 @@
 ## LOG4J配置
-log4j.rootCategory=INFO, stdout,file, RUNNING,errorfile
+log4j.rootCategory=INFO,file, RUNNING,errorfile
 ## 控制台输出
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout