Merge branch 'uat-examination' into 'uat'
项目增加阶段字段 See merge request eshop/biz_service_ebtp_project!53
This commit is contained in:
@ -247,7 +247,11 @@ public class ProjectRecord extends BaseEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "业务状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 业务模块
|
||||
*/
|
||||
@ApiModelProperty(value = "业务模块")
|
||||
private Integer businessModule;
|
||||
/**
|
||||
* 系统标识:0-采购 1-工作台 2-工作台合并
|
||||
*/
|
||||
|
@ -258,17 +258,17 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
ProjectRecord projectRecord = this.getById(id);
|
||||
boolean isReviewMethod = isReviewMethod(projectRecord);
|
||||
|
||||
int businessModule = isReviewMethod ? ProjectCommonUtil.BUSINESS_MODULE_2:ProjectCommonUtil.BUSINESS_MODULE_7;
|
||||
//修改项目信息
|
||||
UpdateWrapper<ProjectRecord> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("status", ProjectCommonUtil.PROJECT_STATUS_1);
|
||||
updateWrapper.eq("id",id);
|
||||
updateWrapper.set("status",ProjectCommonUtil.PROJECT_STATUS_2);
|
||||
|
||||
updateWrapper.set("business_mode", businessModule);
|
||||
|
||||
boolean result = this.update(updateWrapper);
|
||||
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_NOT_UPDATE.customValid(!result);
|
||||
|
||||
int businessModule = isReviewMethod ? ProjectCommonUtil.BUSINESS_MODULE_2:ProjectCommonUtil.BUSINESS_MODULE_7;
|
||||
//修改标段信息
|
||||
UpdateWrapper<ProjectSection> sectionUpdateWrapper = new UpdateWrapper<>();
|
||||
sectionUpdateWrapper.eq("project_id", id);
|
||||
@ -696,8 +696,10 @@ public class ProjectRecordServiceImpl extends BaseServiceImpl<ProjectRecordMappe
|
||||
|
||||
if(isAuctionMethod){
|
||||
record.setStatus(ProjectCommonUtil.PROJECT_STATUS_2);
|
||||
record.setBusinessModule(ProjectCommonUtil.BUSINESS_MODULE_7);
|
||||
}else{
|
||||
record.setStatus(ProjectCommonUtil.PROJECT_STATUS_0);
|
||||
record.setBusinessModule(ProjectCommonUtil.BUSINESS_MODULE_1);
|
||||
}
|
||||
|
||||
record.setEntrustId(expand.getEntrustId());
|
||||
|
@ -202,6 +202,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
sectionFlowService.saveSectionList(sectionIds,ProjectCommonUtil.BUSINESS_MODULE_2,ProjectCommonUtil.BUSINESS_MODULE_3);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionIds, ProjectCommonUtil.BUSINESS_MODULE_3);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -220,6 +223,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_3,ProjectCommonUtil.BUSINESS_MODULE_4);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_4);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -239,6 +245,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_4,ProjectCommonUtil.BUSINESS_MODULE_5);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_5);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -256,6 +265,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_5,ProjectCommonUtil.BUSINESS_MODULE_6);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_6);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -290,6 +302,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
boolean isReviewMethod = false;
|
||||
recordService.initialize(section.getProjectId(), isReviewMethod, sectionMaps);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_7);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -309,6 +324,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
sectionFlowService.saveSectionList(sectionIds,ProjectCommonUtil.BUSINESS_MODULE_7,ProjectCommonUtil.BUSINESS_MODULE_8);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionIds, ProjectCommonUtil.BUSINESS_MODULE_8);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -326,6 +344,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_8,ProjectCommonUtil.BUSINESS_MODULE_9);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_9);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -346,6 +367,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_9,ProjectCommonUtil.BUSINESS_MODULE_10);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_10);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -363,6 +387,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_10,ProjectCommonUtil.BUSINESS_MODULE_11);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_11);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -379,6 +406,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_11,ProjectCommonUtil.BUSINESS_MODULE_12);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_12);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -395,6 +425,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_11,ProjectCommonUtil.BUSINESS_MODULE_10);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_10);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -411,6 +444,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
saveSectionFlow(sectionId,ProjectCommonUtil.BUSINESS_MODULE_11,ProjectCommonUtil.BUSINESS_MODULE_8);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionId, ProjectCommonUtil.BUSINESS_MODULE_8);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -606,6 +642,9 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
|
||||
sectionFlowService.saveSectionList(sectionIds,ProjectCommonUtil.BUSINESS_MODULE_6,ProjectCommonUtil.BUSINESS_MODULE_7);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionIds, ProjectCommonUtil.BUSINESS_MODULE_7);
|
||||
|
||||
//初始化评审室信息
|
||||
//1 获取标段信息
|
||||
LambdaQueryWrapper<ProjectSection> sectionQueryWrapper = Wrappers.lambdaQuery();
|
||||
@ -645,6 +684,10 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_PROJECT_SECTION_UPDATE_MODULE.customValid(!result);
|
||||
|
||||
sectionFlowService.saveSectionList(sectionIds,ProjectCommonUtil.BUSINESS_MODULE_11,ProjectCommonUtil.BUSINESS_MODULE_12);
|
||||
|
||||
//修改项目状态
|
||||
this.updateProjectBusinessMode(sectionIds, ProjectCommonUtil.BUSINESS_MODULE_12);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -752,4 +795,20 @@ public class ProjectSectionServiceImpl extends BaseServiceImpl<ProjectSectionMap
|
||||
//项目异常查看
|
||||
return projectSectionMapper.selectEditSectionBySelect(projectId,exceptionId);
|
||||
}
|
||||
|
||||
//根据包阶段信息 修改项目阶段信息
|
||||
//只增涨,不回退
|
||||
private void updateProjectBusinessMode(List<String> sectionIds, int businessMode) {
|
||||
if (!sectionIds.isEmpty()) {
|
||||
ProjectRecord project = recordService.getById(sectionIds.stream().findFirst().get());
|
||||
if (Objects.isNull(project.getBusinessModule()) || project.getBusinessModule() < businessMode) {
|
||||
boolean b = recordService.updateById(new ProjectRecord().setId(project.getId()).setBusinessModule(businessMode));
|
||||
ProjectExceptionEnum.FRAME_EXCEPTION_NOTIFICATION_MESSAGE.customValidName("项目阶段更新失败", !b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateProjectBusinessMode(String sectionId, int businessMode) {
|
||||
this.updateProjectBusinessMode(Collections.singletonList(sectionId), businessMode);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user