| | |
| | | material.setFileUrl(null); |
| | | }); |
| | | mapper.insertBatchSomeColumn(materialList); |
| | | /*0120开头的物料上传后,系统自动发邮件对应人员:吴浚、陈卓、熊家杰、钱镜元、於奇 |
| | | 0108、0109开头的物料上传后,系统自动发邮件对应人员:喻艳、袁成、熊志平、叶胜蓝 */ |
| | | List<String> materialCodeList = materialList.stream().map(Material::getSubCode).collect(Collectors.toList()); |
| | | DocUser user = ActionUtil.getUser(); |
| | | MailDTO mailDTO = new MailDTO(); |
| | | |
| | | mailDTO.setTitle("【物料上传提醒】"); |
| | | if(materialCodeList.stream().anyMatch(b->b.startsWith("0120"))){ |
| | | List<MailUser> mailUserList = mailUserService.getMailUserList(5); |
| | | mailDTO.setMailList(mailUserList.stream().map(MailUser::getMail).collect(Collectors.toList())); |
| | | mailDTO.setContent(user.getName()+"在文档管理平台上传了0120开头的物料,请知晓"); |
| | | mailService.sendMail(mailDTO); |
| | | } |
| | | if (materialCodeList.stream().anyMatch(b->b.startsWith("0108")||b.startsWith("0109"))){ |
| | | List<MailUser> mailUserList = mailUserService.getMailUserList(6); |
| | | mailDTO.setMailList(mailUserList.stream().map(MailUser::getMail).collect(Collectors.toList())); |
| | | mailDTO.setContent(user.getName()+"在文档管理平台上传了0108或0109开头的物料,请知晓"); |
| | | mailService.sendMail(mailDTO); |
| | | } |
| | | return new Response().set(1,true,"新增完成"); |
| | | } |
| | | |