|
|
@@ -1091,6 +1091,22 @@ public class TodoCenterManage { |
|
|
|
project.setUpdateOn(LocalDateTime.now()); |
|
|
|
projectService.save(project); |
|
|
|
|
|
|
|
ProjectInst oldInst = projectInstService.getOne(Wrappers.lambdaUpdate(ProjectInst.class) |
|
|
|
.eq(ProjectInst::getProjectId, oldProject.getId()) |
|
|
|
.eq(ProjectInst::getInstCode, oldProject.getInstCode())); |
|
|
|
|
|
|
|
String instCode = oldProject.getInstCode(); |
|
|
|
oldInst.setInstCode("EMPTY"); |
|
|
|
projectInstService.updateById(oldInst); |
|
|
|
|
|
|
|
ProjectInst newPi = new ProjectInst(); |
|
|
|
newPi.setProjectId(project.getId()); |
|
|
|
newPi.setInstType(oldInst.getInstType()); |
|
|
|
newPi.setInstCode(instCode); |
|
|
|
newPi.setCreatOn(LocalDateTime.now()); |
|
|
|
newPi.setUpdateOn(LocalDateTime.now()); |
|
|
|
projectInstService.save(newPi); |
|
|
|
|
|
|
|
projectService.update(Wrappers.lambdaUpdate(Project.class) |
|
|
|
.set(Project::getNewest,Boolean.FALSE) |
|
|
|
.ne(Project::getId,project.getId()) |
|
|
@@ -1101,7 +1117,6 @@ public class TodoCenterManage { |
|
|
|
? Boolean.TRUE : Boolean.FALSE; |
|
|
|
Long projectDtoId = projectDto.getId(); |
|
|
|
Project projectInfo = projectService.getById(projectDtoId); |
|
|
|
String instCode = projectInfo.getInstCode(); |
|
|
|
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class).eq(ProjectInst::getInstCode, instCode)); |
|
|
|
Integer instType = projectInst.getInstType(); |
|
|
|
|
|
|
|