|
|
@@ -1037,7 +1037,7 @@ public class GovProjectCollectionManage { |
|
|
|
// pushProject(saveDTO); |
|
|
|
//如果是草稿箱来的 就要删除 |
|
|
|
if(Objects.nonNull(saveDTO.getDraftId())){ |
|
|
|
draftService.removeById(saveDTO.getDraftId()); |
|
|
|
operationProjectDraftService.removeById(saveDTO.getDraftId()); |
|
|
|
} |
|
|
|
|
|
|
|
return BizConst.SAVE_SUCCESS; |
|
|
@@ -1162,6 +1162,103 @@ public class GovProjectCollectionManage { |
|
|
|
return BizConst.SAVE_SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
public String operationDraft(GovBizProjectSaveDTO saveDTO, UserInfoDetails user) { |
|
|
|
if(Objects.isNull(user)){ |
|
|
|
user = LoginUserUtil.loginUserDetail(); |
|
|
|
} |
|
|
|
|
|
|
|
GovOperationProjectDraft draft = new GovOperationProjectDraft(); |
|
|
|
//草稿id |
|
|
|
Long draftId = saveDTO.getDraftId(); |
|
|
|
String baseAreaCode = user.getRegionCode() + BizConst.NINE_AREA_CODE_LAST; |
|
|
|
if(Objects.nonNull(draftId)){ |
|
|
|
GovBizProjectDraft oldDraft = draftService.getById(draftId); |
|
|
|
VUtils.isTrue(Objects.isNull(oldDraft)).throwMessage("该草稿不存在!"); |
|
|
|
draft.setId(draftId); |
|
|
|
}else{ |
|
|
|
draft.setTongTime(LocalDateTime.now()); |
|
|
|
draft.setBaseAreaCode(baseAreaCode); |
|
|
|
draft.setCreateId(user.getUserId()); |
|
|
|
draft.setTongTime(LocalDateTime.now()); |
|
|
|
} |
|
|
|
|
|
|
|
//1.保存基本信息 |
|
|
|
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo(); |
|
|
|
String baseProjId = base.getBaseProjId(); |
|
|
|
String baseProjName = base.getBaseProjName(); |
|
|
|
//要生成 草稿的项目编号 |
|
|
|
if(StringUtils.isBlank(baseProjId)){ |
|
|
|
baseProjId = BizProjectContant.ProjectCollection.DRAFT; |
|
|
|
} |
|
|
|
|
|
|
|
// 2.保存 申报信息 |
|
|
|
GovBizProjectApplyDTO apply = saveDTO.getApply(); |
|
|
|
BeanUtil.copyProperties(apply, draft, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
|
|
|
|
// 3.保存 审批信息 |
|
|
|
GovBizProjectApproveDTO approve = saveDTO.getApprove(); |
|
|
|
BeanUtil.copyProperties(approve, draft, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
|
|
|
|
// 4.保存 建设项目 实施信息 |
|
|
|
GovBizProjectCimplementDTO cimplement = saveDTO.getCimplement(); |
|
|
|
if(Objects.nonNull(cimplement)){ |
|
|
|
BeanUtil.copyProperties(cimplement, draft, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
draft.setBaseBidCode(baseProjId + "-1"); |
|
|
|
draft.setBaseChanFileCimplement(cimplement.getBaseChanFile()); |
|
|
|
draft.setBaseLogAggregationCimplement(cimplement.getBaseLogAggregation()); |
|
|
|
draft.setBaseBusinessMetricsCimplement(cimplement.getBaseBusinessMetrics()); |
|
|
|
draft.setBaseEstaSummFileCimplement(cimplement.getBaseEstaSummFile()); |
|
|
|
draft.setBaseInforLevelFileCimplement(cimplement.getBaseInforLevelFile()); |
|
|
|
draft.setBaseEngineerPostpoFileCimplement(cimplement.getBaseEngineerPostpoFile()); |
|
|
|
draft.setBaseUserConsFileCimplement(cimplement.getBaseUserConsFile()); |
|
|
|
draft.setBasePasswAssessFileCimplement(cimplement.getBasePasswAssessFile()); |
|
|
|
draft.setBaseThirdAcceptFileCimplement(cimplement.getBaseThirdAcceptFile()); |
|
|
|
draft.setBaseFinalExpertOpinionFileCimplement(cimplement.getBaseFinalExpertOpinionFile()); |
|
|
|
} |
|
|
|
|
|
|
|
// 5.保存 运维项目 实施信息 |
|
|
|
GovBizProjectMimplementDTO mimplement = saveDTO.getMimplement(); |
|
|
|
if(Objects.nonNull(mimplement)){ |
|
|
|
BeanUtil.copyProperties(mimplement, draft, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
draft.setBaseLogAggregationMimplement(mimplement.getBaseLogAggregation()); |
|
|
|
draft.setBaseBusinessMetricsMimplement(mimplement.getBaseBusinessMetrics()); |
|
|
|
draft.setBaseChanFileMimplement(mimplement.getBaseChanFile()); |
|
|
|
draft.setBaseEstaSummFileMimplement(mimplement.getBaseEstaSummFile()); |
|
|
|
draft.setBaseInforLevelFileMimplement(mimplement.getBaseInforLevelFile()); |
|
|
|
draft.setBaseEngineerPostpoFileMimplement(mimplement.getBaseEngineerPostpoFile()); |
|
|
|
draft.setBaseThirdAcceptFileMimplement(mimplement.getBaseThirdAcceptFile()); |
|
|
|
draft.setBaseUserConsFileMimplement(mimplement.getBaseUserConsFile()); |
|
|
|
draft.setBaseFinalExpertOpinionFileMimplement(mimplement.getBaseFinalExpertOpinionFile()); |
|
|
|
draft.setBasePasswAssessFileMimplement(mimplement.getBasePasswAssessFile()); |
|
|
|
} |
|
|
|
|
|
|
|
// 6.保存 采购信息 |
|
|
|
List<GovBizProjectProcureDTO> procures = saveDTO.getProcures(); |
|
|
|
if(Objects.nonNull(procures)){ |
|
|
|
draft.setProcure(JSON.toJSONString(procures)); |
|
|
|
} |
|
|
|
|
|
|
|
//最后再保存 基本信息 |
|
|
|
BeanUtil.copyProperties(base, draft, CopyOptions.create() |
|
|
|
.setIgnoreError(Boolean.TRUE).setIgnoreNullValue(Boolean.TRUE)); |
|
|
|
draft.setBaseProjId(baseProjId); |
|
|
|
draft.setBaseProjName(baseProjName); |
|
|
|
draft.setIsEffective(BizProjectContant.ProjectCollection.IS_EFFECTIVE); |
|
|
|
draft.setAreaCode(RegionConst.RC_LS); |
|
|
|
draft.setBizTime(LocalDateTime.now()); |
|
|
|
draft.setUpdateBy(user.getUsername()); |
|
|
|
draft.setUpdateOn(LocalDateTime.now()); |
|
|
|
draft.setOp(BizProjectContant.ProjectCollection.OP_INSERT); |
|
|
|
|
|
|
|
operationProjectDraftService.saveOrUpdate(draft); |
|
|
|
|
|
|
|
return BizConst.SAVE_SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除项目归集 |
|
|
|
* @param projId |
|
|
@@ -1222,6 +1319,13 @@ public class GovProjectCollectionManage { |
|
|
|
return BizConst.OP_FAIL; |
|
|
|
} |
|
|
|
|
|
|
|
public String operationDraftRemove(Long draftId) { |
|
|
|
if(operationProjectDraftService.removeById(draftId)){ |
|
|
|
return BizConst.OP_SUCCESS; |
|
|
|
} |
|
|
|
return BizConst.OP_FAIL; |
|
|
|
} |
|
|
|
|
|
|
|
private void checkName(String baseProjName, String baseProjId) { |
|
|
|
VUtils.isTrue(baseinfoService.count(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
|
.eq(GovBizProjectBaseinfo::getBaseProjName,baseProjName) |
|
|
|