diff --git a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java index e326099..c4453af 100644 --- a/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java +++ b/ningda-generator/src/main/java/com/ningdatech/generator/config/GeneratorCodeKingbaseConfig.java @@ -56,7 +56,7 @@ public class GeneratorCodeKingbaseConfig { } public static void main(String[] args) { - generate("Lierbao", "organization", PATH_LXX, "ding_employee_info"); + generate("Poffy", "projectlib", PATH_YYD, "nd_project_inst"); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/config/BeanConfig.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/config/BeanConfig.java index 93bfd09..315f77a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/config/BeanConfig.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/config/BeanConfig.java @@ -3,7 +3,6 @@ package com.ningdatech.pmapi.common.config; import com.alibaba.xxpt.gateway.shared.client.http.ExecutableClient; import com.ningdatech.pmapi.common.util.SpringContextHolder; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java new file mode 100644 index 0000000..1067f97 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java @@ -0,0 +1,147 @@ +package com.ningdatech.pmapi.common.enumeration; + +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; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ProjectProessStageEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java similarity index 92% rename from pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ProjectProessStageEnum.java rename to pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java index 3b7ad16..99cc654 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ProjectProessStageEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ProjectProessStageEnum.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.common.enums; +package com.ningdatech.pmapi.common.enumeration; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ExportOptionEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ExportOptionEnum.java deleted file mode 100644 index 406b18f..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enums/ExportOptionEnum.java +++ /dev/null @@ -1,148 +0,0 @@ -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; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java index a895b8f..d3090ff 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java @@ -2,7 +2,7 @@ package com.ningdatech.pmapi.common.handler; import cn.hutool.json.JSONUtil; import com.ningdatech.basic.model.ApiResponse; -import com.ningdatech.pmapi.common.utils.BizUtils; +import com.ningdatech.pmapi.common.util.BizUtils; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java index 4283c0c..117c2af 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/statemachine/builder/ProjectDeclareStateMachineBuilder.java @@ -91,7 +91,7 @@ public class ProjectDeclareStateMachineBuilder { .withChoice() .source(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) .first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),projectDeclareAction.new ProjectDeclareChoiceAction()) - .last(ProjectStatusEnum.PRE_APPLYING).and() + .last(ProjectStatusEnum.PRE_APPLYING,projectDeclareAction.new ProjectDeclareChoiceAction()).and() // 待预审撤回,从待预审到单位内部审核中 .withExternal() .source(ProjectStatusEnum.PENDING_PREQUALIFICATION) @@ -127,11 +127,11 @@ public class ProjectDeclareStateMachineBuilder { .source(ProjectStatusEnum.PRE_APPLYING) .target(ProjectStatusEnum.PENDING_PREQUALIFICATION_CHOICE) .event(ProjectStatusChangeEvent.PRE_APPLYING_WITHDRAW).and() - // 预审中撤回,从待预审选择->省级部门联审中,预审中,完成其中一种状态 + // 预审中撤回,从待预审选择->省级部门联审中,待预审,完成其中一种状态 .withChoice() .source(ProjectStatusEnum.PRE_APPLYING) .first(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS,projectDeclareGuardFactory.new PendingPreQualificationChoiceGuard(),new ProjectDeclareChoiceAction()) - .last(ProjectStatusEnum.PRE_APPLYING).and() + .last(ProjectStatusEnum.PENDING_PREQUALIFICATION,projectDeclareAction.new ProjectDeclareChoiceAction()).and() // 部门联审通过,从部门联审中到年度计划中 .withExternal() .source(ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/utils/BizUtils.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/common/utils/BizUtils.java rename to pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java index 71d33cc..7343207 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/utils/BizUtils.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/BizUtils.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.common.utils; +package com.ningdatech.pmapi.common.util; import cn.hutool.core.util.StrUtil; import com.ningdatech.basic.util.StrPool; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/utils/TreeUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java similarity index 99% rename from pmapi/src/main/java/com/ningdatech/pmapi/common/utils/TreeUtil.java rename to pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java index 1359135..ae70159 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/utils/TreeUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java @@ -1,12 +1,12 @@ -package com.ningdatech.pmapi.common.utils; +package com.ningdatech.pmapi.common.util; import cn.hutool.core.collection.CollUtil; import com.google.common.collect.Maps; import com.ningdatech.basic.util.StrPool; import com.ningdatech.pmapi.common.model.entity.MenuTreeEntity; -import com.ningdatech.pmapi.sys.entity.RoleMenu; -import com.ningdatech.pmapi.sys.entity.vo.MenuRoleVO; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.vo.MenuRoleVO; import org.apache.commons.lang3.StringUtils; import java.io.Serializable; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index fc9d2ed..26b88c6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -7,7 +7,7 @@ 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.common.enums.ProjectProessStageEnum; +import com.ningdatech.pmapi.common.enumeration.ProjectProessStageEnum; import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index 1e04fba..e19f880 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -4,7 +4,7 @@ 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.enumeration.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; @@ -108,7 +108,7 @@ public class PrequalificationDeclaredProjectManage { project.setUpdateOn(LocalDateTime.now()); project.setInstCode(instanceId); //调用状态机 进入下一个通过状态 - stateMachineUtils.execute(project,stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); + stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); projectService.updateById(project); } catch (Exception e) { log.error("提交预审 项目信息修改 错误 ", e); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java index 171a79e..d50be49 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java @@ -1,15 +1,20 @@ package com.ningdatech.pmapi.projectlib.controller; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.log.annotation.WebLog; import com.ningdatech.pmapi.projectlib.manage.AnnualPlanLibManage; +import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq; +import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq; import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; /** *

@@ -33,4 +38,32 @@ public class AnnualPlanController { return annualPlanLibManage.annulPlanLibList(req); } + @PostMapping("/startProjectDeclared") + @ApiOperation("开启项目申报") + @WebLog("开启项目申报") + public void startProjectDeclared(@RequestBody @Valid StartProjectDeclareReq req) { + annualPlanLibManage.startProjectDeclared(req); + } + + @PostMapping("/projectApproved") + @ApiOperation("立项批复") + @WebLog("立项批复") + public void projectApproved(@RequestBody @Valid ProjectApprovedReq req) throws Exception { + annualPlanLibManage.projectApproved(req); + } + + @PostMapping("/suspendAnnualPlan") + @ApiOperation("暂缓年度计划") + @WebLog("暂缓年度计划") + public void suspendAnnualPlan(@RequestBody @Valid ProjectIdReq req) throws Exception { + annualPlanLibManage.suspendAnnualPlan(req); + } + + @PostMapping("/importAnnualPlan") + @ApiOperation("导入年度计划") + @WebLog("导入年度计划") + public void importAnnualPlan(MultipartFile file) { + annualPlanLibManage.importAnnualPlan(file); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java index a929f2e..0f9a893 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/ProjectLibController.java @@ -40,10 +40,4 @@ public class ProjectLibController { return projectLibManage.getProjectDetail(id); } - @GetMapping("/getProjectInfo") - @ApiOperation("获取申报项目信息") - private Project getProjectInfo (@RequestParam String processInstanceId){ - return projectLibManage.getProjectInfo(processInstanceId); - } - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java index 9631f37..dd2b85b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/ProjectStatusEnum.java @@ -56,10 +56,6 @@ public enum ProjectStatusEnum { */ ARCHIVED(30000, "已归档"); - public static void main(String[] args) { - System.out.println(Arrays.stream(ProjectStatusEnum.values()).filter(w -> w.getCode() >= 10010).collect(Collectors.toList())); - } - private Integer code; private String desc; @@ -87,4 +83,8 @@ public enum ProjectStatusEnum { return null; } + public boolean eq(int code) { + return this.getCode().equals(code); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index b5c2ec5..fb83502 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java @@ -1,21 +1,37 @@ package com.ningdatech.pmapi.projectlib.manage; +import cn.hutool.poi.excel.ExcelUtil; +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelReader; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; +import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq; +import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; +import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq; import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO; import com.ningdatech.pmapi.projectlib.service.IProjectService; import lombok.AllArgsConstructor; import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; +import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Map; import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; @@ -32,13 +48,13 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*; public class AnnualPlanLibManage { private final IProjectService projectService; + private final StateMachineUtils stateMachine; /** * 年度计划查询状态 */ private static final List ANNUAL_PLAN_LIST_STATUS = Arrays.asList( IN_THE_ANNUAL_PLAN, - BE_SUSPENDED, SCHEME_UNDER_REVIEW, SCHEME_REVIEW_FAILED, TO_BE_APPROVED, @@ -57,6 +73,7 @@ public class AnnualPlanLibManage { public PageVo annulPlanLibList(ProjectListReq req) { LambdaQueryWrapper query = ProjectHelper.projectQuery(req); + query.eq(Project::getIsTemporaryAugment, 0); query.orderByDesc(Project::getAnnualPlanAddTime); query.in(Project::getStatus, CollUtils.fieldList(ANNUAL_PLAN_LIST_STATUS, ProjectStatusEnum::getCode)); Page page = projectService.page(req.page(), query); @@ -76,11 +93,56 @@ public class AnnualPlanLibManage { item.setDeclaredAmount(w.getDeclareAmount()); item.setBuildOrg(w.getBuildOrgName()); item.setCreateOn(w.getCreateOn()); - // TODO 是否开启项目申报 - item.setIsStartDeclaredProject(true); + item.setIsStartDeclaredProject(!IN_THE_ANNUAL_PLAN.eq(w.getStatus())); result.getRecords().add(item); }); return result; } + @Transactional(rollbackFor = Exception.class) + public void startProjectDeclared(StartProjectDeclareReq req) { + List projects = projectService.listByIds(req.getProjectIds()); + projects.forEach(w -> { + if (!IN_THE_ANNUAL_PLAN.eq(w.getStatus())) { + throw BizException.wrap("开启方案申报失败"); + } + }); + projects.forEach(project -> { + try { + stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_PROJECT_OPEN_PLAN_DECLARE); + } catch (Exception e) { + throw new BizException("开启方案申报失败"); + } + }); + } + + @Transactional(rollbackFor = Exception.class) + public void projectApproved(ProjectApprovedReq req) throws Exception { + Project project = projectService.getById(req.getProjectId()); + stateMachine.execute(project, ProjectStatusChangeEvent.PROJECT_APPROVAL); + LambdaUpdateWrapper update = Wrappers.lambdaUpdate(Project.class) + .set(Project::getApprovalAmount, req.getApprovedAmount()) + .set(Project::getApprovedFile, req.getApprovedFileId()) + .set(Project::getBuildCycle, req.getBuildCycle()) + .set(Project::getConstructionPlanFile, req.getBuildPlanFileId()) + .set(Project::getApprovalDate, req.getApprovedDate()) + .eq(Project::getId, req.getProjectId()); + projectService.update(update); + } + + @Transactional(rollbackFor = Exception.class) + public void suspendAnnualPlan(ProjectIdReq req) throws Exception { + Project project = projectService.getById(req.getProjectId()); + stateMachine.execute(project, ProjectStatusChangeEvent.ANNUAL_PLAN_SUSPEND); + } + + @Transactional(rollbackFor = Exception.class) + public void importAnnualPlan(MultipartFile file) { + try (InputStream inputStream = file.getInputStream()) { + EasyExcel.read(inputStream).sheet(0); + } catch (IOException e) { + throw BizException.wrap("导入年度计划失败"); + } + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 2e809cd..c3cbd08 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -95,17 +95,4 @@ public class ProjectLibManage { return vo; } - /** - * - * @param instanceCode 申报项目流程实例编号 - * @return com.ningdatech.pmapi.projectlib.model.entity.Project - * @author CMM - * @since 2023/02/11 11:15 - */ - public Project getProjectInfo(String instanceCode) { - // 查询项目申报信息 - Project projectInfo = projectService.getOne(Wrappers.lambdaQuery(Project.class) - .eq(Project::getInstCode, instanceCode)); - return projectInfo; - } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.java new file mode 100644 index 0000000..3af978f --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.mapper; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Poffy + * @since 2023-02-13 + */ +public interface ProjectInstMapper extends BaseMapper { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.xml new file mode 100644 index 0000000..96bb279 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ProjectInstMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/AnnualLibImportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/AnnualLibImportDTO.java new file mode 100644 index 0000000..6b40bed --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/AnnualLibImportDTO.java @@ -0,0 +1,108 @@ +package com.ningdatech.pmapi.projectlib.model.dto; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; + +/** + *

+ * AnnualLibImportDTO + *

+ * + * @author WendyYang + * @since 13:46 2023/2/13 + */ +@Data +public class AnnualLibImportDTO { + + @ExcelProperty("序号") + @NotNull(message = "序号不能为空") + private Integer serialNumber; + + @ExcelProperty("项目id") + @NotNull(message = "项目ID不能为空") + private Long projectId; + + @ExcelProperty("项目名称") + @NotBlank(message = "项目名称不能为空") + private String projectName; + + @NotBlank(message = "建设内容不能为空") + @ExcelProperty("建设内容") + private String projectIntroduction; + + @NotBlank(message = "建设依据不能为空") + @ExcelProperty("建设依据") + private String buildBasis; + + @ExcelProperty("建设性质") + @NotBlank(message = "建设性质不能为空") + private String isFirst; + + @ExcelProperty("建设起止年限") + @NotBlank(message = "建设起止年限不能为空") + private String buildCycle; + + @NotBlank(message = "总投资不能为空") + @ExcelProperty("总投资") + private BigDecimal declaredAmount; + + @NotNull(message = "年度投资额不能为空") + @ExcelProperty("年度投资额") + private BigDecimal annualPlanAMount; + + @ExcelProperty("自有资金") + @NotNull(message = "自由资金不能为空") + private BigDecimal declareHaveAmount; + + @ExcelProperty("政府投资-本级财政") + @NotNull(message = "政府投资-本级财政不能为空") + private BigDecimal declareGovOwnFinanceAmount; + + @ExcelProperty("政府投资-上级补") + @NotNull(message = "政府投资-上级补不能为空") + private BigDecimal declareGovSuperiorFinanceAmount; + + @ExcelProperty("银行贷款") + @NotNull(message = "银行贷款不能为空") + private BigDecimal declareBankLendingAmount; + + @ExcelProperty("其他") + @NotNull(message = "其他不能为空") + private BigDecimal declareOtherAmount; + + @ExcelProperty("一季度") + @NotBlank(message = "一季度不能为空") + private String engineeringSpeedOne; + + @ExcelProperty("二季度") + @NotBlank(message = "二季度不能为空") + private String engineeringSpeedTwo; + + @ExcelProperty("三季度") + @NotBlank(message = "三季度不能为空") + private String engineeringSpeedThree; + + @ExcelProperty("四季度") + @NotBlank(message = "四季度不能为空") + private String engineeringSpeedFour; + + @ExcelProperty("建设单位") + @NotBlank(message = "建设单位不能为空") + private String buildUnitName; + + @ExcelProperty("项目联系人") + @NotBlank(message = "项目联系人不能为空") + private String contactName; + + @ExcelProperty("项目分管领导") + @NotBlank(message = "项目分管领导不能为空") + private String responsibleMan; + + @ExcelProperty("备注") + private String projectRemarks; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index e607751..4ba35f9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -9,6 +9,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; +import java.time.LocalDate; import java.time.LocalDateTime; /** @@ -257,6 +258,9 @@ public class Project implements Serializable { @ApiModelProperty("立项批复文件") private String approvedFile; + @ApiModelProperty("立项批复时间") + private LocalDate approvalDate; + @ApiModelProperty("批复金额") private BigDecimal approvedTotalInvestmentIncrease; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectInst.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectInst.java new file mode 100644 index 0000000..4266829 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectInst.java @@ -0,0 +1,78 @@ +package com.ningdatech.pmapi.projectlib.model.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; + +/** + *

+ * + *

+ * + * @author Poffy + * @since 2023-02-13 + */ +@TableName("nd_project_inst") +@ApiModel(value = "NdProjectInst对象", description = "") +public class ProjectInst implements Serializable { + + private static final long serialVersionUID = 1L; + + private Long id; + + private Long projectId; + + private String instCode; + + private LocalDateTime creatOn; + + private LocalDateTime updateOn; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + public String getInstCode() { + return instCode; + } + + public void setInstCode(String instCode) { + this.instCode = instCode; + } + public LocalDateTime getCreatOn() { + return creatOn; + } + + public void setCreatOn(LocalDateTime creatOn) { + this.creatOn = creatOn; + } + public LocalDateTime getUpdateOn() { + return updateOn; + } + + public void setUpdateOn(LocalDateTime updateOn) { + this.updateOn = updateOn; + } + + @Override + public String toString() { + return "NdProjectInst{" + + "id=" + id + + ", projectId=" + projectId + + ", instCode=" + instCode + + ", creatOn=" + creatOn + + ", updateOn=" + updateOn + + "}"; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApprovedReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApprovedReq.java new file mode 100644 index 0000000..64708c3 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectApprovedReq.java @@ -0,0 +1,53 @@ +package com.ningdatech.pmapi.projectlib.model.req; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Range; + +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + *

+ * 立项批复参数类 + *

+ * + * @author WendyYang + * @since 20:04 2023/2/12 + */ +@Data +@ApiModel("立项批复参数类") +public class ProjectApprovedReq { + + @ApiModelProperty("项目ID") + @NotNull(message = "项目ID不能为空") + private Long projectId; + + @ApiModelProperty("批复金额") + @NotNull(message = "批复金额不能为空") + @DecimalMax(value = "999999999.99", message = "批复金额无效") + @DecimalMin(value = "0.01", message = "批复金额无效") + private BigDecimal approvedAmount; + + @NotNull(message = "批复时间不能为空") + @ApiModelProperty("批复时间") + private LocalDate approvedDate; + + @ApiModelProperty("建设周期") + @NotNull(message = "建设周期不能为空") + @Range(min = 1, max = 99999, message = "建设周期无效") + private Integer buildCycle; + + @ApiModelProperty("批复文件ID") + @NotNull(message = "批复文件不能为空") + private Long approvedFileId; + + @ApiModelProperty("建设方案文件ID") + @NotNull(message = "建设方案不能为空") + private Long buildPlanFileId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectIdReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectIdReq.java new file mode 100644 index 0000000..82278b1 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectIdReq.java @@ -0,0 +1,23 @@ +package com.ningdatech.pmapi.projectlib.model.req; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + *

+ * ProjectIdReq + *

+ * + * @author WendyYang + * @since 09:32 2023/2/13 + */ +@Data +public class ProjectIdReq { + + @ApiModelProperty("项目ID") + @NotNull(message = "项目ID不能为空") + private Long projectId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/StartProjectDeclareReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/StartProjectDeclareReq.java new file mode 100644 index 0000000..0bcb177 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/StartProjectDeclareReq.java @@ -0,0 +1,25 @@ +package com.ningdatech.pmapi.projectlib.model.req; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import java.util.List; + +/** + *

+ * StartProjectDeclareReq + *

+ * + * @author WendyYang + * @since 17:47 2023/2/11 + */ +@Data +public class StartProjectDeclareReq { + + @ApiModelProperty("项目ID") + @NotEmpty(message = "项目ID不能为空") + private List projectIds; + + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 9158556..231b312 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -1,9 +1,8 @@ package com.ningdatech.pmapi.projectlib.model.vo; import com.alibaba.fastjson.JSON; -import com.ningdatech.pmapi.common.utils.BizUtils; +import com.ningdatech.pmapi.common.util.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; @@ -15,7 +14,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; -import java.util.concurrent.atomic.AtomicReference; /** *

@@ -274,21 +272,21 @@ public class ProjectDetailVO { private List projectApplications; @ApiModelProperty("动态form") - private Map dynamicForm; + private Map dynamicForm; private String projectTypeName; - public String getProjectTypeName(){ - if(Objects.nonNull(this.projectType)){ + 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); + public void buildDynamicForm(String dynamicFormStr) { + if (StringUtils.isNotBlank(dynamicFormStr) && BizUtils.getJSONType(dynamicFormStr)) { + this.dynamicForm = JSON.parseObject(dynamicFormStr, Map.class); } } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectInstService.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectInstService.java new file mode 100644 index 0000000..8f80015 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectInstService.java @@ -0,0 +1,16 @@ +package com.ningdatech.pmapi.projectlib.service; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author Poffy + * @since 2023-02-13 + */ +public interface IProjectInstService extends IService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectInstServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectInstServiceImpl.java new file mode 100644 index 0000000..58650e9 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectInstServiceImpl.java @@ -0,0 +1,20 @@ +package com.ningdatech.pmapi.projectlib.service.impl; + +import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; +import com.ningdatech.pmapi.projectlib.mapper.ProjectInstMapper; +import com.ningdatech.pmapi.projectlib.service.IProjectInstService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author Poffy + * @since 2023-02-13 + */ +@Service +public class ProjectInstServiceImpl extends ServiceImpl implements IProjectInstService { + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java index 7f27ebe..08b54d3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.exception.BizException; import com.ningdatech.pmapi.scheduler.contants.TaskContant; import com.ningdatech.pmapi.sys.contant.RegionConst; -import com.ningdatech.pmapi.sys.entity.Region; +import com.ningdatech.pmapi.sys.model.entity.Region; import com.ningdatech.pmapi.sys.service.IRegionService; import com.wflow.bean.dto.WflowModelHistorysDto; import com.wflow.bean.entity.WflowModels; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/MenuController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/MenuController.java index 0cdc8fc..3674466 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/MenuController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/MenuController.java @@ -7,13 +7,13 @@ import com.ningdatech.basic.auth.AbstractLoginUserUtil; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.log.annotation.WebLog; import com.ningdatech.pmapi.common.model.entity.MenuTreeEntity; -import com.ningdatech.pmapi.common.utils.TreeUtil; -import com.ningdatech.pmapi.sys.entity.Menu; -import com.ningdatech.pmapi.sys.entity.dto.MenuQueryDTO; -import com.ningdatech.pmapi.sys.entity.dto.MenuSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.MenuUpdateDTO; -import com.ningdatech.pmapi.sys.entity.vo.MenuRoleVO; -import com.ningdatech.pmapi.sys.entity.vo.MenuVO; +import com.ningdatech.pmapi.common.util.TreeUtil; +import com.ningdatech.pmapi.sys.model.entity.Menu; +import com.ningdatech.pmapi.sys.model.dto.MenuQueryDTO; +import com.ningdatech.pmapi.sys.model.dto.MenuSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.MenuUpdateDTO; +import com.ningdatech.pmapi.sys.model.vo.MenuRoleVO; +import com.ningdatech.pmapi.sys.model.vo.MenuVO; import com.ningdatech.pmapi.sys.manage.MenuManage; import com.ningdatech.pmapi.sys.service.IMenuService; import com.ningdatech.pmapi.user.util.LoginUserUtil; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java index f986cfc..9837ad8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java @@ -3,11 +3,11 @@ package com.ningdatech.pmapi.sys.controller; import com.ningdatech.basic.model.IdVo; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; -import com.ningdatech.pmapi.sys.entity.req.NoticeListReq; -import com.ningdatech.pmapi.sys.entity.req.NoticeSaveReq; -import com.ningdatech.pmapi.sys.entity.req.NoticeStatusModifyReq; -import com.ningdatech.pmapi.sys.entity.vo.NoticeDetailVO; -import com.ningdatech.pmapi.sys.entity.vo.NoticeListItemVO; +import com.ningdatech.pmapi.sys.model.req.NoticeListReq; +import com.ningdatech.pmapi.sys.model.req.NoticeSaveReq; +import com.ningdatech.pmapi.sys.model.req.NoticeStatusModifyReq; +import com.ningdatech.pmapi.sys.model.vo.NoticeDetailVO; +import com.ningdatech.pmapi.sys.model.vo.NoticeListItemVO; import com.ningdatech.pmapi.sys.manage.NoticeManage; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java index 435c002..5115569 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/RoleController.java @@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.lang.Assert; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; -import com.ningdatech.pmapi.sys.entity.Role; -import com.ningdatech.pmapi.sys.entity.dto.RolePageReq; -import com.ningdatech.pmapi.sys.entity.dto.RoleSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.RoleUpdateDTO; -import com.ningdatech.pmapi.sys.entity.vo.RoleVO; +import com.ningdatech.pmapi.sys.model.entity.Role; +import com.ningdatech.pmapi.sys.model.req.RolePageReq; +import com.ningdatech.pmapi.sys.model.dto.RoleSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.RoleUpdateDTO; +import com.ningdatech.pmapi.sys.model.vo.RoleVO; import com.ningdatech.pmapi.sys.manage.RoleManage; import com.ningdatech.pmapi.sys.service.IRoleService; import com.ningdatech.pmapi.user.util.LoginUserUtil; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java index 57f0692..563b268 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/convert/RegionConverter.java @@ -1,13 +1,10 @@ package com.ningdatech.pmapi.sys.convert; -import cn.hutool.core.util.ObjectUtil; -import com.ningdatech.basic.util.CollUtils; -import com.ningdatech.pmapi.sys.entity.Region; -import com.ningdatech.pmapi.sys.entity.dto.RegionDTO; -import com.ningdatech.pmapi.sys.entity.dto.RegionTreeDTO; -import com.ningdatech.pmapi.sys.entity.vo.RegionTreeVO; +import com.ningdatech.pmapi.sys.model.entity.Region; +import com.ningdatech.pmapi.sys.model.dto.RegionDTO; +import com.ningdatech.pmapi.sys.model.dto.RegionTreeDTO; +import com.ningdatech.pmapi.sys.model.vo.RegionTreeVO; import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.tuple.Pair; import java.util.ArrayList; import java.util.Collections; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java index 3307485..d5cb44f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java @@ -4,10 +4,10 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.util.CollUtils; -import com.ningdatech.pmapi.common.utils.TreeUtil; -import com.ningdatech.pmapi.sys.entity.Menu; -import com.ningdatech.pmapi.sys.entity.RoleMenu; -import com.ningdatech.pmapi.sys.entity.vo.MenuRoleVO; +import com.ningdatech.pmapi.common.util.TreeUtil; +import com.ningdatech.pmapi.sys.model.entity.Menu; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.vo.MenuRoleVO; import com.ningdatech.pmapi.sys.service.IRoleMenuService; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; import lombok.RequiredArgsConstructor; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java index bf45d80..ad11871 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java @@ -10,13 +10,13 @@ import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.file.entity.vo.result.AttachFileVo; import com.ningdatech.file.service.FileService; -import com.ningdatech.pmapi.common.utils.BizUtils; -import com.ningdatech.pmapi.sys.entity.Notice; -import com.ningdatech.pmapi.sys.entity.req.NoticeListReq; -import com.ningdatech.pmapi.sys.entity.req.NoticeSaveReq; -import com.ningdatech.pmapi.sys.entity.req.NoticeStatusModifyReq; -import com.ningdatech.pmapi.sys.entity.vo.NoticeDetailVO; -import com.ningdatech.pmapi.sys.entity.vo.NoticeListItemVO; +import com.ningdatech.pmapi.common.util.BizUtils; +import com.ningdatech.pmapi.sys.model.entity.Notice; +import com.ningdatech.pmapi.sys.model.req.NoticeListReq; +import com.ningdatech.pmapi.sys.model.req.NoticeSaveReq; +import com.ningdatech.pmapi.sys.model.req.NoticeStatusModifyReq; +import com.ningdatech.pmapi.sys.model.vo.NoticeDetailVO; +import com.ningdatech.pmapi.sys.model.vo.NoticeListItemVO; import com.ningdatech.pmapi.sys.service.INoticeService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RegionManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RegionManage.java index 3f5e946..61f36b8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RegionManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RegionManage.java @@ -2,8 +2,8 @@ package com.ningdatech.pmapi.sys.manage; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.sys.convert.RegionConverter; -import com.ningdatech.pmapi.sys.entity.dto.RegionDTO; -import com.ningdatech.pmapi.sys.entity.vo.RegionTreeVO; +import com.ningdatech.pmapi.sys.model.dto.RegionDTO; +import com.ningdatech.pmapi.sys.model.vo.RegionTreeVO; import com.ningdatech.pmapi.sys.service.IRegionService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RoleManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RoleManage.java index 102af3e..1f9e7b1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RoleManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/RoleManage.java @@ -6,12 +6,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; -import com.ningdatech.pmapi.sys.entity.Menu; -import com.ningdatech.pmapi.sys.entity.Role; -import com.ningdatech.pmapi.sys.entity.RoleMenu; -import com.ningdatech.pmapi.sys.entity.dto.RolePageReq; -import com.ningdatech.pmapi.sys.entity.vo.MenuRoleVO; -import com.ningdatech.pmapi.sys.entity.vo.RoleVO; +import com.ningdatech.pmapi.sys.model.entity.Menu; +import com.ningdatech.pmapi.sys.model.entity.Role; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.req.RolePageReq; +import com.ningdatech.pmapi.sys.model.vo.MenuRoleVO; +import com.ningdatech.pmapi.sys.model.vo.RoleVO; import com.ningdatech.pmapi.sys.service.IRoleMenuService; import com.ningdatech.pmapi.sys.service.IMenuService; import com.ningdatech.pmapi.sys.service.IRoleService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/MenuMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/MenuMapper.java index bb0224a..36034ee 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/MenuMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/MenuMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.Menu; +import com.ningdatech.pmapi.sys.model.entity.Menu; import org.springframework.stereotype.Repository; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/NoticeMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/NoticeMapper.java index 048c439..943f9b6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/NoticeMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/NoticeMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.Notice; +import com.ningdatech.pmapi.sys.model.entity.Notice; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RegionMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RegionMapper.java index ff3bc43..1dc0d26 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RegionMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RegionMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.Region; +import com.ningdatech.pmapi.sys.model.entity.Region; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.java index 32b995d..994941a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.java @@ -1,8 +1,8 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.Resource; -import com.ningdatech.pmapi.sys.entity.dto.ResourceQueryDTO; +import com.ningdatech.pmapi.sys.model.entity.Resource; +import com.ningdatech.pmapi.sys.model.dto.ResourceQueryDTO; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.xml index f07bbb5..5731ee5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/ResourceMapper.xml @@ -3,7 +3,7 @@ - + @@ -35,7 +35,7 @@ ) - + insert into nd_resource ( id, created_by, create_time, updated_by, update_time, code, name, menu_id, describe_) values (#{id,jdbcType=BIGINT}, #{createUser,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},#{updateUser,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.java index db19c23..c64ecfc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.Role; +import com.ningdatech.pmapi.sys.model.entity.Role; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.xml index 901186c..69bb2f7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMapper.xml @@ -3,7 +3,7 @@ - + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuDatascopeMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuDatascopeMapper.java index d46f5b2..ca57450 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuDatascopeMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuDatascopeMapper.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.sys.mapper; -import com.ningdatech.pmapi.sys.entity.RoleMenuDatascope; +import com.ningdatech.pmapi.sys.model.entity.RoleMenuDatascope; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuMapper.java index be35845..26d30cf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/RoleMenuMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/UserRoleMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/UserRoleMapper.java index c975b26..bede1c0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/UserRoleMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/mapper/UserRoleMapper.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ningdatech.pmapi.sys.entity.UserRole; +import com.ningdatech.pmapi.sys.model.entity.UserRole; import org.springframework.stereotype.Repository; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuDataScopeDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuDataScopeDTO.java similarity index 88% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuDataScopeDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuDataScopeDTO.java index 0f9ddd0..62bd211 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuDataScopeDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuDataScopeDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuQueryDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuQueryDTO.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuQueryDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuQueryDTO.java index 0571ff7..bb4a49b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuQueryDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuQueryDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuSaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuSaveDTO.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuSaveDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuSaveDTO.java index 7a5661b..e2c8f5e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuSaveDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuSaveDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,7 +6,6 @@ import lombok.*; import lombok.experimental.Accessors; import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; import java.io.Serializable; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuUpdateDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuUpdateDTO.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuUpdateDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuUpdateDTO.java index 03163c2..ee76257 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/MenuUpdateDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/MenuUpdateDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionDTO.java similarity index 95% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionDTO.java index e3f2db8..b0d82dc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import lombok.Builder; import lombok.Data; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionTreeDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionTreeDTO.java similarity index 93% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionTreeDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionTreeDTO.java index c120ff8..e4a63d8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RegionTreeDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RegionTreeDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import lombok.Data; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceQueryDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceQueryDTO.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceQueryDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceQueryDTO.java index ff5f174..19460f0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceQueryDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceQueryDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceSaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceSaveDTO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceSaveDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceSaveDTO.java index 008e733..1f1e542 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceSaveDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceSaveDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceUpdateDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceUpdateDTO.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceUpdateDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceUpdateDTO.java index 3394406..d0b4a83 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/ResourceUpdateDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/ResourceUpdateDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import com.baomidou.mybatisplus.core.conditions.update.Update; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleAuthoritySaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleAuthoritySaveDTO.java similarity index 95% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleAuthoritySaveDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleAuthoritySaveDTO.java index 0644697..0a31804 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleAuthoritySaveDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleAuthoritySaveDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleQueryDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleQueryDTO.java similarity index 95% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleQueryDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleQueryDTO.java index b4eb942..0e4aa72 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleQueryDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleQueryDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleSaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleSaveDTO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleSaveDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleSaveDTO.java index bf62cad..1825893 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleSaveDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleSaveDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUpdateDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleUpdateDTO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUpdateDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleUpdateDTO.java index 56a3a5b..ab3642b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUpdateDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/RoleUpdateDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import com.baomidou.mybatisplus.core.conditions.update.Update; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/UserRoleSaveDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/UserRoleSaveDTO.java similarity index 95% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/UserRoleSaveDTO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/UserRoleSaveDTO.java index 799acd0..dddd7dc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/UserRoleSaveDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/dto/UserRoleSaveDTO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/BaseEntity.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/BaseEntity.java similarity index 93% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/BaseEntity.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/BaseEntity.java index 00dd7c9..56c4cba 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/BaseEntity.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/BaseEntity.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Menu.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Menu.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Menu.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Menu.java index 3db4378..a1ec156 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Menu.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Menu.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Notice.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Notice.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Notice.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Notice.java index 97131be..9a84893 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Notice.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Notice.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Region.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Region.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Region.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Region.java index b9c55b1..9cd09d9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Region.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Region.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Resource.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Resource.java similarity index 98% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Resource.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Resource.java index 7d7a379..90e147b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Resource.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Resource.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Role.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Role.java similarity index 80% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Role.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Role.java index d69e997..c31889a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/Role.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/Role.java @@ -1,7 +1,6 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; @@ -9,11 +8,6 @@ import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; - -import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE; - /** *

* 实体类 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleAuthority.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleAuthority.java similarity index 86% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleAuthority.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleAuthority.java index dfb720c..68c7567 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleAuthority.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleAuthority.java @@ -1,8 +1,8 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; -import com.ningdatech.pmapi.sys.entity.enumeration.AuthorizeType; +import com.ningdatech.pmapi.sys.model.enumeration.AuthorizeTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.*; @@ -48,7 +48,7 @@ public class RoleAuthority extends BaseEntity { @ApiModelProperty(value = "权限类型") @NotNull(message = "权限类型不能为空") @TableField("authority_type") - private AuthorizeType authorityType; + private AuthorizeTypeEnum authorityType; /** * 角色id @@ -62,7 +62,7 @@ public class RoleAuthority extends BaseEntity { @Builder public RoleAuthority(Long id, LocalDateTime createTime, Long createdBy, - Long authorityId, AuthorizeType authorityType, Long roleId) { + Long authorityId, AuthorizeTypeEnum authorityType, Long roleId) { this.id = id; this.createOn = createTime; this.createBy = createdBy; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenu.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenu.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenu.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenu.java index 54f9875..c496ff5 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenu.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenu.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenuDatascope.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenuDatascope.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenuDatascope.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenuDatascope.java index 83af92c..2516d8e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/RoleMenuDatascope.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/RoleMenuDatascope.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/UserRole.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/UserRole.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/UserRole.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/UserRole.java index b6dabc1..d646231 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/UserRole.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/entity/UserRole.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity; +package com.ningdatech.pmapi.sys.model.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/AuthorizeType.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/AuthorizeTypeEnum.java similarity index 80% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/AuthorizeType.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/AuthorizeTypeEnum.java index 01da87e..936f3cc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/AuthorizeType.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/AuthorizeTypeEnum.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.enumeration; +package com.ningdatech.pmapi.sys.model.enumeration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -21,7 +21,7 @@ import java.util.stream.Stream; @AllArgsConstructor @NoArgsConstructor @ApiModel(value = "AuthorizeType", description = "权限类型-枚举") -public enum AuthorizeType { +public enum AuthorizeTypeEnum { /** * MENU="菜单" @@ -40,15 +40,15 @@ public enum AuthorizeType { /** * 根据当前枚举的name匹配 */ - public static AuthorizeType match(String val, AuthorizeType def) { + public static AuthorizeTypeEnum match(String val, AuthorizeTypeEnum def) { return Stream.of(values()).parallel().filter(item -> item.name().equalsIgnoreCase(val)).findAny().orElse(def); } - public static AuthorizeType get(String val) { + public static AuthorizeTypeEnum get(String val) { return match(val, null); } - public boolean eq(AuthorizeType val) { + public boolean eq(AuthorizeTypeEnum val) { return val != null && getCode().equals(val.name()); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/DataScopeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/DataScopeEnum.java similarity index 90% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/DataScopeEnum.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/DataScopeEnum.java index 1843fce..2180d53 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/DataScopeEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/DataScopeEnum.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.enumeration; +package com.ningdatech.pmapi.sys.model.enumeration; import lombok.Getter; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/MenuTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/MenuTypeEnum.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/MenuTypeEnum.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/MenuTypeEnum.java index 2e24913..96dc4ba 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/enumeration/MenuTypeEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/enumeration/MenuTypeEnum.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.enumeration; +package com.ningdatech.pmapi.sys.model.enumeration; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeListReq.java similarity index 92% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeListReq.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeListReq.java index 50e4a0e..7bb3cf1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeListReq.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.req; +package com.ningdatech.pmapi.sys.model.req; import com.ningdatech.basic.model.PagePo; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeSaveReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeSaveReq.java similarity index 95% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeSaveReq.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeSaveReq.java index 778b7da..35947d7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeSaveReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeSaveReq.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.req; +package com.ningdatech.pmapi.sys.model.req; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeStatusModifyReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeStatusModifyReq.java similarity index 92% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeStatusModifyReq.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeStatusModifyReq.java index 76632fe..21e5d17 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/req/NoticeStatusModifyReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/NoticeStatusModifyReq.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.req; +package com.ningdatech.pmapi.sys.model.req; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RolePageReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/RolePageReq.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RolePageReq.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/RolePageReq.java index 95dda52..e4a2997 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RolePageReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/req/RolePageReq.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.req; import com.ningdatech.basic.model.PagePo; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuResourceTreeVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuResourceTreeVO.java similarity index 82% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuResourceTreeVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuResourceTreeVO.java index 0eb7b07..76436fc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuResourceTreeVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuResourceTreeVO.java @@ -1,7 +1,7 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import com.baomidou.mybatisplus.annotation.TableField; -import com.ningdatech.pmapi.sys.entity.enumeration.AuthorizeType; +import com.ningdatech.pmapi.sys.model.enumeration.AuthorizeTypeEnum; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -20,7 +20,7 @@ import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE; @ToString(callSuper = true) public class MenuResourceTreeVO { - private AuthorizeType type; + private AuthorizeTypeEnum type; private String code; private String icon; private Boolean isDef; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuRoleVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuRoleVO.java similarity index 97% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuRoleVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuRoleVO.java index e7b4990..886b997 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuRoleVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuRoleVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.ningdatech.pmapi.common.model.entity.MenuTreeEntity; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuVO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuVO.java index 83ad8bd..f9c4532 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/MenuVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/MenuVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeDetailVO.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeDetailVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeDetailVO.java index 2e94174..78bf5cd 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeDetailVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import com.ningdatech.file.entity.vo.result.AttachFileVo; import io.swagger.annotations.ApiModel; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeListItemVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeListItemVO.java similarity index 94% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeListItemVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeListItemVO.java index d3ef592..b5433d9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/NoticeListItemVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/NoticeListItemVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Builder; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RegionTreeVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RegionTreeVO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RegionTreeVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RegionTreeVO.java index cc06d5f..fb14771 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RegionTreeVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RegionTreeVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUserSaveVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleUserSaveVO.java similarity index 96% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUserSaveVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleUserSaveVO.java index 1e2549d..4843994 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/dto/RoleUserSaveVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleUserSaveVO.java @@ -1,4 +1,4 @@ -package com.ningdatech.pmapi.sys.entity.dto; +package com.ningdatech.pmapi.sys.model.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RoleVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java similarity index 91% rename from pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RoleVO.java rename to pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java index 9945b7c..34bc83c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/entity/vo/RoleVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/model/vo/RoleVO.java @@ -1,6 +1,6 @@ -package com.ningdatech.pmapi.sys.entity.vo; +package com.ningdatech.pmapi.sys.model.vo; -import com.ningdatech.pmapi.sys.entity.BaseEntity; +import com.ningdatech.pmapi.sys.model.entity.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.*; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IMenuService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IMenuService.java index 38bb1a5..7ca17db 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IMenuService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IMenuService.java @@ -1,9 +1,9 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.Menu; -import com.ningdatech.pmapi.sys.entity.dto.MenuSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.MenuUpdateDTO; +import com.ningdatech.pmapi.sys.model.entity.Menu; +import com.ningdatech.pmapi.sys.model.dto.MenuSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.MenuUpdateDTO; import java.util.List; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/INoticeService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/INoticeService.java index 9d56c34..1a79566 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/INoticeService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/INoticeService.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.Notice; +import com.ningdatech.pmapi.sys.model.entity.Notice; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRegionService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRegionService.java index 62d493e..b5a0295 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRegionService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRegionService.java @@ -1,8 +1,8 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.Region; -import com.ningdatech.pmapi.sys.entity.dto.RegionDTO; +import com.ningdatech.pmapi.sys.model.entity.Region; +import com.ningdatech.pmapi.sys.model.dto.RegionDTO; import java.util.List; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuDatascopeService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuDatascopeService.java index 5a39816..79ed6ca 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuDatascopeService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuDatascopeService.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.sys.service; -import com.ningdatech.pmapi.sys.entity.RoleMenuDatascope; +import com.ningdatech.pmapi.sys.model.entity.RoleMenuDatascope; import com.baomidou.mybatisplus.extension.service.IService; /** diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuService.java index 2f26fac..5b6ef02 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleMenuService.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleService.java index f26821a..42be6de 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IRoleService.java @@ -1,9 +1,9 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.Role; -import com.ningdatech.pmapi.sys.entity.dto.RoleSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.RoleUpdateDTO; +import com.ningdatech.pmapi.sys.model.entity.Role; +import com.ningdatech.pmapi.sys.model.dto.RoleSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.RoleUpdateDTO; import java.util.List; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IUserRoleService.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IUserRoleService.java index 021f9f9..6d59c64 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IUserRoleService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/IUserRoleService.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ningdatech.pmapi.sys.entity.UserRole; +import com.ningdatech.pmapi.sys.model.entity.UserRole; /** *

diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/MenuServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/MenuServiceImpl.java index a11ba42..e0dc101 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/MenuServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/MenuServiceImpl.java @@ -12,10 +12,10 @@ import com.google.common.collect.Lists; import com.ningdatech.basic.exception.BaseUncheckedException; import com.ningdatech.basic.util.ValidatorUtil; import com.ningdatech.pmapi.common.constant.DefValConstants; -import com.ningdatech.pmapi.sys.entity.Menu; -import com.ningdatech.pmapi.sys.entity.enumeration.MenuTypeEnum; -import com.ningdatech.pmapi.sys.entity.dto.MenuSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.MenuUpdateDTO; +import com.ningdatech.pmapi.sys.model.entity.Menu; +import com.ningdatech.pmapi.sys.model.enumeration.MenuTypeEnum; +import com.ningdatech.pmapi.sys.model.dto.MenuSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.MenuUpdateDTO; import com.ningdatech.pmapi.sys.mapper.MenuMapper; import com.ningdatech.pmapi.sys.service.IMenuService; import lombok.RequiredArgsConstructor; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/NoticeServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/NoticeServiceImpl.java index 3c6fd6e..d514d1e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/NoticeServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/NoticeServiceImpl.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ningdatech.pmapi.sys.entity.Notice; +import com.ningdatech.pmapi.sys.model.entity.Notice; import com.ningdatech.pmapi.sys.mapper.NoticeMapper; import com.ningdatech.pmapi.sys.service.INoticeService; import org.springframework.stereotype.Service; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RegionServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RegionServiceImpl.java index 8b81fb5..709ed42 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RegionServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RegionServiceImpl.java @@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.sys.convert.RegionConverter; -import com.ningdatech.pmapi.sys.entity.Region; -import com.ningdatech.pmapi.sys.entity.dto.RegionDTO; +import com.ningdatech.pmapi.sys.model.entity.Region; +import com.ningdatech.pmapi.sys.model.dto.RegionDTO; import com.ningdatech.pmapi.sys.mapper.RegionMapper; import com.ningdatech.pmapi.sys.service.IRegionService; import org.springframework.stereotype.Service; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuDatascopeServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuDatascopeServiceImpl.java index 09cda45..74ca544 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuDatascopeServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuDatascopeServiceImpl.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.sys.service.impl; -import com.ningdatech.pmapi.sys.entity.RoleMenuDatascope; +import com.ningdatech.pmapi.sys.model.entity.RoleMenuDatascope; import com.ningdatech.pmapi.sys.mapper.RoleMenuDatascopeMapper; import com.ningdatech.pmapi.sys.service.IRoleMenuDatascopeService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuServiceImpl.java index 27f1886..c58c643 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleMenuServiceImpl.java @@ -1,7 +1,7 @@ package com.ningdatech.pmapi.sys.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ningdatech.pmapi.sys.entity.RoleMenu; +import com.ningdatech.pmapi.sys.model.entity.RoleMenu; import com.ningdatech.pmapi.sys.mapper.RoleMenuMapper; import com.ningdatech.pmapi.sys.service.IRoleMenuService; import org.springframework.stereotype.Service; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java index 4304fd2..0c6e452 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java @@ -12,11 +12,11 @@ import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.exception.code.ExceptionCode; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.cache.repository.CachePlusOps; -import com.ningdatech.pmapi.sys.entity.*; -import com.ningdatech.pmapi.sys.entity.dto.MenuDataScopeDTO; -import com.ningdatech.pmapi.sys.entity.dto.RoleSaveDTO; -import com.ningdatech.pmapi.sys.entity.dto.RoleUpdateDTO; +import com.ningdatech.pmapi.sys.model.dto.MenuDataScopeDTO; +import com.ningdatech.pmapi.sys.model.dto.RoleSaveDTO; +import com.ningdatech.pmapi.sys.model.dto.RoleUpdateDTO; import com.ningdatech.pmapi.sys.mapper.RoleMapper; +import com.ningdatech.pmapi.sys.model.entity.*; import com.ningdatech.pmapi.sys.service.*; import com.ningdatech.pmapi.sys.utils.AuthCacheKeyUtils; import lombok.RequiredArgsConstructor; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/UserRoleServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/UserRoleServiceImpl.java index f2b85f8..184f164 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/UserRoleServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/UserRoleServiceImpl.java @@ -4,8 +4,8 @@ import cn.hutool.http.HttpStatus; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ningdatech.basic.exception.BaseUncheckedException; -import com.ningdatech.pmapi.sys.entity.Role; -import com.ningdatech.pmapi.sys.entity.UserRole; +import com.ningdatech.pmapi.sys.model.entity.Role; +import com.ningdatech.pmapi.sys.model.entity.UserRole; import com.ningdatech.pmapi.sys.mapper.RoleMapper; import com.ningdatech.pmapi.sys.mapper.UserRoleMapper; import com.ningdatech.pmapi.sys.service.IUserRoleService; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java index 9185797..958d389 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java @@ -7,8 +7,6 @@ import javax.validation.Valid; import com.ningdatech.pmapi.common.util.ExcelDownUtil; import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; import com.ningdatech.pmapi.todocenter.model.dto.req.ReqProcessHandlerDTO; -import com.wflow.utils.R; -import com.wflow.workflow.bean.vo.ProcessHandlerParamsVo; import org.springframework.web.bind.annotation.*; import com.ningdatech.basic.model.ApiResponse; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/IsAppendProjectEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/IsAppendProjectEnum.java similarity index 90% rename from pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/IsAppendProjectEnum.java rename to pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/IsAppendProjectEnum.java index a744804..d0d5ba1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/IsAppendProjectEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/IsAppendProjectEnum.java @@ -1,16 +1,16 @@ -package com.ningdatech.pmapi.todocenter.enums; - -import java.util.Objects; - -import org.apache.commons.lang3.StringUtils; +package com.ningdatech.pmapi.todocenter.enumeration; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; /** * 是否增补项目枚举 + * * @author CMM */ @Getter @@ -24,7 +24,7 @@ public enum IsAppendProjectEnum { NOT_APPEND_PROJECT(0, "非增补项目"), /** - *增补项目 + * 增补项目 */ APPEND_PROJECT(1, "增补项目"); @@ -41,7 +41,7 @@ public enum IsAppendProjectEnum { } public static String getDescByCode(Integer code) { - if(Objects.isNull(code)){ + if (Objects.isNull(code)) { return StringUtils.EMPTY; } for (IsAppendProjectEnum t : IsAppendProjectEnum.values()) { @@ -53,7 +53,7 @@ public enum IsAppendProjectEnum { } public static IsAppendProjectEnum getEnumByValue(Integer code) { - if(Objects.isNull(code)){ + if (Objects.isNull(code)) { return null; } for (IsAppendProjectEnum t : IsAppendProjectEnum.values()) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/ProcessStatusEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/ProcessStatusEnum.java similarity index 85% rename from pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/ProcessStatusEnum.java rename to pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/ProcessStatusEnum.java index 91d311d..fd07266 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enums/ProcessStatusEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/enumeration/ProcessStatusEnum.java @@ -1,16 +1,16 @@ -package com.ningdatech.pmapi.todocenter.enums; - -import java.util.Objects; - -import org.apache.commons.lang3.StringUtils; +package com.ningdatech.pmapi.todocenter.enumeration; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; +import org.apache.commons.lang3.StringUtils; + +import java.util.Objects; /** * 待办中心-流程状态枚举 + * * @author CMM */ @Getter @@ -32,16 +32,16 @@ public enum ProcessStatusEnum { /** * 被驳回 */ - BE_REJECTED(3,"被驳回"), + BE_REJECTED(3, "被驳回"), /** * 审核通过 */ - APPROVED(4,"审核通过"), + APPROVED(4, "审核通过"), /** * 被撤回 */ - WITHDRAW(5,"被撤回"); + WITHDRAW(5, "被撤回"); private Integer code; @@ -56,7 +56,7 @@ public enum ProcessStatusEnum { } public static String getDescByCode(Integer code) { - if(Objects.isNull(code)){ + if (Objects.isNull(code)) { return StringUtils.EMPTY; } for (ProcessStatusEnum t : ProcessStatusEnum.values()) { @@ -68,11 +68,11 @@ public enum ProcessStatusEnum { } public static Integer getCodeByDesc(String desc) { - if(Objects.isNull(desc)){ + if (Objects.isNull(desc)) { return null; } for (ProcessStatusEnum t : ProcessStatusEnum.values()) { - if (desc.equals(t.getCode())) { + if (desc.equals(t.getDesc())) { return t.code; } } @@ -80,7 +80,7 @@ public enum ProcessStatusEnum { } public static ProcessStatusEnum getEnumByValue(Integer code) { - if(Objects.isNull(code)){ + if (Objects.isNull(code)) { return null; } for (ProcessStatusEnum t : ProcessStatusEnum.values()) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index f9abe34..cbb2d69 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -19,11 +19,11 @@ import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.constant.DingConstant; -import com.ningdatech.pmapi.common.enums.ExportOptionEnum; +import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; +import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.common.util.ExcelDownUtil; -import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.todocenter.bean.entity.ProcessComment; @@ -31,13 +31,13 @@ import com.ningdatech.pmapi.todocenter.bean.entity.ProgressNode; import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; import com.ningdatech.pmapi.todocenter.bean.vo.ProgressNodeAuditInfoVo; import com.ningdatech.pmapi.todocenter.constant.HisProInsEndActId; -import com.ningdatech.pmapi.todocenter.enums.IsAppendProjectEnum; -import com.ningdatech.pmapi.todocenter.enums.ProcessStatusEnum; +import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum; +import com.ningdatech.pmapi.todocenter.enumeration.ProcessStatusEnum; import com.ningdatech.pmapi.todocenter.extension.cmd.BackToHisApprovalNodeCmd; import com.ningdatech.pmapi.todocenter.extension.cmd.SaveCommentCmd; import com.ningdatech.pmapi.todocenter.model.dto.req.ReqProcessHandlerDTO; import com.ningdatech.pmapi.todocenter.model.dto.req.ReqToBeProcessedDTO; -import com.ningdatech.pmapi.todocenter.model.dto.res.*; +import com.ningdatech.pmapi.todocenter.model.dto.res.ResToBeProcessedDTO; import com.ningdatech.pmapi.todocenter.zwdd.model.MessageContent; import com.ningdatech.pmapi.todocenter.zwdd.model.MessageText; import com.ningdatech.pmapi.user.entity.UserInfo; @@ -69,8 +69,8 @@ import com.wflow.workflow.utils.Executor; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.assertj.core.util.Maps; -import org.flowable.bpmn.model.*; import org.flowable.bpmn.model.Process; +import org.flowable.bpmn.model.*; import org.flowable.engine.*; import org.flowable.engine.history.HistoricActivityInstance; import org.flowable.engine.history.HistoricProcessInstance; @@ -127,7 +127,7 @@ public class TodoCenterManage { /** * 待办中心待我处理项目列表查询 - * + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM @@ -142,14 +142,14 @@ public class TodoCenterManage { TaskQuery taskQuery = taskService.createTaskQuery(); taskQuery.active().taskCandidateOrAssigned(String.valueOf(userId)).orderByTaskCreateTime().desc(); List taskList = taskQuery.list(); - List results = getToBeProcessedProjects(param,taskList); - + List results = getToBeProcessedProjects(param, taskList); + Map taskMap = taskList.stream() .collect(Collectors.toMap(Task::getProcessInstanceId, t -> t)); Set processInsIds = results.stream() .map(Project::getInstCode) .collect(Collectors.toSet()); - + Set staterUsers = new HashSet<>(); // 将申报项目待登录用户处理的流程实例一次性取出来,减少查询次数 Map instanceMap = CollectionUtil.isNotEmpty(taskList) @@ -161,6 +161,7 @@ public class TodoCenterManage { List resVos = results.stream().map(d -> { ResToBeProcessedDTO res = new ResToBeProcessedDTO(); BeanUtils.copyProperties(d, res); + res.setProjectId(d.getId()); res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); LocalDateTime processLaunchTime = d.getCreateOn(); String format = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); @@ -173,12 +174,12 @@ public class TodoCenterManage { // 从缓存取 staterUsers.add(String.valueOf(userId)); ProcessTaskVo processTaskVo = ProcessTaskVo.builder().taskId(task.getId()).taskName(task.getName()) - .taskDefKey(task.getTaskDefinitionKey()).processDefId(task.getProcessDefinitionId()) - .executionId(task.getExecutionId()).nodeId(task.getTaskDefinitionKey()) - .deployId(instance.getDeploymentId()).processDefName(instance.getProcessDefinitionName()) - .version(instance.getProcessDefinitionVersion()).instanceId(task.getProcessInstanceId()) - .ownerId(instance.getStartUserId()).createTime(instance.getStartTime()) - .taskCreateTime(task.getCreateTime()).build(); + .taskDefKey(task.getTaskDefinitionKey()).processDefId(task.getProcessDefinitionId()) + .executionId(task.getExecutionId()).nodeId(task.getTaskDefinitionKey()) + .deployId(instance.getDeploymentId()).processDefName(instance.getProcessDefinitionName()) + .version(instance.getProcessDefinitionVersion()).instanceId(task.getProcessInstanceId()) + .ownerId(instance.getStartUserId()).createTime(instance.getStartTime()) + .taskCreateTime(task.getCreateTime()).build(); res.setProcessTaskInfo(processTaskVo); return res; }).collect(Collectors.toList()); @@ -187,8 +188,8 @@ public class TodoCenterManage { if (CollectionUtil.isNotEmpty(staterUsers)) { Map userMap = userDeptOrLeaderService.getUserMapByIds(staterUsers); result = resVos.stream() - .peek(v -> v.getProcessTaskInfo().setOwner(userMap.get(v.getProcessTaskInfo().getOwnerId()))) - .collect(Collectors.toList()); + .peek(v -> v.getProcessTaskInfo().setOwner(userMap.get(v.getProcessTaskInfo().getOwnerId()))) + .collect(Collectors.toList()); // Map userMap = userInfoService.getUserMapByIds(staterUsers); // result = resVos.stream().peek(v -> v.setOwner(userMap.get(userId))) // .collect(Collectors.toList()); @@ -198,6 +199,7 @@ public class TodoCenterManage { /** * 待办中心列表导出 + * * @param response * @param param * @return void @@ -216,7 +218,7 @@ public class TodoCenterManage { taskQuery.active().taskCandidateOrAssigned(String.valueOf(userId)).orderByTaskCreateTime().desc(); List taskList = taskQuery.list(); List records = getToBeProcessedProjects(param, taskList); - + ExcelExportWriter excelExportWriter = new ExcelExportWriter(); String fileName = null; @@ -258,6 +260,7 @@ public class TodoCenterManage { /** * 获取申报项目列表中待登录用户处理的项目列表 + * * @param param * @param taskList * @return java.util.List @@ -275,7 +278,7 @@ public class TodoCenterManage { param.getProcessLaunchStartTime()) .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); projectService.page(page, wrapper); - + List taskProcessInsIds = taskList.stream().map(Task::getProcessInstanceId).collect(Collectors.toList()); // 过滤申报项目中待登录用户审核的项目 @@ -285,7 +288,7 @@ public class TodoCenterManage { /** * 流程处理相关操作 - * + * * @param param * @return void * @author CMM @@ -338,14 +341,15 @@ public class TodoCenterManage { /** * 审批任务:驳回 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId - * @param param 参数 + * @param param 参数 */ private void doReject(Task task, Long userId, ReqProcessHandlerDTO param) { // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); String projectName = declaredProject.getProjectName(); Map var = new HashMap<>(16); @@ -354,7 +358,7 @@ public class TodoCenterManage { // 获取流程定义 Process process = ProcessDefinitionUtil.getProcess(task.getProcessDefinitionId()); // 获取根节点即流程发起节点 - FlowNode rootNode = (FlowNode)process.getFlowElement("root", true); + FlowNode rootNode = (FlowNode) process.getFlowElement("root", true); // TODO 中止流程并使项目进入对应状态,给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被驳回,请及时处理。 sendWorkNoticeToStartUser(task, projectName, rootNode); @@ -365,6 +369,7 @@ public class TodoCenterManage { /** * 当为驳回操作时,更新项目表中的项目状态 + * * @param task 当前任务 * @return void * @author CMM @@ -375,7 +380,7 @@ public class TodoCenterManage { Long userId = LoginUserUtil.getUserId(); // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); // 获取当前流程项目状态 Integer projectStatusSecond = declaredProject.getStatus(); // 根据当前状态获取对应的通过事件 @@ -393,7 +398,7 @@ public class TodoCenterManage { /** * 获取最新版本的流程配置 - * + * * @param task 当前任务 * @return com.wflow.bean.entity.WflowModels * @author CMM @@ -401,7 +406,7 @@ public class TodoCenterManage { */ private WflowModels getLastWflowModels(Task task) { WflowModels wflowModels = processModelService.getOne( - Wrappers.lambdaQuery(WflowModels.class).eq(WflowModels::getProcessDefId, task.getProcessDefinitionId())); + Wrappers.lambdaQuery(WflowModels.class).eq(WflowModels::getProcessDefId, task.getProcessDefinitionId())); if (ObjectUtil.isNull(wflowModels)) { log.warn("流程{}不存在", wflowModels.getFormId()); throw new BusinessException("不存在该表单"); @@ -411,9 +416,10 @@ public class TodoCenterManage { /** * 审批任务:盖章并通过 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId - * @param param 参数 + * @param param 参数 */ private void doSealPass(Task task, Long userId, ReqProcessHandlerDTO param) { Map var = new HashMap<>(16); @@ -424,7 +430,7 @@ public class TodoCenterManage { // TODO 市级单位:为大数据局;区县单位:为大数据中心(根据附件区分?) // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); // 更新项目状态到下一个状态 updatePassProjectStatus(task, userId, declaredProject); taskService.complete(param.getTaskId(), var); @@ -432,15 +438,16 @@ public class TodoCenterManage { /** * 审批任务:通过 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId - * @param param 参数 + * @param param 参数 */ private void doPass(Task task, Long userId, ReqProcessHandlerDTO param) { String processInstanceId = task.getProcessInstanceId(); // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); String projectName = declaredProject.getProjectName(); Map var = new HashMap<>(16); @@ -449,7 +456,7 @@ public class TodoCenterManage { if (hasComment(param.getAuditInfo())) { // 执行自定义的保存评论的功能 managementService.executeCommand(new SaveCommentCmd(param.getTaskId(), param.getInstanceId(), - String.valueOf(userId), JSONObject.toJSONString(param.getAuditInfo()))); + String.valueOf(userId), JSONObject.toJSONString(param.getAuditInfo()))); } updatePassProjectStatus(task, userId, declaredProject); taskService.complete(param.getTaskId(), var); @@ -457,7 +464,7 @@ public class TodoCenterManage { // 获取bpm对象 BpmnModel bpmnModel = repositoryService.getBpmnModel(task.getProcessDefinitionId()); // 传节点定义key 获取当前节点 - FlowNode currentNode = (FlowNode)bpmnModel.getFlowElement(task.getTaskDefinitionKey()); + FlowNode currentNode = (FlowNode) bpmnModel.getFlowElement(task.getTaskDefinitionKey()); // 获取流程下一个节点的审核用户ID String nextUserId = getNextUserId(currentNode, processInstanceId); @@ -471,7 +478,7 @@ public class TodoCenterManage { // 若没有,向发起人发送浙政钉工作通知:【项目名称】已通过【流程名称】,请及时开始下一步操作。 // TODO 向其发送浙政钉工作通知 获取根节点的孩子节点(即发起人节点),向其发送浙政钉工作通知 // 获取根节点即流程发起节点 - FlowNode rootNode = (FlowNode)bpmnModel.getFlowElement("root"); + FlowNode rootNode = (FlowNode) bpmnModel.getFlowElement("root"); // sendWorkNoticeToStartUser(task, projectName, rootNode); } } @@ -479,7 +486,7 @@ public class TodoCenterManage { /** * 当为通过操作时,更新项目表中项目状态 * - * @param task 当前任务 + * @param task 当前任务 * @param userId * @param declaredProject * @return void @@ -504,9 +511,10 @@ public class TodoCenterManage { /** * 给流程发起人发送工作通知 - * @param task 当前任务 + * + * @param task 当前任务 * @param projectName 项目名称 - * @param rootNode 流程发起节点 + * @param rootNode 流程发起节点 * @return void * @author CMM * @since 2023/02/03 @@ -523,6 +531,7 @@ public class TodoCenterManage { /** * 获取流程发起节点的浙政钉用户ID + * * @param rootNode 根节点 * @return java.lang.String * @author CMM @@ -539,7 +548,7 @@ public class TodoCenterManage { // TODO 若要会签需判断候选人 // 发起事件 if (targetFlowElement instanceof StartEvent) { - UserTask userTask = (UserTask)targetFlowElement; + UserTask userTask = (UserTask) targetFlowElement; rootUserId = userTask.getAssignee(); break; } @@ -550,7 +559,8 @@ public class TodoCenterManage { /** * 获取当前节点的下一个节点的审核用户ID - * @param currentNode 当前节点 + * + * @param currentNode 当前节点 * @param processInstanceId * @return java.lang.String 下一个节点的浙政钉用户ID * @author CMM @@ -573,7 +583,7 @@ public class TodoCenterManage { if (targetFlowElement instanceof UserTask) { String actId = targetFlowElement.getId(); ActivityInstance activityInstance = runtimeService.createActivityInstanceQuery() - .processInstanceId(processInstanceId).activityId(actId).singleResult(); + .processInstanceId(processInstanceId).activityId(actId).singleResult(); String executionId = activityInstance.getExecutionId(); nextUserId = runtimeService.getVariable(executionId, "assignee", String.class); break; @@ -584,6 +594,7 @@ public class TodoCenterManage { /** * 判断处理操作是否含有审核意见 + * * @param comment 审核意见 * @return boolean * @author CMM @@ -591,13 +602,14 @@ public class TodoCenterManage { */ private boolean hasComment(ProcessComment comment) { return Objects.nonNull(comment) - && (StrUtil.isNotBlank(comment.getText()) || CollectionUtil.isNotEmpty(comment.getAttachments())); + && (StrUtil.isNotBlank(comment.getText()) || CollectionUtil.isNotEmpty(comment.getAttachments())); } /** * 发送浙政钉工作通知 + * * @param auditUserInfo 审核人信息 - * @param msg 要发送的工作通知 + * @param msg 要发送的工作通知 * @return void * @author CMM * @since 2023/02/01 @@ -633,33 +645,34 @@ public class TodoCenterManage { /** * 撤销流程处理 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId */ private void doWithDrawProcess(Task task, Long userId) { // 获取流程定义 Process process = ProcessDefinitionUtil.getProcess(task.getProcessDefinitionId()); // 获取当前运行流程的发起人节点信息 - FlowNode rootNode = (FlowNode)process.getFlowElement("root", true); + FlowNode rootNode = (FlowNode) process.getFlowElement("root", true); // 获取当前节点 - FlowNode currentNode = (FlowNode)process.getFlowElement(task.getTaskDefinitionKey(), true); + FlowNode currentNode = (FlowNode) process.getFlowElement(task.getTaskDefinitionKey(), true); String rootUserId = getRootUserId(rootNode); // 判断当前登录用户是否是流程发起人 if (rootUserId.equals(String.valueOf(userId))) { // TODO 若是流程发起人点击撤回,项目回到上一个状态,并删除当前审核人对应的待办记录 updateWithdrawProjectStatus(task, userId); List executions = runtimeService.createExecutionQuery() - .processInstanceId(task.getProcessInstanceId()).onlyChildExecutions().list(); + .processInstanceId(task.getProcessInstanceId()).onlyChildExecutions().list(); // 强制流程指向撤回 runtimeService.createChangeActivityStateBuilder().processInstanceId(task.getProcessInstanceId()) - .moveActivityIdTo(task.getTaskDefinitionKey(), HisProInsEndActId.WITHDRAW) - .moveExecutionsToSingleActivityId( - executions.stream().map(Execution::getId).collect(Collectors.toList()), HisProInsEndActId.WITHDRAW) - .changeState(); + .moveActivityIdTo(task.getTaskDefinitionKey(), HisProInsEndActId.WITHDRAW) + .moveExecutionsToSingleActivityId( + executions.stream().map(Execution::getId).collect(Collectors.toList()), HisProInsEndActId.WITHDRAW) + .changeState(); } else { FlowElementsContainer parentContainer = currentNode.getParentContainer(); for (FlowElement flowElement : parentContainer.getFlowElements()) { - UserTask beforeUserTask = (UserTask)flowElement; + UserTask beforeUserTask = (UserTask) flowElement; if (beforeUserTask.getAssignee().equals(String.valueOf(userId))) { // TODO 若是前一个审核人点击撤回,在审核记录中移除自己提交过的审核意见、 // 待我处理中移除当前审核人的待办记录、 @@ -668,16 +681,16 @@ public class TodoCenterManage { // 更新项目状态 updateWithdrawProjectStatus(task, userId); HistoricTaskInstance beforeTaskInstance = - historyService.createHistoricTaskInstanceQuery().taskId(beforeUserTask.getId()).singleResult(); + historyService.createHistoricTaskInstanceQuery().taskId(beforeUserTask.getId()).singleResult(); List executions = runtimeService.createExecutionQuery() - .processInstanceId(beforeTaskInstance.getProcessInstanceId()).onlyChildExecutions().list(); + .processInstanceId(beforeTaskInstance.getProcessInstanceId()).onlyChildExecutions().list(); // 强制流程指向撤回 runtimeService.createChangeActivityStateBuilder().processInstanceId(task.getProcessInstanceId()) - .moveActivityIdTo(flowElement.getId(), HisProInsEndActId.WITHDRAW) - .moveExecutionsToSingleActivityId( - executions.stream().map(Execution::getId).collect(Collectors.toList()), - HisProInsEndActId.WITHDRAW) - .changeState(); + .moveActivityIdTo(flowElement.getId(), HisProInsEndActId.WITHDRAW) + .moveExecutionsToSingleActivityId( + executions.stream().map(Execution::getId).collect(Collectors.toList()), + HisProInsEndActId.WITHDRAW) + .changeState(); break; } } @@ -686,7 +699,8 @@ public class TodoCenterManage { /** * 当为撤回操作时,更新项目表中的项目状态为前一个状态 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId * @return void * @author CMM @@ -695,7 +709,7 @@ public class TodoCenterManage { private void updateWithdrawProjectStatus(Task task, Long userId) { // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); // 获取当前流程项目状态 Integer projectStatusSecond = declaredProject.getStatus(); // 根据当前状态获取对应的撤回事件 @@ -713,59 +727,61 @@ public class TodoCenterManage { /** * 退回流程处理 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId 当前登录用户ID - * @param param 参数 + * @param param 参数 */ private void doBackTask(Task task, Long userId, ReqProcessHandlerDTO param) { // 获取当前申报项目 Project declaredProject = projectService - .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); + .getOne(Wrappers.lambdaQuery(Project.class).eq(Project::getInstCode, task.getProcessInstanceId())); String projectName = declaredProject.getProjectName(); // 获取流程定义 Process process = ProcessDefinitionUtil.getProcess(task.getProcessDefinitionId()); // 获取根节点即流程发起节点 - FlowNode rootNode = (FlowNode)process.getFlowElement("root", true); + FlowNode rootNode = (FlowNode) process.getFlowElement("root", true); // TODO 流程变成【被退回】状态,待我处理中,为流程发起人增加一条待办记录,给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。 sendWorkNoticeToStartUser(task, projectName, rootNode); // 执行自定义回退逻辑,回退到流程发起人 managementService - .executeCommand(new BackToHisApprovalNodeCmd(runtimeService, param.getTaskId(), rootNode.getId())); + .executeCommand(new BackToHisApprovalNodeCmd(runtimeService, param.getTaskId(), rootNode.getId())); runtimeService.setVariables(param.getInstanceId(), - Maps.newHashMap("approve_" + param.getTaskId(), param.getAction())); + Maps.newHashMap("approve_" + param.getTaskId(), param.getAction())); log.info("用户[{}] 退回流程[{}] [{} -> {}]", userId, param.getInstanceId(), task.getTaskDefinitionKey(), - param.getTargetNode()); + param.getTargetNode()); } /** * 查询流程表单数据及审批的进度步骤 - * @param nodeId 当前获取流程人员关联的流程节点ID + * + * @param nodeId 当前获取流程人员关联的流程节点ID * @param instanceId 流程实例ID * @return 流程进度及表单详情 */ public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId) { HistoricProcessInstance instance = - historyService.createHistoricProcessInstanceQuery().processInstanceId(instanceId).singleResult(); + historyService.createHistoricProcessInstanceQuery().processInstanceId(instanceId).singleResult(); // 取表单及表单数据 HistoricVariableInstance forms = historyService.createHistoricVariableInstanceQuery() - .processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_FORMS).singleResult(); + .processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_FORMS).singleResult(); List formDatas = - historyService.createHistoricVariableInstanceQuery().processInstanceId(instanceId).list(); + historyService.createHistoricVariableInstanceQuery().processInstanceId(instanceId).list(); // 取节点设置 HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery() - .processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); - Map nodePropsValue = (Map)nodeProps.getValue(); + .processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); + Map nodePropsValue = (Map) nodeProps.getValue(); ProcessNode currentNode = null; if (StrUtil.isNotBlank(nodeId)) { // 搜索当前版本流程的配置 WflowModelHistorys modelHistory = modelHistorysMapper.selectOne( - new QueryWrapper<>(WflowModelHistorys.builder().processDefId(instance.getProcessDefinitionId()) - .version(instance.getProcessDefinitionVersion()).build())); + new QueryWrapper<>(WflowModelHistorys.builder().processDefId(instance.getProcessDefinitionId()) + .version(instance.getProcessDefinitionVersion()).build())); currentNode = nodeCatchService.reloadProcessByStr(modelHistory.getProcess()).get(nodeId); } UserDo users = orgRepositoryService.getUserById(instance.getStartUserId()); OrgUser startUser = - OrgUser.builder().id(users.getUserId()).name(users.getUserName()).avatar(users.getAvatar()).build(); + OrgUser.builder().id(users.getUserId()).name(users.getUserName()).avatar(users.getAvatar()).build(); List taskRecords = getHisTaskRecords(instanceId, nodePropsValue); // 获取添加抄送任务 @@ -775,24 +791,24 @@ public class TodoCenterManage { taskRecords.addAll(getFutureTask(instanceId)); } taskRecords = - taskRecords.stream().sorted(Comparator.comparing(ProgressNode::getStartTime)).collect(Collectors.toList()); + taskRecords.stream().sorted(Comparator.comparing(ProgressNode::getStartTime)).collect(Collectors.toList()); taskRecords.add(0, - ProgressNode.builder().nodeId("root").name("提交申请").user(startUser).nodeType(NodeTypeEnum.ROOT) - .startTime(instance.getStartTime()).finishTime(instance.getStartTime()).taskId("root") - .result(ProcessHandlerEnum.PASS).build()); + ProgressNode.builder().nodeId("root").name("提交申请").user(startUser).nodeType(NodeTypeEnum.ROOT) + .startTime(instance.getStartTime()).finishTime(instance.getStartTime()).taskId("root") + .result(ProcessHandlerEnum.PASS).build()); // 提取全量表单数据 Map formData = - formDatas.stream().filter(CodeUtil.distinctByKey(HistoricVariableInstance::getVariableName)).collect( - Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)); + formDatas.stream().filter(CodeUtil.distinctByKey(HistoricVariableInstance::getVariableName)).collect( + Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)); HistoricVariableInstance variableInstance = historyService.createHistoricVariableInstanceQuery() - .processInstanceId(instanceId).variableName("owner").singleResult(); - ProcessInstanceUserDto owner = (ProcessInstanceUserDto)variableInstance.getValue(); + .processInstanceId(instanceId).variableName("owner").singleResult(); + ProcessInstanceUserDto owner = (ProcessInstanceUserDto) variableInstance.getValue(); ProcessProgressDetailVo res = ProcessProgressDetailVo.builder().instanceId(instanceId) - .version(instance.getProcessDefinitionVersion()) - .formItems(formService.filterFormAndDataByPermConfig((List

)forms.getValue(), formData, currentNode)) - .formData(formData).processDefName(instance.getProcessDefinitionName()).startTempUser(startUser) - .startDept(null == owner ? null : owner.getOrgName()).result(instance.getEndActivityId()) - .startTime(instance.getStartTime()).progress(taskRecords).build(); + .version(instance.getProcessDefinitionVersion()) + .formItems(formService.filterFormAndDataByPermConfig((List) forms.getValue(), formData, currentNode)) + .formData(formData).processDefName(instance.getProcessDefinitionName()).startTempUser(startUser) + .startDept(null == owner ? null : owner.getOrgName()).result(instance.getEndActivityId()) + .startTime(instance.getStartTime()).progress(taskRecords).build(); // UserInfo userInfo = userInfoService.getById(Long.valueOf(instance.getStartUserId())); // res.setStartUser(userInfo); if (Objects.isNull(instance.getEndActivityId())) { @@ -810,18 +826,19 @@ public class TodoCenterManage { /** * 获取抄送的流程实例信息 + * * @param instanceId 实例ID * @return 抄送我的流程 */ private List getCcTaskRecords(String instanceId) { Set ccUsers = new HashSet<>(); List ccList = ccTasksMapper - .selectList(new QueryWrapper().eq("instance_id", instanceId)).stream().map(task -> { - ccUsers.add(task.getUserId()); - return ProgressNode.builder().nodeId(task.getNodeId()).nodeType(NodeTypeEnum.CC) - .name(task.getNodeName()).user(OrgUser.builder().id(task.getUserId()).build()) - .startTime(task.getCreateTime()).finishTime(task.getCreateTime()).build(); - }).collect(Collectors.toList()); + .selectList(new QueryWrapper().eq("instance_id", instanceId)).stream().map(task -> { + ccUsers.add(task.getUserId()); + return ProgressNode.builder().nodeId(task.getNodeId()).nodeType(NodeTypeEnum.CC) + .name(task.getNodeName()).user(OrgUser.builder().id(task.getUserId()).build()) + .startTime(task.getCreateTime()).finishTime(task.getCreateTime()).build(); + }).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(ccUsers)) { Map userMap = userDeptOrLeaderService.getUserMapByIds(ccUsers); ccList.stream().peek(v -> v.setUser(userMap.get(v.getUser().getId()))).collect(Collectors.toList()); @@ -831,34 +848,35 @@ public class TodoCenterManage { /** * 获取流程的审批历史记录 + * * @param instanceId 审批实例ID - * @param nodeProps 节点设置 + * @param nodeProps 节点设置 * @return 历史记录列表 */ private List getHisTaskRecords(String instanceId, Map nodeProps) { List list = historyService.createHistoricActivityInstanceQuery() - .processInstanceId(instanceId).orderByHistoricActivityInstanceStartTime().asc().list(); + .processInstanceId(instanceId).orderByHistoricActivityInstanceStartTime().asc().list(); Set userSet = new HashSet<>(); // 获取节点处理结果 Map varMap = historyService.createHistoricVariableInstanceQuery() + ProcessHandlerEnum> varMap = historyService.createHistoricVariableInstanceQuery() .processInstanceId(instanceId).variableNameLike("approve_%").list().stream().collect( - Collectors.toMap(HistoricVariableInstance::getVariableName, v -> (ProcessHandlerEnum)v.getValue())); + Collectors.toMap(HistoricVariableInstance::getVariableName, v -> (ProcessHandlerEnum) v.getValue())); Map> commentMap = new HashMap<>(); // 统一处理所有评论数据,省的多次查询 List cmvos = - taskService.getProcessInstanceComments(instanceId).stream().map(comment -> { - userSet.add(comment.getUserId()); - ProgressNodeAuditInfoVo progressNodeAuditInfoVo = - ProgressNodeAuditInfoVo.builder().id(comment.getId()).taskId(comment.getTaskId()) - .commentType(comment.getType()).type("COMMENT").createTime(comment.getTime()) - .user(UserInfo.builder().id(Long.valueOf(comment.getUserId())).build()).build(); - ProcessComment processComment = JSONObject.parseObject(comment.getFullMessage(), ProcessComment.class); - progressNodeAuditInfoVo.setText(processComment.getText()); - progressNodeAuditInfoVo.setAttachments(processComment.getAttachments()); - return progressNodeAuditInfoVo; - }).collect(Collectors.toList()); + taskService.getProcessInstanceComments(instanceId).stream().map(comment -> { + userSet.add(comment.getUserId()); + ProgressNodeAuditInfoVo progressNodeAuditInfoVo = + ProgressNodeAuditInfoVo.builder().id(comment.getId()).taskId(comment.getTaskId()) + .commentType(comment.getType()).type("COMMENT").createTime(comment.getTime()) + .user(UserInfo.builder().id(Long.valueOf(comment.getUserId())).build()).build(); + ProcessComment processComment = JSONObject.parseObject(comment.getFullMessage(), ProcessComment.class); + progressNodeAuditInfoVo.setText(processComment.getText()); + progressNodeAuditInfoVo.setAttachments(processComment.getAttachments()); + return progressNodeAuditInfoVo; + }).collect(Collectors.toList()); cmvos.forEach(cm -> { // 把评论数据按照task进行归类 String taskId = Optional.ofNullable(cm.getTaskId()).orElse(instanceId); @@ -867,21 +885,21 @@ public class TodoCenterManage { }); // 再将评论按照任务一次构建,方便取出 Map commentsMap = - cmvos.stream().collect(Collectors.toMap(ProgressNodeAuditInfoVo::getTaskId, c -> c)); + cmvos.stream().collect(Collectors.toMap(ProgressNodeAuditInfoVo::getTaskId, c -> c)); List progressNodes = - list.stream().filter(his -> ObjectUtil.isNotNull(his.getTaskId())).map(his -> { - Object props = nodeProps.get(his.getActivityId()); - ApprovalModeEnum approvalMode = null; - if (props instanceof ApprovalProps) { - approvalMode = ((ApprovalProps)props).getMode(); - } - userSet.add(his.getAssignee()); - return ProgressNode.builder().nodeId(his.getActivityId()).name(his.getActivityName()) - .nodeType(NodeTypeEnum.APPROVAL).user(OrgUser.builder().id(his.getAssignee()).build()) - .startTime(his.getStartTime()).finishTime(his.getEndTime()).taskId(his.getTaskId()) - .approvalMode(approvalMode).auditInfo(commentsMap.get(his.getTaskId())) - .result(varMap.get("approve_" + his.getTaskId())).build(); - }).collect(Collectors.toList()); + list.stream().filter(his -> ObjectUtil.isNotNull(his.getTaskId())).map(his -> { + Object props = nodeProps.get(his.getActivityId()); + ApprovalModeEnum approvalMode = null; + if (props instanceof ApprovalProps) { + approvalMode = ((ApprovalProps) props).getMode(); + } + userSet.add(his.getAssignee()); + return ProgressNode.builder().nodeId(his.getActivityId()).name(his.getActivityName()) + .nodeType(NodeTypeEnum.APPROVAL).user(OrgUser.builder().id(his.getAssignee()).build()) + .startTime(his.getStartTime()).finishTime(his.getEndTime()).taskId(his.getTaskId()) + .approvalMode(approvalMode).auditInfo(commentsMap.get(his.getTaskId())) + .result(varMap.get("approve_" + his.getTaskId())).build(); + }).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(userSet)) { Map map = userDeptOrLeaderService.getUserMapByIds(userSet); progressNodes.forEach(n -> n.setUser(map.get(n.getUser().getId()))); @@ -896,7 +914,7 @@ public class TodoCenterManage { /** * 待办中心我已处理项目列表查询 - * + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM @@ -909,10 +927,10 @@ public class TodoCenterManage { // 自定义sql查询所有已办的任务实例 String nativeSql = "SELECT aht.* FROM ACT_HI_TASKINST AS aht \n" - + "LEFT JOIN ACT_HI_VARINST AS ahv ON SUBSTRING(ahv.NAME_, 9) = aht.ID_ AND ahv.NAME_ LIKE 'approve_%'\n" - + "WHERE aht.ASSIGNEE_ = " + userId + " AND ahv.NAME_ IS NOT NULL \n" + "ORDER BY aht.END_TIME_ DESC"; + + "LEFT JOIN ACT_HI_VARINST AS ahv ON SUBSTRING(ahv.NAME_, 9) = aht.ID_ AND ahv.NAME_ LIKE 'approve_%'\n" + + "WHERE aht.ASSIGNEE_ = " + userId + " AND ahv.NAME_ IS NOT NULL \n" + "ORDER BY aht.END_TIME_ DESC"; NativeHistoricTaskInstanceQuery taskInstanceQuery = - historyService.createNativeHistoricTaskInstanceQuery().sql(nativeSql); + historyService.createNativeHistoricTaskInstanceQuery().sql(nativeSql); List taskInstances = taskInstanceQuery.list(); Set taskProcessInsIds = taskInstances.stream() @@ -935,16 +953,17 @@ public class TodoCenterManage { ResToBeProcessedDTO res = new ResToBeProcessedDTO(); BeanUtils.copyProperties(d, res); + res.setProjectId(d.getId()); res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); LocalDateTime processLaunchTime = d.getCreateOn(); String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); LocalDateTime launchTime = - LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); + LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); res.setProcessLaunchTime(launchTime); LocalDateTime processHandleTime = d.getUpdateOn(); String handleTimeFormat = NdDateUtils.format(processHandleTime, "yyyy-MM-dd HH:mm"); LocalDateTime handleTime = - LocalDateTime.parse(handleTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); + LocalDateTime.parse(handleTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); res.setProcessHandleTime(handleTime); // 从已处理任务实例列表中取出当前登录用户及项目实例对应的任务实例 @@ -953,12 +972,12 @@ public class TodoCenterManage { // 从缓存取 staterUsers.add(instance.getStartUserId()); ProcessTaskVo processTaskVo = ProcessTaskVo.builder().taskId(task.getId()).taskName(task.getName()) - .taskDefKey(task.getTaskDefinitionKey()).processDefId(task.getProcessDefinitionId()) - .executionId(task.getExecutionId()).nodeId(task.getTaskDefinitionKey()) - .deployId(instance.getDeploymentId()).processDefName(instance.getProcessDefinitionName()) - .version(instance.getProcessDefinitionVersion()).instanceId(task.getProcessInstanceId()) - .ownerId(instance.getStartUserId()).createTime(instance.getStartTime()) - .taskCreateTime(task.getCreateTime()).build(); + .taskDefKey(task.getTaskDefinitionKey()).processDefId(task.getProcessDefinitionId()) + .executionId(task.getExecutionId()).nodeId(task.getTaskDefinitionKey()) + .deployId(instance.getDeploymentId()).processDefName(instance.getProcessDefinitionName()) + .version(instance.getProcessDefinitionVersion()).instanceId(task.getProcessInstanceId()) + .ownerId(instance.getStartUserId()).createTime(instance.getStartTime()) + .taskCreateTime(task.getCreateTime()).build(); res.setProcessTaskInfo(processTaskVo); return res; }).collect(Collectors.toList()); @@ -967,8 +986,8 @@ public class TodoCenterManage { if (CollectionUtil.isNotEmpty(staterUsers)) { Map userMap = userDeptOrLeaderService.getUserMapByIds(staterUsers); result = resVos.stream() - .peek(v -> v.getProcessTaskInfo().setOwner(userMap.get(v.getProcessTaskInfo().getOwnerId()))) - .collect(Collectors.toList()); + .peek(v -> v.getProcessTaskInfo().setOwner(userMap.get(v.getProcessTaskInfo().getOwnerId()))) + .collect(Collectors.toList()); // Map userMap = userInfoService.getUserMapByIds(staterUsers); // result = resVos.stream().peek(v -> v.setOwner(userMap.get(userId))) // .collect(Collectors.toList()); @@ -979,8 +998,9 @@ public class TodoCenterManage { /** * 获取申报项目列表中登录用户已处理项目列表 - * @param param - * @param taskProcessInsIds + * + * @param param + * @param taskProcessInsIds * @return java.util.List * @author CMM * @since 2023/02/11 @@ -990,12 +1010,12 @@ public class TodoCenterManage { Page page = param.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class); wrapper.like(StrUtil.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) - .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) - .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) - .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) - .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, - param.getProcessLaunchStartTime()) - .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); + .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) + .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) + .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) + .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, + param.getProcessLaunchStartTime()) + .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); projectService.page(page, wrapper); // 过滤申报项目中登录用户已审核的项目 @@ -1006,8 +1026,9 @@ public class TodoCenterManage { /** * 导出我已处理项目列表 + * * @param response 返回数据流 - * @param param 请求参数 + * @param param 请求参数 * @return void * @author CMM * @since 2023/02/06 @@ -1074,22 +1095,22 @@ public class TodoCenterManage { /** * 查询我提交的项目列表 - * + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM * @since 2023/02/06 */ public PageVo queryMySubmittedProjectList(ReqToBeProcessedDTO param) { - + // Long startUserId = LoginUserUtil.getUserId(); Long startUserId = 381496L; HistoricProcessInstanceQuery instanceQuery = historyService.createHistoricProcessInstanceQuery(); Executor.builder().ifNotBlankNext(String.valueOf(startUserId), instanceQuery::startedBy); List historicProcessInstances = - instanceQuery.orderByProcessInstanceStartTime().desc().orderByProcessInstanceEndTime().desc().list(); + instanceQuery.orderByProcessInstanceStartTime().desc().orderByProcessInstanceEndTime().desc().list(); Set historicProcessInstanceIds = - historicProcessInstances.stream().map(h -> h.getId()).collect(Collectors.toSet()); + historicProcessInstances.stream().map(h -> h.getId()).collect(Collectors.toSet()); List results = getMySubmittedProjects(param, historicProcessInstanceIds); @@ -1100,23 +1121,24 @@ public class TodoCenterManage { .list().stream().collect(Collectors.toMap(HistoricProcessInstance::getId, v -> v)) : new HashMap<>(); Set staterUsers = new HashSet<>(); - + List resVos = results.stream().map(d -> { - ResToBeProcessedDTO res = new ResToBeProcessedDTO(); - BeanUtils.copyProperties(d, res); - res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); - LocalDateTime processLaunchTime = d.getCreateOn(); - String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); - LocalDateTime launchTime = - LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); - res.setProcessLaunchTime(launchTime); - HistoricProcessInstance ist = instanceMap.get(d.getInstCode()); - staterUsers.add(ist.getStartUserId()); - ProcessInstanceVo processInstanceVo = getProcessInstanceVos(ist); - res.setProcessInstanceInfo(processInstanceVo); - return res; - }).collect(Collectors.toList()); + ResToBeProcessedDTO res = new ResToBeProcessedDTO(); + BeanUtils.copyProperties(d, res); + res.setProjectId(d.getId()); + res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); + LocalDateTime processLaunchTime = d.getCreateOn(); + String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); + LocalDateTime launchTime = + LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); + res.setProcessLaunchTime(launchTime); + HistoricProcessInstance ist = instanceMap.get(d.getInstCode()); + staterUsers.add(ist.getStartUserId()); + ProcessInstanceVo processInstanceVo = getProcessInstanceVos(ist); + res.setProcessInstanceInfo(processInstanceVo); + return res; + }).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(staterUsers)) { Map userMap = userDeptOrLeaderService.getUserMapByIds(staterUsers); @@ -1136,8 +1158,9 @@ public class TodoCenterManage { /** * 获取申报项目列表中当前登录用户发起的项目列表 - * @param param - * @param historicProcessInstanceIds + * + * @param param + * @param historicProcessInstanceIds * @return java.util.List * @author CMM * @since 2023/02/11 @@ -1146,12 +1169,12 @@ public class TodoCenterManage { Page page = param.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class); wrapper.like(StrUtil.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) - .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) - .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) - .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) - .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, - param.getProcessLaunchStartTime()) - .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); + .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) + .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) + .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) + .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, + param.getProcessLaunchStartTime()) + .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); projectService.page(page, wrapper); // 筛选出申报项目中我发起的项目 @@ -1163,6 +1186,7 @@ public class TodoCenterManage { /** * 获取流程实例信息 + * * @param ist 流程实例 * @return java.util.List * @author CMM @@ -1171,10 +1195,10 @@ public class TodoCenterManage { private ProcessInstanceVo getProcessInstanceVos(HistoricProcessInstance ist) { Map instanceNodeMap = new HashMap<>(); ProcessInstanceVo instanceVo = ProcessInstanceVo.builder().processDefId(ist.getProcessDefinitionId()) - .instanceId(ist.getId()).nodeId(instanceNodeMap.get(ist.getId())).formId(ist.getProcessDefinitionKey()) - .staterUserId(ist.getStartUserId()).startTime(ist.getStartTime()).finishTime(ist.getEndTime()) - .processDefName(ist.getProcessDefinitionName()).result(ist.getEndActivityId()) - .version(ist.getProcessDefinitionVersion()).build(); + .instanceId(ist.getId()).nodeId(instanceNodeMap.get(ist.getId())).formId(ist.getProcessDefinitionKey()) + .staterUserId(ist.getStartUserId()).startTime(ist.getStartTime()).finishTime(ist.getEndTime()) + .processDefName(ist.getProcessDefinitionName()).result(ist.getEndActivityId()) + .version(ist.getProcessDefinitionVersion()).build(); if (Objects.isNull(ist.getEndActivityId())) { instanceVo.setStatus(ProcessStatusEnum.UNDER_REVIEW.name()); @@ -1190,7 +1214,7 @@ public class TodoCenterManage { if (ObjectUtil.isNull(ist.getEndActivityId())) { // 没有结束,还在走流程,获取任务 List list = - taskService.createTaskQuery().processInstanceId(ist.getId()).includeIdentityLinks().active().list(); + taskService.createTaskQuery().processInstanceId(ist.getId()).includeIdentityLinks().active().list(); instanceVo.setNodeId(Optional.ofNullable(instanceVo.getNodeId()).orElseGet(() -> { if (CollectionUtil.isNotEmpty(list)) { return list.get(0).getTaskDefinitionKey(); @@ -1213,6 +1237,7 @@ public class TodoCenterManage { /** * 待办中心-我发起的项目列表导出 + * * @param response * @param param * @return void @@ -1278,6 +1303,7 @@ public class TodoCenterManage { /** * 待办中心-抄送我的项目列表查询 + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM @@ -1289,7 +1315,7 @@ public class TodoCenterManage { Long userId = 381496L; List ccTasks = ccTasksMapper.selectList(Wrappers.lambdaQuery(WflowCcTasks.class) - .eq(WflowCcTasks::getUserId, String.valueOf(userId)).orderByDesc(WflowCcTasks::getCreateTime)); + .eq(WflowCcTasks::getUserId, String.valueOf(userId)).orderByDesc(WflowCcTasks::getCreateTime)); List processInsIds = ccTasks.stream() .map(WflowCcTasks::getInstanceId) .collect(Collectors.toList()); @@ -1305,20 +1331,21 @@ public class TodoCenterManage { : new HashMap<>(); List resVos = results.stream().map(d -> { - ResToBeProcessedDTO res = new ResToBeProcessedDTO(); - BeanUtils.copyProperties(d, res); - res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); - LocalDateTime processLaunchTime = d.getCreateOn(); - String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); - LocalDateTime launchTime = - LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); - res.setProcessLaunchTime(launchTime); - HistoricProcessInstance ist = instanceMap.get(d.getInstCode()); - staterUsers.add(ist.getStartUserId()); - ProcessInstanceVo processInstanceVo = getProcessInstanceVos(ist); - res.setProcessInstanceInfo(processInstanceVo); - return res; - }).collect(Collectors.toList()); + ResToBeProcessedDTO res = new ResToBeProcessedDTO(); + BeanUtils.copyProperties(d, res); + res.setProjectId(d.getId()); + res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); + LocalDateTime processLaunchTime = d.getCreateOn(); + String launchTimeFormat = NdDateUtils.format(processLaunchTime, "yyyy-MM-dd HH:mm"); + LocalDateTime launchTime = + LocalDateTime.parse(launchTimeFormat, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")); + res.setProcessLaunchTime(launchTime); + HistoricProcessInstance ist = instanceMap.get(d.getInstCode()); + staterUsers.add(ist.getStartUserId()); + ProcessInstanceVo processInstanceVo = getProcessInstanceVos(ist); + res.setProcessInstanceInfo(processInstanceVo); + return res; + }).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(staterUsers)) { Map userMap = userDeptOrLeaderService.getUserMapByIds(staterUsers); @@ -1338,6 +1365,7 @@ public class TodoCenterManage { /** * 获取申报项目表中抄送当前登录用户的项目列表 + * * @param param * @param processInsIds * @return java.util.List @@ -1348,12 +1376,12 @@ public class TodoCenterManage { Page page = param.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(Project.class); wrapper.like(StrUtil.isNotBlank(param.getProjectName()), Project::getProjectName, param.getProjectName()) - .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) - .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) - .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) - .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, - param.getProcessLaunchStartTime()) - .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); + .like(StrUtil.isNotBlank(param.getBuildUnitName()), Project::getBuildOrgName, param.getBuildUnitName()) + .eq(Objects.nonNull(param.getProjectYear()), Project::getProjectYear, param.getProjectYear()) + .eq(Objects.nonNull(param.getIsSupplement()), Project::getIsTemporaryAugment, param.getIsSupplement()) + .ge(Objects.nonNull(param.getProcessLaunchStartTime()), Project::getBeginTime, + param.getProcessLaunchStartTime()) + .le(Objects.nonNull(param.getProcessLaunchEndTime()), Project::getEndTime, param.getProcessLaunchEndTime()); projectService.page(page, wrapper); return page.getRecords().stream() @@ -1363,6 +1391,7 @@ public class TodoCenterManage { /** * 待办中心-抄送我的项目列表导出 + * * @param response * @param param * @return void @@ -1370,7 +1399,7 @@ public class TodoCenterManage { * @since 2023/02/11 */ public void exportCcMeProjectList(HttpServletResponse response, ReqToBeProcessedDTO param) { - + param.setPageNumber(1); param.setPageSize(10000); // 获取当前登录用户ID @@ -1422,6 +1451,6 @@ public class TodoCenterManage { excelExportWriter.setHeadPropertyClass(List.class); excelExportWriter.setHeadPropertyFlag(Boolean.FALSE); ExcelDownUtil.excelExportFile(response, excelExportWriter); - + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java index 395d38b..244cf10 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java @@ -6,7 +6,7 @@ import java.util.List; import com.ningdatech.basic.model.PagePo; -import com.ningdatech.pmapi.common.enums.ExportOptionEnum; +import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java index 88725c1..f03e734 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java @@ -29,6 +29,9 @@ import org.springframework.format.annotation.DateTimeFormat; public class ResToBeProcessedDTO implements Serializable { private static final long serialVersionUID = 1L; + @ApiModelProperty("项目ID") + private Long projectId; + @ApiModelProperty("流程实例编号") private String instanceCode; diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java index d9ed6e6..1819a47 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/statemachine/StateMachineTest.java @@ -8,6 +8,8 @@ import com.ningdatech.pmapi.projectlib.model.entity.Project; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import java.math.BigDecimal; + /** * 状态机测试 * @@ -22,7 +24,9 @@ public class StateMachineTest extends AppTests { @Test public void stateMachineTest() throws Exception { Project project = new Project(); - project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode()); - stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); + project.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); + project.setDeclareAmount(BigDecimal.valueOf(2000)); + // stateMachineUtils.execute(project, ProjectStatusChangeEvent.UNDER_INTERNAL_PASS); + stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); } } diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java index c91ee0a..4ed9825 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/sys/service/IMenuServiceTest.java @@ -3,7 +3,7 @@ package com.ningdatech.pmapi.sys.service; import cn.hutool.db.Db; import cn.hutool.db.Entity; import com.ningdatech.pmapi.AppTests; -import com.ningdatech.pmapi.sys.entity.Menu; +import com.ningdatech.pmapi.sys.model.entity.Menu; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired;