From dc9002baa1fdb3e47f9098ab52e4a12ff747ed5a Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 7 Feb 2023 09:12:50 +0800 Subject: [PATCH 1/2] git debug --- .../ningdatech/pmapi/declared/manage/DeclaredProjectManage.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java index 7b7ea96..a21c58b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java @@ -17,6 +17,7 @@ import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.wflow.bean.entity.WflowModels; import com.wflow.exception.BusinessException; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.vo.ProcessStartParamsVo; import com.wflow.workflow.service.ProcessInstanceService; import com.wflow.workflow.service.ProcessModelService; @@ -118,7 +119,12 @@ public class DeclaredProjectManage { } ProcessStartParamsVo params = new ProcessStartParamsVo(); - params.setDeptId("6179678"); + ProcessInstanceUserDto user = new ProcessInstanceUserDto(); + user.setOrgCode("6179678"); + user.setOrgName("数转办"); + user.setUserId("381496"); + user.setUserName("旅人"); + params.setUser(user); params.setProcessUsers(Collections.emptyMap()); dto.getFormData().putAll( JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference>() { From 5f189199c23d89607e4b02379ea72ba99e738c34 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 7 Feb 2023 11:35:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DeclaredProjectController.java | 50 --- .../pmapi/declared/entity/ProjectDraft.java | 409 -------------------- .../declared/entity/dto/DeclaredProjectDto.java | 33 -- .../entity/dto/DeclaredProjectListParamDto.java | 34 -- .../pmapi/declared/entity/vo/ProjectDraftVo.java | 412 -------------------- .../declared/manage/DeclaredProjectManage.java | 153 -------- .../pmapi/declared/mapper/ProjectDraftMapper.java | 17 - .../pmapi/declared/mapper/ProjectDraftMapper.xml | 5 - .../declared/service/IProjectDraftService.java | 17 - .../service/impl/ProjectDraftServiceImpl.java | 24 -- .../controller/DeclaredProjectController.java | 62 ++++ .../pmapi/projectdeclared/entity/ProjectDraft.java | 413 +++++++++++++++++++++ .../entity/dto/DeclaredProjectDto.java | 33 ++ .../entity/dto/DeclaredProjectListParamDto.java | 34 ++ .../entity/dto/ProjectDraftSaveDto.java | 398 ++++++++++++++++++++ .../projectdeclared/entity/vo/ProjectDraftVo.java | 411 ++++++++++++++++++++ .../manage/DeclaredProjectManage.java | 176 +++++++++ .../projectdeclared/mapper/ProjectDraftMapper.java | 16 + .../projectdeclared/mapper/ProjectDraftMapper.xml | 5 + .../service/IProjectDraftService.java | 16 + .../service/impl/ProjectDraftServiceImpl.java | 21 ++ 21 files changed, 1585 insertions(+), 1154 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/ProjectDraft.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectListParamDto.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/vo/ProjectDraftVo.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/service/IProjectDraftService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/service/impl/ProjectDraftServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/ProjectDraft.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java deleted file mode 100644 index 342de9f..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.ningdatech.pmapi.declared.controller; - -import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectDto; -import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; -import com.ningdatech.pmapi.declared.entity.vo.ProjectDraftVo; -import com.ningdatech.pmapi.declared.manage.DeclaredProjectManage; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.wflow.workflow.bean.vo.ProcessStartParamsVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * @Classname DeclaredProjectController - * @Description 申报项目 - * @Date 2023/1/31 11:29 - * @Author PoffyZhang - */ -@Slf4j -@Validated -@RestController -@RequestMapping("/api/v1/declared") -@Api(value = "DeclaredProject", tags = "申报管理-申报项目") -@RequiredArgsConstructor -public class DeclaredProjectController { - private final DeclaredProjectManage declaredProjectManage; - - @ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") - @GetMapping("/list") - public PageVo list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; - return declaredProjectManage.page(params); - } - - @ApiOperation(value = "申报项目草稿箱", notes = "申报项目草稿箱") - @GetMapping("/draft") - public PageVo draft(@Validated @ModelAttribute DeclaredProjectListParamDto params) { - return declaredProjectManage.pageDraft(params); - } - - @ApiOperation(value = "申报项目", notes = "申报项目") - @PostMapping("/start") - public String startTheProcess(@Validated @RequestBody DeclaredProjectDto dto) { - String instanceId = declaredProjectManage.startTheProcess(dto); - return "启动流程实例 " + instanceId + " 成功"; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/ProjectDraft.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/ProjectDraft.java deleted file mode 100644 index 791bc4e..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/ProjectDraft.java +++ /dev/null @@ -1,409 +0,0 @@ -package com.ningdatech.pmapi.declared.entity; - -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.Builder; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - *

- * 项目草稿箱 - *

- * - * @author zpf - * @since 2023-02-06 - */ -@TableName("nd_project_draft") -@ApiModel(value = "NdProjectDraft对象", description = "") -@Data -@Builder -public class ProjectDraft implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("应用ID") - @TableId(type = IdType.AUTO) - private Long id; - - @ApiModelProperty("所属地区编号") - private String areaCode; - - @ApiModelProperty("所属地区名称") - private String area; - - @ApiModelProperty("项目阶段") - private Integer stage; - - @ApiModelProperty("项目状态") - private Integer status; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("是否临时增补 0:否 1:是") - private Integer isTemporaryAugment; - - @ApiModelProperty("项目负责人") - private String responsibleMan; - - @ApiModelProperty("负责人手机号码") - private String responsibleManMobile; - - @ApiModelProperty("项目联系人") - private String contactName; - - @ApiModelProperty("项目联系人手机号码") - private String contactPhone; - - @ApiModelProperty("建设单位名称") - private String buildUnitName; - - @ApiModelProperty("建设单位统一社会信用代码") - private String buildUnitCode; - - @ApiModelProperty("建设单位浙政钉ID") - private String buildUnitZheJiangGovernmentDingId; - - @ApiModelProperty("项目类型 1:建设 2:运维") - private Integer projectType; - - @ApiModelProperty("是否首次新建 0:否 1:是") - private Integer isFirst; - - @ApiModelProperty("项目预算年度") - private Integer projectYear; - - @ApiModelProperty("项目建设起始时间") - private String beginTime; - - @ApiModelProperty("项目建设终止时间") - private String endTime; - - @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") - private Integer fourSystems; - - @ApiModelProperty("是否数字化改革项目 0:否 1:是") - private Integer isDigitalReform; - - @ApiModelProperty("综合业务领域") - private String bizDomain; - - @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") - private Integer buildLevel; - - @ApiModelProperty("立项依据") - private String buildBasis; - - @ApiModelProperty("发改编码") - private String developCode; - - @ApiModelProperty("财政编码") - private String financialCode; - - @ApiModelProperty("是否上云 0:否 1:是") - private Integer isCloud; - - private String cloudType; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer protectionLevel; - - @ApiModelProperty("是否密评 0:否 1:是") - private Integer isSecretComments; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("资金申报情况-申报金额(万元)") - private BigDecimal declareAmount; - - @ApiModelProperty("资金申报情况-自有金额(万元)") - private BigDecimal declareHaveAmount; - - @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") - private BigDecimal declareGovernmentOwnFinanceAmount; - - @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") - private BigDecimal declareGovernmentSuperiorFinanceAmount; - - @ApiModelProperty("银行贷款(万元)") - private BigDecimal declareBankLendingAmount; - - @ApiModelProperty("其它资金(万元)") - private BigDecimal declareOtherAmount; - - @ApiModelProperty("资金分配情况-软件开发(万元)") - private BigDecimal softwareDevelopmentAmount; - - @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") - private BigDecimal cloudHardwarePurchaseAmount; - - @ApiModelProperty("资金分配情况-第三方服务(万元)") - private BigDecimal thirdPartyAmount; - - @ApiModelProperty("年度支付计划-年度支付计划(万元)") - private BigDecimal annualPlanAmount; - - @ApiModelProperty("年度支付计划-自有金额(万元)") - private BigDecimal annualPlanHaveAmount; - - @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") - private BigDecimal annualPlanGovernmentOwnFinanceAmount; - - @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") - private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; - - @ApiModelProperty("年度支付计划-银行贷款(万元)") - private BigDecimal annualPlanBankLendingAmount; - - @ApiModelProperty("年度支付计划-其它资金(万元)") - private BigDecimal annualPlanOtherAmount; - - @ApiModelProperty("立项批复资金(万元)") - private BigDecimal approvalAmount; - - private LocalDateTime annualPlanAddTime; - - @ApiModelProperty("核心业务-核心业务模块") - private String coreBusiness; - - @ApiModelProperty("安全投入-投入项") - private String safetyInputTitle; - - @ApiModelProperty("安全投入-内容描述") - private String safetyInputDescribe; - - @ApiModelProperty("安全投入-金额(万元)") - private BigDecimal safetyInputAmount; - - @ApiModelProperty("附件-初步方案") - private String preliminaryPlanFile; - - @ApiModelProperty("附件-佐证材料") - private String supportingMaterialsFile; - - @ApiModelProperty("附件-项目总投资测算明细") - private String calculationTotalInvestmentFile; - - @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") - private String mainResponsibilitiesApplicantFile; - - @ApiModelProperty("备注") - private String projectRemarks; - - @ApiModelProperty("是否包含应用 0:否 1:是") - private Integer includeApplication; - - @ApiModelProperty("工程形象进度-第一季度") - private String engineeringSpeedOne; - - @ApiModelProperty("工程形象进度-第二季度") - private String engineeringSpeedTwo; - - @ApiModelProperty("工程形象进度-第三季度") - private String engineeringSpeedThree; - - @ApiModelProperty("工程形象进度-第四季度") - private String engineeringSpeedFour; - - @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") - private Boolean isOpenCoreBusiness; - - @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") - private Boolean isOpenSafetyInput; - - @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") - private Boolean isEngineeringSpeed; - - @ApiModelProperty("附件-是否开启 false:关闭 true:开启") - private Boolean isAccessories; - - @ApiModelProperty("备注-是否开启 false:关闭 true:开启") - private Boolean isRemarks; - - @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") - private Boolean isAnnualPlanAmount; - - @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") - private Boolean isInnovateWholeProvinceShare; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - @ApiModelProperty("流程实例编号") - private String instCode; - - @ApiModelProperty("安全投入-模块信息") - private String safetyInputModular; - - @ApiModelProperty("项目申报pdf") - private String projectPdf; - - @ApiModelProperty("立项申报pdf") - private String declarationPdf; - - @ApiModelProperty("建设周期(月)") - private String buildCycle; - - @ApiModelProperty("建设方案文件") - private String constructionPlanFile; - - @ApiModelProperty("立项批复文件") - private String approvedFile; - - @ApiModelProperty("批复金额") - private BigDecimal approvedTotalInvestmentIncrease; - - @ApiModelProperty("上级主管部门") - private String higherSuperUnit; - - @ApiModelProperty("上级主管部门Code") - private String higherSuperUnitCode; - - @ApiModelProperty("主管部门名称") - private String superUnit; - - @ApiModelProperty("主管部门Code") - private String superUnitCode; - - @ApiModelProperty("前端所需验证字段") - private Integer allApplicationsDone; - - @ApiModelProperty("项目一级状态 10000 20000 30000") - private Integer projectStatusFirst; - - @ApiModelProperty("项目二级状态") - private Integer projectStatusSecond; - - @ApiModelProperty("应用名称") - private String applicationName; - - @ApiModelProperty("关联IRS现有应用") - private String relatedExistsApplication; - - @ApiModelProperty("关联IRS现有应用-IRS应用编码") - private String relatedExistsApplicationCode; - - @ApiModelProperty("应用类型") - private String applicationType; - - @ApiModelProperty("是否统建应用 0:否 1:是") - private Integer isUniteBuild; - - @ApiModelProperty("统建类型 1:全省统建 2:全市统建") - private Integer unionBuildKind; - - @ApiModelProperty("是否数改系统 0:否 1:是") - private Integer isDigitalModification; - - @ApiModelProperty("数改系统") - private String digitalModification; - - @ApiModelProperty("发布端") - private String publishSide; - - @ApiModelProperty("是否一本账场景应用名称 0:否 1:是") - private Integer isAccountAppName; - - @ApiModelProperty("一本账应用名称") - private String accountAppName; - - @ApiModelProperty("领域大脑一本账") - private String domainBrainAccount; - - @ApiModelProperty("是否业务协同 0:否 1:是") - private Integer isBizCooperate; - - @ApiModelProperty("业务协同描述") - private String bizCooperateInfo; - - @ApiModelProperty("使用范围") - private String usesRangeRemark; - - @ApiModelProperty("应用简介") - private String applicationSummary; - - @ApiModelProperty("应用备注") - private String applicationRemark; - - @ApiModelProperty("应用总投资测算明细-文件") - private String applicationEstimateFile; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer secrecyGrade; - - @ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer passwordGrade; - - @ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") - private Integer nationalItSpec; - - @ApiModelProperty("是否使用政务云资源 0否 1是") - private Integer useGovCloud; - - @ApiModelProperty("云资源类型") - private String cloudsType; - - @ApiModelProperty("云资源基础规格") - private String cloudsFoundationSpecifications; - - @ApiModelProperty("云资源台数") - private Integer cloudsNumber; - - @ApiModelProperty("云资源用户描述") - private String cloudsDescription; - - @ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") - private Integer netEnv; - - @ApiModelProperty("是否使用公共数据 0否 1是") - private Integer useCommonData; - - @ApiModelProperty("数据名称") - private String dataName; - - @ApiModelProperty("是否使用公共组件 0否 1是") - private Integer useCommonComponent; - - @ApiModelProperty("使用的公共组件名称") - private String commonComponents; - - @ApiModelProperty("是否产生公共组件 0否 1是") - private Integer produceCommonComponent; - - @ApiModelProperty("预计产生组件名称") - private String produceCommonComponents; - - @ApiModelProperty("试点任务名称") - private String pilotTasksName; - - @ApiModelProperty("试点任务编号") - private String pilotTasksCode; - - @ApiModelProperty("所属重大应用名称") - private String importantTaskName; - - @ApiModelProperty("所属重大应用编号") - private String importantTaskCode; - - @ApiModelProperty("所属子场景应用名称") - private String subSceneApplicationName; - - @ApiModelProperty("试点文件") - private String experimentsFile; - - @ApiModelProperty("新增form内容") - private String formData; - - - private Long createBy; - private Long updateBy; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java deleted file mode 100644 index 2fa6883..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.ningdatech.pmapi.declared.entity.dto; - -import com.ningdatech.pmapi.projectlib.model.entity.Project; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.Map; - -/** - * @Classname DeclaredProjectDto - * @Description 申报项目 - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class DeclaredProjectDto implements Serializable { - - @NotNull - private Project projectInfo; - - private Map formData; - - @NotBlank - private String regionCode; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectListParamDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectListParamDto.java deleted file mode 100644 index 526e92d..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectListParamDto.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.ningdatech.pmapi.declared.entity.dto; - -import com.ningdatech.basic.model.PagePo; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @Classname DeclaredProjectParamDto - * @Description - * @Date 2023/2/1 14:52 - * @Author PoffyZhang - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class DeclaredProjectListParamDto extends PagePo { - - private String projectName; - - private Integer projectType; - - private Integer projectStatusFirst; - - private Integer projectStatusSecond; - - private Integer projectYear; - - private String startTime; - - private String endTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/vo/ProjectDraftVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/vo/ProjectDraftVo.java deleted file mode 100644 index c62730e..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/vo/ProjectDraftVo.java +++ /dev/null @@ -1,412 +0,0 @@ -package com.ningdatech.pmapi.declared.entity.vo; - -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.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - *

- * 项目草稿箱 - *

- * - * @author zpf - * @since 2023-02-06 - */ -@ApiModel(value = "NdProjectDraft对象", description = "") -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class ProjectDraftVo implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("应用ID") - @TableId(type = IdType.AUTO) - private Long id; - - @ApiModelProperty("所属地区编号") - private String areaCode; - - @ApiModelProperty("所属地区名称") - private String area; - - @ApiModelProperty("项目阶段") - private Integer stage; - - @ApiModelProperty("项目状态") - private Integer status; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("是否临时增补 0:否 1:是") - private Integer isTemporaryAugment; - - @ApiModelProperty("项目负责人") - private String responsibleMan; - - @ApiModelProperty("负责人手机号码") - private String responsibleManMobile; - - @ApiModelProperty("项目联系人") - private String contactName; - - @ApiModelProperty("项目联系人手机号码") - private String contactPhone; - - @ApiModelProperty("建设单位名称") - private String buildUnitName; - - @ApiModelProperty("建设单位统一社会信用代码") - private String buildUnitCode; - - @ApiModelProperty("建设单位浙政钉ID") - private String buildUnitZheJiangGovernmentDingId; - - @ApiModelProperty("项目类型 1:建设 2:运维") - private Integer projectType; - - @ApiModelProperty("是否首次新建 0:否 1:是") - private Integer isFirst; - - @ApiModelProperty("项目预算年度") - private Integer projectYear; - - @ApiModelProperty("项目建设起始时间") - private String beginTime; - - @ApiModelProperty("项目建设终止时间") - private String endTime; - - @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") - private Integer fourSystems; - - @ApiModelProperty("是否数字化改革项目 0:否 1:是") - private Integer isDigitalReform; - - @ApiModelProperty("综合业务领域") - private String bizDomain; - - @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") - private Integer buildLevel; - - @ApiModelProperty("立项依据") - private String buildBasis; - - @ApiModelProperty("发改编码") - private String developCode; - - @ApiModelProperty("财政编码") - private String financialCode; - - @ApiModelProperty("是否上云 0:否 1:是") - private Integer isCloud; - - private String cloudType; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer protectionLevel; - - @ApiModelProperty("是否密评 0:否 1:是") - private Integer isSecretComments; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("资金申报情况-申报金额(万元)") - private BigDecimal declareAmount; - - @ApiModelProperty("资金申报情况-自有金额(万元)") - private BigDecimal declareHaveAmount; - - @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") - private BigDecimal declareGovernmentOwnFinanceAmount; - - @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") - private BigDecimal declareGovernmentSuperiorFinanceAmount; - - @ApiModelProperty("银行贷款(万元)") - private BigDecimal declareBankLendingAmount; - - @ApiModelProperty("其它资金(万元)") - private BigDecimal declareOtherAmount; - - @ApiModelProperty("资金分配情况-软件开发(万元)") - private BigDecimal softwareDevelopmentAmount; - - @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") - private BigDecimal cloudHardwarePurchaseAmount; - - @ApiModelProperty("资金分配情况-第三方服务(万元)") - private BigDecimal thirdPartyAmount; - - @ApiModelProperty("年度支付计划-年度支付计划(万元)") - private BigDecimal annualPlanAmount; - - @ApiModelProperty("年度支付计划-自有金额(万元)") - private BigDecimal annualPlanHaveAmount; - - @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") - private BigDecimal annualPlanGovernmentOwnFinanceAmount; - - @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") - private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; - - @ApiModelProperty("年度支付计划-银行贷款(万元)") - private BigDecimal annualPlanBankLendingAmount; - - @ApiModelProperty("年度支付计划-其它资金(万元)") - private BigDecimal annualPlanOtherAmount; - - @ApiModelProperty("立项批复资金(万元)") - private BigDecimal approvalAmount; - - private LocalDateTime annualPlanAddTime; - - @ApiModelProperty("核心业务-核心业务模块") - private String coreBusiness; - - @ApiModelProperty("安全投入-投入项") - private String safetyInputTitle; - - @ApiModelProperty("安全投入-内容描述") - private String safetyInputDescribe; - - @ApiModelProperty("安全投入-金额(万元)") - private BigDecimal safetyInputAmount; - - @ApiModelProperty("附件-初步方案") - private String preliminaryPlanFile; - - @ApiModelProperty("附件-佐证材料") - private String supportingMaterialsFile; - - @ApiModelProperty("附件-项目总投资测算明细") - private String calculationTotalInvestmentFile; - - @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") - private String mainResponsibilitiesApplicantFile; - - @ApiModelProperty("备注") - private String projectRemarks; - - @ApiModelProperty("是否包含应用 0:否 1:是") - private Integer includeApplication; - - @ApiModelProperty("工程形象进度-第一季度") - private String engineeringSpeedOne; - - @ApiModelProperty("工程形象进度-第二季度") - private String engineeringSpeedTwo; - - @ApiModelProperty("工程形象进度-第三季度") - private String engineeringSpeedThree; - - @ApiModelProperty("工程形象进度-第四季度") - private String engineeringSpeedFour; - - @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") - private Boolean isOpenCoreBusiness; - - @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") - private Boolean isOpenSafetyInput; - - @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") - private Boolean isEngineeringSpeed; - - @ApiModelProperty("附件-是否开启 false:关闭 true:开启") - private Boolean isAccessories; - - @ApiModelProperty("备注-是否开启 false:关闭 true:开启") - private Boolean isRemarks; - - @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") - private Boolean isAnnualPlanAmount; - - @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") - private Boolean isInnovateWholeProvinceShare; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - @ApiModelProperty("流程实例编号") - private String instCode; - - @ApiModelProperty("安全投入-模块信息") - private String safetyInputModular; - - @ApiModelProperty("项目申报pdf") - private String projectPdf; - - @ApiModelProperty("立项申报pdf") - private String declarationPdf; - - @ApiModelProperty("建设周期(月)") - private String buildCycle; - - @ApiModelProperty("建设方案文件") - private String constructionPlanFile; - - @ApiModelProperty("立项批复文件") - private String approvedFile; - - @ApiModelProperty("批复金额") - private BigDecimal approvedTotalInvestmentIncrease; - - @ApiModelProperty("上级主管部门") - private String higherSuperUnit; - - @ApiModelProperty("上级主管部门Code") - private String higherSuperUnitCode; - - @ApiModelProperty("主管部门名称") - private String superUnit; - - @ApiModelProperty("主管部门Code") - private String superUnitCode; - - @ApiModelProperty("前端所需验证字段") - private Integer allApplicationsDone; - - @ApiModelProperty("项目一级状态 10000 20000 30000") - private Integer projectStatusFirst; - - @ApiModelProperty("项目二级状态") - private Integer projectStatusSecond; - - @ApiModelProperty("应用名称") - private String applicationName; - - @ApiModelProperty("关联IRS现有应用") - private String relatedExistsApplication; - - @ApiModelProperty("关联IRS现有应用-IRS应用编码") - private String relatedExistsApplicationCode; - - @ApiModelProperty("应用类型") - private String applicationType; - - @ApiModelProperty("是否统建应用 0:否 1:是") - private Integer isUniteBuild; - - @ApiModelProperty("统建类型 1:全省统建 2:全市统建") - private Integer unionBuildKind; - - @ApiModelProperty("是否数改系统 0:否 1:是") - private Integer isDigitalModification; - - @ApiModelProperty("数改系统") - private String digitalModification; - - @ApiModelProperty("发布端") - private String publishSide; - - @ApiModelProperty("是否一本账场景应用名称 0:否 1:是") - private Integer isAccountAppName; - - @ApiModelProperty("一本账应用名称") - private String accountAppName; - - @ApiModelProperty("领域大脑一本账") - private String domainBrainAccount; - - @ApiModelProperty("是否业务协同 0:否 1:是") - private Integer isBizCooperate; - - @ApiModelProperty("业务协同描述") - private String bizCooperateInfo; - - @ApiModelProperty("使用范围") - private String usesRangeRemark; - - @ApiModelProperty("应用简介") - private String applicationSummary; - - @ApiModelProperty("应用备注") - private String applicationRemark; - - @ApiModelProperty("应用总投资测算明细-文件") - private String applicationEstimateFile; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer secrecyGrade; - - @ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer passwordGrade; - - @ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") - private Integer nationalItSpec; - - @ApiModelProperty("是否使用政务云资源 0否 1是") - private Integer useGovCloud; - - @ApiModelProperty("云资源类型") - private String cloudsType; - - @ApiModelProperty("云资源基础规格") - private String cloudsFoundationSpecifications; - - @ApiModelProperty("云资源台数") - private Integer cloudsNumber; - - @ApiModelProperty("云资源用户描述") - private String cloudsDescription; - - @ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") - private Integer netEnv; - - @ApiModelProperty("是否使用公共数据 0否 1是") - private Integer useCommonData; - - @ApiModelProperty("数据名称") - private String dataName; - - @ApiModelProperty("是否使用公共组件 0否 1是") - private Integer useCommonComponent; - - @ApiModelProperty("使用的公共组件名称") - private String commonComponents; - - @ApiModelProperty("是否产生公共组件 0否 1是") - private Integer produceCommonComponent; - - @ApiModelProperty("预计产生组件名称") - private String produceCommonComponents; - - @ApiModelProperty("试点任务名称") - private String pilotTasksName; - - @ApiModelProperty("试点任务编号") - private String pilotTasksCode; - - @ApiModelProperty("所属重大应用名称") - private String importantTaskName; - - @ApiModelProperty("所属重大应用编号") - private String importantTaskCode; - - @ApiModelProperty("所属子场景应用名称") - private String subSceneApplicationName; - - @ApiModelProperty("试点文件") - private String experimentsFile; - - @ApiModelProperty("新增form内容") - private String formData; - - - private Long createBy; - private Long updateBy; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java deleted file mode 100644 index a21c58b..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.ningdatech.pmapi.declared.manage; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.TypeReference; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.declared.entity.ProjectDraft; -import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectDto; -import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; -import com.ningdatech.pmapi.declared.entity.vo.ProjectDraftVo; -import com.ningdatech.pmapi.declared.service.IProjectDraftService; -import com.ningdatech.pmapi.projectlib.enums.ProjectStatusEnum; -import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.projectlib.service.IProjectService; -import com.wflow.bean.entity.WflowModels; -import com.wflow.exception.BusinessException; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import com.wflow.workflow.bean.vo.ProcessStartParamsVo; -import com.wflow.workflow.service.ProcessInstanceService; -import com.wflow.workflow.service.ProcessModelService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.BeanUtils; -import org.springframework.stereotype.Component; - -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAccessor; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * @Classname DeclaredProjectManage - * @Description - * @Date 2023/2/1 14:48 - * @Author PoffyZhang - */ -@Component -@Slf4j -@RequiredArgsConstructor -public class DeclaredProjectManage { - - private final IProjectService projectService; - - private final IProjectDraftService projectDraftService; - - private final ProcessInstanceService processService; - - private final ProcessModelService processModelService; - - public PageVo page(DeclaredProjectListParamDto params) { - Page page = params.page(); - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class) - .ge(Objects.nonNull(params.getStartTime()), Project::getCreateOn, params.getStartTime()) - .le(Objects.nonNull(params.getEndTime()), Project::getCreateOn, params.getEndTime()) - .eq(Objects.nonNull(params.getProjectType()), Project::getProjectType, params.getProjectType()) - .eq(Objects.nonNull(params.getProjectYear()), Project::getProjectYear, params.getProjectYear()) - .eq(Objects.nonNull(params.getProjectStatusFirst()), Project::getProjectStatusFirst, params.getProjectStatusFirst()) - .eq(Objects.nonNull(params.getProjectStatusSecond()), Project::getProjectStatusSecond, params.getProjectStatusSecond()) - .like(StringUtils.isNotBlank(params.getProjectName()), Project::getProjectName, params.getProjectName()) - .orderByDesc(Project::getUpdateOn); - projectService.page(page,wrapper); - if(0L == page.getTotal()){ - return PageVo.empty(); - } - List res = page.getRecords().stream().map(record -> { - ProjectLibListItemVO vo = new ProjectLibListItemVO(); - BeanUtils.copyProperties(record, vo); - return vo; - }).collect(Collectors.toList()); - return PageVo.of(res,page.getTotal()); - } - - public PageVo pageDraft(DeclaredProjectListParamDto params) { - Page page = params.page(); - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(ProjectDraft.class) - .ge(Objects.nonNull(params.getStartTime()), ProjectDraft::getCreateOn, params.getStartTime()) - .le(Objects.nonNull(params.getEndTime()), ProjectDraft::getCreateOn, params.getEndTime()) - .eq(Objects.nonNull(params.getProjectType()), ProjectDraft::getProjectType, params.getProjectType()) - .eq(Objects.nonNull(params.getProjectYear()), ProjectDraft::getProjectYear, params.getProjectYear()) - .eq(Objects.nonNull(params.getProjectStatusFirst()), ProjectDraft::getProjectStatusFirst, params.getProjectStatusFirst()) - .eq(Objects.nonNull(params.getProjectStatusSecond()), ProjectDraft::getProjectStatusSecond, params.getProjectStatusSecond()) - .like(StringUtils.isNotBlank(params.getProjectName()), ProjectDraft::getProjectName, params.getProjectName()) - .orderByDesc(ProjectDraft::getUpdateOn); - projectDraftService.page(page,wrapper); - if(0L == page.getTotal()){ - return PageVo.empty(); - } - List res = page.getRecords().stream().map(record -> { - ProjectDraftVo vo = new ProjectDraftVo(); - BeanUtils.copyProperties(record, vo); - return vo; - }).collect(Collectors.toList()); - return PageVo.of(res,page.getTotal()); - } - - /** - * 启动实例 - * @param dto - * @return - */ - public String startTheProcess(DeclaredProjectDto dto) { - String regionCode = dto.getRegionCode(); - - WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) - .eq(WflowModels::getRegionCode, regionCode) - .eq(WflowModels::getFormName, "单位内部审批流程") - .last("limit 1")); - - if(Objects.isNull(model)){ - throw new BusinessException(String.format("此 【%s】区域找不到流程配置",regionCode)); - } - - ProcessStartParamsVo params = new ProcessStartParamsVo(); - ProcessInstanceUserDto user = new ProcessInstanceUserDto(); - user.setOrgCode("6179678"); - user.setOrgName("数转办"); - user.setUserId("381496"); - user.setUserName("旅人"); - params.setUser(user); - params.setProcessUsers(Collections.emptyMap()); - dto.getFormData().putAll( - JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference>() { - })); - params.setFormData(dto.getFormData()); - String instanceId = processService.startProcess(model.getProcessDefId(), params); - - //流程启动之后 入库项目 重要业务信息 用于列表查询 展示 - try{ - Project project = new Project(); - BeanUtils.copyProperties(dto.getProjectInfo(),project); - project.setCreateOn(LocalDateTime.now()); - project.setUpdateOn(LocalDateTime.now()); - project.setAreaCode(regionCode); - project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode()); - project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); - project.setInstCode(instanceId); - projectService.save(project); - }catch (Exception e){ - log.error("项目信息入库错误 ",e); - throw new BusinessException("项目信息入库错误 请注意格式"); - } - - return instanceId; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.java deleted file mode 100644 index a77d3d3..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ningdatech.pmapi.declared.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.declared.entity.ProjectDraft; -import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; - -/** - *

- * Mapper 接口 - *

- * - * @author zpf - * @since 2023-02-05 - */ -public interface ProjectDraftMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.xml deleted file mode 100644 index bc0e1c9..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/mapper/ProjectDraftMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/IProjectDraftService.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/IProjectDraftService.java deleted file mode 100644 index 0b72854..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/IProjectDraftService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ningdatech.pmapi.declared.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.declared.entity.ProjectDraft; -import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; - -/** - *

- * 服务类 - *

- * - * @author zpf - * @since 2023-02-05 - */ -public interface IProjectDraftService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/impl/ProjectDraftServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/impl/ProjectDraftServiceImpl.java deleted file mode 100644 index 0326af7..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/service/impl/ProjectDraftServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ningdatech.pmapi.declared.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ningdatech.pmapi.declared.entity.ProjectDraft; -import com.ningdatech.pmapi.declared.mapper.ProjectDraftMapper; -import com.ningdatech.pmapi.declared.service.IProjectDraftService; -import com.ningdatech.pmapi.projectlib.mapper.ProjectApplicationMapper; -import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; -import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author zpf - * @since 2023-02-05 - */ -@Service -public class ProjectDraftServiceImpl extends ServiceImpl - implements IProjectDraftService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java new file mode 100644 index 0000000..3823342 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java @@ -0,0 +1,62 @@ +package com.ningdatech.pmapi.projectdeclared.controller; + +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; +import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; +import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; +import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * @Classname DeclaredProjectController + * @Description 申报项目 + * @Date 2023/1/31 11:29 + * @Author PoffyZhang + */ +@Slf4j +@Validated +@RestController +@RequestMapping("/api/v1/declared") +@Api(value = "DeclaredProject", tags = "申报管理-申报项目") +@RequiredArgsConstructor +public class DeclaredProjectController { + private final DeclaredProjectManage declaredProjectManage; + + @ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") + @GetMapping("/list") + public PageVo list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; + return declaredProjectManage.page(params); + } + + @ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") + @GetMapping("/draft") + public PageVo draft(@Validated @ModelAttribute DeclaredProjectListParamDto params) { + return declaredProjectManage.pageDraft(params); + } + + @ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情") + @GetMapping("/draft-detail/{id}") + public ProjectDraftVo draftDatail(@PathVariable Long id) { + return declaredProjectManage.draftDatail(id); + } + + @ApiOperation(value = "申报项目保存至草稿箱", notes = "申报项目保存至草稿箱") + @PostMapping("/save-to-draft") + public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDto dto) { + return declaredProjectManage.saveToDraft(dto); + } + + @ApiOperation(value = "申报项目", notes = "申报项目") + @PostMapping("/start") + public String startTheProcess(@Validated @RequestBody DeclaredProjectDto dto) { + String instanceId = declaredProjectManage.startTheProcess(dto); + return "启动流程实例 " + instanceId + " 成功"; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/ProjectDraft.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/ProjectDraft.java new file mode 100644 index 0000000..db0a88f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/ProjectDraft.java @@ -0,0 +1,413 @@ +package com.ningdatech.pmapi.projectdeclared.entity; + +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.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 项目草稿箱 + *

+ * + * @author zpf + * @since 2023-02-06 + */ +@TableName("nd_project_draft") +@ApiModel(value = "NdProjectDraft对象", description = "") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectDraft implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("应用ID") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("所属地区编号") + private String areaCode; + + @ApiModelProperty("所属地区名称") + private String area; + + @ApiModelProperty("项目阶段") + private Integer stage; + + @ApiModelProperty("项目状态") + private Integer status; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + + @ApiModelProperty("项目负责人") + private String responsibleMan; + + @ApiModelProperty("负责人手机号码") + private String responsibleManMobile; + + @ApiModelProperty("项目联系人") + private String contactName; + + @ApiModelProperty("项目联系人手机号码") + private String contactPhone; + + @ApiModelProperty("建设单位名称") + private String buildUnitName; + + @ApiModelProperty("建设单位统一社会信用代码") + private String buildUnitCode; + + @ApiModelProperty("建设单位浙政钉ID") + private String buildUnitZheJiangGovernmentDingId; + + @ApiModelProperty("项目类型 1:建设 2:运维") + private Integer projectType; + + @ApiModelProperty("是否首次新建 0:否 1:是") + private Integer isFirst; + + @ApiModelProperty("项目预算年度") + private Integer projectYear; + + @ApiModelProperty("项目建设起始时间") + private String beginTime; + + @ApiModelProperty("项目建设终止时间") + private String endTime; + + @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") + private Integer fourSystems; + + @ApiModelProperty("是否数字化改革项目 0:否 1:是") + private Integer isDigitalReform; + + @ApiModelProperty("综合业务领域") + private String bizDomain; + + @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") + private Integer buildLevel; + + @ApiModelProperty("立项依据") + private String buildBasis; + + @ApiModelProperty("发改编码") + private String developCode; + + @ApiModelProperty("财政编码") + private String financialCode; + + @ApiModelProperty("是否上云 0:否 1:是") + private Integer isCloud; + + private String cloudType; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer protectionLevel; + + @ApiModelProperty("是否密评 0:否 1:是") + private Integer isSecretComments; + + @ApiModelProperty("项目简介") + private String projectIntroduction; + + @ApiModelProperty("资金申报情况-申报金额(万元)") + private BigDecimal declareAmount; + + @ApiModelProperty("资金申报情况-自有金额(万元)") + private BigDecimal declareHaveAmount; + + @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") + private BigDecimal declareGovernmentOwnFinanceAmount; + + @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") + private BigDecimal declareGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("银行贷款(万元)") + private BigDecimal declareBankLendingAmount; + + @ApiModelProperty("其它资金(万元)") + private BigDecimal declareOtherAmount; + + @ApiModelProperty("资金分配情况-软件开发(万元)") + private BigDecimal softwareDevelopmentAmount; + + @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") + private BigDecimal cloudHardwarePurchaseAmount; + + @ApiModelProperty("资金分配情况-第三方服务(万元)") + private BigDecimal thirdPartyAmount; + + @ApiModelProperty("年度支付计划-年度支付计划(万元)") + private BigDecimal annualPlanAmount; + + @ApiModelProperty("年度支付计划-自有金额(万元)") + private BigDecimal annualPlanHaveAmount; + + @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") + private BigDecimal annualPlanGovernmentOwnFinanceAmount; + + @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") + private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("年度支付计划-银行贷款(万元)") + private BigDecimal annualPlanBankLendingAmount; + + @ApiModelProperty("年度支付计划-其它资金(万元)") + private BigDecimal annualPlanOtherAmount; + + @ApiModelProperty("立项批复资金(万元)") + private BigDecimal approvalAmount; + + private LocalDateTime annualPlanAddTime; + + @ApiModelProperty("核心业务-核心业务模块") + private String coreBusiness; + + @ApiModelProperty("安全投入-投入项") + private String safetyInputTitle; + + @ApiModelProperty("安全投入-内容描述") + private String safetyInputDescribe; + + @ApiModelProperty("安全投入-金额(万元)") + private BigDecimal safetyInputAmount; + + @ApiModelProperty("附件-初步方案") + private String preliminaryPlanFile; + + @ApiModelProperty("附件-佐证材料") + private String supportingMaterialsFile; + + @ApiModelProperty("附件-项目总投资测算明细") + private String calculationTotalInvestmentFile; + + @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") + private String mainResponsibilitiesApplicantFile; + + @ApiModelProperty("备注") + private String projectRemarks; + + @ApiModelProperty("是否包含应用 0:否 1:是") + private Integer includeApplication; + + @ApiModelProperty("工程形象进度-第一季度") + private String engineeringSpeedOne; + + @ApiModelProperty("工程形象进度-第二季度") + private String engineeringSpeedTwo; + + @ApiModelProperty("工程形象进度-第三季度") + private String engineeringSpeedThree; + + @ApiModelProperty("工程形象进度-第四季度") + private String engineeringSpeedFour; + + @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") + private Boolean isOpenCoreBusiness; + + @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") + private Boolean isOpenSafetyInput; + + @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") + private Boolean isEngineeringSpeed; + + @ApiModelProperty("附件-是否开启 false:关闭 true:开启") + private Boolean isAccessories; + + @ApiModelProperty("备注-是否开启 false:关闭 true:开启") + private Boolean isRemarks; + + @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") + private Boolean isAnnualPlanAmount; + + @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") + private Boolean isInnovateWholeProvinceShare; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + @ApiModelProperty("流程实例编号") + private String instCode; + + @ApiModelProperty("安全投入-模块信息") + private String safetyInputModular; + + @ApiModelProperty("项目申报pdf") + private String projectPdf; + + @ApiModelProperty("立项申报pdf") + private String declarationPdf; + + @ApiModelProperty("建设周期(月)") + private String buildCycle; + + @ApiModelProperty("建设方案文件") + private String constructionPlanFile; + + @ApiModelProperty("立项批复文件") + private String approvedFile; + + @ApiModelProperty("批复金额") + private BigDecimal approvedTotalInvestmentIncrease; + + @ApiModelProperty("上级主管部门") + private String higherSuperUnit; + + @ApiModelProperty("上级主管部门Code") + private String higherSuperUnitCode; + + @ApiModelProperty("主管部门名称") + private String superUnit; + + @ApiModelProperty("主管部门Code") + private String superUnitCode; + + @ApiModelProperty("前端所需验证字段") + private Integer allApplicationsDone; + + @ApiModelProperty("项目一级状态 10000 20000 30000") + private Integer projectStatusFirst; + + @ApiModelProperty("项目二级状态") + private Integer projectStatusSecond; + + @ApiModelProperty("应用名称") + private String applicationName; + + @ApiModelProperty("关联IRS现有应用") + private String relatedExistsApplication; + + @ApiModelProperty("关联IRS现有应用-IRS应用编码") + private String relatedExistsApplicationCode; + + @ApiModelProperty("应用类型") + private String applicationType; + + @ApiModelProperty("是否统建应用 0:否 1:是") + private Integer isUniteBuild; + + @ApiModelProperty("统建类型 1:全省统建 2:全市统建") + private Integer unionBuildKind; + + @ApiModelProperty("是否数改系统 0:否 1:是") + private Integer isDigitalModification; + + @ApiModelProperty("数改系统") + private String digitalModification; + + @ApiModelProperty("发布端") + private String publishSide; + + @ApiModelProperty("是否一本账场景应用名称 0:否 1:是") + private Integer isAccountAppName; + + @ApiModelProperty("一本账应用名称") + private String accountAppName; + + @ApiModelProperty("领域大脑一本账") + private String domainBrainAccount; + + @ApiModelProperty("是否业务协同 0:否 1:是") + private Integer isBizCooperate; + + @ApiModelProperty("业务协同描述") + private String bizCooperateInfo; + + @ApiModelProperty("使用范围") + private String usesRangeRemark; + + @ApiModelProperty("应用简介") + private String applicationSummary; + + @ApiModelProperty("应用备注") + private String applicationRemark; + + @ApiModelProperty("应用总投资测算明细-文件") + private String applicationEstimateFile; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer secrecyGrade; + + @ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer passwordGrade; + + @ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") + private Integer nationalItSpec; + + @ApiModelProperty("是否使用政务云资源 0否 1是") + private Integer useGovCloud; + + @ApiModelProperty("云资源类型") + private String cloudsType; + + @ApiModelProperty("云资源基础规格") + private String cloudsFoundationSpecifications; + + @ApiModelProperty("云资源台数") + private Integer cloudsNumber; + + @ApiModelProperty("云资源用户描述") + private String cloudsDescription; + + @ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") + private Integer netEnv; + + @ApiModelProperty("是否使用公共数据 0否 1是") + private Integer useCommonData; + + @ApiModelProperty("数据名称") + private String dataName; + + @ApiModelProperty("是否使用公共组件 0否 1是") + private Integer useCommonComponent; + + @ApiModelProperty("使用的公共组件名称") + private String commonComponents; + + @ApiModelProperty("是否产生公共组件 0否 1是") + private Integer produceCommonComponent; + + @ApiModelProperty("预计产生组件名称") + private String produceCommonComponents; + + @ApiModelProperty("试点任务名称") + private String pilotTasksName; + + @ApiModelProperty("试点任务编号") + private String pilotTasksCode; + + @ApiModelProperty("所属重大应用名称") + private String importantTaskName; + + @ApiModelProperty("所属重大应用编号") + private String importantTaskCode; + + @ApiModelProperty("所属子场景应用名称") + private String subSceneApplicationName; + + @ApiModelProperty("试点文件") + private String experimentsFile; + + @ApiModelProperty("新增form内容") + private String formData; + + + private Long createBy; + private Long updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java new file mode 100644 index 0000000..b1eb3008 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java @@ -0,0 +1,33 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Map; + +/** + * @Classname DeclaredProjectDto + * @Description 申报项目 + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DeclaredProjectDto implements Serializable { + + @NotNull + private Project projectInfo; + + private Map formData; + + @NotBlank + private String regionCode; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java new file mode 100644 index 0000000..cfb3ead --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.projectdeclared.entity.dto; + +import com.ningdatech.basic.model.PagePo; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Classname DeclaredProjectParamDto + * @Description + * @Date 2023/2/1 14:52 + * @Author PoffyZhang + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DeclaredProjectListParamDto extends PagePo { + + private String projectName; + + private Integer projectType; + + private Integer projectStatusFirst; + + private Integer projectStatusSecond; + + private Integer projectYear; + + private String startTime; + + private String endTime; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java new file mode 100644 index 0000000..28f1785 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java @@ -0,0 +1,398 @@ +package com.ningdatech.pmapi.projectdeclared.entity.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.*; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 项目草稿箱 + *

+ * + * @author zpf + * @since 2023-02-06 + */ +@ApiModel(value = "NdProjectDraftDto", description = "") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@ToString +public class ProjectDraftSaveDto implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("应用ID 新增为空") + private Long id; + + @ApiModelProperty("所属地区编号") + private String areaCode; + + @ApiModelProperty("所属地区名称") + private String area; + + @ApiModelProperty("项目阶段") + private Integer stage; + + @ApiModelProperty("项目状态") + private Integer status; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + + @ApiModelProperty("项目负责人") + private String responsibleMan; + + @ApiModelProperty("负责人手机号码") + private String responsibleManMobile; + + @ApiModelProperty("项目联系人") + private String contactName; + + @ApiModelProperty("项目联系人手机号码") + private String contactPhone; + + @ApiModelProperty("建设单位名称") + private String buildUnitName; + + @ApiModelProperty("建设单位统一社会信用代码") + private String buildUnitCode; + + @ApiModelProperty("建设单位浙政钉ID") + private String buildUnitZheJiangGovernmentDingId; + + @ApiModelProperty("项目类型 1:建设 2:运维") + private Integer projectType; + + @ApiModelProperty("是否首次新建 0:否 1:是") + private Integer isFirst; + + @ApiModelProperty("项目预算年度") + private Integer projectYear; + + @ApiModelProperty("项目建设起始时间") + private String beginTime; + + @ApiModelProperty("项目建设终止时间") + private String endTime; + + @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") + private Integer fourSystems; + + @ApiModelProperty("是否数字化改革项目 0:否 1:是") + private Integer isDigitalReform; + + @ApiModelProperty("综合业务领域") + private String bizDomain; + + @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") + private Integer buildLevel; + + @ApiModelProperty("立项依据") + private String buildBasis; + + @ApiModelProperty("发改编码") + private String developCode; + + @ApiModelProperty("财政编码") + private String financialCode; + + @ApiModelProperty("是否上云 0:否 1:是") + private Integer isCloud; + + private String cloudType; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer protectionLevel; + + @ApiModelProperty("是否密评 0:否 1:是") + private Integer isSecretComments; + + @ApiModelProperty("项目简介") + private String projectIntroduction; + + @ApiModelProperty("资金申报情况-申报金额(万元)") + private BigDecimal declareAmount; + + @ApiModelProperty("资金申报情况-自有金额(万元)") + private BigDecimal declareHaveAmount; + + @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") + private BigDecimal declareGovernmentOwnFinanceAmount; + + @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") + private BigDecimal declareGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("银行贷款(万元)") + private BigDecimal declareBankLendingAmount; + + @ApiModelProperty("其它资金(万元)") + private BigDecimal declareOtherAmount; + + @ApiModelProperty("资金分配情况-软件开发(万元)") + private BigDecimal softwareDevelopmentAmount; + + @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") + private BigDecimal cloudHardwarePurchaseAmount; + + @ApiModelProperty("资金分配情况-第三方服务(万元)") + private BigDecimal thirdPartyAmount; + + @ApiModelProperty("年度支付计划-年度支付计划(万元)") + private BigDecimal annualPlanAmount; + + @ApiModelProperty("年度支付计划-自有金额(万元)") + private BigDecimal annualPlanHaveAmount; + + @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") + private BigDecimal annualPlanGovernmentOwnFinanceAmount; + + @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") + private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("年度支付计划-银行贷款(万元)") + private BigDecimal annualPlanBankLendingAmount; + + @ApiModelProperty("年度支付计划-其它资金(万元)") + private BigDecimal annualPlanOtherAmount; + + @ApiModelProperty("立项批复资金(万元)") + private BigDecimal approvalAmount; + + private LocalDateTime annualPlanAddTime; + + @ApiModelProperty("核心业务-核心业务模块") + private String coreBusiness; + + @ApiModelProperty("安全投入-投入项") + private String safetyInputTitle; + + @ApiModelProperty("安全投入-内容描述") + private String safetyInputDescribe; + + @ApiModelProperty("安全投入-金额(万元)") + private BigDecimal safetyInputAmount; + + @ApiModelProperty("附件-初步方案") + private String preliminaryPlanFile; + + @ApiModelProperty("附件-佐证材料") + private String supportingMaterialsFile; + + @ApiModelProperty("附件-项目总投资测算明细") + private String calculationTotalInvestmentFile; + + @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") + private String mainResponsibilitiesApplicantFile; + + @ApiModelProperty("备注") + private String projectRemarks; + + @ApiModelProperty("是否包含应用 0:否 1:是") + private Integer includeApplication; + + @ApiModelProperty("工程形象进度-第一季度") + private String engineeringSpeedOne; + + @ApiModelProperty("工程形象进度-第二季度") + private String engineeringSpeedTwo; + + @ApiModelProperty("工程形象进度-第三季度") + private String engineeringSpeedThree; + + @ApiModelProperty("工程形象进度-第四季度") + private String engineeringSpeedFour; + + @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") + private Boolean isOpenCoreBusiness; + + @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") + private Boolean isOpenSafetyInput; + + @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") + private Boolean isEngineeringSpeed; + + @ApiModelProperty("附件-是否开启 false:关闭 true:开启") + private Boolean isAccessories; + + @ApiModelProperty("备注-是否开启 false:关闭 true:开启") + private Boolean isRemarks; + + @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") + private Boolean isAnnualPlanAmount; + + @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") + private Boolean isInnovateWholeProvinceShare; + + @ApiModelProperty("安全投入-模块信息") + private String safetyInputModular; + + @ApiModelProperty("项目申报pdf") + private String projectPdf; + + @ApiModelProperty("立项申报pdf") + private String declarationPdf; + + @ApiModelProperty("建设周期(月)") + private String buildCycle; + + @ApiModelProperty("建设方案文件") + private String constructionPlanFile; + + @ApiModelProperty("立项批复文件") + private String approvedFile; + + @ApiModelProperty("批复金额") + private BigDecimal approvedTotalInvestmentIncrease; + + @ApiModelProperty("上级主管部门") + private String higherSuperUnit; + + @ApiModelProperty("上级主管部门Code") + private String higherSuperUnitCode; + + @ApiModelProperty("主管部门名称") + private String superUnit; + + @ApiModelProperty("主管部门Code") + private String superUnitCode; + + @ApiModelProperty("前端所需验证字段") + private Integer allApplicationsDone; + + @ApiModelProperty("项目一级状态 10000 20000 30000") + private Integer projectStatusFirst; + + @ApiModelProperty("项目二级状态") + private Integer projectStatusSecond; + + @ApiModelProperty("应用名称") + private String applicationName; + + @ApiModelProperty("关联IRS现有应用") + private String relatedExistsApplication; + + @ApiModelProperty("关联IRS现有应用-IRS应用编码") + private String relatedExistsApplicationCode; + + @ApiModelProperty("应用类型") + private String applicationType; + + @ApiModelProperty("是否统建应用 0:否 1:是") + private Integer isUniteBuild; + + @ApiModelProperty("统建类型 1:全省统建 2:全市统建") + private Integer unionBuildKind; + + @ApiModelProperty("是否数改系统 0:否 1:是") + private Integer isDigitalModification; + + @ApiModelProperty("数改系统") + private String digitalModification; + + @ApiModelProperty("发布端") + private String publishSide; + + @ApiModelProperty("是否一本账场景应用名称 0:否 1:是") + private Integer isAccountAppName; + + @ApiModelProperty("一本账应用名称") + private String accountAppName; + + @ApiModelProperty("领域大脑一本账") + private String domainBrainAccount; + + @ApiModelProperty("是否业务协同 0:否 1:是") + private Integer isBizCooperate; + + @ApiModelProperty("业务协同描述") + private String bizCooperateInfo; + + @ApiModelProperty("使用范围") + private String usesRangeRemark; + + @ApiModelProperty("应用简介") + private String applicationSummary; + + @ApiModelProperty("应用备注") + private String applicationRemark; + + @ApiModelProperty("应用总投资测算明细-文件") + private String applicationEstimateFile; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer secrecyGrade; + + @ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer passwordGrade; + + @ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") + private Integer nationalItSpec; + + @ApiModelProperty("是否使用政务云资源 0否 1是") + private Integer useGovCloud; + + @ApiModelProperty("云资源类型") + private String cloudsType; + + @ApiModelProperty("云资源基础规格") + private String cloudsFoundationSpecifications; + + @ApiModelProperty("云资源台数") + private Integer cloudsNumber; + + @ApiModelProperty("云资源用户描述") + private String cloudsDescription; + + @ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") + private Integer netEnv; + + @ApiModelProperty("是否使用公共数据 0否 1是") + private Integer useCommonData; + + @ApiModelProperty("数据名称") + private String dataName; + + @ApiModelProperty("是否使用公共组件 0否 1是") + private Integer useCommonComponent; + + @ApiModelProperty("使用的公共组件名称") + private String commonComponents; + + @ApiModelProperty("是否产生公共组件 0否 1是") + private Integer produceCommonComponent; + + @ApiModelProperty("预计产生组件名称") + private String produceCommonComponents; + + @ApiModelProperty("试点任务名称") + private String pilotTasksName; + + @ApiModelProperty("试点任务编号") + private String pilotTasksCode; + + @ApiModelProperty("所属重大应用名称") + private String importantTaskName; + + @ApiModelProperty("所属重大应用编号") + private String importantTaskCode; + + @ApiModelProperty("所属子场景应用名称") + private String subSceneApplicationName; + + @ApiModelProperty("试点文件") + private String experimentsFile; + + @ApiModelProperty("新增form内容") + private String formData; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java new file mode 100644 index 0000000..348df7a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java @@ -0,0 +1,411 @@ +package com.ningdatech.pmapi.projectdeclared.entity.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * 项目草稿箱 + *

+ * + * @author zpf + * @since 2023-02-06 + */ +@ApiModel(value = "NdProjectDraft对象", description = "") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectDraftVo implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("应用ID") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("所属地区编号") + private String areaCode; + + @ApiModelProperty("所属地区名称") + private String area; + + @ApiModelProperty("项目阶段") + private Integer stage; + + @ApiModelProperty("项目状态") + private Integer status; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("是否临时增补 0:否 1:是") + private Integer isTemporaryAugment; + + @ApiModelProperty("项目负责人") + private String responsibleMan; + + @ApiModelProperty("负责人手机号码") + private String responsibleManMobile; + + @ApiModelProperty("项目联系人") + private String contactName; + + @ApiModelProperty("项目联系人手机号码") + private String contactPhone; + + @ApiModelProperty("建设单位名称") + private String buildUnitName; + + @ApiModelProperty("建设单位统一社会信用代码") + private String buildUnitCode; + + @ApiModelProperty("建设单位浙政钉ID") + private String buildUnitZheJiangGovernmentDingId; + + @ApiModelProperty("项目类型 1:建设 2:运维") + private Integer projectType; + + @ApiModelProperty("是否首次新建 0:否 1:是") + private Integer isFirst; + + @ApiModelProperty("项目预算年度") + private Integer projectYear; + + @ApiModelProperty("项目建设起始时间") + private String beginTime; + + @ApiModelProperty("项目建设终止时间") + private String endTime; + + @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") + private Integer fourSystems; + + @ApiModelProperty("是否数字化改革项目 0:否 1:是") + private Integer isDigitalReform; + + @ApiModelProperty("综合业务领域") + private String bizDomain; + + @ApiModelProperty("建设层级 1:国家级 2:省级 3:省本级 4:市级 5:市本级 6:区县 7乡镇") + private Integer buildLevel; + + @ApiModelProperty("立项依据") + private String buildBasis; + + @ApiModelProperty("发改编码") + private String developCode; + + @ApiModelProperty("财政编码") + private String financialCode; + + @ApiModelProperty("是否上云 0:否 1:是") + private Integer isCloud; + + private String cloudType; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer protectionLevel; + + @ApiModelProperty("是否密评 0:否 1:是") + private Integer isSecretComments; + + @ApiModelProperty("项目简介") + private String projectIntroduction; + + @ApiModelProperty("资金申报情况-申报金额(万元)") + private BigDecimal declareAmount; + + @ApiModelProperty("资金申报情况-自有金额(万元)") + private BigDecimal declareHaveAmount; + + @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") + private BigDecimal declareGovernmentOwnFinanceAmount; + + @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") + private BigDecimal declareGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("银行贷款(万元)") + private BigDecimal declareBankLendingAmount; + + @ApiModelProperty("其它资金(万元)") + private BigDecimal declareOtherAmount; + + @ApiModelProperty("资金分配情况-软件开发(万元)") + private BigDecimal softwareDevelopmentAmount; + + @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") + private BigDecimal cloudHardwarePurchaseAmount; + + @ApiModelProperty("资金分配情况-第三方服务(万元)") + private BigDecimal thirdPartyAmount; + + @ApiModelProperty("年度支付计划-年度支付计划(万元)") + private BigDecimal annualPlanAmount; + + @ApiModelProperty("年度支付计划-自有金额(万元)") + private BigDecimal annualPlanHaveAmount; + + @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") + private BigDecimal annualPlanGovernmentOwnFinanceAmount; + + @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") + private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; + + @ApiModelProperty("年度支付计划-银行贷款(万元)") + private BigDecimal annualPlanBankLendingAmount; + + @ApiModelProperty("年度支付计划-其它资金(万元)") + private BigDecimal annualPlanOtherAmount; + + @ApiModelProperty("立项批复资金(万元)") + private BigDecimal approvalAmount; + + private LocalDateTime annualPlanAddTime; + + @ApiModelProperty("核心业务-核心业务模块") + private String coreBusiness; + + @ApiModelProperty("安全投入-投入项") + private String safetyInputTitle; + + @ApiModelProperty("安全投入-内容描述") + private String safetyInputDescribe; + + @ApiModelProperty("安全投入-金额(万元)") + private BigDecimal safetyInputAmount; + + @ApiModelProperty("附件-初步方案") + private String preliminaryPlanFile; + + @ApiModelProperty("附件-佐证材料") + private String supportingMaterialsFile; + + @ApiModelProperty("附件-项目总投资测算明细") + private String calculationTotalInvestmentFile; + + @ApiModelProperty("附件-申报单位主要职责(单位三定方案)") + private String mainResponsibilitiesApplicantFile; + + @ApiModelProperty("备注") + private String projectRemarks; + + @ApiModelProperty("是否包含应用 0:否 1:是") + private Integer includeApplication; + + @ApiModelProperty("工程形象进度-第一季度") + private String engineeringSpeedOne; + + @ApiModelProperty("工程形象进度-第二季度") + private String engineeringSpeedTwo; + + @ApiModelProperty("工程形象进度-第三季度") + private String engineeringSpeedThree; + + @ApiModelProperty("工程形象进度-第四季度") + private String engineeringSpeedFour; + + @ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") + private Boolean isOpenCoreBusiness; + + @ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") + private Boolean isOpenSafetyInput; + + @ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") + private Boolean isEngineeringSpeed; + + @ApiModelProperty("附件-是否开启 false:关闭 true:开启") + private Boolean isAccessories; + + @ApiModelProperty("备注-是否开启 false:关闭 true:开启") + private Boolean isRemarks; + + @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") + private Boolean isAnnualPlanAmount; + + @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") + private Boolean isInnovateWholeProvinceShare; + + private LocalDateTime createOn; + + private LocalDateTime updateOn; + + @ApiModelProperty("流程实例编号") + private String instCode; + + @ApiModelProperty("安全投入-模块信息") + private String safetyInputModular; + + @ApiModelProperty("项目申报pdf") + private String projectPdf; + + @ApiModelProperty("立项申报pdf") + private String declarationPdf; + + @ApiModelProperty("建设周期(月)") + private String buildCycle; + + @ApiModelProperty("建设方案文件") + private String constructionPlanFile; + + @ApiModelProperty("立项批复文件") + private String approvedFile; + + @ApiModelProperty("批复金额") + private BigDecimal approvedTotalInvestmentIncrease; + + @ApiModelProperty("上级主管部门") + private String higherSuperUnit; + + @ApiModelProperty("上级主管部门Code") + private String higherSuperUnitCode; + + @ApiModelProperty("主管部门名称") + private String superUnit; + + @ApiModelProperty("主管部门Code") + private String superUnitCode; + + @ApiModelProperty("前端所需验证字段") + private Integer allApplicationsDone; + + @ApiModelProperty("项目一级状态 10000 20000 30000") + private Integer projectStatusFirst; + + @ApiModelProperty("项目二级状态") + private Integer projectStatusSecond; + + @ApiModelProperty("应用名称") + private String applicationName; + + @ApiModelProperty("关联IRS现有应用") + private String relatedExistsApplication; + + @ApiModelProperty("关联IRS现有应用-IRS应用编码") + private String relatedExistsApplicationCode; + + @ApiModelProperty("应用类型") + private String applicationType; + + @ApiModelProperty("是否统建应用 0:否 1:是") + private Integer isUniteBuild; + + @ApiModelProperty("统建类型 1:全省统建 2:全市统建") + private Integer unionBuildKind; + + @ApiModelProperty("是否数改系统 0:否 1:是") + private Integer isDigitalModification; + + @ApiModelProperty("数改系统") + private String digitalModification; + + @ApiModelProperty("发布端") + private String publishSide; + + @ApiModelProperty("是否一本账场景应用名称 0:否 1:是") + private Integer isAccountAppName; + + @ApiModelProperty("一本账应用名称") + private String accountAppName; + + @ApiModelProperty("领域大脑一本账") + private String domainBrainAccount; + + @ApiModelProperty("是否业务协同 0:否 1:是") + private Integer isBizCooperate; + + @ApiModelProperty("业务协同描述") + private String bizCooperateInfo; + + @ApiModelProperty("使用范围") + private String usesRangeRemark; + + @ApiModelProperty("应用简介") + private String applicationSummary; + + @ApiModelProperty("应用备注") + private String applicationRemark; + + @ApiModelProperty("应用总投资测算明细-文件") + private String applicationEstimateFile; + + @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer secrecyGrade; + + @ApiModelProperty("密码测评级别 1:一级 2:二级 3:三级 4:四级 5:五级") + private Integer passwordGrade; + + @ApiModelProperty("是否符合国家信息技术应用创新相关规范 0:否 1:是") + private Integer nationalItSpec; + + @ApiModelProperty("是否使用政务云资源 0否 1是") + private Integer useGovCloud; + + @ApiModelProperty("云资源类型") + private String cloudsType; + + @ApiModelProperty("云资源基础规格") + private String cloudsFoundationSpecifications; + + @ApiModelProperty("云资源台数") + private Integer cloudsNumber; + + @ApiModelProperty("云资源用户描述") + private String cloudsDescription; + + @ApiModelProperty("网络环境 1:政务内网 2:政务外网 3:互联网 4:业务专网 5:单机") + private Integer netEnv; + + @ApiModelProperty("是否使用公共数据 0否 1是") + private Integer useCommonData; + + @ApiModelProperty("数据名称") + private String dataName; + + @ApiModelProperty("是否使用公共组件 0否 1是") + private Integer useCommonComponent; + + @ApiModelProperty("使用的公共组件名称") + private String commonComponents; + + @ApiModelProperty("是否产生公共组件 0否 1是") + private Integer produceCommonComponent; + + @ApiModelProperty("预计产生组件名称") + private String produceCommonComponents; + + @ApiModelProperty("试点任务名称") + private String pilotTasksName; + + @ApiModelProperty("试点任务编号") + private String pilotTasksCode; + + @ApiModelProperty("所属重大应用名称") + private String importantTaskName; + + @ApiModelProperty("所属重大应用编号") + private String importantTaskCode; + + @ApiModelProperty("所属子场景应用名称") + private String subSceneApplicationName; + + @ApiModelProperty("试点文件") + private String experimentsFile; + + @ApiModelProperty("新增form内容") + private String formData; + + + private Long createBy; + private Long updateBy; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java new file mode 100644 index 0000000..2c93c5e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -0,0 +1,176 @@ +package com.ningdatech.pmapi.projectdeclared.manage; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; +import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; +import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; +import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; +import com.ningdatech.pmapi.projectlib.enums.ProjectStatusEnum; +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; +import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.wflow.bean.entity.WflowModels; +import com.wflow.exception.BusinessException; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import com.wflow.workflow.bean.vo.ProcessStartParamsVo; +import com.wflow.workflow.service.ProcessInstanceService; +import com.wflow.workflow.service.ProcessModelService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * @Classname DeclaredProjectManage + * @Description + * @Date 2023/2/1 14:48 + * @Author PoffyZhang + */ +@Component +@Slf4j +@RequiredArgsConstructor +public class DeclaredProjectManage { + + private final IProjectService projectService; + + private final IProjectDraftService projectDraftService; + + private final ProcessInstanceService processService; + + private final ProcessModelService processModelService; + + public PageVo page(DeclaredProjectListParamDto params) { + Page page = params.page(); + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class) + .ge(Objects.nonNull(params.getStartTime()), Project::getCreateOn, params.getStartTime()) + .le(Objects.nonNull(params.getEndTime()), Project::getCreateOn, params.getEndTime()) + .eq(Objects.nonNull(params.getProjectType()), Project::getProjectType, params.getProjectType()) + .eq(Objects.nonNull(params.getProjectYear()), Project::getProjectYear, params.getProjectYear()) + .eq(Objects.nonNull(params.getProjectStatusFirst()), Project::getProjectStatusFirst, params.getProjectStatusFirst()) + .eq(Objects.nonNull(params.getProjectStatusSecond()), Project::getProjectStatusSecond, params.getProjectStatusSecond()) + .like(StringUtils.isNotBlank(params.getProjectName()), Project::getProjectName, params.getProjectName()) + .orderByDesc(Project::getUpdateOn); + projectService.page(page,wrapper); + if(0L == page.getTotal()){ + return PageVo.empty(); + } + List res = page.getRecords().stream().map(record -> { + ProjectLibListItemVO vo = new ProjectLibListItemVO(); + BeanUtils.copyProperties(record, vo); + return vo; + }).collect(Collectors.toList()); + return PageVo.of(res,page.getTotal()); + } + + public PageVo pageDraft(DeclaredProjectListParamDto params) { + Page page = params.page(); + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(ProjectDraft.class) + .ge(Objects.nonNull(params.getStartTime()), ProjectDraft::getCreateOn, params.getStartTime()) + .le(Objects.nonNull(params.getEndTime()), ProjectDraft::getCreateOn, params.getEndTime()) + .eq(Objects.nonNull(params.getProjectType()), ProjectDraft::getProjectType, params.getProjectType()) + .eq(Objects.nonNull(params.getProjectYear()), ProjectDraft::getProjectYear, params.getProjectYear()) + .eq(Objects.nonNull(params.getProjectStatusFirst()), ProjectDraft::getProjectStatusFirst, params.getProjectStatusFirst()) + .eq(Objects.nonNull(params.getProjectStatusSecond()), ProjectDraft::getProjectStatusSecond, params.getProjectStatusSecond()) + .like(StringUtils.isNotBlank(params.getProjectName()), ProjectDraft::getProjectName, params.getProjectName()) + .orderByDesc(ProjectDraft::getUpdateOn); + projectDraftService.page(page,wrapper); + if(0L == page.getTotal()){ + return PageVo.empty(); + } + List res = page.getRecords().stream().map(record -> { + ProjectDraftVo vo = new ProjectDraftVo(); + BeanUtils.copyProperties(record, vo); + return vo; + }).collect(Collectors.toList()); + return PageVo.of(res,page.getTotal()); + } + + public ProjectDraftVo draftDatail(Long id) { + ProjectDraft draft = projectDraftService.getById(id); + ProjectDraftVo vo = new ProjectDraftVo(); + BeanUtils.copyProperties(draft, vo); + return vo; + } + + /** + * 启动实例 + * @param dto + * @return + */ + public String startTheProcess(DeclaredProjectDto dto) { + String regionCode = dto.getRegionCode(); + + WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) + .eq(WflowModels::getRegionCode, regionCode) + .eq(WflowModels::getFormName, "单位内部审批流程") + .last("limit 1")); + + if(Objects.isNull(model)){ + throw new BusinessException(String.format("此 【%s】区域找不到流程配置",regionCode)); + } + + ProcessStartParamsVo params = new ProcessStartParamsVo(); + ProcessInstanceUserDto user = new ProcessInstanceUserDto(); + user.setOrgCode("6179678"); + user.setOrgName("数转办"); + user.setUserId("381496"); + user.setUserName("旅人"); + params.setUser(user); + params.setProcessUsers(Collections.emptyMap()); + dto.getFormData().putAll( + JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference>() { + })); + params.setFormData(dto.getFormData()); + String instanceId = processService.startProcess(model.getProcessDefId(), params); + log.info("申报项目成功 【{}】",instanceId); + + //流程启动之后 入库项目 重要业务信息 用于列表查询 展示 + try{ + Project project = new Project(); + BeanUtils.copyProperties(dto.getProjectInfo(),project); + project.setCreateOn(LocalDateTime.now()); + project.setUpdateOn(LocalDateTime.now()); + project.setAreaCode(regionCode); + project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode()); + project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); + project.setInstCode(instanceId); + projectService.save(project); + }catch (Exception e){ + log.error("项目信息入库错误 ",e); + throw new BusinessException("项目信息入库错误 请注意格式"); + } + + return instanceId; + } + + /** + * 保存至草稿箱 + * @param dto + * @return + */ + public Long saveToDraft(ProjectDraftSaveDto dto) { + ProjectDraft draft = new ProjectDraft(); + BeanUtils.copyProperties(dto,draft); + if(Objects.isNull(draft.getId())){ + draft.setCreateOn(LocalDateTime.now()); + } + draft.setUpdateOn(LocalDateTime.now()); + projectDraftService.saveOrUpdate(draft); + return draft.getId(); + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java new file mode 100644 index 0000000..82c0ec2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectdeclared.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; + +/** + *

+ * Mapper 接口 + *

+ * + * @author zpf + * @since 2023-02-05 + */ +public interface ProjectDraftMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.xml new file mode 100644 index 0000000..4f2f7bb --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java new file mode 100644 index 0000000..5ef9d25 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectdeclared.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; + +/** + *

+ * 服务类 + *

+ * + * @author zpf + * @since 2023-02-05 + */ +public interface IProjectDraftService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java new file mode 100644 index 0000000..e88f158 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java @@ -0,0 +1,21 @@ +package com.ningdatech.pmapi.projectdeclared.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; +import com.ningdatech.pmapi.projectdeclared.mapper.ProjectDraftMapper; +import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author zpf + * @since 2023-02-05 + */ +@Service +public class ProjectDraftServiceImpl extends ServiceImpl + implements IProjectDraftService { + +}