luobang 2 gadi atpakaļ
vecāks
revīzija
480cdffe84

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

@@ -86,7 +86,7 @@
                             on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
                        left join RMS_CONSIGNEE RCON
                             on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
-              where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
+              where OO.ORDER_STATUS in (5,2)
                 and OO.ORDER_TYPE = #{orderTypee}
                 <if test="oneDate != null">
                     and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
@@ -239,8 +239,7 @@
         on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
         left join RMS_CONSIGNEE RCON
         on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
-
-        where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
+        where OO.ORDER_STATUS in (5, 2)
         and OO.ORDER_TYPE = #{orderTypee}
         <if test="oneDate != null">
             and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
@@ -550,6 +549,7 @@
                 on RCA.CARRIER_ID = RC.CARRIER_ID
         </if>
         where OO.ORDER_TYPE = 12
+        and OO.ORDER_STATUS IN (2,5)
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
@@ -644,6 +644,7 @@
             on RCA.CARRIER_ID = RC.CARRIER_ID
         </if>
         where OO.ORDER_TYPE = 13
+        and oo.ORDER_STATUS in (2,5)
         <if test="carrierSsoId != null">
             and RCA.CARRIER_SSO_ID = #{carrierSsoId}
         </if>
@@ -718,11 +719,13 @@
            twr4.result_tare_weight       "tareWeightSecond",
            twr4.result_tare_weight_time  "tareWeightTimeSecond",
            twr4.result_net_weight        "netWeightSecond",
+           twr4.RESULT_POUND_NO          "poundNo",
            rtc4.truck_calculate_number   "tareTruckCalculateSecond",
            tlfr2.result_out_gate_time    "outGatepostTimeSecond",
            tlfr2.result_out_gate_time    "resultOutGateTime",
            tlfr2.result_out_mode         "outModeSecond",
-           rg4.gatepost_name             "gatepostNameSecond"
+           rg4.gatepost_name             "gatepostNameSecond",
+           apo.EAS_ENTRY_ID              "easPrimaryId"
       from omstruck_order oo
       left join omstruck_order_material oom
         on oom.order_id = oo.order_id
@@ -1940,6 +1943,7 @@
                     OO.CAN_WORK     "canwork",
                     OO.ORDER_STATUS              "carStatus",
                     DECODE(OO.PRINTNUMBER,1,'已打印','未打印') "isPrintDelivery",
+                    decode(TSR.RESULT_ID,null,'未发送','已发送')  "smsResultId",
                     DECODE(ASO.SALE_ORDER_STATUS,1,'销售订单已上报',
                                                  2,'销售已提交',
                                                  4,'财务已审批',
@@ -1990,6 +1994,8 @@
                               ON TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
                     LEFT JOIN TMStRUCK_RECEIPT_RESULT TRR
                               ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                    LEFT JOIN TMSTRUCK_SMS_RUSULT TSR
+                              ON TSR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
                     WHERE ASO.SALE_TYPE = 1
                           AND ASO.DELETED = 0
                           and ASM.SALE_MATERIAL_ID IS NOT NULL