@@ -187,10 +187,6 @@ | |||
<groupId>org.slf4j</groupId> | |||
<artifactId>slf4j-log4j12</artifactId> | |||
</exclusion> | |||
<!-- <exclusion>--> | |||
<!-- <groupId>org.springframework.boot</groupId>--> | |||
<!-- <artifactId>spring-boot-starter-security</artifactId>--> | |||
<!-- </exclusion>--> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
@@ -203,10 +199,6 @@ | |||
</exclusion> | |||
</exclusions> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-flowable-starter</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
@@ -235,12 +227,10 @@ | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-cache-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-basic</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.kingbase.dialect</groupId> | |||
@@ -251,17 +241,14 @@ | |||
<dependency> | |||
<groupId>com.alibaba</groupId> | |||
<artifactId>easyexcel-core</artifactId> | |||
<version>3.1.2</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-file-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-zwdd-starter</artifactId> | |||
<version>1.0.0</version> | |||
<artifactId>nd-flowable-starter</artifactId> | |||
</dependency> | |||
</dependencies> | |||
<!-- 打包 --> | |||
@@ -1,11 +1,11 @@ | |||
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.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; | |||
@@ -26,28 +26,24 @@ 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<NdDeclaredProjectVo> list(@Validated @ModelAttribute DeclaredProjectParamDto params) {; | |||
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; | |||
return declaredProjectManage.page(params); | |||
} | |||
@ApiOperation(value = "申报项目草稿箱", notes = "申报项目草稿箱") | |||
@GetMapping("/draft") | |||
public PageVo<NdDeclaredProjectVo> draft(@Validated @ModelAttribute ProcessStartParamsVo params) { | |||
public PageVo<ProjectLibListItemVO> draft(@Validated @ModelAttribute ProcessStartParamsVo params) { | |||
return PageVo.empty(); | |||
} | |||
@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 + " 成功"; | |||
} | |||
} |
@@ -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<String,Object> formData; | |||
@NotBlank | |||
private String regionCode; | |||
} |
@@ -16,7 +16,7 @@ import lombok.NoArgsConstructor; | |||
@Builder | |||
@NoArgsConstructor | |||
@AllArgsConstructor | |||
public class DeclaredProjectParamDto extends PagePo { | |||
public class DeclaredProjectListParamDto extends PagePo { | |||
private String projectName; | |||
@@ -1,20 +1,32 @@ | |||
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.DeclaredProjectParamDto; | |||
import com.wflow.bean.entity.NdDeclaredProject; | |||
import com.wflow.bean.vo.NdDeclaredProjectVo; | |||
import com.wflow.service.NdDeclaredProjectService; | |||
import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectDto; | |||
import com.ningdatech.pmapi.declared.entity.dto.DeclaredProjectListParamDto; | |||
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.exception.BusinessException; | |||
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; | |||
@@ -29,28 +41,77 @@ import java.util.stream.Collectors; | |||
@RequiredArgsConstructor | |||
public class DeclaredProjectManage { | |||
private final NdDeclaredProjectService declaredProjectService; | |||
public PageVo<NdDeclaredProjectVo> page(DeclaredProjectParamDto params) { | |||
Page<NdDeclaredProject> page = params.page(); | |||
LambdaQueryWrapper<NdDeclaredProject> 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); | |||
private final INdProjectService ndProjectService; | |||
private final ProcessInstanceService processService; | |||
private final ProcessModelService processModelService; | |||
public PageVo<ProjectLibListItemVO> page(DeclaredProjectListParamDto params) { | |||
Page<Project> page = params.page(); | |||
LambdaQueryWrapper<Project> 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<NdDeclaredProjectVo> res = page.getRecords().stream().map(record -> { | |||
NdDeclaredProjectVo vo = new NdDeclaredProjectVo(); | |||
List<ProjectLibListItemVO> 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()); | |||
} | |||
/** | |||
* 启动实例 | |||
* @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(); | |||
params.setDeptId("6179678"); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
dto.getFormData().putAll( | |||
JSON.parseObject(JSON.toJSONString(dto.getProjectInfo()), new TypeReference<Map<String, Object>>() { | |||
})); | |||
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); | |||
ndProjectService.save(project); | |||
}catch (Exception e){ | |||
log.error("项目信息入库错误 ",e); | |||
throw new BusinessException("项目信息入库错误 请注意格式"); | |||
} | |||
return instanceId; | |||
} | |||
} |
@@ -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; | |||
} | |||
} |
@@ -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; | |||
} | |||
} |
@@ -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; | |||
/** | |||
* <p> | |||
* | |||
* </p> | |||
* | |||
* @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; | |||
} |
@@ -281,8 +281,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; | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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<T> 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<Node<?>> branchs; | |||
} |
@@ -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<Node> 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<Node> getSubNode() { | |||
return subNode; | |||
} | |||
public void setSubNode(List<Node> subNode) { | |||
this.subNode = subNode; | |||
} | |||
} | |||
} |
@@ -123,6 +123,32 @@ | |||
<artifactId>kingbase8-8.2.0</artifactId> | |||
<version>1.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.alibaba</groupId> | |||
<artifactId>easyexcel-core</artifactId> | |||
<version>3.1.2</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-file-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-zwdd-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-cache-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.ningdatech</groupId> | |||
<artifactId>nd-log-starter</artifactId> | |||
<version>1.0.0</version> | |||
</dependency> | |||
</dependencies> | |||
</dependencyManagement> | |||