wing 3 년 전
부모
커밋
90f82e6ae5

+ 22 - 1
src/main/java/com/steerinfo/dil/service/impl/StatisticalReportImpl.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.StatisticalReportMapper;
 import com.steerinfo.dil.service.IStatisticalReportService;
 import com.steerinfo.dil.util.DataChange;
+import oracle.sql.DATE;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -84,7 +85,27 @@ public class StatisticalReportImpl implements IStatisticalReportService {
 
     @Override
     public List<Map<String, Object>> getAllSaleReportNum(Map<String, Object> map) {
-        return statisticalReportMapper.getAllSaleReport(map);
+         List<Map<String, Object>> listMap = statisticalReportMapper.getAllSaleReport(map);
+         for(Map<String, Object> map1 : listMap) {
+             if ( map1.get("resultEntryGateTime") == null) {
+                 map1.put("transportStatus", "未进厂");
+                 continue;
+             }
+             if (map1.get("resultOutGateTime") == null) {
+                 map1.put("transportStatus", "已进厂");
+                 continue;
+             }
+             if (map1.get("arrivaladdress") == null) {
+                 map1.put("transportStatus", "运输中");
+                 continue;
+             }
+             if (map1.get("receiveTime") == null) {
+                 map1.put("transportStatus", "已抵达");
+                 continue;
+             } else
+                 map1.put("transportStatus", "已签收");
+         }
+         return listMap;
     }
 
     /**

+ 9 - 0
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -343,6 +343,9 @@
         ASO.SALE_NUMBER "saleNumber",
         TLR.CASE_NUMBER "caseNumber",
         RC2.CARRIER_NAME "carrierName",
+        TMSTRUCK_ARRIVAL_RESULT.RESULT_ARRIVAL_ADDRESS "arrivaladdress",
+        TMSTRUCK_RECEIVE_RESULT.RESULT_RECEIVE_TIME "receiveTime",
+        TMSTRUCK_TOTAL_RESULT.
         CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
         from TMSTRUCK_WEIGHT_RESULT TWR
         left join TMSTRUCK_TOTAL_RESULT TTR
@@ -382,6 +385,12 @@
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         join RMS_MATERIAL RM
         on RM.MATERIAL_ID = TWR.MATERIAL_ID
+
+        left join TMSTRUCK_ARRIVAL_RESULT
+        on TMSTRUCK_TOTAL_RESULT.RESULT_TOTAL_ID = TMSTRUCK_ARRIVAL_RESULT.RESULT_TOTAL_ID
+        left join TMSTRUCK_RECEIVE_RESULT
+        on TMSTRUCK_TOTAL_RESULT.RESULT_TOTAL_ID = TMSTRUCK_RECEIVE_RESULT.RESULT_TOTAL_ID
+
         WHERE OO.ORDER_TYPE = #{orderType}
         AND ASO.SHIPPER_ID = #{shipperId}
         <if test="carrierSsoId != null">