| | |
| | | } |
| | | |
| | | 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); |
| | |
| | | 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结束 |
| | |
| | | wrapper.eq("id",defectiveHis.getDeftId()); |
| | | mapper.update(null,wrapper); |
| | | //记录处理记录 |
| | | |
| | | defectiveHisService.updateDefective(defective,defectiveHis,multipartFileList); |
| | | |
| | | //发送邮件 |
| | |
| | | } |
| | | |
| | | 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); |
| | |
| | | defectiveHis.setConfirmStatus(3); |
| | | defectiveHis.setDelProduct(0); |
| | | defectiveHis.setDelName(ActionUtil.getUser().getName()); |
| | | defectiveHis.setRestProduct(0); |
| | | defectiveHisService.stopDefective(defectiveHis); |
| | | return new Response().set(1,true); |
| | | } |