zouzhd hace 3 años
padre
commit
b967e48b5d

+ 23 - 0
src/main/java/com/steerinfo/dil/controller/OMSController.java

@@ -585,4 +585,27 @@ public class OMSController {
     public Map<String,Object> driverConfirmation(@RequestBody(required = false) Map<String,Object> mapvalue) {
         return omsFeign.driverConfirmation(mapvalue);
     }
+    @ApiOperation(value = "通过运输订单号查询订单信息给司机")
+    @PostMapping("/getMessageToApp")
+    public Map<String, Object> getMessageToApp(@RequestBody(required = false) Map<String,Object> mapvalue) {
+        return omsFeign.getMessageToApp(mapvalue);
+    }
+
+    @ApiOperation(value = "通过车牌号查询所有已下发未接收的订单信息")
+    @PostMapping("/getAllOrderMessagesByCapacityNum")
+    public List<Map<String, Object>> getAllOrderMessagesByCapacityNum(@RequestBody(required = false) Map<String,Object> mapvalue){
+        return  omsFeign.getAllOrderMessagesByCapacityNum(mapvalue);
+    }
+
+    @ApiOperation(value = "通过车牌号查询该车牌下所有已接收的订单ID")
+    @PostMapping("/getReceiveOrderIdListByCapacityNum")
+    public List<Integer> getReceiveOrderIdListByCapacityNum(@RequestBody(required = false) Map<String, Object> mapvalue) {
+        return omsFeign.getReceiveOrderIdListByCapacityNum(mapvalue);
+    }
+
+    @ApiOperation(value = "通过车牌号查询该车牌下所有已接收的订单ID")
+    @PostMapping("/getAllRefuseOrderNumberByCapacity")
+    public List<Map<String, Object>> getAllRefuseOrderNumberByCapacity(@RequestBody(required = false) Map<String,Object> mapvalue){
+        return omsFeign.getAllRefuseOrderNumberByCapacity(mapvalue);
+    }
 }

+ 3 - 2
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -631,8 +631,9 @@ public class RMScontroller {
                                         Integer pageNum,
                                         Integer pageSize,
                                         Integer apiId,
-                                        String con){
-        return rmsFeign.getAllLineDesk(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId, con);
+                                        String con,
+                                              Integer lineType){
+        return rmsFeign.getAllLineDesk(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId ,con,lineType);
     }
 
     @ApiOperation(value = "根据主键查询出数据以供修改")

+ 10 - 0
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -1771,4 +1771,14 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> addSteelNzReceiptResult(@RequestBody(required = false) Map<String, Object> map) {
         return tmsTruckFeign.addSteelNzReceiptResult(map);
     }
+
+
+    @ApiOperation(value="更新计量实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapList", value = "计量数据", required = false, dataType = "List<Map>"),
+    })
+    @PostMapping("/updateTruckWeight")
+    public Map<String, Object> updateTruckWeight(@RequestBody List<Map<String, Object>> mapList){
+        return tmsTruckFeign.updateTruckWeight(mapList);
+    }
 }

+ 117 - 31
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -50,69 +50,67 @@ public class UniversalController extends BaseRESTfulController {
         return success(tiHuoDan);
     }
 
-    @ApiModelProperty(value = "模糊查询物资")
+
+    @ApiModelProperty(value = "模糊查询发货单位")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
-            @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
+            @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
     })
-    @PostMapping("/queryMaterialByLike")
-    public RESTfulResult queryMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
-                                           Integer pageNum,
-                                           Integer pageSize,
-                                           Integer apiId,
-                                           String index,
-                                           String startNum) {
-
+    @PostMapping("/querySupplierByLike")
+    public RESTfulResult querySupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             String index) {
         if(mapValue == null) {
             mapValue = new HashMap<>();
         }
-        if(startNum != null && !startNum.equals("undefined")){
-            mapValue.put("startNum", startNum + "%");
-        }
-        if(index != null && !index.equals("undefined")){
-            mapValue.put("index", "%" + index + "%");
+        if(index != null){
+            mapValue.put("index","%" + index + "%");
         }
-        List<Map<String, Object>> list = universalMapper.queryMaterialByLike(mapValue);
+        List<Map<String, Object>> list = universalMapper.querySupplierByLike(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
-        List<Map<String, Object>> columnList = universalMapper.queryMaterialByLike(mapValue);
+        List<Map<String, Object>> columnList = universalMapper.querySupplierByLike(mapValue);
         PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
         return success(data);
     }
 
-    @ApiModelProperty(value = "模糊查询发货单位")
+    @ApiModelProperty(value = "通过物资ID查询该物资的发货单位信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "apiId", value = "247", required = false, dataType = "BigDecimal")
     })
-    @PostMapping("/querySupplierByLike")
-    public RESTfulResult querySupplierByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+    @PostMapping("/getSupplierMesByMaterialId")
+    public RESTfulResult getSupplierMesByMaterialId(@RequestBody(required = false) Map<String,Object> mapValue,
                                              Integer pageNum,
                                              Integer pageSize,
                                              Integer apiId,
-                                             String index) {
-        if(mapValue == null) {
+                                             String index, String materialId) {
+        if(mapValue == null)
             mapValue = new HashMap<>();
-        }
+
+        if(!"null".equals(materialId))
+            mapValue.put("materialId",materialId);
+
         if(index != null){
-            mapValue.put("index", index + "%");
-        }else {
-            mapValue.put("index", "aaaaa%");
+            mapValue.put("index","%" + index + "%");
         }
-        List<Map<String, Object>> list = universalMapper.querySupplierByLike(mapValue);
+        List<Map<String, Object>> list = universalMapper.getSupplierMesByMaterialId(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
-        List<Map<String, Object>> columnList = universalMapper.querySupplierByLike(mapValue);
+        List<Map<String, Object>> columnList = universalMapper.getSupplierMesByMaterialId(mapValue);
         PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
         return success(data);
     }
 
+
     @ApiOperation(value="查询所有空闲的运力信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
-            @ApiImplicitParam(name = "apiId(248)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId()", value = "动态表头", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
     })
@@ -128,8 +126,6 @@ public class UniversalController extends BaseRESTfulController {
         }
         if(index != null){
             mapValue.put("index", index + "%");
-        }else {
-            mapValue.put("index", "aaaaaa%");
         }
         //不分页筛选数据
         List<Map<String, Object>> allCapacity = universalMapper.getAllCapacityByCarrierLike(mapValue);
@@ -169,4 +165,94 @@ public class UniversalController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allCapacity,capacity);
         return success(pageList);
     }
+
+    @ApiModelProperty(value = "模糊查询物资")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/queryAPOMaterialByLike")
+    public RESTfulResult queryMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             String index) {
+
+        if(mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        if(index != null){
+            mapValue.put("index", "%" + index + "%");
+        }
+        List<Map<String, Object>> list = universalMapper.queryAPOMaterialByLike(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = universalMapper.queryAPOMaterialByLike(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        return success(data);
+    }
+
+
+    @ApiModelProperty(value = "模糊查询卸货点")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "374", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/getUnloadingMesByLike")
+    public RESTfulResult getUnloadingMesByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             Integer type,
+                                             String index) {
+
+        if(mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        if(type != null){
+            mapValue.put("type", type);
+        }
+        if(index != null){
+            mapValue.put("index", "%" + index + "%");
+        }
+        List<Map<String, Object>> list = universalMapper.getUnloadingMesByLike(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = universalMapper.getUnloadingMesByLike(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        return success(data);
+    }
+
+    @ApiModelProperty(value = "模糊查询物资")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "244", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/queryMaterialByLike")
+    public RESTfulResult queryMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             String index,
+                                             String startNum) {
+
+        if(mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        if(startNum != null){
+            mapValue.put("startNum", startNum + "%");
+        }
+        if(index != null){
+            mapValue.put("index", "%" + index + "%");
+        }
+        List<Map<String, Object>> list = universalMapper.queryMaterialByLike(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = universalMapper.queryMaterialByLike(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        return success(data);
+    }
 }

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

@@ -716,5 +716,4 @@ public class WMSController extends BaseRESTfulController {
         return wmsFeign.updateIvboundMakeResult(mapValue);
     }
 
-
 }

+ 13 - 0
src/main/java/com/steerinfo/dil/feign/OmsFeign.java

@@ -327,5 +327,18 @@ public interface OmsFeign {
     List<Map<String,Object>> getAllOrderMessage(@RequestParam String capacityNumber);
     @PostMapping("api/v1/oms/omstruckorders/driverConfirmation")
     Map<String,Object> driverConfirmation(@RequestBody(required = false) Map<String,Object> mapvalue);
+
+    @PostMapping("api/v1/oms/omstruckorders/getMessageToApp")
+    Map<String, Object> getMessageToApp(@RequestBody(required = false) Map<String,Object> mapvalue) ;
+
+    @PostMapping("api/v1/oms/omstruckorders/getAllOrderMessagesByCapacityNum")
+    List<Map<String, Object>> getAllOrderMessagesByCapacityNum(@RequestBody(required = false) Map<String,Object> mapvalue);
+
+    @PostMapping("api/v1/oms/omstruckorders/getReceiveOrderIdListByCapacityNum")
+    List<Integer> getReceiveOrderIdListByCapacityNum(@RequestBody(required = false) Map<String,Object> mapvalue);
+
+    @ApiOperation(value = "通过车牌号查询该车牌下所有已接收的订单ID")
+    @PostMapping("api/v1/oms/omstruckorders/getAllRefuseOrderNumberByCapacity")
+    List<Map<String, Object>> getAllRefuseOrderNumberByCapacity(@RequestBody(required = false) Map<String,Object> mapvalue);
 }
 

+ 2 - 1
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -337,7 +337,8 @@ public interface RmsFeign {
                                         @RequestParam("pageNum") Integer pageNum,
                                         @RequestParam("pageSize")Integer pageSize,
                                         @RequestParam("apiId")Integer apiId,
-                                        @RequestParam("con")String con);
+                                        @RequestParam("con")String con,
+                                       @RequestParam("lineType")Integer lineType);
 
     @ApiOperation(value = "根据主键查询出数据以供修改")
     @PostMapping("/api/v1/rms/rmslines/getLinkToUpdate")

+ 5 - 1
src/main/java/com/steerinfo/dil/feign/TmsTruckFeign.java

@@ -318,8 +318,12 @@ public interface TmsTruckFeign {
     Map<String, Object> addDaZhouToDaGangLoadResult(@RequestBody(required = false)Map<String, Object> map);
 
     @ApiOperation(value="新增钢材到异地库达州站驻港人员确定收货")
-    @PostMapping("/addSteelNzReceiptResult")
+    @PostMapping("api/v1/truckTms/tmstruckreceiptresults/addSteelNzReceiptResult")
     public Map<String, Object> addSteelNzReceiptResult(@RequestBody(required = false) Map<String, Object> map);
+
+
+    @PostMapping("api/v1/truckTms/tmstruckweightresults/updateTruckWeight")
+    public Map<String, Object> updateTruckWeight(@RequestBody List<Map<String, Object>> mapList);
 }
 
 

+ 11 - 1
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -20,7 +20,7 @@ public interface UniversalMapper {
     List<Map<String, Object>> getOOMMes(String orderNumber);
 
     //模糊查询所有物资
-    List<Map<String, Object>> queryMaterialByLike(Map<String, Object> map);
+    List<Map<String, Object>> queryAPOMaterialByLike(Map<String, Object> map);
 
     //模糊查询发货单位
     List<Map<String, Object>> querySupplierByLike(Map<String, Object> map);
@@ -30,4 +30,14 @@ public interface UniversalMapper {
 
     //通过运输订单ID查询物资子表(针对钢材)
     List<Map<String, Object>> getMaterialMesByOrderId(Map<String, Object> map);
+
+    //通过物资ID查询该物资的发货单位信息
+    List<Map<String, Object>> getSupplierMesByMaterialId(Map<String, Object> map);
+
+    //模糊查询所有的卸货点信息
+    List<Map<String, Object>> getUnloadingMesByLike(Map<String, Object> map);
+
+    //模糊查询所有物资
+    List<Map<String, Object>> queryMaterialByLike(Map<String, Object> map);
+
 }

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

@@ -49,7 +49,7 @@ openfeign:
   OMSFeign:
     url: ${OMSFEIGN_URL:localhost:8095}
   RmsFeign:
-    url: ${RMSFEIGN_HRL:172.16.33.161:8060}
+    url: ${RMSFEIGN_HRL:192.168.1.115:8060}
 
 genxml:
   pth: com/a

+ 142 - 28
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -57,30 +57,28 @@
     </sql>
 
     <!--  模糊查询所有物资  -->
-    <select id="queryMaterialByLike" parameterType="java.util.Map" resultType="java.util.Map">
+    <select id="queryAPOMaterialByLike" parameterType="java.util.Map" resultType="java.util.Map">
         SELECT *
         FROM (
-                SELECT RM.MATERIAL_ID "materialId",
+                SELECT DISTINCT RM.MATERIAL_ID "materialId",
                     RM.MATERIAL_NAME "materialName",
                     RM.MATERIAL_CODE "materialCode",
                     RM.MATERIAL_SPECIFICATION "materialSpecification",
                     RM.MATERIAL_MODEL "materialModel"
-                FROM RMS_MATERIAL RM
+                FROM AMS_PURCHASE_ORDER APO
+                    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>
-                    <if test="startNum != null">
-                        RM.MATERIAL_CODE LIKE #{startNum}
-                    </if>
-                    <if test="startNum == null">
-                        RM.MATERIAL_CODE LIKE '010%' OR RM.MATERIAL_CODE LIKE '080%'
+                    <if test="index != null">
+                        RM.MATERIAL_NAME LIKE #{index}
                     </if>
                 </where>
         )
         <where>
-            <if test="index != null">
-                "materialName" LIKE #{index}
-            </if>
             <if test="materialName != null">
-                and
+
                 <foreach collection="materialName" item="item" open="(" separator="or" close=")">
                  "materialName" like '%${item}%'
                 </foreach>
@@ -117,7 +115,11 @@
         RS.SUPPLIER_NAME "supplierName",
         RS.SUPPLIER_ADDRESS "supplierAddress"
         FROM RMS_SUPPLIER RS
-        WHERE RS.SUPPLIER_NAME LIKE #{index}
+        <where>
+            <if test="index != null">
+                RS.SUPPLIER_NAME LIKE #{index}
+            </if>
+        </where>
         )
         <where>
             <if test="supplierName != null">
@@ -140,21 +142,24 @@
 
     <!--  获取所有的运力信息 -->
     <select id="getAllCapacityByCarrierLike" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
-        SELECT
-            RDC.DRIVER_CAPACITY_ID "driverCapacityId",
-            RDC.CAPACITY_ID "capacityId",
-            RCD.DRIVER_NAME "driverName",
-            RC.CAPACITY_NUMBER "capacityNumber",
-            RCA.CARRIER_NAME "carrierName"
-        FROM RMS_DRIVER_CAPACITY RDC
-        LEFT JOIN RMS_CAR_DRIVER RCD
-            ON RCD.DRIVER_ID = RDC.DRIVER_ID
-        LEFT JOIN RMS_CAPACITY RC
-            ON RC.CAPACITY_ID = RDC.CAPACITY_ID
-        LEFT JOIN RMS_CARRIER RCA
-            ON RCA.CARRIER_ID = RDC.CARRIER_ID
-        WHERE RC.CAPACITY_STATUS = 0
-            and RCA.CARRIER_NAME LIKE #{index}
+
+        SELECT *
+        FROM (
+                 SELECT
+                        RC.CAPACITY_ID        "capacityId",
+                        RC.CAPACITY_NUMBER     "capacityNumber",
+                        RCA.CARRIER_NAME       "carrierName"
+                 FROM RMS_CAPACITY RC
+                          LEFT JOIN RMS_CARRIER RCA
+                                    ON RCA.CARRIER_ID = RC.CARRIER_ID
+                 WHERE RC.CAPACITY_STATUS = 0 AND RC.CAPACITY_TYPE_ID = 1
+                   <if test="index != null">
+                       and RCA.CARRIER_NAME LIKE #{index}
+                   </if>
+                   <if test="index == null">
+                       and rownum &lt; 21
+                   </if>
+             )
     </select>
 
 <!--    通过订单ID查询物资子表信息  -->
@@ -197,4 +202,113 @@
         </if>
     </select>
 
+<!--  通过物资ID查询该物资的发货单位信息  -->
+    <select id="getSupplierMesByMaterialId" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+                 select distinct RS.SUPPLIER_ID      "supplierId",
+                                 RS.SUPPLIER_NAME    "supplierName",
+                                 RS.SUPPLIER_ADDRESS "supplierAddress"
+                 from DIL_BATCH DB
+                          left join AMS_PURCHASE_ORDER APO
+                                    on apo.BATCH_ID = DB.BATCH_ID
+                          left join RMS_SUPPLIER RS
+                                    on RS.SUPPLIER_ID = apo.SUPPLIER_UNIT_ID
+                 <where>
+                    <if test="materialId != null">
+                        DB.MATERIAL_ID = #{materialId}
+                    </if>
+                 </where>
+             )
+        <where>
+            <if test="index != null">
+                "supplierName" like #{index}
+            </if>
+        </where>
+    </select>
+
+<!--  模糊查询所有的卸货点信息  -->
+    <select id="getUnloadingMesByLike" parameterType="map" resultType="java.util.Map">
+
+        select *
+        from (
+                 select
+                        RW.WAREHOUSE_ID   "warehouseId",
+                        RW.WAREHOUSE_NAME "warehouseName"
+                 from RMS_WAREHOUSE RW
+                 <where>
+                     <if test="type != null">
+                         RW.WAREHOUSE_TYPE_ID = #{type}
+                     </if>
+                 </where>
+             )
+        <where>
+            <if test="index != null">
+                "warehouseName" like #{index}
+            </if>
+            <if test="warehouseName != null">
+                <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 "warehouseName" desc
+        </if>
+    </select>
+
+    <!--  模糊查询所有物资  -->
+    <select id="queryMaterialByLike" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+        SELECT RM.MATERIAL_ID "materialId",
+        RM.MATERIAL_NAME "materialName",
+        RM.MATERIAL_CODE "materialCode",
+        RM.MATERIAL_SPECIFICATION "materialSpecification",
+        RM.MATERIAL_MODEL "materialModel"
+        FROM RMS_MATERIAL RM
+        <where>
+            <if test="startNum != null">
+                RM.MATERIAL_CODE LIKE #{startNum}
+            </if>
+            <if test="startNum == null">
+                RM.MATERIAL_CODE LIKE '010%' OR RM.MATERIAL_CODE LIKE '0801%'
+            </if>
+        </where>
+        )
+        <where>
+            <if test="index != null">
+                "materialName" LIKE #{index}
+            </if>
+            <if test="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialCode != null">
+                and
+                <foreach collection="materialCode" item="item" open="(" separator="or" close=")">
+                    "materialCode" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialSpecification != null">
+                and
+                <foreach collection="materialSpecification" item="item" open="(" separator="or" close=")">
+                    "materialSpecification" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialModel != null">
+                and
+                <foreach collection="materialModel" item="item" open="(" separator="or" close=")">
+                    "materialModel" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "materialId" desc
+        </if>
+    </select>
 </mapper>