|
@@ -1,6 +1,7 @@ |
|
|
package com.ningdatech.pmapi.gov.manage; |
|
|
package com.ningdatech.pmapi.gov.manage; |
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
|
|
import cn.hutool.core.bean.copier.CopyOptions; |
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
@@ -71,6 +72,8 @@ public class GovProjectCollectionManage { |
|
|
|
|
|
|
|
|
private final GenerateProjectCodeUtil generateProjectCodeUtil; |
|
|
private final GenerateProjectCodeUtil generateProjectCodeUtil; |
|
|
|
|
|
|
|
|
|
|
|
private final IGovBizProjectDraftService draftService; |
|
|
|
|
|
|
|
|
private final RestTemplate restTemplate; |
|
|
private final RestTemplate restTemplate; |
|
|
|
|
|
|
|
|
@Value("${project.push-url}") |
|
|
@Value("${project.push-url}") |
|
@@ -152,6 +155,48 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* 草稿箱列表 |
|
|
|
|
|
* @param req |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public PageVo<GovBizProjectListVO> draftList(ProjectListReq req) { |
|
|
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
|
|
Page<GovBizProjectDraft> page = req.page(); |
|
|
|
|
|
LambdaQueryWrapper<GovBizProjectDraft> wrapper = Wrappers.lambdaQuery(GovBizProjectDraft.class) |
|
|
|
|
|
.like(StringUtils.isNotBlank(req.getProjectName()),GovBizProjectDraft::getBaseProjName,req.getProjectName()) |
|
|
|
|
|
.like(StringUtils.isNotBlank(req.getBuildOrg()),GovBizProjectDraft::getBaseBuildDeprt,req.getBuildOrg()) |
|
|
|
|
|
.eq(StringUtils.isNotBlank(req.getAreaCode()),GovBizProjectDraft::getBaseAreaCode,req.getAreaCode() + BizConst.NINE_AREA_CODE_LAST) |
|
|
|
|
|
.eq(StringUtils.isNotBlank(req.getRegionCode()),GovBizProjectDraft::getBaseAreaCode,req.getRegionCode() + BizConst.NINE_AREA_CODE_LAST) |
|
|
|
|
|
.gt(Objects.nonNull(req.getCreateOnMin()),GovBizProjectDraft::getTongTime,req.getCreateOnMin()) |
|
|
|
|
|
.le(Objects.nonNull(req.getCreateOnMax()),GovBizProjectDraft::getTongTime,req.getCreateOnMax()) |
|
|
|
|
|
.eq(GovBizProjectDraft::getDeleted,Boolean.FALSE) |
|
|
|
|
|
.eq(GovBizProjectDraft::getCreateId,user.getUserId()) |
|
|
|
|
|
.orderByDesc(GovBizProjectDraft::getBizTime); |
|
|
|
|
|
draftService.page(page,wrapper); |
|
|
|
|
|
|
|
|
|
|
|
if(CollUtil.isEmpty(page.getRecords())){ |
|
|
|
|
|
return PageVo.empty(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<GovBizProjectListVO> res = page.getRecords().stream().map(p -> { |
|
|
|
|
|
GovBizProjectListVO vo = new GovBizProjectListVO(); |
|
|
|
|
|
vo.setBaseAreaCode(p.getBaseAreaCode()); |
|
|
|
|
|
vo.setBaseAreaName(p.getBaseAreaName()); |
|
|
|
|
|
vo.setBaseBuildDeprt(p.getBaseBuildDeprt()); |
|
|
|
|
|
vo.setBaseBuildDeprtDing(p.getBaseBuildDeprtDing()); |
|
|
|
|
|
vo.setBaseProjId(p.getBaseProjId()); |
|
|
|
|
|
vo.setBaseProjName(p.getBaseProjName()); |
|
|
|
|
|
vo.setBaseProjDeclAmount(p.getBaseProjDeclAmount()); |
|
|
|
|
|
vo.setBaseProjTotalAmount(p.getBaseProjTotalAmount()); |
|
|
|
|
|
vo.setBaseProjSetYear(p.getBaseProjSetYear()); |
|
|
|
|
|
vo.setDraftId(p.getId()); |
|
|
|
|
|
return vo; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
return PageVo.of(res,page.getTotal()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
* 数据权限 |
|
|
* 数据权限 |
|
|
* @param wrapper |
|
|
* @param wrapper |
|
|
*/ |
|
|
*/ |
|
@@ -250,20 +295,85 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* 草稿箱详情 |
|
|
|
|
|
* @param draftId |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public GovBizProjectDetailVO draftDetail(Long draftId) { |
|
|
|
|
|
GovBizProjectDetailVO res = new GovBizProjectDetailVO(); |
|
|
|
|
|
//查询草稿表 |
|
|
|
|
|
GovBizProjectDraft draft = draftService.getById(draftId); |
|
|
|
|
|
|
|
|
|
|
|
if(Objects.isNull(draft)){ |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//1.基本信息 |
|
|
|
|
|
res.setBaseProjId(draft.getBaseProjId()); |
|
|
|
|
|
res.setBaseProjName(draft.getBaseProjName()); |
|
|
|
|
|
res.setBaseinfo(BeanUtil.copyProperties(draft, GovBizProjectBaseinfoVO.class)); |
|
|
|
|
|
|
|
|
|
|
|
//2.申报信息 |
|
|
|
|
|
res.setApply(BeanUtil.copyProperties(draft, GovBizProjectApplyVO.class)); |
|
|
|
|
|
|
|
|
|
|
|
//3.再查 审批信息 |
|
|
|
|
|
res.setApprove(BeanUtil.copyProperties(draft, GovBizProjectApproveVO.class)); |
|
|
|
|
|
|
|
|
|
|
|
//4 对应查询 实施项目还是运维项目 |
|
|
|
|
|
GovBizProjectCimplementVO cimplementVo = BeanUtil.copyProperties(draft, GovBizProjectCimplementVO.class); |
|
|
|
|
|
cimplementVo.setBaseChanFile(draft.getBaseChanFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseEstaSummFile(draft.getBaseEstaSummFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseEngineerPostpoFile(draft.getBaseEngineerPostpoFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseInforLevelFile(draft.getBaseInforLevelFileCimplement()); |
|
|
|
|
|
cimplementVo.setBasePasswAssessFile(draft.getBasePasswAssessFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseUserConsFile(draft.getBaseUserConsFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseThirdAcceptFile(draft.getBaseThirdAcceptFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseFinalExpertOpinionFile(draft.getBaseFinalExpertOpinionFileCimplement()); |
|
|
|
|
|
cimplementVo.setBaseLogAggregation(draft.getBaseLogAggregationCimplement()); |
|
|
|
|
|
cimplementVo.setBaseBusinessMetrics(draft.getBaseBusinessMetricsCimplement()); |
|
|
|
|
|
res.setCimplement(cimplementVo); |
|
|
|
|
|
GovBizProjectMimplementVO mimplementVo = BeanUtil.copyProperties(draft, GovBizProjectMimplementVO.class); |
|
|
|
|
|
mimplementVo.setBaseChanFile(draft.getBaseChanFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseEstaSummFile(draft.getBaseEstaSummFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseEngineerPostpoFile(draft.getBaseEngineerPostpoFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseInforLevelFile(draft.getBaseInforLevelFileMimplement()); |
|
|
|
|
|
mimplementVo.setBasePasswAssessFile(draft.getBasePasswAssessFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseUserConsFile(draft.getBaseUserConsFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseThirdAcceptFile(draft.getBaseThirdAcceptFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseFinalExpertOpinionFile(draft.getBaseFinalExpertOpinionFileMimplement()); |
|
|
|
|
|
mimplementVo.setBaseLogAggregation(draft.getBaseLogAggregationMimplement()); |
|
|
|
|
|
mimplementVo.setBaseBusinessMetrics(draft.getBaseBusinessMetricsMimplement()); |
|
|
|
|
|
res.setMimplement(mimplementVo); |
|
|
|
|
|
|
|
|
|
|
|
//5.最后查询采购信息 |
|
|
|
|
|
if(StringUtils.isNotBlank(draft.getProcure())){ |
|
|
|
|
|
try{ |
|
|
|
|
|
res.setProcures(JSON.parseArray(draft.getProcure(),GovBizProjectProcureVO.class)); |
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
log.error("草稿箱采购出错:" + e.getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
* 项目归集保存 |
|
|
* 项目归集保存 |
|
|
* @param saveDTO |
|
|
* @param saveDTO |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@Transactional |
|
|
@Transactional |
|
|
public String save(GovBizProjectSaveDTO saveDTO) { |
|
|
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
|
|
|
|
|
public String save(GovBizProjectSaveDTO saveDTO,UserInfoDetails user) { |
|
|
|
|
|
if(Objects.isNull(user)){ |
|
|
|
|
|
user = LoginUserUtil.loginUserDetail(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo(); |
|
|
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo(); |
|
|
String baseProjId = base.getBaseProjId(); |
|
|
String baseProjId = base.getBaseProjId(); |
|
|
String baseAreaCode = user.getRegionCode() + BizConst.NINE_AREA_CODE_LAST; |
|
|
String baseAreaCode = user.getRegionCode() + BizConst.NINE_AREA_CODE_LAST; |
|
|
String baseProjName = base.getBaseProjName(); |
|
|
String baseProjName = base.getBaseProjName(); |
|
|
//如果是新增的话 要生成 项目编号 |
|
|
//如果是新增的话 要生成 项目编号 |
|
|
if(StringUtils.isBlank(baseProjId)){ |
|
|
|
|
|
|
|
|
if(StringUtils.isBlank(baseProjId) || BizProjectContant.ProjectCollection.DRAFT.equals(baseProjId)){ |
|
|
baseProjId = generateProjectCodeUtil.generateProjectCode(saveDTO); |
|
|
baseProjId = generateProjectCodeUtil.generateProjectCode(saveDTO); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -288,11 +398,10 @@ public class GovProjectCollectionManage { |
|
|
saveBase.setTongTime(LocalDateTime.now()); |
|
|
saveBase.setTongTime(LocalDateTime.now()); |
|
|
saveBase.setBaseAreaCode(baseAreaCode); |
|
|
saveBase.setBaseAreaCode(baseAreaCode); |
|
|
} |
|
|
} |
|
|
if(Objects.nonNull(saveBase.getBaseAreaCode())){ |
|
|
|
|
|
saveBase.setBaseAreaCode(saveBase.getBaseAreaCode() + BizConst.NINE_AREA_CODE_LAST); |
|
|
|
|
|
} |
|
|
|
|
|
saveBase.setAreaCode(RegionConst.RC_LS); |
|
|
saveBase.setAreaCode(RegionConst.RC_LS); |
|
|
saveBase.setBizTime(LocalDateTime.now()); |
|
|
saveBase.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveBase.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveBase.setUpdateOn(LocalDateTime.now()); |
|
|
baseinfoService.saveOrUpdate(saveBase); |
|
|
baseinfoService.saveOrUpdate(saveBase); |
|
|
|
|
|
|
|
|
// 2.保存 申报信息 |
|
|
// 2.保存 申报信息 |
|
@@ -313,6 +422,8 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
saveApply.setAreaCode(RegionConst.RC_LS); |
|
|
saveApply.setAreaCode(RegionConst.RC_LS); |
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveApply.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveApply.setUpdateOn(LocalDateTime.now()); |
|
|
projectApplyService.saveOrUpdate(saveApply); |
|
|
projectApplyService.saveOrUpdate(saveApply); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -334,6 +445,8 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
saveApprove.setBizTime(LocalDateTime.now()); |
|
|
saveApprove.setBizTime(LocalDateTime.now()); |
|
|
saveApprove.setAreaCode(RegionConst.RC_LS); |
|
|
saveApprove.setAreaCode(RegionConst.RC_LS); |
|
|
|
|
|
saveApprove.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveApprove.setUpdateOn(LocalDateTime.now()); |
|
|
approveService.saveOrUpdate(saveApprove); |
|
|
approveService.saveOrUpdate(saveApprove); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -356,6 +469,8 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
saveCimplement.setAreaCode(RegionConst.RC_LS); |
|
|
saveCimplement.setAreaCode(RegionConst.RC_LS); |
|
|
saveCimplement.setBizTime(LocalDateTime.now()); |
|
|
saveCimplement.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveCimplement.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveCimplement.setUpdateOn(LocalDateTime.now()); |
|
|
cimplementService.saveOrUpdate(saveCimplement); |
|
|
cimplementService.saveOrUpdate(saveCimplement); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -382,6 +497,8 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
saveMimplement.setAreaCode(RegionConst.RC_LS); |
|
|
saveMimplement.setAreaCode(RegionConst.RC_LS); |
|
|
saveMimplement.setBizTime(LocalDateTime.now()); |
|
|
saveMimplement.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveMimplement.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveMimplement.setUpdateOn(LocalDateTime.now()); |
|
|
mimplementService.saveOrUpdate(saveMimplement); |
|
|
mimplementService.saveOrUpdate(saveMimplement); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -402,6 +519,8 @@ public class GovProjectCollectionManage { |
|
|
saveProcure.setAreaCode(RegionConst.RC_LS); |
|
|
saveProcure.setAreaCode(RegionConst.RC_LS); |
|
|
saveProcure.setTongTime(LocalDateTime.now()); |
|
|
saveProcure.setTongTime(LocalDateTime.now()); |
|
|
saveProcure.setBizTime(LocalDateTime.now()); |
|
|
saveProcure.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveProcure.setUpdateBy(user.getUsername()); |
|
|
|
|
|
saveProcure.setUpdateOn(LocalDateTime.now()); |
|
|
procureService.save(saveProcure); |
|
|
procureService.save(saveProcure); |
|
|
index++; |
|
|
index++; |
|
|
} |
|
|
} |
|
@@ -414,11 +533,109 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* 暂存草稿箱 |
|
|
|
|
|
* @param saveDTO |
|
|
|
|
|
* @param user |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public String draft(GovBizProjectSaveDTO saveDTO, UserInfoDetails user) { |
|
|
|
|
|
if(Objects.isNull(user)){ |
|
|
|
|
|
user = LoginUserUtil.loginUserDetail(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GovBizProjectDraft draft = new GovBizProjectDraft(); |
|
|
|
|
|
//草稿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; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
|
|
|
|
// 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(); |
|
|
|
|
|
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(); |
|
|
|
|
|
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.setBaseFinalExpertOpinionFileCimplement(mimplement.getBaseFinalExpertOpinionFile()); |
|
|
|
|
|
|
|
|
|
|
|
// 6.保存 采购信息 |
|
|
|
|
|
List<GovBizProjectProcureDTO> procures = saveDTO.getProcures(); |
|
|
|
|
|
draft.setProcure(JSON.toJSONString(procures)); |
|
|
|
|
|
|
|
|
|
|
|
draftService.saveOrUpdate(draft); |
|
|
|
|
|
|
|
|
|
|
|
return BizConst.SAVE_SUCCESS; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
* 删除项目归集 |
|
|
* 删除项目归集 |
|
|
* @param projId |
|
|
* @param projId |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public String remove(String projId) { |
|
|
public String remove(String projId) { |
|
|
|
|
|
UserInfoDetails user = LoginUserUtil.loginUserDetail(); |
|
|
|
|
|
String username = user.getUsername(); |
|
|
|
|
|
|
|
|
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
GovBizProjectBaseinfo baseinfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projId) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projId) |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
@@ -430,22 +647,44 @@ public class GovProjectCollectionManage { |
|
|
baseinfoService.updateById(baseinfo); |
|
|
baseinfoService.updateById(baseinfo); |
|
|
projectApplyService.update(Wrappers.lambdaUpdate(GovBizProjectApply.class) |
|
|
projectApplyService.update(Wrappers.lambdaUpdate(GovBizProjectApply.class) |
|
|
.eq(GovBizProjectApply::getBaseProjId,projId) |
|
|
.eq(GovBizProjectApply::getBaseProjId,projId) |
|
|
.set(GovBizProjectApply::getDeleted,Boolean.TRUE)); |
|
|
|
|
|
|
|
|
.set(GovBizProjectApply::getDeleted,Boolean.TRUE) |
|
|
|
|
|
.set(GovBizProjectApply::getUpdateOn,LocalDateTime.now()) |
|
|
|
|
|
.set(GovBizProjectApply::getUpdateBy,username)); |
|
|
approveService.update(Wrappers.lambdaUpdate(GovBizProjectApprove.class) |
|
|
approveService.update(Wrappers.lambdaUpdate(GovBizProjectApprove.class) |
|
|
.eq(GovBizProjectApprove::getBaseProjId,projId) |
|
|
.eq(GovBizProjectApprove::getBaseProjId,projId) |
|
|
.set(GovBizProjectApprove::getDeleted,Boolean.TRUE)); |
|
|
|
|
|
|
|
|
.set(GovBizProjectApprove::getDeleted,Boolean.TRUE) |
|
|
|
|
|
.set(GovBizProjectApprove::getUpdateOn,LocalDateTime.now()) |
|
|
|
|
|
.set(GovBizProjectApprove::getUpdateBy,username)); |
|
|
cimplementService.update(Wrappers.lambdaUpdate(GovBizProjectCimplement.class) |
|
|
cimplementService.update(Wrappers.lambdaUpdate(GovBizProjectCimplement.class) |
|
|
.eq(GovBizProjectCimplement::getBaseProjId,projId) |
|
|
.eq(GovBizProjectCimplement::getBaseProjId,projId) |
|
|
.set(GovBizProjectCimplement::getDeleted,Boolean.TRUE)); |
|
|
|
|
|
|
|
|
.set(GovBizProjectCimplement::getDeleted,Boolean.TRUE) |
|
|
|
|
|
.set(GovBizProjectCimplement::getUpdateOn,LocalDateTime.now()) |
|
|
|
|
|
.set(GovBizProjectCimplement::getUpdateBy,username)); |
|
|
mimplementService.update(Wrappers.lambdaUpdate(GovBizProjectMimplement.class) |
|
|
mimplementService.update(Wrappers.lambdaUpdate(GovBizProjectMimplement.class) |
|
|
.eq(GovBizProjectMimplement::getBaseProjId,projId) |
|
|
.eq(GovBizProjectMimplement::getBaseProjId,projId) |
|
|
.set(GovBizProjectMimplement::getDeleted,Boolean.TRUE)); |
|
|
|
|
|
|
|
|
.set(GovBizProjectMimplement::getDeleted,Boolean.TRUE) |
|
|
|
|
|
.set(GovBizProjectMimplement::getUpdateOn,LocalDateTime.now()) |
|
|
|
|
|
.set(GovBizProjectMimplement::getUpdateBy,username)); |
|
|
procureService.update(Wrappers.lambdaUpdate(GovBizProjectProcure.class) |
|
|
procureService.update(Wrappers.lambdaUpdate(GovBizProjectProcure.class) |
|
|
.eq(GovBizProjectProcure::getBaseProjId,projId) |
|
|
.eq(GovBizProjectProcure::getBaseProjId,projId) |
|
|
.set(GovBizProjectProcure::getDeleted,Boolean.TRUE)); |
|
|
|
|
|
|
|
|
.set(GovBizProjectProcure::getDeleted,Boolean.TRUE) |
|
|
|
|
|
.set(GovBizProjectProcure::getUpdateOn,LocalDateTime.now()) |
|
|
|
|
|
.set(GovBizProjectProcure::getUpdateBy,username)); |
|
|
return BizConst.OP_SUCCESS; |
|
|
return BizConst.OP_SUCCESS; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 项目归集 草稿箱删除 |
|
|
|
|
|
* @param draftId |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
public String draftRemove(Long draftId) { |
|
|
|
|
|
if(draftService.removeById(draftId)){ |
|
|
|
|
|
return BizConst.OP_SUCCESS; |
|
|
|
|
|
} |
|
|
|
|
|
return BizConst.OP_FAIL; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void checkName(String baseProjName, String baseProjId) { |
|
|
private void checkName(String baseProjName, String baseProjId) { |
|
|
VUtils.isTrue(baseinfoService.count(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
VUtils.isTrue(baseinfoService.count(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjName,baseProjName) |
|
|
.eq(GovBizProjectBaseinfo::getBaseProjName,baseProjName) |
|
@@ -514,17 +753,17 @@ public class GovProjectCollectionManage { |
|
|
|
|
|
|
|
|
public void deleteAll() { |
|
|
public void deleteAll() { |
|
|
String url = deleteAllUrl; |
|
|
String url = deleteAllUrl; |
|
|
try{ |
|
|
|
|
|
log.info("推送删除数据url {}",url); |
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
log.info("推送删除数据url {}", url); |
|
|
HttpHeaders headers = new HttpHeaders(); |
|
|
HttpHeaders headers = new HttpHeaders(); |
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); |
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); |
|
|
headers.setContentType(type); |
|
|
headers.setContentType(type); |
|
|
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); |
|
|
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); |
|
|
HttpEntity<String> formEntity = new HttpEntity<String>(null, headers); |
|
|
HttpEntity<String> formEntity = new HttpEntity<String>(null, headers); |
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); |
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); |
|
|
log.info("推送删除结果 :{}",response); |
|
|
|
|
|
}catch (Exception e){ |
|
|
|
|
|
log.info("推送删除失败,{}",e.getMessage()); |
|
|
|
|
|
|
|
|
log.info("推送删除结果 :{}", response); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
log.info("推送删除失败,{}", e.getMessage()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |