|
|
@@ -16,9 +16,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum; |
|
|
|
import com.hz.pm.api.common.helper.UserInfoHelper; |
|
|
|
import com.hz.pm.api.common.statemachine.util.StateMachineUtil; |
|
|
|
import com.hz.pm.api.common.statemachine.util.TenderStateMachineUtil; |
|
|
|
import com.hz.pm.api.common.statemachine.util.TestValidStateMachineUtil; |
|
|
|
import com.hz.pm.api.common.statemachine.util.*; |
|
|
|
import com.hz.pm.api.common.util.BizUtils; |
|
|
|
import com.hz.pm.api.common.util.ExcelDownUtil; |
|
|
|
import com.hz.pm.api.common.util.ExcelExportStyle; |
|
|
@@ -115,6 +113,8 @@ public class PurchaseManage { |
|
|
|
private final DefaultDeclaredProjectManage declaredProjectManage; |
|
|
|
private final ProcessInstanceService processInstanceService; |
|
|
|
private final TestValidStateMachineUtil testValidStateMachineUtil; |
|
|
|
private final SelfTestStateMachineUtil selfTestStateMachineUtil; |
|
|
|
private final AdaptStateMachineUtil adaptStateMachineUtil; |
|
|
|
private final IPurchaseInstService purchaseInstService; |
|
|
|
private final IProjectInstService projectInstService; |
|
|
|
|
|
|
@@ -487,8 +487,8 @@ public class PurchaseManage { |
|
|
|
public synchronized void submitTestValidInfo(TestValidInfoReq req) { |
|
|
|
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())) { |
|
|
|
if (!TenderTestValidStatusEnum.WITHOUT_TEST_VALID_INFO.eq(purchase.getTestValidStatus()) |
|
|
|
&& !TenderTestValidStatusEnum.TEST_VALID_INFO_FAILED.eq(purchase.getTestValidStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交测试验证信息"); |
|
|
|
} |
|
|
|
}); |
|
|
@@ -512,7 +512,7 @@ public class PurchaseManage { |
|
|
|
.set(Operation::getActualTestValidTime, req.getActualTime()) |
|
|
|
.set(Operation::getTestValidFiles, req.getFiles()) |
|
|
|
.set(Operation::getTestValidRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase); |
|
|
|
.eq(Operation::getBidId, purchase.getId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
@@ -543,8 +543,8 @@ public class PurchaseManage { |
|
|
|
public synchronized void submitSelfTestInfo(TestValidInfoReq req) { |
|
|
|
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())) { |
|
|
|
if (!TenderSelfTestStatusEnum.WITHOUT_SELF_TEST_INFO.eq(purchase.getSelfTestStatus()) |
|
|
|
&& !TenderSelfTestStatusEnum.SELF_TEST_INFO_FAILED.eq(purchase.getSelfTestStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交系统自测信息"); |
|
|
|
} |
|
|
|
} |
|
|
@@ -569,7 +569,7 @@ public class PurchaseManage { |
|
|
|
.set(Operation::getSelfTestFiles, req.getFiles()) |
|
|
|
.set(Operation::getSelfTestRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase.getId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
selfTestStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(purchase.getId(), instanceId, project.getId(), instType); |
|
|
@@ -580,8 +580,8 @@ public class PurchaseManage { |
|
|
|
public synchronized void submitAdaptionInfo(TestValidInfoReq req) { |
|
|
|
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())) { |
|
|
|
if (!TenderAdaptStatusEnum.WITHOUT_ADAPT_INFO.eq(purchase.getAdaptStatus()) |
|
|
|
&& !TenderAdaptStatusEnum.ADAPT_INFO_FAILED.eq(purchase.getAdaptStatus())) { |
|
|
|
throw BizException.wrap("该状态下不支持提交适配改造信息"); |
|
|
|
} |
|
|
|
} |
|
|
@@ -606,7 +606,7 @@ public class PurchaseManage { |
|
|
|
.set(Operation::getAdaptionFiles, req.getFiles()) |
|
|
|
.set(Operation::getAdaptionRemark, req.getRemark()) |
|
|
|
.eq(Operation::getBidId, purchase.getId()); |
|
|
|
testValidStateMachineUtil.pass(purchase); |
|
|
|
adaptStateMachineUtil.pass(purchase); |
|
|
|
purchaseService.updateById(purchase); |
|
|
|
operationService.update(update); |
|
|
|
saveProjectPurchaseInstCode(purchase.getId(), instanceId, project.getId(), instType); |
|
|
|