Просмотр исходного кода

退回和应用匹配版本号

master
PoffyZhang 1 год назад
Родитель
Сommit
6bbc328ee4
1 измененных файлов: 16 добавлений и 1 удалений
  1. +16
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 16
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Просмотреть файл

@@ -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();



Загрузка…
Отмена
Сохранить