ezhizao_zx 2 周之前
父節點
當前提交
dcf43bc6f0

+ 54 - 1
src/main/java/cn/ezhizao/project/business/controller/BizInboundOrderController.java

@@ -2,8 +2,10 @@ package cn.ezhizao.project.business.controller;
 
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.project.business.domain.BizCertificate;
 import cn.ezhizao.project.business.domain.BizInboundOrder;
 import cn.ezhizao.project.business.domain.BizInboundOrderDetail;
+import cn.ezhizao.project.business.service.IBizCertificateService;
 import cn.ezhizao.project.business.service.IBizInboundOrderDetailService;
 import cn.ezhizao.project.business.service.IBizInboundOrderService;
 import io.swagger.annotations.Api;
@@ -28,12 +30,21 @@ public class BizInboundOrderController extends BaseController {
     private IBizInboundOrderService bizInboundOrderService;
     @Resource
     private IBizInboundOrderDetailService bizInboundOrderDetailService;
+    @Resource
+    private IBizCertificateService bizCertificateService;
 
+    /**
+     * 库存推送
+     *
+     * @param bizInboundOrder
+     * @return
+     */
     @PostMapping("/warehousing")
     public AjaxResult warehousing(@RequestBody BizInboundOrder bizInboundOrder) {
         // 根据托盘编码获取入库单列表
         List<BizInboundOrder> list = bizInboundOrderService.query().eq("transfer_code", bizInboundOrder.getPalletCode()).eq("is_all_inbound", 0).list();
         List<BizInboundOrderDetail> detailList = bizInboundOrderDetailService.query().in("inbound_order_id", list.stream().map(BizInboundOrder::getId).collect(Collectors.toList())).list();
+        List<BizCertificate> bizCertificateList = bizCertificateService.query().in("id", detailList.stream().map(BizInboundOrderDetail::getCertificateId).collect(Collectors.toList())).list();
 
         if (list.isEmpty()) {
             return error("没有找到托盘码对应入库单");
@@ -46,13 +57,14 @@ public class BizInboundOrderController extends BaseController {
             map.put("keeperCode", l.getStorageUserName());
             List<Map<String, Object>> datas = new ArrayList<>();
             detailList.stream().filter(v -> v.getInboundOrderId().equals(l.getId())).forEach(v -> {
+                BizCertificate bizCertificate = bizCertificateList.stream().filter(t -> t.getId().equals(v.getCertificateId())).findFirst().orElse(null);
                 Map<String, Object> t = new HashMap<String, Object>();
                 t.put("packCode", v.getCertificateCode());
                 t.put("batchCode", v.getLotCode());
                 t.put("materialCode", l.getProductCode());
                 t.put("qty", v.getInboundNum());
                 t.put("customerCode", l.getCompanyCode());
-//                t.put("packDate")
+                t.put("packDate", bizCertificate != null ? bizCertificate.getPrintDate() : null);
                 datas.add(t);
             });
             map.put("datas", datas);
@@ -62,4 +74,45 @@ public class BizInboundOrderController extends BaseController {
         returnData.put("packDatas", inboundList);
         return success(returnData);
     }
+
+    /**
+     * 上架
+     */
+    @PostMapping("/onSale")
+    public AjaxResult onSale(@RequestBody BizInboundOrder bizInboundOrder) {
+        // 入参
+        // "palletCode": "2410616" -- 托盘码
+        // "inBoundCode": "EAS251644" --  入库单号
+        // "packCode": "2521046861" -- 合格证编码
+        List<BizInboundOrder> list = bizInboundOrderService.query().eq("inbound_number", bizInboundOrder.getInBoundCode()).list();
+        if (list.isEmpty()) {
+            // 返回入库单不存在错误
+            return error("入库单不存在");
+        }
+        List<BizInboundOrderDetail> details = bizInboundOrderDetailService.query().in("inbound_order_id", list.stream().map( BizInboundOrder::getId).collect(Collectors.toList())).eq("certificate_code", bizInboundOrder.getPackCode()).list();
+        if (details.isEmpty()) {
+            // 错误
+            return error("合格证不存在");
+        }
+        details.forEach(l ->{
+            l.setPalletCode(bizInboundOrder.getPalletCode());
+            l.setIsInbound(1);
+        });
+        bizInboundOrderDetailService.updateBatchById(details);
+
+        list.forEach(l ->{
+            // 判断未入库明细数量是否大于0 假设大于0 则部分入库,否则全部入库
+            long inboundNum =  bizInboundOrderDetailService.query().eq("inbound_order_id", l.getId()).eq("is_inbound", 0).count();
+             if(inboundNum > 0){
+                l.setIsAllInbound(0);
+                l.setStatus("1");
+            }else{
+                l.setIsAllInbound(1);
+                l.setStatus("2");
+            }
+        });
+        bizInboundOrderService .updateBatchById(list);
+
+        return success("p2更新成功");
+    }
 }

+ 256 - 0
src/main/java/cn/ezhizao/project/business/domain/BizCertificate.java

@@ -0,0 +1,256 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 合格证对象 biz_certificate
+ *
+ * @author ezhizao
+ * @date 2024-09-02
+ */
+@Data
+@TableName(value = "biz_certificate")
+public class BizCertificate extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 产品名称 */
+    @ApiModelProperty(value = "${comment}")
+    private Long productId;
+
+    /** 二维码信息 */
+    @Excel(name = "二维码信息")
+    @ApiModelProperty(value = "二维码信息")
+    private String qrcode;
+
+    /** 二维码地址 */
+    @Excel(name = "二维码地址")
+    @ApiModelProperty(value = "二维码地址")
+    private String qrcodeUrl;
+
+    @TableField(exist = false)
+    private String qrcodeUrl2Src;
+
+    /** 条形码地址 */
+    @Excel(name = "条形码地址")
+    @ApiModelProperty(value = "条形码地址")
+    private String barcodeUrl;
+
+    @TableField(exist = false)
+    private String barcodeUrl2Src;
+
+    /** 数量 */
+    @Excel(name = "数量")
+    @ApiModelProperty(value = "数量")
+    private Integer number;
+
+    /** 客户id */
+    @ApiModelProperty(value = "客户id")
+    private Long companyId;
+
+    /** 客户名称 */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+    private String companyName;
+
+    /** 批次id */
+    @ApiModelProperty(value = "客户名称")
+    private Long lotId;
+
+    /** 料号 */
+    @Excel(name = "料号")
+    @ApiModelProperty(value = "料号")
+    private String productCode;
+
+    @Excel(name = "物料号")
+    @ApiModelProperty(value = "物料号")
+    private String materialNum;
+
+    /** 规格,不允许出现下划线_ */
+    @Excel(name = "规格,不允许出现下划线_")
+    @ApiModelProperty(value = "规格,不允许出现下划线_")
+    private String specification;
+
+    /** 图号,不允许出现下划线_ */
+    @Excel(name = "图号,不允许出现下划线_")
+    @ApiModelProperty(value = "图号,不允许出现下划线_")
+    private String drawingNumber;
+
+    /** =客户简称_图号_规格 */
+    @Excel(name = "=客户简称_图号_规格")
+    @ApiModelProperty(value = "=客户简称_图号_规格")
+    private String productDescription;
+
+    /** 初次打印日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "初次打印日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "初次打印日期")
+    private Date printDate;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    @ApiModelProperty(value = "批号")
+    private String lotCode;
+
+    /** 打印次数 */
+    @Excel(name = "打印次数")
+    @ApiModelProperty(value = "打印次数")
+    private Long printNumber;
+
+    /** 租户id */
+    @ApiModelProperty(value = "打印次数")
+    private Long tenantId;
+
+    /** 停用(0:否;1是) */
+    @Excel(name = "停用(0:否;1是)")
+    @ApiModelProperty(value = "停用(0:否;1是)")
+    private Integer isDeactivate;
+
+    /** 合格证类型 表示合格证模板 */
+    @Excel(name = "合格证类型 表示合格证模板")
+    @ApiModelProperty(value = "合格证类型 表示合格证模板")
+    private String type;
+
+    /** 工段 */
+    @ApiModelProperty(value = "合格证类型 表示合格证模板")
+    private Long deptId;
+
+    /** 包装线外键 */
+    @ApiModelProperty(value = "合格证类型 表示合格证模板")
+    private Long packageResourceGroupId;
+
+    /** 年 */
+    @Excel(name = "年")
+    @ApiModelProperty(value = "年")
+    private String year;
+
+    /** 标签数量 */
+    @Excel(name = "标签数量")
+    @ApiModelProperty(value = "标签数量")
+    private Integer labelNumber;
+
+    /** 包装数量 */
+    @Excel(name = "包装数量")
+    @ApiModelProperty(value = "包装数量")
+    private Integer packageNumber;
+
+    /** 打印份数 */
+    @Excel(name = "打印份数")
+    @ApiModelProperty(value = "打印份数")
+    private Integer printPages;
+
+    /** 包装id */
+    @ApiModelProperty(value = "打印份数")
+    private Long packageId;
+
+    /** 包装箱编码 */
+    @Excel(name = "包装箱编码")
+    @ApiModelProperty(value = "包装箱编码")
+    private String packageCode;
+
+    /** 包装箱号 */
+    @Excel(name = "包装箱号")
+    @ApiModelProperty(value = "包装箱号")
+    private String packageNo;
+
+    /** 包装箱尺寸 */
+    @Excel(name = "包装箱尺寸")
+    @ApiModelProperty(value = "包装箱尺寸")
+    private String packageStandard;
+
+    @ApiModelProperty("包装形式码")
+    private String packageTypeCode;
+
+    @TableField(exist = false)
+    private String logoUrl;
+
+    private Long dayworkId;
+    private Long productionPlanDetailId;
+    private String deptName;
+    private String packageLineNo;
+    private String packageResourceGroupName;
+    private String deptNo;
+    private String factoryName;
+    private Date generateTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date printTime;
+    @TableField(exist = false)
+    private List<BizCertificateLot> lots;
+    /** 开始序号 */
+    @Excel(name = "开始序号")
+    @ApiModelProperty(value = "开始序号")
+    private String startCode;
+
+    /** 结束序号 */
+    @Excel(name = "结束序号")
+    @ApiModelProperty(value = "结束序号")
+    private String endCode;
+
+    private String purchaseOrderNo;
+    private String furnaceNumber;
+    private String first_1;
+    private String first_2;
+    private String first_3;
+    private String first_4;
+    private String first_5;
+    private String first_6;
+    private String first_7;
+    private String first_8;
+    private String first_9;
+    private String first_10;
+    @TableField(exist = false)
+    private List<Long> ids;
+
+    public BizCertificate() {
+    }
+
+    public BizCertificate(BizCertificate copy) {
+        this.productId = copy.getProductId();
+        this.qrcode = copy.getQrcode();
+        this.qrcodeUrl = copy.getQrcodeUrl();
+        this.qrcodeUrl2Src = copy.getQrcodeUrl2Src();
+        this.barcodeUrl = copy.getBarcodeUrl();
+        this.barcodeUrl2Src = copy.getBarcodeUrl2Src();
+        this.number = copy.getNumber();
+        this.companyId = copy.getCompanyId();
+        this.customerName = copy.getCustomerName();
+        this.lotId = copy.getLotId();
+        this.productCode = copy.getProductCode();
+        this.specification = copy.getSpecification();
+        this.drawingNumber = copy.getDrawingNumber();
+        this.productDescription = copy.getProductDescription();
+        this.printDate = copy.getPrintDate();
+        this.lotCode = copy.getLotCode();
+        this.printNumber = copy.getPrintNumber();
+        this.tenantId = copy.getTenantId();
+        this.type = copy.getType();
+        this.deptId = copy.getDeptId();
+        this.packageResourceGroupId = copy.getPackageResourceGroupId();
+        this.year = copy.getYear();
+        this.labelNumber = copy.getLabelNumber();
+        this.packageNumber = copy.getPackageNumber();
+        this.packageId = copy.getPackageId();
+        this.packageCode = copy.getPackageCode();
+        this.packageNo = copy.getPackageNo();
+        this.packageStandard = copy.getPackageStandard();
+        this.packageTypeCode = copy.getPackageTypeCode();
+        this.logoUrl = copy.getLogoUrl();
+        this.dayworkId = copy.getDayworkId();
+        this.productionPlanDetailId = copy.getProductionPlanDetailId();
+        this.deptName = copy.getDeptName();
+        this.packageLineNo = copy.getPackageLineNo();
+        this.packageResourceGroupName = copy.getPackageResourceGroupName();
+        this.deptNo = copy.getDeptNo();
+        this.factoryName = copy.getFactoryName();
+    }
+}

+ 84 - 0
src/main/java/cn/ezhizao/project/business/domain/BizCertificateLot.java

@@ -0,0 +1,84 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 合格证打印明细对象 biz_certificate_lot
+ *
+ * @author ezhizao
+ * @date 2024-09-04
+ */
+@Data
+@TableName(value = "biz_certificate_lot")
+public class BizCertificateLot extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 合格证外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long certificateId;
+
+    /** 打印次数 */
+    @Excel(name = "打印次数")
+    @ApiModelProperty(value = "打印次数")
+    private Long sort;
+
+    /** 开始序号 */
+    @Excel(name = "开始序号")
+    @ApiModelProperty(value = "开始序号")
+    private String startCode;
+
+    /** 结束序号 */
+    @Excel(name = "结束序号")
+    @ApiModelProperty(value = "结束序号")
+    private String endCode;
+
+    /** 打印时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "打印时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "打印时间")
+    private Date printDate;
+
+    /** 租户id */
+    @ApiModelProperty(value = "打印时间")
+    private Long tenantId;
+
+    /** 二维码信息 */
+    @Excel(name = "二维码信息")
+    @ApiModelProperty(value = "二维码信息")
+    private String qrcode;
+
+    /** 二维码地址 */
+    @Excel(name = "二维码地址")
+    @ApiModelProperty(value = "二维码地址")
+    private String qrcodeUrl;
+
+    /** 条形码信息 */
+    @Excel(name = "条形码信息")
+    @ApiModelProperty(value = "条形码信息")
+    private String barcode;
+
+    /** 条形码地址 */
+    @Excel(name = "条形码地址")
+    @ApiModelProperty(value = "条形码地址")
+    private String barcodeUrl;
+
+    @TableField(exist = false)
+    private String qrcodeUrl2Src;
+
+    @TableField(exist = false)
+    private String barcodeUrl2Src;
+    private String companyName;
+
+    @TableField(exist = false)
+    private List<Long> ids;
+}

+ 7 - 2
src/main/java/cn/ezhizao/project/business/domain/BizInboundOrder.java

@@ -192,6 +192,13 @@ public class BizInboundOrder extends BaseEntity
     @ApiModelProperty(value = "是否全部入库")
     private Integer isAllInbound;
 
+    @TableField(exist = false)
+    private String palletCode;
+    @TableField(exist = false)
+    private String inBoundCode;
+    @TableField(exist = false)
+    private String packCode;
+
 
     private String standard;
 
@@ -219,6 +226,4 @@ public class BizInboundOrder extends BaseEntity
 
     private Long productId;
 
-    @TableField(exist = false)
-    private String palletCode;
 }

+ 3 - 0
src/main/java/cn/ezhizao/project/business/domain/BizInboundOrderDetail.java

@@ -199,4 +199,7 @@ public class BizInboundOrderDetail extends BaseEntity
 
     @TableField(exist =  false)
     private Long sum;
+
+    @ApiModelProperty("入库转运码")
+    private String palletCode;
 }

+ 30 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizCertificateLotMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.mapper;
+
+import cn.ezhizao.project.business.domain.BizCertificateLot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 合格证打印明细Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-09-04
+ */
+public interface BizCertificateLotMapper extends BaseMapper<BizCertificateLot>
+{
+    /**
+     * 查询合格证打印明细列表
+     *
+     * @param bizCertificateLot 合格证打印明细
+     * @return 合格证打印明细集合
+     */
+    public List<BizCertificateLot> getList(BizCertificateLot bizCertificateLot);
+
+    /**
+     * 物理删除
+     * @param bizCertificateLot
+     * @return 删除结果
+    */
+    public int physicalDelete(BizCertificateLot bizCertificateLot);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizCertificateMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.mapper;
+
+import cn.ezhizao.project.business.domain.BizCertificate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 合格证Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-09-02
+ */
+public interface BizCertificateMapper extends BaseMapper<BizCertificate>
+{
+    /**
+     * 查询合格证列表
+     *
+     * @param bizCertificate 合格证
+     * @return 合格证集合
+     */
+    public List<BizCertificate> getList(BizCertificate bizCertificate);
+
+    /**
+     * 物理删除
+     * @param bizCertificate
+     * @return 删除结果
+    */
+    public int physicalDelete(BizCertificate bizCertificate);
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/service/IBizCertificateLotService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.service;
+
+import cn.ezhizao.project.business.domain.BizCertificateLot;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 合格证打印明细Service接口
+ *
+ * @author ezhizao
+ * @date 2024-09-04
+ */
+public interface IBizCertificateLotService extends IService<BizCertificateLot>
+{
+    /**
+     * 查询合格证打印明细列表
+     *
+     * @param bizCertificateLot 合格证打印明细
+     * @return 合格证打印明细集合
+     */
+    public List<BizCertificateLot> getList(BizCertificateLot bizCertificateLot);
+
+    /**
+     * 物理删除
+     * @param bizCertificateLot
+     * @return 删除结果
+     */
+    public int physicalDelete(BizCertificateLot bizCertificateLot);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/service/IBizCertificateService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.service;
+
+import cn.ezhizao.project.business.domain.BizCertificate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 合格证Service接口
+ *
+ * @author ezhizao
+ * @date 2024-09-02
+ */
+public interface IBizCertificateService extends IService<BizCertificate>
+{
+    /**
+     * 查询合格证列表
+     *
+     * @param bizCertificate 合格证
+     * @return 合格证集合
+     */
+    public List<BizCertificate> getList(BizCertificate bizCertificate);
+
+    /**
+     * 物理删除
+     * @param bizCertificate
+     * @return 删除结果
+     */
+    public int physicalDelete(BizCertificate bizCertificate);
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizCertificateLotServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.service.impl;
+
+import cn.ezhizao.project.business.domain.BizCertificateLot;
+import cn.ezhizao.project.business.mapper.BizCertificateLotMapper;
+import cn.ezhizao.project.business.service.IBizCertificateLotService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 合格证打印明细Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-09-04
+ */
+@Service
+public class BizCertificateLotServiceImpl  extends ServiceImpl<BizCertificateLotMapper, BizCertificateLot> implements IBizCertificateLotService
+{
+    @Resource
+    private BizCertificateLotMapper bizCertificateLotMapper;
+
+    /**
+     * 查询合格证打印明细列表
+     *
+     * @param bizCertificateLot 合格证打印明细
+     * @return 合格证打印明细
+     */
+    @Override
+    public List<BizCertificateLot> getList(BizCertificateLot bizCertificateLot)
+    {
+        return bizCertificateLotMapper.getList(bizCertificateLot);
+    }
+
+    /**
+     * 物理删除
+     * @param bizCertificateLot
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizCertificateLot bizCertificateLot){ return bizCertificateLotMapper.physicalDelete(bizCertificateLot); };
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizCertificateServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.service.impl;
+
+import cn.ezhizao.project.business.domain.BizCertificate;
+import cn.ezhizao.project.business.mapper.BizCertificateMapper;
+import cn.ezhizao.project.business.service.IBizCertificateService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 合格证Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-09-02
+ */
+@Service
+public class BizCertificateServiceImpl  extends ServiceImpl<BizCertificateMapper, BizCertificate> implements IBizCertificateService
+{
+    @Resource
+    private BizCertificateMapper bizCertificateMapper;
+
+    /**
+     * 查询合格证列表
+     *
+     * @param bizCertificate 合格证
+     * @return 合格证
+     */
+    @Override
+    public List<BizCertificate> getList(BizCertificate bizCertificate)
+    {
+        return bizCertificateMapper.getList(bizCertificate);
+    }
+
+    /**
+     * 物理删除
+     * @param bizCertificate
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizCertificate bizCertificate){ return bizCertificateMapper.physicalDelete(bizCertificate); };
+
+}

+ 51 - 0
src/main/resources/mybatis/business/BizCertificateMapper.xml

@@ -0,0 +1,51 @@
+<?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="cn.ezhizao.project.business.mapper.BizCertificateMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizCertificate" id="BizCertificateResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizCertificate" resultMap="BizCertificateResult">
+        SELECT * FROM biz_certificate
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0 and print_time is not null
+            <if test="qrcode != null  and qrcode != ''"> AND qrcode = #{qrcode}</if>
+            <if test="qrcodeUrl != null  and qrcodeUrl != ''"> AND qrcode_url = #{qrcodeUrl}</if>
+            <if test="barcodeUrl != null  and barcodeUrl != ''"> AND barcode_url = #{barcodeUrl}</if>
+            <if test="number != null "> AND number = #{number}</if>
+            <if test="customerName != null  and customerName != ''"> AND customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="productCode != null  and productCode != ''"> AND product_code = #{productCode}</if>
+            <if test="specification != null  and specification != ''"> AND specification = #{specification}</if>
+            <if test="drawingNumber != null  and drawingNumber != ''"> AND drawing_number = #{drawingNumber}</if>
+            <if test="productDescription != null  and productDescription != ''"> AND product_description = #{productDescription}</if>
+            <if test="printDate != null "> AND print_date = #{printDate}</if>
+            <if test="lotCode != null  and lotCode != ''"> AND lot_code = #{lotCode}</if>
+            <if test="printNumber != null "> AND print_number = #{printNumber}</if>
+            <if test="isDeactivate != null "> AND is_deactivate = #{isDeactivate}</if>
+            <if test="type != null  and type != ''"> AND type = #{type}</if>
+            <if test="year != null  and year != ''"> AND year = #{year}</if>
+            <if test="labelNumber != null "> AND label_number = #{labelNumber}</if>
+            <if test="dayworkId != null "> AND daywork_id = #{dayworkId}</if>
+            <if test="packageNumber != null "> AND package_number = #{packageNumber}</if>
+            <if test="printPages != null "> AND print_pages = #{printPages}</if>
+            <if test="packageCode != null  and packageCode != ''"> AND package_code = #{packageCode}</if>
+            <if test="packageNo != null  and packageNo != ''"> AND package_no = #{packageNo}</if>
+            <if test="packageStandard != null  and packageStandard != ''"> AND package_standard = #{packageStandard}</if>
+        </trim>
+        order by print_time desc
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_certificate
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>