txf пре 3 година
родитељ
комит
1cba2ad92b

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

@@ -14,6 +14,8 @@ public interface TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfac
     //获取采购进口矿进厂实绩
     List<Map<String, Object>> getCGJKEnFactoryResult(Map<String, Object> map);
 
+    //查询销售进厂实绩
+    List<Map<String, Object>> getXSEnFactoryResult(Map<String, Object> map);
 
     //查询所有内转进厂实绩
     List<Map<String, Object>> getAllInwardTurnEnFactoryResult(Map<String, Object> map);

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

@@ -11,9 +11,12 @@ import java.util.Map;
 
 @Mapper
 public interface TmstruckLoadResultMapper extends IBaseMapper<TmstruckLoadResult, BigDecimal> {
-    //查询所有的装车实绩
+    //查询采购装车实绩
     List<Map<String, Object>> getCGJKLoadResult(Map<String, Object> map);
 
+    //查询销售装车实绩
+    List<Map<String, Object>> getXSLoadResult(Map<String, Object> map);
+
     //查询最大ID值
     @Select("select seq_tmstruck_load_result.nextval from dual")
     BigDecimal selectMaxId();

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

@@ -25,9 +25,15 @@ public interface TmstruckWeightResultMapper extends IBaseMapper<TmstruckWeightRe
     //查询采购所有计毛实绩
     List<Map<String, Object>> getCGAllJiMaoResult(Map<String, Object> map);
 
-    //查询所有计皮实绩
+    //查询销售计毛实绩
+    List<Map<String, Object>> getXSAllJiMaoResult(Map<String, Object> map);
+
+    //查询采购所有计皮实绩
     List<Map<String, Object>> getCGAllJiPiResult(Map<String, Object> map);
 
+    //查询销售所有计皮实绩
+    List<Map<String, Object>> getXSAllJiPiResult(Map<String, Object> map);
+
     //查询订单下所有的物资件数和物资理重
     List<Map<String, Object>> getMaterialMes(Integer orderId);
 

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

@@ -80,7 +80,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-                return tmstruckEnfactoryResultMapper.getCGJKEnFactoryResult(map);
+                return tmstruckEnfactoryResultMapper.getXSEnFactoryResult(map); //apiId:210
             case 2:
 
                 break;
@@ -94,7 +94,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
             case 6:
             case 7:
             case 8:
-                return tmstruckEnfactoryResultMapper.getCGJKEnFactoryResult(map);
+                return tmstruckEnfactoryResultMapper.getCGJKEnFactoryResult(map); //apiID: 99
             case 9:
 
                 break;

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

@@ -332,8 +332,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-
-                break;
+                return tmstruckLoadResultMapper.getXSLoadResult(map);
             case 2:
 
                 break;

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

@@ -52,8 +52,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-
-                break;
+                return tmstruckWeightResultMapper.getXSAllJiMaoResult(map); // apiID:212
             case 2:
 
                 break;
@@ -89,8 +88,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-
-                break;
+                return tmstruckWeightResultMapper.getXSAllJiPiResult(map); //apiId:211
             case 2:
 
                 break;
@@ -104,7 +102,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
             case 6:
             case 7:
             case 8:
-                return tmstruckWeightResultMapper.getCGAllJiPiResult(map);
+                return tmstruckWeightResultMapper.getCGAllJiPiResult(map); // apiId: 104
             case 9:
                 break;
             case 10:

+ 1 - 1
src/main/java/com/steerinfo/dil/util/MD5Util.java

@@ -11,7 +11,7 @@ import java.security.MessageDigest;
         /***
          * MD5加密 生成32位md5码
          *
-         * @param 待加密字符串
+         * @param inStr 待加密字符串
          * @return 返回32位md5码
          */
         public static String md5Encode(String inStr) throws Exception {

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -70,4 +70,4 @@ mybatis:
     call-setters-on-nulls: true
 
 server:
-  port: 8094
+  port: 8088

+ 111 - 7
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -477,15 +477,15 @@
          )
       <where>
         <if test="purchaseOrderId != null">
-        <foreach collection="purchaseOrderId" item="item" open="(" separator="or" close=")">
-          "purchaseOrderId" like '%${item}%'
-        </foreach>
+          <foreach collection="purchaseOrderId" item="item" open="(" separator="or" close=")">
+            "purchaseOrderId" like '%${item}%'
+          </foreach>
         </if>
         <if test="materialName != null">
         and
-        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
-          "materialName" like '%${item}%'
-        </foreach>
+          <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+            "materialName" like '%${item}%'
+          </foreach>
         </if>
         <if test="resultForeignShipName != null">
         and
@@ -493,7 +493,7 @@
           "resultForeignShipName" like '%${item}%'
         </foreach>
         </if>
-        <if test="orderNumber != null and orderNumber != ''">
+        <if test="orderNumber != null">
         and
         <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
           "orderNumber" like '%${item}%'
@@ -667,4 +667,108 @@
                      on OO.CAPACITY_ID = QQL.CAPACITY_ID
     where OO.ORDER_NUMBER = #{orderNumber} and QQL.DELETED = 1
   </select>
+
+<!--查询销售进厂实绩 -->
+  <select id="getXSEnFactoryResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select *
+    from (
+    select
+    TER.RESULT_ID               "resultId",
+    ASO.SALE_NUMBER             "saleNumber",
+    RM.MATERIAL_NAME            "materialName",
+    OO.ORDER_NUMBER             "orderNumber",
+    RC.CAPACITY_NUMBER          "capacityNumber",
+    RG.GATEPOST_NAME         "gatepostName",
+    TER.RESULT_ENTRY_MODE       "resultEntryMode",
+    TER.RESULT_ENTRY_GATE_TIME  "resultEntryGateTime",
+    RS.SHIPPER_NAME            "shipperName",
+    OOM.ORDER_MATERIAL_NUMBER   "orderMaterialNumber",
+    TER.INSERT_TIME             "insertTime",
+    RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
+    from TMSTRUCK_ENFACTORY_RESULT TER
+    left join TMSTRUCK_TOTAL_RESULT TTR
+    on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER OO
+    on TTR.ORDER_ID = OO.ORDER_ID
+    left join AMS_SALE_ORDER ASO
+    on ASO.SALE_ORDER_ID = OO.ORDER_PLAN_ID
+    left join RMS_DRIVER_CAPACITY RDC
+    on RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
+    left join RMS_CAPACITY RC
+    on RC.CAPACITY_ID = RDC.CAPACITY_ID
+    left join RMS_SHIPPER RS
+    on RS.SHIPPER_ID = ASO.SHIPPER_ID
+    left join RMS_CONSIGNEE RCON
+    on RCON.CONSIGNEE_ID = ASO.RECEIVE_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 = #{orderTypee}
+    )
+    <where>
+      <if test="saleNumber != null">
+        <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
+          "saleNumber" 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="gatepostName != null">
+        and
+        <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+          "gatepostName" 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="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" 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="resultEntryGateTime != null">
+        and
+        <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
+          "resultEntryGateTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="consigneeCompanyName != null">
+        and
+        <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
+          "consigneeCompanyName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="orderMaterialNumber != null">
+        and
+        <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
+          "orderMaterialNumber" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderByEnterTime"></include>
+  </select>
 </mapper>

+ 94 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -858,4 +858,98 @@
     where RP.PERSONNEL_ID=#{personnelId}
   </select>
 
+<!--  查询销售装车实绩  -->
+    <select id="getXSLoadResult" parameterType="java.util.Map" resultType="java.util.Map">
+      select *
+      from (
+      select TLR.RESULT_ID              "resultId",
+      APO.PURCHASE_ORDER_NO      "purchaseOrderNo",
+      RM.MATERIAL_NAME           "materialName",
+      OO.ORDER_NUMBER            "orderNumber",
+      RC.CAPACITY_NUMBER         "capacityNumber",
+      TLR.RESULT_MEASURED_TONNAGE   "resultMeasuredTonnage",
+      TLR.RESULT_ISCLEAR         "resultIsclear",
+      TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
+      TLR.INSERT_UPDATE_REMARK   "insertUpdateRemark",
+      TLR.INSERT_TIME            "insertTime",
+      RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
+      RS.SUPPLIER_NAME           "supplierName"
+      from TMSTRUCK_LOAD_RESULT TLR
+      left join TMSTRUCK_TOTAL_RESULT TTR
+      on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+      left join OMSTRUCK_ORDER OO
+      on TTR.ORDER_ID = OO.ORDER_ID
+      left join OMSTRUCK_ORDER_MATERIAL OOM
+      on OO.ORDER_ID = OOM.ORDER_ID
+      left join AMS_PURCHASE_ORDER APO
+      on OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
+      left join DIL_BATCH DB
+      on DB.BATCH_ID = APO.BATCH_ID
+      left join RMS_MATERIAL RM
+      on OOM.MATERIAL_ID = RM.MATERIAL_ID
+      left join RMS_DRIVER_CAPACITY RDC
+      on RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
+      left join RMS_CAPACITY RC
+      on RC.CAPACITY_ID = RDC.CAPACITY_ID
+      left join RMS_SUPPLIER RS
+      on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+      left join RMS_CONSIGNEE RCON
+      on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
+      where TLR.STATUS = #{status} and OO.ORDER_TYPE = #{orderTypee}
+      )
+      <where>
+        <if test="purchaseOrderId != null">
+          <foreach collection="purchaseOrderId" item="item" open="(" separator="or" close=")">
+            "purchaseOrderId" 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="capacityNumber != null">
+          and
+          <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+            "capacityNumber" 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="resultIsclear != null">
+          and
+          <foreach collection="resultIsclear" item="item" open="(" separator="or" close=")">
+            "resultIsclear" like '%${item}%'
+          </foreach>
+        </if>
+        <if test="resultLoadStartTime != null">
+          and
+          <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
+            "resultLoadStartTime" like '%${item}%'
+          </foreach>
+        </if>
+        <if test="insertUpdateRemark != null">
+          and
+          <foreach collection="insertUpdateRemark" item="item" open="(" separator="or" close=")">
+            "insertUpdateRemark" like '%${item}%'
+          </foreach>
+        </if>
+      </where>
+      <include refid="orderBy"></include>
+      <if test="orderField == null  ">
+        order by "resultLoadStartTime" desc
+      </if>
+    </select>
+
 </mapper>

+ 271 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -563,7 +563,7 @@
     where TRUCK_CALCULATE_NUMBER = #{truckCalculateNumber}
   </select>
 
-  <!--  查询所有的计毛实绩  -->
+  <!--  查询所有的采购计毛实绩  -->
   <select id="getCGAllJiMaoResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
     select *
     from (
@@ -656,7 +656,7 @@
     </if>
   </select>
 
-  <!--  查询所有的计皮实绩  -->
+  <!--  查询所有采购的计皮实绩  -->
     <select id="getCGAllJiPiResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
     select *
     from (
@@ -839,4 +839,273 @@
     where rls.line_id = 1
       and rls.segment_sqe = #{orderLineSequence}+2
   </select>
+
+<!-- 查询销售所有计皮实绩 -->
+  <select id="getXSAllJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select *
+    from (
+    select
+    TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
+    ASO.SALE_NUMBER "saleNumber",
+    RM.MATERIAL_NAME "materialName",
+    OO.ORDER_NUMBER "orderNumber",
+    RC.CAPACITY_NUMBER "capacityNumber",
+    RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
+    OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
+    RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
+    TWR.RESULT_TARE_WEIGHT "resultTareWeight",
+    TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+    TWR.RESULT_POUND_NO "resultPoundNo",
+    RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
+    RS.SHIPPER_NAME            "shipperName"
+
+    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 AMS_SALE_ORDER ASO
+    on ASO.SALE_ORDER_ID = OO.ORDER_PLAN_ID
+    left join RMS_DRIVER_CAPACITY RDC
+    on RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
+    left join RMS_CAPACITY RC
+    on RC.CAPACITY_ID = RDC.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_STEEL RMS
+    on OOM.MATERIAL_ID = RMS.MATERIAL_STEEL_ID
+    left join RMS_MATERIAL RM
+    on RM.MATERIAL_ID = RMS.MATERIAL_ID
+    left join RMS_SHIPPER RS
+    on RS.SHIPPER_ID = ASO.SHIPPER_ID
+    left join RMS_CONSIGNEE RCON
+    on RCON.CONSIGNEE_ID = ASO.RECEIVE_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="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" 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>
+
+<!-- 查询销售计毛实绩 -->
+  <select id="getXSAllJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select *
+    from (
+    select
+    TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+    ASO.SALE_NUMBER              "saleNumber",
+    RM.MATERIAL_NAME             "materialName",
+    OO.ORDER_NUMBER              "orderNumber",
+    RC.CAPACITY_NUMBER           "capacityNumber",
+    RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+    TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
+    TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+           OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
+           TWR.RESULT_TARE_WEIGHT "resultTareWeight",
+           TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
+           TWR.RESULT_NET_WEIGHT "resultNetWeight",
+           TWR.RESULT_POUND_NO "resultPoundNo",
+           TWR.INSERT_UPDATE_REMARK "insertUpdateRemark",
+           RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
+    RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
+    RS.SHIPPER_NAME            "shipperName"
+    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 AMS_SALE_ORDER ASO
+    on ASO.SALE_ORDER_ID = OO.ORDER_PLAN_ID
+    left join RMS_DRIVER_CAPACITY RDC
+    on RDC.DRIVER_CAPACITY_ID = OO.DRIVER_CAPACITY_ID
+    left join RMS_CAPACITY RC
+    on RC.CAPACITY_ID = RDC.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_STEEL RMS
+    on RMS.MATERIAL_STEEL_ID = OOM.MATERIAL_ID
+    left join RMS_MATERIAL RM
+    on RM.MATERIAL_ID = RMS.MATERIAL_ID
+    left join RMS_SHIPPER RS
+    on RS.SHIPPER_ID = ASO.SHIPPER_ID
+    left join RMS_CONSIGNEE RCON
+    on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
+    where RESULT_GROSS_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
+    )
+    <where>
+      <if test="saleNumber != null">
+        <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
+          "saleNumber" 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="materialTheoreticalWeight != null">
+        and
+        <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
+          "materialTheoreticalWeight" 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>
+      <if test="materialName != null">
+        and
+        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+          "materialName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="consigneeCompanyName != null">
+        and
+        <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
+          "consigneeCompanyName" 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="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" 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="shipperName != null">
+        and
+        <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+          "shipperName" 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>