# Conflicts: # pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.javatags/24080901
@@ -0,0 +1,148 @@ | |||||
package com.ningdatech.pmapi.common.enums; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Getter; | |||||
import lombok.NoArgsConstructor; | |||||
/** | |||||
* 导出选项枚举 | |||||
* | |||||
* @author CMM | |||||
* @since 2023/02/10 16:38 | |||||
*/ | |||||
@Getter | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
public enum ExportOptionEnum { | |||||
/** | |||||
* 导出选项 | |||||
*/ | |||||
id(1,"项目ID"), | |||||
projectName(2,"项目名称"), | |||||
areaCode(3,"行政区划编码"), | |||||
area(4,"行政区划名称"), | |||||
responsibleMan(5,"项目负责人"), | |||||
responsibleManMobile(6,"项目负责人手机号"), | |||||
contactName(7,"项目联系人"), | |||||
contactPhone(8,"项目联系人手机号"), | |||||
higherSuperOrg(9,"上级业务主管单位"), | |||||
higherSuperOrgCode(10,"上级主管单位浙政钉ID"), | |||||
superOrg(11,"本级主管部门"), | |||||
superOrgCode(12,"本级主管部门浙政钉ID"), | |||||
buildOrgName(13,"建设单位名称"), | |||||
buildOrgZheJiangGovDingId(14,"建设单位浙政钉ID"), | |||||
buildOrgCode(15,"建设单位统一信用代码"), | |||||
projectType(16,"项目类型"), | |||||
isFirst(17,"是否首次新建"), | |||||
relatedExistsApplication(18,"关联应用"), | |||||
relatedExistsApplicationCode(19,"关联应用IRS编码"), | |||||
declareAmount(20,"申报金额(万元)"), | |||||
approvedTotalInvestmentIncrease(21,"批复金额"), | |||||
/** | |||||
* 表里没有 | |||||
*/ | |||||
budgetSource(22,"预算来源"), | |||||
projectYear(23,"预算年度"), | |||||
projectIntroduction(24,"项目简介"), | |||||
buildBasis(25,"立项依据"), | |||||
buildLevel(26,"建设层级"), | |||||
developCode(27,"发改编码"), | |||||
financialCode(28,"财政编码"), | |||||
/** | |||||
* 表里没有 | |||||
*/ | |||||
informationValidity(29,"信息是否有效"), | |||||
isDigitalReform(30,"是否数字化改革项目"), | |||||
bizDomain(31,"综合应用领域"), | |||||
isCloud(32,"是否上云"), | |||||
cloudType(33,"云类型"), | |||||
fourSystems(34,"四大体系"), | |||||
isTemporaryAugment(35,"是否临时增补"), | |||||
protectionLevel(36,"等保级别"), | |||||
isSecretComments(37,"是否密评"), | |||||
businessNumber(38,"业务编号"), | |||||
businessName(39,"业务名称"), | |||||
orgName(40,"单位名称"), | |||||
softwareDevelopmentAmount(41,"软件开发(万元)"), | |||||
cloudHardwarePurchaseAmount(42,"云资源、硬件购置(万元)"), | |||||
thirdPartyAmount(43,"第三方服务(万元)"), | |||||
safetyInputTitle(44,"投入项"), | |||||
safetyInputDescribe(45,"内容描述"), | |||||
safetyInputAmount(46,"金额"), | |||||
annualPlanAmount(47,"年度支付金额(万元)"), | |||||
annualPlanHaveAmount(48,"自有资金(万元)"), | |||||
declareGovOwnFinanceAmount(49,"政府投资-本级财政资金(万元)"), | |||||
declareGovSuperiorFinanceAmount(50,"政府投资-上级补助资金(万元)"), | |||||
declareBankLendingAmount(51,"银行贷款(万元)"), | |||||
declareOtherAmount(52,"其它资金(万元)"), | |||||
engineeringSpeedOne(53,"第一季度"), | |||||
engineeringSpeedTwo(54,"第二季度"), | |||||
engineeringSpeedThree(55,"第三季度"), | |||||
engineeringSpeedFour(56,"第四季度"), | |||||
preliminaryPlanFile(57,"初步方案"), | |||||
supportingMaterialsFile(58,"附件-佐证材料"), | |||||
projectRemarks(59,"备注"); | |||||
private Integer code; | |||||
private String desc; | |||||
} |
@@ -2,6 +2,7 @@ package com.ningdatech.pmapi.common.handler; | |||||
import cn.hutool.json.JSONUtil; | import cn.hutool.json.JSONUtil; | ||||
import com.ningdatech.basic.model.ApiResponse; | import com.ningdatech.basic.model.ApiResponse; | ||||
import com.ningdatech.pmapi.common.utils.BizUtils; | |||||
import org.springframework.core.MethodParameter; | import org.springframework.core.MethodParameter; | ||||
import org.springframework.http.MediaType; | import org.springframework.http.MediaType; | ||||
import org.springframework.http.converter.HttpMessageConverter; | import org.springframework.http.converter.HttpMessageConverter; | ||||
@@ -16,7 +17,15 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | |||||
* @Date 2021/7/21 11:26 | * @Date 2021/7/21 11:26 | ||||
* @Version 1.0 | * @Version 1.0 | ||||
**/ | **/ | ||||
@RestControllerAdvice(basePackages = {"com.ningdatech.pmapi.fiscal.controller"}) | |||||
@RestControllerAdvice(basePackages = { | |||||
"com.ningdatech.pmapi.fiscal.controller", | |||||
"com.ningdatech.pmapi.organization.controller", | |||||
"com.ningdatech.pmapi.projectdeclared.controller", | |||||
"com.ningdatech.pmapi.projectlib.controller", | |||||
"com.ningdatech.pmapi.sys.controller", | |||||
"com.ningdatech.pmapi.todocenter.controller", | |||||
"com.ningdatech.pmapi.user.controller" | |||||
}) | |||||
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | ||||
private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | ||||
@@ -6,6 +6,7 @@ import lombok.Data; | |||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import java.math.BigDecimal; | |||||
/** | /** | ||||
* 待办中心待我处理项目列表导出实体 | * 待办中心待我处理项目列表导出实体 | ||||
@@ -20,25 +21,6 @@ import java.io.Serializable; | |||||
public class ExcelExportDTO implements Serializable { | public class ExcelExportDTO implements Serializable { | ||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
//@ExcelProperty("项目名称") | |||||
//private String projectName; | |||||
// | |||||
//@ExcelProperty("申报单位") | |||||
//private String buildUnitName; | |||||
// | |||||
//@ExcelProperty("申报金额") | |||||
//private Integer declareAmount; | |||||
// | |||||
//@ExcelProperty("预算年度") | |||||
//private Integer projectYear; | |||||
// | |||||
//@ExcelProperty("流程状态") | |||||
//private String processStatusName; | |||||
// | |||||
//@ExcelProperty("发起时间") | |||||
//@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | |||||
//private LocalDateTime processLaunchTime; | |||||
@ExcelProperty("项目ID") | @ExcelProperty("项目ID") | ||||
private Long id; | private Long id; | ||||
@@ -91,128 +73,128 @@ public class ExcelExportDTO implements Serializable { | |||||
private Integer isFirst; | private Integer isFirst; | ||||
@ExcelProperty("关联应用") | @ExcelProperty("关联应用") | ||||
private Boolean includeApplication; | |||||
private String relatedExistsApplication; | |||||
@ExcelProperty("关联应用IRS编码") | @ExcelProperty("关联应用IRS编码") | ||||
private Boolean includeApplicationIRSCode; | |||||
private String relatedExistsApplicationCode; | |||||
@ExcelProperty("申报金额(万元)") | @ExcelProperty("申报金额(万元)") | ||||
private Boolean declareAmount; | |||||
private BigDecimal declareAmount; | |||||
@ExcelProperty("批复金额") | @ExcelProperty("批复金额") | ||||
private Boolean approvedTotalInvestmentIncrease; | |||||
private BigDecimal approvedTotalInvestmentIncrease; | |||||
@ExcelProperty("预算来源") | @ExcelProperty("预算来源") | ||||
private Boolean budgetSource; | |||||
private String budgetSource; | |||||
@ExcelProperty("预算年度") | @ExcelProperty("预算年度") | ||||
private Boolean budgetYear; | |||||
private Integer projectYear; | |||||
@ExcelProperty("项目简介") | @ExcelProperty("项目简介") | ||||
private Boolean projectIntroduction; | |||||
private String projectIntroduction; | |||||
@ExcelProperty("立项依据") | @ExcelProperty("立项依据") | ||||
private Boolean buildBasis; | |||||
private String buildBasis; | |||||
@ExcelProperty("建设层级") | @ExcelProperty("建设层级") | ||||
private Boolean buildLevel; | |||||
private Integer buildLevel; | |||||
@ExcelProperty("发改编码") | @ExcelProperty("发改编码") | ||||
private Boolean developCode; | |||||
private String developCode; | |||||
@ExcelProperty("财政编码") | @ExcelProperty("财政编码") | ||||
private Boolean financialCode; | |||||
private String financialCode; | |||||
@ExcelProperty("信息是否有效") | @ExcelProperty("信息是否有效") | ||||
private Boolean informationValidity; | private Boolean informationValidity; | ||||
@ExcelProperty("是否数字化改革项目") | @ExcelProperty("是否数字化改革项目") | ||||
private Boolean isDigitalReform; | |||||
private Integer isDigitalReform; | |||||
@ExcelProperty("综合应用领域") | @ExcelProperty("综合应用领域") | ||||
private Boolean bizDomain; | |||||
private String bizDomain; | |||||
@ExcelProperty("是否上云") | @ExcelProperty("是否上云") | ||||
private Boolean isCloud; | |||||
private Integer isCloud; | |||||
@ExcelProperty("云类型") | @ExcelProperty("云类型") | ||||
private Boolean cloudType; | |||||
private String cloudType; | |||||
@ExcelProperty("四大体系") | @ExcelProperty("四大体系") | ||||
private Boolean fourSystems; | |||||
private Integer fourSystems; | |||||
@ExcelProperty("是否临时增补") | @ExcelProperty("是否临时增补") | ||||
private Boolean isTemporaryAugment; | |||||
private Integer isTemporaryAugment; | |||||
@ExcelProperty("等保级别") | @ExcelProperty("等保级别") | ||||
private Boolean protectionLevel; | |||||
private Integer protectionLevel; | |||||
@ExcelProperty("是否密评 0:否 1:是") | @ExcelProperty("是否密评 0:否 1:是") | ||||
private Boolean isSecretComments; | |||||
private Integer isSecretComments; | |||||
@ExcelProperty("业务编号") | @ExcelProperty("业务编号") | ||||
private Boolean businessNumber; | |||||
private String businessNumber; | |||||
@ExcelProperty("业务名称") | @ExcelProperty("业务名称") | ||||
private Boolean businessName; | |||||
private String businessName; | |||||
@ExcelProperty("单位名称") | @ExcelProperty("单位名称") | ||||
private Boolean unitName; | |||||
private String orgName; | |||||
@ExcelProperty("软件开发(万元)") | @ExcelProperty("软件开发(万元)") | ||||
private Boolean softwareDevelopmentAmount; | |||||
private BigDecimal softwareDevelopmentAmount; | |||||
@ExcelProperty("云资源、硬件购置(万元)") | @ExcelProperty("云资源、硬件购置(万元)") | ||||
private Boolean cloudHardwarePurchaseAmount; | |||||
private BigDecimal cloudHardwarePurchaseAmount; | |||||
@ExcelProperty("第三方服务(万元)") | @ExcelProperty("第三方服务(万元)") | ||||
private Boolean thirdPartyAmount; | |||||
private BigDecimal thirdPartyAmount; | |||||
@ExcelProperty("投入项") | @ExcelProperty("投入项") | ||||
private Boolean safetyInputTitle; | |||||
private String safetyInputTitle; | |||||
@ExcelProperty("内容描述") | @ExcelProperty("内容描述") | ||||
private Boolean safetyInputDescribe; | |||||
private String safetyInputDescribe; | |||||
@ExcelProperty("金额(万元)") | @ExcelProperty("金额(万元)") | ||||
private Boolean safetyInputAmount; | |||||
private BigDecimal safetyInputAmount; | |||||
@ExcelProperty("年度支付金额(万元)") | @ExcelProperty("年度支付金额(万元)") | ||||
private Boolean annualPlanAmount; | |||||
private BigDecimal annualPlanAmount; | |||||
@ExcelProperty("自有资金(万元)") | @ExcelProperty("自有资金(万元)") | ||||
private Boolean annualPlanHaveAmount; | |||||
private BigDecimal annualPlanHaveAmount; | |||||
@ExcelProperty("政府投资-本级财政资金(万元)") | @ExcelProperty("政府投资-本级财政资金(万元)") | ||||
private Boolean declareGovernmentOwnFinanceAmount; | |||||
private BigDecimal declareGovOwnFinanceAmount; | |||||
@ExcelProperty("政府投资-上级补助资金(万元)") | @ExcelProperty("政府投资-上级补助资金(万元)") | ||||
private Boolean declareGovernmentSuperiorFinanceAmount; | |||||
private BigDecimal declareGovSuperiorFinanceAmount; | |||||
@ExcelProperty("银行贷款(万元)") | @ExcelProperty("银行贷款(万元)") | ||||
private Boolean declareBankLendingAmount; | |||||
private BigDecimal declareBankLendingAmount; | |||||
@ExcelProperty("其它资金(万元)") | @ExcelProperty("其它资金(万元)") | ||||
private Boolean declareOtherAmount; | |||||
private BigDecimal declareOtherAmount; | |||||
@ExcelProperty("第一季度") | @ExcelProperty("第一季度") | ||||
private Boolean engineeringSpeedOne; | |||||
private String engineeringSpeedOne; | |||||
@ExcelProperty("第二季度") | @ExcelProperty("第二季度") | ||||
private Boolean engineeringSpeedTwo; | |||||
private String engineeringSpeedTwo; | |||||
@ExcelProperty("第三季度") | @ExcelProperty("第三季度") | ||||
private Boolean engineeringSpeedThree; | |||||
private String engineeringSpeedThree; | |||||
@ExcelProperty("第四季度") | @ExcelProperty("第四季度") | ||||
private Boolean engineeringSpeedFour; | |||||
private String engineeringSpeedFour; | |||||
@ExcelProperty("初步方案") | @ExcelProperty("初步方案") | ||||
private Boolean preliminaryPlanFile; | |||||
private String preliminaryPlanFile; | |||||
@ExcelProperty("附件-佐证材料") | @ExcelProperty("附件-佐证材料") | ||||
private Boolean supportingMaterialsFile; | |||||
private String supportingMaterialsFile; | |||||
@ExcelProperty("备注") | @ExcelProperty("备注") | ||||
private Boolean projectRemarks; | |||||
private String projectRemarks; | |||||
} | } |
@@ -2,6 +2,7 @@ package com.ningdatech.pmapi.common.util; | |||||
import cn.hutool.core.util.StrUtil; | import cn.hutool.core.util.StrUtil; | ||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.util.NumberUtils; | import org.springframework.util.NumberUtils; | ||||
import java.util.Arrays; | import java.util.Arrays; | ||||
@@ -50,4 +51,16 @@ public class BizUtils { | |||||
} | } | ||||
} | } | ||||
public static boolean getJSONType(String str) { | |||||
boolean result = false; | |||||
if (StringUtils.isNotBlank(str)) { | |||||
str = str.trim(); | |||||
if (str.startsWith("{") && str.endsWith("}")) { | |||||
result = true; | |||||
} else if (str.startsWith("[") && str.endsWith("]")) { | |||||
result = true; | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
} | } |
@@ -10,7 +10,6 @@ import java.util.function.BiConsumer; | |||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import com.alibaba.druid.wall.violation.ErrorCode; | |||||
import com.alibaba.excel.EasyExcel; | import com.alibaba.excel.EasyExcel; | ||||
import com.alibaba.excel.ExcelWriter; | import com.alibaba.excel.ExcelWriter; | ||||
import com.alibaba.excel.write.metadata.WriteSheet; | import com.alibaba.excel.write.metadata.WriteSheet; | ||||
@@ -92,7 +91,6 @@ public class ExcelDownUtil { | |||||
}else { | }else { | ||||
writer = EasyExcel.write(response.getOutputStream()).build(); | writer = EasyExcel.write(response.getOutputStream()).build(); | ||||
} | } | ||||
int sheetNum = 0; | int sheetNum = 0; | ||||
if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | ||||
sheetNum = excelExport.getSheets().size(); | sheetNum = excelExport.getSheets().size(); | ||||
@@ -107,7 +105,7 @@ public class ExcelDownUtil { | |||||
} | } | ||||
for (int i = 0; i < sheetNum; i++) { | for (int i = 0; i < sheetNum; i++) { | ||||
WriteSheet sheet = EasyExcel.writerSheet(i).build(); | |||||
WriteSheet sheet = EasyExcel.writerSheet(i).automaticMergeHead(false).build(); | |||||
if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | if (CollectionUtils.isNotEmpty(excelExport.getSheets())){ | ||||
sheet.setSheetName(excelExport.getSheets().get(i)); | sheet.setSheetName(excelExport.getSheets().get(i)); | ||||
} | } | ||||
@@ -135,4 +133,5 @@ public class ExcelDownUtil { | |||||
response.setContentType(StrPool.CONTENT_TYPE); | response.setContentType(StrPool.CONTENT_TYPE); | ||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + encodeName(fileName) + ".xls"); | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + encodeName(fileName) + ".xls"); | ||||
} | } | ||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.controller; | package com.ningdatech.pmapi.projectdeclared.controller; | ||||
import com.ningdatech.basic.model.ApiResponse; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; | import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; | ||||
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; | import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; | ||||
@@ -8,6 +9,10 @@ import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredDetailVO; | |||||
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredListItemVO; | import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredListItemVO; | ||||
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; | import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; | ||||
import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; | import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; | ||||
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | |||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -30,21 +35,17 @@ import org.springframework.web.bind.annotation.*; | |||||
public class DeclaredProjectController { | public class DeclaredProjectController { | ||||
private final DeclaredProjectManage declaredProjectManage; | private final DeclaredProjectManage declaredProjectManage; | ||||
private final ProjectLibManage projectLibManage; | |||||
@ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") | @ApiOperation(value = "申报项目已申报列表", notes = "申报项目已申报列表") | ||||
@GetMapping("/list") | @GetMapping("/list") | ||||
public PageVo<ProjectDeclaredListItemVO> list(@Validated @ModelAttribute DeclaredProjectListParamDto params) {; | |||||
return declaredProjectManage.page(params); | |||||
} | |||||
@ApiOperation(value = "申报项目已申报项目", notes = "申报项目已申报项目") | |||||
@GetMapping("/{id}") | |||||
public ProjectDeclaredDetailVO detail(@PathVariable Long id) {; | |||||
return declaredProjectManage.detail(id); | |||||
public PageVo<ProjectLibListItemVO> list(@ModelAttribute ProjectListReq req) {; | |||||
return projectLibManage.projectLibList(req); | |||||
} | } | ||||
@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | @ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | ||||
@GetMapping("/draft") | @GetMapping("/draft") | ||||
public PageVo<ProjectDraftVo> draft(@Validated @ModelAttribute DeclaredProjectListParamDto params) { | |||||
public PageVo<ProjectDraftVo> draft(@ModelAttribute DeclaredProjectListParamDto params) { | |||||
return declaredProjectManage.pageDraft(params); | return declaredProjectManage.pageDraft(params); | ||||
} | } | ||||
@@ -0,0 +1,50 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.controller; | |||||
import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto; | |||||
import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | |||||
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.*; | |||||
/** | |||||
* @Classname PrequalificationDeclaredController | |||||
* @Description 预审申报 | |||||
* @Date 2023/2/12 9:03 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Slf4j | |||||
@Validated | |||||
@RestController | |||||
@RequestMapping("/api/v1/prequalification") | |||||
@Api(value = "Prequalification", tags = "申报管理-预审申报") | |||||
@RequiredArgsConstructor | |||||
public class PrequalificationDeclaredController { | |||||
private final ProjectLibManage projectLibManage; | |||||
private final PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage; | |||||
@ApiOperation(value = "可预审申报项目列表", notes = "可预审申报项目列表") | |||||
@GetMapping("/list") | |||||
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ProjectListReq req) { | |||||
//项目阶段 状态 已定 待预审 | |||||
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||||
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); | |||||
return projectLibManage.projectLibList(req); | |||||
} | |||||
@ApiOperation(value = "申报预审", notes = "申报预审") | |||||
@PostMapping("/start") | |||||
public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDto dto) { | |||||
String instanceId = prequalificationDeclaredProjectManage.startTheProcess(dto); | |||||
return "提交预审 " + instanceId + " 成功"; | |||||
} | |||||
} |
@@ -32,14 +32,11 @@ public class DeclaredProjectDto implements Serializable { | |||||
private Map<String,Object> formData; | private Map<String,Object> formData; | ||||
@NotBlank | |||||
private String regionCode; | |||||
@NotNull | @NotNull | ||||
private ProcessInstanceUserDto user; | private ProcessInstanceUserDto user; | ||||
public Map<String,Object> getFormData(){ | public Map<String,Object> getFormData(){ | ||||
if(CollUtil.isNotEmpty(this.formData)){ | |||||
if(CollUtil.isEmpty(this.formData)){ | |||||
this.formData = Maps.newHashMap(); | this.formData = Maps.newHashMap(); | ||||
return this.formData; | return this.formData; | ||||
} | } | ||||
@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; | |||||
import lombok.Builder; | import lombok.Builder; | ||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||
import org.springframework.format.annotation.DateTimeFormat; | |||||
/** | /** | ||||
* @Classname DeclaredProjectParamDto | * @Classname DeclaredProjectParamDto | ||||
@@ -28,7 +29,9 @@ public class DeclaredProjectListParamDto extends PagePo { | |||||
private Integer projectYear; | private Integer projectYear; | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
private String startTime; | private String startTime; | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
private String endTime; | private String endTime; | ||||
} | } |
@@ -0,0 +1,43 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.entity.dto; | |||||
import cn.hutool.core.collection.CollUtil; | |||||
import com.google.common.collect.Maps; | |||||
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; | |||||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
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 PreDeclaredProjectDto implements Serializable { | |||||
@NotNull | |||||
private Long projectId; | |||||
private Map<String,Object> formData; | |||||
@NotNull | |||||
private ProcessInstanceUserDto user; | |||||
public Map<String,Object> getFormData(){ | |||||
if(CollUtil.isEmpty(this.formData)){ | |||||
this.formData = Maps.newHashMap(); | |||||
return this.formData; | |||||
} | |||||
return this.formData; | |||||
} | |||||
} |
@@ -11,14 +11,14 @@ import java.util.List; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* ProjectLibListItemVO | |||||
* | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author WendyYang | |||||
* @author ZPF | |||||
* @since 15:13 2023/2/1 | * @since 15:13 2023/2/1 | ||||
*/ | */ | ||||
@Data | @Data | ||||
@ApiModel("申报项目列表视图") | |||||
@ApiModel("项目详情") | |||||
public class ProjectDeclaredDetailVO { | public class ProjectDeclaredDetailVO { | ||||
@ApiModelProperty("应用ID 新增为空") | @ApiModelProperty("应用ID 新增为空") | ||||
@@ -1,11 +1,14 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.entity.vo; | package com.ningdatech.pmapi.projectdeclared.entity.vo; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.Objects; | |||||
import java.util.Optional; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -49,6 +52,16 @@ public class ProjectDeclaredListItemVO { | |||||
@ApiModelProperty("业务领域") | @ApiModelProperty("业务领域") | ||||
private String bizDomain; | private String bizDomain; | ||||
private String projectTypeName; | |||||
public String getProjectTypeName(){ | |||||
if(Objects.nonNull(this.projectType)){ | |||||
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType)) | |||||
.ifPresent(desc -> this.projectTypeName = desc); | |||||
} | |||||
return this.projectTypeName; | |||||
} | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
private LocalDateTime createOn; | private LocalDateTime createOn; | ||||
@@ -21,6 +21,7 @@ import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; | import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; | import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.wflow.bean.entity.WflowModels; | import com.wflow.bean.entity.WflowModels; | ||||
@@ -62,7 +63,7 @@ public class DeclaredProjectManage { | |||||
private final ProcessModelService processModelService; | private final ProcessModelService processModelService; | ||||
public PageVo<ProjectDeclaredListItemVO> page(DeclaredProjectListParamDto params) { | |||||
public PageVo<ProjectLibListItemVO> page(DeclaredProjectListParamDto params) { | |||||
Page<Project> page = params.page(); | Page<Project> page = params.page(); | ||||
LambdaQueryWrapper<Project> wrapper = Wrappers.lambdaQuery(Project.class) | LambdaQueryWrapper<Project> wrapper = Wrappers.lambdaQuery(Project.class) | ||||
.ge(Objects.nonNull(params.getStartTime()), Project::getCreateOn, params.getStartTime()) | .ge(Objects.nonNull(params.getStartTime()), Project::getCreateOn, params.getStartTime()) | ||||
@@ -77,8 +78,8 @@ public class DeclaredProjectManage { | |||||
if (0L == page.getTotal()) { | if (0L == page.getTotal()) { | ||||
return PageVo.empty(); | return PageVo.empty(); | ||||
} | } | ||||
List<ProjectDeclaredListItemVO> res = page.getRecords().stream().map(record -> { | |||||
ProjectDeclaredListItemVO vo = new ProjectDeclaredListItemVO(); | |||||
List<ProjectLibListItemVO> res = page.getRecords().stream().map(record -> { | |||||
ProjectLibListItemVO vo = new ProjectLibListItemVO(); | |||||
BeanUtils.copyProperties(record, vo); | BeanUtils.copyProperties(record, vo); | ||||
return vo; | return vo; | ||||
}).collect(Collectors.toList()); | }).collect(Collectors.toList()); | ||||
@@ -132,7 +133,8 @@ public class DeclaredProjectManage { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public String startTheProcess(DeclaredProjectDto dto) { | public String startTheProcess(DeclaredProjectDto dto) { | ||||
String regionCode = dto.getRegionCode(); | |||||
ProjectDto projectInfo = dto.getProjectInfo(); | |||||
String regionCode = projectInfo.getAreaCode(); | |||||
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) | WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) | ||||
.eq(WflowModels::getRegionCode, regionCode) | .eq(WflowModels::getRegionCode, regionCode) | ||||
@@ -140,7 +142,8 @@ public class DeclaredProjectManage { | |||||
.last("limit 1")); | .last("limit 1")); | ||||
if (Objects.isNull(model)) { | if (Objects.isNull(model)) { | ||||
throw new BusinessException(String.format("此 【%s】区域找不到流程配置", regionCode)); | |||||
log.error("此 【{}】区域找不到单位流程配置", regionCode); | |||||
throw new BusinessException(String.format("此 【%s】区域找不到单位流程配置", regionCode)); | |||||
} | } | ||||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | ProcessStartParamsVo params = new ProcessStartParamsVo(); | ||||
@@ -0,0 +1,118 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.manage; | |||||
import com.alibaba.fastjson.JSON; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.ningdatech.basic.function.VUtils; | |||||
import com.ningdatech.pmapi.common.enums.ProjectProessStageEnum; | |||||
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | |||||
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto; | |||||
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | |||||
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.springframework.beans.BeanUtils; | |||||
import org.springframework.stereotype.Component; | |||||
import java.time.LocalDateTime; | |||||
import java.util.Collections; | |||||
import java.util.Map; | |||||
import java.util.Objects; | |||||
/** | |||||
* @Classname ProqualificationDeclaredProjectManage | |||||
* @Description | |||||
* @Date 2023/2/13 14:48 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Component | |||||
@Slf4j | |||||
@RequiredArgsConstructor | |||||
public class PrequalificationDeclaredProjectManage { | |||||
private final IProjectService projectService; | |||||
private final StateMachineUtils stateMachineUtils; | |||||
private final ProcessInstanceService processService; | |||||
private final ProcessModelService processModelService; | |||||
/** | |||||
* 提交预审 | |||||
* | |||||
* @param dto | |||||
* @return | |||||
*/ | |||||
public String startTheProcess(PreDeclaredProjectDto dto) { | |||||
Project projectInfo = projectService.getById(dto.getProjectId()); | |||||
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!"); | |||||
String regionCode = projectInfo.getAreaCode(); | |||||
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) | |||||
.eq(WflowModels::getRegionCode, regionCode) | |||||
.eq(WflowModels::getFormName, ProjectProessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getDesc()) | |||||
.last("limit 1")); | |||||
if (Objects.isNull(model)) { | |||||
log.error("此 【{}】区域找不到 预审流程配置", regionCode); | |||||
throw new BusinessException(String.format("此 【%s】区域找不到 预审流程配置", regionCode)); | |||||
} | |||||
//首先要判断 项目当前状态 是不是 待预审 | |||||
VUtils.isTrue(!ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(projectInfo.getStatus()) || | |||||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage())) | |||||
.throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); | |||||
//TODO 再判断 该项目是否 真实走完 单位内部审批 | |||||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||||
params.setUser(dto.getUser()); | |||||
params.setProcessUsers(Collections.emptyMap()); | |||||
//放入条件判断的项目字段 | |||||
ProjectConditionDto conditionDto = new ProjectConditionDto(); | |||||
BeanUtils.copyProperties(projectInfo, conditionDto); | |||||
if (Objects.nonNull(conditionDto)) { | |||||
dto.getFormData().putAll( | |||||
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() { | |||||
}) | |||||
); | |||||
} | |||||
params.setFormData(dto.getFormData()); | |||||
String instanceId = processService.startProcess(model.getProcessDefId(), params); | |||||
log.info("提交预审项目成功 【{}】", instanceId); | |||||
//保存预审项目 | |||||
modifyProject(projectInfo, instanceId); | |||||
return instanceId; | |||||
} | |||||
/** | |||||
* 提交预审项目 时 更新信息 | |||||
* | |||||
* @param project | |||||
* @param instanceId | |||||
*/ | |||||
private void modifyProject(Project project, String instanceId) { | |||||
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示 | |||||
try { | |||||
project.setUpdateOn(LocalDateTime.now()); | |||||
project.setInstCode(instanceId); | |||||
//调用状态机 进入下一个通过状态 | |||||
stateMachineUtils.execute(project,stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); | |||||
projectService.updateById(project); | |||||
} catch (Exception e) { | |||||
log.error("提交预审 项目信息修改 错误 ", e); | |||||
throw new BusinessException("提交预审 项目信息修改 错误 :" + e.getMessage()); | |||||
} | |||||
} | |||||
} |
@@ -5,15 +5,12 @@ import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.ModelAttribute; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import org.springframework.web.bind.annotation.*; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -37,9 +34,15 @@ public class ProjectLibController { | |||||
return projectLibManage.projectLibList(req); | return projectLibManage.projectLibList(req); | ||||
} | } | ||||
@GetMapping("/{id}") | |||||
@ApiOperation("获取项目详情") | |||||
private ProjectDetailVO detail (@PathVariable Long id){ | |||||
return projectLibManage.getProjectDetail(id); | |||||
} | |||||
@GetMapping("/getProjectInfo") | @GetMapping("/getProjectInfo") | ||||
@ApiOperation("获取申报项目信息") | @ApiOperation("获取申报项目信息") | ||||
private Project getProjectInfo (@Validated @ModelAttribute String processInstanceId){ | |||||
private Project getProjectInfo (@RequestParam String processInstanceId){ | |||||
return projectLibManage.getProjectInfo(processInstanceId); | return projectLibManage.getProjectInfo(processInstanceId); | ||||
} | } | ||||
@@ -7,13 +7,20 @@ import com.ningdatech.basic.model.PageVo; | |||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; | import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | |||||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectApplicationVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | |||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; | |||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.beans.BeanUtils; | |||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Objects; | |||||
import java.util.Optional; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -29,6 +36,8 @@ public class ProjectLibManage { | |||||
private final IProjectService projectService; | private final IProjectService projectService; | ||||
private final IProjectApplicationService applicationService; | |||||
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
Page<Project> page = projectService.page(req.page(), query); | Page<Project> page = projectService.page(req.page(), query); | ||||
@@ -55,6 +64,39 @@ public class ProjectLibManage { | |||||
/** | /** | ||||
* | * | ||||
* @param projectId 项目详情 | |||||
* @return com.ningdatech.pmapi.projectlib.model.entity.vo.ProjectDetailVO | |||||
* @author ZPF | |||||
* @since 2023/02/11 11:15 | |||||
*/ | |||||
public ProjectDetailVO getProjectDetail(Long projectId) { | |||||
// 查询项目申报信息 | |||||
Project projectInfo = projectService.getById(projectId); | |||||
if(Objects.isNull(projectInfo)){ | |||||
return null; | |||||
} | |||||
ProjectDetailVO vo = new ProjectDetailVO(); | |||||
BeanUtils.copyProperties(projectInfo, vo); | |||||
vo.buildDynamicForm(projectInfo.getDynamicForm()); | |||||
// 查询应用 | |||||
if(Objects.nonNull(vo)){ | |||||
List<ProjectApplication> applications = applicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) | |||||
.eq(ProjectApplication::getProjectId, vo.getId())); | |||||
Optional.ofNullable(applications).ifPresent(apps -> | |||||
vo.setProjectApplications(CollUtils.convert(apps, | |||||
app-> { | |||||
ProjectApplicationVO appVo = new ProjectApplicationVO(); | |||||
BeanUtils.copyProperties(app, appVo); | |||||
return appVo; | |||||
} | |||||
) | |||||
)); | |||||
} | |||||
return vo; | |||||
} | |||||
/** | |||||
* | |||||
* @param instanceCode 申报项目流程实例编号 | * @param instanceCode 申报项目流程实例编号 | ||||
* @return com.ningdatech.pmapi.projectlib.model.entity.Project | * @return com.ningdatech.pmapi.projectlib.model.entity.Project | ||||
* @author CMM | * @author CMM | ||||
@@ -25,7 +25,7 @@ public class ProjectApplicationDto implements Serializable { | |||||
private Long id; | private Long id; | ||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private String projectId; | |||||
private Long projectId; | |||||
@ApiModelProperty("是否初次建设 0否 1是") | @ApiModelProperty("是否初次建设 0否 1是") | ||||
private Integer isFirst; | private Integer isFirst; | ||||
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.dto; | package com.ningdatech.pmapi.projectlib.model.dto; | ||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -57,13 +58,13 @@ public class ProjectDto implements Serializable { | |||||
private String contactPhone; | private String contactPhone; | ||||
@ApiModelProperty("建设单位名称") | @ApiModelProperty("建设单位名称") | ||||
private String buildUnitName; | |||||
private String buildOrgName; | |||||
@ApiModelProperty("建设单位统一社会信用代码") | @ApiModelProperty("建设单位统一社会信用代码") | ||||
private String buildUnitCode; | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("建设单位浙政钉ID") | @ApiModelProperty("建设单位浙政钉ID") | ||||
private String buildUnitZheJiangGovernmentDingId; | |||||
private String buildOrgZheJiangGovDingId; | |||||
@ApiModelProperty("项目类型 1:建设 2:运维") | @ApiModelProperty("项目类型 1:建设 2:运维") | ||||
private Integer projectType; | private Integer projectType; | ||||
@@ -122,10 +123,10 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal declareHaveAmount; | private BigDecimal declareHaveAmount; | ||||
@ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") | @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") | ||||
private BigDecimal declareGovernmentOwnFinanceAmount; | |||||
private BigDecimal declareGovOwnFinanceAmount; | |||||
@ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | ||||
private BigDecimal declareGovernmentSuperiorFinanceAmount; | |||||
private BigDecimal declareGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("银行贷款(万元)") | @ApiModelProperty("银行贷款(万元)") | ||||
private BigDecimal declareBankLendingAmount; | private BigDecimal declareBankLendingAmount; | ||||
@@ -149,10 +150,10 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal annualPlanHaveAmount; | private BigDecimal annualPlanHaveAmount; | ||||
@ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") | @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") | ||||
private BigDecimal annualPlanGovernmentOwnFinanceAmount; | |||||
private BigDecimal annualPlanGovOwnFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | ||||
private BigDecimal annualPlanGovernmentSuperiorFinanceAmount; | |||||
private BigDecimal annualPlanGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-银行贷款(万元)") | @ApiModelProperty("年度支付计划-银行贷款(万元)") | ||||
private BigDecimal annualPlanBankLendingAmount; | private BigDecimal annualPlanBankLendingAmount; | ||||
@@ -163,6 +164,7 @@ public class ProjectDto implements Serializable { | |||||
@ApiModelProperty("立项批复资金(万元)") | @ApiModelProperty("立项批复资金(万元)") | ||||
private BigDecimal approvalAmount; | private BigDecimal approvalAmount; | ||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") | |||||
private LocalDateTime annualPlanAddTime; | private LocalDateTime annualPlanAddTime; | ||||
@ApiModelProperty("核心业务-核心业务模块") | @ApiModelProperty("核心业务-核心业务模块") | ||||
@@ -257,16 +259,16 @@ public class ProjectDto implements Serializable { | |||||
private BigDecimal approvedTotalInvestmentIncrease; | private BigDecimal approvedTotalInvestmentIncrease; | ||||
@ApiModelProperty("上级主管部门") | @ApiModelProperty("上级主管部门") | ||||
private String higherSuperUnit; | |||||
private String higherSuperOrg; | |||||
@ApiModelProperty("上级主管部门Code") | @ApiModelProperty("上级主管部门Code") | ||||
private String higherSuperUnitCode; | |||||
private String higherSuperOrgCode; | |||||
@ApiModelProperty("主管部门名称") | @ApiModelProperty("主管部门名称") | ||||
private String superUnit; | |||||
private String superOrg; | |||||
@ApiModelProperty("主管部门Code") | @ApiModelProperty("主管部门Code") | ||||
private String superUnitCode; | |||||
private String superOrgCode; | |||||
@ApiModelProperty("前端所需验证字段") | @ApiModelProperty("前端所需验证字段") | ||||
private Integer allApplicationsDone; | private Integer allApplicationsDone; | ||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
import org.springframework.format.annotation.DateTimeFormat; | |||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
@@ -56,12 +57,13 @@ public class ProjectListReq extends PagePo { | |||||
private BigDecimal approveAmountMax; | private BigDecimal approveAmountMax; | ||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
private LocalDateTime createOnMin; | private LocalDateTime createOnMin; | ||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||||
private LocalDateTime createOnMax; | private LocalDateTime createOnMax; | ||||
@ApiModelProperty("用户ID") | @ApiModelProperty("用户ID") | ||||
private Long userId; | private Long userId; | ||||
} | } |
@@ -0,0 +1,169 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.vo; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.time.LocalDateTime; | |||||
/** | |||||
* <p> | |||||
* 项目应用表 | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2023-02-05 | |||||
*/ | |||||
@ApiModel(value = "NdProjectApplicationVO", description = "") | |||||
@Data | |||||
public class ProjectApplicationVO implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@ApiModelProperty("应用ID") | |||||
private Long id; | |||||
@ApiModelProperty("项目ID") | |||||
private Long 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; | |||||
} |
@@ -0,0 +1,294 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.vo; | |||||
import com.alibaba.fastjson.JSON; | |||||
import com.ningdatech.pmapi.common.utils.BizUtils; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.apache.commons.lang3.StringUtils; | |||||
import java.math.BigDecimal; | |||||
import java.time.LocalDateTime; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.Objects; | |||||
import java.util.Optional; | |||||
import java.util.concurrent.atomic.AtomicReference; | |||||
/** | |||||
* <p> | |||||
* ProjectLibListItemVO | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 15:13 2023/2/1 | |||||
*/ | |||||
@Data | |||||
@ApiModel("项目详情") | |||||
public class ProjectDetailVO { | |||||
@ApiModelProperty("应用ID") | |||||
private Long id; | |||||
@ApiModelProperty("所属地区编号") | |||||
private String areaCode; | |||||
@ApiModelProperty("所属地区名称") | |||||
private String area; | |||||
@ApiModelProperty("项目阶段") | |||||
private Integer stage; | |||||
@ApiModelProperty("项目状态") | |||||
private Integer status; | |||||
@ApiModelProperty("项目名称") | |||||
private String projectName; | |||||
@ApiModelProperty("是否临时增补 0:否 1:是") | |||||
private Integer isTemporaryAugment; | |||||
@ApiModelProperty("项目负责人") | |||||
private String responsibleMan; | |||||
@ApiModelProperty("负责人手机号码") | |||||
private String responsibleManMobile; | |||||
@ApiModelProperty("项目联系人") | |||||
private String contactName; | |||||
@ApiModelProperty("项目联系人手机号码") | |||||
private String contactPhone; | |||||
@ApiModelProperty("建设单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("建设单位统一社会信用代码") | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("建设单位浙政钉ID") | |||||
private String buildOrgZheJiangGovDingId; | |||||
@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 declareGovOwnFinanceAmount; | |||||
@ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") | |||||
private BigDecimal declareGovSuperiorFinanceAmount; | |||||
@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 annualPlanGovOwnFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") | |||||
private BigDecimal annualPlanGovSuperiorFinanceAmount; | |||||
@ApiModelProperty("年度支付计划-银行贷款(万元)") | |||||
private BigDecimal annualPlanBankLendingAmount; | |||||
@ApiModelProperty("年度支付计划-其它资金(万元)") | |||||
private BigDecimal annualPlanOtherAmount; | |||||
@ApiModelProperty("立项批复资金(万元)") | |||||
private BigDecimal approvalAmount; | |||||
private LocalDateTime annualPlanAddTime; | |||||
@ApiModelProperty("核心业务-核心业务模块") | |||||
private String coreBusiness; | |||||
@ApiModelProperty("安全投入-投入项") | |||||
private String safetyInputTitle; | |||||
@ApiModelProperty("安全投入-内容描述") | |||||
private String safetyInputDescribe; | |||||
@ApiModelProperty("安全投入-金额(万元)") | |||||
private BigDecimal safetyInputAmount; | |||||
@ApiModelProperty("附件-初步方案") | |||||
private String preliminaryPlanFile; | |||||
@ApiModelProperty("附件-佐证材料") | |||||
private String supportingMaterialsFile; | |||||
@ApiModelProperty("附件-项目总投资测算明细") | |||||
private String calculationTotalInvestmentFile; | |||||
@ApiModelProperty("附件-申报单位主要职责(单位三定方案)") | |||||
private String mainResponsibilitiesApplicantFile; | |||||
@ApiModelProperty("备注") | |||||
private String projectRemarks; | |||||
@ApiModelProperty("是否包含应用 0:否 1:是") | |||||
private Integer includeApplication; | |||||
@ApiModelProperty("工程形象进度-第一季度") | |||||
private String engineeringSpeedOne; | |||||
@ApiModelProperty("工程形象进度-第二季度") | |||||
private String engineeringSpeedTwo; | |||||
@ApiModelProperty("工程形象进度-第三季度") | |||||
private String engineeringSpeedThree; | |||||
@ApiModelProperty("工程形象进度-第四季度") | |||||
private String engineeringSpeedFour; | |||||
@ApiModelProperty("核心业务-是否开启核心业务模块 false:关闭 true:开启") | |||||
private Boolean isOpenCoreBusiness; | |||||
@ApiModelProperty("安全投入-是否开启安全投入模块 false:关闭 true:开启") | |||||
private Boolean isOpenSafetyInput; | |||||
@ApiModelProperty("工程形象进度-是否开启 false:关闭 true:开启") | |||||
private Boolean isEngineeringSpeed; | |||||
@ApiModelProperty("附件-是否开启 false:关闭 true:开启") | |||||
private Boolean isAccessories; | |||||
@ApiModelProperty("备注-是否开启 false:关闭 true:开启") | |||||
private Boolean isRemarks; | |||||
@ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") | |||||
private Boolean isAnnualPlanAmount; | |||||
@ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") | |||||
private Boolean isInnovateWholeProvinceShare; | |||||
@ApiModelProperty("安全投入-模块信息") | |||||
private String safetyInputModular; | |||||
@ApiModelProperty("项目申报pdf") | |||||
private String projectPdf; | |||||
@ApiModelProperty("立项申报pdf") | |||||
private String declarationPdf; | |||||
@ApiModelProperty("建设周期(月)") | |||||
private String buildCycle; | |||||
@ApiModelProperty("建设方案文件") | |||||
private String constructionPlanFile; | |||||
@ApiModelProperty("立项批复文件") | |||||
private String approvedFile; | |||||
@ApiModelProperty("批复金额") | |||||
private BigDecimal approvedTotalInvestmentIncrease; | |||||
@ApiModelProperty("上级主管部门") | |||||
private String higherSuperOrg; | |||||
@ApiModelProperty("上级主管部门Code") | |||||
private String higherSuperOrgCode; | |||||
@ApiModelProperty("主管部门名称") | |||||
private String superOrg; | |||||
@ApiModelProperty("主管部门Code") | |||||
private String superOrgCode; | |||||
@ApiModelProperty("前端所需验证字段") | |||||
private Integer allApplicationsDone; | |||||
@ApiModelProperty("项目应用") | |||||
private List<ProjectApplicationVO> projectApplications; | |||||
@ApiModelProperty("动态form") | |||||
private Map<String,Object> dynamicForm; | |||||
private String projectTypeName; | |||||
public String getProjectTypeName(){ | |||||
if(Objects.nonNull(this.projectType)){ | |||||
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType)) | |||||
.ifPresent(desc -> this.projectTypeName = desc); | |||||
} | |||||
return this.projectTypeName; | |||||
} | |||||
public void buildDynamicForm(String dynamicFormStr){ | |||||
if(StringUtils.isNotBlank(dynamicFormStr) && BizUtils.getJSONType(dynamicFormStr)){ | |||||
this.dynamicForm = JSON.parseObject(dynamicFormStr,Map.class); | |||||
} | |||||
} | |||||
} |
@@ -1,11 +1,14 @@ | |||||
package com.ningdatech.pmapi.projectlib.model.vo; | package com.ningdatech.pmapi.projectlib.model.vo; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.Objects; | |||||
import java.util.Optional; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -49,6 +52,16 @@ public class ProjectLibListItemVO { | |||||
@ApiModelProperty("业务领域") | @ApiModelProperty("业务领域") | ||||
private String bizDomain; | private String bizDomain; | ||||
private String projectTypeName; | |||||
public String getProjectTypeName(){ | |||||
if(Objects.nonNull(this.projectType)){ | |||||
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType)) | |||||
.ifPresent(desc -> this.projectTypeName = desc); | |||||
} | |||||
return this.projectTypeName; | |||||
} | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
private LocalDateTime createOn; | private LocalDateTime createOn; | ||||
@@ -1,21 +1,17 @@ | |||||
package com.ningdatech.pmapi.scheduler.task; | package com.ningdatech.pmapi.scheduler.task; | ||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.date.StopWatch; | import cn.hutool.core.date.StopWatch; | ||||
import cn.hutool.core.util.IdUtil; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
import com.ningdatech.pmapi.scheduler.contants.TaskContant; | import com.ningdatech.pmapi.scheduler.contants.TaskContant; | ||||
import com.ningdatech.pmapi.sys.contant.RegionConst; | import com.ningdatech.pmapi.sys.contant.RegionConst; | ||||
import com.ningdatech.pmapi.sys.entity.Region; | import com.ningdatech.pmapi.sys.entity.Region; | ||||
import com.ningdatech.pmapi.sys.service.IRegionService; | import com.ningdatech.pmapi.sys.service.IRegionService; | ||||
import com.wflow.bean.entity.WflowModelHistorys; | |||||
import com.wflow.bean.dto.WflowModelHistorysDto; | |||||
import com.wflow.bean.entity.WflowModels; | import com.wflow.bean.entity.WflowModels; | ||||
import com.wflow.mapper.WflowModelHistorysMapper; | |||||
import com.wflow.mapper.WflowModelsMapper; | |||||
import com.wflow.workflow.bean.process.ProcessNode; | |||||
import com.wflow.workflow.service.ProcessModelService; | import com.wflow.workflow.service.ProcessModelService; | ||||
import com.wflow.workflow.service.WflowFormsService; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
@@ -102,7 +98,7 @@ public class InitProcessTask { | |||||
String[] processList = TaskContant.Wflow.DEFAULT_PROCESS_LIST; | String[] processList = TaskContant.Wflow.DEFAULT_PROCESS_LIST; | ||||
for(String processName : processList){ | for(String processName : processList){ | ||||
WflowModelHistorys models = new WflowModelHistorys(); | |||||
WflowModelHistorysDto models = new WflowModelHistorysDto(); | |||||
models.setCreated(GregorianCalendar.getInstance().getTime()); | models.setCreated(GregorianCalendar.getInstance().getTime()); | ||||
// models.setFormId("wf" + IdUtil.objectId()); | // models.setFormId("wf" + IdUtil.objectId()); | ||||
models.setVersion(1); | models.setVersion(1); | ||||
@@ -110,7 +106,8 @@ public class InitProcessTask { | |||||
// models.setProcessDefId("pd" + IdUtil.objectId()); | // models.setProcessDefId("pd" + IdUtil.objectId()); | ||||
models.setFormName(processName); | models.setFormName(processName); | ||||
models.setRegionCode(region.getRegionCode()); | models.setRegionCode(region.getRegionCode()); | ||||
models.setProcess("{\"id\":\"root\",\"desc\":\"任何人\",\"name\":\"发起人\",\"type\":\"ROOT\",\"props\":{},\"children\":{},\"parentId\":null}"); | |||||
ProcessNode processNode = new ProcessNode(); | |||||
models.setProcess(processNode); | |||||
models.setSettings("{\"sign\":false,\"admin\":[],\"notify\":{},\"commiter\":[]}"); | models.setSettings("{\"sign\":false,\"admin\":[],\"notify\":{},\"commiter\":[]}"); | ||||
models.setFormItems("[]"); | models.setFormItems("[]"); | ||||
@@ -1,6 +1,7 @@ | |||||
package com.ningdatech.pmapi.sys.controller; | package com.ningdatech.pmapi.sys.controller; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.wflow.bean.dto.WflowModelHistorysDto; | |||||
import com.wflow.bean.entity.WflowModelHistorys; | import com.wflow.bean.entity.WflowModelHistorys; | ||||
import com.wflow.bean.vo.WflowModelVo; | import com.wflow.bean.vo.WflowModelVo; | ||||
import com.wflow.service.ModelGroupService; | import com.wflow.service.ModelGroupService; | ||||
@@ -46,8 +47,8 @@ public class SysProcdefController { | |||||
@ApiOperation(value = "系统流程配置保存", notes = "系统流程配置保存") | @ApiOperation(value = "系统流程配置保存", notes = "系统流程配置保存") | ||||
@PostMapping("/save") | @PostMapping("/save") | ||||
public String save(@Validated @RequestBody WflowModelHistorys modelHistory) { | |||||
return processModelService.saveProcess(modelHistory); | |||||
public String save(@Validated @RequestBody WflowModelHistorysDto dto) { | |||||
return processModelService.saveProcess(dto); | |||||
} | } | ||||
@ApiOperation(value = "系统流程配置启用(停用)", notes = "系统流程配置启用(停用)") | @ApiOperation(value = "系统流程配置启用(停用)", notes = "系统流程配置启用(停用)") | ||||
@@ -1,197 +0,0 @@ | |||||
package com.ningdatech.pmapi.todocenter.bean.entity; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
/** | |||||
* 导出选项实体类 | |||||
* | |||||
* @author CMM | |||||
* @since 2023/02/10 16:38 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
public class ExportOption { | |||||
/** | |||||
* 导出选项 | |||||
*/ | |||||
@ApiModelProperty("项目ID") | |||||
private Boolean id; | |||||
@ApiModelProperty("项目名称") | |||||
private Boolean name; | |||||
@ApiModelProperty("行政区划编码") | |||||
private Boolean areaCode; | |||||
@ApiModelProperty("行政区划名称") | |||||
private Boolean area; | |||||
@ApiModelProperty("项目负责人") | |||||
private Boolean responsibleMan; | |||||
@ApiModelProperty("项目负责人手机号") | |||||
private Boolean responsibleManMobile; | |||||
@ApiModelProperty("项目联系人") | |||||
private Boolean contactName; | |||||
@ApiModelProperty("项目联系人手机号") | |||||
private Boolean contactPhone; | |||||
@ApiModelProperty("上级业务主管单位") | |||||
private Boolean higherSuperUnit; | |||||
@ApiModelProperty("上级主管单位浙政钉ID") | |||||
private Boolean higherSuperUnitCode; | |||||
@ApiModelProperty("本级主管部门") | |||||
private Boolean superUnit; | |||||
@ApiModelProperty("本级主管部门浙政钉ID") | |||||
private Boolean superUnitCode; | |||||
@ApiModelProperty("建设单位名称") | |||||
private Boolean constructionUnitName; | |||||
@ApiModelProperty("建设单位浙政钉ID") | |||||
private Boolean buildUnitZheJiangGovernmentDingId; | |||||
@ApiModelProperty("建设单位统一信用代码") | |||||
private Boolean buildUnitCode; | |||||
@ApiModelProperty("项目类型") | |||||
private Boolean projectType; | |||||
@ApiModelProperty("是否首次新建") | |||||
private Boolean isFirst; | |||||
@ApiModelProperty("关联应用") | |||||
private Boolean includeApplication; | |||||
@ApiModelProperty("关联应用IRS编码") | |||||
private Boolean includeApplicationIRSCode; | |||||
@ApiModelProperty("申报金额(万元)") | |||||
private Boolean declareAmount; | |||||
@ApiModelProperty("批复金额") | |||||
private Boolean approvedTotalInvestmentIncrease; | |||||
@ApiModelProperty("预算来源") | |||||
private Boolean budgetSource; | |||||
@ApiModelProperty("预算年度") | |||||
private Boolean budgetYear; | |||||
@ApiModelProperty("项目简介") | |||||
private Boolean projectIntroduction; | |||||
@ApiModelProperty("立项依据") | |||||
private Boolean buildBasis; | |||||
@ApiModelProperty("建设层级") | |||||
private Boolean buildLevel; | |||||
@ApiModelProperty("发改编码") | |||||
private Boolean developCode; | |||||
@ApiModelProperty("财政编码") | |||||
private Boolean financialCode; | |||||
@ApiModelProperty("信息是否有效") | |||||
private Boolean informationValidity; | |||||
@ApiModelProperty("是否数字化改革项目") | |||||
private Boolean isDigitalReform; | |||||
@ApiModelProperty("综合应用领域") | |||||
private Boolean bizDomain; | |||||
@ApiModelProperty("是否上云") | |||||
private Boolean isCloud; | |||||
@ApiModelProperty("云类型") | |||||
private Boolean cloudType; | |||||
@ApiModelProperty("四大体系") | |||||
private Boolean fourSystems; | |||||
@ApiModelProperty("是否临时增补") | |||||
private Boolean isTemporaryAugment; | |||||
@ApiModelProperty("等保级别") | |||||
private Boolean protectionLevel; | |||||
@ApiModelProperty("是否密评 0:否 1:是") | |||||
private Boolean isSecretComments; | |||||
@ApiModelProperty("业务编号") | |||||
private Boolean businessNumber; | |||||
@ApiModelProperty("业务名称") | |||||
private Boolean businessName; | |||||
@ApiModelProperty("单位名称") | |||||
private Boolean unitName; | |||||
@ApiModelProperty("软件开发(万元)") | |||||
private Boolean softwareDevelopmentAmount; | |||||
@ApiModelProperty("云资源、硬件购置(万元)") | |||||
private Boolean cloudHardwarePurchaseAmount; | |||||
@ApiModelProperty("第三方服务(万元)") | |||||
private Boolean thirdPartyAmount; | |||||
@ApiModelProperty("投入项") | |||||
private Boolean safetyInputTitle; | |||||
@ApiModelProperty("内容描述") | |||||
private Boolean safetyInputDescribe; | |||||
@ApiModelProperty("金额(万元)") | |||||
private Boolean safetyInputAmount; | |||||
@ApiModelProperty("年度支付金额(万元)") | |||||
private Boolean annualPlanAmount; | |||||
@ApiModelProperty("自有资金(万元)") | |||||
private Boolean annualPlanHaveAmount; | |||||
@ApiModelProperty("政府投资-本级财政资金(万元)") | |||||
private Boolean declareGovernmentOwnFinanceAmount; | |||||
@ApiModelProperty("政府投资-上级补助资金(万元)") | |||||
private Boolean declareGovernmentSuperiorFinanceAmount; | |||||
@ApiModelProperty("银行贷款(万元)") | |||||
private Boolean declareBankLendingAmount; | |||||
@ApiModelProperty("其它资金(万元)") | |||||
private Boolean declareOtherAmount; | |||||
@ApiModelProperty("第一季度") | |||||
private Boolean engineeringSpeedOne; | |||||
@ApiModelProperty("第二季度") | |||||
private Boolean engineeringSpeedTwo; | |||||
@ApiModelProperty("第三季度") | |||||
private Boolean engineeringSpeedThree; | |||||
@ApiModelProperty("第四季度") | |||||
private Boolean engineeringSpeedFour; | |||||
@ApiModelProperty("初步方案") | |||||
private Boolean preliminaryPlanFile; | |||||
@ApiModelProperty("附件-佐证材料") | |||||
private Boolean supportingMaterialsFile; | |||||
@ApiModelProperty("备注") | |||||
private Boolean projectRemarks; | |||||
} |
@@ -52,10 +52,9 @@ public class TodoCenterController { | |||||
* @param response | * @param response | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
@GetMapping("/exportPending") | |||||
public void exportPendingProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
@PostMapping("/exportPending") | |||||
public void exportPendingProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
todoCenterManage.exportPendingProjectList(response,param); | todoCenterManage.exportPendingProjectList(response,param); | ||||
// ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportPendingProjectList); | |||||
} | } | ||||
/** | /** | ||||
@@ -99,9 +98,9 @@ public class TodoCenterController { | |||||
* @param response | * @param response | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
@GetMapping("/exportHandled") | |||||
public void exportHandledProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportHandledProjectList); | |||||
@PostMapping("/exportHandled") | |||||
public void exportHandledProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
todoCenterManage.exportHandledProjectList(response,param); | |||||
} | } | ||||
/** | /** | ||||
@@ -122,9 +121,9 @@ public class TodoCenterController { | |||||
* @param response | * @param response | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
@GetMapping("/exportMySubmitted") | |||||
public void exportMySubmittedProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportMySubmittedProjectList); | |||||
@PostMapping("/exportMySubmitted") | |||||
public void exportMySubmittedProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
todoCenterManage.exportMySubmittedProjectList(response,param); | |||||
} | } | ||||
/** | /** | ||||
@@ -145,10 +144,8 @@ public class TodoCenterController { | |||||
* @param response | * @param response | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
@GetMapping("/exportCcMe") | |||||
public void exportCcMeProjectList(ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
ExcelDownUtil.downXlsx(response,param,todoCenterManage::exportCcMeProjectList); | |||||
@PostMapping("/exportCcMe") | |||||
public void exportCcMeProjectList(@Valid @RequestBody ReqToBeProcessedDTO param, HttpServletResponse response){ | |||||
todoCenterManage.exportCcMeProjectList(response,param); | |||||
} | } | ||||
} | } |
@@ -1,16 +1,12 @@ | |||||
package com.ningdatech.pmapi.todocenter.model.dto.req; | package com.ningdatech.pmapi.todocenter.model.dto.req; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import java.math.BigDecimal; | |||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | |||||
import com.ningdatech.basic.model.PagePo; | import com.ningdatech.basic.model.PagePo; | ||||
import com.ningdatech.pmapi.todocenter.bean.entity.ExportOption; | |||||
import com.ningdatech.pmapi.common.enums.ExportOptionEnum; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -50,6 +46,6 @@ public class ReqToBeProcessedDTO extends PagePo implements Serializable { | |||||
private Integer isSupplement; | private Integer isSupplement; | ||||
@ApiModelProperty("导出选项") | @ApiModelProperty("导出选项") | ||||
private ExportOption exportOption; | |||||
private List<ExportOptionEnum> exportOptionList; | |||||
} | } |
@@ -22,7 +22,7 @@ public class StateMachineTest extends AppTests { | |||||
@Test | @Test | ||||
public void stateMachineTest() throws Exception { | public void stateMachineTest() throws Exception { | ||||
Project project = new Project(); | Project project = new Project(); | ||||
project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||||
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | ||||
} | } | ||||
} | } |
@@ -1,11 +1,13 @@ | |||||
package com.ningdatech.pmapi.sys.project; | package com.ningdatech.pmapi.sys.project; | ||||
import cn.hutool.core.date.StopWatch; | import cn.hutool.core.date.StopWatch; | ||||
import com.alibaba.fastjson.JSON; | |||||
import com.ningdatech.pmapi.AppTests; | import com.ningdatech.pmapi.AppTests; | ||||
import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; | ||||
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | ||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | |||||
import org.junit.Test; | import org.junit.Test; | ||||
import javax.annotation.Resource; | import javax.annotation.Resource; | ||||
@@ -21,6 +23,9 @@ public class ProjectStateTest extends AppTests { | |||||
@Resource | @Resource | ||||
private StateMachineUtils stateMachineUtils; | private StateMachineUtils stateMachineUtils; | ||||
@Resource | |||||
private IProjectService projectService; | |||||
@Test | @Test | ||||
public void execute() throws Exception { | public void execute() throws Exception { | ||||
StopWatch stopWatch = new StopWatch(); | StopWatch stopWatch = new StopWatch(); | ||||
@@ -30,11 +35,22 @@ public class ProjectStateTest extends AppTests { | |||||
Project project = new Project(); | Project project = new Project(); | ||||
project.setInstCode("1"); | project.setInstCode("1"); | ||||
project.setId(1L); | project.setId(1L); | ||||
project.setProjectStatusFirst(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||||
project.setProjectStatusSecond(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||||
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); | |||||
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); | |||||
stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); | ||||
stopWatch.stop(); | stopWatch.stop(); | ||||
System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds()); | System.out.println("调用状态机结束 :" + stopWatch.getTotalTimeSeconds()); | ||||
} | } | ||||
@Test | |||||
public void getProject() { | |||||
StopWatch stopWatch = new StopWatch(); | |||||
stopWatch.start(); | |||||
Project project = projectService.getById(1); | |||||
stopWatch.stop(); | |||||
System.out.println("project :" + JSON.toJSONString(project)); | |||||
} | |||||
} | } |