whyclxw
2024-07-25 9a48f0e7c87a371b50e5b92a2533dc14ea262374
不良品推送修改
3个文件已修改
7 ■■■■■ 已修改文件
src/main/java/com/whyc/pojo/DefectiveProductsHistory.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/DefectiveProductsHistoryService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/DefectiveProductsService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/DefectiveProductsHistory.java
@@ -73,5 +73,8 @@
    @ApiModelProperty(value = "处理不良品数")
    private Integer delProduct;
    @ApiModelProperty(value = "每次处理剩余不良品数")
    private Integer restProduct;
}
src/main/java/com/whyc/service/DefectiveProductsHistoryService.java
@@ -34,6 +34,7 @@
        his.setDelProduct(0);
        his.setDelId(defective.getSenderId());
        his.setDelName(defective.getSenderName());
        his.setRestProduct(defective.getRestProduct());
        mapper.insert(his);
    }
    //记录处理记录
src/main/java/com/whyc/service/DefectiveProductsService.java
@@ -185,6 +185,7 @@
        wrapper.set("receiver_ids",defectiveHis.getReceiverIds());
        wrapper.set("receiver_names",defectiveHis.getReceiverNames());
        int resProduct=defective.getRestProduct()-defectiveHis.getDelProduct();
        defectiveHis.setRestProduct(resProduct);
        wrapper.set("rest_product",resProduct);
        if(resProduct==0){
            defectiveHis.setConfirmStatus(2);//不良品数量为0结束
@@ -196,6 +197,7 @@
        wrapper.eq("id",defectiveHis.getDeftId());
        mapper.update(null,wrapper);
        //记录处理记录
        defectiveHisService.updateDefective(defective,defectiveHis,multipartFileList);
        //发送邮件
@@ -246,6 +248,7 @@
        defectiveHis.setConfirmStatus(3);
        defectiveHis.setDelProduct(0);
        defectiveHis.setDelName(ActionUtil.getUser().getName());
        defectiveHis.setRestProduct(0);
        defectiveHisService.stopDefective(defectiveHis);
        return new Response().set(1,true);
    }