ソースを参照

modify:

1. 线程池配置优化;
tags/24082601
WendyYang 2ヶ月前
コミット
03a8c792d6
91個のファイルの変更220行の追加3661行の削除
  1. +46
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/common/config/ThreadPoolUtilProperties.java
  2. +0
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/common/helper/basic/AbstractRegionLimitHelper.java
  3. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/common/helper/impl/RegionLimitHelperImpl.java
  4. +0
    -16
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java
  5. +0
    -14
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java
  6. +0
    -172
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java
  7. +0
    -200
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java
  8. +0
    -24
      hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java
  9. +0
    -53
      hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java
  10. +19
    -10
      hz-pm-api/src/main/java/com/hz/pm/api/common/util/ThreadPoolUtil.java
  11. +0
    -33
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java
  12. +0
    -260
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java
  13. +0
    -93
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java
  14. +0
    -25
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java
  15. +0
    -21
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java
  16. +0
    -29
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java
  17. +0
    -29
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java
  18. +0
    -23
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java
  19. +0
    -24
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java
  20. +0
    -45
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java
  21. +0
    -37
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java
  22. +0
    -257
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java
  23. +0
    -21
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java
  24. +0
    -378
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java
  25. +0
    -34
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java
  26. +0
    -30
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java
  27. +0
    -30
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java
  28. +0
    -58
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java
  29. +0
    -39
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java
  30. +0
    -31
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java
  31. +0
    -36
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java
  32. +0
    -39
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java
  33. +0
    -52
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java
  34. +0
    -58
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java
  35. +0
    -34
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java
  36. +0
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java
  37. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java
  38. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml
  39. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/fiscal/service/impl/CompanyFiscalCodeServiceImpl.java
  40. +12
    -7
      hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java
  41. +8
    -8
      hz-pm-api/src/main/java/com/hz/pm/api/gov/convert/ProjectConvert.java
  42. +0
    -53
      hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java
  43. +0
    -44
      hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java
  44. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/gov/manage/GovProjectCollectionManage.java
  45. +0
    -24
      hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java
  46. +0
    -34
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java
  47. +0
    -38
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java
  48. +0
    -24
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java
  49. +0
    -25
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java
  50. +0
    -28
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java
  51. +0
    -37
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java
  52. +0
    -123
      hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java
  53. +19
    -25
      hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java
  54. +0
    -53
      hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java
  55. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/task/MsgCallReplyRewriteTask.java
  56. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java
  57. +0
    -79
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java
  58. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProcessProgressHelper.java
  59. +44
    -41
      hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/EarlyWarningProjectTask.java
  60. +0
    -18
      hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java
  61. +3
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticePermissionsEnum.java
  62. +3
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/NoticeTypeEnum.java
  63. +3
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/sys/enumeration/ProjectEarlyWarningStatusEnum.java
  64. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/RegionManage.java
  65. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RegionDTO.java
  66. +0
    -63
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java
  67. +0
    -68
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java
  68. +0
    -53
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java
  69. +0
    -48
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java
  70. +0
    -47
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java
  71. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/Menu.java
  72. +0
    -74
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java
  73. +2
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleMenuDatascope.java
  74. +0
    -35
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java
  75. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuRoleVO.java
  76. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuVO.java
  77. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/NoticeListItemVO.java
  78. +0
    -48
      hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java
  79. +4
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java
  80. +0
    -149
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java
  81. +0
    -41
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java
  82. +0
    -44
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java
  83. +0
    -41
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java
  84. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/po/TodoCenterStatisticsPO.java
  85. +0
    -20
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java
  86. +3
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/StatisticsServiceImpl.java
  87. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/service/impl/TodoServiceImpl.java
  88. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java
  89. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java
  90. +12
    -1
      hz-pm-api/src/main/resources/application-dev.yml
  91. +22
    -0
      hz-pm-api/src/main/resources/application-prod.yml

+ 46
- 0
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;

/**
* <p>
* ThreadPoolUtilProperties
* </p>
*
* @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;

}

}

+ 0
- 4
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;

}

+ 3
- 3
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<String> adminAllContainsRegionCodes


+ 0
- 16
hz-pm-api/src/main/java/com/hz/pm/api/common/model/ZwddTokenUser.java ファイルの表示

@@ -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;
}

+ 0
- 14
hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/DingConst.java ファイルの表示

@@ -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";
}

+ 0
- 172
hz-pm-api/src/main/java/com/hz/pm/api/common/model/constant/ProjectDeclareConst.java ファイルの表示

@@ -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;
}
}

+ 0
- 200
hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ExcelExportDTO.java ファイルの表示

@@ -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;
}

+ 0
- 24
hz-pm-api/src/main/java/com/hz/pm/api/common/model/entity/ViewRegionDTO.java ファイルの表示

@@ -1,24 +0,0 @@
package com.hz.pm.api.common.model.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Collection;

/**
* <p>
* ViewRegionDTO
* </p>
*
* @author WendyYang
* @since 2023/4/27
**/
@Data
@AllArgsConstructor
public class ViewRegionDTO {

private Collection<String> regions;

private Integer regionLevel;

}

+ 0
- 53
hz-pm-api/src/main/java/com/hz/pm/api/common/util/CommonInputStreamResource.java ファイルの表示

@@ -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 会通过这个方法获取大小。然后当真正需要读取内容的时候,发现已经读完,会报如下错误。
* <code>
* 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)
* </code>
* <p>
* ref:com.amazonaws.services.s3.model.S3ObjectInputStream#available()
*
* @return
*/
@Override
public long contentLength() {
int estimate = length;
return estimate == 0 ? 1 : estimate;
}
}

+ 19
- 10
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();


+ 0
- 33
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/enums/CockpitAppcationTypeEnum.java ファイルの表示

@@ -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;
}
}

+ 0
- 260
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/handle/CockpitStatsHandler.java ファイルの表示

@@ -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<Integer> 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<CockpitApplication> 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<QualityData> convertQualityData(Integer year) {
List<CockpitStats> 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<String, List<CockpitApplication>> convertCockpitApps(List<CockpitApplication> appDatas) {
Map<String, List<CockpitApplication>> 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<PerformanceTop> convertTops(CockpitStats cockpitStats) {
List<PerformanceTop> 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<AmountComparisonChart> convertAmountComparisonChart(CockpitStats cockpitStats) {
List<AmountComparisonChart> 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<CockpitStatsVO.MapProjectsData> convertMapProjectsData(Integer year) {
List<CockpitStatsVO.MapProjectsData> mapProjectsDatas = Lists.newArrayList();
List<RegionDTO> 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<CockpitStats> cockpitStatsAll = cockpitStatsService.list(Wrappers.lambdaQuery(CockpitStats.class)
.eq(Objects.nonNull(year), CockpitStats::getYear, year)
.eq(Objects.isNull(year), CockpitStats::getYear, NONE_YEAR));
Map<String, Integer> 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<CockpitStatsVO.ExpertRegion> buildExpertRegionData(CockpitStats cockpitStats) {
List<CockpitStatsVO.ExpertRegion> regionData = Lists.newArrayList();
List<RegionDTO> 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<CockpitStats> cs = cockpitStatsService.list();
Map<String, Integer> 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<CockpitStatsVO.SafetyInput> computeSafetyRate(String regionCode) {
List<CockpitStats> 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<SecrecyGradeChart> buildSecrecyGradeCharts(CockpitStats cockpitStats) {
List<SecrecyGradeChart> 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<PasswordGradeChart> buildPasswordGradeCharts(CockpitStats cockpitStats) {
List<PasswordGradeChart> 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;
}

}

+ 0
- 93
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/CockpitStatsManage.java ファイルの表示

@@ -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<CockpitApplication> aps = cockpitApplicationService
.list(Wrappers.lambdaQuery(CockpitApplication.class)
.orderByAsc(CockpitApplication::getCreateOn));

return convertCockpitStats.convertCockpitStats(cockpitStats,regionCode,year,aps);
}

public void save(List<CockpitStatsSaveDTO> saves) {
for(CockpitStatsSaveDTO save : saves){
List<CockpitStats> 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<CockpitApplicationDTO> cockpitApplications = save.getCockpitApplications();
if(CollUtil.isNotEmpty(cockpitApplications)){
List<CockpitApplication> applications = cockpitApplications.stream()
.map(a -> BeanUtil.copyProperties(a,CockpitApplication.class))
.collect(Collectors.toList());
cockpitApplicationService.saveBatch(applications);
}
}
}
}
}

+ 0
- 25
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisChart.java ファイルの表示

@@ -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<AnalysisData> dataList;

}

+ 0
- 21
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/AnalysisData.java ファイルの表示

@@ -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;
}

+ 0
- 29
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/CompanyProjectCntBO.java ファイルの表示

@@ -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;

}

+ 0
- 29
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/ProjectATIISBO.java ファイルの表示

@@ -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;
}

+ 0
- 23
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/QueryTimeYearBO.java ファイルの表示

@@ -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;
}

+ 0
- 24
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/StarExpertBO.java ファイルの表示

@@ -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;
}

+ 0
- 45
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/basic/YearTrendBO.java ファイルの表示

@@ -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;

/**
* 建设类项目总数
*/

/**
* 运维类项目总数
*/

/**
* 建设类项目批复金额
*/

/**
* 运维类项目批复金额
*/

/**
* 资金核定率
*/

/**
* 立项率
*/
}

+ 0
- 37
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitApplicationDTO.java ファイルの表示

@@ -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;

}

+ 0
- 257
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/dto/CockpitStatsSaveDTO.java ファイルの表示

@@ -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<CockpitApplicationDTO> cockpitApplications;
}

+ 0
- 21
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/po/QueryYearPO.java ファイルの表示

@@ -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;
}

+ 0
- 378
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/CockpitStatsVO.java ファイルの表示

@@ -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<MapProjectsData> 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<String,List<CockpitApplication>> appDatas;

@ApiModelProperty("数据质量区域信息")
private List<QualityData> 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<SafetyInput> monitorSafetyInputRate;

@ApiModelProperty("项目监控-等保等级图")
private List<SecrecyGradeChart> secrecyGradeCharts;

@ApiModelProperty("项目监控-密保等级图")
private List<PasswordGradeChart> 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<ExpertRegion> 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> excellentProjects;
}

@Data
public static class ExcellentProjects {
@ApiModelProperty("项目CODE")
private String projectCode;

@ApiModelProperty("项目名")
private String projectName;

@ApiModelProperty("项目简介")
private String projectIntroduction;

@ApiModelProperty("标签")
private List<Tag> tags;
}

@Data
public static class ReduceData {
@ApiModelProperty("核减资金")
private BigDecimal reduceFundsTotal;

@ApiModelProperty("驳回节约资金")
private BigDecimal rejectSavingsFunds;

@ApiModelProperty("资金对比图")
private List<AmountComparisonChart> 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<PerformanceTop> 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;
}
}

+ 0
- 34
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardInvestmentSummaryVO.java ファイルの表示

@@ -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<ProjectATIISBO> projectATIISTop5List;

@ApiModelProperty("单位预算TOP5")
private List<CompanyProjectCntBO> companyProjectATIISTop5List;

@ApiModelProperty("各领域项目投资金额,各区域项目投资情况")
private List<AnalysisChart> analysisChartList;
}

+ 0
- 30
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectCntSummaryVO.java ファイルの表示

@@ -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<CompanyProjectCntBO> companyProjectCntTop5List;

@ApiModelProperty("项目增补情况,各类型项目数量,各区域项目数量,各领域项目数量,各阶段项目数量")
private List<AnalysisChart> analysisChartList;

}

+ 0
- 30
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectPortraitVO.java ファイルの表示

@@ -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<Tag> projectFeatures;

@ApiModelProperty("项目产出")
private Map<String, PortraitProjectOutputVO> projectOutput;

}


+ 0
- 58
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/DashboardProjectSummaryVO.java ファイルの表示

@@ -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;


}

+ 0
- 39
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/EarlyWarningStatisticsVO.java ファイルの表示

@@ -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<DataDTO> threeYearsAlarms;

@ApiModelProperty("当前各流程报警情况")
private List<DataDTO> alarmsFlowsNow;

@ApiModelProperty("当前各填报报警情况")
private List<DataDTO> alarmsFillingNow;

@ApiModelProperty("建设周期预警监测")
private List<DataDTO> constructionAlarms;

@ApiModelProperty("安全监测")
private List<DataDTO> safetyMonitoring;
}

+ 0
- 31
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ExpertDashboardSummaryVO.java ファイルの表示

@@ -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<StarExpertBO> starExpertList;

@ApiModelProperty("评审次数")
private Integer meetingCnt;

@ApiModelProperty("图表列表 各区域专家总数,学历分布,职称级别分布,各类型评审次数")
List<AnalysisChart> analysisChartList;


}


+ 0
- 36
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/MeetingStatisticsVO.java ファイルの表示

@@ -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<DataDTO> regionMeetings;

@ApiModelProperty("预审/验收 会议情况")
private List<DataDTO> meetingTypes;

@ApiModelProperty("各区县不通过率")
private List<DataDTO> notPassRegionMeetings;

@ApiModelProperty("各部门不通过top10")
private List<DataDTO> notPassTop10;
}

+ 0
- 39
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/PerformanceStatisticsVO.java ファイルの表示

@@ -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<DataDTO> regionMeetings;

@ApiModelProperty("预审/验收 会议情况")
private List<DataDTO> meetingTypes;

@ApiModelProperty("各区县不通过率")
private List<DataDTO> notPassRegionMeetings;

@ApiModelProperty("各部门不通过top10")
private List<DataDTO> notPassTop10;
}

+ 0
- 52
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProjectStatisticsVO.java ファイルの表示

@@ -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<DataDTO> progresses;

@ApiModelProperty("近三年平均批复周期")
private List<DataDTO> threeYearsApprovalCycleAvg;

@ApiModelProperty("近三年平均建设周期")
private List<DataDTO> threeYearsConstructionCycleAvg;

@ApiModelProperty("项目分布类型")
private List<DataDTO> projectTypeDistribution;

@ApiModelProperty("金额变更统计TOP10")
private List<DataDTO> amountChangeTop10;

@ApiModelProperty("项目撤销统计TOP10")
private List<DataDTO> revokeTop10;

@ApiModelProperty("项目终止统计TOP10")
private List<DataDTO> terminationTop10;

@ApiModelProperty("项目延期统计TOP10")
private List<DataDTO> delayTop10;
}

+ 0
- 58
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectInfoVO.java ファイルの表示

@@ -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<ProtraitProjectStatusSituationVO> statusSituation;

@ApiModelProperty("系统定位")
private String systemPosition;
}


+ 0
- 34
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/model/vo/ProtraitProjectStatusSituationVO.java ファイルの表示

@@ -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;
}


+ 0
- 6
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:


hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.java → hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.java ファイルの表示

@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author Lierbao
* @since 2023-02-10
*/
public interface NdCompanyFiscalCodeMapper extends BaseMapper<CompanyFiscalCode> {
public interface CompanyFiscalCodeMapper extends BaseMapper<CompanyFiscalCode> {

}

hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/NdCompanyFiscalCodeMapper.xml → hz-pm-api/src/main/java/com/hz/pm/api/fiscal/mapper/CompanyFiscalCodeMapper.xml ファイルの表示

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hz.pm.api.fiscal.mapper.NdCompanyFiscalCodeMapper">
<mapper namespace="com.hz.pm.api.fiscal.mapper.CompanyFiscalCodeMapper">

</mapper>

+ 2
- 3
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<NdCompanyFiscalCodeMapper, CompanyFiscalCode> implements ICompanyFiscalCodeService {
public class CompanyFiscalCodeServiceImpl extends ServiceImpl<CompanyFiscalCodeMapper, CompanyFiscalCode> implements ICompanyFiscalCodeService {


@Override


hz-pm-api/src/main/java/com/hz/pm/api/gov/contants/BizProjectContant.java → hz-pm-api/src/main/java/com/hz/pm/api/gov/contant/BizProjectCont.java ファイルの表示

@@ -1,4 +1,4 @@
package com.hz.pm.api.gov.contants;
package com.hz.pm.api.gov.contant;

/**
* @Classname BizProjectContant
@@ -6,15 +6,20 @@ package com.hz.pm.api.gov.contants;
* @Date 2023/8/25 11:03
* @Author PoffyZhang
*/
public interface BizProjectContant {
public class BizProjectCont {

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";
private BizProjectCont() {
}

public static final String NOT_EFFECTIVE_CODE = "1";

public static final String EFFECTIVE_CODE = "2";

public static class ProjectCollection {

String EFFECTIVE_CODE = "2";
private ProjectCollection() {
}

class ProjectCollection {
//有效
public static final String IS_EFFECTIVE = "02";
//有效

+ 8
- 8
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()));


+ 0
- 53
hz-pm-api/src/main/java/com/hz/pm/api/gov/enumeration/GovProjectClassifiedEnum.java ファイルの表示

@@ -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;
}
}

+ 0
- 44
hz-pm-api/src/main/java/com/hz/pm/api/gov/helper/GovBusinessStripHelper.java ファイルの表示

@@ -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<ExpertGovBusinessStrip> assemblerBusinessStripInfoList(List<String> businessStripCodeList) {
List<ExpertGovBusinessStrip> businessStripInfoList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(businessStripCodeList)) {
Map<String, String> 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;
}

}

+ 3
- 3
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();


+ 0
- 24
hz-pm-api/src/main/java/com/hz/pm/api/irs/controller/OrganizationController.java ファイルの表示

@@ -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 {

}

+ 0
- 34
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplyDTO.java ファイルの表示

@@ -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;

}

+ 0
- 38
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiApplySearchResult.java ファイルの表示

@@ -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;

}

+ 0
- 24
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiDTO.java ファイルの表示

@@ -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;
}

+ 0
- 25
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ApiSearchResult.java ファイルの表示

@@ -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> apiApplySearchResult;

}

+ 0
- 28
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/ForwardDTO.java ファイルの表示

@@ -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<String,Object> data;
}

+ 0
- 37
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/dto/PushProjectAppToIrsDTO.java ファイルの表示

@@ -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;
}

+ 0
- 123
hz-pm-api/src/main/java/com/hz/pm/api/irs/model/res/ApiResponse.java ファイルの表示

@@ -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;

/**
* <p>
* ApiResponse - 统一的接口返回值封装
* </p>
*
* @author WendyYang
* @since 14:29 2022/9/29
*/
@Data
@NoArgsConstructor
public class ApiResponse<T> 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 <T> ApiResponse<T> of(Integer code, String message, T data,Boolean success) {
return new ApiResponse<>(code, message, data,success);
}

/**
* 构造一个成功且不带数据的API返回
*
* @return ApiResponse
*/
public static <T> ApiResponse<T> ofSuccess() {
return ofSuccess(null);
}

/**
* 构造一个成功且带数据的API返回
*
* @param data 返回数据
* @return ApiResponse
*/
public static <T> ApiResponse<T> ofSuccess(T data) {
return ofStatus(Status.OK, data,Boolean.TRUE);
}

/**
* 构造一个成功且自定义消息的API返回
*
* @param message 返回内容
* @return ApiResponse
*/
public static <T> ApiResponse<T> ofMessage(String message) {
return of(Status.OK.getCode(), message, null,Boolean.TRUE);
}

/**
* 构造一个有状态的API返回
*
* @param status 状态 {@link Status}
* @return ApiResponse
*/
public static <T> ApiResponse<T> ofStatus(ApiStatus status) {
return ofStatus(status, null,Boolean.TRUE);
}

/**
* 构造一个有状态且带数据的API返回
*
* @param status 状态 {@link Status}
* @param data 返回数据
* @return ApiResponse
*/
public static <T> ApiResponse<T> ofStatus(ApiStatus status, T data,Boolean success) {
return of(status.getCode(), status.getReasonPhrase(), data,success);
}
}

hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IRSAPIRequest.java → hz-pm-api/src/main/java/com/hz/pm/api/irs/sign/IrsSealSignUtil.java ファイルの表示

@@ -28,20 +28,33 @@ 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;

/**
* <p>
* IrsApiRequest
* </p>
*
* @author WendyYang
* @since 00:34 2024/8/24
*/
@Slf4j
public class IRSAPIRequest {
public class IrsSealSignUtil {

private IrsSealSignUtil() {
}

/**
* pdf文件盖章
* 接口地址:/V1/accounts/outerAccounts/create
*
* @return
* @return \
*/
public static String createSignPdf(SignReqDTO req) {
String pdfEncode64 = req.getPdfEncode64();
@@ -65,7 +78,6 @@ public class IRSAPIRequest {
} 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);
@@ -74,7 +86,7 @@ public class IRSAPIRequest {
}


public static String post(JSONObject data, String requestMethod) throws Exception {
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);
@@ -140,7 +152,7 @@ public class IRSAPIRequest {
return strRes;
}

private static String sign(byte[] stream) throws Exception {
private static String sign(byte[] stream) throws NoSuchAlgorithmException, InvalidKeyException {
// 获取消息验证码类的实例,算法选择"HmacSHA256"
Mac mac = Mac.getInstance("HmacSHA256");

@@ -158,25 +170,7 @@ public class IRSAPIRequest {

}

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) {
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();
@@ -189,7 +183,7 @@ public class IRSAPIRequest {
return builder.toString();
}

public static byte[] readStream(InputStream in) throws IOException {
private static byte[] readStream(InputStream in) throws IOException {

ByteArrayOutputStream output = new ByteArrayOutputStream();


+ 0
- 53
hz-pm-api/src/main/java/com/hz/pm/api/irs/utils/RefreshTokenUtil.java ファイルの表示

@@ -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<String> 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;
}

}

+ 1
- 1
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<MsgCallRecord> query = Wrappers.lambdaQuery(MsgCallRecord.class)


+ 1
- 1
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;


+ 0
- 79
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/contant/DeclaredProjectConst.java
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 1
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;


+ 44
- 41
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<Project> 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<ProjectEarlyWarning> 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<ProjectEarlyWarning> toRemove = warnings.stream()
.filter(w -> !projectMap.containsKey(w.getProjectCode()))
.collect(Collectors.toList());
if(CollUtil.isNotEmpty(toRemove)){
if (CollUtil.isNotEmpty(toRemove)) {
List<Long> removeIds = toRemove.stream().map(ProjectEarlyWarning::getId)
.collect(Collectors.toList());
projectEarlyWarningService.removeBatchByIds(removeIds);
@@ -124,7 +126,7 @@ public class EarlyWarningProjectTask {

//3.去查询 各个报警 是否已经正常
List<ProjectEarlyWarning> 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<ProjectEarlyWarning> 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<ProjectEarlyWarning> 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<ProjectEarlyWarning> 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<ProjectEarlyWarning> 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<Task> 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());
}


+ 0
- 18
hz-pm-api/src/main/java/com/hz/pm/api/sys/controller/NdMsgCallRecordController.java ファイルの表示

@@ -1,18 +0,0 @@
package com.hz.pm.api.sys.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

/**
* <p>
* 前端控制器
* </p>
*
* @author WendyYang
* @since 2024-04-25
*/
@Controller
@RequestMapping("/api.sys/ndMsgCallRecord")
public class NdMsgCallRecordController {

}

+ 3
- 5
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)) {


+ 3
- 5
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)) {


+ 3
- 5
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)) {


+ 0
- 2
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) {


+ 1
- 0
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() {
// 默认无参构造
}

/**


+ 0
- 63
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceSaveDTO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 资源
* </p>
*
* @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;

}

+ 0
- 68
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/ResourceUpdateDTO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 资源
* </p>
*
* @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;
}

+ 0
- 53
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleAuthoritySaveDTO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 角色的资源
* </p>
*
* @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<Long> menuIdList;

/**
* 资源id
* #c_resource
*/
private List<Long> resourceIdList;

/**
* 角色id
* #c_role
*/
@ApiModelProperty(value = "角色id")
@NotNull(message = "角色id不能为空")
private Long roleId;

}

+ 0
- 48
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/RoleQueryDTO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 角色
* </p>
*
* @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;
}

+ 0
- 47
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/dto/UserRoleSaveDTO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 角色分配
* 账号角色绑定
* </p>
*
* @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<Long> userIdList;

}

+ 0
- 2
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<Menu> {

private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "组件")
@Size(max = 255, message = "组件长度不能超过255")
@TableField(value = "component", condition = LIKE)


+ 0
- 74
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/entity/RoleAuthority.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 角色的资源
* </p>
*
* @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;
}

}

+ 2
- 0
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;

/**
* <p>
@@ -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 {


+ 0
- 35
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/MenuResourceTreeVO.java ファイルの表示

@@ -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;

}

+ 0
- 2
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<MenuRoleVO> {

private static final long serialVersionUID = 1L;

/**
* 类型;[0-菜单 1-目录 2-按钮]
*/


+ 0
- 2
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;

/**
* 权限"
*/


+ 1
- 0
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")


+ 0
- 48
hz-pm-api/src/main/java/com/hz/pm/api/sys/model/vo/RoleUserSaveVO.java ファイルの表示

@@ -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;

/**
* <p>
* 实体类
* 角色下的员工
* </p>
*
* @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<Long> userIdList;

}

+ 4
- 4
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 {


+ 0
- 149
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/PdfGenerateDTO.java ファイルの表示

@@ -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;
}

+ 0
- 41
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResCcMeExportDTO.java ファイルの表示

@@ -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;
}

+ 0
- 44
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResHandledExportDTO.java ファイルの表示

@@ -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;
}

+ 0
- 41
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/dto/ResMySubmittedExportDTO.java ファイルの表示

@@ -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;
}

+ 1
- 1
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;



+ 0
- 20
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/NotSealedInfoVO.java ファイルの表示

@@ -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;
}

+ 3
- 6
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());
}



+ 2
- 3
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;


hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/BuildUserUtils.java → hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/BuildUserUtils.java ファイルの表示

@@ -1,4 +1,4 @@
package com.hz.pm.api.todocenter.utils;
package com.hz.pm.api.todocenter.util;

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Sets;

hz-pm-api/src/main/java/com/hz/pm/api/todocenter/utils/ProcessUtil.java → hz-pm-api/src/main/java/com/hz/pm/api/todocenter/util/ProcessUtil.java ファイルの表示

@@ -1,4 +1,4 @@
package com.hz.pm.api.todocenter.utils;
package com.hz.pm.api.todocenter.util;

import cn.hutool.core.collection.CollUtil;
import com.wflow.workflow.bean.process.ProgressNode;

+ 12
- 1
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
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-

+ 22
- 0
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

読み込み中…
キャンセル
保存