From 03a8c792d681d1086c35d2c885cdafe5318c0463 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Sat, 24 Aug 2024 13:15:20 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E7=BA=BF=E7=A8=8B=E6=B1=A0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/config/ThreadPoolUtilProperties.java | 46 +++ .../helper/basic/AbstractRegionLimitHelper.java | 4 - .../common/helper/impl/RegionLimitHelperImpl.java | 6 +- .../com/hz/pm/api/common/model/ZwddTokenUser.java | 16 - .../hz/pm/api/common/model/constant/DingConst.java | 14 - .../common/model/constant/ProjectDeclareConst.java | 172 ---------- .../pm/api/common/model/entity/ExcelExportDTO.java | 200 ----------- .../pm/api/common/model/entity/ViewRegionDTO.java | 24 -- .../api/common/util/CommonInputStreamResource.java | 53 --- .../com/hz/pm/api/common/util/ThreadPoolUtil.java | 29 +- .../dashboard/enums/CockpitAppcationTypeEnum.java | 33 -- .../api/dashboard/handle/CockpitStatsHandler.java | 260 -------------- .../api/dashboard/manage/CockpitStatsManage.java | 93 ----- .../api/dashboard/model/basic/AnalysisChart.java | 25 -- .../pm/api/dashboard/model/basic/AnalysisData.java | 21 -- .../dashboard/model/basic/CompanyProjectCntBO.java | 29 -- .../api/dashboard/model/basic/ProjectATIISBO.java | 29 -- .../api/dashboard/model/basic/QueryTimeYearBO.java | 23 -- .../pm/api/dashboard/model/basic/StarExpertBO.java | 24 -- .../pm/api/dashboard/model/basic/YearTrendBO.java | 45 --- .../dashboard/model/dto/CockpitApplicationDTO.java | 37 -- .../dashboard/model/dto/CockpitStatsSaveDTO.java | 257 -------------- .../hz/pm/api/dashboard/model/po/QueryYearPO.java | 21 -- .../pm/api/dashboard/model/vo/CockpitStatsVO.java | 378 --------------------- .../model/vo/DashboardInvestmentSummaryVO.java | 34 -- .../model/vo/DashboardProjectCntSummaryVO.java | 30 -- .../model/vo/DashboardProjectPortraitVO.java | 30 -- .../model/vo/DashboardProjectSummaryVO.java | 58 ---- .../model/vo/EarlyWarningStatisticsVO.java | 39 --- .../model/vo/ExpertDashboardSummaryVO.java | 31 -- .../dashboard/model/vo/MeetingStatisticsVO.java | 36 -- .../model/vo/PerformanceStatisticsVO.java | 39 --- .../dashboard/model/vo/ProjectStatisticsVO.java | 52 --- .../dashboard/model/vo/ProtraitProjectInfoVO.java | 58 ---- .../model/vo/ProtraitProjectStatusSituationVO.java | 34 -- .../api/expert/manage/ExpertMetaApplyManage.java | 6 - .../api/fiscal/mapper/CompanyFiscalCodeMapper.java | 16 + .../api/fiscal/mapper/CompanyFiscalCodeMapper.xml | 5 + .../fiscal/mapper/NdCompanyFiscalCodeMapper.java | 16 - .../fiscal/mapper/NdCompanyFiscalCodeMapper.xml | 5 - .../service/impl/CompanyFiscalCodeServiceImpl.java | 5 +- .../com/hz/pm/api/gov/contant/BizProjectCont.java | 39 +++ .../hz/pm/api/gov/contants/BizProjectContant.java | 34 -- .../com/hz/pm/api/gov/convert/ProjectConvert.java | 16 +- .../gov/enumeration/GovProjectClassifiedEnum.java | 53 --- .../pm/api/gov/helper/GovBusinessStripHelper.java | 44 --- .../api/gov/manage/GovProjectCollectionManage.java | 6 +- .../api/irs/controller/OrganizationController.java | 24 -- .../com/hz/pm/api/irs/model/dto/ApiApplyDTO.java | 34 -- .../pm/api/irs/model/dto/ApiApplySearchResult.java | 38 --- .../java/com/hz/pm/api/irs/model/dto/ApiDTO.java | 24 -- .../hz/pm/api/irs/model/dto/ApiSearchResult.java | 25 -- .../com/hz/pm/api/irs/model/dto/ForwardDTO.java | 28 -- .../api/irs/model/dto/PushProjectAppToIrsDTO.java | 37 -- .../com/hz/pm/api/irs/model/res/ApiResponse.java | 123 ------- .../java/com/hz/pm/api/irs/sign/IRSAPIRequest.java | 301 ---------------- .../com/hz/pm/api/irs/sign/IrsSealSignUtil.java | 295 ++++++++++++++++ .../com/hz/pm/api/irs/utils/RefreshTokenUtil.java | 53 --- .../api/meeting/task/MsgCallReplyRewriteTask.java | 2 +- .../manage/PerformanceAppraisalPlanManage.java | 2 +- .../contant/DeclaredProjectConst.java | 79 ----- .../projectlib/handle/ProcessProgressHelper.java | 2 +- .../scheduler/task/EarlyWarningProjectTask.java | 85 ++--- .../sys/controller/NdMsgCallRecordController.java | 18 - .../api/sys/enumeration/NoticePermissionsEnum.java | 8 +- .../hz/pm/api/sys/enumeration/NoticeTypeEnum.java | 8 +- .../enumeration/ProjectEarlyWarningStatusEnum.java | 8 +- .../com/hz/pm/api/sys/manage/RegionManage.java | 2 - .../com/hz/pm/api/sys/model/dto/RegionDTO.java | 1 + .../hz/pm/api/sys/model/dto/ResourceSaveDTO.java | 63 ---- .../hz/pm/api/sys/model/dto/ResourceUpdateDTO.java | 68 ---- .../pm/api/sys/model/dto/RoleAuthoritySaveDTO.java | 53 --- .../com/hz/pm/api/sys/model/dto/RoleQueryDTO.java | 48 --- .../hz/pm/api/sys/model/dto/UserRoleSaveDTO.java | 47 --- .../java/com/hz/pm/api/sys/model/entity/Menu.java | 2 - .../hz/pm/api/sys/model/entity/RoleAuthority.java | 74 ---- .../pm/api/sys/model/entity/RoleMenuDatascope.java | 2 + .../hz/pm/api/sys/model/vo/MenuResourceTreeVO.java | 35 -- .../com/hz/pm/api/sys/model/vo/MenuRoleVO.java | 2 - .../java/com/hz/pm/api/sys/model/vo/MenuVO.java | 2 - .../hz/pm/api/sys/model/vo/NoticeListItemVO.java | 1 + .../com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java | 48 --- .../pm/api/todocenter/manage/TodoCenterManage.java | 8 +- .../api/todocenter/model/dto/PdfGenerateDTO.java | 149 -------- .../api/todocenter/model/dto/ResCcMeExportDTO.java | 41 --- .../todocenter/model/dto/ResHandledExportDTO.java | 44 --- .../model/dto/ResMySubmittedExportDTO.java | 41 --- .../model/po/TodoCenterStatisticsPO.java | 2 +- .../api/todocenter/model/vo/NotSealedInfoVO.java | 20 -- .../service/impl/StatisticsServiceImpl.java | 9 +- .../todocenter/service/impl/TodoServiceImpl.java | 5 +- .../hz/pm/api/todocenter/util/BuildUserUtils.java | 56 +++ .../com/hz/pm/api/todocenter/util/ProcessUtil.java | 46 +++ .../hz/pm/api/todocenter/utils/BuildUserUtils.java | 56 --- .../hz/pm/api/todocenter/utils/ProcessUtil.java | 46 --- hz-pm-api/src/main/resources/application-dev.yml | 13 +- hz-pm-api/src/main/resources/application-prod.yml | 22 ++ 97 files changed, 642 insertions(+), 4083 deletions(-) create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/config/ThreadPoolUtilProperties.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.xml create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/gov/contants/BizProjectContant.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IRSAPIRequest.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/BuildUserUtils.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/ProcessUtil.java diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/config/ThreadPoolUtilProperties.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/config/ThreadPoolUtilProperties.java new file mode 100644 index 0000000..0a9efec --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/config/ThreadPoolUtilProperties.java @@ -0,0 +1,46 @@ +package com.hz.pm.api.common.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; +import org.springframework.stereotype.Component; + +/** + *

+ * ThreadPoolUtilProperties + *

+ * + * @author WendyYang + * @since 23:40 2024/8/23 + */ +@Data +@Component +@ConfigurationProperties(prefix = "thread-pool-util") +public class ThreadPoolUtilProperties { + + @NestedConfigurationProperty + private ThreadPoolProperties request; + + @NestedConfigurationProperty + private ThreadPoolProperties scheduler; + + @Data + public static class ThreadPoolProperties { + + private Integer corePoolSize; + + private Integer maxPoolSize; + + private String threadNamePrefix = "thread-pool-util-"; + + private Boolean allowCoreThreadTimeOut = false; + + private Boolean waitForTasksToCompleteOnShutdown = true; + + private Integer queueCapacity; + + private Integer keepAliveSeconds; + + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/basic/AbstractRegionLimitHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/basic/AbstractRegionLimitHelper.java index 3562c5e..0e47ae6 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/basic/AbstractRegionLimitHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/basic/AbstractRegionLimitHelper.java @@ -3,8 +3,6 @@ package com.hz.pm.api.common.helper.basic; import com.hz.pm.api.common.helper.RegionCacheHelper; import com.hz.pm.api.common.helper.RegionLimitHelper; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; -import com.hz.pm.api.sys.service.IRegionService; -import com.hz.pm.api.user.service.IUserInfoService; import lombok.AllArgsConstructor; /** @@ -20,7 +18,5 @@ public abstract class AbstractRegionLimitHelper implements RegionLimitHelper { protected final RegionCacheHelper regionCache; protected final IExpertUserFullInfoService expertUserFullInfoService; - protected final IUserInfoService iUserInfoService; - protected final IRegionService regionService; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/RegionLimitHelperImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/RegionLimitHelperImpl.java index 215967f..a6263d3 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/RegionLimitHelperImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/RegionLimitHelperImpl.java @@ -23,9 +23,9 @@ import java.util.Objects; @Component public class RegionLimitHelperImpl extends AbstractRegionLimitHelper { - public RegionLimitHelperImpl(RegionCacheHelper regionCache, IExpertUserFullInfoService expertUserFullInfoService - , IUserInfoService iUserInfoService, IRegionService regionService) { - super(regionCache, expertUserFullInfoService, iUserInfoService, regionService); + public RegionLimitHelperImpl(RegionCacheHelper regionCache, + IExpertUserFullInfoService expertUserFullInfoService) { + super(regionCache, expertUserFullInfoService); } public static Boolean contains(Integer adminRegionLevel, List adminAllContainsRegionCodes diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java deleted file mode 100644 index 2df8600..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hz.pm.api.common.model; - -import lombok.Data; - -@Data -public class ZwddTokenUser { - private Long accountId; - - private String employeeCode; - - private String employeeName; - - private String mobile; - - private Long tenantId; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java deleted file mode 100644 index 17c4eaa..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hz.pm.api.common.model.constant; - -/** - * 浙政钉常量 - * - * @author CMM - * @since 2023/02/01 14:49 - */ -public interface DingConst { - /** - * 工作通知 - */ - String WORKING_NOTICE = "/message/workNotification"; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java deleted file mode 100644 index 87e9e93..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.hz.pm.api.common.model.constant; - -import java.math.BigDecimal; - -/** - * 项目申报表单数据常量key - * @return - * @author CMM - * @since 2023/01/19 10:31 - */ -public interface ProjectDeclareConst { - - /** - * 基本信息 - */ - class BasicInformation { - // 项目名称 - public static final String PROJECT_NAME = "projectName"; - // 是否一地创新全省共享项目 - public static final String INNOVATION_SHARING_PROJECT = "innovationSharingProject"; - // 是否临时增补 - public static final String TEMPORARY_SUPPLEMENT = "temporarySupplement"; - // 项目负责人 - public static final String PROJECT_LEADER = "projectLeader"; - // 项目负责人手机号 - public static final String PROJECT_LEADER_PHONE_NUMBER = "projectLeaderPhoneNumber"; - // 项目联系人 - public static final String PROJECT_CONTACT = "projectContact"; - // 项目联系人手机号 - public static final String PROJECT_CONTACT_PHONE_NUMBER = "projectContactPhoneNumber"; - // 建设单位 - public static final String CONSTRUCTION_UNIT = "constructionUnit"; - // 建设单位统一信用代码 - public static final String CONSTRUCTION_UNIT_UNIFIED_CREDIT_CODE = "constructionUnitUnifiedCreditCode"; - // 项目类型 - public static final String PROJECT_TYPE = "projectType"; - // 是否首次新建 - public static final String FIRST_NEW_CONSTRUCTION = "firstNewConstruction"; - // 预算年度 - public static final String BUDGET_YEAR = "projectYear"; - // 建设开始时间 - public static final String CONSTRUCTION_START_TIME = "constructionStartTime"; - // 建设结束时间 - public static final String CONSTRUCTION_END_TIME = "constructionEndTime"; - // 四大体系 - public static final String FOUR_SYSTEM = "fourSystem"; - // 是否数字化改革项目 - public static final String DIGITAL_REFORM_PROJECT = "digitalReformProject"; - // 建设层级 - public static final String CONSTRUCTION_HIERARCHY = "constructionHierarchy"; - // 立项依据材料 - public static final String PROJECT_BASIS_MATERIAL = "projectBasisMaterial"; - // 发改编码 - public static final String CHANGE_CODE = "changeCode"; - // 财政编码 - public static final String FISCAL_CODE = "fiscalCode"; - // 是否上云 - public static final String ON_CLOUD = "onCloud"; - // 项目简介 - public static final String PROJECT_INTRODUCTION = "projectIntroduction"; - } - - /** - * 资金申报情况 - */ - class FundDeclareInfo { - // 申报金额 - public static final String DECLARE_AMOUNT = "declareAmount"; - // 自有资金 - public static final String OWN_FUND = "ownFund"; - // 政府投资-本级财政资金 - public static final String GOVERNMENT_INVESTMENT_SAME_LEVEL_FUND = "governmentInvestmentSameLevelFund"; - // 政府投资-上级补助资金 - public static final String GOVERNMENT_INVESTMENT_SUPERIOR_FUND = "governmentInvestmentSuperiorFund"; - // 银行贷款 - public static final String BANK_LOAN = "bankLoan"; - // 其他资金 - public static final String OTHER_FUND = "otherFund"; - } - - /** - * 总投资分配情况 - */ - class TotalInvestmentAllocations { - // 软件开发 - public static final String SOFTWARE_DEVELOPMENT = "softwareDevelopment"; - // 云资源、硬件配置 - public static final String CLOUD_RESOURCE_HARDWARE_CONFIGURATION = "cloudResourceHardwareConfiguration"; - // 第三方服务 - public static final String THIRD_PARTY_SERVICE = "thirdPartyService"; - } - /** - * 年度支付计划 - */ - class AnnualPaymentPlan { - // 年度支付金额 - public static final String ANNUAL_PAYMENT_AMOUNT = "annualPaymentAmount"; - // 自有资金 - public static final String OWN_FUND = "ownFund"; - // 政府投资-本级财政资金 - public static final String GOVERNMENT_INVESTMENT_SAME_LEVEL_FUND = "governmentInvestmentSameLevelFund"; - // 政府投资-上级补助资金 - public static final String GOVERNMENT_INVESTMENT_SUPERIOR_FUND = "governmentInvestmentSuperiorFund"; - // 银行贷款 - public static final String BANK_LOAN = "bankLoan"; - // 其他 - public static final String OTHER = "other"; - } - /** - * 核心业务 - */ - class CoreBusiness { - - } - /** - * 安全投入 - */ - class SafetyInput { - // 投入项 - public static final String INPUT_ITEM = "inputItem"; - // 内容描述 - public static final String CONTENT_DESCRIPTION = "contentDescription"; - // 金额 - public static final String AMOUNT = "amount"; - } - /** - * 工程形象进度 - */ - class ProjectImageProgress { - // 第一季度 - public static final String FIRST_QUARTER = "firstQuarter"; - // 第二季度 - public static final String SECOND_QUARTER = "secondQuarter"; - // 第三季度 - public static final String THIRD_QUARTER = "thirdQuarter"; - // 第四季度 - public static final String FOURTH_QUARTER = "fourthQuarter"; - } - /** - * 附件 - */ - class Appendix { - - } - /** - * 备注 - */ - class Remark { - - } - /** - * 应用信息 - */ - class ApplicationInformation { - - } - - class Number { - public static final BigDecimal DECLARE_AMOUNT_JUDGEMENT = BigDecimal.valueOf(1000); - - //区县是500万 - public static final BigDecimal DECLARE_COUNTY_AMOUNT_JUDGEMENT = BigDecimal.valueOf(500); - - public static final Integer COUNTRY_BUILD_LEVEL = 1; - public static final Integer PROVINCE_BUILD_LEVEL = 2; - public static final Integer PROVINCE_SELF_BUILD_LEVEL = 3; - public static final Integer CITY_BUILD_LEVEL = 4; - public static final Integer CITY_SELF_BUILD_LEVEL = 5; - public static final Integer DISTRICTS_COUNTRIES_BUILD_LEVEL = 6; - public static final Integer VILLAGES_TOWNS_BUILD_LEVEL = 7; - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java deleted file mode 100644 index 1bf8c1f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.hz.pm.api.common.model.entity; - -import com.alibaba.excel.annotation.ExcelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * 待办中心待我处理项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor - -public class ExcelExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目ID") - private Long id; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("行政区划编码") - private String areaCode; - - @ExcelProperty("行政区划名称") - private String area; - - @ExcelProperty("项目负责人") - private String responsibleMan; - - @ExcelProperty("项目负责人手机号") - private String responsibleManMobile; - - @ExcelProperty("项目联系人") - private String contactName; - - @ExcelProperty("项目联系人手机号") - private String contactPhone; - - @ExcelProperty("上级业务主管单位") - private String higherSuperOrg; - - @ExcelProperty("上级主管单位浙政钉ID") - private String higherSuperOrgCode; - - @ExcelProperty("本级主管部门") - private String superOrg; - - @ExcelProperty("本级主管部门浙政钉ID") - private String superOrgCode; - - @ExcelProperty("建设单位名称") - private String buildOrgName; - - @ExcelProperty("建设单位浙政钉ID") - private String buildOrgZheJiangGovDingId; - - @ExcelProperty("建设单位统一信用代码") - private String buildOrgCode; - - @ExcelProperty("项目类型") - private Integer projectType; - - @ExcelProperty("是否首次新建") - private Integer isFirst; - - @ExcelProperty("关联应用") - private String relatedExistsApplication; - - @ExcelProperty("关联应用IRS编码") - private String relatedExistsApplicationCode; - - @ExcelProperty("申报金额(万元)") - private BigDecimal declareAmount; - - @ExcelProperty("批复金额") - private BigDecimal approvedTotalInvestmentIncrease; - - @ExcelProperty("预算来源") - private String budgetSource; - - @ExcelProperty("预算年度") - private Integer projectYear; - - @ExcelProperty("项目简介") - private String projectIntroduction; - - @ExcelProperty("立项依据") - private String buildBasis; - - @ExcelProperty("建设层级") - private String buildLevel; - - @ExcelProperty("发改编码") - private String developCode; - - @ExcelProperty("财政编码") - private String financialCode; - - @ExcelProperty("信息是否有效") - private Boolean informationValidity; - - @ExcelProperty("是否数字化改革项目") - private Integer isDigitalReform; - - @ExcelProperty("综合应用领域") - private String bizDomain; - - @ExcelProperty("是否上云") - private Integer isCloud; - - @ExcelProperty("云类型") - private String cloudType; - - @ExcelProperty("四大体系") - private Integer fourSystems; - - @ExcelProperty("是否临时增补") - private Integer isTemporaryAugment; - - @ExcelProperty("等保级别") - private Integer protectionLevel; - - @ExcelProperty("是否密评 0:否 1:是") - private Integer isSecretComments; - - @ExcelProperty("业务编号") - private String businessNumber; - - @ExcelProperty("业务名称") - private String businessName; - - @ExcelProperty("单位名称") - private String orgName; - - @ExcelProperty("软件开发(万元)") - private BigDecimal softwareDevelopmentAmount; - - @ExcelProperty("云资源、硬件购置(万元)") - private BigDecimal cloudHardwarePurchaseAmount; - - @ExcelProperty("第三方服务(万元)") - private BigDecimal thirdPartyAmount; - - @ExcelProperty("投入项") - private String safetyInputTitle; - - @ExcelProperty("内容描述") - private String safetyInputDescribe; - - @ExcelProperty("金额(万元)") - private BigDecimal safetyInputAmount; - - @ExcelProperty("年度支付金额(万元)") - private BigDecimal annualPlanAmount; - - @ExcelProperty("自有资金(万元)") - private BigDecimal annualPlanHaveAmount; - - @ExcelProperty("政府投资-本级财政资金(万元)") - private BigDecimal declareGovOwnFinanceAmount; - - @ExcelProperty("政府投资-上级补助资金(万元)") - private BigDecimal declareGovSuperiorFinanceAmount; - - @ExcelProperty("银行贷款(万元)") - private BigDecimal declareBankLendingAmount; - - @ExcelProperty("其它资金(万元)") - private BigDecimal declareOtherAmount; - - @ExcelProperty("第一季度") - private String engineeringSpeedOne; - - @ExcelProperty("第二季度") - private String engineeringSpeedTwo; - - @ExcelProperty("第三季度") - private String engineeringSpeedThree; - - @ExcelProperty("第四季度") - private String engineeringSpeedFour; - - @ExcelProperty("初步方案") - private String preliminaryPlanFile; - - @ExcelProperty("附件-佐证材料") - private String supportingMaterialsFile; - - @ExcelProperty("备注") - private String projectRemarks; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java deleted file mode 100644 index ddcdc18..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.hz.pm.api.common.model.entity; - -import lombok.AllArgsConstructor; -import lombok.Data; - -import java.util.Collection; - -/** - *

- * ViewRegionDTO - *

- * - * @author WendyYang - * @since 2023/4/27 - **/ -@Data -@AllArgsConstructor -public class ViewRegionDTO { - - private Collection regions; - - private Integer regionLevel; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java deleted file mode 100644 index 30e9361..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.hz.pm.api.common.util; - -import org.springframework.core.io.InputStreamResource; - -import java.io.InputStream; - -public class CommonInputStreamResource extends InputStreamResource { - /*** - * 文件長度 - */ - private int length; - /*** - * 文件名稱 - */ - private String fileName; - public CommonInputStreamResource(InputStream inputStream) { - super(inputStream); - } - public CommonInputStreamResource(InputStream inputStream, int length,String fileName) { - super(inputStream); - this.length = length; - this.fileName = fileName; - } - /** - * 覆写父类方法 - * 如果不重写这个方法,并且文件有一定大小,那么服务端会出现异常 - * {@code The multi-part request contained parameter data (excluding uploaded files) that exceeded} - * - * @return - */ - @Override - public String getFilename() { - return this.fileName; - } - /** - * 覆写父类 contentLength 方法 - * 因为 {@link org.springframework.core.io.AbstractResource#contentLength()}方法会重新读取一遍文件, - * 而上传文件时,restTemplate 会通过这个方法获取大小。然后当真正需要读取内容的时候,发现已经读完,会报如下错误。 - * - * java.lang.IllegalStateException: InputStream has already been read - do not use InputStreamResource if a stream needs to be read multiple times - * at org.springframework.core.io.InputStreamResource.getInputStream(InputStreamResource.java:96) - * - *

- * ref:com.amazonaws.services.s3.model.S3ObjectInputStream#available() - * - * @return - */ - @Override - public long contentLength() { - int estimate = length; - return estimate == 0 ? 1 : estimate; - } -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ThreadPoolUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ThreadPoolUtil.java index d8f3c5a..cd8584a 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ThreadPoolUtil.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ThreadPoolUtil.java @@ -1,5 +1,9 @@ package com.hz.pm.api.common.util; +import cn.hutool.extra.spring.SpringUtil; +import com.hz.pm.api.common.config.ThreadPoolUtilProperties; +import com.hz.pm.api.common.config.ThreadPoolUtilProperties.ThreadPoolProperties; +import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; @@ -13,6 +17,7 @@ import java.util.concurrent.ThreadPoolExecutor; * @author WendyYang * @since 2023/10/27 **/ +@Slf4j public class ThreadPoolUtil { private ThreadPoolUtil() { @@ -22,22 +27,26 @@ public class ThreadPoolUtil { public static final ThreadPoolTaskScheduler SCHEDULER; static { + ThreadPoolUtilProperties properties = SpringUtil.getBean(ThreadPoolUtilProperties.class); + log.info("ThreadPoolUtilProperties:{}", properties); + ThreadPoolProperties requestProps = properties.getRequest(); REQUEST = new MDCThreadPoolTaskExecutor(); - REQUEST.setCorePoolSize(5); - REQUEST.setMaxPoolSize(15); - REQUEST.setQueueCapacity(300); + REQUEST.setCorePoolSize(requestProps.getCorePoolSize()); + REQUEST.setMaxPoolSize(requestProps.getMaxPoolSize()); + REQUEST.setQueueCapacity(requestProps.getQueueCapacity()); REQUEST.setThreadPriority(Thread.NORM_PRIORITY); - REQUEST.setKeepAliveSeconds(120); - REQUEST.setThreadNamePrefix("requestAsyncExecutor-"); + REQUEST.setAllowCoreThreadTimeOut(requestProps.getAllowCoreThreadTimeOut()); + REQUEST.setWaitForTasksToCompleteOnShutdown(requestProps.getWaitForTasksToCompleteOnShutdown()); + REQUEST.setKeepAliveSeconds(requestProps.getKeepAliveSeconds()); + REQUEST.setThreadNamePrefix(requestProps.getThreadNamePrefix()); REQUEST.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); REQUEST.initialize(); - } - - static { + ThreadPoolProperties schedulerProps = properties.getScheduler(); SCHEDULER = new MDCThreadPoolTaskScheduler(); - SCHEDULER.setPoolSize(5); + SCHEDULER.setThreadNamePrefix(schedulerProps.getThreadNamePrefix()); + SCHEDULER.setPoolSize(schedulerProps.getCorePoolSize()); SCHEDULER.setThreadPriority(Thread.NORM_PRIORITY - 1); - SCHEDULER.setWaitForTasksToCompleteOnShutdown(true); + SCHEDULER.setWaitForTasksToCompleteOnShutdown(schedulerProps.getWaitForTasksToCompleteOnShutdown()); SCHEDULER.setThreadNamePrefix("scheduler-"); SCHEDULER.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); SCHEDULER.initialize(); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java deleted file mode 100644 index b526836..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hz.pm.api.dashboard.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -import java.util.Objects; - -@Getter -@AllArgsConstructor -@NoArgsConstructor -public enum CockpitAppcationTypeEnum { - /** - * 驾驶舱 应用类型 - */ - OPTIMAL(1,"最佳应用"), - MAJOR(2,"重大应用"); - - private Integer code; - private String desc; - - public static CockpitAppcationTypeEnum match(Integer code) { - if (Objects.isNull(code)) { - return null; - } - for (CockpitAppcationTypeEnum t : CockpitAppcationTypeEnum.values()) { - if (code.equals(t.getCode())) { - return t; - } - } - return null; - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java deleted file mode 100644 index d1bc596..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java +++ /dev/null @@ -1,260 +0,0 @@ -package com.hz.pm.api.dashboard.handle; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.hz.pm.api.common.helper.RegionCacheHelper; -import com.hz.pm.api.common.model.constant.RegionConst; -import com.hz.pm.api.dashboard.enums.CockpitAppcationTypeEnum; -import com.hz.pm.api.dashboard.model.entity.CockpitApplication; -import com.hz.pm.api.dashboard.model.entity.CockpitStats; -import com.hz.pm.api.dashboard.model.vo.CockpitStatsVO; -import com.hz.pm.api.dashboard.model.vo.CockpitStatsVO.*; -import com.hz.pm.api.dashboard.service.ICockpitStatsService; -import com.hz.pm.api.sys.model.dto.RegionDTO; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.time.LocalDate; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import static com.hz.pm.api.dashboard.constant.DashboardConstant.CockpitStats.NONE_YEAR; -import static com.hz.pm.api.dashboard.constant.DashboardConstant.CockpitStats.TOTAL; - -/** - * @Classname CockpitStatsHandler - * @Description - * @Date 2023/10/9 14:11 - * @Author PoffyZhang - */ -@Component -@RequiredArgsConstructor -@Slf4j -public class CockpitStatsHandler { - - private final RegionCacheHelper regionCacheHelper; - - private final ICockpitStatsService cockpitStatsService; - - private static final List YEARS; - - static { - Integer startYear = LocalDate.now().getYear() - 3; - YEARS = Stream.iterate(startYear, i -> ++i).limit(5).collect(Collectors.toList()); - } - - public CockpitStatsVO convertCockpitStats(CockpitStats cockpitStats, String regionCode, Integer year - , List appDatas) { - - CockpitStatsVO res = BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.class); - - if (Objects.isNull(cockpitStats)) { - return res; - } - //监测数据 - res.setMonitorData(convertMonitor(cockpitStats, regionCode)); - //专家数据 - res.setExpertData(convertExpertData(cockpitStats)); - //顶部数据 - res.setTopData(convertTopData(cockpitStats)); - //地图数据 - res.setMapProjectData(convertMapProjectsData(year)); - //项目项目数据 - res.setStatusProjectsData(convertStatusProjectsData(cockpitStats)); - //项目效益 优秀项目 - res.setExcellentData(convertExcellentData(cockpitStats)); - //核减信息 - res.setReduceData(convertReduceData(cockpitStats)); - //产出信息 - res.setProduceData(convertProduceData(cockpitStats)); - //绩效 - res.setPerformanceData(convertPerformanceData(cockpitStats)); - //最佳/重大应用 - res.setAppDatas(convertCockpitApps(appDatas)); - //数据质量分数 - res.setQualityDatas(convertQualityData(year)); - return res; - } - - private List convertQualityData(Integer year) { - List dataList = cockpitStatsService.list(Wrappers.lambdaQuery(CockpitStats.class) - .eq(Objects.nonNull(year), CockpitStats::getYear, year) - .eq(Objects.isNull(year), CockpitStats::getYear, NONE_YEAR) - .ne(CockpitStats::getRegionCode, TOTAL) - .orderByAsc(CockpitStats::getRegionCode)); - - if (CollUtil.isEmpty(dataList)) { - return Collections.emptyList(); - } - - return dataList.stream().map(d -> { - QualityData data = new QualityData(); - data.setRegionCode(d.getRegionCode()); - data.setRegionName(d.getRegionName()); - data.setQuality(d.getDataQuality()); - return data; - }).collect(Collectors.toList()); - } - - private Map> convertCockpitApps(List appDatas) { - Map> res = Maps.newHashMap(); - res.put(CockpitAppcationTypeEnum.OPTIMAL.getDesc(), CollUtil.isEmpty(appDatas) ? Collections.emptyList() : - appDatas.stream().filter(a -> Objects.nonNull(a) && Objects.nonNull(a.getType()) && - CockpitAppcationTypeEnum.OPTIMAL.getCode().equals(a.getType())).collect(Collectors.toList())); - res.put(CockpitAppcationTypeEnum.MAJOR.getDesc(), CollUtil.isEmpty(appDatas) ? Collections.emptyList() : - appDatas.stream().filter(a -> Objects.nonNull(a) && Objects.nonNull(a.getType()) && - CockpitAppcationTypeEnum.MAJOR.getCode().equals(a.getType())).collect(Collectors.toList())); - return res; - } - - private PerformanceData convertPerformanceData(CockpitStats cockpitStats) { - PerformanceData data = BeanUtil.copyProperties(cockpitStats, PerformanceData.class); - data.setPerformanceTops(convertTops(cockpitStats)); - return data; - } - - private List convertTops(CockpitStats cockpitStats) { - List tops = Lists.newArrayList(); - tops.add(new PerformanceTop("一星", cockpitStats.getPerformanceTop1Score(), cockpitStats.getPerformanceTop1Name())); - tops.add(new PerformanceTop("二星", cockpitStats.getPerformanceTop2Score(), cockpitStats.getPerformanceTop2Name())); - tops.add(new PerformanceTop("三星", cockpitStats.getPerformanceTop3Score(), cockpitStats.getPerformanceTop3Name())); - tops.add(new PerformanceTop("四星", cockpitStats.getPerformanceTop4Score(), cockpitStats.getPerformanceTop4Name())); - tops.add(new PerformanceTop("五星", cockpitStats.getPerformanceTop5Score(), cockpitStats.getPerformanceTop5Name())); - return tops; - } - - private CockpitStatsVO.ProduceData convertProduceData(CockpitStats cockpitStats) { - return BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.ProduceData.class); - } - - private CockpitStatsVO.ReduceData convertReduceData(CockpitStats cockpitStats) { - CockpitStatsVO.ReduceData data = BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.ReduceData.class); - data.setAmountComparisonCharts(convertAmountComparisonChart(cockpitStats)); - return data; - } - - private List convertAmountComparisonChart(CockpitStats cockpitStats) { - List res = Lists.newArrayList(); - res.add(new AmountComparisonChart("申报", cockpitStats.getDeclaredAmountApprove(), cockpitStats.getApprovalAmountApprove(), cockpitStats.getDifferenceApprove())); - res.add(new AmountComparisonChart("批复", cockpitStats.getDeclaredAmountApproval(), cockpitStats.getApprovalAmountApproval(), cockpitStats.getDifferenceApproval())); - res.add(new AmountComparisonChart("合同", cockpitStats.getDeclaredAmountContract(), cockpitStats.getApprovalAmountContract(), cockpitStats.getDifferenceContract())); - return res; - } - - private CockpitStatsVO.ExcellentData convertExcellentData(CockpitStats cockpitStats) { - CockpitStatsVO.ExcellentData data = BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.ExcellentData.class); - data.setExcellentProjects(Lists.newArrayList()); - return data; - } - - private CockpitStatsVO.StatusProjectsData convertStatusProjectsData(CockpitStats cockpitStats) { - return BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.StatusProjectsData.class); - } - - private List convertMapProjectsData(Integer year) { - List mapProjectsDatas = Lists.newArrayList(); - List regions = regionCacheHelper.listChildren(RegionConst.RC_HZ, RegionConst.RL_CITY); - regions = regions.stream().filter(r -> r.getRegionLevel() != 2).sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); - - List cockpitStatsAll = cockpitStatsService.list(Wrappers.lambdaQuery(CockpitStats.class) - .eq(Objects.nonNull(year), CockpitStats::getYear, year) - .eq(Objects.isNull(year), CockpitStats::getYear, NONE_YEAR)); - Map totalMap = cockpitStatsAll.stream() - .filter(c -> Objects.nonNull(c.getRegionCode()) && Objects.nonNull(c.getProjectsTotal())) - .collect(Collectors.toMap(CockpitStats::getRegionCode, CockpitStats::getProjectsTotal)); - - for (RegionDTO region : regions) { - CockpitStatsVO.MapProjectsData mapProjectsData = new CockpitStatsVO.MapProjectsData(); - mapProjectsData.setRegionCode(region.getRegionCode()); - mapProjectsData.setRegionName(region.getRegionName()); - mapProjectsData.setProjectsNum(totalMap.getOrDefault(mapProjectsData.getRegionCode(), 0)); - mapProjectsDatas.add(mapProjectsData); - } - return mapProjectsDatas; - } - - private CockpitStatsVO.TopData convertTopData(CockpitStats cockpitStats) { - return BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.TopData.class); - } - - private CockpitStatsVO.Expert convertExpertData(CockpitStats cockpitStats) { - CockpitStatsVO.Expert expert = BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.Expert.class); - expert.setExpertRegionData(buildExpertRegionData(cockpitStats)); - return expert; - } - - private List buildExpertRegionData(CockpitStats cockpitStats) { - List regionData = Lists.newArrayList(); - List regions = regionCacheHelper.listChildren(RegionConst.RC_HZ, RegionConst.RL_CITY); - regions = regions.stream().filter(r -> r.getRegionLevel() != 2).sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); - - List cs = cockpitStatsService.list(); - Map csMap = cs.stream().collect(Collectors.toMap(c -> c.getRegionCode() + c.getYear(), CockpitStats::getExpertTotalNum)); - for (RegionDTO region : regions) { - CockpitStatsVO.ExpertRegion expertRegion = new CockpitStatsVO.ExpertRegion(); - expertRegion.setRegionCode(region.getRegionCode()); - expertRegion.setRegionName(region.getRegionName()); - expertRegion.setExpertNum(csMap.getOrDefault(region.getRegionCode() + 0, 0)); - regionData.add(expertRegion); - } - return regionData; - } - - private CockpitStatsVO.Monitor convertMonitor(CockpitStats cockpitStats, String regionCode) { - CockpitStatsVO.Monitor monitor = BeanUtil.copyProperties(cockpitStats, CockpitStatsVO.Monitor.class); - monitor.setPasswordGradeCharts(buildPasswordGradeCharts(cockpitStats)); - monitor.setSecrecyGradeCharts(buildSecrecyGradeCharts(cockpitStats)); - monitor.setMonitorSafetyInputRate(computeSafetyRate(regionCode)); - return monitor; - } - - /** - * 安全投入 比 图 - * - * @param regionCode - * @return - */ - private List computeSafetyRate(String regionCode) { - List cocks = cockpitStatsService.list(Wrappers.lambdaQuery(CockpitStats.class) - .eq(StringUtils.isNotBlank(regionCode), CockpitStats::getRegionCode, regionCode) - .eq(StringUtils.isBlank(regionCode), CockpitStats::getRegionCode, TOTAL) - .in(CockpitStats::getYear, YEARS) - .orderByAsc(CockpitStats::getYear)); - return cocks.stream().map(c -> { - CockpitStatsVO.SafetyInput safetyInput = new CockpitStatsVO.SafetyInput(); - safetyInput.setYear(c.getYear()); - safetyInput.setRate(Objects.nonNull(c.getMonitorDeclaredAmount()) && c.getMonitorDeclaredAmount().compareTo(BigDecimal.ZERO) > 0 ? - c.getMonitorSafetyInputAmount().multiply(BigDecimal.valueOf(100)).divide(c.getMonitorDeclaredAmount(), 2, RoundingMode.CEILING) : BigDecimal.ZERO); - return safetyInput; - }).collect(Collectors.toList()); - } - - private List buildSecrecyGradeCharts(CockpitStats cockpitStats) { - List chars = Lists.newArrayList(); - chars.add(new SecrecyGradeChart(1, cockpitStats.getMonitorSecrecyGrade1Num())); - chars.add(new SecrecyGradeChart(2, cockpitStats.getMonitorSecrecyGrade2Num())); - chars.add(new SecrecyGradeChart(3, cockpitStats.getMonitorSecrecyGrade3Num())); - chars.add(new SecrecyGradeChart(4, cockpitStats.getMonitorSecrecyGrade4Num())); - chars.add(new SecrecyGradeChart(5, cockpitStats.getMonitorSecrecyGrade5Num())); - return chars; - } - - private List buildPasswordGradeCharts(CockpitStats cockpitStats) { - List chars = Lists.newArrayList(); - chars.add(new PasswordGradeChart(1, cockpitStats.getMonitorPasswordGrade1Num())); - chars.add(new PasswordGradeChart(2, cockpitStats.getMonitorPasswordGrade2Num())); - chars.add(new PasswordGradeChart(3, cockpitStats.getMonitorPasswordGrade3Num())); - chars.add(new PasswordGradeChart(4, cockpitStats.getMonitorPasswordGrade4Num())); - chars.add(new PasswordGradeChart(5, cockpitStats.getMonitorPasswordGrade5Num())); - return chars; - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java deleted file mode 100644 index 19a4a85..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.hz.pm.api.dashboard.manage; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hz.pm.api.common.model.constant.BizConst; -import com.hz.pm.api.dashboard.constant.DashboardConstant; -import com.hz.pm.api.dashboard.handle.CockpitStatsHandler; -import com.hz.pm.api.dashboard.model.dto.CockpitApplicationDTO; -import com.hz.pm.api.dashboard.model.dto.CockpitStatsSaveDTO; -import com.hz.pm.api.dashboard.model.entity.CockpitApplication; -import com.hz.pm.api.dashboard.model.entity.CockpitStats; -import com.hz.pm.api.dashboard.model.vo.CockpitStatsVO; -import com.hz.pm.api.dashboard.service.ICockpitApplicationService; -import com.hz.pm.api.dashboard.service.ICockpitStatsService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * @Classname CockpitStatsManage - * @Description - * @Date 2023/10/11 17:44 - * @Author PoffyZhang - */ -@Component -@RequiredArgsConstructor -@Slf4j -public class CockpitStatsManage { - - private final ICockpitStatsService cockpitStatsService; - - private final CockpitStatsHandler convertCockpitStats; - - private final ICockpitApplicationService cockpitApplicationService; - - /** - * 驾驶舱 统计数据 - * @param regionCode - * @param year - * @return - */ - public CockpitStatsVO getData(String regionCode, Integer year) { - CockpitStats cockpitStats = cockpitStatsService.getOne(Wrappers.lambdaQuery(CockpitStats.class) - .eq(StringUtils.isNotBlank(regionCode), CockpitStats::getRegionCode, regionCode) - .eq(StringUtils.isBlank(regionCode), CockpitStats::getRegionCode, DashboardConstant.CockpitStats.TOTAL) - .eq(Objects.nonNull(year), CockpitStats::getYear, year) - .eq(Objects.isNull(year), CockpitStats::getYear, DashboardConstant.CockpitStats.NONE_YEAR) - .last(BizConst.LIMIT_1)); - - if(Objects.isNull(cockpitStats)){ - return new CockpitStatsVO(); - } - - List aps = cockpitApplicationService - .list(Wrappers.lambdaQuery(CockpitApplication.class) - .orderByAsc(CockpitApplication::getCreateOn)); - - return convertCockpitStats.convertCockpitStats(cockpitStats,regionCode,year,aps); - } - - public void save(List saves) { - for(CockpitStatsSaveDTO save : saves){ - List cockpitStatsList = cockpitStatsService.list(Wrappers.lambdaUpdate(CockpitStats.class) - .eq(Objects.nonNull(save.getRegionCode()), CockpitStats::getRegionCode, save.getRegionCode()) - .eq(Objects.nonNull(save.getYear()), CockpitStats::getYear, save.getYear())); - if(CollUtil.isNotEmpty(cockpitStatsList)){ - for(CockpitStats cockpitStats : cockpitStatsList){ - BeanUtil.copyProperties(save,cockpitStats, CopyOptions.create().ignoreNullValue()); - cockpitStatsService.updateById(cockpitStats); - } - } - - if(Objects.nonNull(save.getCockpitApplications())){ - cockpitApplicationService.remove(Wrappers.lambdaQuery(CockpitApplication.class)); - - List cockpitApplications = save.getCockpitApplications(); - if(CollUtil.isNotEmpty(cockpitApplications)){ - List applications = cockpitApplications.stream() - .map(a -> BeanUtil.copyProperties(a,CockpitApplication.class)) - .collect(Collectors.toList()); - cockpitApplicationService.saveBatch(applications); - } - } - } - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java deleted file mode 100644 index fe135e0..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import com.hz.pm.api.dashboard.constant.ChartTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:02 - */ - -@Data -@ApiModel("图表数据") -public class AnalysisChart { - - @ApiModelProperty("图表数据类型") - private ChartTypeEnum chartType; - - @ApiModelProperty("数据列表") - private List dataList; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java deleted file mode 100644 index 1cf441f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author liuxinxin - * @date 2023/8/2 下午2:27 - */ - -@Data -@ApiModel("分析数据基础类") -public class AnalysisData { - - @ApiModelProperty("key") - private String key; - - @ApiModelProperty("值") - private Object value; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java deleted file mode 100644 index 6449da3..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * @author liuxinxin - * @date 2023/8/4 下午3:51 - */ - -@Data -@ApiModel("单位项目数量") -public class CompanyProjectCntBO { - - @ApiModelProperty("建设单位名称") - private String buildOrgName; - - private String orgCreditCode; - - @ApiModelProperty("项目数量") - private Integer projectCnt; - - @ApiModelProperty("项目预算(批复金额总合)") - private BigDecimal approvedTotalInvestmentIncreaseSum; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java deleted file mode 100644 index 8311a65..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * @author liuxinxin - * @date 2023/8/4 下午4:12 - */ - -@Data -@ApiModel("项目预算") -public class ProjectATIISBO { - - @ApiModelProperty("项目id") - private Long projectId; - - @ApiModelProperty("项目编号") - private String projectCode; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("批复金额") - private BigDecimal approvedTotalInvestmentIncrease; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java deleted file mode 100644 index 1ffa8c9..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * @author liuxinxin - * @date 2023/7/27 下午3:24 - */ - -@Data -@ApiModel("查询年份起止BO") -public class QueryTimeYearBO { - - @ApiModelProperty("开始年份时间") - private LocalDateTime startYearTime; - - @ApiModelProperty("截止年份时间") - private LocalDateTime endYearTime; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java deleted file mode 100644 index 3aa2cd4..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:57 - */ - -@Data -@ApiModel("明星专家") -public class StarExpertBO { - - @ApiModelProperty("专家姓名") - private String expertName; - - @ApiModelProperty("专家id") - private Long expertId; - - @ApiModelProperty("履职平均分") - private Double averagePerformanceScore; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java deleted file mode 100644 index 720c91e..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.hz.pm.api.dashboard.model.basic; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author liuxinxin - * @date 2023/8/4 下午4:27 - */ - -@Data -@ApiModel("年度走势BO") -public class YearTrendBO { - - @ApiModelProperty("年份") - private Integer year; - - @ApiModelProperty("项目总数") - private Integer projectCnt; - - /** - * 建设类项目总数 - */ - - /** - * 运维类项目总数 - */ - - /** - * 建设类项目批复金额 - */ - - /** - * 运维类项目批复金额 - */ - - /** - * 资金核定率 - */ - - /** - * 立项率 - */ -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java deleted file mode 100644 index a1c0f55..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hz.pm.api.dashboard.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -@Data -@ApiModel(value = "驾驶舱统计应用对象", description = "") -public class CockpitApplicationDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("应用名称") - private String applicationName; - - @ApiModelProperty("介绍") - private String introduce; - - @ApiModelProperty("年份") - private LocalDateTime createOn; - - @ApiModelProperty("建设单位") - private String buildOrgName; - - @ApiModelProperty("金额") - private BigDecimal amount; - - @ApiModelProperty("标签") - private String tags; - - @ApiModelProperty("类型 1最佳应用 2重大应用") - private Integer type; - -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java deleted file mode 100644 index 9940ac8..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java +++ /dev/null @@ -1,257 +0,0 @@ -package com.hz.pm.api.dashboard.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; - -@Data -@ApiModel(value = "CockpitStatsSaveDTO", description = "") -public class CockpitStatsSaveDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("区域code") - private String regionCode; - - @ApiModelProperty("区域名") - private String regionName; - - @ApiModelProperty("年份") - private Integer year; - - @ApiModelProperty("年份") - private LocalDateTime createOn; - - @ApiModelProperty("项目监控-超期建设项目数") - private Integer monitorOverdueConstructionProjectsNum; - - @ApiModelProperty("项目监控-超期建设项目-增长比例") - private String monitorOverdueConstructionProjectsRise; - - @ApiModelProperty("项目监控-环节滞后项目数") - private Integer monitorLaggingProjectsNum; - - @ApiModelProperty("项目监控-环节滞后项目-增长比例") - private String monitorLaggingProjectsRise; - - @ApiModelProperty("项目监控-预审驳回项目数") - private Integer monitorRejectedPreReviewProjectsNum; - - @ApiModelProperty("项目监控-预审驳回项目-增长比例") - private String monitorRejectedPreReviewProjectsRise; - - @ApiModelProperty("项目监控-评审驳回项目数") - private Integer monitorRejectedApproveProjectsNum; - - @ApiModelProperty("项目监控-评审驳回项目-增长比例") - private String monitorRejectedApproveProjectsRise; - @ApiModelProperty("项目监控-验收条件未达标") - private Integer monitorAcceptConditionsNotStandardsNum; - - @ApiModelProperty("项目监控-验收条件未达标-增长比例") - private String monitorAcceptConditionsNotStandardsRise; - - @ApiModelProperty("项目监控-安全投入金额(用于算安全投入占比)") - private BigDecimal monitorSafetyInputAmount; - - @ApiModelProperty("项目监控-总申报金额(用于算安全投入占比)") - private BigDecimal monitorDeclaredAmount; - - @ApiModelProperty("项目监控-等保1级数量") - private Integer monitorSecrecyGrade1Num; - - @ApiModelProperty("项目监控-等保2级数量") - private Integer monitorSecrecyGrade2Num; - - @ApiModelProperty("项目监控-等保3级数量") - private Integer monitorSecrecyGrade3Num; - - @ApiModelProperty("项目监控-等保4级数量") - private Integer monitorSecrecyGrade4Num; - - @ApiModelProperty("项目监控-等保5级数量") - private Integer monitorSecrecyGrade5Num; - - @ApiModelProperty("项目监控-密评1级数量") - private Integer monitorPasswordGrade1Num; - - @ApiModelProperty("项目监控-密评2级数量") - private Integer monitorPasswordGrade2Num; - - @ApiModelProperty("项目监控-密评3级数量") - private Integer monitorPasswordGrade3Num; - - @ApiModelProperty("项目监控-密评4级数量") - private Integer monitorPasswordGrade4Num; - - @ApiModelProperty("项目监控-密评5级数量") - private Integer monitorPasswordGrade5Num; - - @ApiModelProperty("专家-总人数") - private Integer expertTotalNum; - - @ApiModelProperty("专家-方案合理性") - private Integer expertPlanRationalityNum; - - @ApiModelProperty("专家-计数可行性评估") - private Integer expertTechnicalFeasibilityAssessmentNum; - - @ApiModelProperty("专家-信创") - private Integer expertXinchuangNum; - - @ApiModelProperty("专家-软硬件核价") - private Integer expertSoftHardPricingNum; - - @ApiModelProperty("专家-党政信息") - private Integer expertPartyGovInfoNum; - - @ApiModelProperty("专家-网络安全") - private Integer expertNetworkSecurityNum; - - @ApiModelProperty("专家-信息化专家") - private Integer expertPromotionInfoTechnologyNum; - - @ApiModelProperty("专家-财务专家") - private Integer expertFinancialNum; - - @ApiModelProperty("顶部-计划项目数") - private Integer topPlanProjectsNum; - - @ApiModelProperty("顶部-批复项目数") - private Integer topApprovalProjectsNum ; - - @ApiModelProperty("顶部-批复金额") - private BigDecimal topApprovalProjectsAmount; - - @ApiModelProperty("顶部-平均建设周期") - private Integer topAverageConstructionPeriod; - - @ApiModelProperty("顶部-在建项目数") - private Integer topOngoingProjectsNum; - - @ApiModelProperty("项目总数") - private Integer projectsTotal; - - @ApiModelProperty("项目总数-计划状态") - private Integer projectsTotalPlan; - - @ApiModelProperty("项目总数-申报状态") - private Integer projectsTotalApply; - - @ApiModelProperty("项目总数-审批状态") - private Integer projectsTotalApprove; - - @ApiModelProperty("项目总数-建设状态") - private Integer projectsTotalConstruction; - - @ApiModelProperty("项目总数-验收状态") - private Integer projectsTotalAccept; - - @ApiModelProperty("项目总数-运维状态") - private Integer projectsTotalOperation; - - @ApiModelProperty("项目总数-绩效状态") - private Integer projectsTotalPerformance; - - @ApiModelProperty("项目总数-注销状态") - private Integer projectsTotalLogOff; - - @ApiModelProperty("优秀项目-最佳应用") - private Integer excellentBestAppNum; - - @ApiModelProperty("优秀项目-重大应用") - private Integer excellentMajorAppNum; - - @ApiModelProperty("优秀项目-跨域共享数") - private Integer excellentCrossDomainSharingNum; - - @ApiModelProperty("优秀项目-跨域共享数") - private Integer excellentCrossLevelSharingNum; - - @ApiModelProperty("核减资金") - private BigDecimal reduceFundsTotal; - - @ApiModelProperty("驳回节约资金") - private BigDecimal rejectSavingsFunds; - - @ApiModelProperty("申报金额-申报状态") - private BigDecimal declaredAmountApprove; - @ApiModelProperty("批复金额-申报状态") - private BigDecimal approvalAmountApprove; - @ApiModelProperty("差额-申报状态") - private BigDecimal differenceApprove; - - @ApiModelProperty("申报金额-批复状态") - private BigDecimal declaredAmountApproval; - @ApiModelProperty("批复金额-批复状态") - private BigDecimal approvalAmountApproval; - @ApiModelProperty("差额-批复状态") - private BigDecimal differenceApproval; - - @ApiModelProperty("申报金额-合同状态") - private BigDecimal declaredAmountContract; - @ApiModelProperty("批复金额-合同状态") - private BigDecimal approvalAmountContract; - @ApiModelProperty("差额-合同状态") - private BigDecimal differenceContract; - - @ApiModelProperty("产出-应用数量") - private Integer produceAppNum; - @ApiModelProperty("产出-数据产品") - private Integer produceDataNum; - @ApiModelProperty("产出-组件数") - private Integer produceComponentNum; - @ApiModelProperty("产出-大脑要素") - private Integer produceBrainElementsNum; - @ApiModelProperty("产出-大脑要素 模型数") - private Integer produceBrainModelNum; - - @ApiModelProperty("绩效-项目总数量") - private Integer performanceTotal; - - @ApiModelProperty("绩效-未评价数量") - private Integer performanceTobeReviewTotal; - - @ApiModelProperty("绩效-已评价数量") - private Integer performanceReviewedTotal; - - @ApiModelProperty("绩效-top1分数") - private BigDecimal performanceTop1Score; - - @ApiModelProperty("绩效-top1名称") - private String performanceTop1Name; - - @ApiModelProperty("绩效-top2分数") - private BigDecimal performanceTop2Score; - - @ApiModelProperty("绩效-top2名称") - private String performanceTop2Name; - - @ApiModelProperty("绩效-top3分数") - private BigDecimal performanceTop3Score; - - @ApiModelProperty("绩效-top3名称") - private String performanceTop3Name; - - @ApiModelProperty("绩效-top4分数") - private BigDecimal performanceTop4Score; - - @ApiModelProperty("绩效-top4名称") - private String performanceTop4Name; - - @ApiModelProperty("绩效-top5分数") - private BigDecimal performanceTop5Score; - - @ApiModelProperty("绩效-top5名称") - private String performanceTop5Name; - - @ApiModelProperty("数据质量") - private BigDecimal dataQuality; - - @ApiModelProperty("数据质量") - private List cockpitApplications; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java deleted file mode 100644 index 0589ae5..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hz.pm.api.dashboard.model.po; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:51 - */ - -@Data -@ApiModel("查询年份") -public class QueryYearPO { - - @ApiModelProperty("查询年份") - private Integer year; - - @ApiModelProperty("区域编码") - private String regionCode; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java deleted file mode 100644 index 0380d0f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java +++ /dev/null @@ -1,378 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.dashboard.model.entity.CockpitApplication; -import com.hz.pm.api.portrait.model.entity.Tag; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -@Data -@ApiModel(value = "驾驶舱统计数据对象VO", description = "") -public class CockpitStatsVO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("主键") - private Long id; - - @ApiModelProperty("区域code") - private String regionCode; - - @ApiModelProperty("区域名") - private String regionName; - - @ApiModelProperty("年份") - private Integer year; - - @ApiModelProperty("年份") - private LocalDateTime createOn; - - @ApiModelProperty("项目监测数据") - private Monitor monitorData; - - @ApiModelProperty("项目专家数据") - private Expert expertData; - - @ApiModelProperty("顶部数据") - private TopData topData; - - @ApiModelProperty("地图-项目数") - private List mapProjectData; - - @ApiModelProperty("状态-项目数") - private StatusProjectsData statusProjectsData; - - @ApiModelProperty("优秀项目数据") - private ExcellentData excellentData; - - @ApiModelProperty("核减数据") - private ReduceData reduceData; - - @ApiModelProperty("产出数据") - private ProduceData produceData; - - @ApiModelProperty("绩效数据") - private PerformanceData performanceData; - - @ApiModelProperty("最佳应用or重大应用") - private Map> appDatas; - - @ApiModelProperty("数据质量区域信息") - private List qualityDatas; - - @Data - public static class Monitor { - @ApiModelProperty("项目监控-超期建设项目数") - private Integer monitorOverdueConstructionProjectsNum; - - @ApiModelProperty("项目监控-超期建设项目-增长比例") - private String monitorOverdueConstructionProjectsRise; - - @ApiModelProperty("项目监控-环节滞后项目数") - private Integer monitorLaggingProjectsNum; - - @ApiModelProperty("项目监控-环节滞后项目-增长比例") - private String monitorLaggingProjectsRise; - - @ApiModelProperty("项目监控-预审驳回项目数") - private Integer monitorRejectedPreReviewProjectsNum; - - @ApiModelProperty("项目监控-预审驳回项目-增长比例") - private String monitorRejectedPreReviewProjectsRise; - - @ApiModelProperty("项目监控-评审驳回项目数") - private Integer monitorRejectedApproveProjectsNum; - - @ApiModelProperty("项目监控-评审驳回项目-增长比例") - private String monitorRejectedApproveProjectsRise; - - @ApiModelProperty("项目监控-验收条件未达标") - private Integer monitorAcceptConditionsNotStandardsNum; - - @ApiModelProperty("项目监控-验收条件未达标-增长比例") - private String monitorAcceptConditionsNotStandardsRise; - - @ApiModelProperty("项目监控-安全投入占比 图") - private List monitorSafetyInputRate; - - @ApiModelProperty("项目监控-等保等级图") - private List secrecyGradeCharts; - - @ApiModelProperty("项目监控-密保等级图") - private List passwordGradeCharts; - } - - @Data - public static class SecrecyGradeChart { - public SecrecyGradeChart (Integer level,Integer num){ - this.level = level; - this.num = num; - } - - @ApiModelProperty("等保等级") - private Integer level; - - @ApiModelProperty("等保数量") - private Integer num; - } - - @Data - public static class PasswordGradeChart { - public PasswordGradeChart (Integer level,Integer num){ - this.level = level; - this.num = num; - } - - @ApiModelProperty("密保等级") - private Integer level; - - @ApiModelProperty("密保数量") - private Integer num; - } - - @Data - public static class SafetyInput { - private Integer year; - private BigDecimal rate; - private Integer amount; - } - - @Data - public static class Expert { - @ApiModelProperty("专家-各区域专家数") - private List expertRegionData; - - @ApiModelProperty("专家-总人数") - private Integer expertTotalNum; - - @ApiModelProperty("专家-总人数-包含这些标签的专家总人数") - private Integer specialExpertNum; - - @ApiModelProperty("专家-方案合理性 数量") - private Integer expertPlanRationalityNum; - - @ApiModelProperty("专家-计数可行性评估 数量") - private Integer expertTechnicalFeasibilityAssessmentNum; - - @ApiModelProperty("专家-信创 数量") - private Integer expertXinchuangNum; - - @ApiModelProperty("专家-软硬件核价 数量") - private Integer expertSoftHardPricingNum; - - @ApiModelProperty("专家-党政信息 数量") - private Integer expertPartyGovInfoNum; - - @ApiModelProperty("专家-网络安全 数量") - private Integer expertNetworkSecurityNum; - - @ApiModelProperty("专家-信息化专家 数量") - private Integer expertPromotionInfoTechnologyNum; - - @ApiModelProperty("专家-财务专家 数量") - private Integer expertFinancialNum; - - @ApiModelProperty("专家-信创专家 数量") - private Integer expertXinchuangOtherNum; - } - - @Data - public static class ExpertRegion { - @ApiModelProperty("区域CODE") - private String regionCode; - - @ApiModelProperty("区域名字") - private String regionName; - - @ApiModelProperty("专家数量") - private Integer expertNum; - } - - @Data - public static class TopData { - @ApiModelProperty("顶部-计划项目数") - private Integer topPlanProjectsNum; - - @ApiModelProperty("顶部-批复项目数") - private Integer topApprovalProjectsNum; - - @ApiModelProperty("顶部-批复金额") - private BigDecimal topApprovalProjectsAmount; - - @ApiModelProperty("顶部-平均建设周期") - private Integer topAverageConstructionPeriod; - - @ApiModelProperty("顶部-在建项目数") - private Integer topOngoingProjectsNum; - } - - @Data - public static class MapProjectsData { - @ApiModelProperty("区域CODE") - private String regionCode; - - @ApiModelProperty("区域名字") - private String regionName; - - @ApiModelProperty("项目数量") - private Integer projectsNum; - } - - @Data - public static class QualityData { - @ApiModelProperty("区域CODE") - private String regionCode; - - @ApiModelProperty("区域名字") - private String regionName; - - @ApiModelProperty("质量分数") - private BigDecimal quality = BigDecimal.ZERO; - } - - @Data - public static class StatusProjectsData { - @ApiModelProperty("项目总数-计划状态") - private Integer projectsTotalPlan; - - @ApiModelProperty("项目总数-申报状态") - private Integer projectsTotalApply; - - @ApiModelProperty("项目总数-审批状态") - private Integer projectsTotalApprove; - - @ApiModelProperty("项目总数-建设状态") - private Integer projectsTotalConstruction; - - @ApiModelProperty("项目总数-验收状态") - private Integer projectsTotalAccept; - - @ApiModelProperty("项目总数-运维状态") - private Integer projectsTotalOperation; - - @ApiModelProperty("项目总数-绩效状态") - private Integer projectsTotalPerformance; - - @ApiModelProperty("项目总数-注销状态") - private Integer projectsTotalLogOff; - } - - @Data - public static class ExcellentData { - @ApiModelProperty("优秀项目-最佳应用") - private Integer excellentBestAppNum; - - @ApiModelProperty("优秀项目-重大应用") - private Integer excellentMajorAppNum; - - @ApiModelProperty("优秀项目-跨域共享数") - private Integer excellentCrossDomainSharingNum; - - @ApiModelProperty("优秀项目-跨域共享数") - private Integer excellentCrossLevelSharingNum; - - @ApiModelProperty("优秀项目-列表") - private List excellentProjects; - } - - @Data - public static class ExcellentProjects { - @ApiModelProperty("项目CODE") - private String projectCode; - - @ApiModelProperty("项目名") - private String projectName; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("标签") - private List tags; - } - - @Data - public static class ReduceData { - @ApiModelProperty("核减资金") - private BigDecimal reduceFundsTotal; - - @ApiModelProperty("驳回节约资金") - private BigDecimal rejectSavingsFunds; - - @ApiModelProperty("资金对比图") - private List amountComparisonCharts; - } - - @Data - public static class AmountComparisonChart { - public AmountComparisonChart (String statusName,BigDecimal declaredAmount,BigDecimal approvalAmount,BigDecimal differenceAmount){ - this.statusName = statusName; - this.declaredAmount = declaredAmount; - this.approvalAmount = approvalAmount; - this.differenceAmount = differenceAmount; - } - - @ApiModelProperty("状态名") - private String statusName; - - @ApiModelProperty("申报金额") - private BigDecimal declaredAmount; - - @ApiModelProperty("批复金额") - private BigDecimal approvalAmount; - - @ApiModelProperty("差额") - private BigDecimal differenceAmount; - } - - @Data - public static class ProduceData { - @ApiModelProperty("产出-应用数量") - private Integer produceAppNum; - @ApiModelProperty("产出-数据产品") - private Integer produceDataNum; - @ApiModelProperty("产出-组件数") - private Integer produceComponentNum; - @ApiModelProperty("产出-大脑要素") - private Integer produceBrainElementsNum; - @ApiModelProperty("产出-大脑要素") - private Integer produceBrainModelNum; - } - - @Data - public static class PerformanceData { - @ApiModelProperty("绩效-项目总数量") - private Integer performanceTotal; - - @ApiModelProperty("绩效-未评价数量") - private Integer performanceTobeReviewTotal; - - @ApiModelProperty("绩效-已评价数量") - private Integer performanceReviewedTotal; - - @ApiModelProperty("绩效-top数据") - private List performanceTops; - } - - @Data - public static class PerformanceTop { - public PerformanceTop (String topName,BigDecimal score,String appName){ - this.topName = topName; - this.score = score; - this.appName = appName; - } - - @ApiModelProperty("绩效-top") - private String topName; - - @ApiModelProperty("分数") - private BigDecimal score; - - @ApiModelProperty("应用名称") - private String appName; - } -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java deleted file mode 100644 index eaf1dfa..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.dashboard.model.basic.AnalysisChart; -import com.hz.pm.api.dashboard.model.basic.CompanyProjectCntBO; -import com.hz.pm.api.dashboard.model.basic.ProjectATIISBO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:36 - */ - -@Data -@ApiModel("驾驶舱投资金额统计数据") -public class DashboardInvestmentSummaryVO { - - /** - * 近5年项目投资走势 - * 近5年资金核定率走势 - */ - - @ApiModelProperty("项目预算TOP5") - private List projectATIISTop5List; - - @ApiModelProperty("单位预算TOP5") - private List companyProjectATIISTop5List; - - @ApiModelProperty("各领域项目投资金额,各区域项目投资情况") - private List analysisChartList; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java deleted file mode 100644 index b9ceb9a..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.dashboard.model.basic.AnalysisChart; -import com.hz.pm.api.dashboard.model.basic.CompanyProjectCntBO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:36 - */ - -@Data -@ApiModel("项目数量驶舱统计数据") -public class DashboardProjectCntSummaryVO { - /** - * 近5年项目数量走势 - * 近5年立项率走势 - */ - - @ApiModelProperty("单位项目数量TOP5") - private List companyProjectCntTop5List; - - @ApiModelProperty("项目增补情况,各类型项目数量,各区域项目数量,各领域项目数量,各阶段项目数量") - private List analysisChartList; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java deleted file mode 100644 index e980f66..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.portrait.model.entity.Tag; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; -import java.util.Map; - -/** - * @author ZPF - * @date 2023/10/9 下午3:07 - */ - -@Data -@ApiModel("驾驶舱项目画像VO") -public class DashboardProjectPortraitVO { - - @ApiModelProperty("项目信息") - private ProtraitProjectInfoVO projectInfo; - - @ApiModelProperty("项目特征(就是标签)") - private List projectFeatures; - - @ApiModelProperty("项目产出") - private Map projectOutput; - -} - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java deleted file mode 100644 index 3a0cc34..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:37 - */ -@Data -@ApiModel("驾驶舱项目总览驶舱统计数据") -public class DashboardProjectSummaryVO { - /** - * 项目画像 - */ - - @ApiModelProperty("项目总数") - private Integer projectCnt; - - @ApiModelProperty("待立项项目数") - private Integer toBeApprovedProjectCnt; - - @ApiModelProperty("已立项项目数") - private Integer approvedProjectCnt; - - @ApiModelProperty("项目立项率") - private Double projectApprovalRate; - - @ApiModelProperty("项目申报总金额") - private BigDecimal declareAmountSum; - - @ApiModelProperty("项目批复总金额") - private BigDecimal approvedTotalInvestmentIncreaseSum; - - @ApiModelProperty("延期项目数") - private Integer delayProjectCnt; - - @ApiModelProperty("延期占比") - private Double delayProportion; - - @ApiModelProperty("项目变更数量") - private Integer changedProjectCnt; - - @ApiModelProperty("项目变更金额") - private BigDecimal changedProjectContractAmountSum; - - @ApiModelProperty("项目采购总金额") - private BigDecimal projectProcurementTotalAmount; - - // 批复总金额/申报总金额 - @ApiModelProperty("资金核定率") - private BigDecimal fundApprovalRate; - - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java deleted file mode 100644 index b3b952f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.common.model.entity.DataDTO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -@Data -@ApiModel(value = "预警统计", description = "") -public class EarlyWarningStatisticsVO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("累积报警数") - private Integer accumulatedAlarmsTotal = 0; - - @ApiModelProperty("流程累积报警数") - private Integer accumulatedAlarmsFlow = 0; - - @ApiModelProperty("填报累积报警数") - private Integer accumulatedAlarmsFilling = 0; - - @ApiModelProperty("近三年累积报警数") - private List threeYearsAlarms; - - @ApiModelProperty("当前各流程报警情况") - private List alarmsFlowsNow; - - @ApiModelProperty("当前各填报报警情况") - private List alarmsFillingNow; - - @ApiModelProperty("建设周期预警监测") - private List constructionAlarms; - - @ApiModelProperty("安全监测") - private List safetyMonitoring; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java deleted file mode 100644 index 99aed40..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.dashboard.model.basic.AnalysisChart; -import com.hz.pm.api.dashboard.model.basic.StarExpertBO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @author liuxinxin - * @date 2023/8/2 下午3:07 - */ - -@Data -@ApiModel("专家驾驶舱统计数据") -public class ExpertDashboardSummaryVO { - - @ApiModelProperty("明星专家列表") - private List starExpertList; - - @ApiModelProperty("评审次数") - private Integer meetingCnt; - - @ApiModelProperty("图表列表 各区域专家总数,学历分布,职称级别分布,各类型评审次数") - List analysisChartList; - - -} - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java deleted file mode 100644 index 53c8ea6..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.common.model.entity.DataDTO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.List; - -@Data -@ApiModel(value = "评审会议统计", description = "") -public class MeetingStatisticsVO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("评审召开总数") - private Integer meetingTotal = 0; - - @ApiModelProperty("评审通过数") - private Integer passReview = 0; - - @ApiModelProperty("评审不通过率") - private BigDecimal notPassRate = BigDecimal.ZERO; - - @ApiModelProperty("各区县召开总数") - private List regionMeetings; - - @ApiModelProperty("预审/验收 会议情况") - private List meetingTypes; - - @ApiModelProperty("各区县不通过率") - private List notPassRegionMeetings; - - @ApiModelProperty("各部门不通过top10") - private List notPassTop10; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java deleted file mode 100644 index 0c6f0fa..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.common.model.entity.DataDTO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -@Data -@ApiModel(value = "绩效统计") -public class PerformanceStatisticsVO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("当前已完成项目总数") - private Integer finishedTotalNow = 0; - - @ApiModelProperty("当前已完成自评总数") - private Integer finishedSelfNow = 0; - - @ApiModelProperty("当前已完成复评总数") - private Integer finishedReAppraisalNow = 0; - - @ApiModelProperty("当前需整改项目总数") - private Integer rectifyTotalNow = 0; - - @ApiModelProperty("是否评价") - private List regionMeetings; - - @ApiModelProperty("预审/验收 会议情况") - private List meetingTypes; - - @ApiModelProperty("各区县不通过率") - private List notPassRegionMeetings; - - @ApiModelProperty("各部门不通过top10") - private List notPassTop10; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java deleted file mode 100644 index 3a10d89..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import com.hz.pm.api.common.model.entity.DataDTO; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -@Data -@ApiModel(value = "项目统计") -public class ProjectStatisticsVO { - - @ApiModelProperty("项目计划数") - private Integer planTotal = 0; - - @ApiModelProperty("批复项目数") - private Integer approvedTotal = 0; - - @ApiModelProperty("在建项目数") - private Integer constructionTotal = 0; - - @ApiModelProperty("平均批复周期(月)") - private Integer approvalCycleAvg = 0; - - @ApiModelProperty("平均建设周期(月)") - private Integer constructionCycleAvg = 0; - - @ApiModelProperty("各阶段项目统计") - private List progresses; - - @ApiModelProperty("近三年平均批复周期") - private List threeYearsApprovalCycleAvg; - - @ApiModelProperty("近三年平均建设周期") - private List threeYearsConstructionCycleAvg; - - @ApiModelProperty("项目分布类型") - private List projectTypeDistribution; - - @ApiModelProperty("金额变更统计TOP10") - private List amountChangeTop10; - - @ApiModelProperty("项目撤销统计TOP10") - private List revokeTop10; - - @ApiModelProperty("项目终止统计TOP10") - private List terminationTop10; - - @ApiModelProperty("项目延期统计TOP10") - private List delayTop10; -} \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java deleted file mode 100644 index a723362..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigDecimal; -import java.util.List; - -/** - * @author ZPF - * @date 2023/10/9 下午3:07 - */ - -@Data -@ApiModel("驾驶舱项目画像里的项目信息VO") -public class ProtraitProjectInfoVO { - - @ApiModelProperty("项目名字") - private String projectName; - - @ApiModelProperty("项目编号") - private String projectCode; - - @ApiModelProperty("建设单位code") - private String buildOrgCode; - - @ApiModelProperty("建设单位名") - private String buildOrgName; - - @ApiModelProperty("批复金额") - private BigDecimal approvalAmount; - - @ApiModelProperty("项目预算年度") - private Integer projectYear; - - @ApiModelProperty("建设周期(月)") - private String buildCycle; - - @ApiModelProperty("项目安全投入占比") - private String safetyInputRate; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("超期情况") - private String overdueSituation; - - @ApiModelProperty("状态") - private String status; - - @ApiModelProperty("项目状态情况") - private List statusSituation; - - @ApiModelProperty("系统定位") - private String systemPosition; -} - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java deleted file mode 100644 index abe727b..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hz.pm.api.dashboard.model.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Builder; -import lombok.Data; -import java.time.LocalDateTime; - -/** - * @author ZPF - * @date 2023/10/9 下午3:07 - */ - -@Data -@Builder -@ApiModel("驾驶舱项目画像里的项目状态信息VO") -public class ProtraitProjectStatusSituationVO { - - public ProtraitProjectStatusSituationVO(){ - - } - - public ProtraitProjectStatusSituationVO(String statusName,LocalDateTime statusTime){ - this.statusName = statusName; - this.statusTime = statusTime; - } - - @ApiModelProperty("状态名") - private String statusName; - - @ApiModelProperty("状态时间节点") - private LocalDateTime statusTime; -} - diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java index 9700554..1624a45 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java @@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hz.pm.api.common.enumeration.BoolDisplayEnum; -import com.hz.pm.api.common.helper.RegionCacheHelper; import com.hz.pm.api.common.helper.RegionLimitHelper; import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.util.BizUtils; @@ -61,7 +60,6 @@ public class ExpertMetaApplyManage { private final IExpertMetaApplyService iMetaApplyService; private final IExpertDictionaryService expertDictionaryService; - private final RegionCacheHelper regionCacheHelper; private final IExpertUserFullInfoService userFullInfoService; private final DictionaryCache dictionaryCache; private final ExpertInfoService expertInfoService; @@ -126,7 +124,6 @@ public class ExpertMetaApplyManage { ExpertMetaApply expertMetaApply = iMetaApplyService.getById(applyId); Long userId = LoginUserUtil.getUserId(); // 校验专家管理员区域权限,是否可以审核当前专家申请 - // permissionCheckHelper.operationPermissionsCheck(userId, expertMetaApply.getUserId()); String applyStatus = expertMetaApply.getApplyStatus(); if (!ExpertApplyStatusEnum.PENDING_REVIEW.getKey().equals(applyStatus)) { throw BizException.wrap("apply is already processed"); @@ -159,12 +156,9 @@ public class ExpertMetaApplyManage { break; // 专家出库 case EXPERT_DELIVERY: - // ExpertDeliveryDealCmd expertDeliveryDealCmd = buildExpertDeliveryDealCmd(req, expertMetaApply.getUserId()); - // expertInfoService.expertDeliveryDeal(expertDeliveryDealCmd); break; // 长期请假 case LONG_TERM_LEAVE: - // leaveManage.leaveAuditCallback(req.getApplyResult(), applyId); break; // 专家信息审核 case EXPERT_INFO_MODIFY: diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java new file mode 100644 index 0000000..9cecb34 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java @@ -0,0 +1,16 @@ +package com.hz.pm.api.fiscal.mapper; + +import com.hz.pm.api.fiscal.entity.CompanyFiscalCode; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Lierbao + * @since 2023-02-10 + */ +public interface CompanyFiscalCodeMapper extends BaseMapper { + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml new file mode 100644 index 0000000..d50e622 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.java deleted file mode 100644 index 3f43f9e..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hz.pm.api.fiscal.mapper; - -import com.hz.pm.api.fiscal.entity.CompanyFiscalCode; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Lierbao - * @since 2023-02-10 - */ -public interface NdCompanyFiscalCodeMapper extends BaseMapper { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.xml deleted file mode 100644 index 0c5202f..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/service/impl/CompanyFiscalCodeServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/service/impl/CompanyFiscalCodeServiceImpl.java index cc1cba9..9db09ee 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/service/impl/CompanyFiscalCodeServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/fiscal/service/impl/CompanyFiscalCodeServiceImpl.java @@ -5,12 +5,11 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hz.pm.api.fiscal.entity.CompanyFiscalCode; -import com.hz.pm.api.fiscal.mapper.NdCompanyFiscalCodeMapper; +import com.hz.pm.api.fiscal.mapper.CompanyFiscalCodeMapper; import com.hz.pm.api.fiscal.service.ICompanyFiscalCodeService; import org.springframework.stereotype.Service; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -25,7 +24,7 @@ import java.util.stream.Collectors; */ @Service -public class CompanyFiscalCodeServiceImpl extends ServiceImpl implements ICompanyFiscalCodeService { +public class CompanyFiscalCodeServiceImpl extends ServiceImpl implements ICompanyFiscalCodeService { @Override diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java new file mode 100644 index 0000000..2ee06bb --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java @@ -0,0 +1,39 @@ +package com.hz.pm.api.gov.contant; + +/** + * @Classname BizProjectContant + * @Description + * @Date 2023/8/25 11:03 + * @Author PoffyZhang + */ +public class BizProjectCont { + + private BizProjectCont() { + } + + public static final String NOT_EFFECTIVE_CODE = "1"; + + public static final String EFFECTIVE_CODE = "2"; + + public static class ProjectCollection { + + private ProjectCollection() { + } + + //有效 + public static final String IS_EFFECTIVE = "02"; + //有效 + public static final String NOT_EFFECTIVE = "01"; + public static final String DRAFT = "草稿"; + public static final String OP_INSERT = "insert"; + public static final String OP_UPDATE = "update"; + public static final String OP_DELETE = "delete"; + public static final String PDF_SUFFIX = ".pdf"; + public static final String MONTH = "月"; + + public static final String MISSING_HIS_PROJ_ID = "000000"; + + public static final String MISSING_HIS_PROJ_NAME = "历年项目数据缺失"; + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/contants/BizProjectContant.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/contants/BizProjectContant.java deleted file mode 100644 index 9e714e5..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/gov/contants/BizProjectContant.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hz.pm.api.gov.contants; - -/** - * @Classname BizProjectContant - * @Description - * @Date 2023/8/25 11:03 - * @Author PoffyZhang - */ -public interface BizProjectContant { - - String PUSH_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/save"; - String NOT_EFFECTIVE_URL = "http://10.53.168.41:38088/syn-data-task/open/api/v1/project-receive/not-effective"; - String NOT_EFFECTIVE_CODE = "1"; - - String EFFECTIVE_CODE = "2"; - - class ProjectCollection { - //有效 - public static final String IS_EFFECTIVE = "02"; - //有效 - public static final String NOT_EFFECTIVE = "01"; - public static final String DRAFT = "草稿"; - public static final String OP_INSERT = "insert"; - public static final String OP_UPDATE = "update"; - public static final String OP_DELETE = "delete"; - public static final String PDF_SUFFIX = ".pdf"; - public static final String MONTH = "月"; - - public static final String MISSING_HIS_PROJ_ID = "000000"; - - public static final String MISSING_HIS_PROJ_NAME = "历年项目数据缺失"; - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/convert/ProjectConvert.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/convert/ProjectConvert.java index 5726493..438f7e6 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/gov/convert/ProjectConvert.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/gov/convert/ProjectConvert.java @@ -2,7 +2,7 @@ package com.hz.pm.api.gov.convert; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import com.hz.pm.api.gov.contants.BizProjectContant; +import com.hz.pm.api.gov.contant.BizProjectCont; import com.hz.pm.api.gov.model.dto.*; import com.hz.pm.api.gov.model.req.*; import com.hz.pm.api.gov.model.vo.*; @@ -33,7 +33,7 @@ public class ProjectConvert { */ public static ProjectPushReq convert(GovBizProjectSaveDTO saveDTO) { ProjectPushReq req = new ProjectPushReq(); - req.setBaseinfo(convertBase(saveDTO.getBaseinfo(), BizProjectContant.EFFECTIVE_CODE)); + req.setBaseinfo(convertBase(saveDTO.getBaseinfo(), BizProjectCont.EFFECTIVE_CODE)); req.setApply(convertApply(saveDTO.getApply())); req.setApprove(convertApprove(saveDTO.getApprove())); req.setCimplement(convertCimplement(saveDTO.getCimplement())); @@ -44,7 +44,7 @@ public class ProjectConvert { public static ProjectPushReq convert(GovBizProjectDetailVO vo) { ProjectPushReq req = new ProjectPushReq(); - req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectContant.EFFECTIVE_CODE)); + req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectCont.EFFECTIVE_CODE)); req.setApply(convertApplyVo(vo.getApply())); req.setApprove(convertApproveVo(vo.getApprove())); req.setCimplement(convertCimplementVo(vo.getCimplement())); @@ -55,7 +55,7 @@ public class ProjectConvert { public static ProjectPushReq convertWithConvertPdf(GovBizProjectDetailVO vo) { ProjectPushReq req = new ProjectPushReq(); - req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectContant.EFFECTIVE_CODE)); + req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectCont.EFFECTIVE_CODE)); req.setApply(convertApplyVoWithConvertPdf(vo.getApply())); req.setApprove(convertApproveVoWithConvertPdf(vo.getApprove())); req.setCimplement(convertCimplementVoWithConvertPdf(vo.getCimplement())); @@ -66,7 +66,7 @@ public class ProjectConvert { public static ProjectPushReq convertWithConvertPdf(GovOperationProjectDetailVO vo) { ProjectPushReq req = new ProjectPushReq(); - req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectContant.EFFECTIVE_CODE)); + req.setBaseinfo(convertBaseVo(vo.getBaseinfo(), BizProjectCont.EFFECTIVE_CODE)); req.setApply(convertApplyVoWithConvertPdf(vo.getApply())); req.setApprove(convertApproveVoWithConvertPdf(vo.getApprove())); req.setCimplement(convertCimplementVoWithConvertPdf(vo.getCimplement())); @@ -390,8 +390,8 @@ public class ProjectConvert { req.setBaseDevelopCode(apply.getBaseDevelopCode()); req.setBaseLowestLevel(apply.getBaseLowestLevel()); if (Objects.nonNull(apply.getMissing()) && apply.getMissing()) { - req.setBaseHistorProjId(BizProjectContant.ProjectCollection.MISSING_HIS_PROJ_ID); - req.setBaseHistorProjName(BizProjectContant.ProjectCollection.MISSING_HIS_PROJ_NAME); + req.setBaseHistorProjId(BizProjectCont.ProjectCollection.MISSING_HIS_PROJ_ID); + req.setBaseHistorProjName(BizProjectCont.ProjectCollection.MISSING_HIS_PROJ_NAME); } else { req.setBaseHistorProjId(apply.getBaseHistorProjId()); req.setBaseHistorProjName(apply.getBaseHistorProjName()); @@ -408,7 +408,7 @@ public class ProjectConvert { apply.getBaseResearchReportFile()); req.setBaseProjConsClass(apply.getBaseProjConsClass()); req.setBaseProjDuration((StringUtils.isNotBlank(apply.getBaseProjDuration()) ? apply.getBaseProjDuration() : "0") - + BizProjectContant.ProjectCollection.MONTH); + + BizProjectCont.ProjectCollection.MONTH); req.setBaseProjIntro(apply.getBaseProjIntro()); req.setBaseProjStartTime(ProjectCollectionUtil.convertLocalDateTime(apply.getBaseProjStartTime())); req.setBaseProjEndTime(ProjectCollectionUtil.convertLocalDateTime(apply.getBaseProjEndTime())); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java deleted file mode 100644 index 29e16da..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.hz.pm.api.gov.enumeration; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import org.apache.commons.lang3.StringUtils; - -import java.util.Objects; - -/** - * GovProjectClassifiedEnum - * - * @return - * @author ZPF - * @since 2023/10/24 16:27 - */ -@Getter -@AllArgsConstructor -@NoArgsConstructor -public enum GovProjectClassifiedEnum { - /** - * 是否涉密 - */ - NOT_CLASSIFIED("01", "非涉密"), - CLASSIFIED("02", "涉密"),; - - private String code; - private String desc; - - public static String getDescByCode(Integer code) { - if (Objects.isNull(code)) { - return StringUtils.EMPTY; - } - for (GovProjectClassifiedEnum t : GovProjectClassifiedEnum.values()) { - if (code.equals(t.getCode())) { - return t.desc; - } - } - return StringUtils.EMPTY; - } - - public static GovProjectClassifiedEnum match(String code) { - if (StringUtils.isBlank(code)) { - return null; - } - for (GovProjectClassifiedEnum t : GovProjectClassifiedEnum.values()) { - if (code.equals(t.getCode())) { - return t; - } - } - return null; - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java deleted file mode 100644 index 7098b64..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.hz.pm.api.gov.helper; - -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hz.pm.api.expert.entity.ExpertGovBusinessStrip; -import com.hz.pm.api.gov.entity.BelongOrg; -import com.hz.pm.api.gov.service.IBelongOrgService; -import lombok.RequiredArgsConstructor; -import org.apache.commons.collections4.CollectionUtils; -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * @author liuxinxin - * @date 2023/4/21 下午2:07 - */ - -@Component -@RequiredArgsConstructor -public class GovBusinessStripHelper { - - private final IBelongOrgService iBelongOrgService; - - public List assemblerBusinessStripInfoList(List businessStripCodeList) { - List businessStripInfoList = new ArrayList<>(); - if (CollectionUtils.isNotEmpty(businessStripCodeList)) { - Map codeNameMap = iBelongOrgService.list(Wrappers - .lambdaQuery(BelongOrg.class).in(BelongOrg::getOrgCode, businessStripCodeList)) - .stream().collect(Collectors.toMap(BelongOrg::getOrgCode, BelongOrg::getOrgName)); - - businessStripCodeList.forEach(r -> { - ExpertGovBusinessStrip businessStripInfo = new ExpertGovBusinessStrip(); - businessStripInfo.setBusinessStripCode(r); - businessStripInfo.setBusinessStripName(codeNameMap.get(r)); - businessStripInfoList.add(businessStripInfo); - }); - } - return businessStripInfoList; - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/gov/manage/GovProjectCollectionManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/gov/manage/GovProjectCollectionManage.java index 0da43ac..f6f172a 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/gov/manage/GovProjectCollectionManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/gov/manage/GovProjectCollectionManage.java @@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Maps; import com.hz.pm.api.common.model.constant.BizConst; import com.hz.pm.api.common.model.constant.RegionConst; -import com.hz.pm.api.gov.contants.BizProjectContant; +import com.hz.pm.api.gov.contant.BizProjectCont; import com.hz.pm.api.gov.convert.ProjectConvert; import com.hz.pm.api.gov.model.dto.*; import com.hz.pm.api.gov.model.entity.*; @@ -74,7 +74,7 @@ import java.time.temporal.Temporal; import java.util.*; import java.util.stream.Collectors; -import static com.hz.pm.api.gov.contants.BizProjectContant.ProjectCollection.*; +import static com.hz.pm.api.gov.contant.BizProjectCont.ProjectCollection.*; /** * @author zpf @@ -1437,7 +1437,7 @@ public class GovProjectCollectionManage { */ private void notEffectiveProject(GovBizProjectBaseinfoDTO baseinfo) { String url = noEffectiveUrl; - ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo, BizProjectContant.NOT_EFFECTIVE_CODE); + ProjectBaseInfoReq req = ProjectConvert.convertBase(baseinfo, BizProjectCont.NOT_EFFECTIVE_CODE); try { log.info("推送消息体 {},{},{}", baseinfo.getBaseProjId(), url, JSON.toJSONString(req)); HttpHeaders headers = new HttpHeaders(); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java deleted file mode 100644 index 69d88e3..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.hz.pm.api.irs.controller; - -import io.swagger.annotations.Api; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @Classname OrganizationController - * @Description - * @Date 2023/8/16 9:57 - * @Author PoffyZhang - */ -@Slf4j -@Validated -@RestController -@RequestMapping("/api/v1/irs/org") -@Api(value = "Organization", tags = "irs-企业信息") -@RequiredArgsConstructor -public class OrganizationController { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java deleted file mode 100644 index b26a6dd..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import lombok.Data; - -import java.io.Serializable; - -@Data -public class ApiApplyDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - private int id; - private String orgId; - private String userId; - private String isDeleted; - private String name; - private String appId; - private String type; - private String status; - private String sysStateTime; - private String deptName; - private String deptCode; - private String fiveAreas; - private String constructionLevel; - private String isUnifiedConstruction; - private String deployType; - private String principal; - private String employeeCode; - private String areaCode; - private String areaName; - private String createTime; - private String modifiedTime; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java deleted file mode 100644 index c277c86..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -@Data -@AllArgsConstructor -@NoArgsConstructor -public class ApiApplySearchResult implements Serializable { - - private static final long serialVersionUID = 1L; - - private int id; - private String orgId; - private String userId; - private String isDeleted; - private String name; - private String appId; - private String type; - private String status; - private String sysStateTime; - private String systemAreas; - private String deptName; - private String deptCode; - private String fiveAreas; - private String constructionLevel; - private String isUnifiedConstruction; - private String deployType; - private String principal; - private String employeeCode; - private String areaName; - private String createTime; - private String modifiedTime; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java deleted file mode 100644 index 64c9403..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - * @Classname ApiDTO - * @Description - * @Date 2023/7/13 18:03 - * @Author PoffyZhang - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -public class ApiDTO implements Serializable { - private static final long serialVersionUID = 1L; - - private String code; - private String msg; - private ApiSearchResult data; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java deleted file mode 100644 index 0499d49..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.util.List; - -@Data -@AllArgsConstructor -@NoArgsConstructor -public class ApiSearchResult implements Serializable { - - private static final long serialVersionUID = 1L; - - private Boolean success; - private Integer code; - private String message; - private Integer totalCount; - private Integer pageSize; - private Integer pageNum; - private List apiApplySearchResult; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java deleted file mode 100644 index d88e41c..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.util.Map; - -/** - * @Classname ForwardDTO - * @Description - * @Date 2023/7/13 18:03 - * @Author PoffyZhang - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -public class ForwardDTO implements Serializable { - private static final long serialVersionUID = 1L; - - private String url; - private String secret; - private String appKey; - private String sign; - private Long requestTime; - private Map data; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java deleted file mode 100644 index 7528741..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.hz.pm.api.irs.model.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * @Classname PushProjectAppToIrsDto - * @Description - * @Date 2023/7/12 11:39 - * @Author PoffyZhang - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class PushProjectAppToIrsDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("我们系统的appId") - @NotNull(message = "appId 不能为空") - private Long appId; - - @ApiModelProperty("app code") - @NotBlank(message = "appCode 不能为空") - private String appCode; - - @ApiModelProperty("项目编码") - @NotBlank(message = "项目编码 不能为空") - private String projectCode; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java deleted file mode 100644 index 793b8ef..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.hz.pm.api.irs.model.res; - -import com.ningdatech.basic.enumeration.Status; -import com.ningdatech.basic.model.ApiStatus; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - *

- * ApiResponse - 统一的接口返回值封装 - *

- * - * @author WendyYang - * @since 14:29 2022/9/29 - */ -@Data -@NoArgsConstructor -public class ApiResponse implements Serializable { - private static final long serialVersionUID = 532384723325394156L; - - public static final int SUCCESS_CODE = 200; - - public static final String SUCCESS_MSG = "success"; - - public static final int ERROR_CODE = 500; - - public static final String ERROR_MSG = "Internal server error"; - - /** - * 状态码 - */ - private Integer code; - - /** - * 返回内容 - */ - private String message; - - /** - * 返回数据 - */ - private T data; - - - private Boolean success; - /** - * 全参构造函数 - * - * @param code 状态码 - * @param message 返回内容 - * @param data 返回数据 - */ - private ApiResponse(Integer code, String message, T data,Boolean success) { - this.code = code; - this.message = message; - this.data = data; - this.success = success; - } - - /** - * 构造一个自定义的API返回 - * - * @param code 状态码 - * @param message 返回内容 - * @param data 返回数据 - * @return ApiResponse - */ - public static ApiResponse of(Integer code, String message, T data,Boolean success) { - return new ApiResponse<>(code, message, data,success); - } - - /** - * 构造一个成功且不带数据的API返回 - * - * @return ApiResponse - */ - public static ApiResponse ofSuccess() { - return ofSuccess(null); - } - - /** - * 构造一个成功且带数据的API返回 - * - * @param data 返回数据 - * @return ApiResponse - */ - public static ApiResponse ofSuccess(T data) { - return ofStatus(Status.OK, data,Boolean.TRUE); - } - - /** - * 构造一个成功且自定义消息的API返回 - * - * @param message 返回内容 - * @return ApiResponse - */ - public static ApiResponse ofMessage(String message) { - return of(Status.OK.getCode(), message, null,Boolean.TRUE); - } - - /** - * 构造一个有状态的API返回 - * - * @param status 状态 {@link Status} - * @return ApiResponse - */ - public static ApiResponse ofStatus(ApiStatus status) { - return ofStatus(status, null,Boolean.TRUE); - } - - /** - * 构造一个有状态且带数据的API返回 - * - * @param status 状态 {@link Status} - * @param data 返回数据 - * @return ApiResponse - */ - public static ApiResponse ofStatus(ApiStatus status, T data,Boolean success) { - return of(status.getCode(), status.getReasonPhrase(), data,success); - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IRSAPIRequest.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IRSAPIRequest.java deleted file mode 100644 index 70588ac..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IRSAPIRequest.java +++ /dev/null @@ -1,301 +0,0 @@ -package com.hz.pm.api.irs.sign; - -import cn.hutool.core.codec.Base64Decoder; -import cn.hutool.core.io.FileUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.hz.pm.api.irs.config.IrsSealPlatformProperties; -import com.hz.pm.api.todocenter.model.dto.SignReqDTO; -import com.ningdatech.basic.exception.BizException; -import com.ningdatech.basic.util.StrPool; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.ByteArrayEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import javax.xml.bind.DatatypeConverter; -import java.io.*; -import java.net.URI; -import java.net.URL; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.security.Key; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.stream.Collectors; - -@Slf4j -public class IRSAPIRequest { - - /** - * pdf文件盖章 - * 接口地址:/V1/accounts/outerAccounts/create - * - * @return - */ - public static String createSignPdf(SignReqDTO req) { - String pdfEncode64 = req.getPdfEncode64(); - Float posX = req.getPosX(); - Float posY = req.getPosY(); - String sealSn = req.getSealSn(); - String fileName = req.getFileName(); - String posPage = req.getPosPage(); - Integer signType = req.getSignType(); - String resp; - try { - JSONObject ReqData = new JSONObject(); - ReqData.put("fileBase64", pdfEncode64); - ReqData.put("sealSn", sealSn); - ReqData.put("posX", posX); - ReqData.put("posY", posY); - ReqData.put("signType", signType); - ReqData.put("posPage", posPage); - ReqData.put("fileName", fileName); - resp = post(ReqData, "post"); - } catch (Exception e) { - throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn + StrPool.SEMICOLON + e.getMessage()); - } - // return obj; - JSONObject jsonObject = JSON.parseObject(resp, JSONObject.class); - String data = jsonObject.getString("data"); - JSONObject object = JSON.parseObject(data, JSONObject.class); - // 获取盖好章的PDF文件内容Base64字符串 - return object.getString("signFileB64"); - } - - - public static String post(JSONObject data, String requestMethod) throws Exception { - - //计算irs请求头里面参数信息 - DateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); - dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); - String date = dateFormat.format(new Date()); - URL url = new URL(IrsSealPlatformProperties.apiUrl); - URI uri = new URI(url.getProtocol(), url.getHost(), url.getPath(), url.getQuery(), null); - String canonicalQueryString = getCanonicalQueryString(uri.getQuery()); - String message = requestMethod.toUpperCase() + "\n" + uri.getPath() + "\n" + canonicalQueryString + "\n" + IrsSealPlatformProperties.accessKey + "\n" + date + "\n"; - Mac hasher = Mac.getInstance("HmacSHA256"); - hasher.init(new SecretKeySpec(IrsSealPlatformProperties.secretKey.getBytes(), "HmacSHA256")); - byte[] hash = hasher.doFinal(message.getBytes()); - DatatypeConverter.printHexBinary(hash); - String sign = DatatypeConverter.printBase64Binary(hash); - - // 计算电子印章组件signature值 - byte[] stream = data.toString().getBytes(StandardCharsets.UTF_8); - // 签名数据,根据签名算法,对请求数据进行签名 - String signature = sign(stream); - // 设置HTTP请求头 - HttpEntityEnclosingRequestBase req = new HttpPost(IrsSealPlatformProperties.apiUrl); - // project-id为用户的projectId - req.addHeader("appId", IrsSealPlatformProperties.projectId); - // signature为之前生成的签名 - req.addHeader("signature", signature); - req.addHeader("X-BG-HMAC-SIGNATURE", sign); - req.addHeader("X-BG-HMAC-ALGORITHM", "hmac-sha256"); - req.addHeader("X-BG-HMAC-ACCESS-KEY", IrsSealPlatformProperties.accessKey); - req.addHeader("X-BG-DATE-TIME", date); - req.addHeader("Content-Type", "application/json"); - - // 设置HTTP请求体 - HttpEntity entity = new ByteArrayEntity(stream, ContentType.create(ContentType.APPLICATION_JSON.getMimeType(), "UTF-8")); - req.setEntity(entity); - - // 执行请求 - // 自定义 RequestConfig 设置请求超时时间 - RequestConfig requestConfig = RequestConfig.custom() - // 连接超时时间,单位:毫秒 - .setConnectTimeout(5000) - // 连接请求超时时间,单位:毫秒 - .setConnectionRequestTimeout(5000) - // 数据读取超时时间,单位:毫秒 - .setSocketTimeout(5000) - .build(); - // 通过 HttpClientBuilder 的 custom() 方法创建自定义的 HttpClient - CloseableHttpClient customHttpClient = HttpClients.custom() - .setDefaultRequestConfig(requestConfig) - .build(); - HttpResponse res = customHttpClient.execute(req); - int statusCode = res.getStatusLine().getStatusCode(); - log.info(String.valueOf(statusCode)); - if (200 != statusCode) { - log.info(String.valueOf(statusCode)); - } - // 获取响应 - InputStream in = res.getEntity().getContent(); - - byte[] resp = readStream(in); - String strRes = new String(resp, StandardCharsets.UTF_8); - log.info(strRes); - customHttpClient.close(); - return strRes; - } - - private static String sign(byte[] stream) throws Exception { - // 获取消息验证码类的实例,算法选择"HmacSHA256" - Mac mac = Mac.getInstance("HmacSHA256"); - - // 获取安全密钥 - Key secKey = new SecretKeySpec(IrsSealPlatformProperties.projectSecret.getBytes(StandardCharsets.UTF_8), mac.getAlgorithm()); - - // 初始化 - mac.init(secKey); - - // 获得签名 - byte[] sign = mac.doFinal(stream); - - // 将byte[]格式的签名用binary编码转化为字符串返回 - return binaryEncode(sign); - - } - - private static String sign1(byte[] stream) throws Exception { - // 获取消息验证码类的实例,算法选择"HmacSHA256" - Mac mac = Mac.getInstance("HmacSHA256"); - - // 获取安全密钥 - Key secKey = new SecretKeySpec(IrsSealPlatformProperties.secretKey.getBytes(StandardCharsets.UTF_8), mac.getAlgorithm()); - - // 初始化 - mac.init(secKey); - - // 获得签名 - byte[] sign = mac.doFinal(stream); - - // 将byte[]格式的签名用binary编码转化为字符串返回 - return binaryEncode(sign); - - } - - public static String binaryEncode(byte[] data) { - final char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; - - StringBuilder builder = new StringBuilder(); - - for (byte i : data) { - builder.append(hexDigits[i >>> 4 & 0xf]); - builder.append(hexDigits[i & 0xf]); - } - - return builder.toString(); - } - - public static byte[] readStream(InputStream in) throws IOException { - - ByteArrayOutputStream output = new ByteArrayOutputStream(); - - byte[] buffer = new byte[1024 * 10]; - try { - int n; - while ((n = in.read(buffer)) != -1) { - output.write(buffer, 0, n); - } - return output.toByteArray(); - } finally { - in.close(); - output.close(); - } - } - - /** - * Description: 将pdf文件转换为Base64编码 - *

- * // * @param 要转的的pdf文件 - * - * @Author fuyuwei - * Create Date: 2015年8月3日 下午9:52:30 - */ - public static String pdfToBase64(File file) { - try (FileInputStream fin = new FileInputStream(file); - BufferedInputStream bin = new BufferedInputStream(fin); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - BufferedOutputStream bout = new BufferedOutputStream(bos);) { - byte[] buffer = new byte[1024 * 16]; - int len = bin.read(buffer); - while (len != -1) { - bout.write(buffer, 0, len); - len = bin.read(buffer); - } - //刷新此输出流并强制写出所有缓冲的输出字节 - bout.flush(); - byte[] bytes = bos.toByteArray(); - return String.valueOf(Base64.getEncoder().encode(bytes)); - } catch (IOException e) { - log.error(e.getMessage(), e); - } - return null; - } - - /** - * Description: 将base64编码内容转换为Pdf - *

- * - * @param base64Content 文件的存储路径(含文件名) - */ - public static void base64StringToPdf(String base64Content, String filePath) throws IOException { - byte[] bytes = Base64Decoder.decode(base64Content); - File file = new File(filePath); - FileUtil.mkParentDirs(file); - try (ByteArrayInputStream byteInputStream = new ByteArrayInputStream(bytes); - BufferedInputStream bis = new BufferedInputStream(byteInputStream); - FileOutputStream fos = new FileOutputStream(file); - BufferedOutputStream bos = new BufferedOutputStream(fos)) { - byte[] buffer = new byte[1024 * 16]; - int length = bis.read(buffer); - while (length != -1) { - bos.write(buffer, 0, length); - length = bis.read(buffer); - } - bos.flush(); - } catch (Exception e) { - log.error(e.getMessage(), e); - } - } - - - private static String getCanonicalQueryString(String query) { - if (query == null || query.trim().isEmpty()) { - return ""; - } - List> queryParamList = new ArrayList<>(); - String[] params = query.split("&"); - for (String param : params) { - int eqIndex = param.indexOf("="); - String key = param.substring(0, eqIndex); - String value = param.substring(eqIndex + 1); - Pair pair = Pair.of(key, value); - queryParamList.add(pair); - } - - List> sortedParamList = queryParamList.stream() - .sorted(Comparator.comparing(param -> param.getKey() + "=" + Optional.ofNullable(param.getValue()).orElse(""))) - .collect(Collectors.toList()); - List> encodeParamList = new ArrayList<>(); - sortedParamList.forEach(param -> { - try { - String key = URLEncoder.encode(param.getKey(), "utf-8"); - String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8").replaceAll("\\%2B", "%20").replaceAll("\\+", "%20").replaceAll("\\%21", "!").replaceAll("\\%27", "'").replaceAll("\\%28", "(").replaceAll("\\%29", ")").replaceAll("\\%7E", "~").replaceAll("\\%25", "%"); - encodeParamList.add(Pair.of(key, value)); - } catch (UnsupportedEncodingException e) { - throw new BizException("encoding error"); - } - }); - - StringBuilder queryParamString = new StringBuilder(); - for (Pair encodeParam : encodeParamList) { - queryParamString.append(encodeParam.getKey()).append("=").append(Optional.ofNullable(encodeParam.getValue()).orElse("")); - queryParamString.append("&"); - } - return queryParamString.substring(0, queryParamString.length() - 1); - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java new file mode 100644 index 0000000..6c38cda --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java @@ -0,0 +1,295 @@ +package com.hz.pm.api.irs.sign; + +import cn.hutool.core.codec.Base64Decoder; +import cn.hutool.core.io.FileUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.hz.pm.api.irs.config.IrsSealPlatformProperties; +import com.hz.pm.api.todocenter.model.dto.SignReqDTO; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.basic.util.StrPool; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.entity.ContentType; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import javax.xml.bind.DatatypeConverter; +import java.io.*; +import java.net.URI; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.NoSuchAlgorithmException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +/** + *

+ * IrsApiRequest + *

+ * + * @author WendyYang + * @since 00:34 2024/8/24 + */ +@Slf4j +public class IrsSealSignUtil { + + private IrsSealSignUtil() { + } + + /** + * pdf文件盖章 + * 接口地址:/V1/accounts/outerAccounts/create + * + * @return \ + */ + public static String createSignPdf(SignReqDTO req) { + String pdfEncode64 = req.getPdfEncode64(); + Float posX = req.getPosX(); + Float posY = req.getPosY(); + String sealSn = req.getSealSn(); + String fileName = req.getFileName(); + String posPage = req.getPosPage(); + Integer signType = req.getSignType(); + String resp; + try { + JSONObject ReqData = new JSONObject(); + ReqData.put("fileBase64", pdfEncode64); + ReqData.put("sealSn", sealSn); + ReqData.put("posX", posX); + ReqData.put("posY", posY); + ReqData.put("signType", signType); + ReqData.put("posPage", posPage); + ReqData.put("fileName", fileName); + resp = post(ReqData, "post"); + } catch (Exception e) { + throw new BizException("调用IRS盖章接口失败,印章编号为:" + sealSn + StrPool.SEMICOLON + e.getMessage()); + } + JSONObject jsonObject = JSON.parseObject(resp, JSONObject.class); + String data = jsonObject.getString("data"); + JSONObject object = JSON.parseObject(data, JSONObject.class); + // 获取盖好章的PDF文件内容Base64字符串 + return object.getString("signFileB64"); + } + + + private static String post(JSONObject data, String requestMethod) throws Exception { + + //计算irs请求头里面参数信息 + DateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); + String date = dateFormat.format(new Date()); + URL url = new URL(IrsSealPlatformProperties.apiUrl); + URI uri = new URI(url.getProtocol(), url.getHost(), url.getPath(), url.getQuery(), null); + String canonicalQueryString = getCanonicalQueryString(uri.getQuery()); + String message = requestMethod.toUpperCase() + "\n" + uri.getPath() + "\n" + canonicalQueryString + "\n" + IrsSealPlatformProperties.accessKey + "\n" + date + "\n"; + Mac hasher = Mac.getInstance("HmacSHA256"); + hasher.init(new SecretKeySpec(IrsSealPlatformProperties.secretKey.getBytes(), "HmacSHA256")); + byte[] hash = hasher.doFinal(message.getBytes()); + DatatypeConverter.printHexBinary(hash); + String sign = DatatypeConverter.printBase64Binary(hash); + + // 计算电子印章组件signature值 + byte[] stream = data.toString().getBytes(StandardCharsets.UTF_8); + // 签名数据,根据签名算法,对请求数据进行签名 + String signature = sign(stream); + // 设置HTTP请求头 + HttpEntityEnclosingRequestBase req = new HttpPost(IrsSealPlatformProperties.apiUrl); + // project-id为用户的projectId + req.addHeader("appId", IrsSealPlatformProperties.projectId); + // signature为之前生成的签名 + req.addHeader("signature", signature); + req.addHeader("X-BG-HMAC-SIGNATURE", sign); + req.addHeader("X-BG-HMAC-ALGORITHM", "hmac-sha256"); + req.addHeader("X-BG-HMAC-ACCESS-KEY", IrsSealPlatformProperties.accessKey); + req.addHeader("X-BG-DATE-TIME", date); + req.addHeader("Content-Type", "application/json"); + + // 设置HTTP请求体 + HttpEntity entity = new ByteArrayEntity(stream, ContentType.create(ContentType.APPLICATION_JSON.getMimeType(), "UTF-8")); + req.setEntity(entity); + + // 执行请求 + // 自定义 RequestConfig 设置请求超时时间 + RequestConfig requestConfig = RequestConfig.custom() + // 连接超时时间,单位:毫秒 + .setConnectTimeout(5000) + // 连接请求超时时间,单位:毫秒 + .setConnectionRequestTimeout(5000) + // 数据读取超时时间,单位:毫秒 + .setSocketTimeout(5000) + .build(); + // 通过 HttpClientBuilder 的 custom() 方法创建自定义的 HttpClient + CloseableHttpClient customHttpClient = HttpClients.custom() + .setDefaultRequestConfig(requestConfig) + .build(); + HttpResponse res = customHttpClient.execute(req); + int statusCode = res.getStatusLine().getStatusCode(); + log.info(String.valueOf(statusCode)); + if (200 != statusCode) { + log.info(String.valueOf(statusCode)); + } + // 获取响应 + InputStream in = res.getEntity().getContent(); + + byte[] resp = readStream(in); + String strRes = new String(resp, StandardCharsets.UTF_8); + log.info(strRes); + customHttpClient.close(); + return strRes; + } + + private static String sign(byte[] stream) throws NoSuchAlgorithmException, InvalidKeyException { + // 获取消息验证码类的实例,算法选择"HmacSHA256" + Mac mac = Mac.getInstance("HmacSHA256"); + + // 获取安全密钥 + Key secKey = new SecretKeySpec(IrsSealPlatformProperties.projectSecret.getBytes(StandardCharsets.UTF_8), mac.getAlgorithm()); + + // 初始化 + mac.init(secKey); + + // 获得签名 + byte[] sign = mac.doFinal(stream); + + // 将byte[]格式的签名用binary编码转化为字符串返回 + return binaryEncode(sign); + + } + + private static String binaryEncode(byte[] data) { + final char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + + StringBuilder builder = new StringBuilder(); + + for (byte i : data) { + builder.append(hexDigits[i >>> 4 & 0xf]); + builder.append(hexDigits[i & 0xf]); + } + + return builder.toString(); + } + + private static byte[] readStream(InputStream in) throws IOException { + + ByteArrayOutputStream output = new ByteArrayOutputStream(); + + byte[] buffer = new byte[1024 * 10]; + try { + int n; + while ((n = in.read(buffer)) != -1) { + output.write(buffer, 0, n); + } + return output.toByteArray(); + } finally { + in.close(); + output.close(); + } + } + + /** + * Description: 将pdf文件转换为Base64编码 + *

+ * // * @param 要转的的pdf文件 + * + * @Author fuyuwei + * Create Date: 2015年8月3日 下午9:52:30 + */ + public static String pdfToBase64(File file) { + try (FileInputStream fin = new FileInputStream(file); + BufferedInputStream bin = new BufferedInputStream(fin); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + BufferedOutputStream bout = new BufferedOutputStream(bos);) { + byte[] buffer = new byte[1024 * 16]; + int len = bin.read(buffer); + while (len != -1) { + bout.write(buffer, 0, len); + len = bin.read(buffer); + } + //刷新此输出流并强制写出所有缓冲的输出字节 + bout.flush(); + byte[] bytes = bos.toByteArray(); + return String.valueOf(Base64.getEncoder().encode(bytes)); + } catch (IOException e) { + log.error(e.getMessage(), e); + } + return null; + } + + /** + * Description: 将base64编码内容转换为Pdf + *

+ * + * @param base64Content 文件的存储路径(含文件名) + */ + public static void base64StringToPdf(String base64Content, String filePath) throws IOException { + byte[] bytes = Base64Decoder.decode(base64Content); + File file = new File(filePath); + FileUtil.mkParentDirs(file); + try (ByteArrayInputStream byteInputStream = new ByteArrayInputStream(bytes); + BufferedInputStream bis = new BufferedInputStream(byteInputStream); + FileOutputStream fos = new FileOutputStream(file); + BufferedOutputStream bos = new BufferedOutputStream(fos)) { + byte[] buffer = new byte[1024 * 16]; + int length = bis.read(buffer); + while (length != -1) { + bos.write(buffer, 0, length); + length = bis.read(buffer); + } + bos.flush(); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + } + + + private static String getCanonicalQueryString(String query) { + if (query == null || query.trim().isEmpty()) { + return ""; + } + List> queryParamList = new ArrayList<>(); + String[] params = query.split("&"); + for (String param : params) { + int eqIndex = param.indexOf("="); + String key = param.substring(0, eqIndex); + String value = param.substring(eqIndex + 1); + Pair pair = Pair.of(key, value); + queryParamList.add(pair); + } + + List> sortedParamList = queryParamList.stream() + .sorted(Comparator.comparing(param -> param.getKey() + "=" + Optional.ofNullable(param.getValue()).orElse(""))) + .collect(Collectors.toList()); + List> encodeParamList = new ArrayList<>(); + sortedParamList.forEach(param -> { + try { + String key = URLEncoder.encode(param.getKey(), "utf-8"); + String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8").replaceAll("\\%2B", "%20").replaceAll("\\+", "%20").replaceAll("\\%21", "!").replaceAll("\\%27", "'").replaceAll("\\%28", "(").replaceAll("\\%29", ")").replaceAll("\\%7E", "~").replaceAll("\\%25", "%"); + encodeParamList.add(Pair.of(key, value)); + } catch (UnsupportedEncodingException e) { + throw new BizException("encoding error"); + } + }); + + StringBuilder queryParamString = new StringBuilder(); + for (Pair encodeParam : encodeParamList) { + queryParamString.append(encodeParam.getKey()).append("=").append(Optional.ofNullable(encodeParam.getValue()).orElse("")); + queryParamString.append("&"); + } + return queryParamString.substring(0, queryParamString.length() - 1); + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java deleted file mode 100644 index cb1f1ba..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.hz.pm.api.irs.utils; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.hz.pm.api.common.util.CryptUtils; -import com.hz.pm.api.common.util.HttpUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.ResponseEntity; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.web.client.RestTemplate; - -import java.security.NoSuchAlgorithmException; -import java.util.Objects; - -/** - * @Classname RefreshTokenManage - * @Description - * @Date 2023/7/20 15:53 - * @Author PoffyZhang - */ -@Slf4j -public class RefreshTokenUtil { - - private RefreshTokenUtil() { - } - - public static String refrshByAppScret() throws NoSuchAlgorithmException { - long timestamp = System.currentTimeMillis(); - String appSecret = "e066f496194540afa829c66983d4710e"; - String appKey = "8fb070a1f1194b2ebffdc6f596bb8a96"; - String sign = CryptUtils.MD5Encode(appKey + appSecret + timestamp); - HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); - RestTemplate restTemplate; - if(Objects.nonNull(factory)){ - restTemplate = new RestTemplate(factory); - }else{ - restTemplate = new RestTemplate(); - } - String url = "https://interface.ls.local/a/api/refreshTokenKey?appKey=" + appKey + - "&requestTime=" + timestamp + "&sign=" + sign; - ResponseEntity forEntity = restTemplate.getForEntity(url, String.class); - - String body = forEntity.getBody(); - log.info(body); - - JSONObject bodyJson = JSON.parseObject(body); - JSONObject datas = bodyJson.getJSONObject("datas"); - String requestSecret = datas.getString("requestSecret"); - log.info("requestSecret :{}",requestSecret); - return requestSecret; - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/task/MsgCallReplyRewriteTask.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/task/MsgCallReplyRewriteTask.java index 2823c84..b0b6970 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/task/MsgCallReplyRewriteTask.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/task/MsgCallReplyRewriteTask.java @@ -68,7 +68,7 @@ public class MsgCallReplyRewriteTask { } - @Scheduled(fixedRateString = "${msg-call-reply-write.fixed-rate:1}", timeUnit = TimeUnit.MINUTES) + @Scheduled(fixedRateString = "${msg-call-reply-write.fixed-rate:1}", initialDelay = 1, timeUnit = TimeUnit.MINUTES) public void replyRewrite() { log.info("开始获取短信电话回执"); Wrapper query = Wrappers.lambdaQuery(MsgCallRecord.class) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java index 9d7cc9b..9296fca 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java @@ -39,7 +39,7 @@ import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; import com.hz.pm.api.projectlib.service.IProjectApplicationService; import com.hz.pm.api.projectlib.service.IProjectInstService; import com.hz.pm.api.projectlib.service.IProjectService; -import com.hz.pm.api.todocenter.utils.BuildUserUtils; +import com.hz.pm.api.todocenter.util.BuildUserUtils; import com.hz.pm.api.user.security.model.UserFullInfoDTO; import com.hz.pm.api.user.security.model.UserInfoDetails; import com.hz.pm.api.user.util.LoginUserUtil; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java deleted file mode 100644 index 175a8b5..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.hz.pm.api.projectdeclared.contant; - -import com.google.common.collect.Lists; - -import java.util.List; - -/** - *

- * DeclaredProjectContant - *

- * - * @author WendyYang - * @since 14:41 2023/12/16 - */ -public interface DeclaredProjectConst { - - class ProcessDef { - - private ProcessDef() { - } - - public static final String PROJECT_STAGE_1 = "单位内部审批流程"; - - public static final String PROJECT_STAGE_2 = "项目预审审批流程"; - - public static final String PROJECT_STAGE_3 = "部门联合审批流程"; - - public static final String PROJECT_STAGE_4 = "建设方案审批流程"; - - public static final String PROJECT_STAGE_5 = "验收申报审批流程"; - } - - class Instance { - - private Instance() { - } - - public static final String PROVINCE_INSTANCE_ID = "PROVINCE_AUDIT"; - } - - class Biz { - - private Biz() { - } - - public static final String CORE_BIZ = "{\"msg\":\"操作成功\",\"code\":0,\"data\":[{\"id\":6366,\"matterOrg\":4,\"matterName\":\"信息化项目年度建设计划申报\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[{\"id\":\"947\",\"uuid\":\"5922bdbb-ae35-4f4d-b6e0-916cf01b9a6a\",\"sysName\":\"丽水市数据中心平台\"}],\"coreMaterials\":[{\"id\":11317,\"comaterialName\":\"次年信息化项目年度计划申请信息(信息化项目年度建设计划申报)\"},{\"id\":66025,\"comaterialName\":\"测试信息\"},{\"id\":70165,\"comaterialName\":\"演示系统信息\"},{\"id\":11318,\"comaterialName\":\"次年信息化项目建议书信息(信息化项目年度建设计划申报)\"},{\"id\":60284,\"comaterialName\":\"测试需求信息\"},{\"id\":60285,\"comaterialName\":\"测试需求的信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6367,\"matterOrg\":4,\"matterName\":\"信息化项目年度建设计划调整申报\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11319,\"comaterialName\":\"次年信息化项目年度计划申请信息(信息化项目年度建设计划调整申报)\"},{\"id\":11320,\"comaterialName\":\"次年信息化项目建议书信息(信息化项目年度建设计划调整申报)\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6368,\"matterOrg\":4,\"matterName\":\"信息化项目立项\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[{\"id\":\"2095\",\"uuid\":\"2b4a5100-708c-4716-b713-79be1860edf9\",\"sysName\":\"丽水市公共数据管理系统\"}],\"coreMaterials\":[{\"id\":69142,\"comaterialName\":\"演示项目信息\"},{\"id\":11321,\"comaterialName\":\"项目定密正式意见信息\"},{\"id\":11322,\"comaterialName\":\"项目数据资源承诺共享开放目录信息\"},{\"id\":11324,\"comaterialName\":\"项目申请立项正式函信息\"},{\"id\":11323,\"comaterialName\":\"项目建设方案信息(信息化项目立项)\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6369,\"matterOrg\":4,\"matterName\":\"信息化项目验收\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[{\"id\":\"1020\",\"uuid\":\"103afdd3-5078-4e8e-9f3e-8890b42d9276\",\"sysName\":\"协同平台\"}],\"coreMaterials\":[{\"id\":11325,\"comaterialName\":\"项目验收申请函信息(电子公文正式件)\"},{\"id\":11329,\"comaterialName\":\"项目初验意见书信息\"},{\"id\":11328,\"comaterialName\":\"第三方测评报告信息(立项批复投资估算>500万)\"},{\"id\":11327,\"comaterialName\":\"项目监理报告信息(立项批复投资估算>200万)\"},{\"id\":11330,\"comaterialName\":\"项目验收完整归档资料信息\"},{\"id\":60411,\"comaterialName\":\"测试数据项数量信息\"},{\"id\":69141,\"comaterialName\":\"演示验收信息\"},{\"id\":11326,\"comaterialName\":\"项目竣工报告信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6370,\"matterOrg\":4,\"matterName\":\"办公助手人员维护\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11331,\"comaterialName\":\"办公助手人员变更表单信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6371,\"matterOrg\":4,\"matterName\":\"办公助手单位新增申请\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11332,\"comaterialName\":\"办公助手单位新增申请信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6372,\"matterOrg\":4,\"matterName\":\"办公助手短信数量申请\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":17570,\"comaterialName\":\"办公助手短信数量申请信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6373,\"matterOrg\":4,\"matterName\":\"办公助手通知公告发布申请\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11335,\"comaterialName\":\"通知公告发布申请信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6374,\"matterOrg\":4,\"matterName\":\"丽水市党政机关公文交换系统单位新增\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11336,\"comaterialName\":\"公文交换系统单位新增信息\"},{\"id\":17572,\"comaterialName\":\"公章替换说明函信息\"},{\"id\":17571,\"comaterialName\":\"机关代字(红头文号)模板信息\"}],\"page\":null,\"limit\":null,\"startRow\":null},{\"id\":6375,\"matterOrg\":4,\"matterName\":\"丽水市党政机关协同办公系统人员维护\",\"matterCode\":\"\",\"attribute\":\"1\",\"busiRate\":\"\",\"otherRate\":\"\",\"useState\":\"1\",\"orgName\":\"市大数据局\",\"oid\":\"40285881636932d30163694f7f4e125d\",\"dingCode\":\"GO_6c383c049d95461f9a0df780140ceb32\",\"areaName\":\"丽水市\",\"systems\":[],\"coreMaterials\":[{\"id\":11337,\"comaterialName\":\"协同办公系统人员变更信息\"}],\"page\":null,\"limit\":null,\"startRow\":null}],\"total\":10}"; - } - - class Project{ - - private Project() { - } - - public static final Integer YEAR_THREE = 2; - public static final Integer YEAR_FOUR = 4; - - public static final Integer YEAR_DRAW_SURPLUS = 100; - - public static final String FIXED_NUMBER = "0130"; - public static final Long MAX_PROJECT_ID = 999L; - - public static final Long MIN_PROJECT_ID = 1L; - } - - class ReviewChecklist { - - private ReviewChecklist() { - } - - public static final List REVIEW_HUMANS_ZZD = Lists.newArrayList("GE_dce116d65ffe48a3aee6c14c1c5a3031", - "GE_573158a366554bdbb483f8f93d594bf7","GE_fe1cd568b453456ead00f471ecddf6a2","GE_fc1e28e29b5a4cf39c7b7c83278db6f4", - "GE_16580afcdf7d4d379fd3690ba47f3b58","GE_9c901c85eaeb42abbb485b7aa4d4358f","GE_a4c2c56ed3204600805e0f7b7dca9044"); - - public static final List REVIEW_HUMANS_ZYD = Lists.newArrayList("GE_6dc0e5a3513d41f684b6b01aeb94d887", - "GE_39be254f6cb84ad0b30c9bd5bda657d7","GE_051f5e34c0c4467b873cde517a21669b","GE_e68c7af513474eaa959b7ce7141a4d9f", - "GE_c3e4d8e8067b4fce91b28b570cffc67a","GE_809a061236b941d281446df6f14dc8f0","GE_6168943503de45919c42d46e05b24fa1"); - public static final Integer INIT_NUM = 0; - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProcessProgressHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProcessProgressHelper.java index 672ff71..7b5e7cb 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProcessProgressHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProcessProgressHelper.java @@ -1,7 +1,7 @@ package com.hz.pm.api.projectlib.handle; import com.hz.pm.api.projectlib.model.entity.Project; -import com.hz.pm.api.todocenter.utils.BuildUserUtils; +import com.hz.pm.api.todocenter.util.BuildUserUtils; import com.wflow.workflow.bean.process.ProgressNode; import com.wflow.workflow.bean.vo.ProcessDetailVO; import com.wflow.workflow.bean.vo.ProcessInfoVO; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java index 17a6a32..40cbf36 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java @@ -5,11 +5,11 @@ import cn.hutool.core.date.StopWatch; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Sets; import com.hz.pm.api.common.model.constant.BizConst; +import com.hz.pm.api.projectlib.model.entity.Project; +import com.hz.pm.api.projectlib.model.entity.ProjectRenewalFundDeclaration; import com.hz.pm.api.projectlib.model.enumeration.ProjectRenewalApprovalStatusEnum; import com.hz.pm.api.projectlib.model.enumeration.WarningFlowTypeEnum; import com.hz.pm.api.projectlib.model.enumeration.WarningOperationTypeEnum; -import com.hz.pm.api.projectlib.model.entity.Project; -import com.hz.pm.api.projectlib.model.entity.ProjectRenewalFundDeclaration; import com.hz.pm.api.projectlib.service.IProjectRenewalFundDeclarationService; import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.sys.enumeration.ProjectEarlyWarningStatusEnum; @@ -26,6 +26,7 @@ import org.flowable.task.api.Task; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; + import java.net.InetAddress; import java.net.UnknownHostException; import java.time.LocalDateTime; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; /** @@ -58,7 +60,7 @@ public class EarlyWarningProjectTask { @Value("${hostname:}") private String HOST_NAME; - @Scheduled(fixedDelay = 6000 * 120) + @Scheduled(fixedDelay = 12, initialDelay = 1, timeUnit = TimeUnit.MINUTES) public void doEarlyWarningDeclared() throws UnknownHostException { if (!HOST_NAME.equals(InetAddress.getLocalHost().getHostName())) { return; @@ -71,7 +73,7 @@ public class EarlyWarningProjectTask { List projects = projectService.list(Wrappers.lambdaQuery(Project.class) .eq(Project::getNewest, Boolean.TRUE)); - if(CollUtil.isEmpty(projects)){ + if (CollUtil.isEmpty(projects)) { log.info("系统没有项目 退出任务"); stopWatch.stop(); log.info("=========== 预警项目维度任务结束 耗时{}s", stopWatch.getTotalTimeSeconds()); @@ -88,10 +90,10 @@ public class EarlyWarningProjectTask { //1.先补全 异常项目管理中 不存在的项目 List toAdd = projects.stream() .filter(p -> { - if(CollUtil.isEmpty(warningProjectCodes)){ + if (CollUtil.isEmpty(warningProjectCodes)) { return Boolean.TRUE; } - if(!warningProjectCodes.contains(p.getProjectCode())){ + if (!warningProjectCodes.contains(p.getProjectCode())) { return Boolean.TRUE; } return Boolean.FALSE; @@ -108,7 +110,7 @@ public class EarlyWarningProjectTask { }) .collect(Collectors.toList()); - if(CollUtil.isNotEmpty(toAdd)){ + if (CollUtil.isNotEmpty(toAdd)) { projectEarlyWarningService.saveBatch(toAdd); } @@ -116,7 +118,7 @@ public class EarlyWarningProjectTask { List toRemove = warnings.stream() .filter(w -> !projectMap.containsKey(w.getProjectCode())) .collect(Collectors.toList()); - if(CollUtil.isNotEmpty(toRemove)){ + if (CollUtil.isNotEmpty(toRemove)) { List removeIds = toRemove.stream().map(ProjectEarlyWarning::getId) .collect(Collectors.toList()); projectEarlyWarningService.removeBatchByIds(removeIds); @@ -124,7 +126,7 @@ public class EarlyWarningProjectTask { //3.去查询 各个报警 是否已经正常 List trueWarnings = warnings.stream().filter(w -> Objects.nonNull(w.getNormal()) && !w.getNormal()).collect(Collectors.toList()); - if(CollUtil.isEmpty(trueWarnings)){ + if (CollUtil.isEmpty(trueWarnings)) { log.info("没有异常的项目 要去查询"); stopWatch.stop(); log.info("=========== 预警项目维度任务结束 耗时{}s", stopWatch.getTotalTimeSeconds()); @@ -167,14 +169,14 @@ public class EarlyWarningProjectTask { } private void checkRenewalFundWarning(List renewalFundWarnings) { - if(CollUtil.isEmpty(renewalFundWarnings)){ + if (CollUtil.isEmpty(renewalFundWarnings)) { return; } - for(ProjectEarlyWarning renewalFundWarning : renewalFundWarnings){ + for (ProjectEarlyWarning renewalFundWarning : renewalFundWarnings) { String projectCode = renewalFundWarning.getProjectCode(); Project project = projectService.getProjectByCode(projectCode); - if(Objects.isNull(project)){ + if (Objects.isNull(project)) { continue; } @@ -183,26 +185,26 @@ public class EarlyWarningProjectTask { .eq(WflowEarlyWarningRecords::getRuleType, WarningRuleTypeEnum.OPERATION_WARNING.getCode()) .orderByDesc(WflowEarlyWarningRecords::getWarningTime) .last(BizConst.LIMIT_1)); - if(Objects.isNull(record)){ + if (Objects.isNull(record)) { continue; } //借用了NODEID 其实 是续建id String nodeId = record.getNodeId(); ProjectRenewalFundDeclaration renewalFund = renewalFundDeclarationService.getById(nodeId); - if(Objects.isNull(renewalFund)){ + if (Objects.isNull(renewalFund)) { continue; } String approvalStatus = renewalFund.getApprovalStatus(); ProjectRenewalApprovalStatusEnum match = ProjectRenewalApprovalStatusEnum .match(approvalStatus); - if(Objects.nonNull(match)){ + if (Objects.nonNull(match)) { //如果是已经审批 - if(match.name().equals(ProjectRenewalApprovalStatusEnum.PASS.name())){ + if (match.name().equals(ProjectRenewalApprovalStatusEnum.PASS.name())) { renewalFundWarning.setRenewalFundWarning(Boolean.FALSE); //其它三种 都没有 说明已经正常了 - if(!renewalFundWarning.getProcessWarning() && + if (!renewalFundWarning.getProcessWarning() && !renewalFundWarning.getDeclaredWarning() && - !renewalFundWarning.getOperationWarning()){ + !renewalFundWarning.getOperationWarning()) { renewalFundWarning.setNormal(Boolean.TRUE); renewalFundWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name()); } @@ -213,14 +215,14 @@ public class EarlyWarningProjectTask { } private void checkOperationWarning(List operationWarnings) { - if(CollUtil.isEmpty(operationWarnings)){ + if (CollUtil.isEmpty(operationWarnings)) { return; } - for( ProjectEarlyWarning operationWarning : operationWarnings){ + for (ProjectEarlyWarning operationWarning : operationWarnings) { String projectCode = operationWarning.getProjectCode(); Project project = projectService.getProjectByCode(projectCode); - if(Objects.isNull(project)){ + if (Objects.isNull(project)) { continue; } WflowEarlyWarningRecords record = earlyWarningRecordsService.getOne(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) @@ -228,22 +230,22 @@ public class EarlyWarningProjectTask { .eq(WflowEarlyWarningRecords::getRuleType, WarningRuleTypeEnum.OPERATION_WARNING.getCode()) .orderByDesc(WflowEarlyWarningRecords::getWarningTime) .last(BizConst.LIMIT_1)); - if(Objects.isNull(record)){ + if (Objects.isNull(record)) { continue; } Integer biz = record.getBiz(); WarningOperationTypeEnum operationTypeEnum = WarningOperationTypeEnum.getByCode(biz); - if(Objects.isNull(operationTypeEnum)){ + if (Objects.isNull(operationTypeEnum)) { continue; } Integer projectStutas = operationTypeEnum.getProjectStutas(); //已经不是这个状态了 说明已经被提交了 - if(!projectStutas.equals(project.getStatus())){ + if (!projectStutas.equals(project.getStatus())) { operationWarning.setOperationWarning(Boolean.FALSE); //其它三种 都没有 说明已经正常了 - if(!operationWarning.getProcessWarning() && + if (!operationWarning.getProcessWarning() && !operationWarning.getDeclaredWarning() && - !operationWarning.getRenewalFundWarning()){ + !operationWarning.getRenewalFundWarning()) { operationWarning.setNormal(Boolean.TRUE); operationWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name()); } @@ -253,13 +255,13 @@ public class EarlyWarningProjectTask { } private void checkDeclaredWarning(List declaredWarnings) { - if(CollUtil.isEmpty(declaredWarnings)){ + if (CollUtil.isEmpty(declaredWarnings)) { return; } - for( ProjectEarlyWarning declaredWarning : declaredWarnings){ + for (ProjectEarlyWarning declaredWarning : declaredWarnings) { String projectCode = declaredWarning.getProjectCode(); Project project = projectService.getProjectByCode(projectCode); - if(Objects.isNull(project)){ + if (Objects.isNull(project)) { continue; } WflowEarlyWarningRecords record = earlyWarningRecordsService.getOne(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) @@ -267,22 +269,22 @@ public class EarlyWarningProjectTask { .eq(WflowEarlyWarningRecords::getRuleType, WarningRuleTypeEnum.DECLARED_WARNING.getCode()) .orderByDesc(WflowEarlyWarningRecords::getWarningTime) .last(BizConst.LIMIT_1)); - if(Objects.isNull(record)){ + if (Objects.isNull(record)) { continue; } Integer biz = record.getBiz(); WarningFlowTypeEnum flowTypeEnum = WarningFlowTypeEnum.getByCode(biz); - if(Objects.isNull(flowTypeEnum)){ + if (Objects.isNull(flowTypeEnum)) { continue; } Integer projectStutas = flowTypeEnum.getProjectStutas(); //已经不是这个状态了 说明已经被提交了 - if(!projectStutas.equals(project.getStatus())){ + if (!projectStutas.equals(project.getStatus())) { declaredWarning.setDeclaredWarning(Boolean.FALSE); //其它三种 都没有 说明已经正常了 - if(!declaredWarning.getProcessWarning() && + if (!declaredWarning.getProcessWarning() && !declaredWarning.getOperationWarning() && - !declaredWarning.getRenewalFundWarning()){ + !declaredWarning.getRenewalFundWarning()) { declaredWarning.setNormal(Boolean.TRUE); declaredWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name()); } @@ -293,35 +295,36 @@ public class EarlyWarningProjectTask { /** * 流程 查看 是否已经处理过 + * * @param processWarnings */ private void checkProcessWarning(List processWarnings) { - if(CollUtil.isEmpty(processWarnings)){ + if (CollUtil.isEmpty(processWarnings)) { return; } - for( ProjectEarlyWarning processWarning : processWarnings){ + for (ProjectEarlyWarning processWarning : processWarnings) { String projectCode = processWarning.getProjectCode(); WflowEarlyWarningRecords record = earlyWarningRecordsService.getOne(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) .eq(WflowEarlyWarningRecords::getProjectCode, projectCode) .orderByDesc(WflowEarlyWarningRecords::getWarningTime) .last(BizConst.LIMIT_1)); - if(Objects.isNull(record)){ + if (Objects.isNull(record)) { continue; } String nodeId = record.getNodeId(); - if(StringUtils.isBlank(nodeId)){ + if (StringUtils.isBlank(nodeId)) { continue; } List tasks = taskService.createTaskQuery() .taskDefinitionKey(nodeId) .list(); - if(CollUtil.isEmpty(tasks)){ + if (CollUtil.isEmpty(tasks)) { //说明 已经审批通过了 processWarning.setProcessWarning(Boolean.FALSE); //其它三种 都没有 说明已经正常了 - if(!processWarning.getDeclaredWarning() && + if (!processWarning.getDeclaredWarning() && !processWarning.getOperationWarning() && - !processWarning.getRenewalFundWarning()){ + !processWarning.getRenewalFundWarning()) { processWarning.setNormal(Boolean.TRUE); processWarning.setStatus(ProjectEarlyWarningStatusEnum.NORMAL.name()); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java deleted file mode 100644 index f96e425..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.hz.pm.api.sys.controller; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.stereotype.Controller; - -/** - *

- * 前端控制器 - *

- * - * @author WendyYang - * @since 2024-04-25 - */ -@Controller -@RequestMapping("/api.sys/ndMsgCallRecord") -public class NdMsgCallRecordController { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticePermissionsEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticePermissionsEnum.java index 7dc005d..f7951a3 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticePermissionsEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticePermissionsEnum.java @@ -2,19 +2,17 @@ package com.hz.pm.api.sys.enumeration; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import java.util.Objects; /** - * * 公告权限枚举 + * * @author ZPF * @since 2023/02/24 16:14 */ @Getter -@NoArgsConstructor @AllArgsConstructor public enum NoticePermissionsEnum { /** @@ -24,8 +22,8 @@ public enum NoticePermissionsEnum { REGION(1, "区域可看"), ORG(2, "单位可看"); - private Integer code; - private String desc; + private final Integer code; + private final String desc; public static String getDescByCode(Integer code) { if (Objects.isNull(code)) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticeTypeEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticeTypeEnum.java index 0a427ba..84fd310 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticeTypeEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticeTypeEnum.java @@ -2,19 +2,17 @@ package com.hz.pm.api.sys.enumeration; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import java.util.Objects; /** - * * 公告类型枚举 + * * @author ZPF * @since 2023/02/24 16:14 */ @Getter -@NoArgsConstructor @AllArgsConstructor public enum NoticeTypeEnum { /** @@ -24,8 +22,8 @@ public enum NoticeTypeEnum { HELP_DOCUMENTS(2, "帮助文档"), POLICY_DOCUMENTS(3, "政策文件"); - private Integer code; - private String desc; + private final Integer code; + private final String desc; public static String getDescByCode(Integer code) { if (Objects.isNull(code)) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/ProjectEarlyWarningStatusEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/ProjectEarlyWarningStatusEnum.java index 6dee8e9..495d595 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/ProjectEarlyWarningStatusEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/ProjectEarlyWarningStatusEnum.java @@ -2,19 +2,17 @@ package com.hz.pm.api.sys.enumeration; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import java.util.Objects; /** - * * 项目预警状态枚举 + * * @author ZPF * @since 2023/02/24 16:14 */ @Getter -@NoArgsConstructor @AllArgsConstructor public enum ProjectEarlyWarningStatusEnum { /** @@ -24,8 +22,8 @@ public enum ProjectEarlyWarningStatusEnum { OVER_TIME(2, "超期"), ADVENT_TIME(3, "临期"); - private Integer code; - private String desc; + private final Integer code; + private final String desc; public static String match(Integer code) { if (Objects.isNull(code)) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/RegionManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/RegionManage.java index 43301b3..11bc303 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/RegionManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/RegionManage.java @@ -2,7 +2,6 @@ package com.hz.pm.api.sys.manage; import com.hz.pm.api.common.helper.RegionCacheHelper; import com.hz.pm.api.sys.model.vo.RegionTreeVO; -import com.hz.pm.api.sys.service.IRegionService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -18,7 +17,6 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor public class RegionManage { - private final IRegionService regionService; private final RegionCacheHelper regionCache; public RegionTreeVO getRegionTree(String regionCode, Integer regionLevel) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RegionDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RegionDTO.java index aa96380..7514c89 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RegionDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RegionDTO.java @@ -14,6 +14,7 @@ public class RegionDTO { @Tolerate public RegionDTO() { + // 默认无参构造 } /** diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java deleted file mode 100644 index 9b5cd62..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.hz.pm.api.sys.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; -import java.io.Serializable; - -/** - *

- * 实体类 - * 资源 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "ResourceSaveDTO", description = "资源") -public class ResourceSaveDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 编码 - */ - @ApiModelProperty(value = "编码") - @Size(max = 500, message = "编码长度不能超过500") - private String code; - /** - * 名称 - */ - @ApiModelProperty(value = "名称") - @NotEmpty(message = "名称不能为空") - @Size(max = 255, message = "名称长度不能超过255") - private String name; - /** - * 菜单ID - * #c_menu - */ - @ApiModelProperty(value = "菜单ID") - private Long menuId; - /** - * 描述 - */ - @ApiModelProperty(value = "描述") - @Size(max = 255, message = "描述长度不能超过255") - private String describe; - /** - * 内置 - */ - @ApiModelProperty(value = "内置") - private Boolean readonly; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java deleted file mode 100644 index f8fb0b6..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.hz.pm.api.sys.model.dto; - -import com.baomidou.mybatisplus.core.conditions.update.Update; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.io.Serializable; - -/** - *

- * 实体类 - * 资源 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "ResourceUpdateDTO", description = "资源") -public class ResourceUpdateDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "主键") - @NotNull(message = "id不能为空", groups = Update.class) - private Long id; - - /** - * 编码 - */ - @ApiModelProperty(value = "编码") - @Size(max = 500, message = "编码长度不能超过500") - private String code; - /** - * 名称 - */ - @ApiModelProperty(value = "名称") - @NotEmpty(message = "名称不能为空") - @Size(max = 255, message = "名称长度不能超过255") - private String name; - /** - * 菜单ID - * #c_menu - */ - @ApiModelProperty(value = "菜单ID") - private Long menuId; - /** - * 描述 - */ - @ApiModelProperty(value = "描述") - @Size(max = 255, message = "描述长度不能超过255") - private String describe; - /** - * 内置 - */ - @ApiModelProperty(value = "内置") - private Boolean readonly; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java deleted file mode 100644 index d8a4c91..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.hz.pm.api.sys.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - *

- * 实体类 - * 角色的资源 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "RoleAuthoritySaveDTO", description = "角色的资源") -public class RoleAuthoritySaveDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 菜单ID - * #c_menu - */ - @ApiModelProperty(value = "资源ID") - private List menuIdList; - - /** - * 资源id - * #c_resource - */ - private List resourceIdList; - - /** - * 角色id - * #c_role - */ - @ApiModelProperty(value = "角色id") - @NotNull(message = "角色id不能为空") - private Long roleId; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java deleted file mode 100644 index 068cc10..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hz.pm.api.sys.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - *

- * 实体类 - * 角色 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "RoleQueryDTO", description = "角色") -public class RoleQueryDTO implements Serializable { - - private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "ID") - private Long id; - - /** - * 角色名称 - */ - @ApiModelProperty(value = "角色名称") - private String name; - /** - * 描述 - */ - @ApiModelProperty(value = "描述") - private String describe; - - /** - * 数据范围 - */ - @ApiModelProperty(value = "数据范围") - private Integer dataScope; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java deleted file mode 100644 index 1d58ef0..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.hz.pm.api.sys.model.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.util.List; - -/** - *

- * 实体类 - * 角色分配 - * 账号角色绑定 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "UserRoleSaveDTO", description = "角色分配 账号角色绑定") -public class UserRoleSaveDTO implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 角色ID - * #c_role - */ - @ApiModelProperty(value = "角色ID") - @NotNull(message = "请选择角色") - private Long roleId; - /** - * 用户ID - * #c_user - */ - @ApiModelProperty(value = "用户ID") - private List userIdList; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/Menu.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/Menu.java index 50e15e9..f0ecf84 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/Menu.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/Menu.java @@ -35,8 +35,6 @@ import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE; @AllArgsConstructor public class Menu extends MenuTreeEntity { - private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "组件") @Size(max = 255, message = "组件长度不能超过255") @TableField(value = "component", condition = LIKE) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java deleted file mode 100644 index d7805cd..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.hz.pm.api.sys.model.entity; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.hz.pm.api.sys.model.enumeration.AuthorizeTypeEnum; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotNull; -import java.time.LocalDateTime; - -/** - *

- * 实体类 - * 角色的资源 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = true) -@Accessors(chain = true) -@TableName("nd_role_authority") -@ApiModel(value = "RoleAuthority", description = "角色的资源") -@AllArgsConstructor -public class RoleAuthority extends BaseEntity { - - private static final long serialVersionUID = 1L; - - private Long id; - - /** - * 资源id - */ - @ApiModelProperty(value = "资源id") - @NotNull(message = "资源id不能为空") - @TableField("authority_id") - private Long authorityId; - - /** - * 权限类型 - * #AuthorizeType{MENU:菜单;RESOURCE:资源;} - */ - @ApiModelProperty(value = "权限类型") - @NotNull(message = "权限类型不能为空") - @TableField("authority_type") - private AuthorizeTypeEnum authorityType; - - /** - * 角色id - * #c_role - */ - @ApiModelProperty(value = "角色id") - @NotNull(message = "角色id不能为空") - @TableField("role_id") - private Long roleId; - - - @Builder - public RoleAuthority(Long id, LocalDateTime createTime, Long createdBy, - Long authorityId, AuthorizeTypeEnum authorityType, Long roleId) { - this.id = id; - this.createOn = createTime; - this.createBy = createdBy; - this.authorityId = authorityId; - this.authorityType = authorityType; - this.roleId = roleId; - } - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleMenuDatascope.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleMenuDatascope.java index b087972..9e67563 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleMenuDatascope.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleMenuDatascope.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; /** *

@@ -16,6 +17,7 @@ import lombok.Data; * @since 2023-01-28 */ @Data +@EqualsAndHashCode(callSuper = true) @TableName("nd_role_menu_datascope") @ApiModel(value = "NdRoleMenuDatascope对象", description = "角色菜单数据权限关联表") public class RoleMenuDatascope extends BaseEntity { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java deleted file mode 100644 index d0788ff..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.hz.pm.api.sys.model.vo; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.hz.pm.api.sys.model.enumeration.AuthorizeTypeEnum; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.ToString; - -import javax.validation.constraints.Size; - -import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE; - -/** - * menuList - * 菜单资源树 - * - * @author PoffyZhang - */ -@Data -@ToString(callSuper = true) -public class MenuResourceTreeVO { - - private AuthorizeTypeEnum type; - private String code; - private String icon; - private Boolean isDef; - /** - * 描述 - */ - @ApiModelProperty(value = "描述") - @Size(max = 200, message = "描述长度不能超过200") - @TableField(value = "describe_", condition = LIKE) - private String describe; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuRoleVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuRoleVO.java index 604528e..2ae9f90 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuRoleVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuRoleVO.java @@ -26,8 +26,6 @@ import lombok.experimental.Accessors; @AllArgsConstructor public class MenuRoleVO extends MenuTreeEntity { - private static final long serialVersionUID = 1L; - /** * 类型;[0-菜单 1-目录 2-按钮] */ diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuVO.java index fcd1cdf..397e8e1 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuVO.java @@ -24,8 +24,6 @@ import lombok.experimental.Accessors; @Builder public class MenuVO { - private static final long serialVersionUID = 1L; - /** * 权限" */ diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/NoticeListItemVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/NoticeListItemVO.java index 39aff82..bab046f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/NoticeListItemVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/NoticeListItemVO.java @@ -21,6 +21,7 @@ public class NoticeListItemVO { @Tolerate public NoticeListItemVO() { + // 默认无参构造 } @ApiModelProperty("公告ID") diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java deleted file mode 100644 index 070e87c..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.hz.pm.api.sys.model.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import java.io.Serializable; -import java.util.List; - -/** - *

- * 实体类 - * 角色下的员工 - *

- * - * @author PoffyZhang - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ToString(callSuper = true) -@EqualsAndHashCode(callSuper = false) -@Builder -@ApiModel(value = "RoleUserSaveVO", description = "给角色分配员工") -public class RoleUserSaveVO implements Serializable { - - private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "绑定或取消") - @NotNull(message = "请填写绑定或取消参数") - private Boolean flag; - /** - * 角色;#c_role - */ - @ApiModelProperty(value = "角色") - @NotNull(message = "请选择角色") - private Long roleId; - /** - * 用户;#c_user - */ - @ApiModelProperty(value = "用户") - @Size(min = 1, message = "请选择用户") - private List userIdList; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java index 6d116cd..13dd296 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java @@ -22,7 +22,7 @@ import com.hz.pm.api.common.model.constant.RegionConst; import com.hz.pm.api.common.model.entity.ExcelExportWriter; import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.common.util.ExcelDownUtil; -import com.hz.pm.api.irs.sign.IRSAPIRequest; +import com.hz.pm.api.irs.sign.IrsSealSignUtil; import com.hz.pm.api.projectdeclared.manage.DeclaredProjectHelper; import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; import com.hz.pm.api.projectdeclared.model.entity.Xinchuang; @@ -65,8 +65,8 @@ import com.hz.pm.api.todocenter.model.vo.TodoCenterStatisticsVO; import com.hz.pm.api.todocenter.model.vo.TodoNumVO; import com.hz.pm.api.todocenter.service.ITodoService; import com.hz.pm.api.todocenter.service.StatisticsService; -import com.hz.pm.api.todocenter.utils.BuildUserUtils; -import com.hz.pm.api.todocenter.utils.ProcessUtil; +import com.hz.pm.api.todocenter.util.BuildUserUtils; +import com.hz.pm.api.todocenter.util.ProcessUtil; import com.hz.pm.api.user.security.model.UserFullInfoDTO; import com.hz.pm.api.user.security.model.UserInfoDetails; import com.hz.pm.api.user.util.LoginUserUtil; @@ -708,7 +708,7 @@ public class TodoCenterManage { Integer signType = req.getSignType(); signReq.setSignType(signType); // 调用盖章接口,获取盖章后返回的pdf文件字符数组 - String signPdf = IRSAPIRequest.createSignPdf(signReq); + String signPdf = IrsSealSignUtil.createSignPdf(signReq); ByteArrayInputStream inputStream = null; if (Objects.nonNull(signPdf)) { try { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java deleted file mode 100644 index bf7e0ec..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.hz.pm.api.todocenter.model.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.math.BigDecimal; - -/** - * pdf生成实体 - * - * @author CMM - * @since 2023/03/13 14:24 - */ -@Data -public class PdfGenerateDTO { - @ApiModelProperty("应用ID") - private Long id; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("是否临时增补 0:否 1:是") - private String isTemporaryAugment; - - @ApiModelProperty("项目负责人") - private String responsibleMan; - - @ApiModelProperty("负责人手机号码") - private String responsibleManMobile; - - @ApiModelProperty("项目联系人") - private String contactName; - - @ApiModelProperty("项目联系人手机号码") - private String contactPhone; - - @ApiModelProperty("建设单位名称") - private String buildOrgName; - - @ApiModelProperty("建设单位统一社会信用代码") - private String orgCreditCode; - - @ApiModelProperty("项目类型 1:建设 2:运维") - private String projectType; - - @ApiModelProperty("是否首次新建 0:否 1:是") - private String isFirst; - - @ApiModelProperty("项目预算年度") - private Integer projectYear; - - @ApiModelProperty("项目建设起止时间") - private String beginAndEndTime; - - @ApiModelProperty("四大体系 1:业务应用 2:应用支撑 3:数据资源 4:基础设施") - private String fourSystems; - - @ApiModelProperty("是否数字化改革项目 0:否 1:是") - private String isDigitalReform; - - @ApiModelProperty("综合业务领域") - private String bizDomain; - - @ApiModelProperty("立项依据") - private String buildBasisList; - - - @ApiModelProperty("是否上云 0:否 1:是") - private String isCloud; - - private String cloudType; - - @ApiModelProperty("等保级别 1:一级 2:二级 3:三级 4:四级 5:五级") - private Integer protectionLevel; - - @ApiModelProperty("是否密评 0:否 1:是") - private Integer isSecretComments; - - @ApiModelProperty("项目简介") - private String projectIntroduction; - - @ApiModelProperty("资金申报情况-申报金额(万元)") - private BigDecimal declareAmount; - - @ApiModelProperty("资金申报情况-自有金额(万元)") - private BigDecimal declareHaveAmount; - - @ApiModelProperty("资金申报情况-政府投资-本级财政资金(万元)") - private BigDecimal declareGovOwnFinanceAmount; - - @ApiModelProperty("资金申报情况-政府投资-上级补助资金(万元)") - private BigDecimal declareGovSuperiorFinanceAmount; - - @ApiModelProperty("银行贷款(万元)") - private BigDecimal declareBankLendingAmount; - - @ApiModelProperty("其它资金(万元)") - private BigDecimal declareOtherAmount; - - @ApiModelProperty("资金分配情况-软件开发(万元)") - private BigDecimal softwareDevelopmentAmount; - - @ApiModelProperty("资金分配情况-云资源、硬件购置(万元)") - private BigDecimal cloudHardwarePurchaseAmount; - - @ApiModelProperty("资金分配情况-第三方服务(万元)") - private BigDecimal thirdPartyAmount; - - @ApiModelProperty("年度支付计划-年度支付计划(万元)") - private BigDecimal annualPlanAmount; - - @ApiModelProperty("年度支付计划-自有金额(万元)") - private BigDecimal annualPlanHaveAmount; - - @ApiModelProperty("年度支付计划-政府投资-本级财政资金(万元)") - private BigDecimal annualPlanGovOwnFinanceAmount; - - @ApiModelProperty("年度支付计划-政府投资-上级补助资金(万元)") - private BigDecimal annualPlanGovSuperiorFinanceAmount; - - @ApiModelProperty("年度支付计划-银行贷款(万元)") - private BigDecimal annualPlanBankLendingAmount; - - @ApiModelProperty("年度支付计划-其它资金(万元)") - private BigDecimal annualPlanOtherAmount; - - @ApiModelProperty("备注") - private String projectRemarks; - - @ApiModelProperty("附件-是否开启 false:关闭 true:开启") - private Boolean isAccessories; - - @ApiModelProperty("备注-是否开启 false:关闭 true:开启") - private Boolean isRemarks; - - @ApiModelProperty("年度支付计划-是否开启 false:关闭 true:开启") - private Boolean isAnnualPlanAmount; - - @ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启") - private Boolean isInnovateWholeProvinceShare; - - @ApiModelProperty("本地区大数据局名称") - private String bidDataBureauName; - - @ApiModelProperty("年度计划投资") - private BigDecimal yearPlanInvest; - - @ApiModelProperty("21位项目编号") - private String projectCode; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java deleted file mode 100644 index 90d0af3..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.hz.pm.api.todocenter.model.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心抄送我的项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResCcMeExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java deleted file mode 100644 index 6c60966..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.hz.pm.api.todocenter.model.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心我已处理项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResHandledExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; - - @ExcelProperty("处理时间") - private LocalDateTime processHandleTime; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java deleted file mode 100644 index 0426593..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.hz.pm.api.todocenter.model.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心我发起的项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResMySubmittedExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/po/TodoCenterStatisticsPO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/po/TodoCenterStatisticsPO.java index 06cf23c..d27be51 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/po/TodoCenterStatisticsPO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/po/TodoCenterStatisticsPO.java @@ -17,7 +17,7 @@ public class TodoCenterStatisticsPO { @ApiModelProperty("已处理数") private Integer idoNum = 0; @ApiModelProperty("我发起数") - private Integer mysubmitNum = 0; + private Integer mySubmitNum = 0; @ApiModelProperty("抄送我数") private Integer ccmeNum = 0; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java deleted file mode 100644 index f016c58..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.hz.pm.api.todocenter.model.vo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 获取未盖章pdf文件接口返回信息 - * @return - * @author CMM - * @since 2023/07/15 16:53 - */ -@Data -public class NotSealedInfoVO { - - @ApiModelProperty("未盖章PDF文件ID") - private Long fileId; - - @ApiModelProperty("是否提交了审核意见") - private Boolean isCommit = Boolean.FALSE; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/StatisticsServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/StatisticsServiceImpl.java index 1dd5bf2..db2cd51 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/StatisticsServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/StatisticsServiceImpl.java @@ -6,7 +6,6 @@ import com.hz.pm.api.todocenter.service.StatisticsService; import com.wflow.workflow.bean.dto.TodoCenterListReqDTO; import com.wflow.workflow.service.ProcessTaskService; import lombok.AllArgsConstructor; -import org.flowable.engine.TaskService; import org.springframework.stereotype.Service; import java.util.Objects; @@ -22,10 +21,8 @@ import java.util.Objects; public class StatisticsServiceImpl implements StatisticsService { private final StatisticsMapper mapper; - private final ProcessTaskService processTaskService; - private final TaskService taskService; @Override public TodoCenterStatisticsPO getStatistics(Long userId) { @@ -40,12 +37,12 @@ public class StatisticsServiceImpl implements StatisticsService { res.setIdoNum(idoCount); TodoCenterStatisticsPO submit = mapper.mysubmitNum(userIdStr); - if(Objects.nonNull(submit)){ - res.setMysubmitNum(submit.getMysubmitNum()); + if (Objects.nonNull(submit)) { + res.setMySubmitNum(submit.getMySubmitNum()); } TodoCenterStatisticsPO ccMe = mapper.ccNums(userIdStr); - if(Objects.nonNull(ccMe)){ + if (Objects.nonNull(ccMe)) { res.setCcmeNum(ccMe.getCcmeNum()); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/TodoServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/TodoServiceImpl.java index 4ca0c82..19509d1 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/TodoServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/TodoServiceImpl.java @@ -11,12 +11,11 @@ import com.hz.pm.api.projectlib.service.IProjectInstService; import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.todocenter.handle.PassHandle; import com.hz.pm.api.todocenter.handle.WithDrawHandle; -import com.hz.pm.api.todocenter.manage.HandlerManage; import com.hz.pm.api.todocenter.model.req.ProcessDetailReq; import com.hz.pm.api.todocenter.model.vo.ProcessProgressDetailVO; import com.hz.pm.api.todocenter.service.ITodoService; -import com.hz.pm.api.todocenter.utils.BuildUserUtils; -import com.hz.pm.api.todocenter.utils.ProcessUtil; +import com.hz.pm.api.todocenter.util.BuildUserUtils; +import com.hz.pm.api.todocenter.util.ProcessUtil; import com.hz.pm.api.user.security.model.UserFullInfoDTO; import com.hz.pm.api.user.security.model.UserInfoDetails; import com.hz.pm.api.user.util.LoginUserUtil; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java @@ -0,0 +1,56 @@ +package com.hz.pm.api.todocenter.util; + +import cn.hutool.core.collection.CollUtil; +import com.google.common.collect.Sets; +import com.hz.pm.api.user.manage.UserInfoManage; +import com.ningdatech.basic.util.CollUtils; +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import com.wflow.workflow.bean.process.ProgressNode; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * 装配节点用户信息工具类 + * + * @author CMM + * @since 2023/03/08 11:52 + */ +@Slf4j +@RequiredArgsConstructor +@Component +public class BuildUserUtils { + + private final UserInfoManage userInfoManage; + + public void buildUserByProcessInfo(List progressInfo) { + Set userSet = Sets.newHashSet(); + progressInfo.forEach(node -> { + if (CollUtil.isNotEmpty(node.getChildren())) { + for (ProgressNode innerNode : node.getChildren()) { + userSet.add(innerNode.getUserId()); + } + } else { + userSet.add(node.getUserId()); + } + }); + List tmpUserIds = CollUtils.convert(userSet, Long::parseLong); + Map userMap = userInfoManage.getUserMapByUserIds(tmpUserIds); + buildUser(progressInfo, userMap); + } + + private void buildUser(List progressInfo, Map userMap) { + for (ProgressNode progressNode : progressInfo) { + progressNode.setUser(userMap.get(progressNode.getUserId())); + if (CollUtil.isNotEmpty(progressNode.getChildren())) { + buildUser(progressNode.getChildren(), userMap); + } + } + } + + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java new file mode 100644 index 0000000..a8f5680 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java @@ -0,0 +1,46 @@ +package com.hz.pm.api.todocenter.util; + +import cn.hutool.core.collection.CollUtil; +import com.wflow.workflow.bean.process.ProgressNode; + +import java.util.List; + +/** + *

+ * ProcessUtil + *

+ * + * @author WendyYang + * @since 14:45 2024/4/16 + */ +public class ProcessUtil { + + private ProcessUtil() { + + } + + /** + * 判断是否包含 此任务 + * + * @param nodes \ + * @param taskId \ + * @return \ + */ + public static boolean containsTask(List nodes, String taskId) { + if (CollUtil.isEmpty(nodes)) { + return Boolean.FALSE; + } + + for (ProgressNode node : nodes) { + if (node.getTaskId().equals(taskId)) { + return Boolean.TRUE; + } + if (CollUtil.isNotEmpty(node.getChildren()) && + (containsTask(node.getChildren(), taskId))) { + return Boolean.TRUE; + } + } + return Boolean.FALSE; + } + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/BuildUserUtils.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/BuildUserUtils.java deleted file mode 100644 index ac2784b..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/BuildUserUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.hz.pm.api.todocenter.utils; - -import cn.hutool.core.collection.CollUtil; -import com.google.common.collect.Sets; -import com.hz.pm.api.user.manage.UserInfoManage; -import com.ningdatech.basic.util.CollUtils; -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import com.wflow.workflow.bean.process.ProgressNode; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * 装配节点用户信息工具类 - * - * @author CMM - * @since 2023/03/08 11:52 - */ -@Slf4j -@RequiredArgsConstructor -@Component -public class BuildUserUtils { - - private final UserInfoManage userInfoManage; - - public void buildUserByProcessInfo(List progressInfo) { - Set userSet = Sets.newHashSet(); - progressInfo.forEach(node -> { - if (CollUtil.isNotEmpty(node.getChildren())) { - for (ProgressNode innerNode : node.getChildren()) { - userSet.add(innerNode.getUserId()); - } - } else { - userSet.add(node.getUserId()); - } - }); - List tmpUserIds = CollUtils.convert(userSet, Long::parseLong); - Map userMap = userInfoManage.getUserMapByUserIds(tmpUserIds); - buildUser(progressInfo, userMap); - } - - private void buildUser(List progressInfo, Map userMap) { - for (ProgressNode progressNode : progressInfo) { - progressNode.setUser(userMap.get(progressNode.getUserId())); - if (CollUtil.isNotEmpty(progressNode.getChildren())) { - buildUser(progressNode.getChildren(), userMap); - } - } - } - - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/ProcessUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/ProcessUtil.java deleted file mode 100644 index d275ec5..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/ProcessUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.hz.pm.api.todocenter.utils; - -import cn.hutool.core.collection.CollUtil; -import com.wflow.workflow.bean.process.ProgressNode; - -import java.util.List; - -/** - *

- * ProcessUtil - *

- * - * @author WendyYang - * @since 14:45 2024/4/16 - */ -public class ProcessUtil { - - private ProcessUtil() { - - } - - /** - * 判断是否包含 此任务 - * - * @param nodes \ - * @param taskId \ - * @return \ - */ - public static boolean containsTask(List nodes, String taskId) { - if (CollUtil.isEmpty(nodes)) { - return Boolean.FALSE; - } - - for (ProgressNode node : nodes) { - if (node.getTaskId().equals(taskId)) { - return Boolean.TRUE; - } - if (CollUtil.isNotEmpty(node.getChildren()) && - (containsTask(node.getChildren(), taskId))) { - return Boolean.TRUE; - } - } - return Boolean.FALSE; - } - -} diff --git a/hz-pm-api/src/main/resources/application-dev.yml b/hz-pm-api/src/main/resources/application-dev.yml index c15911b..c2ea566 100644 --- a/hz-pm-api/src/main/resources/application-dev.yml +++ b/hz-pm-api/src/main/resources/application-dev.yml @@ -213,4 +213,15 @@ expert-invite: skip-send-sms: true mh-system-replace-sync: - open: false \ No newline at end of file + open: false + +thread-pool-util: + request: + core-pool-size: 2 + max-pool-size: 4 + queue-capacity: 100 + keep-alive-seconds: 120 + thread-name-prefix: request-executor- + scheduler: + core-pool-size: 2 + thread-name-prefix: scheduler-executor- \ No newline at end of file diff --git a/hz-pm-api/src/main/resources/application-prod.yml b/hz-pm-api/src/main/resources/application-prod.yml index a686c0b..8d92e3d 100644 --- a/hz-pm-api/src/main/resources/application-prod.yml +++ b/hz-pm-api/src/main/resources/application-prod.yml @@ -226,3 +226,25 @@ mobile-call: hz-pm: interfaceKey: hz_meeting_expert_info +thread-pool-util: + request: + core-pool-size: 5 + max-pool-size: 10 + queue-capacity: 200 + keep-alive-seconds: 120 + thread-name-prefix: request-executor- + scheduler: + core-pool-size: 4 + thread-name-prefix: scheduler-executor- + +# 工作流线程池配置 +wflow-thread-pool-util: + scheduler: + core-pool-size: 4 + thread-name-prefix: wflow-thread-scheduler- + executor: + core-pool-size: 4 + thread-name-prefix: wflow-thread-executor- + queue-capacity: 300 + keep-alive-seconds: 120 + max-pool-size: 8