|
|
@@ -132,9 +132,14 @@ public class QxProjectManage { |
|
|
|
} |
|
|
|
BeanUtil.copyProperties(req, purchase); |
|
|
|
qxPurchaseService.saveOrUpdate(purchase); |
|
|
|
updateQxProjectStatus(QxProjectStatus.PURCHASED, req.getProjectId()); |
|
|
|
} |
|
|
|
|
|
|
|
private void updateQxProjectStatus(QxProjectStatus status, Long id) { |
|
|
|
qxProjectService.update(Wrappers.lambdaUpdate(QxProject.class) |
|
|
|
.set(QxProject::getStatus, QxProjectStatus.PURCHASED.getCode()) |
|
|
|
.eq(QxProject::getId, req.getProjectId())); |
|
|
|
.set(QxProject::getUpdateOn, LocalDateTime.now()) |
|
|
|
.set(QxProject::getStatus, status.getCode()) |
|
|
|
.eq(QxProject::getId, id)); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@@ -152,9 +157,7 @@ public class QxProjectManage { |
|
|
|
.set(QxPurchase::getUpdateOn, LocalDateTime.now()) |
|
|
|
.set(QxPurchase::getUpdateBy, LoginUserUtil.getUserId()); |
|
|
|
qxPurchaseService.update(update); |
|
|
|
qxProjectService.update(Wrappers.lambdaUpdate(QxProject.class) |
|
|
|
.set(QxProject::getStatus, QxProjectStatus.ACCEPTED.getCode()) |
|
|
|
.eq(QxProject::getId, req.getProjectId())); |
|
|
|
updateQxProjectStatus(QxProjectStatus.ACCEPTED, req.getProjectId()); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@@ -171,9 +174,7 @@ public class QxProjectManage { |
|
|
|
projectSystemReplaceInfos.add(qxReplaceInfo); |
|
|
|
} |
|
|
|
qxProjectSystemReplaceInfosService.updateBatchById(projectSystemReplaceInfos); |
|
|
|
qxProjectService.update(Wrappers.lambdaUpdate(QxProject.class) |
|
|
|
.set(QxProject::getStatus, QxProjectStatus.UPGRADED.getCode()) |
|
|
|
.eq(QxProject::getId, req.getProjectId())); |
|
|
|
updateQxProjectStatus(QxProjectStatus.UPGRADED, req.getProjectId()); |
|
|
|
} |
|
|
|
|
|
|
|
public QxProjectDetailVO getProjectDetail(Long projectId) { |
|
|
|