|
@@ -67,6 +67,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
public HttpRespMsg addFile(UserVO userVO, Integer blongType, MultipartFile file, MultipartFile file2, String path) {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", userVO.getToken()));
|
|
|
+ Mould mould = mouldMapper.selectById(userVO.getMouldId());
|
|
|
if (user != null) {
|
|
|
if (file != null && !file.isEmpty()) {
|
|
|
MouldFile projectFile = new MouldFile();
|
|
@@ -166,15 +167,14 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
dynamics.setBelongType(blongType);
|
|
|
mouldOperationDynamicsMapper.insert(dynamics);
|
|
|
//添加消息通知记录
|
|
|
- Mould mould = mouldMapper.selectById(userVO.getMouldId());
|
|
|
if (mould.getProjectId() != null) {
|
|
|
List<ProjectApprove> projectApproves = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()));
|
|
|
String content = "";
|
|
|
for (ProjectApprove projectApprove : projectApproves) {
|
|
|
NewsNotice newsNotice = new NewsNotice();
|
|
|
- newsNotice.setRefId(projectFile.getId());
|
|
|
+ newsNotice.setRefId(projectFile.getModelId());
|
|
|
newsNotice.setProjectId(project.getId());
|
|
|
- newsNotice.setProjectName(project.getProjectName());
|
|
|
+ newsNotice.setProjectName(project.getProjectName()+"-"+mould.getModelName());
|
|
|
newsNotice.setNoticeType(Constant.APPROVEL_TYPE);
|
|
|
if (blongType == 0) {
|
|
|
content = "模具文档";
|
|
@@ -213,15 +213,14 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
dynamics.setMouldId(userVO.getMouldId());
|
|
|
dynamics.setBelongType(blongType);
|
|
|
mouldOperationDynamicsMapper.insert(dynamics);
|
|
|
- Mould mould = mouldMapper.selectById(userVO.getMouldId());
|
|
|
Project project = projectMapper.selectOne(new QueryWrapper<Project>().eq("id", mould.getProjectId()));
|
|
|
List<ProjectApprove> projectApproves = projectApproveMapper.selectList(new QueryWrapper<ProjectApprove>().eq("project_id", project.getId()));
|
|
|
String content = "";
|
|
|
for (ProjectApprove projectApprove : projectApproves) {
|
|
|
NewsNotice newsNotice = new NewsNotice();
|
|
|
- newsNotice.setRefId(projectFile.getId());
|
|
|
+ newsNotice.setRefId(projectFile.getModelId());
|
|
|
newsNotice.setProjectId(project.getId());
|
|
|
- newsNotice.setProjectName(project.getProjectName());
|
|
|
+ newsNotice.setProjectName(project.getProjectName()+"-"+mould.getModelName());
|
|
|
newsNotice.setNoticeType(Constant.APPROVEL_TYPE);
|
|
|
if (blongType == 4) {
|
|
|
content = "模具更新";
|
|
@@ -280,7 +279,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
if (count != 0) {
|
|
|
return msg;
|
|
|
}
|
|
|
- dynamics.setMouldId(oldData.getId());
|
|
|
+ dynamics.setMouldId(oldData.getModelId());
|
|
|
dynamics.setBelongType(oldData.getBlongType());
|
|
|
dynamics.setContent(Constant.APPROVAL);
|
|
|
dynamics.setOperatorId(user.getId());
|
|
@@ -288,7 +287,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
mouldOperationDynamicsMapper.insert(dynamics);
|
|
|
} else {
|
|
|
//添加审批记录
|
|
|
- dynamics.setMouldId(oldData.getId());
|
|
|
+ dynamics.setMouldId(oldData.getModelId());
|
|
|
dynamics.setBelongType(oldData.getBlongType());
|
|
|
dynamics.setFileId(oldData.getId());
|
|
|
if (null != oldData.getFileName2()) {
|
|
@@ -331,7 +330,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
if (count != 0) {
|
|
|
return msg;
|
|
|
}
|
|
|
- dynamics.setMouldId(oldData.getId());
|
|
|
+ dynamics.setMouldId(oldData.getModelId());
|
|
|
dynamics.setBelongType(oldData.getBlongType());
|
|
|
dynamics.setContent(Constant.APPROVAL);
|
|
|
dynamics.setOperatorId(user.getId());
|
|
@@ -339,7 +338,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
|
|
|
mouldOperationDynamicsMapper.insert(dynamics);
|
|
|
}else{
|
|
|
//添加审批记录
|
|
|
- dynamics.setMouldId(oldData.getId());
|
|
|
+ dynamics.setMouldId(oldData.getModelId());
|
|
|
dynamics.setBelongType(oldData.getBlongType());
|
|
|
dynamics.setFileId(oldData.getId());
|
|
|
if (null != oldData.getFileName2()) {
|