zhangyuewww il y a 1 an
Parent
commit
86eb424c3b
13 fichiers modifiés avec 462 ajouts et 1 suppressions
  1. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java
  2. 10 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseBaseInfoController.java
  3. 72 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehousePatrolInspectionInfoController.java
  4. 4 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseInOutInfo.java
  5. 121 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehousePatrolInspectionInfo.java
  6. 22 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehousePatrolInspectionInfoMapper.java
  7. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseBaseInfoService.java
  8. 26 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehousePatrolInspectionInfoService.java
  9. 45 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java
  10. 1 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java
  11. 84 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousePatrolInspectionInfoServiceImpl.java
  12. 7 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml
  13. 67 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousePatrolInspectionInfoMapper.xml

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -53,7 +53,7 @@ public class GeneratorCodeByTables {
     }
 
     public static void main(String[] args) throws IOException {
-        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","speed_warehouse_in_out_info");
+        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","warehouse_patrol_inspection_info");
     }
 
     /**

+ 10 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseBaseInfoController.java

@@ -198,6 +198,16 @@ public class WarehouseBaseInfoController {
     public WarehouseInOutInfo getPrintInfo(String id) {
         return warehouseBaseInfoService.getPrintInfo(id);
     }
+    /**
+     * 获取检斤打印接口(新)
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/getPrintInfoNew")
+    public WarehouseInOutInfo getPrintInfoNew(String id) {
+        return warehouseBaseInfoService.getPrintInfoNew(id);
+    }
 
     /**
      * 查出库时的成本

+ 72 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehousePatrolInspectionInfoController.java

@@ -0,0 +1,72 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePatrolInspectionInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehousePatrolInspectionInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 记录巡检信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-04
+ */
+@RestController
+@RequestMapping("/warehousePatrolInspectionInfo")
+public class WarehousePatrolInspectionInfoController {
+    @Autowired
+    private IWarehousePatrolInspectionInfoService warehousePatrolInspectionInfoService;
+
+    /**
+     * 创建巡检信息
+     * @param warehousePatrolInspectionInfo
+     * @return
+     */
+    @PostMapping("/api/addInfo")
+    public String addInfo(@RequestBody WarehousePatrolInspectionInfo warehousePatrolInspectionInfo){
+        return warehousePatrolInspectionInfoService.addInfo(warehousePatrolInspectionInfo);
+    }
+
+    /**
+     * 查看巡检信息
+     * @param id
+     * @return
+     */
+    @GetMapping("/getInfo")
+    public WarehousePatrolInspectionInfo getInfo(String id){
+        return warehousePatrolInspectionInfoService.getInfo(id);
+    }
+
+    /**
+     * 删除巡检信息
+     * @param example
+     */
+    @PostMapping("/api/deleteInfo")
+    public void deleteInfo(@RequestBody WarehousePatrolInspectionInfo example) {
+        warehousePatrolInspectionInfoService.deleteInfo(example.getId());
+    }
+    /**
+     * 编辑巡检信息
+     * @param warehousePatrolInspectionInfo
+     * @return
+     */
+    @PostMapping("/api/editInfo")
+    public String editInfo(@RequestBody WarehousePatrolInspectionInfo warehousePatrolInspectionInfo){
+        return warehousePatrolInspectionInfoService.editInfo(warehousePatrolInspectionInfo);
+    }
+
+    /**
+     * 巡检信息列表
+     * @param warehousePatrolInspectionInfo
+     * @return
+     */
+    @GetMapping("/selectInfo")
+    public Page<WarehousePatrolInspectionInfo> selectInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo){
+        return warehousePatrolInspectionInfoService.selectInfo(warehousePatrolInspectionInfo);
+    }
+}
+

+ 4 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseInOutInfo.java

@@ -499,6 +499,10 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
      * 自运加车标识
      */
     private String selfLoading;
+    /**
+     * 打印标识
+     */
+    private String printedFlag;
 
     @TableField(exist = false)
     private ContractManagementInfo contractManagementInfo;

+ 121 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehousePatrolInspectionInfo.java

@@ -0,0 +1,121 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.util.Date;
+import java.io.Serializable;
+
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mongodb.internal.connection.Time;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * <p>
+ * 记录巡检信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("warehouse_patrol_inspection_info")
+public class WarehousePatrolInspectionInfo extends BaseModel<WarehousePatrolInspectionInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 仓库id
+     */
+    private String baseId;
+    /**
+     * 仓库名称
+     */
+    private String warehouseName;
+    /**
+     * 仓位号id
+     */
+    private String positionId;
+    /**
+     * 仓位号
+     */
+    private String binNumber;
+    /**
+     * 巡检人
+     */
+    private String qualityInspector;
+    /**
+     * 温度
+     */
+    private String temperature;
+    /**
+     * 湿度
+     */
+    private String humidity;
+    /**
+     * 巡检结果
+     */
+    private String inspectionResults;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 附件地址
+     */
+    private String addressUrl;
+    /**
+     * 巡检日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date inspectionDate;
+    /**
+     * 巡检时间
+     */
+    @JsonFormat(pattern = "HH:mm")
+    @DateTimeFormat(pattern = "HH:mm")
+    private Date time;
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date startDate;
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date endDate;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 22 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehousePatrolInspectionInfoMapper.java

@@ -0,0 +1,22 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePatrolInspectionInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录巡检信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-04
+ */
+public interface WarehousePatrolInspectionInfoMapper extends BaseMapper<WarehousePatrolInspectionInfo> {
+
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    List<WarehousePatrolInspectionInfo> getListByCondition(Map<String, Object> pageView);
+}

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehouseBaseInfoService.java

@@ -187,4 +187,6 @@ public interface IWarehouseBaseInfoService extends IService<WarehouseBaseInfo> {
     String exportInJyn(WarehouseBaseInfo warehouseBaseInfo, HttpServletResponse response);
 
     String exportOutJyn(WarehouseBaseInfo warehouseBaseInfo, HttpServletResponse response);
+
+    WarehouseInOutInfo getPrintInfoNew(String id);
 }

+ 26 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IWarehousePatrolInspectionInfoService.java

@@ -0,0 +1,26 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePatrolInspectionInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 记录巡检信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-04
+ */
+public interface IWarehousePatrolInspectionInfoService extends IService<WarehousePatrolInspectionInfo> {
+
+    String addInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo);
+
+    WarehousePatrolInspectionInfo getInfo(String id);
+
+    void deleteInfo(String id);
+
+    String editInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo);
+
+    Page<WarehousePatrolInspectionInfo> selectInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo);
+}

+ 45 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -7869,4 +7869,49 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
 
     }
 
+    @Override
+    public WarehouseInOutInfo getPrintInfoNew(String id) {
+        WarehouseInOutInfo warehouseInOutInfo = warehouseInOutInfoService.selectById(id);
+        if (warehouseInOutInfo!=null){
+            warehouseInOutInfo.setPrintedFlag("1");
+            warehouseInOutInfoService.updateById(warehouseInOutInfo);
+        }
+        ContractManagementInfo contractManagementInfo = contractManagementInfoService.selectOne(
+                new EntityWrapper<ContractManagementInfo>()
+                        .eq("contract_no", warehouseInOutInfo.getContractNo())
+                        .eq("delete_flag", 0));
+        String compId = "";
+        if (contractManagementInfo == null) {
+            InOutWarehouseTask inOutWarehouseTask = iInOutWarehouseTaskService.selectOne(
+                    new EntityWrapper<InOutWarehouseTask>()
+                            .eq("move_task_no", warehouseInOutInfo.getContractNo())
+                            .eq("in_out_flag", "1")
+                            .eq("delete_flag", 0));
+            contractManagementInfo = contractManagementInfoService.selectOne(
+                    new EntityWrapper<ContractManagementInfo>()
+                            .eq("contract_no", inOutWarehouseTask.getWarehouseName())
+                            .eq("delete_flag", 0));
+            if (contractManagementInfo != null) {
+                warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
+                compId = contractManagementInfo.getCompId();
+            } else {
+                compId = inOutWarehouseTask.getCompId();
+                warehouseInOutInfo.setReceiveWarehouse(inOutWarehouseTask.getReceiveWarehouse());
+            }
+        } else {
+            compId = contractManagementInfo.getCompId();
+            warehouseInOutInfo.setContractManagementInfo(contractManagementInfo);
+        }
+        CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
+                .eq("comp_id", compId)
+                .eq("delete_flag", "0"));
+        warehouseInOutInfo.setCompanyName(commonCompany.getCompName());
+        WarehouseInOutDetail warehouseInOutDetail = warehouseInOutDetailService.selectOne(
+                new EntityWrapper<WarehouseInOutDetail>()
+                        .eq("info_id", warehouseInOutInfo.getId())
+                        .eq("delete_flag", 0));
+        warehouseInOutInfo.setWarehouseInOutDetail(warehouseInOutDetail);
+        return warehouseInOutInfo;
+    }
+
 }

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -2846,6 +2846,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
         pageView.put("startDate", warehouseInOutInfo.getStartDate());
         pageView.put("endDate", warehouseInOutInfo.getEndDate());
         pageView.put("printFlag", warehouseInOutInfo.getPrintFlag());
+        pageView.put("printedFlag", warehouseInOutInfo.getPrintedFlag());
         pageView.put("printStartDate", warehouseInOutInfo.getPrintStartDate());
         pageView.put("printEndDate", warehouseInOutInfo.getPrintEndDate());
         pageView.put("pcFlag", warehouseInOutInfo.getPcFlag());

+ 84 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehousePatrolInspectionInfoServiceImpl.java

@@ -0,0 +1,84 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePatrolInspectionInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.WarehousePatrolInspectionInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehousePatrolInspectionInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录巡检信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2023-07-04
+ */
+@Service
+public class WarehousePatrolInspectionInfoServiceImpl extends ServiceImpl<WarehousePatrolInspectionInfoMapper, WarehousePatrolInspectionInfo> implements IWarehousePatrolInspectionInfoService {
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String addInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo) {
+        warehousePatrolInspectionInfo.setId(IdGenerator.generateUUID());
+        boolean one = this.insert(warehousePatrolInspectionInfo);
+        if (one) {
+            return "OK";
+        } else {
+            return "NG";
+        }
+    }
+
+    @Override
+    public WarehousePatrolInspectionInfo getInfo(String id) {
+        WarehousePatrolInspectionInfo warehousePatrolInspectionInfo=this.selectById(id);
+        return warehousePatrolInspectionInfo;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void deleteInfo(String id) {
+        WarehousePatrolInspectionInfo warehousePatrolInspectionInfo=this.selectById(id);
+        if (warehousePatrolInspectionInfo!=null){
+            this.deleteById(warehousePatrolInspectionInfo.getId());
+        }
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String editInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo) {
+        this.updateById(warehousePatrolInspectionInfo);
+        return warehousePatrolInspectionInfo.getId();
+    }
+
+    @Override
+    public Page<WarehousePatrolInspectionInfo> selectInfo(WarehousePatrolInspectionInfo warehousePatrolInspectionInfo) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (warehousePatrolInspectionInfo.getCurrentPage() - 1)
+                * warehousePatrolInspectionInfo.getPageSize());
+        //公司id
+        pageView.put("compId",warehousePatrolInspectionInfo.getCompId());
+        pageView.put("warehouseName",warehousePatrolInspectionInfo.getWarehouseName());
+        pageView.put("startDate",warehousePatrolInspectionInfo.getStartDate());
+        pageView.put("endDate",warehousePatrolInspectionInfo.getEndDate());
+        pageView.put("searchKeyWord",warehousePatrolInspectionInfo.getSearchKeyWord());
+        pageView.put("pageSize",warehousePatrolInspectionInfo.getPageSize());
+        pageView.put("currentPage",warehousePatrolInspectionInfo.getCurrentPage());
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<WarehousePatrolInspectionInfo> dataList = baseMapper.getListByCondition(pageView);
+        Page<WarehousePatrolInspectionInfo> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(warehousePatrolInspectionInfo.getCurrentPage());
+        page.setSize(warehousePatrolInspectionInfo.getPageSize());
+        return page;
+    }
+}

+ 7 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -23,6 +23,9 @@
         <if test="binded != null and binded != ''">
             AND w.binded = #{binded}
         </if>
+        <if test="printedFlag != null and printedFlag != ''">
+            AND w.printed_flag = #{printedFlag}
+        </if>
         <if test="pcFlag != null and pcFlag != ''">
             <if test="pcFlag == 1">
                 AND w.base_id = #{baseId}
@@ -132,6 +135,7 @@
         w.title_no_other as titleNoOther,
         w.wing_number as wingNumber,
         w.wing_number_other as wingNumberOther,
+        w.printed_flag as printedFlag,
         w.type,
         w.deduction_weight as deductionWeight,
         case when w.goods_name like '%潮粮%' then w.pure_weight else w.net_weight end as pureWeight,
@@ -166,6 +170,9 @@
         <if test="binded != null and binded != ''">
             AND w.binded = #{binded}
         </if>
+        <if test="printedFlag != null and printedFlag != ''">
+            AND w.printed_flag = #{printedFlag}
+        </if>
         <if test="pcFlag != null and pcFlag != ''">
             <if test="pcFlag == 1">
                 AND w.base_id = #{baseId}

+ 67 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousePatrolInspectionInfoMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.WarehousePatrolInspectionInfoMapper">
+
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+            COUNT(w.id)
+        FROM warehouse_patrol_inspection_info w
+        WHERE
+        w.comp_id= #{compId}
+        and w.delete_flag = '0'
+        <if test="warehouseName != null and warehouseName != ''">
+            AND w.warehouse_name= #{warehouseName}
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(w.quality_inspector) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+    </select>
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.WarehousePatrolInspectionInfo">
+        SELECT
+        w.id,
+        w.base_id as baseId,
+        w.warehouse_name as warehouseName,
+        w.position_id as positionId,
+        w.bin_number as binNumber,
+        w.quality_inspector as qualityInspector,
+        w.temperature,
+        w.humidity,
+        w.inspection_results as inspectionResults,
+        w.remark,
+        w.address_url as addressUrl,
+        w.inspection_date as inspectionDate,
+        w.time,
+        w.update_date as updateDate
+        FROM warehouse_patrol_inspection_info w
+        WHERE
+        w.comp_id= #{compId}
+        and w.delete_flag = '0'
+        <if test="warehouseName != null and warehouseName != ''">
+            AND w.warehouse_name= #{warehouseName}
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(w.quality_inspector) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+        ORDER BY w.update_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+</mapper>