|
|
@@ -485,34 +485,39 @@ public class PurchaseManage { |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public synchronized void submitTestValidInfo(TestValidInfoReq req) { |
|
|
|
Purchase purchase = purchaseService.getById(req.getBidId()); |
|
|
|
if (TenderTestValidStatusEnum.WITHOUT_TEST_VALID_INFO.eq(purchase.getTestValidStatus()) |
|
|
|
&& TenderTestValidStatusEnum.TEST_VALID_INFO_FAILED.eq(purchase.getTestValidStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交测试验证信息"); |
|
|
|
} |
|
|
|
List<Purchase> purchases = purchaseService.listByIds(req.getBidIds()); |
|
|
|
purchases.forEach(purchase -> { |
|
|
|
if (TenderTestValidStatusEnum.WITHOUT_TEST_VALID_INFO.eq(purchase.getTestValidStatus()) |
|
|
|
&& TenderTestValidStatusEnum.TEST_VALID_INFO_FAILED.eq(purchase.getTestValidStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交测试验证信息"); |
|
|
|
} |
|
|
|
}); |
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
ProjectProcessStageEnum instType = ProjectProcessStageEnum.TEST_VALID; |
|
|
|
WflowModels model = processModelManage.getWflowModels(instType, user.getMhUnitId()); |
|
|
|
if (Objects.isNull(model)) { |
|
|
|
throw new BusinessException("找不到测试验证流程配置"); |
|
|
|
} |
|
|
|
Project project = projectService.getNewProject(purchase.getProjectId()); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getActualTestValidTime, req.getActualTime()) |
|
|
|
.set(Operation::getTestValidFiles, req.getFiles()) |
|
|
|
.set(Operation::getTestValidRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, req.getBidId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(req.getBidId(), instanceId, project.getId(), instType); |
|
|
|
for (Purchase purchase : purchases) { |
|
|
|
Long projectId = purchase.getProjectId(); |
|
|
|
Project project = projectService.getNewProject(projectId); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getActualTestValidTime, req.getActualTime()) |
|
|
|
.set(Operation::getTestValidFiles, req.getFiles()) |
|
|
|
.set(Operation::getTestValidRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(purchase.getId(), instanceId, project.getId(), instType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void saveProjectPurchaseInstCode(Long bidId, |
|
|
@@ -536,10 +541,12 @@ public class PurchaseManage { |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public synchronized void submitSelfTestInfo(TestValidInfoReq req) { |
|
|
|
Purchase purchase = purchaseService.getById(req.getBidId()); |
|
|
|
if (TenderSelfTestStatusEnum.WITHOUT_SELF_TEST_INFO.eq(purchase.getSelfTestStatus()) |
|
|
|
&& TenderSelfTestStatusEnum.SELF_TEST_INFO_FAILED.eq(purchase.getSelfTestStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交系统自测信息"); |
|
|
|
List<Purchase> purchases = purchaseService.listByIds(req.getBidIds()); |
|
|
|
for (Purchase purchase : purchases) { |
|
|
|
if (TenderSelfTestStatusEnum.WITHOUT_SELF_TEST_INFO.eq(purchase.getSelfTestStatus()) |
|
|
|
&& TenderSelfTestStatusEnum.SELF_TEST_INFO_FAILED.eq(purchase.getSelfTestStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交系统自测信息"); |
|
|
|
} |
|
|
|
} |
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
ProjectProcessStageEnum instType = ProjectProcessStageEnum.SELF_TEST; |
|
|
@@ -547,31 +554,36 @@ public class PurchaseManage { |
|
|
|
if (Objects.isNull(model)) { |
|
|
|
throw new BusinessException("找不到系统自测流程配置"); |
|
|
|
} |
|
|
|
Project project = projectService.getNewProject(purchase.getProjectId()); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getSelfTestTime, req.getActualTime()) |
|
|
|
.set(Operation::getSelfTestFiles, req.getFiles()) |
|
|
|
.set(Operation::getSelfTestRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, req.getBidId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(req.getBidId(), instanceId, project.getId(), instType); |
|
|
|
for (Purchase purchase : purchases) { |
|
|
|
Long projectId = purchase.getProjectId(); |
|
|
|
Project project = projectService.getNewProject(projectId); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getSelfTestTime, req.getActualTime()) |
|
|
|
.set(Operation::getSelfTestFiles, req.getFiles()) |
|
|
|
.set(Operation::getSelfTestRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase.getId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(purchase.getId(), instanceId, project.getId(), instType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public synchronized void submitAdaptionInfo(TestValidInfoReq req) { |
|
|
|
Purchase purchase = purchaseService.getById(req.getBidId()); |
|
|
|
if (TenderAdaptStatusEnum.WITHOUT_ADAPT_INFO.eq(purchase.getAdaptStatus()) |
|
|
|
&& TenderAdaptStatusEnum.ADAPT_INFO_FAILED.eq(purchase.getAdaptStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交适配改造信息"); |
|
|
|
List<Purchase> purchases = purchaseService.listByIds(req.getBidIds()); |
|
|
|
for (Purchase purchase : purchases) { |
|
|
|
if (TenderAdaptStatusEnum.WITHOUT_ADAPT_INFO.eq(purchase.getAdaptStatus()) |
|
|
|
&& TenderAdaptStatusEnum.ADAPT_INFO_FAILED.eq(purchase.getAdaptStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交适配改造信息"); |
|
|
|
} |
|
|
|
} |
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
ProjectProcessStageEnum instType = ProjectProcessStageEnum.ADAPTION; |
|
|
@@ -579,23 +591,26 @@ public class PurchaseManage { |
|
|
|
if (Objects.isNull(model)) { |
|
|
|
throw new BusinessException("找不到适配改造流程配置"); |
|
|
|
} |
|
|
|
Project project = projectService.getNewProject(purchase.getProjectId()); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getAdaptationTime, req.getActualTime()) |
|
|
|
.set(Operation::getAdaptionFiles, req.getFiles()) |
|
|
|
.set(Operation::getAdaptionRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, req.getBidId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(req.getBidId(), instanceId, project.getId(), instType); |
|
|
|
for (Purchase purchase : purchases) { |
|
|
|
Long projectId = purchase.getProjectId(); |
|
|
|
Project project = projectService.getNewProject(projectId); |
|
|
|
ProcessStartParamsVo instParam = new ProcessStartParamsVo(); |
|
|
|
instParam.setUser(declaredProjectManage.buildUser(user)); |
|
|
|
instParam.setProcessUsers(Collections.emptyMap()); |
|
|
|
instParam.setFormData(Collections.emptyMap()); |
|
|
|
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 |
|
|
|
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); |
|
|
|
String instanceId = processInstanceService.startProcessLs(model, instParam, orgMap); |
|
|
|
Wrapper<Operation> update = Wrappers.lambdaUpdate(Operation.class) |
|
|
|
.set(Operation::getAdaptationTime, req.getActualTime()) |
|
|
|
.set(Operation::getAdaptionFiles, req.getFiles()) |
|
|
|
.set(Operation::getAdaptionRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase.getId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(purchase.getId(), instanceId, project.getId(), instType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |