luobang %!s(int64=2) %!d(string=hai) anos
pai
achega
8f58768b6c

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

@@ -152,7 +152,7 @@ public class TmstruckTotalResultServiceImpl implements ITmstruckTotalResultServi
     /**
      * 为已接收没有总实绩的运输订单补录总实绩
      */
-    @Scheduled(fixedRate = 1000*60*5)
+    //@Scheduled(fixedRate = 1000*60*5)
     public void insertTotalForNullOrder(){
         List<BigDecimal> list=tmstruckTotalResultMapper.getOrderForBulu();
         for(BigDecimal orderId:list){

+ 4 - 2
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -2081,8 +2081,10 @@
                     LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
                               ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
                     LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
-                              ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-                             AND TWR.MATERIAL_ID = RM.MATERIAL_ID
+                              ON
+                    TWR.SALE_MATERIAL_ID = ASM.SALE_MATERIAL_ID
+                    and twr.SALE_MATERIAL_ID is not null
+                    OR ( TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID AND TWR.MATERIAL_ID = RM.MATERIAL_ID and twr.sale_material_id is null )
                     LEFT JOIN TMSTRUCK_LOAD_RESULT TLR
                               ON TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
                                   AND TLR.MATERIAL_ID = RM.MATERIAL_ID