Browse Source

modify:

1. 单位查询修改;
tags/24090101
WendyYang 4 months ago
parent
commit
9bcde9f54d
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectManage.java

+ 12
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/QxProjectManage.java View File

@@ -111,6 +111,7 @@ public class QxProjectManage {
} }
} }


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


Loading…
Cancel
Save