@@ -0,0 +1,22 @@ | |||
package com.ningdatech.pmapi.gov.contants; | |||
/** | |||
* @Classname BizProjectContant | |||
* @Description | |||
* @Date 2023/8/25 11:03 | |||
* @Author PoffyZhang | |||
*/ | |||
public interface BizProjectContant { | |||
String PUSH_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save"; | |||
String NOT_EFFECTIVE_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective"; | |||
String NOT_EFFECTIVE_CODE = "1"; | |||
class ProjectCollection { | |||
//有效 | |||
public static final String IS_EFFECTIVE = "02"; | |||
//有效 | |||
public static final String NOT_EFFECTIVE = "01"; | |||
} | |||
} |
@@ -0,0 +1,114 @@ | |||
package com.ningdatech.pmapi.gov.convert; | |||
import cn.hutool.core.bean.BeanUtil; | |||
import com.ningdatech.pmapi.gov.model.dto.*; | |||
import com.ningdatech.pmapi.gov.model.req.*; | |||
import java.util.Objects; | |||
/** | |||
* @Classname ProjectConvert | |||
* @Description | |||
* @Date 2023/8/25 11:53 | |||
* @Author PoffyZhang | |||
*/ | |||
public class ProjectConvert { | |||
/** | |||
* 6个 转换方法 | |||
* @param saveDTO | |||
* @return | |||
*/ | |||
public static ProjectPushReq convert(GovBizProjectSaveDTO saveDTO) { | |||
ProjectPushReq req = new ProjectPushReq(); | |||
req.setBaseinfo(convertBase(saveDTO.getBaseinfo())); | |||
req.setApply(convertApply(saveDTO.getApply())); | |||
req.setApprove(convertApprove(saveDTO.getApprove())); | |||
req.setCimplement(convertCimplement(saveDTO.getCimplement())); | |||
req.setMimplement(convertMimplement(saveDTO.getMimplement())); | |||
req.setProcure(convertProcure(saveDTO.getProcure())); | |||
return req; | |||
} | |||
private static ProjectProcureReq convertProcure(GovBizProjectProcureDTO procure) { | |||
ProjectProcureReq req = BeanUtil.copyProperties(procure,ProjectProcureReq.class); | |||
return req; | |||
} | |||
private static ProjectMimplementReq convertMimplement(GovBizProjectMimplementDTO mimplement) { | |||
ProjectMimplementReq req = BeanUtil.copyProperties(mimplement,ProjectMimplementReq.class); | |||
return req; | |||
} | |||
public static ProjectCimplementReq convertCimplement(GovBizProjectCimplementDTO cimplement) { | |||
ProjectCimplementReq req = BeanUtil.copyProperties(cimplement,ProjectCimplementReq.class); | |||
return req; | |||
} | |||
public static ProjectApproveReq convertApprove(GovBizProjectApproveDTO approve) { | |||
ProjectApproveReq req = new ProjectApproveReq(); | |||
req.setBaseProjId(approve.getBaseProjId()); | |||
req.setBaseProjName(approve.getBaseProjName()); | |||
req.setOp(approve.getOp()); | |||
req.setApprovalFile(approve.getApprovalFile()); | |||
req.setBaseReviewCommentsFile(approve.getBaseReviewCommentFile()); | |||
req.setPreliminaryDesignFile(approve.getPreliminaryDesignFile()); | |||
req.setAreaCode(approve.getAreaCode()); | |||
req.setBaseDevelopCode(approve.getBaseDevelopCode()); | |||
req.setBaseExpertTotalMoney(String.valueOf(approve.getBaseExpertTotalMoney())); | |||
req.setBaseExpertYearMoney(String.valueOf(approve.getBaseExpertYearMoney())); | |||
req.setReleaseYearMoney(String.valueOf(approve.getReleaseYearMoney())); | |||
req.setBaseInitialReviewTotalMoney(String.valueOf(approve.getBaseInitialReviewTotalMoney())); | |||
req.setBaseReviewOpinion(approve.getBaseReviewOpinion()); | |||
req.setBaseReviewResults(approve.getBaseReviewResults()); | |||
req.setEqualProtectionLevel(approve.getEqualProtectionLevel()); | |||
req.setPreliminaryDesignScheme(approve.getPreliminaryDesignScheme()); | |||
req.setSetProjCodeFinan(approve.getSetProjCodeFinan()); | |||
return req; | |||
} | |||
public static ProjectApplyReq convertApply(GovBizProjectApplyDTO apply) { | |||
ProjectApplyReq req = new ProjectApplyReq(); | |||
if(Objects.isNull(apply)){ | |||
return req; | |||
} | |||
req.setOp(apply.getOp()); | |||
req.setBaseProjId(apply.getBaseProjId()); | |||
req.setBaseProjName(apply.getBaseProjName()); | |||
req.setAreaCode(apply.getAreaCode()); | |||
req.setBaseAccountAppName(apply.getBaseAccountAppName()); | |||
req.setBaseBasisEstablish(apply.getBaseBasisEstablish()); | |||
req.setBaseCoreBusiness(apply.getBaseCoreBusiness()); | |||
req.setBaseCoreBusinessCode(apply.getBaseCoreBusinessCode()); | |||
req.setBaseBrainName(apply.getBaseBrainName()); | |||
req.setBaseDevelopCode(apply.getBaseDevelopCode()); | |||
req.setBaseLowestLevel(apply.getBaseLowestLevel()); | |||
req.setBaseHistorProjId(apply.getBaseHistorProjId()); | |||
req.setBaseHistorProjName(apply.getBaseHistorProjName()); | |||
req.setBaseOperatMaintenFile(apply.getBaseOperatMaintenFile()); | |||
req.setBaseProjApplyFile(apply.getBaseProjApplyFile()); | |||
req.setBaseProjBasisFile(apply.getBaseProjBasisFile()); | |||
req.setBaseProjOtherFile(apply.getBaseProjOtherFile()); | |||
req.setBaseResearchReportFile(apply.getBaseResearchReportFile()); | |||
req.setBaseProjConsClass(apply.getBaseProjConsClass()); | |||
req.setBaseProjDuration(String.valueOf(apply.getBaseProjDuration())); | |||
req.setBaseProjIntro(apply.getBaseProjIntro()); | |||
req.setBaseProjStartTime(String.valueOf(apply.getBaseProjStartTime())); | |||
req.setBaseProjEndTime(String.valueOf(apply.getBaseProjEndTime())); | |||
req.setBaseProjSetYear(apply.getBaseProjSetYear()); | |||
req.setBaseProjSys(apply.getBaseProjSys()); | |||
req.setBaseProjSysCode(apply.getBaseDevelopCode()); | |||
req.setBaseProjDeclAmount(String.valueOf(apply.getBaseProjDeclAmount())); | |||
req.setBaseProjTotalAmount(String.valueOf(apply.getBaseProjTotalAmount())); | |||
req.setBaseBasisAmountOri(apply.getBaseBasisAmountOri()); | |||
req.setBaseProjAmountOri(apply.getBaseProjAmountOri()); | |||
req.setBaseProjRemark(apply.getBaseProjRemark()); | |||
req.setBeseExpectedResults(apply.getBeseExpectedResults()); | |||
return req; | |||
} | |||
public static ProjectBaseInfoReq convertBase(GovBizProjectBaseinfoDTO baseinfo) { | |||
ProjectBaseInfoReq req = BeanUtil.copyProperties(baseinfo,ProjectBaseInfoReq.class); | |||
return req; | |||
} | |||
} |
@@ -9,15 +9,23 @@ import com.google.common.collect.Maps; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.pmapi.common.constant.BizConst; | |||
import com.ningdatech.pmapi.gov.contants.BizProjectContant; | |||
import com.ningdatech.pmapi.gov.convert.ProjectConvert; | |||
import com.ningdatech.pmapi.gov.model.dto.*; | |||
import com.ningdatech.pmapi.gov.model.entity.*; | |||
import com.ningdatech.pmapi.gov.model.req.ProjectApplyReq; | |||
import com.ningdatech.pmapi.gov.model.req.ProjectBaseInfoReq; | |||
import com.ningdatech.pmapi.gov.model.req.ProjectPushReq; | |||
import com.ningdatech.pmapi.gov.model.vo.*; | |||
import com.ningdatech.pmapi.gov.service.*; | |||
import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; | |||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||
import lombok.RequiredArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.springframework.http.ResponseEntity; | |||
import org.springframework.stereotype.Component; | |||
import org.springframework.web.client.RestTemplate; | |||
import java.time.LocalDateTime; | |||
import java.util.Collections; | |||
@@ -33,6 +41,7 @@ import java.util.stream.Collectors; | |||
@Component | |||
@RequiredArgsConstructor | |||
@Slf4j | |||
public class GovProjectCollectionManage { | |||
private final IGovProjectDictionaryService dictionaryService; | |||
@@ -51,6 +60,8 @@ public class GovProjectCollectionManage { | |||
private final GenerateProjectCodeUtil generateProjectCodeUtil; | |||
private final RestTemplate restTemplate; | |||
public List<GovProjectDictionaryVO> dictionary(String type) { | |||
List<GovProjectDictionary> dictionaries = dictionaryService.list(Wrappers.lambdaQuery(GovProjectDictionary.class) | |||
@@ -195,7 +206,8 @@ public class GovProjectCollectionManage { | |||
//1.保存基本信息 | |||
GovBizProjectBaseinfoDTO baseinfo = saveDTO.getBaseinfo(); | |||
baseinfo.setBaseProjId(baseProjId); | |||
baseinfo.setBaseProjName(baseProjName); | |||
GovBizProjectBaseinfo oldBaseInfo = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) | |||
.eq(GovBizProjectBaseinfo::getBaseProjId, baseProjId) | |||
.last(BizConst.LIMIT_1)); | |||
@@ -205,6 +217,7 @@ public class GovProjectCollectionManage { | |||
GovBizProjectBaseinfo saveBase = BeanUtil.copyProperties(baseinfo,GovBizProjectBaseinfo.class); | |||
saveBase.setBaseProjId(baseProjId); | |||
saveBase.setBaseProjName(baseProjName); | |||
saveBase.setIsEffective(BizProjectContant.ProjectCollection.IS_EFFECTIVE); | |||
if(Objects.nonNull(oldBaseInfo)){ | |||
saveBase.setId(oldBaseInfo.getId()); | |||
}else{ | |||
@@ -218,6 +231,8 @@ public class GovProjectCollectionManage { | |||
// 2.保存 申报信息 | |||
GovBizProjectApplyDTO apply = saveDTO.getApply(); | |||
apply.setBaseProjId(baseProjId); | |||
apply.setBaseProjName(baseProjName); | |||
if(Objects.nonNull(apply)){ | |||
GovBizProjectApply oldApply = projectApplyService.getOne(Wrappers.lambdaQuery(GovBizProjectApply.class) | |||
.eq(GovBizProjectApply::getBaseProjId, baseProjId) | |||
@@ -238,6 +253,8 @@ public class GovProjectCollectionManage { | |||
// 3.保存 审批信息 | |||
GovBizProjectApproveDTO approve = saveDTO.getApprove(); | |||
approve.setBaseProjId(baseProjId); | |||
approve.setBaseProjName(baseProjName); | |||
if(Objects.nonNull(approve)){ | |||
GovBizProjectApprove oldApprove = approveService.getOne(Wrappers.lambdaQuery(GovBizProjectApprove.class) | |||
.eq(GovBizProjectApprove::getBaseProjId, baseProjId) | |||
@@ -258,6 +275,8 @@ public class GovProjectCollectionManage { | |||
// 4.保存 建设项目 实施信息 | |||
GovBizProjectCimplementDTO cimplement = saveDTO.getCimplement(); | |||
cimplement.setBaseProjId(baseProjId); | |||
cimplement.setBaseProjName(baseProjName); | |||
if(Objects.nonNull(cimplement)){ | |||
GovBizProjectCimplement oldCimplement = cimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectCimplement.class) | |||
.eq(GovBizProjectCimplement::getBaseProjId, baseProjId) | |||
@@ -278,6 +297,8 @@ public class GovProjectCollectionManage { | |||
// 5.保存 运维项目 实施信息 | |||
GovBizProjectMimplementDTO mimplement = saveDTO.getMimplement(); | |||
mimplement.setBaseProjId(baseProjId); | |||
mimplement.setBaseProjName(baseProjName); | |||
if(Objects.nonNull(mimplement)){ | |||
GovBizProjectMimplement oldMimplement = mimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectMimplement.class) | |||
.eq(GovBizProjectMimplement::getBaseProjId, baseProjId) | |||
@@ -298,6 +319,8 @@ public class GovProjectCollectionManage { | |||
// 6.保存 采购信息 | |||
GovBizProjectProcureDTO procure = saveDTO.getProcure(); | |||
procure.setBaseProjId(baseProjId); | |||
procure.setBaseProjName(baseProjName); | |||
if(Objects.nonNull(procure)){ | |||
GovBizProjectProcure oldProcure = procureService.getOne(Wrappers.lambdaQuery(GovBizProjectProcure.class) | |||
.eq(GovBizProjectProcure::getBaseProjId, baseProjId) | |||
@@ -316,6 +339,9 @@ public class GovProjectCollectionManage { | |||
procureService.saveOrUpdate(saveProcure); | |||
} | |||
//7. 推送数据 | |||
pushProject(saveDTO); | |||
return BizConst.SAVE_SUCCESS; | |||
} | |||
@@ -342,6 +368,7 @@ public class GovProjectCollectionManage { | |||
.eq(GovBizProjectMimplement::getBaseProjId,projId)); | |||
procureService.remove(Wrappers.lambdaQuery(GovBizProjectProcure.class) | |||
.eq(GovBizProjectProcure::getBaseProjId,projId)); | |||
notEffectiveProject(BeanUtil.copyProperties(baseinfo,GovBizProjectBaseinfoDTO.class)); | |||
return BizConst.OP_SUCCESS; | |||
} | |||
@@ -351,4 +378,35 @@ public class GovProjectCollectionManage { | |||
.ne(GovBizProjectBaseinfo::getBaseProjId,baseProjId)) > 0L) | |||
.throwMessage("项目名重复"); | |||
} | |||
/** | |||
* 推送项目 | |||
* @param saveDTO | |||
*/ | |||
private void pushProject(GovBizProjectSaveDTO saveDTO) { | |||
String url = BizProjectContant.PUSH_URL; | |||
ProjectPushReq req = ProjectConvert.convert(saveDTO); | |||
try{ | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, null, String.class, req); | |||
log.info("推送结果 {} :{}",saveDTO.getBaseProjId(),response); | |||
}catch (Exception e){ | |||
log.info("推送失败,{}",e.getMessage()); | |||
} | |||
} | |||
/** | |||
* 把项目置为无效 | |||
* @param baseinfo | |||
*/ | |||
private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { | |||
String url = BizProjectContant.NOT_EFFECTIVE_URL; | |||
baseinfo.setIsEffective(BizProjectContant.NOT_EFFECTIVE_CODE); | |||
ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo); | |||
try{ | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, null, String.class, req); | |||
log.info("推送结果 {} :{}",baseinfo.getBaseProjId(),response); | |||
}catch (Exception e){ | |||
log.info("推送失败,{}",e.getMessage()); | |||
} | |||
} | |||
} |
@@ -0,0 +1,139 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 项目申报信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_apply") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectApply对象", description = "项目申报信息") | |||
public class ProjectApplyReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("发改项目代码") | |||
private String baseDevelopCode; | |||
@ApiModelProperty("财政项目代码") | |||
private String setProjCodeFinan; | |||
@ApiModelProperty("历年项目名称") | |||
private String baseHistorProjName; | |||
@ApiModelProperty("历年项目代码") | |||
private String baseHistorProjId; | |||
@ApiModelProperty("关联IRS应用名称") | |||
private String baseProjSys; | |||
@ApiModelProperty("关联IRS应用编码") | |||
private String baseProjSysCode; | |||
@ApiModelProperty("一本账重大应用名称") | |||
private String baseAccountAppName; | |||
@ApiModelProperty("“领域大脑”一本账名称") | |||
private String baseBrainName; | |||
@ApiModelProperty("单位核心业务名称") | |||
private String baseCoreBusiness; | |||
@ApiModelProperty("单位核心业务编码") | |||
private String baseCoreBusinessCode; | |||
@ApiModelProperty("项目起始时间") | |||
private String baseProjStartTime; | |||
@ApiModelProperty("项目终止时间") | |||
private String baseProjEndTime; | |||
@ApiModelProperty("项目期限") | |||
private String baseProjDuration; | |||
@ApiModelProperty("预算年度") | |||
private String baseProjSetYear; | |||
@ApiModelProperty("预算来源") | |||
private String baseProjAmountOri; | |||
@ApiModelProperty("预算来源说明") | |||
private String baseBasisAmountOri; | |||
@ApiModelProperty("项目总投资") | |||
private String baseProjTotalAmount; | |||
@ApiModelProperty("申报年度预算") | |||
private String baseProjDeclAmount; | |||
@ApiModelProperty("建设层级") | |||
private String baseProjConsClass; | |||
@ApiModelProperty("贯通层级") | |||
private String baseLowestLevel; | |||
@ApiModelProperty("立项依据") | |||
private String baseProjBasis; | |||
@ApiModelProperty("立项依据说明") | |||
private String baseBasisEstablish; | |||
@ApiModelProperty("立项依据证明材料") | |||
private String baseProjBasisFile; | |||
@ApiModelProperty("项目概述") | |||
private String baseProjIntro; | |||
@ApiModelProperty("项目内容与预期成效") | |||
private String beseExpectedResults; | |||
@ApiModelProperty("可行性研究报告") | |||
private String baseResearchReportFile; | |||
@ApiModelProperty("项目申报书") | |||
private String baseProjApplyFile; | |||
@ApiModelProperty("运维方案") | |||
private String baseOperatMaintenFile; | |||
@ApiModelProperty("其他附件") | |||
private String baseProjOtherFile; | |||
@ApiModelProperty("备注") | |||
private String baseProjRemark; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,91 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 项目立项评审信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_approve") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectApprove对象", description = "项目立项评审信息") | |||
public class ProjectApproveReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("发改项目代码") | |||
private String baseDevelopCode; | |||
@ApiModelProperty("财政项目代码") | |||
private String setProjCodeFinan; | |||
@ApiModelProperty("评审结果") | |||
private String baseReviewResults; | |||
@ApiModelProperty("评审意见") | |||
private String baseReviewOpinion; | |||
@ApiModelProperty("评审意见附件") | |||
private String baseReviewCommentsFile; | |||
@ApiModelProperty("建议总投资") | |||
private String baseExpertTotalMoney; | |||
@ApiModelProperty("建议年度预算") | |||
private String baseExpertYearMoney; | |||
@ApiModelProperty("立项批复文件") | |||
private String approvalFile; | |||
@ApiModelProperty("建议批复总投资") | |||
private String baseInitialReviewTotalMoney; | |||
@ApiModelProperty("建议批复年度预算") | |||
private String baseProjReplyAmount; | |||
@ApiModelProperty("等保定级") | |||
private String equalProtectionLevel; | |||
@ApiModelProperty("初步设计方案") | |||
private String preliminaryDesignScheme; | |||
@ApiModelProperty("初步设计方案批复函") | |||
private String preliminaryDesignFile; | |||
@ApiModelProperty("年度预算下达金额") | |||
private String releaseYearMoney; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,106 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 项目基本信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_baseinfo") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectBaseinfo对象", description = "项目基本信息") | |||
public class ProjectBaseInfoReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("所属区划") | |||
private String baseAreaName; | |||
@ApiModelProperty("所属区划编码") | |||
private String baseAreaCode; | |||
@ApiModelProperty("是否涉密") | |||
private String baseProjIsConfidentiality; | |||
@ApiModelProperty("项目类型") | |||
private String baseProjType; | |||
@ApiModelProperty("内容类别") | |||
private String baseConstructionType; | |||
@ApiModelProperty("项目状态") | |||
private String baseProjSetProg; | |||
@ApiModelProperty("信息是否有效") | |||
private String isEffective; | |||
@ApiModelProperty("上级主管单位") | |||
private String baseProvManDeprt; | |||
@ApiModelProperty("上级主管单位浙政钉ID") | |||
private String baseProvManDeprtDing; | |||
@ApiModelProperty("本级主管单位") | |||
private String baseManDeprt; | |||
@ApiModelProperty("本级主管单位浙政钉ID") | |||
private String baseManDeprtDing; | |||
@ApiModelProperty("本级主管单位统一社会信用代码") | |||
private String baseManDepartUsci; | |||
@ApiModelProperty("建设单位(申报单位)") | |||
private String baseBuildDeprt; | |||
@ApiModelProperty("建设单位浙政钉ID") | |||
private String baseBuildDeprtDing; | |||
@ApiModelProperty("建设单位统一社会信用代码") | |||
private String baseBuildDepartUsci; | |||
@ApiModelProperty("项目负责人") | |||
private String baseProjPrincipal; | |||
@ApiModelProperty("项目负责人手机号") | |||
private String baseProjPrincipalCall; | |||
@ApiModelProperty("项目联系人") | |||
private String baseProjContacts; | |||
@ApiModelProperty("项目联系人手机号") | |||
private String baseProjContactsCall; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,109 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 建设项目实施信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_cimplement") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectCimplement对象", description = "建设项目实施信息") | |||
public class ProjectCimplementReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("标段代码") | |||
private String baseBidCode; | |||
@ApiModelProperty("标段名称") | |||
private String baseBidName; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("发改项目代码") | |||
private String baseDevelopCode; | |||
@ApiModelProperty("关联IRS应用编码") | |||
private String baseProjSysCode; | |||
@ApiModelProperty("初验意见") | |||
private String baseInitialOpinionFile; | |||
@ApiModelProperty("信息安全等级保护测评报告") | |||
private String baseInforLevelFile; | |||
@ApiModelProperty("商业密码应用评估报告") | |||
private String basePasswAssessFile; | |||
@ApiModelProperty("第三方验收测试报告") | |||
private String baseThirdAcceptFile; | |||
@ApiModelProperty("建设核查表") | |||
private String baseCheckFile; | |||
@ApiModelProperty("财务审计报告") | |||
private String baseFinanlAuditFile; | |||
@ApiModelProperty("用户使用报告") | |||
private String baseUserConsFile; | |||
@ApiModelProperty("监理总结报告") | |||
private String baseEstaSummFile; | |||
@ApiModelProperty("IRS应用试运行报告") | |||
private String baseIrsTestRunFile; | |||
@ApiModelProperty("项目总结报告") | |||
private String baseSummReportFile; | |||
@ApiModelProperty("是否完成日志数据归集") | |||
private String baseLogAggregation; | |||
@ApiModelProperty("实际成效指标") | |||
private String baseBusinessMetrics; | |||
@ApiModelProperty("终验意见") | |||
private String baseFinalExpertOpinionFile; | |||
@ApiModelProperty("项目延期申请表") | |||
private String baseEngineerPostpoFile; | |||
@ApiModelProperty("变更申请单") | |||
private String baseChangeFormFile; | |||
@ApiModelProperty("变更批复文件") | |||
private String baseChanFile; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,97 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 运维项目实施信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_mimplement") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectMimplement对象", description = "运维项目实施信息") | |||
public class ProjectMimplementReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("标段代码") | |||
private String baseBidCode; | |||
@ApiModelProperty("标段名称") | |||
private String baseBidName; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("发改项目代码") | |||
private String baseDevelopCode; | |||
@ApiModelProperty("关联IRS应用编码") | |||
private String baseProjSysCode; | |||
@ApiModelProperty("信息安全等级保护测评报告") | |||
private String baseInforLevelFile; | |||
@ApiModelProperty("商业密码应用评估报告") | |||
private String basePasswAssessFile; | |||
@ApiModelProperty("第三方验收测试报告") | |||
private String baseThirdAcceptFile; | |||
@ApiModelProperty("用户使用报告") | |||
private String baseUserConsFile; | |||
@ApiModelProperty("监理总结报告") | |||
private String baseEstaSummFile; | |||
@ApiModelProperty("运维总结报告") | |||
private String baseOperatMaintenSummFile; | |||
@ApiModelProperty("是否完成日志数据归集") | |||
private String baseLogAggregation; | |||
@ApiModelProperty("实际成效指标") | |||
private String baseBusinessMetrics; | |||
@ApiModelProperty("终验意见") | |||
private String baseFinalExpertOpinionFile; | |||
@ApiModelProperty("项目延期申请表") | |||
private String baseEngineerPostpoFile; | |||
@ApiModelProperty("变更报告") | |||
private String baseEngineerAlterFile; | |||
@ApiModelProperty("变更批复文件") | |||
private String baseChanFile; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,97 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 项目采购信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@TableName("szls_da_biz_331100_project_procure") | |||
@ApiModel(value = "SzlsDaBiz331100ProjectProcure对象", description = "项目采购信息") | |||
public class ProjectProcureReq implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("标段代码") | |||
private String baseBidCode; | |||
@ApiModelProperty("标段名称") | |||
private String baseBidName; | |||
@ApiModelProperty("项目代码") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("财政项目代码") | |||
private String setProjCodeFinan; | |||
@ApiModelProperty("采购方式") | |||
private String baseProjPurchaseWay; | |||
@ApiModelProperty("预算执行确认书编号") | |||
private String basePurchaseCode; | |||
@ApiModelProperty("招标(采购)文件") | |||
private String purchaseFile; | |||
@ApiModelProperty("采购代理机构") | |||
private String basePurchasingAgencies; | |||
@ApiModelProperty("采购代理机构统一社会信用代码") | |||
private String baseUnifiedCreditCode; | |||
@ApiModelProperty("中标(成交)时间") | |||
private String baseWinningBidTime; | |||
@ApiModelProperty("中标(成交)金额") | |||
private String baseProjPurchaseAmount; | |||
@ApiModelProperty("中标(成交)通知书") | |||
private String biddingFile; | |||
@ApiModelProperty("中标(成交)供应商名称") | |||
private String baseConsDeprt; | |||
@ApiModelProperty("中标(成交)供应商统一社会信用代码") | |||
private String baseConsDeprtUsci; | |||
@ApiModelProperty("采购合同") | |||
private String purchaseContract; | |||
@ApiModelProperty("项目款支付时间") | |||
private String basePaymentTime; | |||
@ApiModelProperty("项目款支付金额") | |||
private String paymentProgress; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
@ApiModelProperty("发送端自增列") | |||
@TableId(value = "tongID", type = IdType.AUTO) | |||
private Integer tongID; | |||
} |
@@ -0,0 +1,32 @@ | |||
package com.ningdatech.pmapi.gov.model.req; | |||
import io.swagger.annotations.ApiModel; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
* @Classname ProjectPushReq | |||
* @Description | |||
* @Date 2023/8/25 9:45 | |||
* @Author PoffyZhang | |||
*/ | |||
@Data | |||
@ApiModel(value = "ProjectPushReq", description = "项目保存") | |||
public class ProjectPushReq { | |||
@NotNull(message = "项目基本信息不能为空") | |||
private ProjectBaseInfoReq baseinfo; | |||
@NotNull(message = "项目申报信息不能为空") | |||
private ProjectApplyReq apply; | |||
@NotNull(message = "项目审批信息不能为空") | |||
private ProjectApproveReq approve; | |||
private ProjectCimplementReq cimplement; | |||
private ProjectMimplementReq mimplement; | |||
private ProjectProcureReq procure; | |||
} |
@@ -97,4 +97,5 @@ public interface BizConst { | |||
String SAVE_SUCCESS = "保存成功"; | |||
String OP_SUCCESS = "操作成功"; | |||
String SAVE_FAIL = "保存失败"; | |||
String NOT_EFFECTIVE = "1"; | |||
} |
@@ -2,7 +2,9 @@ package com.ningdatech.syndataapi.open.controller; | |||
import com.ningdatech.basic.model.ApiResponse; | |||
import com.ningdatech.syndataapi.open.manage.ProjectReceiveManage; | |||
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectBaseInfoDTO; | |||
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectSaveDTO; | |||
import com.ningdatech.syndataapi.scheduler.model.entity.ProjectBaseInfo; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.RequiredArgsConstructor; | |||
@@ -29,4 +31,10 @@ public class ProjectReceiveController { | |||
public ApiResponse<String> save(@Valid @RequestBody ProjectSaveDTO dto) { | |||
return ApiResponse.ofSuccess(receiveManage.save(dto)); | |||
} | |||
@PostMapping("/not-effective") | |||
@ApiOperation("项目归集置为无效") | |||
public ApiResponse<String> notEffective(@Valid @RequestBody ProjectBaseInfoDTO baseinfo) { | |||
return ApiResponse.ofSuccess(receiveManage.notEffective(baseinfo)); | |||
} | |||
} |
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.ningdatech.basic.function.VUtils; | |||
import com.ningdatech.syndataapi.common.constant.BizConst; | |||
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectBaseInfoDTO; | |||
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectSaveDTO; | |||
import com.ningdatech.syndataapi.scheduler.model.entity.*; | |||
import com.ningdatech.syndataapi.scheduler.service.*; | |||
@@ -143,4 +144,25 @@ public class ProjectReceiveManage { | |||
return BizConst.SAVE_SUCCESS; | |||
} | |||
/** | |||
* 置为无效 | |||
* @param dto | |||
* @return | |||
*/ | |||
public String notEffective(ProjectBaseInfoDTO dto) { | |||
ProjectBaseInfo oldBaseInfo = baseInfoService.getOne(Wrappers.lambdaQuery(ProjectBaseInfo.class) | |||
.eq(ProjectBaseInfo::getBaseProjId, dto.getBaseProjId()) | |||
.last(BizConst.LIMIT_1)); | |||
ProjectBaseInfo saveBaseinfo = BeanUtil.copyProperties(dto,ProjectBaseInfo.class); | |||
saveBaseinfo.setIsEffective(BizConst.NOT_EFFECTIVE); | |||
if(Objects.isNull(oldBaseInfo)){ | |||
saveBaseinfo.setTongTime(LocalDateTime.now()); | |||
} | |||
saveBaseinfo.setBizTime(LocalDateTime.now()); | |||
baseInfoService.saveOrUpdate(saveBaseinfo); | |||
return BizConst.OP_SUCCESS; | |||
} | |||
} |
@@ -0,0 +1,103 @@ | |||
package com.ningdatech.syndataapi.scheduler.model.dto; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotBlank; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
* 项目基本信息 | |||
* </p> | |||
* | |||
* @author CMM | |||
* @since 2023-08-22 | |||
*/ | |||
@Data | |||
@ApiModel(value = "SzlsDaBiz331100ProjectBaseinfo对象", description = "项目基本信息") | |||
public class ProjectBaseInfoDTO implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("项目代码") | |||
@NotBlank(message = "项目编号不能为空") | |||
private String baseProjId; | |||
@ApiModelProperty("项目名称") | |||
private String baseProjName; | |||
@ApiModelProperty("所属区划") | |||
private String baseAreaName; | |||
@ApiModelProperty("所属区划编码") | |||
private String baseAreaCode; | |||
@ApiModelProperty("是否涉密") | |||
private String baseProjIsConfidentiality; | |||
@ApiModelProperty("项目类型") | |||
private String baseProjType; | |||
@ApiModelProperty("内容类别") | |||
private String baseConstructionType; | |||
@ApiModelProperty("项目状态") | |||
private String baseProjSetProg; | |||
@ApiModelProperty("信息是否有效") | |||
private String isEffective; | |||
@ApiModelProperty("上级主管单位") | |||
private String baseProvManDeprt; | |||
@ApiModelProperty("上级主管单位浙政钉ID") | |||
private String baseProvManDeprtDing; | |||
@ApiModelProperty("本级主管单位") | |||
private String baseManDeprt; | |||
@ApiModelProperty("本级主管单位浙政钉ID") | |||
private String baseManDeprtDing; | |||
@ApiModelProperty("本级主管单位统一社会信用代码") | |||
private String baseManDepartUsci; | |||
@ApiModelProperty("建设单位(申报单位)") | |||
private String baseBuildDeprt; | |||
@ApiModelProperty("建设单位浙政钉ID") | |||
private String baseBuildDeprtDing; | |||
@ApiModelProperty("建设单位统一社会信用代码") | |||
private String baseBuildDepartUsci; | |||
@ApiModelProperty("项目负责人") | |||
private String baseProjPrincipal; | |||
@ApiModelProperty("项目负责人手机号") | |||
private String baseProjPrincipalCall; | |||
@ApiModelProperty("项目联系人") | |||
private String baseProjContacts; | |||
@ApiModelProperty("项目联系人手机号") | |||
private String baseProjContactsCall; | |||
@ApiModelProperty("数据来源") | |||
private String areaCode; | |||
@ApiModelProperty("出生产库时间") | |||
private LocalDateTime bizTime; | |||
@ApiModelProperty("操作标记") | |||
private String op; | |||
@ApiModelProperty("数据入库时间") | |||
private LocalDateTime tongTime; | |||
} |