From c91227dbe233dcec36f612431eee66a220b948a9 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 3 Feb 2023 14:27:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=9E=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generator/config/GeneratorCodeConfig.java | 64 ----- .../config/GeneratorCodeKingbaseConfig.java | 2 +- .../pmapi/projectlib/manage/ProjectLibManage.java | 51 ++-- .../pmapi/projectlib/mapper/NdProjectMapper.java | 16 ++ .../pmapi/projectlib/mapper/NdProjectMapper.xml | 5 + .../pmapi/projectlib/model/entity/Project.java | 282 +++++++++++++++++++++ .../projectlib/model/req/ProjectLibListReq.java | 10 +- .../projectlib/model/vo/ProjectLibListItemVO.java | 4 +- .../projectlib/service/INdProjectService.java | 16 ++ .../service/impl/NdProjectServiceImpl.java | 20 ++ 10 files changed, 372 insertions(+), 98 deletions(-) delete mode 100644 ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeConfig.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeConfig.java deleted file mode 100644 index 43afda0..0000000 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ningdatech.generator.config; - -import com.baomidou.mybatisplus.generator.FastAutoGenerator; -import com.baomidou.mybatisplus.generator.config.OutputFile; -import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; - -import java.util.Collections; - -/** - * @description: 自动生成code代码 - * @author: liuxinxin - * @date: 2023/01/03 09:20 - */ -public class GeneratorCodeConfig { - - private static final String PATH_LXX = "/Users/liuxinxin/IdeaProjects/project-management/pmapi/src/main/java"; - private static final String PATH_YYD = ""; - private static final String PATH_LS = ""; - private static final String PATH_ZPF = ""; - private static final String PATH_CMM = ""; - - private static final String URL = "jdbc:mysql://47.98.125.47:3306/nd_project_management?" + - "useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&" + - "useSSL=false&serverTimezone=Asia/Shanghai"; - private static final String USER_NAME = "root"; - private static final String PASSWORD = "NingdaKeji123!"; - - private static void generate(String author, String packageName, String path, String... tableNames) { - FastAutoGenerator.create(URL, USER_NAME, PASSWORD) - .globalConfig(builder -> { - // 设置作者 - builder.author(author) - // 开启 swagger 模式 - .enableSwagger() - // 覆盖已生成文件 - .fileOverride() - // 指定输出目录 - .outputDir(path); - }) - .packageConfig(builder -> { - // 设置父包名 - builder.parent("com.ningdatech") - // 设置父包模块名 - .moduleName("pmapi." + packageName) - // 设置mapperXml生成路径 - .pathInfo(Collections.singletonMap(OutputFile.mapperXml, - //设置自己的生成路径 - path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); - }) - .strategyConfig(builder -> { - builder.addTablePrefix("nd"); - // 设置需要生成的表名 - builder.addInclude(tableNames); - }) - // 使用Freemarker引擎模板,默认的是Velocity引擎模板 - .templateEngine(new FreemarkerTemplateEngine()) - .execute(); - } - - public static void main(String[] args) { - generate("Liuxinxin", "user", PATH_LXX, "nd_role_info", "nd_user_role"); - } - -} diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index f0e3436..91e8694 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig { } public static void main(String[] args) { - generate("WendyYang", "sys", PATH_YYD, "nd_role_menu_datascope"); + generate("WendyYang", "projectlib", PATH_YYD, "nd_project"); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 517d91a..7f3eda7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -5,15 +5,14 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.req.ProjectLibListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.wflow.bean.entity.NdDeclaredProject; -import com.wflow.service.NdDeclaredProjectService; +import com.ningdatech.pmapi.projectlib.service.INdProjectService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import java.util.List; -import java.util.stream.Collectors; import static com.ningdatech.pmapi.common.utils.BizUtils.notBlank; import static com.ningdatech.pmapi.common.utils.BizUtils.notNull; @@ -30,36 +29,36 @@ import static com.ningdatech.pmapi.common.utils.BizUtils.notNull; @RequiredArgsConstructor public class ProjectLibManage { - private final NdDeclaredProjectService declaredProjectService; + private final INdProjectService projectService; - private LambdaQueryWrapper projectLibQuery(ProjectLibListReq req) { - LambdaQueryWrapper query = Wrappers.lambdaQuery(NdDeclaredProject.class); - notBlank(req.getProjectName(), w -> query.like(NdDeclaredProject::getProjectName, w)); - notNull(req.getProjectType(), w -> query.eq(NdDeclaredProject::getProjectType, w)); - notNull(req.getProjectYear(), w -> query.eq(NdDeclaredProject::getProjectYear, w)); + private LambdaQueryWrapper projectLibQuery(ProjectLibListReq req) { + LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class); + notBlank(req.getProjectName(), w -> query.like(Project::getProjectName, w)); + notNull(req.getProjectType(), w -> query.eq(Project::getProjectType, w)); + notNull(req.getProjectYear(), w -> query.eq(Project::getProjectYear, w)); // 申报金额 批复金额 - notNull(req.getApprovedAmountMin(), w -> query.ge(NdDeclaredProject::getApprovedAmount, w)); - notNull(req.getApprovedAmountMax(), w -> query.le(NdDeclaredProject::getApprovedAmount, w)); + notNull(req.getApproveAmountMin(), w -> query.ge(Project::getApprovalAmount, w)); + notNull(req.getApproveAmountMax(), w -> query.le(Project::getApprovalAmount, w)); - notNull(req.getDeclaredAmountMax(), w -> query.le(NdDeclaredProject::getDeclaredAmount, w)); - notNull(req.getDeclaredAmountMin(), w -> query.ge(NdDeclaredProject::getDeclaredAmount, w)); + notNull(req.getDeclareAmountMax(), w -> query.le(Project::getDeclareAmount, w)); + notNull(req.getDeclareAmountMin(), w -> query.ge(Project::getDeclareAmount, w)); // 状态查询 - notNull(req.getStatus1st(), w -> query.ge(NdDeclaredProject::getProjectStatusFirst, w)); - notNull(req.getStatus2nd(), w -> query.ge(NdDeclaredProject::getProjectStatusSecond, w)); + notNull(req.getStatus1st(), w -> query.ge(Project::getStage, w)); + notNull(req.getStatus2nd(), w -> query.ge(Project::getStatus, w)); - notNull(req.getCreateOnMin(), w -> query.ge(NdDeclaredProject::getCreateOn, w)); - notNull(req.getCreateOnMax(), w -> query.le(NdDeclaredProject::getCreateOn, w)); + notNull(req.getCreateOnMin(), w -> query.ge(Project::getCreateOn, w)); + notNull(req.getCreateOnMax(), w -> query.le(Project::getCreateOn, w)); - notBlank(req.getApplyOrg(), w -> query.like(NdDeclaredProject::getOrgName, w)); + notBlank(req.getBuildUnit(), w -> query.like(Project::getBuildUnitName, w)); - query.orderByDesc(NdDeclaredProject::getUpdateOn, NdDeclaredProject::getCreateOn); + query.orderByDesc(Project::getUpdateOn, Project::getCreateOn); // TODO 区域编码处理 return query; } public PageVo projectLibList(ProjectLibListReq req) { - LambdaQueryWrapper query = projectLibQuery(req); - Page page = declaredProjectService.page(req.page(), query); + LambdaQueryWrapper query = projectLibQuery(req); + Page page = projectService.page(req.page(), query); long total; if ((total = page.getTotal()) == 0) { return PageVo.empty(); @@ -69,13 +68,13 @@ public class ProjectLibManage { item.setId(w.getId()); item.setProjectName(w.getProjectName()); item.setCreateOn(w.getCreateOn()); - item.setDeclaredAmount(w.getDeclaredAmount()); - item.setStatus1st(w.getProjectStatusFirst()); - item.setStatus2nd(w.getProjectStatusSecond()); + item.setDeclaredAmount(w.getDeclareAmount()); + item.setStatus1st(w.getStage()); + item.setStatus2nd(w.getStatus()); item.setProjectType(w.getProjectType()); item.setProjectYear(w.getProjectYear()); - item.setApplyOrg(w.getOrgName()); - item.setBizArea(w.getBizArea()); + item.setBuildUnit(w.getBuildUnitName()); + item.setBizDomain(w.getBizDomain()); return item; }); return PageVo.of(records, total); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java new file mode 100644 index 0000000..3aee103 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.mapper; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +public interface NdProjectMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml new file mode 100644 index 0000000..6932ce2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java new file mode 100644 index 0000000..d3a0958 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -0,0 +1,282 @@ +package com.ningdatech.pmapi.projectlib.model.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.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +@Data +@TableName("nd_project") +@ApiModel(value = "NdProject对象", description = "") +public class Project implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + @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; + + private Long createBy; + + private Long updateBy; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectLibListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectLibListReq.java index 1b31e38..4b8a807 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectLibListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectLibListReq.java @@ -29,7 +29,7 @@ public class ProjectLibListReq extends PagePo { private String projectName; @ApiModelProperty("申报单位") - private String applyOrg; + private String buildUnit; @ApiModelProperty("项目类型") private Integer projectType; @@ -44,16 +44,16 @@ public class ProjectLibListReq extends PagePo { private Integer status2nd; @ApiModelProperty("申报金额") - private BigDecimal declaredAmountMin; + private BigDecimal declareAmountMin; @ApiModelProperty("申报金额") - private BigDecimal declaredAmountMax; + private BigDecimal declareAmountMax; @ApiModelProperty("批复金额") - private BigDecimal approvedAmountMin; + private BigDecimal approveAmountMin; @ApiModelProperty("批复金额") - private BigDecimal approvedAmountMax; + private BigDecimal approveAmountMax; @ApiModelProperty("创建时间") private LocalDateTime createOnMin; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java index 6639063..3198cdc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java @@ -44,10 +44,10 @@ public class ProjectLibListItemVO { private Integer projectYear; @ApiModelProperty("申报单位") - private String applyOrg; + private String buildUnit; @ApiModelProperty("业务领域") - private String bizArea; + private String bizDomain; @ApiModelProperty("创建时间") private LocalDateTime createOn; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java new file mode 100644 index 0000000..9373de6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.service; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +public interface INdProjectService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java new file mode 100644 index 0000000..7ae06cf --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.projectlib.service.impl; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.mapper.NdProjectMapper; +import com.ningdatech.pmapi.projectlib.service.INdProjectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +@Service +public class NdProjectServiceImpl extends ServiceImpl implements INdProjectService { + +} From dff3315ef1f10138252525348a6f1abe360046fd Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Sat, 4 Feb 2023 22:52:27 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=AD=90=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=20=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmapi/pom.xml | 15 +--- .../controller/DeclaredProjectController.java | 1 - .../pmapi/sys/controller/SysProcdefController.java | 7 +- .../com/ningdatech/pmapi/sys/processDef/Node.java | 23 +++++++ .../pmapi/sys/processDef/ProcessDefTest.java | 79 ++++++++++++++++++++++ pom.xml | 26 +++++++ 6 files changed, 133 insertions(+), 18 deletions(-) create mode 100644 pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/Node.java create mode 100644 pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/ProcessDefTest.java diff --git a/pmapi/pom.xml b/pmapi/pom.xml index 3748d36..27b7fc7 100644 --- a/pmapi/pom.xml +++ b/pmapi/pom.xml @@ -187,10 +187,6 @@ org.slf4j slf4j-log4j12 - - - - @@ -203,10 +199,6 @@ - - com.ningdatech - nd-flowable-starter - com.ningdatech @@ -235,12 +227,10 @@ com.ningdatech nd-cache-starter - 1.0.0 com.ningdatech nd-basic - 1.0.0 com.kingbase.dialect @@ -251,17 +241,14 @@ com.alibaba easyexcel-core - 3.1.2 com.ningdatech nd-file-starter - 1.0.0 com.ningdatech - nd-zwdd-starter - 1.0.0 + nd-flowable-starter 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 index cabc31e..6984acb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java @@ -49,5 +49,4 @@ public class DeclaredProjectController { String instanceId = processService.startProcess(defId, params); return "启动流程实例 " + instanceId + " 成功"; } - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java index 6e93851..7d11e1f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/SysProcdefController.java @@ -50,16 +50,17 @@ public class SysProcdefController { return processModelService.saveProcess(modelHistory); } + @ApiOperation(value = "系统流程配置启用(停用)", notes = "系统流程配置启用(停用)") @PutMapping("/{formId}/active/{state}") - public Object enOrDisModel(@PathVariable String formId, + public String enOrDisModel(@PathVariable String formId, @PathVariable Boolean state) { modelGroupService.enOrDisModel(formId, !state); - return R.ok(Boolean.TRUE.equals(state) ? "启用流程成功":"停用流程成功"); + return Boolean.TRUE.equals(state) ? "启用流程成功":"停用流程成功"; } @ApiOperation(value = "系统流程配置发布", notes = "系统流程配置发布") @PostMapping("/deploy/{formId}") - public String save(@Validated @PathVariable String formId) { + public String deploy(@Validated @PathVariable String formId) { return processModelService.deployProcess(formId); } } diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/Node.java b/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/Node.java new file mode 100644 index 0000000..2f74135 --- /dev/null +++ b/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/Node.java @@ -0,0 +1,23 @@ +package com.ningdatech.pmapi.sys.processDef; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class Node implements Serializable { + private static final long serialVersionUID = -45475579271153023L; + + private String id; + + private String parentId; + + private String name; + + private T props; + + private Node children; + + private List> branchs; +} \ No newline at end of file diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/ProcessDefTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/ProcessDefTest.java new file mode 100644 index 0000000..8c47dd8 --- /dev/null +++ b/pmapi/src/test/java/com/ningdatech/pmapi/sys/processDef/ProcessDefTest.java @@ -0,0 +1,79 @@ +package com.ningdatech.pmapi.sys.processDef; + +import com.alibaba.fastjson.JSON; +import org.junit.Test; + +import java.io.Serializable; +import java.util.List; + +/** + * @Classname ProcessTest + * @Description + * @Date 2023/2/4 9:54 + * @Author PoffyZhang + */ +public class ProcessDefTest { + + + @Test + public void test() { + String processStr = "{\"id\":\"node_039152532706\",\"name\":\"审批单位\",\"type\":\"ORG\",\"props\":{\"regionCode\":\"\",\"orgCode\":\"GO_3bc86256687a4884ae410af00682b762\",\"type\":\"DEFAULT\",\"processDefId\":\"\",\"subNode\":[]},\"children\":{},\"parentId\":\"root\"}"; + + Node node = JSON.parseObject(processStr, Node.class); + + OrgProps props = JSON.parseObject(node.getProps().toString(), OrgProps.class); + System.out.println(props.getOrgCode()); + } + + public static class OrgProps { + private String regionCode; + + private String orgCode; + + private String type; + + private String processDefId; + + private List subNode; + + public String getRegionCode() { + return regionCode; + } + + public void setRegionCode(String regionCode) { + this.regionCode = regionCode; + } + + public String getOrgCode() { + return orgCode; + } + + public void setOrgCode(String orgCode) { + this.orgCode = orgCode; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getProcessDefId() { + return processDefId; + } + + public void setProcessDefId(String processDefId) { + this.processDefId = processDefId; + } + + public List getSubNode() { + return subNode; + } + + public void setSubNode(List subNode) { + this.subNode = subNode; + } + } +} diff --git a/pom.xml b/pom.xml index bd757f0..beccbd0 100644 --- a/pom.xml +++ b/pom.xml @@ -123,6 +123,32 @@ kingbase8-8.2.0 1.0 + + + com.alibaba + easyexcel-core + 3.1.2 + + + com.ningdatech + nd-file-starter + 1.0.0 + + + com.ningdatech + nd-zwdd-starter + 1.0.0 + + + com.ningdatech + nd-cache-starter + 1.0.0 + + + com.ningdatech + nd-log-starter + 1.0.0 + From 46ece12dc1430e224af4df9265d7ec92b4c0bbef Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Sat, 4 Feb 2023 23:13:58 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=AD=90=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=20=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DeclaredProjectController.java | 14 ++++----- .../declared/entity/dto/DeclaredProjectDto.java | 33 ++++++++++++++++++++ .../entity/dto/DeclaredProjectListParamDto.java | 34 +++++++++++++++++++++ .../entity/dto/DeclaredProjectParamDto.java | 34 --------------------- .../declared/manage/DeclaredProjectManage.java | 35 ++++++++++++++++++++-- 5 files changed, 106 insertions(+), 44 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java create 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/dto/DeclaredProjectParamDto.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 index 6984acb..3841a02 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java @@ -1,7 +1,8 @@ package com.ningdatech.pmapi.declared.controller; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectParamDto; +import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectDto; +import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; import com.ningdatech.pmapi.declared.manage.DeclaredProjectManage; import com.wflow.bean.vo.NdDeclaredProjectVo; import com.wflow.workflow.bean.vo.ProcessStartParamsVo; @@ -26,13 +27,11 @@ import org.springframework.web.bind.annotation.*; @Api(value = "DeclaredProject", tags = "申报管理-申报项目") @RequiredArgsConstructor public class DeclaredProjectController { - private final ProcessInstanceService processService; - private final DeclaredProjectManage declaredProjectManage; @ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") @GetMapping("/list") - public PageVo list(@Validated @ModelAttribute DeclaredProjectParamDto params) {; + public PageVo list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; return declaredProjectManage.page(params); } @@ -43,10 +42,9 @@ public class DeclaredProjectController { } @ApiOperation(value = "申报项目", notes = "申报项目") - @PostMapping("/start/{defId}") - public String startTheProcess(@PathVariable String defId, - @RequestBody ProcessStartParamsVo params) { - String instanceId = processService.startProcess(defId, params); + @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/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java new file mode 100644 index 0000000..2fa6883 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectDto.java @@ -0,0 +1,33 @@ +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 new file mode 100644 index 0000000..526e92d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectListParamDto.java @@ -0,0 +1,34 @@ +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/dto/DeclaredProjectParamDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectParamDto.java deleted file mode 100644 index 04f1a2b..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/entity/dto/DeclaredProjectParamDto.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 DeclaredProjectParamDto 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/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/declared/manage/DeclaredProjectManage.java index 0e8f80d..731da2b 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 @@ -4,16 +4,22 @@ 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.dto.DeclaredProjectParamDto; +import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectDto; +import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; import com.wflow.bean.entity.NdDeclaredProject; +import com.wflow.bean.entity.WflowModels; import com.wflow.bean.vo.NdDeclaredProjectVo; import com.wflow.service.NdDeclaredProjectService; +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.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -31,7 +37,11 @@ public class DeclaredProjectManage { private final NdDeclaredProjectService declaredProjectService; - public PageVo page(DeclaredProjectParamDto params) { + private final ProcessInstanceService processService; + + private final ProcessModelService processModelService; + + public PageVo page(DeclaredProjectListParamDto params) { Page page = params.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(NdDeclaredProject.class) .ge(Objects.nonNull(params.getStartTime()), NdDeclaredProject::getCreateOn, params.getStartTime()) @@ -53,4 +63,25 @@ public class DeclaredProjectManage { }).collect(Collectors.toList()); return PageVo.of(res,page.getTotal()); } + + /** + * 启动实例 + * @param dto + * @return + */ + public String startTheProcess(DeclaredProjectDto dto) { + String defId = null; + String regionCode = dto.getRegionCode(); + + processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) + .eq(WflowModels::getRegionCode,regionCode) + .eq(WflowModels::getFormName,"单位内部审批流程") + .last("limit 1")); + + ProcessStartParamsVo params = new ProcessStartParamsVo(); + params.setDeptId("6179678"); + params.setProcessUsers(Collections.emptyMap()); + params.setFormData(dto.getFormData()); + return processService.startProcess(defId, params); + } } From d1008692cf47ae979f6eadce7c6efb8e74aa40c5 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Sat, 4 Feb 2023 23:57:25 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=AD=90=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=20=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DeclaredProjectController.java | 7 +- .../declared/manage/DeclaredProjectManage.java | 76 ++++-- .../pmapi/projectlib/enums/ProjectStatusEnum.java | 54 ++++ .../pmapi/projectlib/enums/ProjectTypeEnum.java | 34 +++ .../pmapi/projectlib/model/dto/ProjectDto.java | 294 +++++++++++++++++++++ .../pmapi/projectlib/model/entity/Project.java | 12 +- 6 files changed, 449 insertions(+), 28 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectStatusEnum.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectTypeEnum.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.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 index 3841a02..f559dc8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/declared/controller/DeclaredProjectController.java @@ -4,9 +4,8 @@ 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.manage.DeclaredProjectManage; -import com.wflow.bean.vo.NdDeclaredProjectVo; +import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import com.wflow.workflow.bean.vo.ProcessStartParamsVo; -import com.wflow.workflow.service.ProcessInstanceService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -31,13 +30,13 @@ public class DeclaredProjectController { @ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") @GetMapping("/list") - public PageVo list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; + public PageVo list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; return declaredProjectManage.page(params); } @ApiOperation(value = "申报项目草稿箱", notes = "申报项目草稿箱") @GetMapping("/draft") - public PageVo draft(@Validated @ModelAttribute ProcessStartParamsVo params) { + public PageVo draft(@Validated @ModelAttribute ProcessStartParamsVo params) { return PageVo.empty(); } 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 731da2b..cd74382 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 @@ -1,15 +1,19 @@ 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.dto.DeclaredProjectDto; import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; -import com.wflow.bean.entity.NdDeclaredProject; +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.INdProjectService; import com.wflow.bean.entity.WflowModels; -import com.wflow.bean.vo.NdDeclaredProjectVo; -import com.wflow.service.NdDeclaredProjectService; +import com.wflow.exception.BusinessException; import com.wflow.workflow.bean.vo.ProcessStartParamsVo; import com.wflow.workflow.service.ProcessInstanceService; import com.wflow.workflow.service.ProcessModelService; @@ -19,8 +23,10 @@ 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; @@ -35,29 +41,29 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class DeclaredProjectManage { - private final NdDeclaredProjectService declaredProjectService; + private final INdProjectService ndProjectService; private final ProcessInstanceService processService; private final ProcessModelService processModelService; - public PageVo page(DeclaredProjectListParamDto params) { - Page page = params.page(); - LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(NdDeclaredProject.class) - .ge(Objects.nonNull(params.getStartTime()), NdDeclaredProject::getCreateOn, params.getStartTime()) - .le(Objects.nonNull(params.getEndTime()), NdDeclaredProject::getCreateOn, params.getEndTime()) - .eq(Objects.nonNull(params.getProjectType()), NdDeclaredProject::getProjectType, params.getProjectType()) - .eq(Objects.nonNull(params.getProjectYear()), NdDeclaredProject::getProjectYear, params.getProjectYear()) - .eq(Objects.nonNull(params.getProjectStatusFirst()), NdDeclaredProject::getProjectStatusFirst, params.getProjectStatusFirst()) - .eq(Objects.nonNull(params.getProjectStatusSecond()), NdDeclaredProject::getProjectStatusSecond, params.getProjectStatusSecond()) - .like(StringUtils.isNotBlank(params.getProjectName()), NdDeclaredProject::getProjectName, params.getProjectName()) - .orderByDesc(NdDeclaredProject::getUpdateOn); - declaredProjectService.page(page,wrapper); + 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); + ndProjectService.page(page,wrapper); if(0L == page.getTotal()){ return PageVo.empty(); } - List res = page.getRecords().stream().map(record -> { - NdDeclaredProjectVo vo = new NdDeclaredProjectVo(); + List res = page.getRecords().stream().map(record -> { + ProjectLibListItemVO vo = new ProjectLibListItemVO(); BeanUtils.copyProperties(record, vo); return vo; }).collect(Collectors.toList()); @@ -70,18 +76,42 @@ public class DeclaredProjectManage { * @return */ public String startTheProcess(DeclaredProjectDto dto) { - String defId = null; String regionCode = dto.getRegionCode(); - processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) - .eq(WflowModels::getRegionCode,regionCode) - .eq(WflowModels::getFormName,"单位内部审批流程") + 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(); params.setDeptId("6179678"); params.setProcessUsers(Collections.emptyMap()); + dto.getFormData().putAll( + JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference>() { + })); params.setFormData(dto.getFormData()); - return processService.startProcess(defId, params); + 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); + ndProjectService.save(project); + }catch (Exception e){ + log.error("项目信息入库错误 ",e); + throw new BusinessException("项目信息入库错误 请注意格式"); + } + + return instanceId; } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectStatusEnum.java new file mode 100644 index 0000000..ac7bb06 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectStatusEnum.java @@ -0,0 +1,54 @@ +package com.ningdatech.pmapi.projectlib.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +public enum ProjectStatusEnum { + /** + * 项目状态 + */ + NOT_APPROVED (10000,"未立项"), + UNDER_INTERNAL_AUDIT (10001,"单位内部审核中"), + UNDER_INTERNAL_AUDIT_NOT_PASS (10002,"单位内部审核不通过"), + PENDING_PREQUALIFICATION (10003,"待预审"), + JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS (10004,"省级部门联审中"), + THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED (10005,"省级部门联审不通过"), + PRE_APPLYING (10006,"预审中"), + PREQUALIFICATION_FAILED (10007,"预审不通过"), + DEPARTMENT_JOINT_REVIEW (10008,"部门联审中"), + DEPARTMENT_JOINT_REVIEW_FAILED (10009,"部门联审不通过"), + IN_THE_ANNUAL_PLAN (10010,"年度计划中"), + BE_SUSPENDED (10011,"被暂缓"), + SCHEME_UNDER_REVIEW (10012,"方案评审中"), + SCHEME_REVIEW_FAILED (10013,"方案评审不通过"), + TO_BE_APPROVED (10014,"待立项批复"), + PROJECT_APPROVED (20000,"已立项"), + TO_BE_PURCHASED (20001,"待采购"), + UNDER_CONSTRUCTION (20002,"建设中"), + TO_BE_FINALLY_INSPECTED (20003,"待终验"), + FINAL_ACCEPTANCE_IS_UNDER_REVIEW (20004,"终验审核中"), + FINAL_ACCEPTANCE_REVIEW_FAILED (20005,"终验审核不通过"), + ARCHIVED (30000,"已归档"); + + private Integer code; + private String desc; + + public static String getDescByCode(Integer code) { + if(Objects.isNull(code)){ + return StringUtils.EMPTY; + } + for (ProjectStatusEnum t : ProjectStatusEnum.values()) { + if (code.equals(t.getCode())) { + return t.desc; + } + } + return StringUtils.EMPTY; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectTypeEnum.java new file mode 100644 index 0000000..1aa579a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enums/ProjectTypeEnum.java @@ -0,0 +1,34 @@ +package com.ningdatech.pmapi.projectlib.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +public enum ProjectTypeEnum { + /** + * 项目类型 + */ + BUILD (1,"建设"), + DEV_OPS (2,"运维"); + + private Integer code; + private String desc; + + public static String getDescByCode(Integer code) { + if(Objects.isNull(code)){ + return StringUtils.EMPTY; + } + for (ProjectTypeEnum t : ProjectTypeEnum.values()) { + if (code.equals(t.getCode())) { + return t.desc; + } + } + return StringUtils.EMPTY; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java new file mode 100644 index 0000000..ee9ac54 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java @@ -0,0 +1,294 @@ +package com.ningdatech.pmapi.projectlib.model.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author zpf + * @since 2023-02-03 + */ +@Data +@ApiModel(value = "NdProjectDto", description = "") +public class ProjectDto implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("主键") + 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("流程实例id") + private String processInsId; + + @ApiModelProperty("流程实例 formId") + private String formId; + + @ApiModelProperty("项目一级状态 10000 20000 30000") + private Integer projectStatusFirst; + + @ApiModelProperty("项目二级状态") + private Integer projectStatusSecond; + + @ApiModelProperty("单位名称") + private String orgName; + @ApiModelProperty("单位code") + private String orgCode; + + private Long createBy; + + private Long updateBy; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index d3a0958..47644cc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -275,8 +275,18 @@ public class Project implements Serializable { @ApiModelProperty("前端所需验证字段") private Integer allApplicationsDone; - private Long createBy; + @ApiModelProperty("项目一级状态 10000 20000 30000") + private Integer projectStatusFirst; + + @ApiModelProperty("项目二级状态") + private Integer projectStatusSecond; + @ApiModelProperty("单位名称") + private String orgName; + @ApiModelProperty("单位code") + private String orgCode; + + private Long createBy; private Long updateBy; } From 3521c3cb5340755b220acea8b924762691f215dc Mon Sep 17 00:00:00 2001 From: WendyYang Date: Sun, 5 Feb 2023 15:35:51 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/GeneratorCodeKingbaseConfig.java | 2 +- .../pmapi/projectlib/manage/ProjectLibManage.java | 4 +- .../pmapi/projectlib/mapper/NdProjectMapper.java | 16 -- .../pmapi/projectlib/mapper/NdProjectMapper.xml | 5 - .../mapper/ProjectApplicationMapper.java | 16 ++ .../projectlib/mapper/ProjectApplicationMapper.xml | 5 + .../pmapi/projectlib/mapper/ProjectMapper.java | 16 ++ .../pmapi/projectlib/mapper/ProjectMapper.xml | 5 + .../pmapi/projectlib/model/entity/Project.java | 6 + .../model/entity/ProjectApplication.java | 171 +++++++++++++++++++++ .../projectlib/service/INdProjectService.java | 16 -- .../service/IProjectApplicationService.java | 16 ++ .../pmapi/projectlib/service/IProjectService.java | 16 ++ .../service/impl/NdProjectServiceImpl.java | 20 --- .../impl/ProjectApplicationServiceImpl.java | 20 +++ .../service/impl/ProjectServiceImpl.java | 20 +++ 16 files changed, 294 insertions(+), 60 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.xml create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectApplicationService.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index 91e8694..4cea706 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig { } public static void main(String[] args) { - generate("WendyYang", "projectlib", PATH_YYD, "nd_project"); + generate("WendyYang", "projectlib", PATH_YYD, "nd_project_application"); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 7f3eda7..c61e5d3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -8,7 +8,7 @@ import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.req.ProjectLibListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.projectlib.service.INdProjectService; +import com.ningdatech.pmapi.projectlib.service.IProjectService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -29,7 +29,7 @@ import static com.ningdatech.pmapi.common.utils.BizUtils.notNull; @RequiredArgsConstructor public class ProjectLibManage { - private final INdProjectService projectService; + private final IProjectService projectService; private LambdaQueryWrapper projectLibQuery(ProjectLibListReq req) { LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java deleted file mode 100644 index 3aee103..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.projectlib.mapper; - -import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author WendyYang - * @since 2023-02-03 - */ -public interface NdProjectMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml deleted file mode 100644 index 6932ce2..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/NdProjectMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.java new file mode 100644 index 0000000..1398ade --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.mapper; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WendyYang + * @since 2023-02-05 + */ +public interface ProjectApplicationMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.xml new file mode 100644 index 0000000..d58ad5e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectApplicationMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.java new file mode 100644 index 0000000..446036a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.mapper; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +public interface ProjectMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.xml new file mode 100644 index 0000000..73efdb6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index d3a0958..933a8ce 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -1,5 +1,7 @@ package com.ningdatech.pmapi.projectlib.model.entity; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -9,7 +11,11 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; import java.time.LocalDateTime; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java new file mode 100644 index 0000000..977940a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectApplication.java @@ -0,0 +1,171 @@ +package com.ningdatech.pmapi.projectlib.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + *

+ * 项目应用表 + *

+ * + * @author WendyYang + * @since 2023-02-05 + */ +@TableName("nd_project_application") +@ApiModel(value = "NdProjectApplication对象", description = "") +public class ProjectApplication implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("应用ID") + @TableId(type = IdType.AUTO) + private Long id; + + @ApiModelProperty("项目ID") + private String projectId; + + @ApiModelProperty("是否初次建设 0否 1是") + private Integer isFirst; + + @ApiModelProperty("应用名称") + private String applicationName; + + @ApiModelProperty("创建时间") + private LocalDateTime createOn; + + @ApiModelProperty("更新时间") + private LocalDateTime updateOn; + + @ApiModelProperty("删除时间") + private LocalDateTime deleteOn; + + @ApiModelProperty("关联IRS现有应用") + private String relatedExistsApplication; + + @ApiModelProperty("关联IRS现有应用-IRS应用编码") + private String relatedExistsApplicationCode; + + @ApiModelProperty("应用类型") + private String applicationType; + + @ApiModelProperty("建设层级 1:国家 2:省级 3:市级 4:县(市、区)") + private Integer buildLevel; + + @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 bizDomain; + + @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; + + private Long createBy; + + private Long updateBy; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java deleted file mode 100644 index 9373de6..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/INdProjectService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.projectlib.service; - -import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author WendyYang - * @since 2023-02-03 - */ -public interface INdProjectService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectApplicationService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectApplicationService.java new file mode 100644 index 0000000..962b798 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectApplicationService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.service; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author WendyYang + * @since 2023-02-05 + */ +public interface IProjectApplicationService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java new file mode 100644 index 0000000..0fa0bb6 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.service; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +public interface IProjectService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java deleted file mode 100644 index 7ae06cf..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/NdProjectServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.projectlib.service.impl; - -import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.mapper.NdProjectMapper; -import com.ningdatech.pmapi.projectlib.service.INdProjectService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author WendyYang - * @since 2023-02-03 - */ -@Service -public class NdProjectServiceImpl extends ServiceImpl implements INdProjectService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java new file mode 100644 index 0000000..027ce8b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectApplicationServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.projectlib.service.impl; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; +import com.ningdatech.pmapi.projectlib.mapper.ProjectApplicationMapper; +import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WendyYang + * @since 2023-02-05 + */ +@Service +public class ProjectApplicationServiceImpl extends ServiceImpl implements IProjectApplicationService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java new file mode 100644 index 0000000..7eac9b3 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.projectlib.service.impl; + +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.mapper.ProjectMapper; +import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WendyYang + * @since 2023-02-03 + */ +@Service +public class ProjectServiceImpl extends ServiceImpl implements IProjectService { + +}