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 index 406b18f..1067f97 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java @@ -1,11 +1,10 @@ -package com.ningdatech.pmapi.common.enums; +package com.ningdatech.pmapi.common.enumeration; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; - /** * 导出选项枚举 * @@ -19,129 +18,129 @@ public enum ExportOptionEnum { /** * 导出选项 */ - id(1,"项目ID"), + id(1, "项目ID"), - projectName(2,"项目名称"), + projectName(2, "项目名称"), - areaCode(3,"行政区划编码"), + areaCode(3, "行政区划编码"), - area(4,"行政区划名称"), + area(4, "行政区划名称"), - responsibleMan(5,"项目负责人"), + responsibleMan(5, "项目负责人"), - responsibleManMobile(6,"项目负责人手机号"), + responsibleManMobile(6, "项目负责人手机号"), - contactName(7,"项目联系人"), + contactName(7, "项目联系人"), - contactPhone(8,"项目联系人手机号"), + contactPhone(8, "项目联系人手机号"), - higherSuperOrg(9,"上级业务主管单位"), + higherSuperOrg(9, "上级业务主管单位"), - higherSuperOrgCode(10,"上级主管单位浙政钉ID"), + higherSuperOrgCode(10, "上级主管单位浙政钉ID"), - superOrg(11,"本级主管部门"), + superOrg(11, "本级主管部门"), - superOrgCode(12,"本级主管部门浙政钉ID"), + superOrgCode(12, "本级主管部门浙政钉ID"), - buildOrgName(13,"建设单位名称"), + buildOrgName(13, "建设单位名称"), - buildOrgZheJiangGovDingId(14,"建设单位浙政钉ID"), + buildOrgZheJiangGovDingId(14, "建设单位浙政钉ID"), - buildOrgCode(15,"建设单位统一信用代码"), + buildOrgCode(15, "建设单位统一信用代码"), - projectType(16,"项目类型"), + projectType(16, "项目类型"), - isFirst(17,"是否首次新建"), + isFirst(17, "是否首次新建"), - relatedExistsApplication(18,"关联应用"), + relatedExistsApplication(18, "关联应用"), - relatedExistsApplicationCode(19,"关联应用IRS编码"), + relatedExistsApplicationCode(19, "关联应用IRS编码"), - declareAmount(20,"申报金额(万元)"), + declareAmount(20, "申报金额(万元)"), - approvedTotalInvestmentIncrease(21,"批复金额"), + approvedTotalInvestmentIncrease(21, "批复金额"), /** * 表里没有 */ - budgetSource(22,"预算来源"), + budgetSource(22, "预算来源"), - projectYear(23,"预算年度"), + projectYear(23, "预算年度"), - projectIntroduction(24,"项目简介"), + projectIntroduction(24, "项目简介"), - buildBasis(25,"立项依据"), + buildBasis(25, "立项依据"), - buildLevel(26,"建设层级"), + buildLevel(26, "建设层级"), - developCode(27,"发改编码"), + developCode(27, "发改编码"), - financialCode(28,"财政编码"), + financialCode(28, "财政编码"), /** * 表里没有 */ - informationValidity(29,"信息是否有效"), + informationValidity(29, "信息是否有效"), - isDigitalReform(30,"是否数字化改革项目"), + isDigitalReform(30, "是否数字化改革项目"), - bizDomain(31,"综合应用领域"), + bizDomain(31, "综合应用领域"), - isCloud(32,"是否上云"), + isCloud(32, "是否上云"), - cloudType(33,"云类型"), + cloudType(33, "云类型"), - fourSystems(34,"四大体系"), - isTemporaryAugment(35,"是否临时增补"), + fourSystems(34, "四大体系"), + isTemporaryAugment(35, "是否临时增补"), - protectionLevel(36,"等保级别"), + protectionLevel(36, "等保级别"), - isSecretComments(37,"是否密评"), + isSecretComments(37, "是否密评"), - businessNumber(38,"业务编号"), + businessNumber(38, "业务编号"), - businessName(39,"业务名称"), + businessName(39, "业务名称"), - orgName(40,"单位名称"), + orgName(40, "单位名称"), - softwareDevelopmentAmount(41,"软件开发(万元)"), + softwareDevelopmentAmount(41, "软件开发(万元)"), - cloudHardwarePurchaseAmount(42,"云资源、硬件购置(万元)"), + cloudHardwarePurchaseAmount(42, "云资源、硬件购置(万元)"), - thirdPartyAmount(43,"第三方服务(万元)"), + thirdPartyAmount(43, "第三方服务(万元)"), - safetyInputTitle(44,"投入项"), + safetyInputTitle(44, "投入项"), - safetyInputDescribe(45,"内容描述"), + safetyInputDescribe(45, "内容描述"), - safetyInputAmount(46,"金额"), + safetyInputAmount(46, "金额"), - annualPlanAmount(47,"年度支付金额(万元)"), + annualPlanAmount(47, "年度支付金额(万元)"), - annualPlanHaveAmount(48,"自有资金(万元)"), + annualPlanHaveAmount(48, "自有资金(万元)"), - declareGovOwnFinanceAmount(49,"政府投资-本级财政资金(万元)"), + declareGovOwnFinanceAmount(49, "政府投资-本级财政资金(万元)"), - declareGovSuperiorFinanceAmount(50,"政府投资-上级补助资金(万元)"), + declareGovSuperiorFinanceAmount(50, "政府投资-上级补助资金(万元)"), - declareBankLendingAmount(51,"银行贷款(万元)"), + declareBankLendingAmount(51, "银行贷款(万元)"), - declareOtherAmount(52,"其它资金(万元)"), + declareOtherAmount(52, "其它资金(万元)"), - engineeringSpeedOne(53,"第一季度"), + engineeringSpeedOne(53, "第一季度"), - engineeringSpeedTwo(54,"第二季度"), + engineeringSpeedTwo(54, "第二季度"), - engineeringSpeedThree(55,"第三季度"), + engineeringSpeedThree(55, "第三季度"), - engineeringSpeedFour(56,"第四季度"), + engineeringSpeedFour(56, "第四季度"), - preliminaryPlanFile(57,"初步方案"), + preliminaryPlanFile(57, "初步方案"), - supportingMaterialsFile(58,"附件-佐证材料"), + supportingMaterialsFile(58, "附件-佐证材料"), - projectRemarks(59,"备注"); + 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/util/TreeUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java index e75eeb3..ae70159 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java @@ -5,8 +5,8 @@ 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/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/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/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 a34a9c2..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 @@ -8,12 +8,12 @@ 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.util.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.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 e6dabd7..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 @@ -5,9 +5,9 @@ import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.util.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.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 3c48244..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 @@ -11,12 +11,12 @@ 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.util.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.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/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index d1848b5..1060fc6 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; @@ -37,7 +37,7 @@ 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) @@ -173,12 +173,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 +187,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 +198,7 @@ public class TodoCenterManage { /** * 待办中心列表导出 + * * @param response * @param param * @return void @@ -216,7 +217,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 +259,7 @@ public class TodoCenterManage { /** * 获取申报项目列表中待登录用户处理的项目列表 + * * @param param * @param taskList * @return java.util.List @@ -275,7 +277,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 +287,7 @@ public class TodoCenterManage { /** * 流程处理相关操作 - * + * * @param param * @return void * @author CMM @@ -338,14 +340,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 +357,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 +368,7 @@ public class TodoCenterManage { /** * 当为驳回操作时,更新项目表中的项目状态 + * * @param task 当前任务 * @return void * @author CMM @@ -375,7 +379,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 +397,7 @@ public class TodoCenterManage { /** * 获取最新版本的流程配置 - * + * * @param task 当前任务 * @return com.wflow.bean.entity.WflowModels * @author CMM @@ -401,7 +405,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 +415,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 +429,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 +437,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 +455,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 +463,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 +477,7 @@ public class TodoCenterManage { // 若没有,向发起人发送浙政钉工作通知:【项目名称】已通过【流程名称】,请及时开始下一步操作。 // TODO 向其发送浙政钉工作通知 获取根节点的孩子节点(即发起人节点),向其发送浙政钉工作通知 // 获取根节点即流程发起节点 - FlowNode rootNode = (FlowNode)bpmnModel.getFlowElement("root"); + FlowNode rootNode = (FlowNode) bpmnModel.getFlowElement("root"); // sendWorkNoticeToStartUser(task, projectName, rootNode); } } @@ -479,7 +485,7 @@ public class TodoCenterManage { /** * 当为通过操作时,更新项目表中项目状态 * - * @param task 当前任务 + * @param task 当前任务 * @param userId * @param declaredProject * @return void @@ -504,9 +510,10 @@ public class TodoCenterManage { /** * 给流程发起人发送工作通知 - * @param task 当前任务 + * + * @param task 当前任务 * @param projectName 项目名称 - * @param rootNode 流程发起节点 + * @param rootNode 流程发起节点 * @return void * @author CMM * @since 2023/02/03 @@ -523,6 +530,7 @@ public class TodoCenterManage { /** * 获取流程发起节点的浙政钉用户ID + * * @param rootNode 根节点 * @return java.lang.String * @author CMM @@ -539,7 +547,7 @@ public class TodoCenterManage { // TODO 若要会签需判断候选人 // 发起事件 if (targetFlowElement instanceof StartEvent) { - UserTask userTask = (UserTask)targetFlowElement; + UserTask userTask = (UserTask) targetFlowElement; rootUserId = userTask.getAssignee(); break; } @@ -550,7 +558,8 @@ public class TodoCenterManage { /** * 获取当前节点的下一个节点的审核用户ID - * @param currentNode 当前节点 + * + * @param currentNode 当前节点 * @param processInstanceId * @return java.lang.String 下一个节点的浙政钉用户ID * @author CMM @@ -573,7 +582,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 +593,7 @@ public class TodoCenterManage { /** * 判断处理操作是否含有审核意见 + * * @param comment 审核意见 * @return boolean * @author CMM @@ -591,13 +601,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 +644,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 +680,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 +698,8 @@ public class TodoCenterManage { /** * 当为撤回操作时,更新项目表中的项目状态为前一个状态 - * @param task 当前任务 + * + * @param task 当前任务 * @param userId * @return void * @author CMM @@ -695,7 +708,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 +726,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 +790,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 +825,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 +847,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 +884,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 +913,7 @@ public class TodoCenterManage { /** * 待办中心我已处理项目列表查询 - * + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM @@ -909,10 +926,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() @@ -939,12 +956,12 @@ public class TodoCenterManage { 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 +970,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 +984,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 +996,9 @@ public class TodoCenterManage { /** * 获取申报项目列表中登录用户已处理项目列表 - * @param param - * @param taskProcessInsIds + * + * @param param + * @param taskProcessInsIds * @return java.util.List * @author CMM * @since 2023/02/11 @@ -990,12 +1008,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 +1024,9 @@ public class TodoCenterManage { /** * 导出我已处理项目列表 + * * @param response 返回数据流 - * @param param 请求参数 + * @param param 请求参数 * @return void * @author CMM * @since 2023/02/06 @@ -1074,22 +1093,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 +1119,23 @@ 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.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 +1155,9 @@ public class TodoCenterManage { /** * 获取申报项目列表中当前登录用户发起的项目列表 - * @param param - * @param historicProcessInstanceIds + * + * @param param + * @param historicProcessInstanceIds * @return java.util.List * @author CMM * @since 2023/02/11 @@ -1146,12 +1166,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 +1183,7 @@ public class TodoCenterManage { /** * 获取流程实例信息 + * * @param ist 流程实例 * @return java.util.List * @author CMM @@ -1171,10 +1192,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 +1211,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 +1234,7 @@ public class TodoCenterManage { /** * 待办中心-我发起的项目列表导出 + * * @param response * @param param * @return void @@ -1278,6 +1300,7 @@ public class TodoCenterManage { /** * 待办中心-抄送我的项目列表查询 + * * @param param * @return com.ningdatech.basic.model.PageVo * @author CMM @@ -1289,7 +1312,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 +1328,20 @@ 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.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 +1361,7 @@ public class TodoCenterManage { /** * 获取申报项目表中抄送当前登录用户的项目列表 + * * @param param * @param processInsIds * @return java.util.List @@ -1348,12 +1372,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 +1387,7 @@ public class TodoCenterManage { /** * 待办中心-抄送我的项目列表导出 + * * @param response * @param param * @return void @@ -1370,7 +1395,7 @@ public class TodoCenterManage { * @since 2023/02/11 */ public void exportCcMeProjectList(HttpServletResponse response, ReqToBeProcessedDTO param) { - + param.setPageNumber(1); param.setPageSize(10000); // 获取当前登录用户ID @@ -1422,6 +1447,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/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;