whyclxw
2024-07-25 1e2246a0842419b0f60e0a063318d3c49dd1e13e
src/main/java/com/whyc/service/DefectiveProductsService.java
@@ -117,7 +117,8 @@
        }
        String subject = "【不良品记录】-"+senderName;
        String content = defective.getContent();
        String content = defective.getSenderName()+"上传了厂商:"+defective.getProvideName()+",产品:"+defective.getProductName()+",型号:"+defective.getType()+"的不良品记录;\n"+
                "不良品数量为:"+defective.getBadProduct()+",具体不良信息为:"+defective.getContent();
        MailDTO mailDTO = new MailDTO();
        mailDTO.setTitle(subject);
@@ -185,6 +186,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 +198,7 @@
        wrapper.eq("id",defectiveHis.getDeftId());
        mapper.update(null,wrapper);
        //记录处理记录
        defectiveHisService.updateDefective(defective,defectiveHis,multipartFileList);
        //发送邮件
@@ -216,7 +219,9 @@
        }
        String subject = "【不良品处理记录】-"+senderName;
        String content = defective.getContent();
        String content = defectiveHis.getDelName()+"修复了厂商:"+defective.getProvideName()+",产品:"+defective.getProductName()+",型号:"+defective.getType()+"的不良品记录;\n"+
                "不良品数量为:"+defective.getBadProduct()+"修复不良品个数:"+defectiveHis.getDelProduct()+",剩余不良品个数:"+defectiveHis.getRestProduct()+"\n"
                +"修复方式:"+defectiveHis.getNote();
        MailDTO mailDTO = new MailDTO();
        mailDTO.setTitle(subject);
@@ -246,6 +251,7 @@
        defectiveHis.setConfirmStatus(3);
        defectiveHis.setDelProduct(0);
        defectiveHis.setDelName(ActionUtil.getUser().getName());
        defectiveHis.setRestProduct(0);
        defectiveHisService.stopDefective(defectiveHis);
        return new Response().set(1,true);
    }