Browse Source

修改内转2021年11月27日22:50:20

txf 3 years ago
parent
commit
3e8a889cb5
26 changed files with 1654 additions and 99 deletions
  1. 0 6
      src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java
  2. 0 26
      src/main/java/com/steerinfo/dil/controller/TmstruckQualityResultController.java
  3. 1 1
      src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java
  4. 6 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.java
  5. 6 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java
  6. 6 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.java
  7. 3 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.java
  8. 5 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java
  9. 3 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.java
  10. 18 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java
  11. 0 2
      src/main/java/com/steerinfo/dil/service/ITmstruckQualityResultService.java
  12. 6 12
      src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java
  13. 4 9
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java
  14. 3 3
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java
  15. 24 5
      src/main/java/com/steerinfo/dil/service/impl/TmstruckQualityResultServiceImpl.java
  16. 2 6
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java
  17. 2 2
      src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java
  18. 7 15
      src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java
  19. 2 1
      src/main/resources/com/steerinfo/dil/mapper/RulesMapper.xml
  20. 187 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml
  21. 173 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml
  22. 203 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml
  23. 103 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml
  24. 101 1
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml
  25. 114 6
      src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml
  26. 675 2
      src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

+ 0 - 6
src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java

@@ -142,9 +142,6 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
         if(mapValue.size() == 2){
             //将查询结果存入索引中
             allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
-            if("5678".contains(orderType.toString())) {
-                DataChange.changeDateToDayDate(allLoadResult, "resultLoadStartTime");
-            }
             Map<String, Object> map = new HashMap<>();
             //添加索引
             map.put("index","get_truck_load_list");
@@ -161,9 +158,6 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
-        if("5678".contains(orderType.toString())) {
-            DataChange.changeDateToDayDate(loadResult, "resultLoadStartTime");
-        }
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allLoadResult,loadResult);
         return success(pageList);
     }

+ 0 - 26
src/main/java/com/steerinfo/dil/controller/TmstruckQualityResultController.java

@@ -118,30 +118,4 @@ public class TmstruckQualityResultController extends BaseRESTfulController {
         int i = tmstruckQualityResultService.updateQualityResult(tmstruckQualityResult);
         return success(i);
     }
-    /**
-     * 内转物流查询质检实绩
-     */
-    @ApiOperation(value="内转物流查询质检作业")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
-            @ApiImplicitParam(name = "apiId(204)", value = "动态表头", required = false, dataType = "Integer"),
-            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
-            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
-            @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
-    })
-    @PostMapping("/selectQualityResultForConverted")
-    public RESTfulResult selectQualityResultForConverted(@RequestBody(required=false) Map<String,Object> mapValue,
-                                                         Integer apiId,
-                                                         Integer pageNum,
-                                                         Integer pageSize
-    ){
-        //不分页筛选数据
-        List<Map<String, Object>> allQualityResult = tmstruckQualityResultService.selectQualityResultForConverted(mapValue);
-        PageHelper.startPage(pageNum,pageSize);
-        //分页数据
-        List<Map<String, Object>> qualityResult = tmstruckQualityResultService.selectQualityResultForConverted(mapValue);
-        DataChange.dataTo2Number(qualityResult, "resultDeduction");
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQualityResult,qualityResult);
-        return success(pageList);
-    }
 }

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java

@@ -149,7 +149,7 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
             allJiPiResult.remove(allJiPiResult.size()-1);
         }
         if(allJiPiResult == null){
-            allJiPiResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
+            allJiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
         }
         PageHelper.startPage(pageNum,pageSize);
         //分页数据

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

@@ -17,6 +17,12 @@ public interface TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfac
     //查询销售进厂实绩
     List<Map<String, Object>> getXSEnFactoryResult(Map<String, Object> map);
 
+    //查询内转钢材到异地库进厂实绩
+    List<Map<String, Object>> getSteelNZEnFactoryResult(Map<String, Object> map);
+
+    //查询内转国产矿进口矿 进厂实绩
+    List<Map<String, Object>> getImportedDomesticNzLoadResult(Map<String, Object> map);
+
     //查询所有内转进厂实绩
     List<Map<String, Object>> getAllInwardTurnEnFactoryResult(Map<String, Object> map);
 

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

@@ -30,6 +30,12 @@ public interface TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLe
     //销售物流查询所有的出厂实绩
     List<Map<String,Object>> selectAllLeaveFacatoryForSale(Map<String,Object> map);
 
+    //查询内转钢材到异地库出厂实绩
+    List<Map<String, Object>> selectSteelNzLeaveFactory(Map<String, Object> map);
+
+    //查询内转国产矿进口矿出厂实绩
+    List<Map<String, Object>> getImportedDomesticNzEnFactoryResult(Map<String, Object> map);
+
     //通过总实绩Id
     BigDecimal getResultIdByTotalId(Integer resultTotalId);
 

+ 6 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.java

@@ -19,6 +19,12 @@ public interface TmstruckLoadResultMapper extends IBaseMapper<TmstruckLoadResult
     //查询销售装车实绩
     List<Map<String, Object>> getXSLoadResult(Map<String, Object> map);
 
+    //查询内转钢材到异地库装车实绩
+    List<Map<String, Object>> getSteelNzLoadResult(Map<String, Object> map);
+
+    //查询内转进口矿/国产矿装车实绩
+    List<Map<String, Object>> getImportedDomesticNzLoadResult(Map<String, Object> map);
+
     //查询最大ID值
     @Select("select seq_tmstruck_load_result.nextval from dual")
     BigDecimal selectMaxId();

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

@@ -24,4 +24,7 @@ public interface TmstruckQualityResultMapper extends IBaseMapper<TmstruckQuality
 
     //内转物流查询质检作业
     List<Map<String,Object>>  selectQualityResultForConverted(Map<String,Object> map);
+
+    //内转查询质检作业
+    List<Map<String, Object>> getInwardQualityResult(Integer orderType);
 }

+ 5 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java

@@ -23,4 +23,9 @@ public interface TmstruckReceiptResultMapper extends IBaseMapper<TmstruckReceipt
 
     //查询所有收货实绩
     List<Map<String, Object>> getCGReceiptResult(Map<String, Object> map);
+
+    //查询内转钢材到异地库收货实绩
+    List<Map<String, Object>> getSteelNzReceiptResult(Map<String, Object> map);
+
+    List<Map<String, Object>> getInwardReceipt(Integer orderType);
 }

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

@@ -14,6 +14,9 @@ public interface TmstruckUnloadResultMapper extends IBaseMapper<TmstruckUnloadRe
     //查询采购卸货实绩
     List<Map<String, Object>> getCGUnloadResult(Map<String, Object> map);
 
+    //查询内转采购进口矿国产矿实绩
+    List<Map<String, Object>> getImportedDomesticNzUnloadResult(Map<String, Object> map);
+
     //查询最大ID值
     @Select("select seq_tmstruck_unload_result.nextval from dual")
     BigDecimal selectMaxId();

+ 18 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java

@@ -44,6 +44,24 @@ public interface TmstruckWeightResultMapper extends IBaseMapper<TmstruckWeightRe
     //查询销售所有计皮实绩
     List<Map<String, Object>> getXSAllJiPiResult(Map<String, Object> map);
 
+    //查询内转到钢材到异地库计皮实绩
+    List<Map<String, Object>> getSteelNzJiPiResult(Map<String, Object> map);
+
+    //查询内转钢材到异地库计毛实绩
+    List<Map<String, Object>> getSteelNzJiMaoResult(Map<String, Object> map);
+
+    //查询国产矿进口矿计毛实绩
+    List<Map<String, Object>> getImportedDomesticNzJiMaoResult(Map<String, Object> map);
+
+    //查询国产矿进口矿计皮实绩
+    List<Map<String, Object>> getImportedDomesticNzJiPiResult(Map<String, Object> map);
+
+    //查询国产矿进口矿计皮实绩(老区-厂内)
+    List<Map<String, Object>> getImportedDomesticNzJiPi2Result(Map<String, Object> map);
+
+    //查询国产矿进口矿计毛实绩(老区-厂内)
+    List<Map<String, Object>> getImportedDomesticNzJiMao2Result(Map<String, Object> map);
+
     //查询订单下所有的物资件数和物资理重
     List<Map<String, Object>> getMaterialMes(Integer orderId);
 

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

@@ -31,7 +31,5 @@ public interface ITmstruckQualityResultService {
     //修改质检作业
     int updateQualityResult(TmstruckQualityResult tmstruckQualityResult);
 
-    //内转物流查询质检作业
-    List<Map<String,Object>>  selectQualityResultForConverted(Map<String,Object> map);
 
 }

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

@@ -6,6 +6,7 @@ import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
 import com.steerinfo.dil.model.TmstruckEnfactoryResult;
 import com.steerinfo.dil.model.TmstruckWeightResult;
 import com.steerinfo.dil.service.ITmstruckEnfactoryResultService;
+import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -91,26 +92,19 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-                return tmstruckEnfactoryResultMapper.getXSEnFactoryResult(map); //apiId:210
             case 2:
-
-                break;
             case 3:
-
-                break;
+                return tmstruckEnfactoryResultMapper.getXSEnFactoryResult(map); //apiId:210
             case 4:
-
-                break;
+                return tmstruckEnfactoryResultMapper.getSteelNZEnFactoryResult(map); //apiId:261
             case 5:
             case 6:
             case 7:
             case 8:
                 return tmstruckEnfactoryResultMapper.getCGJKEnFactoryResult(map); //apiID: 99
             case 9:
-
-                break;
+                return tmstruckEnfactoryResultMapper.getImportedDomesticNzLoadResult(map); //apiId:99
             case 10:
-
                 break;
             case 11:
 
@@ -148,6 +142,8 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
         //发计毛委托 计算添加汽车衡
         switch (orderType.intValue()){
             case 1:
+            case 4:
+                //查询未装车实绩
                 List<Map<String, Object>> mapList = rulesService.judgeLastMaterial(DataChange.dataToBigDecimal(map.get("orderId")));
                 if(mapList.size() == 1){
                     //如果是单拼 不需要走计算 直接走钢材的汽车衡
@@ -181,8 +177,6 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
                 //焦炭 水渣 只会有一种物资
                 i += tmstruckMeasureCommissionService.addPiMeasureCommission(map); //添加计皮委托
                 break;
-            case 4:
-                break;
             case 5:
             case 6:
             case 7:

+ 4 - 9
src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java

@@ -107,23 +107,18 @@ public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFact
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-                return tmstruckLeaveFactoryResultMapper.selectAllLeaveFacatoryForSale(map);
             case 2:
-
-                break;
             case 3:
-
-                break;
+                return tmstruckLeaveFactoryResultMapper.selectAllLeaveFacatoryForSale(map);
             case 4:
-
-                break;
+                return tmstruckLeaveFactoryResultMapper.selectSteelNzLeaveFactory(map);
             case 5:
             case 6:
             case 7:
             case 8:
-                return tmstruckLeaveFactoryResultMapper.getCGLeaveFactoryResult(map);
+                return tmstruckLeaveFactoryResultMapper.getCGLeaveFactoryResult(map); //apiId:110
             case 9:
-                break;
+                return tmstruckLeaveFactoryResultMapper.getImportedDomesticNzEnFactoryResult(map); //apiId:110
             case 10:
                 break;
             case 11:

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

@@ -69,9 +69,10 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
             case 1:
             case 2:
             case 3:
-            case 4:
                 map.put("status", 0);
                 return tmstruckLoadResultMapper.getXSLoadResult(map); //apiId = 221
+            case 4:
+                return tmstruckLoadResultMapper.getSteelNzLoadResult(map); //apiID: 263
             case 5:
                 break;
             case 6:
@@ -81,8 +82,7 @@ public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService
             case 8:
                 return tmstruckLoadResultMapper.getCGJKLoadResult(map); // apiId = 91
             case 9:
-
-                break;
+                return tmstruckLoadResultMapper.getImportedDomesticNzLoadResult(map); //apiId = 353
             case 10:
 
                 break;

+ 24 - 5
src/main/java/com/steerinfo/dil/service/impl/TmstruckQualityResultServiceImpl.java

@@ -36,7 +36,30 @@ public class TmstruckQualityResultServiceImpl implements ITmstruckQualityResultS
      */
     @Override
     public List<Map<String, Object>> getQualityResult(Map<String, Object> map) {
-        return tmstruckQualityResultMapper.getQualityResult(map);
+        Integer orderType = (Integer)map.get("orderType");
+        switch (orderType){
+            case 1:
+                break;
+            case 2:
+                break;
+            case 3:
+                break;
+            case 4:
+                break;
+            case 5:
+            case 6:
+            case 7:
+            case 8:
+                return tmstruckQualityResultMapper.getQualityResult(map);
+            case 9:
+                return tmstruckQualityResultMapper.getInwardQualityResult(orderType);
+            case 10:
+                return tmstruckQualityResultMapper.getInwardQualityResult(orderType);
+            case 11:
+                break;
+
+        }
+        return null;
     }
 
     /**
@@ -62,8 +85,4 @@ public class TmstruckQualityResultServiceImpl implements ITmstruckQualityResultS
         return 0;
     }
 
-    @Override
-    public List<Map<String, Object>> selectQualityResultForConverted(Map<String, Object> map) {
-        return tmstruckQualityResultMapper.selectQualityResultForConverted(map);
-    }
 }

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

@@ -41,22 +41,18 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
         Integer orderType = (Integer) map.get("orderTypee");
         switch (orderType){
             case 1:
-
                 break;
             case 2:
-
                 break;
             case 3:
-
                 break;
             case 4:
-
-                break;
+                return tmstruckReceiptResultMapper.getSteelNzReceiptResult(map); //apiId: 266
             case 5:
             case 6:
             case 7:
             case 8:
-                return tmstruckReceiptResultMapper.getCGReceiptResult(map);
+                return tmstruckReceiptResultMapper.getCGReceiptResult(map); //apiId: 107
             case 9:
                 break;
             case 10:

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

@@ -104,9 +104,9 @@ public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultSer
             case 6:
             case 7:
             case 8:
-                return tmstruckUnloadResultMapper.getCGUnloadResult(map);
+                return tmstruckUnloadResultMapper.getCGUnloadResult(map); //apiId:103
             case 9:
-                break;
+                return tmstruckUnloadResultMapper.getImportedDomesticNzUnloadResult(map); //apiId:355
             case 10:
 
                 break;

+ 7 - 15
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -75,24 +75,20 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
             case 1:
                 return tmstruckWeightResultMapper.getXSAllJiMaoResult(map); // apiID:212
             case 2:
-
                 break;
             case 3:
-
                 break;
             case 4:
-
-                break;
+                return tmstruckWeightResultMapper.getSteelNzJiMaoResult(map); //apiId:264
             case 5:
             case 6:
             case 7:
             case 8:
-                return tmstruckWeightResultMapper.getCGAllJiMaoResult(map);
+                return tmstruckWeightResultMapper.getCGAllJiMaoResult(map); //apiId:102
             case 9:
-                break;
+                return tmstruckWeightResultMapper.getImportedDomesticNzJiMaoResult(map); // apiID:354
             case 10:
-
-                break;
+                return tmstruckWeightResultMapper.getImportedDomesticNzJiMao2Result(map); // apiID:354
             case 11:
 
         }
@@ -111,26 +107,22 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
             case 1:
                 return tmstruckWeightResultMapper.getXSAllJiPiResult(map); //apiId:211
             case 2:
-
                 break;
             case 3:
 
                 break;
             case 4:
-
-                break;
+                return tmstruckWeightResultMapper.getSteelNzJiPiResult(map); //apiId:262
             case 5:
             case 6:
             case 7:
             case 8:
                 return tmstruckWeightResultMapper.getCGAllJiPiResult(map); // apiId: 104
             case 9:
-                break;
+                return tmstruckWeightResultMapper.getImportedDomesticNzJiPiResult(map);// apiId: 104
             case 10:
-
-                break;
+                return tmstruckWeightResultMapper.getImportedDomesticNzJiPi2Result(map);// apiId: 104
             case 11:
-
         }
         return null;
     }

+ 2 - 1
src/main/resources/com/steerinfo/dil/mapper/RulesMapper.xml

@@ -44,7 +44,8 @@
 
     <!--   查询订单中还未装车的物资信息  -->
     <select id="judgeLastMaterial" parameterType="java.math.BigDecimal" resultType="java.util.Map">
-        select TLR.RESULT_ID "resultId",
+        select
+               TLR.RESULT_ID "resultId",
                TLR.MATERIAL_ID "materialId",
                TLR.LOADING_SEQUENCE "loadingSequence",
                TLR.LOADING_ID "loadingId"

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

@@ -880,4 +880,191 @@
                            ON RCD.DRIVER_ID = RDC.DRIVER_ID
         WHERE OO.ORDER_NUMBER = #{orderNumber}
     </select>
+
+<!--  查询内转钢材到异地库进厂实绩  -->
+    <select id="getSteelNZEnFactoryResult" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+                 SELECT
+                        OO.ORDER_ID                "orderId",
+                        AROD.DAYPLAN_NO            "dayplanNo",
+                        OO.ORDER_NUMBER            "orderNumber",
+                        RG.GATEPOST_NAME           "gatepostName",
+                        TER.RESULT_ENTRY_MODE      "resultEntryMode",
+                        RC.CAPACITY_NUMBER         "capacityNumber",
+                        TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
+                        RS.SHIPPER_NAME            "shipperName",
+                        RW.WAREHOUSE_NAME          "warehouseName"
+                 FROM OMSTRUCK_ORDER OO
+                          LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                                    ON TTR.ORDER_ID = OO.ORDER_ID
+                          LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
+                                    ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
+                          LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
+                                    ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+                          LEFT JOIN RMS_GATEPOST RG
+                                    ON RG.GATEPOST_ID = TER.GATEPOST_ID
+                          LEFT JOIN RMS_SHIPPER RS
+                                    ON RS.SHIPPER_ID = AROD.SHIPPER_ID
+                          LEFT JOIN RMS_WAREHOUSE RW
+                                    ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_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
+                 WHERE OO.ORDER_TYPE = 4
+                   AND TER.RESULT_ENTRY_GATE_TIME IS NOT NULL
+             )
+        <where>
+            <if test="dayplanNo != null">
+                <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" 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="gatepostName != null">
+                and
+                <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                    "gatepostName" 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="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" 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="shipperName != null">
+                and
+                <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+                    "shipperName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderByEnterTime"></include>
+    </select>
+
+<!--  查询内转国产矿进口矿 进厂实绩  -->
+    <select id="getImportedDomesticNzLoadResult" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+                 select TER.RESULT_ID               "resultId",
+                        APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+                        RM.MATERIAL_NAME            "materialName",
+                        DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                        OO.ORDER_NUMBER             "orderNumber",
+                        RC.CAPACITY_NUMBER          "capacityNumber",
+                        RG.GATEPOST_NAME            "gatepostName",
+                        TER.RESULT_ENTRY_MODE       "resultEntryMode",
+                        TER.RESULT_ENTRY_GATE_TIME  "resultEntryGateTime",
+                        RS.SUPPLIER_NAME            "supplierName",
+                        OOM.ORDER_MATERIAL_WEIGHT   "orderMaterialWeight",
+                        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_PURCHASE_ORDER APO
+                                    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          left join DIL_BATCH DB
+                                    on DB.BATCH_ID = APO.BATCH_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
+                          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 = 9
+             )
+        <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="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" 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="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" 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="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderByEnterTime"></include>
+    </select>
 </mapper>

+ 173 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -439,7 +439,7 @@
         </if>
     </sql>
 
-    <!-- 查询所有的出厂实绩 -->
+    <!-- 查询采购所有的出厂实绩 -->
     <select id="getCGLeaveFactoryResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
         select *
         from (
@@ -811,4 +811,176 @@
                     
                     )
     </select>
+
+
+<!--  查询内转钢材到异地库出厂实绩  -->
+    <select id="selectSteelNzLeaveFactory" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT
+               *
+        FROM (
+                 SELECT
+                        OO.ORDER_ID                  "orderId",
+                        TLFR.RESULT_ID                     "resultId",
+                        AROD.DAYPLAN_NO                    "dayplanNo",
+                        OO.ORDER_NUMBER                    "orderNumber",
+                        RG.GATEPOST_NAME                   "gatepostName",
+                        TLFR.RESULT_OUT_MODE               "resultOutMode",
+                        RC.CAPACITY_NUMBER                 "capacityNumber",
+                        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 AMS_RAIL_OFFSET_DAYPLAN AROD
+                                    ON AROD.DAYPLAN_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_GATEPOST RG
+                                    ON RG.GATEPOST_ID = TLFR.GATEPOST_ID
+                 WHERE OO.ORDER_TYPE = 4
+                   AND TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
+             )
+        <where>
+            <if test="dayplanNo != null">
+                <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" 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="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="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" 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>
+    </select>
+
+<!--  查询内转国产矿进口矿  -->
+    <select id="getImportedDomesticNzEnFactoryResult" resultType="java.util.Map">
+        select *
+        from (
+                 select TLFR.RESULT_ID                     "resultId",
+                        APO.PURCHASE_ORDER_NO              "purchaseOrderNo",
+                        RM.MATERIAL_NAME                   "materialName",
+                        DB.RESULT_FOREIGN_SHIP_NAME        "resultForeignShipName",
+                        OO.ORDER_NUMBER                    "orderNumber",
+                        RC.CAPACITY_NUMBER                 "capacityNumber",
+                        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 AMS_PURCHASE_ORDER APO
+                                    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          left join DIL_BATCH DB
+                                    on DB.BATCH_ID = APO.BATCH_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_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_GATEPOST RG
+                                    on RG.GATEPOST_ID = TLFR.GATEPOST_ID
+
+                 where RESULT_OUT_GATE_TIME is not null
+                   and OO.ORDER_TYPE = 9
+             )
+        <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="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" 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="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>

+ 203 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -622,7 +622,7 @@
         RC.CAPACITY_NUMBER "capacityNumber",
         TLR.RESULT_MEASURED_TONNAGE "resultMeasuredTonnage",
         TLR.RESULT_ISCLEAR "resultIsclear",
-        TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
+        to_char(TLR.RESULT_LOAD_START_TIME, 'yyyy-mm-dd') "resultLoadStartTime",
         TLR.INSERT_UPDATE_REMARK "insertUpdateRemark",
         TLR.INSERT_TIME "insertTime",
         RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
@@ -1147,4 +1147,206 @@
           and TLR.MATERIAL_ID = #{materialId}
     </select>
 
+<!--  查询内转钢材到异地库装车实绩  -->
+    <select id="getSteelNzLoadResult" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+                 select TLR.RESULT_ID                  "resultId",
+                        AROD.DAYPLAN_NO                "dayplanNo",
+                        OO.ORDER_NUMBER                "orderNumber",
+                        RC.CAPACITY_NUMBER             "capacityNumber",
+                        TLR.RESULT_LOAD_START_TIME     "resultLoadStartTime",
+                        TLR.RESULT_LOAD_END_TIME       "resultLoadEndTime",
+                        TLR.RESULT_LOAD_DURATION       "resultLoadDuration",
+                        RSD.STANDARD_DATA_MIN          "standardDataMin",
+                        RM.MATERIAL_NAME               "materialName",
+                        OOM.ORDER_MATERIAL_NUMBER      "orderMaterialNumber",
+                        RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
+                        RP.PERSONNEL_NAME              "personnelName"
+                 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 OO.ORDER_ID = TTR.ORDER_ID
+                          LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
+                                    ON AROD.DAYPLAN_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_PERSONNEL RP
+                                    ON RP.PERSONNEL_ID = TLR.LOADER_ID
+                          LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
+                                    ON OO.ORDER_ID = OOM.ORDER_ID AND OOM.MATERIAL_ID = TLR.MATERIAL_ID
+                          LEFT JOIN RMS_MATERIAL RM
+                                    ON RM.MATERIAL_ID = OOM.MATERIAL_ID
+                          LEFT JOIN RMS_STANDARD_DATA RSD
+                                    ON RSD.STANDARD_DATA_ID = TLR.LOAD_STANDARD_TIME_ID
+                 WHERE OO.ORDER_TYPE = 4
+                   AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
+                   AND TLR.STATUS = 0
+             )
+        <where>
+            <if test="dayplanNo != null">
+                <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" like '%${item}%'
+                </foreach>
+                <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="resultLoadStartTime != null">
+                    and
+                    <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
+                        "resultLoadStartTime" like '%${item}%'
+                    </foreach>
+                </if>
+                <if test="resultLoadEndTime != null">
+                    and
+                    <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
+                        "resultLoadEndTime" like '%${item}%'
+                    </foreach>
+                </if>
+                <if test="resultLoadDuration != null">
+                    and
+                    <foreach collection="resultLoadDuration" item="item" open="(" separator="or" close=")">
+                        "resultLoadDuration" like '%${item}%'
+                    </foreach>
+                </if>
+                <if test="standardDataMin != null">
+                    and
+                    <foreach collection="standardDataMin" item="item" open="(" separator="or" close=")">
+                        "standardDataMin" 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="materialTheoreticalWeight != null">
+                    and
+                    <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
+                        "materialTheoreticalWeight" like '%${item}%'
+                    </foreach>
+                </if>
+                <if test="personnelName != null">
+                    and
+                    <foreach collection="personnelName" item="item" open="(" separator="or" close=")">
+                        "personnelName" like '%${item}%'
+                    </foreach>
+                </if>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultLoadStartTime" desc
+        </if>
+    </select>
+
+<!-- 查询内转进口矿/国产矿装车实绩   -->
+    <select id="getImportedDomesticNzLoadResult" parameterType="java.util.Map" resultType="java.util.Map">
+
+        SELECT *
+        FROM (
+                 SELECT APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+                        RM.MATERIAL_NAME            "materialName",
+                        DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                        OO.ORDER_NUMBER             "orderNumber",
+                        RC.CAPACITY_NUMBER          "capacityNumber",
+                        OOM.ORDER_MATERIAL_WEIGHT   "orderMaterialWeight",
+                        TLR.RESULT_LOAD_START_TIME  "resultLoadStartTime",
+                        RW.WAREHOUSE_NAME           "warehouseName"
+                 FROM TMSTRUCK_LOAD_RESULT TLR
+                          LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                                    ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
+                          LEFT JOIN OMSTRUCK_ORDER OO
+                                    ON OO.ORDER_ID = TTR.ORDER_ID
+                          LEFT JOIN AMS_PURCHASE_ORDER APO
+                                    ON APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          LEFT JOIN DIL_BATCH DB
+                                    ON DB.BATCH_ID = APO.BATCH_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_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_WAREHOUSE RW
+                                    ON RW.WAREHOUSE_ID = TLR.LOADING_ID
+                 WHERE OO.ORDER_TYPE = 9
+                   AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
+             )
+        <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="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" 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="resultLoadStartTime != null">
+                and
+                <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
+                    "resultLoadStartTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultLoadStartTime" desc
+        </if>
+    </select>
+
 </mapper>

+ 103 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml

@@ -527,4 +527,107 @@
                      on TWR.RESULT_TOTAL_ID = TQR.TOTAL_RESULT_ID
     where RESULT_ID = #{resultId}
   </select>
+
+  <select id="getInwardQualityResult" resultType="java.util.LinkedHashMap">
+    select TQR.RESULT_ID                    "resultId",
+    APO.PURCHASE_ORDER_NO            "purchaseOrderNo",
+    RM.MATERIAL_NAME                 "materialName",
+    DB.RESULT_FOREIGN_SHIP_NAME      "resultForeignShipName",
+    OO.ORDER_NUMBER                  "orderNumber",
+    TWR.RESULT_POUND_NO              "resultPoundNo",
+    RC.CAPACITY_NUMBER               "capacityNumber",
+    TQR.RESULT_ISSAMPLING            "resultIssampling",
+    TQR.RESULT_DEDUCTION             "resultDeduction",
+    TQR.RESULT_DEDUCTION_DESCRIPTION "resultDeductionDescription",
+    RW.WAREHOUSE_NAME                "warehouseName",
+    TQR.INSERT_TIME                  "insertTime"
+    from TMSTRUCK_QUALITY_RESULT TQR
+    left join rms_warehouse rw
+    on rw.warehouse_id = tqr.result_sampling_point_id
+    left join TMSTRUCK_TOTAL_RESULT TTR
+    on TQR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER OO
+    on OO.ORDER_ID = TTR.ORDER_ID
+    left join tmstruck_weight_result twr
+    on twr.result_total_id = ttr.result_total_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 amstruck_inward_plan aip
+    on aip.plan_id = oo.order_plan_id
+    left join amstruck_requirement_plan arp
+    on arp.plan_id = aip.plan_id
+    left join amstruck_inward_requirement air
+    on air.requirement_id = arp.requirement_id
+    left join ams_purchase_order apo
+    on apo.purchase_order_id = air.purchase_order_id
+    left join dil_batch db
+    on db.batch_id = apo.batch_id
+    left join rms_material rm
+    on rm.material_id = db.material_id
+    where oo.order_type = #{orderType}
+    <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="resultForeignShipName != null">
+        and
+        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+          "resultForeignShipName" 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="resultIssampling != null">
+        and
+        <foreach collection="resultIssampling" item="item" open="(" separator="or" close=")">
+          "resultIssampling" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultDeduction != null">
+        and
+        <foreach collection="resultDeduction" item="item" open="(" separator="or" close=")">
+          "resultDeduction" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultDeductionDescription != null">
+        and
+        <foreach collection="resultDeductionDescription" item="item" open="(" separator="or" close=")">
+          "resultDeductionDescription" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="warehouseName != null">
+        and
+        <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+          "warehouseName" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
 </mapper>

+ 101 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -457,7 +457,9 @@
     select
            *
     from (
-           select TRR.RESULT_ID               "resultId",
+           select
+                  OO.ORDER_ID                  "orderId",
+                    TRR.RESULT_ID               "resultId",
                   APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
                   RM.MATERIAL_NAME            "materialName",
                   OO.ORDER_NUMBER             "orderNumber",
@@ -550,4 +552,102 @@
         </where>
         <include refid="orderBy"></include>
   </select>
+
+<!--  查询内转钢材到异地库收货实绩-->
+    <select id="getSteelNzReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
+
+      SELECT *
+      FROM (
+             SELECT TRR.RESULT_ID       "resultId",
+                    OO.ORDER_NUMBER     "orderNumber",
+                    RC.CAPACITY_NUMBER  "capacityNumber",
+                    RW.WAREHOUSE_NAME   "warehouseName",
+                    TRR.INSERT_TIME     "insertTime",
+                    TRR.INSERT_USERNAME "insertUsername"
+             FROM TMSTRUCK_RECEIPT_RESULT TRR
+                    LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                              ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                    LEFT JOIN OMSTRUCK_ORDER OO
+                              ON OO.ORDER_ID = TTR.ORDER_ID
+                    LEFT JOIN RMS_WAREHOUSE RW
+                              ON RW.WAREHOUSE_ID = TRR.WAREHOUSE_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
+            WHERE OO.ORDER_TYPE = 4 AND TRR.STATUS = 1
+           )
+    <where>
+      <if test="orderNumber != null">
+        <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="warehouseName != null">
+        and
+        <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+          "warehouseName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertTime != null">
+        and
+        <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
+          "insertTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertUsername != null">
+        and
+        <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
+          "insertUsername" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+      <include refid="orderBy"></include>
+    </select>
+
+  <select id="getInwardReceipt" resultType="java.util.Map">
+    select TRR.RESULT_ID               "resultId",
+           APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+           RM.MATERIAL_NAME            "materialName",
+           OO.ORDER_NUMBER             "orderNumber",
+           RC.CAPACITY_NUMBER          "capacityNumber",
+           DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+           TUR.UNLOAD_STATUS           "unloadStatus",
+           TWR.RESULT_NET_WEIGHT       "resultNetWeight",
+           tqr.result_issampling       "Issampling",
+           TRR.INSERT_USERNAME         "insertUsername",
+           TRR.INSERT_TIME             "insertTime"
+    from TMSTRUCK_RECEIPT_RESULT TRR
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+           left join OMSTRUCK_ORDER OO
+                     on OO.ORDER_ID = TTR.ORDER_ID
+           left join AMS_PURCHASE_ORDER APO
+                     on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+           left join DIL_BATCH DB
+                     on DB.BATCH_ID = APO.BATCH_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 TMSTRUCK_WEIGHT_RESULT TWR
+                     on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+           left join TMSTRUCK_UNLOAD_RESULT TUR
+                     on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+           left join OMSTRUCK_ORDER_MATERIAL OOM
+                     on OOM.ORDER_ID = OO.ORDER_ID
+           left join RMS_MATERIAL RM
+                     on OOM.MATERIAL_ID = RM.MATERIAL_ID
+           left join tmstruck_quality_result tqr
+                     on tqr.total_result_id = ttr.result_total_id
+    where TRR.STATUS = 1
+      and OO.ORDER_TYPE = #{orderType}
+
+  </select>
 </mapper>

+ 114 - 6
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -551,16 +551,16 @@
                     "capacityNumber" like '%${item}%'
                 </foreach>
             </if>
-            <if test="orderMaterialNumber != null">
+            <if test="warehouseName != null">
                 and
-                <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
-                    "orderMaterialNumber" like '%${item}%'
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
                 </foreach>
             </if>
-            <if test="commssionType != null">
+            <if test="resultNetWeight != null">
                 and
-                <foreach collection="commssionType" item="item" open="(" separator="or" close=")">
-                    "commssionType" like '%${item}%'
+                <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+                    "resultNetWeight" like '%${item}%'
                 </foreach>
             </if>
             <if test="orderMaterialWeight != null">
@@ -569,6 +569,12 @@
                     "orderMaterialWeight" like '%${item}%'
                 </foreach>
             </if>
+            <if test="resultStartTime != null">
+                and
+                <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">
+                    "resultStartTime" like '%${item}%'
+                </foreach>
+            </if>
         </where>
         <include refid="orderBy"></include>
     </select>
@@ -609,4 +615,106 @@
         where TTR.RESULT_TOTAL_ID = #{resultTotalId}
     </select>
 
+<!--   查询内转采购进口矿国产矿实绩 -->
+    <select id="getImportedDomesticNzUnloadResult" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+                 select TUR.RESULT_ID         "resultId",
+                        APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+                        OO.ORDER_NUMBER       "orderNumber",
+                        RC.CAPACITY_NUMBER    "capacityNumber",
+                        RM.MATERIAL_NAME      "materialName",
+                        DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                        TWR.RESULT_NET_WEIGHT "resultNetWeight",
+                        RW.WAREHOUSE_NAME     "warehouseName",
+                        TUR.RESULT_START_TIME "resultStartTime",
+                        TUR.INSERT_TIME       "insertTime"
+                 from TMSTRUCK_UNLOAD_RESULT TUR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+                          left join TMSTRUCK_WEIGHT_RESULT TWR
+                                    on TWR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join AMS_PURCHASE_ORDER APO
+                                    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          left join DIL_BATCH DB
+                                    on DB.BATCH_ID = APO.BATCH_ID
+                          left join OMSTRUCK_ORDER_MATERIAL OOM
+                                    on OOM.ORDER_ID = OO.ORDER_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_WAREHOUSE RW
+                                    on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
+                 where RESULT_START_TIME is not null
+                   and OO.ORDER_TYPE = 9
+             )
+        <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="orderMaterialNumber != null">
+                and
+                <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
+                    "orderMaterialNumber" 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="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" 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="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>
+        </where>
+        <include refid="orderBy"></include>
+    </select>
+
 </mapper>

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

@@ -1361,9 +1361,9 @@
                TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId"
         from OMSTRUCK_ORDER OO
         left join TMSTRUCK_TOTAL_RESULT TTR
-        on OO.ORDER_ID = TTR.ORDER_ID
+            on OO.ORDER_ID = TTR.ORDER_ID
         left join TMSTRUCK_WEIGHT_RESULT TWR
-        on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+            on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
         where OO.ORDER_ID = #{orderId} and TWR.MATERIAL_ID = #{materialId}
 </select>
 
@@ -1378,4 +1378,677 @@
         where OO.ORDER_NUMBER = #{orderNumber}
     </select>
 
+<!--  查询内转到钢材到异地库计量实绩  -->
+    <select id="getSteelNzJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+                 SELECT TWR.WEIGHT_TASK_RESULT_ID      "weightTaskResultId",
+                        AROD.DAYPLAN_NO                "dayplanNo",
+                        OO.ORDER_NUMBER                "orderNumber",
+                        RC.CAPACITY_NUMBER             "capacityNumber",
+                        RTC.TRUCK_CALCULATE_NUMBER     "truckCalculateNumber",
+                        RM.MATERIAL_NAME               "materialName",
+                        OOM.ORDER_MATERIAL_NUMBER      "orderMaterialNumber",
+                        RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
+                        RS.SHIPPER_NAME                "shipperName",
+                        RW.WAREHOUSE_NAME              "warehouseName",
+                        TWR.RESULT_TARE_WEIGHT         "resultTareWeight",
+                        TWR.RESULT_TARE_WEIGHT_TIME    "resultTareWeightTime"
+                 FROM TMSTRUCK_WEIGHT_RESULT TWR
+                          LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                                    ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+                          LEFT JOIN OMSTRUCK_ORDER OO
+                                    ON OO.ORDER_ID = TTR.ORDER_ID
+                          LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
+                                    ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
+                          LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
+                                    ON OO.ORDER_ID = OOM.ORDER_ID AND OOM.MATERIAL_ID = TWR.MATERIAL_ID
+                          LEFT JOIN RMS_MATERIAL RM
+                                    ON RM.MATERIAL_ID = OOM.MATERIAL_ID
+                          LEFT JOIN RMS_SHIPPER RS
+                                    ON RS.SHIPPER_ID = AROD.SHIPPER_ID
+                          LEFT JOIN RMS_WAREHOUSE RW
+                                    ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
+                          LEFT JOIN RMS_TRUCK_CALCULATE RTC
+                                    ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_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
+                WHERE OO.ORDER_TYPE = 4 AND TWR.RESULT_TARE_WEIGHT IS NOT NULL
+             )
+        <where>
+            <if test="dayplanNo != null">
+                <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" 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="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="materialTheoreticalWeight != null">
+                and
+                <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
+                    "materialTheoreticalWeight" 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="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" 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="resultTareWeightTime != null">
+                and
+                <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultTareWeightTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultTareWeightTime" desc
+        </if>
+    </select>
+
+<!--  查询内转钢材到异地库计毛实绩  -->
+    <select id="getSteelNzJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+        SELECT TWR.WEIGHT_TASK_RESULT_ID      "weightTaskResultId",
+                AROD.DAYPLAN_NO                "dayplanNo",
+                OO.ORDER_NUMBER                "orderNumber",
+                RC.CAPACITY_NUMBER             "capacityNumber",
+                RTC.TRUCK_CALCULATE_NUMBER     "truckCalculateNumber",
+                RM.MATERIAL_NAME               "materialName",
+                OOM.ORDER_MATERIAL_NUMBER      "orderMaterialNumber",
+                RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
+                RS.SHIPPER_NAME                "shipperName",
+                RW.WAREHOUSE_NAME              "warehouseName",
+                TWR.RESULT_GROSS_WEIGHT         "resultGrossWeight",
+                TWR.RESULT_GROSS_WEIGHT_TIME    "resultGrossWeightTime",
+                TWR.INSERT_UPDATE_REMARK        "insertUpdateRemark"
+        FROM TMSTRUCK_WEIGHT_RESULT TWR
+        LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+            ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+        LEFT JOIN OMSTRUCK_ORDER OO
+            ON OO.ORDER_ID = TTR.ORDER_ID
+        LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
+            ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
+        LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
+            ON OO.ORDER_ID = OOM.ORDER_ID AND OOM.MATERIAL_ID = TWR.MATERIAL_ID
+        LEFT JOIN RMS_MATERIAL RM
+            ON RM.MATERIAL_ID = OOM.MATERIAL_ID
+        LEFT JOIN RMS_SHIPPER RS
+            ON RS.SHIPPER_ID = AROD.SHIPPER_ID
+        LEFT JOIN RMS_WAREHOUSE RW
+            ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
+        LEFT JOIN RMS_TRUCK_CALCULATE RTC
+            ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_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
+        WHERE OO.ORDER_TYPE = 4 AND TWR.RESULT_GROSS_WEIGHT IS NOT NULL
+        )
+        <where>
+            <if test="dayplanNo != null">
+                <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
+                    "dayplanNo" 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="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="materialTheoreticalWeight != null">
+                and
+                <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
+                    "materialTheoreticalWeight" 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="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" 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="resultGrossWeightTime != null">
+                and
+                <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+                    "resultGrossWeightTime" 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 "resultGrossWeightTime" desc
+        </if>
+    </select>
+
+<!--   查询国产矿进口矿计毛实绩 -->
+    <select id="getImportedDomesticNzJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
+
+        SELECT *
+        FROM (
+                 select TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+                        APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+                        RM.MATERIAL_NAME             "materialName",
+                        OO.ORDER_NUMBER              "orderNumber",
+                        DB.RESULT_FOREIGN_SHIP_NAME  "resultForeignShipName",
+                        RC.CAPACITY_NUMBER           "capacityNumber",
+                        RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+                        TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
+                        TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+                        RS.SUPPLIER_NAME             "supplierName",
+                        RCON.CONSIGNEE_COMPANY_NAME  "consigneeCompanyName"
+                 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_PURCHASE_ORDER APO
+                                    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          left join DIL_BATCH DB
+                                    ON DB.BATCH_ID = APO.BATCH_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 RM
+                                    on RM.MATERIAL_ID = OOM.MATERIAL_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 RESULT_GROSS_WEIGHT_TIME is not null
+                   and OO.ORDER_TYPE = 9
+             )
+        <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="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>
+            <if test="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultGrossWeightTime" desc
+        </if>
+    </select>
+
+<!--  查询国产矿进口矿计皮实绩  -->
+    <select id="getImportedDomesticNzJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
+
+        select *
+        from (
+                 select TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+                        APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+                        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",
+                        DB.RESULT_FOREIGN_SHIP_NAME  "resultForeignShipName",
+                        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 AMS_PURCHASE_ORDER APO
+                                    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                          left join DIL_BATCH DB
+                                    on DB.BATCH_ID = APO.BATCH_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 RM
+                                    on RM.MATERIAL_ID = OOM.MATERIAL_ID
+                 where RESULT_TARE_WEIGHT_TIME is not null
+                   and OO.ORDER_TYPE = 9
+             )
+        <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="getImportedDomesticNzJiPi2Result" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+        select TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+        APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+        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",
+        DB.RESULT_FOREIGN_SHIP_NAME  "resultForeignShipName",
+        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 AMS_PURCHASE_ORDER APO
+        on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+        left join DIL_BATCH DB
+        on DB.BATCH_ID = APO.BATCH_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 RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        where RESULT_TARE_WEIGHT_TIME is not null
+        and OO.ORDER_TYPE = 10
+        )
+        <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="getImportedDomesticNzJiMao2Result" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+        select TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+                APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+                RM.MATERIAL_NAME             "materialName",
+                OO.ORDER_NUMBER              "orderNumber",
+                DB.RESULT_FOREIGN_SHIP_NAME  "resultForeignShipName",
+                RC.CAPACITY_NUMBER           "capacityNumber",
+                RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+                TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
+                TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+                RS.SUPPLIER_NAME             "supplierName",
+                RCON.CONSIGNEE_COMPANY_NAME  "consigneeCompanyName"
+        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_PURCHASE_ORDER APO
+        on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+        left join DIL_BATCH DB
+        ON DB.BATCH_ID = APO.BATCH_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 RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_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 RESULT_GROSS_WEIGHT_TIME is not null
+        and OO.ORDER_TYPE = 10
+        )
+        <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="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>
+            <if test="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultGrossWeightTime" desc
+        </if>
+    </select>
+
 </mapper>