| | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.FileDirPath; |
| | | import com.whyc.dto.MailDTO; |
| | | import com.whyc.dto.MaterialCheckDTO; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.MaterialMapper; |
| | |
| | | |
| | | @Autowired |
| | | private AttachLockService attachLockService; |
| | | |
| | | @Autowired |
| | | private MailService mailService; |
| | | |
| | | @Autowired |
| | | private MailUserService mailUserService; |
| | | |
| | | //查询所有的散装件信息加设置了替换关系的子件信息 |
| | | /*public Response getAllMaterial(String category,String subCode,String subName,String subModel,int pageCurr,int pageSize) { |
| | |
| | | //上传的文件夹转移到正式路径 |
| | | org.aspectj.util.FileUtil.copyDir(unPackageFile,dirFile); |
| | | FileUtil.deleteFile(unPackageFile);*/ |
| | | |
| | | /*0120开头的物料上传后,系统自动发邮件对应人员:吴浚、陈卓、熊家杰、钱镜元、於奇 |
| | | 0108、0109开头的物料上传后,系统自动发邮件对应人员:喻艳、袁成、熊志平、叶胜蓝 */ |
| | | MailDTO mailDTO = new MailDTO(); |
| | | DocUser user = ActionUtil.getUser(); |
| | | mailDTO.setTitle("【附件更新提醒】"); |
| | | if(material.getSubCode().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); |
| | | }else if (material.getSubCode().startsWith("0108")||material.getSubCode().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,"上传完成"); |
| | | } |
| | | |
| | |
| | | mapper.updateById(temp); |
| | | mhService.insert(mh); |
| | | |
| | | /*0120开头的物料上传后,系统自动发邮件对应人员:吴浚、陈卓、熊家杰、钱镜元、於奇 |
| | | 0108、0109开头的物料上传后,系统自动发邮件对应人员:喻艳、袁成、熊志平、叶胜蓝 */ |
| | | MailDTO mailDTO = new MailDTO(); |
| | | DocUser user = ActionUtil.getUser(); |
| | | mailDTO.setTitle("【图纸图片更新提醒】"); |
| | | if(material.getSubCode().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); |
| | | }else if (material.getSubCode().startsWith("0108")||material.getSubCode().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, "上传完成"); |
| | | } |
| | | public Response dwgCompare(int materialId, int materialId2) throws IOException { |