|
|
|
|
|
|
5
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
|
5
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostCount;
|
|
6
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPartMissingInfo;
|
6
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostPartMissingInfo;
|
|
7
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostStandardVersion;
|
7
|
import com.zzsmart.qomo.kn.cost.manage.entity.AppSceneCostStandardVersion;
|
|
|
|
8
|
+import com.zzsmart.qomo.kn.cost.manage.enums.CostCountStatusEnum;
|
|
8
|
import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostCountMapper;
|
9
|
import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostCountMapper;
|
|
9
|
import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostPartMissingInfoMapper;
|
10
|
import com.zzsmart.qomo.kn.cost.manage.mapper.AppSceneCostPartMissingInfoMapper;
|
|
10
|
import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostCountService;
|
11
|
import com.zzsmart.qomo.kn.cost.manage.service.IAppSceneCostCountService;
|
|
|
|
|
|
|
103
|
boolean save = costStandardVersionService.save(costStandardVersion);
|
104
|
boolean save = costStandardVersionService.save(costStandardVersion);
|
|
104
|
//2.新增标准成本计算任务,并立即执行标准成本计算
|
105
|
//2.新增标准成本计算任务,并立即执行标准成本计算
|
|
105
|
if (save) {
|
106
|
if (save) {
|
|
106
|
- AppSceneCostCount appSceneCostCount1 = AppSceneCostCount.builder().materialNo(appSceneCostCount.getMaterialNo()).drawingNo(appSceneCostCount.getDrawingNo()).stage(appSceneCostCount.getStage()).flowDefinitionId(appSceneCostCount.getFlowDefinitionId()).year(appSceneCostCount.getYear()).costVersion(costStandardVersion.getVersionNumber()).status(0).createTime(new Date()).build();
|
|
|
|
|
|
107
|
+ AppSceneCostCount appSceneCostCount1 = AppSceneCostCount.builder().materialNo(appSceneCostCount.getMaterialNo()).drawingNo(appSceneCostCount.getDrawingNo()).stage(appSceneCostCount.getStage()).flowDefinitionId(appSceneCostCount.getFlowDefinitionId()).year(appSceneCostCount.getYear()).costVersion(costStandardVersion.getVersionNumber()).status(CostCountStatusEnum.Executing.getValue()).createTime(new Date()).build();
|
|
107
|
boolean flag = save(appSceneCostCount1);
|
108
|
boolean flag = save(appSceneCostCount1);
|
|
108
|
if (flag) {
|
109
|
if (flag) {
|
|
|
|
110
|
+ //发送更新成本计算状态的队列消息(队列名:updateCostCountStatus)
|
|
|
|
111
|
+
|
|
109
|
//执行标准成本计算
|
112
|
//执行标准成本计算
|
|
110
|
executeStandardCost(appSceneCostCount1.getId(), appSceneCostCount1.getFlowDefinitionId());
|
113
|
executeStandardCost(appSceneCostCount1.getId(), appSceneCostCount1.getFlowDefinitionId());
|
|
111
|
//TODO 新增部件缺失信息记录
|
114
|
//TODO 新增部件缺失信息记录
|