Browse Source

杰焕22点56分

hujh 3 năm trước cách đây
mục cha
commit
f2d8268624

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.java

@@ -57,4 +57,6 @@ public interface TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfac
     Map<String, Object> getBillOrder(String orderNumber);
 
     List<Map<String, Object>> getBillOrderMaterial(String orderNumber);
+//    通过运输订单获取零星物资进厂实绩
+    List<Map<String, Object>> getSporadicSuppliesEnFactoryResult(Map<String, Object> map);
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java

@@ -51,4 +51,6 @@ public interface TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLe
     Map<String, Object> getDeliveryOrder(String orderNumber);
 
     List<Map<String,Object>> getDeliveryOrderMaterial(String orderNumber);
+//    根据订单id获取零星物资出厂实绩
+    List<Map<String, Object>> getSporadicSuppliesOutFactoryResult(Map<String, Object> map);
 }

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.java

@@ -41,4 +41,7 @@ public interface TmstruckUnloadResultMapper extends IBaseMapper<TmstruckUnloadRe
 
     //通过总实绩ID查询卸货点
     BigDecimal getUnloadPointId(Map<String, Object> map);
+//    通过总实绩ID查询卸货点
+    List<Map<String, Object>> getSporadicSuppliesUnloadResult(Map<String, Object> map);
+
 }

+ 4 - 1
src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java

@@ -71,5 +71,8 @@ public interface TmstruckWeightResultMapper extends IBaseMapper<TmstruckWeightRe
 
     //通过运输订单id获取路段顺序号、物资类型、计量实绩主键、line_id
     Map<String, BigDecimal> selectByOrderId(BigDecimal orderId);
-
+//    根据运输订单Id获取计皮实绩
+    List<Map<String, Object>> getSporadicSuppliesJiPiResult(Map<String, Object> map);
+//    根据运输订单Id获取计毛实绩
+    List<Map<String, Object>> getSporadicSuppliesJiMiaoResult(Map<String, Object> map);
 }

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

@@ -115,7 +115,8 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
                 break;
             case 11:
                 return tmstruckEnfactoryResultMapper.getInFactoryMaterialEnFactoryResult(map); //apiId:357
-
+            case 12:
+                return  tmstruckEnfactoryResultMapper.getSporadicSuppliesEnFactoryResult(map); //apiId:387
         }
         return null;
     }

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

@@ -129,6 +129,8 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
                 break;
             case 11:
                 return tmstruckLeaveFactoryResultMapper.getInFactoryOutFactoryResult(map); //apiId:361
+            case 12:
+                return tmstruckLeaveFactoryResultMapper.getSporadicSuppliesOutFactoryResult(map); //apiId:388
         }
         return null;
     }

+ 2 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java

@@ -109,6 +109,8 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
                 return tmstruckUnloadResultMapper.getImportedDomesticNzUnload2Result(map); //apiId:356
             case 11:
                 return tmstruckUnloadResultMapper.getInFactoryUnloadResult(map); //apiId:360
+            case 12:
+                return tmstruckUnloadResultMapper.getSporadicSuppliesUnloadResult(map);//apiId:389
         }
         return null;
     }

+ 5 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -97,6 +97,8 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
                 return tmstruckWeightResultMapper.getImportedDomesticNzJiMao2Result(map); // apiID:354
             case 11:
                 return tmstruckWeightResultMapper.getInFactoryJiLiangResult(map);       //apiId: 358
+            case 12:
+                return tmstruckWeightResultMapper.getSporadicSuppliesJiMiaoResult(map);//apiId:390
         }
         return null;
     }
@@ -129,6 +131,9 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
             case 10:
                 return tmstruckWeightResultMapper.getImportedDomesticNzJiPi2Result(map);// apiId: 104
             case 11:
+
+            case 12:
+                return tmstruckWeightResultMapper.getSporadicSuppliesJiPiResult(map);//apiId:392
         }
         return null;
     }

+ 97 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -1228,4 +1228,101 @@
                  rm.material_id = oom.order_material_id
         where oo.order_number = #{orderNumber}
     </select>
+<!--    通过id获取零星物资id-->
+    <select id="getSporadicSuppliesEnFactoryResult" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+        select TER.RESULT_ID "resultId",
+        RM.MATERIAL_NAME "materialName",
+        OO.ORDER_NUMBER "orderNumber",
+        RS1.SUPPLIER_NAME "supplierName",
+        RS2.SHIPPER_NAME "shipperName",
+        RC.CARRIER_NAME "carrierName",
+        RG.GATEPOST_NAME "gatepostName",
+        TER.RESULT_ENTRY_MODE "resultEntryMode",
+        TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+        OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight"
+
+        from TMSTRUCK_ENFACTORY_RESULT TER
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        LEFT JOIN TMSTRUCK_LOAD_RESULT TLR
+        ON TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        LEFT JOIN TMSTRUCK_UNLOAD_RESULT TUR
+        ON TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        LEFT JOIN RMS_SUPPLIER RS1
+        ON RS1.SUPPLIER_ID = TLR.LOADING_ID
+        LEFT JOIN RMS_SHIPPER RS2
+        ON RS2.SHIPPER_ID = TUR.RESULT_UNLOAD_PLACE_ID
+        left join OMSTRUCK_ORDER OO
+        on TTR.ORDER_ID = OO.ORDER_ID
+        left join RMS_CARRIER RC
+        on RC.CARRIER_ID = OO.CAPACITY_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        left join RMS_GATEPOST RG
+        on RG.GATEPOST_ID = TER.GATEPOST_ID
+        where TER.RESULT_ENTRY_GATE_TIME is not null
+        and OO.ORDER_TYPE = 12
+        )
+        <where>
+            <if test="materialName != null">
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="shipperName != null">
+                and
+                <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+                    "shipperName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultEntryMode != null">
+                and
+                <foreach collection="resultEntryMode" item="item" open="(" separator="or" close=")">
+                    "resultEntryMode" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="loadingName != null">
+                and
+                <foreach collection="loadingName" item="item" open="(" separator="or" close=")">
+                    "loadingName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultEntryGateTime != null">
+                and
+                <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
+                    "resultEntryGateTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderByEnterTime"></include>
+    </select>
+
 </mapper>

+ 64 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -1151,4 +1151,68 @@
             and twr.MATERIAL_ID = oom.MATERIAL_ID
         where oo.order_number = #{orderNumber}
     </select>
+<!--    根据订单id获取零星物资出厂实绩-->
+    <select id="getSporadicSuppliesOutFactoryResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select *
+    from (
+    select
+    TLFR.RESULT_ID                     "resultId",
+    OO.ORDER_NUMBER                    "orderNumber",
+    RC.CARRIER_NAME                    "carrierName",
+    RG.GATEPOST_NAME                   "gatepostName",
+    TLFR.RESULT_OUT_MODE               "resultOutMode",
+    TLFR.RESULT_OUT_GATE_TIME          "resultOutGateTime",
+    TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
+    from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+    left join TMSTRUCK_TOTAL_RESULT TTR
+    on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER OO
+    on OO.ORDER_ID = TTR.ORDER_ID
+    left join RMS_CARRIER RC
+    on RC.CARRIER_ID = OO.CAPACITY_ID
+    left join RMS_GATEPOST RG
+    on RG.GATEPOST_ID = TLFR.GATEPOST_ID
+
+    where RESULT_OUT_GATE_TIME is not null
+    and OO.ORDER_TYPE = 12
+    )
+    <where>
+        <if test="orderNumber != null">
+            <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                "orderNumber" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="carrierName != null">
+            and
+            <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                "carrierName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="gatepostName != null">
+            and
+            <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                "gatepostName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultOutMode != null">
+            and
+            <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
+                "resultOutMode" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultOutGateTime != null">
+            and
+            <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
+                "resultOutGateTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultTruckSnapshotPicture != null">
+            and
+            <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
+                "resultTruckSnapshotPicture" like '%${item}%'
+            </foreach>
+        </if>
+    </where>
+    <include refid="orderByOutTime"></include>
+    </select>
 </mapper>

+ 81 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -886,5 +886,86 @@
         </where>
         <include refid="orderBy"></include>
     </select>
+<!--    根据总实绩ID查询卸货地点-->
+    <select id="getSporadicSuppliesUnloadResult" resultType="java.util.Map">
+    SELECT *
+    FROM (
+    SELECT TUR.RESULT_ID             "resultId",
+    OO.ORDER_NUMBER           "orderNumber",
+    RC.CARRIER_NAME        "carrierName",
+    RM.MATERIAL_NAME          "materialName",
+    OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
+    TUR.RESULT_START_TIME     "resultStartTime",
+    TUR.RESULT_END_TIME       "resultEndTime",
+    TUR.RESULT_DURATION       "resultDuration",
+    RW.WAREHOUSE_NAME         "warehouseName"
+    FROM TMSTRUCK_UNLOAD_RESULT TUR
+    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+    ON TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
+    LEFT JOIN OMSTRUCK_ORDER OO
+    ON OO.ORDER_ID = TTR.ORDER_ID
+    LEFT JOIN RMS_CARRIER RC
+    ON RC.CARRIER_ID = OO.CAPACITY_ID
+    LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
+    ON OOM.ORDER_ID = OO.ORDER_ID
+    LEFT JOIN RMS_MATERIAL RM
+    ON RM.MATERIAL_ID = OOM.MATERIAL_ID
+    LEFT JOIN RMS_WAREHOUSE RW
+    ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
+    WHERE TUR.RESULT_START_TIME IS NOT NULL
+    AND OO.ORDER_TYPE = 12
+    )
+    <where>
+        <if test="orderNumber != null">
+            <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                "orderNumber" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="carrierName != null">
+            and
+            <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                "carrierName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="materialName != null">
+            and
+            <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                "materialName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="orderMaterialNumber != null">
+            and
+            <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
+                "orderMaterialNumber" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="warehouseName != null">
+            and
+            <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                "warehouseName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultStartTime != null">
+            and
+            <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">
+                "resultStartTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultEndTime != null">
+            and
+            <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
+                "resultEndTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultDuration != null">
+            and
+            <foreach collection="resultDuration" item="item" open="(" separator="or" close=")">
+                "resultDuration" like '%${item}%'
+            </foreach>
+        </if>
+    </where>
+    <include refid="orderBy"></include>
+    </select>
+
 
 </mapper>

+ 204 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -2161,5 +2161,209 @@
             order by "resultTareWeightTime" desc
         </if>
     </select>
+<!--    根据运输订单Id获取零星物资计皮实绩-->
+    <select id="getSporadicSuppliesJiPiResult" resultType="java.util.Map">
+        select *
+        from (
+        select
+        TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
+        APO.SPORADIC_ORDER_NO "purchaseOrderNo",
+        RM.MATERIAL_NAME "materialName",
+        OO.ORDER_NUMBER "orderNumber",
+        RC.CARRIER_NAME "carrierName",
+        RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
+        TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
+        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+        TWR.RESULT_TARE_WEIGHT "resultTareWeight",
+        TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+        TWR.RESULT_NET_WEIGHT "resultNetWeight",
+        TWR.RESULT_POUND_NO "resultPoundNo"
+        from TMSTRUCK_WEIGHT_RESULT TWR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+        on TTR.ORDER_ID = OO.ORDER_ID
+        left join AMSTRUCK_SPORADIC_ORDER APO
+        on APO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
+        left join RMS_CARRIER RC
+        on RC.CARRIER_ID = OO.CAPACITY_ID
+        left join RMS_TRUCK_CALCULATE RTC
+        on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        )
+        <where>
+            <if test="purchaseOrderNo != null">
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber != null">
+                and
+                <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeight != null">
+                and
+                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeightTime != null">
+                and
+                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultTareWeight != null">
+                and
+                <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
+                    "resultTareWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultPoundNo != null">
+                and
+                <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
+                    "resultPoundNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultTareWeightTime != null">
+                and
+                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultTareWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultNetWeight != null">
+                and
+                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+                    "resultNetWeight" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultTareWeightTime" desc
+        </if>
+    </select>
+<!--    根据运输订单Id获取计毛实绩-->
+    <select id="getSporadicSuppliesJiMiaoResult" resultType="java.util.Map">
+        select *
+        from (
+        select
+        TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
+        APO.SPORADIC_ORDER_NO "purchaseOrderNo",
+        RM.MATERIAL_NAME "materialName",
+        OO.ORDER_NUMBER "orderNumber",
+        RC.CARRIER_NAME "carrierName",
+        RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
+        TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
+        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+        RS.SUPPLIER_NAME "supplierName",
+        RCON.SHIPPER_NAME "consigneeCompanyName",
+        OO.ORDER_ID "orderId",
+        OO.ORDER_STATUS "orderStatus"
+        from TMSTRUCK_WEIGHT_RESULT TWR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+        on TTR.ORDER_ID = OO.ORDER_ID
+        left join AMSTRUCK_SPORADIC_ORDER APO
+        on APO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
+        left join RMS_CARRIER RC
+        on RC.CARRIER_ID = OO.CAPACITY_ID
+        left join RMS_TRUCK_CALCULATE RTC
+        on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        left join RMS_SUPPLIER RS
+        on RS.SUPPLIER_ID = APO.SEND_UNIT_ID
+        left join RMS_SHIPPER RCON
+        on RCON.SHIPPER_ID = APO.RECEIVE_UNIT_ID
+        where RESULT_GROSS_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+        )
+        <where>
+            <if test="purchaseOrderNo != null">
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber != null">
+                and
+                <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeight != null">
+                and
+                <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultGrossWeightTime != null">
+                and
+                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultGrossWeightTime" desc
+        </if>
+    </select>
 
 </mapper>