|
|
@@ -111,6 +111,7 @@ public class QxProjectManage { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public synchronized void submitPurchaseRecord(QxPurchaseRecordReq req) { |
|
|
|
QxProject project = qxProjectService.getById(req.getProjectId()); |
|
|
|
if (!QxProjectStatus.DECLARED.eq(project.getStatus())) { |
|
|
@@ -122,8 +123,12 @@ public class QxProjectManage { |
|
|
|
} |
|
|
|
BeanUtil.copyProperties(req, purchase); |
|
|
|
qxPurchaseService.saveOrUpdate(purchase); |
|
|
|
qxProjectService.update(Wrappers.lambdaUpdate(QxProject.class) |
|
|
|
.set(QxProject::getStatus, QxProjectStatus.PURCHASED.getCode()) |
|
|
|
.eq(QxProject::getId, req.getProjectId())); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void submitAcceptRecord(QxAcceptRecordReq req) { |
|
|
|
QxProject project = qxProjectService.getById(req.getProjectId()); |
|
|
|
if (!QxProjectStatus.UPGRADED.eq(project.getStatus())) { |
|
|
@@ -138,8 +143,12 @@ 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())); |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void submitUpgradeRecord(QxUpgradeRecordReq req) { |
|
|
|
QxProject project = qxProjectService.getById(req.getProjectId()); |
|
|
|
if (!QxProjectStatus.PURCHASED.eq(project.getStatus())) { |
|
|
@@ -153,6 +162,9 @@ 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())); |
|
|
|
} |
|
|
|
|
|
|
|
public QxProjectDetailVO getProjectDetail(Long projectId) { |
|
|
|