@@ -4,8 +4,6 @@ import cn.hutool.core.util.RandomUtil; | |||
import lombok.Data; | |||
import org.springframework.boot.context.properties.ConfigurationProperties; | |||
import java.util.UUID; | |||
/** | |||
* <p> | |||
* AuthCodeProps | |||
@@ -58,12 +58,12 @@ public class HmacAuthUtil { | |||
String[] params = query.split("&"); | |||
for (String param : params) { | |||
String[] keyValue = param.split("="); | |||
Pair<String, String> pair = new Pair<String, String>(keyValue[0], keyValue.length > 1 ? keyValue[1] : ""); | |||
Pair<String, String> pair = new Pair<>(keyValue[0], keyValue.length > 1 ? keyValue[1] : ""); | |||
queryParamList.add(pair); | |||
} | |||
List<Pair<String, String>> sortedParamList = queryParamList.stream().sorted(Comparator.comparing(param -> param.getKey() + "=" + Optional.ofNullable(param.getValue()).orElse(""))).collect(Collectors.toList()); | |||
List<Pair<String, String>> encodeParamList = new ArrayList<>(); | |||
sortedParamList.stream().forEach(param -> { | |||
sortedParamList.forEach(param -> { | |||
try { | |||
String key = URLEncoder.encode(param.getKey(), "utf-8"); | |||
String value = URLEncoder.encode(Optional.ofNullable(param.getValue()).orElse(""), "utf-8"); | |||
@@ -5,8 +5,8 @@ import com.hz.pm.api.dashboard.constant.ChartTypeEnum; | |||
import com.hz.pm.api.dashboard.model.basic.AnalysisChart; | |||
import com.hz.pm.api.dashboard.model.basic.AnalysisData; | |||
import com.hz.pm.api.meta.helper.DictionaryCache; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import lombok.RequiredArgsConstructor; | |||
import org.springframework.stereotype.Component; | |||
@@ -33,12 +33,11 @@ public class DashboardChartAssembler { | |||
List<AnalysisData> dataList = new ArrayList<>(); | |||
analysisChart.setChartType(chartTypeEnum); | |||
analysisChart.setDataList(dataList); | |||
for (Integer key : projectGroupMap.keySet()) { | |||
for (Map.Entry<Integer, List<Project>> entry : projectGroupMap.entrySet()) { | |||
AnalysisData analysisData = new AnalysisData(); | |||
String chartKey = ProjectStatusEnum.getDesc(key); | |||
List<Project> projectList = projectGroupMap.get(key); | |||
String chartKey = ProjectStatusEnum.getDesc(entry.getKey()); | |||
analysisData.setKey(chartKey); | |||
analysisData.setValue(CollUtil.isEmpty(projectList) ? 0 : projectList.size()); | |||
analysisData.setValue(CollUtil.size(entry.getValue())); | |||
dataList.add(analysisData); | |||
} | |||
return analysisChart; | |||
@@ -105,7 +104,7 @@ public class DashboardChartAssembler { | |||
return analysisChart; | |||
} | |||
public <T> AnalysisChart assemblerAnalysisChart(Map<String, List<T>> dictionaryCodeIdMap | |||
public <T> AnalysisChart assemblerAnalysisChart(Map<String, List<T>> dictionaryCodeIdMap | |||
, ChartTypeEnum chartTypeEnum) { | |||
AnalysisChart analysisChart = new AnalysisChart(); | |||
List<AnalysisData> dataList = new ArrayList<>(); | |||
@@ -33,8 +33,7 @@ public class DashboardHelper { | |||
public Map<String, String> getLiShuiRegionCodeNameMap() { | |||
List<Region> regionList = iRegionService.list(Wrappers.lambdaQuery(Region.class) | |||
.eq(Region::getParentCode, AnalysisBasicConstant.LS_REGION_CODE)); | |||
Map<String, String> regionCodeNameMap = regionList.stream().collect(Collectors.toMap(Region::getRegionCode, Region::getRegionName)); | |||
return regionCodeNameMap; | |||
return regionList.stream().collect(Collectors.toMap(Region::getRegionCode, Region::getRegionName)); | |||
} | |||
/** | |||
@@ -97,20 +97,20 @@ public class DashboardProjectManage { | |||
Integer approvedProjectCnt = projectCnt - toBeApprovedProjectCnt; | |||
// 项目立项率 | |||
Double projectApprovalRate = new BigDecimal((float) approvedProjectCnt / projectCnt).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | |||
Double projectApprovalRate = BigDecimal.valueOf((float) approvedProjectCnt / projectCnt).setScale(2, RoundingMode.HALF_UP).doubleValue(); | |||
// 项目申报总金额 | |||
List<BigDecimal> declareAmountList = allProjectList.stream().filter(r -> Objects.nonNull(r.getDeclareAmount())) | |||
.map(Project::getDeclareAmount). | |||
collect(Collectors.toList()); | |||
List<BigDecimal> declareAmountList = allProjectList.stream().map(Project::getDeclareAmount) | |||
.filter(Objects::nonNull). | |||
collect(Collectors.toList()); | |||
BigDecimal declareAmountSum = new BigDecimal("0"); | |||
for (BigDecimal declareAmount : declareAmountList) { | |||
declareAmountSum.add(declareAmount); | |||
} | |||
// 项目批复总金额 | |||
List<BigDecimal> approvedTotalInvestmentIncreaseList = allProjectList.stream().filter(r -> Objects.nonNull(r.getApprovedTotalInvestmentIncrease())) | |||
.map(Project::getApprovedTotalInvestmentIncrease) | |||
List<BigDecimal> approvedTotalInvestmentIncreaseList = allProjectList.stream().map(Project::getApprovedTotalInvestmentIncrease) | |||
.filter(Objects::nonNull) | |||
.collect(Collectors.toList()); | |||
BigDecimal approvedTotalInvestmentIncreaseSum = new BigDecimal("0"); | |||
for (BigDecimal approvedTotalInvestmentIncrease : approvedTotalInvestmentIncreaseList) { | |||
@@ -120,7 +120,7 @@ public class DashboardProjectManage { | |||
// 资金核定率 | |||
BigDecimal fundApprovalRate = new BigDecimal("0"); | |||
if (new BigDecimal("0").compareTo(approvedTotalInvestmentIncreaseSum) != 0) { | |||
fundApprovalRate = declareAmountSum.divide(approvedTotalInvestmentIncreaseSum, 2, BigDecimal.ROUND_HALF_UP); | |||
fundApprovalRate = declareAmountSum.divide(approvedTotalInvestmentIncreaseSum, 2, RoundingMode.HALF_UP); | |||
} | |||
@@ -143,7 +143,7 @@ public class DashboardProjectManage { | |||
.in(ProjectDelayApply::getProjectId, allProjectIdWithRepeatList)); | |||
Map<Long, List<ProjectDelayApply>> projectDelayApplyListMap = projectDelayApplyList.stream().collect(Collectors.groupingBy(ProjectDelayApply::getProjectId)); | |||
Integer delayProjectCnt = projectDelayApplyListMap.keySet().size(); | |||
Double delayProportion = new BigDecimal((float) delayProjectCnt / projectCnt).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | |||
Double delayProportion = BigDecimal.valueOf((float) delayProjectCnt / projectCnt).setScale(2, RoundingMode.HALF_UP).doubleValue(); | |||
// 项目变更数量 项目变更金额 | |||
List<Project> changedProjectList = new ArrayList<>(); | |||
@@ -151,12 +151,12 @@ public class DashboardProjectManage { | |||
for (String projectCode : allProjectMap.keySet()) { | |||
List<Project> projectList = allProjectMap.get(projectCode); | |||
Project newestProject = projectList.stream() | |||
.filter(r -> r.getNewest()) | |||
.filter(Project::getNewest) | |||
.collect(Collectors.toList()).get(0); | |||
Boolean isChanged = false; | |||
boolean isChanged = false; | |||
for (Project project : projectList) { | |||
Boolean newest = project.getNewest(); | |||
Boolean isBackReject = project.getIsBackReject(); | |||
boolean isBackReject = project.getIsBackReject(); | |||
if (!newest && isBackReject) { | |||
isChanged = true; | |||
break; | |||
@@ -347,6 +347,7 @@ public class DashboardProjectManage { | |||
/** | |||
* 驾驶舱-项目画像 | |||
* | |||
* @param projectCode | |||
* @return | |||
*/ | |||
@@ -367,27 +368,27 @@ public class DashboardProjectManage { | |||
.eq(GovBizProjectApply::getBaseProjId, projectCode) | |||
.last(BizConst.LIMIT_1)); | |||
if(Objects.isNull(project) && Objects.isNull(baseInfo) && Objects.isNull(operationBase)){ | |||
if (Objects.isNull(project) && Objects.isNull(baseInfo) && Objects.isNull(operationBase)) { | |||
return res; | |||
} | |||
//2.转换项目信息 | |||
if(Objects.nonNull(project)){ | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(project,ProtraitProjectInfoVO.class); | |||
if (Objects.nonNull(project)) { | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(project, ProtraitProjectInfoVO.class); | |||
projectInfo.setOverdueSituation("即将超期"); | |||
projectInfo.setSafetyInputRate(convertSafetyInputRate(project)); | |||
projectInfo.setStatus(Objects.nonNull(project.getStatus()) ? project.getStatus().toString() : null); | |||
//3.项目状态情况 | |||
projectInfo.setStatusSituation(generateProjectStatus(project)); | |||
res.setProjectInfo(projectInfo); | |||
}else if(Objects.nonNull(baseInfo)){ | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(baseInfo,ProtraitProjectInfoVO.class); | |||
} else if (Objects.nonNull(baseInfo)) { | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(baseInfo, ProtraitProjectInfoVO.class); | |||
projectInfo.setOverdueSituation("即将超期"); | |||
projectInfo.setSafetyInputRate("0"); | |||
if(Objects.nonNull(apply)){ | |||
try{ | |||
if (Objects.nonNull(apply)) { | |||
try { | |||
projectInfo.setProjectYear(Integer.valueOf(apply.getBaseProjSetYear())); | |||
}catch (Exception e){ | |||
} catch (Exception e) { | |||
} | |||
projectInfo.setProjectIntroduction(apply.getBaseProjIntro()); | |||
projectInfo.setBuildCycle(apply.getBaseProjDuration()); | |||
@@ -401,14 +402,14 @@ public class DashboardProjectManage { | |||
projectInfo.setStatusSituation(generateProjectStatus(baseInfo)); | |||
projectInfo.setStatus(baseInfo.getBaseProjSetProg()); | |||
res.setProjectInfo(projectInfo); | |||
}else if(Objects.nonNull(operationBase)){ | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(operationBase,ProtraitProjectInfoVO.class); | |||
} else if (Objects.nonNull(operationBase)) { | |||
ProtraitProjectInfoVO projectInfo = BeanUtil.copyProperties(operationBase, ProtraitProjectInfoVO.class); | |||
projectInfo.setOverdueSituation("即将超期"); | |||
projectInfo.setSafetyInputRate("0"); | |||
if(Objects.nonNull(apply)){ | |||
try{ | |||
if (Objects.nonNull(apply)) { | |||
try { | |||
projectInfo.setProjectYear(Integer.valueOf(apply.getBaseProjSetYear())); | |||
}catch (Exception e){ | |||
} catch (Exception e) { | |||
} | |||
projectInfo.setProjectIntroduction(apply.getBaseProjIntro()); | |||
projectInfo.setBuildCycle(apply.getBaseProjDuration()); | |||
@@ -436,39 +437,42 @@ public class DashboardProjectManage { | |||
/** | |||
* 计算安全投入 | |||
* | |||
* @param project | |||
* @return | |||
*/ | |||
public static String convertSafetyInputRate(Project project) { | |||
String safetyInputDescribe = project.getSafetyInputDescribe(); | |||
if(org.apache.commons.lang3.StringUtils.isNotBlank(safetyInputDescribe)){ | |||
try{ | |||
if (org.apache.commons.lang3.StringUtils.isNotBlank(safetyInputDescribe)) { | |||
try { | |||
JSONArray array = JSON.parseArray(safetyInputDescribe); | |||
final Double[] total = {0.0}; | |||
array.forEach(j -> { | |||
JSONObject json = JSON.parseObject(JSON.toJSONString(j)); | |||
Double safetyInputAmount = json.getDouble(DashboardConstant.Protrait.FEILD_SAFETYMONEY); | |||
if(Objects.nonNull(safetyInputAmount)){ | |||
if (Objects.nonNull(safetyInputAmount)) { | |||
total[0] += safetyInputAmount; | |||
} | |||
}); | |||
Double totalAmount = total[0]; | |||
//申报金额 | |||
BigDecimal declareAmount = project.getDeclareAmount(); | |||
if(Objects.isNull(declareAmount) || declareAmount.compareTo(BigDecimal.ZERO) == 0){ | |||
if (Objects.isNull(declareAmount) || declareAmount.compareTo(BigDecimal.ZERO) == 0) { | |||
return DashboardConstant.Protrait.ZREO_PERCEN; | |||
} | |||
BigDecimal rate = BigDecimal.valueOf(totalAmount).multiply(BigDecimal.valueOf(100)) | |||
.divide(declareAmount,BigDecimal.ROUND_CEILING, RoundingMode.HALF_UP) | |||
.divide(declareAmount, BigDecimal.ROUND_CEILING, RoundingMode.HALF_UP) | |||
.stripTrailingZeros(); | |||
return rate.toPlainString(); | |||
}catch (Exception e){} | |||
} catch (Exception e) { | |||
} | |||
} | |||
return DashboardConstant.Protrait.ZREO_PERCEN; | |||
} | |||
/** | |||
* 生成项目 状态流转信息 | |||
* | |||
* @param project | |||
* @return | |||
*/ | |||
@@ -493,20 +497,20 @@ public class DashboardProjectManage { | |||
CompletableFuture.allOf( | |||
CompletableFuture.runAsync(() -> { | |||
res.set(0,statusHandler.generateApproveStatus(project,DashboardConstant.Protrait.PLAN,InstTypeEnum.UNIT_INNER_AUDIT.getCode())); | |||
res.set(0, statusHandler.generateApproveStatus(project, DashboardConstant.Protrait.PLAN, InstTypeEnum.UNIT_INNER_AUDIT.getCode())); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
res.set(1,statusHandler.generateApproveStatus(project,DashboardConstant.Protrait.DECLARED,InstTypeEnum.PRELIMINARY_PREVIEW.getCode())); | |||
res.set(1, statusHandler.generateApproveStatus(project, DashboardConstant.Protrait.DECLARED, InstTypeEnum.PRELIMINARY_PREVIEW.getCode())); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
res.set(2,statusHandler.generateApproveStatus(project,DashboardConstant.Protrait.APPROVE,InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode())); | |||
res.set(2, statusHandler.generateApproveStatus(project, DashboardConstant.Protrait.APPROVE, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode())); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
res.set(3,statusHandler.generateStatus(project,DashboardConstant.Protrait.CONSTRUCTION, | |||
ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(),ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode())); | |||
res.set(3, statusHandler.generateStatus(project, DashboardConstant.Protrait.CONSTRUCTION, | |||
ProjectStatusEnum.UNDER_CONSTRUCTION.getCode(), ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode())); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
res.set(4,statusHandler.generateApproveStatus(project,DashboardConstant.Protrait.ACCEPT,InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode())); | |||
res.set(4, statusHandler.generateApproveStatus(project, DashboardConstant.Protrait.ACCEPT, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode())); | |||
}, ForkJoinPool.commonPool()), | |||
CompletableFuture.runAsync(() -> { | |||
res.set(6, statusHandler.generatePerformanceStatus(project)); | |||
@@ -518,20 +522,20 @@ public class DashboardProjectManage { | |||
private List<ProtraitProjectStatusSituationVO> generateProjectStatus(GovBizProjectBaseinfo baseinfo) { | |||
final List<ProtraitProjectStatusSituationVO> res = Lists.newArrayList(); | |||
//1.计划(单位内部审核) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.PLAN,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.PLAN, null)); | |||
//2.申报(项目预审) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.DECLARED,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.DECLARED, null)); | |||
//3.审批(建设方案审批) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.APPROVE,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.APPROVE, null)); | |||
//4.建设(立项后的建设中) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.CONSTRUCTION,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.CONSTRUCTION, null)); | |||
//5.验收(终验) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT, | |||
Objects.nonNull(baseinfo.getBaseProjSetProg()) && "07".equals(baseinfo.getBaseProjSetProg()) ? baseinfo.getTongTime() : null)); | |||
//6.运维(todo: 运维时间还没有) | |||
res.add(ProtraitProjectStatusSituationVO.builder().statusName(DashboardConstant.Protrait.OPERATION).build()); | |||
//7.绩效 | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT, null)); | |||
//8.注销(todo: 还没有注销功能) | |||
res.add(ProtraitProjectStatusSituationVO.builder().statusName(DashboardConstant.Protrait.LOG_OFF).build()); | |||
return res; | |||
@@ -540,20 +544,20 @@ public class DashboardProjectManage { | |||
private List<ProtraitProjectStatusSituationVO> generateProjectStatus(GovOperationProjectBaseinfo baseinfo) { | |||
final List<ProtraitProjectStatusSituationVO> res = Lists.newArrayList(); | |||
//1.计划(单位内部审核) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.PLAN,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.PLAN, null)); | |||
//2.申报(项目预审) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.DECLARED,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.DECLARED, null)); | |||
//3.审批(建设方案审批) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.APPROVE,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.APPROVE, null)); | |||
//4.建设(立项后的建设中) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.CONSTRUCTION,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.CONSTRUCTION, null)); | |||
//5.验收(终验) | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT, | |||
Objects.nonNull(baseinfo.getBaseProjSetProg()) && "07".equals(baseinfo.getBaseProjSetProg()) ? baseinfo.getTongTime() : null)); | |||
//6.运维(todo: 运维时间还没有) | |||
res.add(ProtraitProjectStatusSituationVO.builder().statusName(DashboardConstant.Protrait.OPERATION).build()); | |||
//7.绩效 | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT,null)); | |||
res.add(new ProtraitProjectStatusSituationVO(DashboardConstant.Protrait.ACCEPT, null)); | |||
//8.注销(todo: 还没有注销功能) | |||
res.add(ProtraitProjectStatusSituationVO.builder().statusName(DashboardConstant.Protrait.LOG_OFF).build()); | |||
return res; | |||
@@ -292,11 +292,11 @@ public class DingInfoPullController { | |||
extString = extString.substring(extString.lastIndexOf(".")); | |||
try { | |||
if (".xls".equals(extString)) { | |||
return wb = new HSSFWorkbook(is); | |||
return new HSSFWorkbook(is); | |||
} else if (".xlsx".equals(extString)) { | |||
return wb = new XSSFWorkbook(is); | |||
return new XSSFWorkbook(is); | |||
} else { | |||
return wb = null; | |||
return null; | |||
} | |||
} catch (IOException e) { | |||
e.printStackTrace(); | |||
@@ -33,7 +33,7 @@ public class ExpertInfoCmdAssembler { | |||
ExpertFullInfoSaveCmd expertFullInfoSaveCmd = new ExpertFullInfoSaveCmd(); | |||
ExpertUserFullInfoDTO expertUserInfoDTO = buildExpertUserFullInfoDTO( | |||
expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, null, null); | |||
expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, null); | |||
List<ExpertDictionaryDTO> expertDictionaryList = | |||
buildExpertDictionaryList(expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, null); | |||
List<ExpertTagDTO> expertTagList = buildExpertTagList(expertProfessionalInfo, expertBasicInfo, null); | |||
@@ -164,7 +164,7 @@ public class ExpertInfoCmdAssembler { | |||
} | |||
private static ExpertUserFullInfoDTO buildExpertUserFullInfoDTO(ExpertBasicInfo basicInfo, ExpertEduInfo eduInfo | |||
, ExpertJobInfo jobInfo, ExpertProfessionalInfo professionalInfo, ExpertRecommendInfo recommendInfo, ExpertOtherInfo otherInfo) { | |||
, ExpertJobInfo jobInfo, ExpertProfessionalInfo professionalInfo, ExpertOtherInfo otherInfo) { | |||
ExpertUserFullInfoDTO expertFullInfo = new ExpertUserFullInfoDTO(); | |||
expertFullInfo.setIsDingUser(basicInfo.getIsDingUser()); | |||
@@ -214,7 +214,7 @@ public class ExpertInfoCmdAssembler { | |||
, ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO | |||
, ModifyApplyExtraInfo modifyApplyExtraInfo) { | |||
ExpertInfoModifyCmd expertInfoModifyCmd = new ExpertInfoModifyCmd(); | |||
ExpertUserFullInfoDTO expertUserInfoDTO = buildExpertUserFullInfoDTO(expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, recommendInfo, otherInfo); | |||
ExpertUserFullInfoDTO expertUserInfoDTO = buildExpertUserFullInfoDTO(expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, otherInfo); | |||
List<ExpertDictionaryDTO> expertDictionaryList = buildExpertDictionaryList(expertBasicInfo, expertEduInfo, expertJobInfo, expertProfessionalInfo, recommendInfo); | |||
List<ExpertTagDTO> expertTagList = buildExpertTagList(expertProfessionalInfo, expertBasicInfo, otherInfo); | |||
@@ -42,7 +42,7 @@ public class ExpertInfoSensitiveFieldModifyCheckHelper { | |||
public ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldModifyCheck(ExpertBasicInfo applyBasicInfo | |||
, ExpertEduInfo applyEduInfo, ExpertJobInfo applyJobInfo, ExpertProfessionalInfo applyProfessionalInfo, Long expertUserId) { | |||
, ExpertJobInfo applyJobInfo, ExpertProfessionalInfo applyProfessionalInfo, Long expertUserId) { | |||
ExpertFullInfoAllDTO expertUserFullInfoAll = expertInfoService.getExpertUserFullInfoAll(expertUserId); | |||
if (Objects.isNull(expertUserFullInfoAll)) { | |||
@@ -181,7 +181,7 @@ public class ExpertAdminManage { | |||
ExpertOtherInfo otherInfo = request.getExpertOtherInfo(); | |||
ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = | |||
expertInfoSensitiveFieldModifyCheckHelper.expertInfoSensitiveFieldModifyCheck(basicInfo, eduInfo, jobInfo, professionalInfo, expertUserId); | |||
expertInfoSensitiveFieldModifyCheckHelper.expertInfoSensitiveFieldModifyCheck(basicInfo, jobInfo, professionalInfo, expertUserId); | |||
ExpertInfoModifyCmd expertInfoModifyCmd = ExpertInfoCmdAssembler | |||
.buildExpertInfoModifyCmd(expertUserId, basicInfo, eduInfo, jobInfo, professionalInfo, recommendInfo, otherInfo, expertInfoSensitiveFieldCheckBO, null); | |||
List<Long> applyIdList = expertInfoService.adminModifyExpertInfo(expertInfoModifyCmd, adminUserId); | |||
@@ -1,37 +0,0 @@ | |||
//package com.hz.pm.api.expert.model.cmd; | |||
// | |||
//import com.ningdatech.emapi.expert.entity.bo.ExpertInfoSensitiveFieldCheckBO; | |||
//import com.ningdatech.emapi.expert.entity.dto.*; | |||
//import lombok.Data; | |||
// | |||
//import java.util.List; | |||
// | |||
///** | |||
// * @author liuxinxin | |||
// * @date 2022/7/28 下午2:43 | |||
// */ | |||
//@Data | |||
//public class AdminModifyExpertInfoCmd { | |||
// | |||
// private Long userId; | |||
// | |||
// private ExpertUserFullInfoDTO expertUserInfoDTO; | |||
// | |||
// private List<ExpertDictionaryDTO> expertDictionaryList; | |||
// | |||
// private List<ExpertTagDTO> expertTagList; | |||
// | |||
// /** | |||
// * 专家履职意向(区域编码) | |||
// */ | |||
// private List<ExpertRegionDTO> expertIntentionWorkRegionInfo; | |||
// | |||
// /** | |||
// * 回避单位列表 | |||
// */ | |||
// private List<ExpertAvoidCompanyDTO> expertAvoidCompanyList; | |||
// | |||
// private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO; | |||
// | |||
// private ModifyApplyExtraInfoDTO modifyApplyExtraInfo; | |||
//} |
@@ -1,60 +0,0 @@ | |||
//package com.hz.pm.api.expert.model.cmd; | |||
// | |||
//import com.ningdatech.emapi.expert.entity.dto.ExpertAdminRegionDTO; | |||
//import lombok.Data; | |||
// | |||
//import java.util.List; | |||
// | |||
///** | |||
// * @author liuxinxin | |||
// * @date 2022/8/1 上午10:54 | |||
// */ | |||
//@Data | |||
//public class SaveExpertAdminCmd { | |||
// | |||
// /** | |||
// * 用户id | |||
// */ | |||
// private Long userId; | |||
// | |||
// /** | |||
// * 是否浙政钉用户Y/N | |||
// */ | |||
// private Boolean isDingUser; | |||
// | |||
// /** | |||
// * 手机号 | |||
// */ | |||
// private String phoneNo; | |||
// | |||
// /** | |||
// * 用户名称 | |||
// */ | |||
// private String name; | |||
// | |||
// /** | |||
// * 工作单位 | |||
// */ | |||
// private String company; | |||
// | |||
// /** | |||
// * 公司唯一标识 | |||
// */ | |||
// private String companyUniqCode; | |||
// | |||
// /** | |||
// * 层级 | |||
// */ | |||
// private List<ExpertAdminRegionDTO> regionInfoList; | |||
// | |||
// /** | |||
// * 用户状态(启用/关闭) | |||
// */ | |||
// private Boolean isEnable; | |||
// | |||
// /** | |||
// * 操作者id | |||
// */ | |||
// private Long operatorId; | |||
// | |||
//} |
@@ -42,12 +42,6 @@ public class MetaApplyResultVo { | |||
@ApiModelProperty("专家用户userId") | |||
private Long expertUserId; | |||
// @ApiModelProperty("额外的材料") | |||
// private ModifyApplyExtraInfo modifyApplyExtraInfo; | |||
// | |||
// @ApiModelProperty("信息修改申请展示列表-只有审核类型为信息变更审核时才有值") | |||
// private InfoModifyApplyDisplayVO infoModifyApplyDisplayVo; | |||
@ApiModelProperty("履职意向修改申请展示列表-只有审核类型为履职意向变更时才会有值") | |||
private IntentionApplyDisplayVO intentionApplyDisplayVo; | |||
@@ -9,6 +9,7 @@ import com.hz.pm.api.fiscal.mapper.NdCompanyFiscalCodeMapper; | |||
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; | |||
@@ -40,13 +41,12 @@ public class CompanyFiscalCodeServiceImpl extends ServiceImpl<NdCompanyFiscalCod | |||
@Override | |||
public Map<String, String> getByOrgFiscalCodeMap(List<String> orgCodeList) { | |||
if (CollUtil.isNotEmpty(orgCodeList)) { | |||
return new HashMap<String, String>(); | |||
return Collections.emptyMap(); | |||
} | |||
List<CompanyFiscalCode> companyFiscalCodeList = this.list(Wrappers.lambdaQuery(CompanyFiscalCode.class) | |||
.in(CompanyFiscalCode::getOrganizationCode, orgCodeList)); | |||
Map<String, String> orgCodeAndFiscalCodeMap = companyFiscalCodeList.stream() | |||
return companyFiscalCodeList.stream() | |||
.collect(Collectors.toMap(CompanyFiscalCode::getOrganizationCode, CompanyFiscalCode::getFiscalCode)); | |||
return orgCodeAndFiscalCodeMap; | |||
} | |||
} |
@@ -179,8 +179,7 @@ public class ProjectConvert { | |||
} | |||
public static ProjectCimplementReq convertCimplementVo(GovBizProjectCimplementVO cimplement) { | |||
ProjectCimplementReq req = BeanUtil.copyProperties(cimplement, ProjectCimplementReq.class); | |||
return req; | |||
return BeanUtil.copyProperties(cimplement, ProjectCimplementReq.class); | |||
} | |||
public static ProjectCimplementReq convertCimplementVoWithConvertPdf(GovBizProjectCimplementVO cimplement) { | |||
@@ -1476,7 +1476,7 @@ public class GovProjectCollectionManage { | |||
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); | |||
headers.setContentType(type); | |||
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); | |||
HttpEntity<ProjectPushReq> formEntity = new HttpEntity<ProjectPushReq>(req, headers); | |||
HttpEntity<ProjectPushReq> formEntity = new HttpEntity<>(req, headers); | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); | |||
log.info("推送结果 {} :{}", vo.getBaseProjId(), response); | |||
} catch (Exception e) { | |||
@@ -1493,7 +1493,7 @@ public class GovProjectCollectionManage { | |||
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); | |||
headers.setContentType(type); | |||
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); | |||
HttpEntity<ProjectPushReq> formEntity = new HttpEntity<ProjectPushReq>(req, headers); | |||
HttpEntity<ProjectPushReq> formEntity = new HttpEntity<>(req, headers); | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); | |||
log.info("推送结果 {} :{}", vo.getBaseProjId(), response); | |||
} catch (Exception e) { | |||
@@ -1515,7 +1515,7 @@ public class GovProjectCollectionManage { | |||
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); | |||
headers.setContentType(type); | |||
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); | |||
HttpEntity<ProjectBaseInfoReq> formEntity = new HttpEntity<ProjectBaseInfoReq>(req, headers); | |||
HttpEntity<ProjectBaseInfoReq> formEntity = new HttpEntity<>(req, headers); | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); | |||
log.info("推送结果 {} :{}", baseinfo.getBaseProjId(), response); | |||
} catch (Exception e) { | |||
@@ -1531,7 +1531,7 @@ public class GovProjectCollectionManage { | |||
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8"); | |||
headers.setContentType(type); | |||
headers.add("Accept", MediaType.APPLICATION_JSON.toString()); | |||
HttpEntity<String> formEntity = new HttpEntity<String>(null, headers); | |||
HttpEntity<String> formEntity = new HttpEntity<>(null, headers); | |||
ResponseEntity<String> response = restTemplate.postForEntity(url, formEntity, String.class); | |||
log.info("推送删除结果 :{}", response); | |||
} catch (Exception e) { | |||
@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import java.io.UnsupportedEncodingException; | |||
import java.net.UnknownHostException; | |||
import java.security.NoSuchAlgorithmException; | |||
import java.util.List; | |||
@@ -3,6 +3,7 @@ package com.hz.pm.api.meeting.entity.dto; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Builder; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Tolerate; | |||
/** | |||
@@ -14,14 +15,10 @@ import lombok.experimental.Tolerate; | |||
* @since 14:21 2022/8/8 | |||
*/ | |||
@Data | |||
@Builder | |||
@NoArgsConstructor | |||
@AllArgsConstructor | |||
public class CountConfirmByMeetingIdDTO { | |||
@Tolerate | |||
public CountConfirmByMeetingIdDTO() { | |||
} | |||
private Long meetingId; | |||
private Integer total; | |||
@@ -72,17 +72,6 @@ public class ExpertExportManage { | |||
private static final String EXPERT_INVITE = "meeting/专家抽取表.ftl"; | |||
//================================================================================================================== | |||
static Function<Integer, String> meetingUsageTime = (type) -> { | |||
if (1 == type) { | |||
return "半天"; | |||
} | |||
if (2 == type) { | |||
return "一天"; | |||
} | |||
return StrUtil.EMPTY; | |||
}; | |||
static Supplier<String> wordName = () -> UUID.randomUUID().toString(true) + ".doc"; | |||
private List<MeetingExpert> listExpertsByAgreeOrLeave(Long meetingId) { | |||
@@ -61,11 +61,11 @@ public class MeetingExpertServiceImpl extends ServiceImpl<MeetingExpertMapper, M | |||
Collectors.collectingAndThen(Collectors.toList(), | |||
w -> { | |||
Long meetingId = w.get(0).getMeetingId(); | |||
CountConfirmByMeetingIdDTO confirm = CountConfirmByMeetingIdDTO.builder() | |||
.confirmed(0) | |||
.total(countByRandom.getOrDefault(meetingId, 0)) | |||
.meetingId(meetingId) | |||
.build(); | |||
CountConfirmByMeetingIdDTO confirm = new CountConfirmByMeetingIdDTO(); | |||
confirm.setConfirmed(0); | |||
confirm.setTotal(countByRandom.getOrDefault(meetingId, 0)); | |||
confirm.setMeetingId(meetingId); | |||
w.forEach(item -> { | |||
ExpertAttendStatusEnum attendStatus = ExpertAttendStatusEnum.getByCode(item.getStatus()); | |||
if (ExpertInviteTypeEnum.APPOINT.eq(item.getInviteType())) { | |||
@@ -56,8 +56,8 @@ public class TagsCacheImpl extends AbstractTagsCache { | |||
@Override | |||
public Map<String, TagDTO> getNameTagMap() { | |||
Map<String, TagDTO> nameTagMap = new HashMap<>(1024); | |||
for (String key : tagCacheMap.keySet()) { | |||
nameTagMap.put(tagCacheMap.get(key).getTagName(), tagCacheMap.get(key)); | |||
for (Map.Entry<String, TagDTO> entry : tagCacheMap.entrySet()) { | |||
nameTagMap.put(entry.getValue().getTagName(), entry.getValue()); | |||
} | |||
return nameTagMap; | |||
} | |||
@@ -156,7 +156,7 @@ public class OrganizationManage { | |||
.like(DingOrganization::getOrganizationName, organizationName) | |||
.in(onlyUnit, DingOrganization::getTypeCode, Lists.newArrayList(DingOrganizationContant.UNIT_TYPE, | |||
DingOrganizationContant.HOLLOW))); | |||
if (dingOrganizationList.size() == 0) { | |||
if (dingOrganizationList.isEmpty()) { | |||
return new ArrayList<>(); | |||
} | |||
} else if (StrUtils.isBlank(organizationCode)) { | |||
@@ -3,7 +3,6 @@ package com.hz.pm.api.performance.model.req; | |||
import com.ningdatech.basic.model.PagePo; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import java.time.LocalDateTime; | |||
/** | |||
* <p> | |||
@@ -376,10 +376,7 @@ public class DeclaredProjectManage { | |||
if ((total = page.getTotal()) == 0) { | |||
return PageVo.empty(); | |||
} | |||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> { | |||
ProjectLibListItemVO item = BeanUtil.copyProperties(w,ProjectLibListItemVO.class); | |||
return item; | |||
}); | |||
List<ProjectLibListItemVO> records = CollUtils.convert(page.getRecords(), w -> BeanUtil.copyProperties(w,ProjectLibListItemVO.class)); | |||
return PageVo.of(records, total); | |||
} | |||
@@ -1,7 +1,6 @@ | |||
package com.hz.pm.api.projectdeclared.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.hz.pm.api.projectdeclared.model.entity.ProjectDraft; | |||
import com.hz.pm.api.projectdeclared.model.po.DeclaredProjectStatisticsPO; | |||
import org.apache.ibatis.annotations.Param; | |||
@@ -3,7 +3,6 @@ package com.hz.pm.api.projectdeclared.model.dto; | |||
import cn.hutool.core.collection.CollUtil; | |||
import com.google.common.collect.Maps; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; | |||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
@@ -94,12 +94,13 @@ public class ProjectRenewalFundManage { | |||
/** | |||
* 项目续建资金库列表 分页 | |||
* | |||
* @param req | |||
* @return | |||
*/ | |||
public PageVo<ProjectRenewalFundDeclarationVO> list(ProjectRenewalListReq req, UserFullInfoDTO user) { | |||
Page<ProjectRenewalFundDeclarationPO> page = req.page(); | |||
req = buildProjectLibPermission(req,user); | |||
req = buildProjectLibPermission(req, user); | |||
projectRenewalFundDeclarationService.pageSql(page, req); | |||
long total; | |||
if ((total = page.getTotal()) == 0) { | |||
@@ -107,7 +108,7 @@ public class ProjectRenewalFundManage { | |||
} | |||
List<ProjectRenewalFundDeclarationVO> records = CollUtils.convert(page.getRecords(), w -> { | |||
ProjectRenewalFundDeclarationVO item = new ProjectRenewalFundDeclarationVO(); | |||
BeanUtils.copyProperties(w,item); | |||
BeanUtils.copyProperties(w, item); | |||
return item; | |||
}); | |||
return PageVo.of(records, total); | |||
@@ -118,9 +119,9 @@ public class ProjectRenewalFundManage { | |||
//项目查最新 | |||
query.eq(Project::getNewest, Boolean.TRUE); | |||
//自己单位 | |||
query.eq(Project::getBuildOrgCode,user.getEmpPosUnitCode()); | |||
query.eq(Project::getBuildOrgCode, user.getEmpPosUnitCode()); | |||
//立项批复后 都可以 | |||
query.gt(Project::getStatus,ProjectStatusEnum.APPROVED_AFTER_CHOICE.getCode()); | |||
query.gt(Project::getStatus, ProjectStatusEnum.APPROVED_AFTER_CHOICE.getCode()); | |||
Page<Project> page = projectService.page(req.page(), query); | |||
if (CollUtil.isEmpty(page.getRecords())) { | |||
return PageVo.empty(); | |||
@@ -130,12 +131,12 @@ public class ProjectRenewalFundManage { | |||
Set<String> projectCodes = page.getRecords().stream() | |||
.map(Project::getProjectCode).collect(Collectors.toSet()); | |||
Map<Long,List<ProjectRenewalFundDeclaration>> renewalMap = Maps.newHashMap(); | |||
if(CollUtil.isNotEmpty(projectCodes)){ | |||
Map<Long, List<ProjectRenewalFundDeclaration>> renewalMap = Maps.newHashMap(); | |||
if (CollUtil.isNotEmpty(projectCodes)) { | |||
List<ProjectRenewalFundDeclaration> renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||
.in(ProjectRenewalFundDeclaration::getProjectCode, projectCodes) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted, Boolean.FALSE) | |||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | |||
renewalMap = renewalDeclarations.stream().collect(Collectors.groupingBy(ProjectRenewalFundDeclaration::getProjectId)); | |||
} | |||
@@ -168,13 +169,13 @@ public class ProjectRenewalFundManage { | |||
item.setApprovedAmount(w.getApprovalAmount()); | |||
item.setAnnualPlanAmount(w.getAnnualPlanAmount()); | |||
item.setPrePlanProjectId(w.getPrePlanProjectId()); | |||
if(finalRenewalMap.containsKey(item.getId())){ | |||
if (finalRenewalMap.containsKey(item.getId())) { | |||
List<ProjectRenewalFundDeclaration> prfs = finalRenewalMap.get(item.getId()); | |||
item.setAnnualAccumulateAmount(ProjectLibManage.computeAmount(w.getAnnualPlanAmount(),prfs)); | |||
item.setAnnualAccumulateAmountList(ProjectLibManage.convertAccmulate(w,prfs)); | |||
}else{ | |||
item.setAnnualAccumulateAmount(ProjectLibManage.computeAmount(w.getAnnualPlanAmount(), prfs)); | |||
item.setAnnualAccumulateAmountList(ProjectLibManage.convertAccmulate(w, prfs)); | |||
} else { | |||
item.setAnnualAccumulateAmount(w.getAnnualPlanAmount()); | |||
item.setAnnualAccumulateAmountList(ProjectLibManage.convertAccmulate(w,Collections.emptyList())); | |||
item.setAnnualAccumulateAmountList(ProjectLibManage.convertAccmulate(w, Collections.emptyList())); | |||
} | |||
return item; | |||
}); | |||
@@ -189,7 +190,7 @@ public class ProjectRenewalFundManage { | |||
public ProjectRenewalFundDeclarationVO detail(Long id) { | |||
// 查询项目申报信息 | |||
ProjectRenewalFundDeclaration renewal = projectRenewalFundDeclarationService.getById(id); | |||
if(Objects.isNull(renewal)){ | |||
if (Objects.isNull(renewal)) { | |||
return null; | |||
} | |||
ProjectRenewalFundDeclarationVO vo = new ProjectRenewalFundDeclarationVO(); | |||
@@ -208,7 +209,7 @@ public class ProjectRenewalFundManage { | |||
GovBizProjectApprove approve = approveService.getOne(Wrappers.lambdaQuery(GovBizProjectApprove.class) | |||
.eq(GovBizProjectApprove::getBaseProjId, renewal.getProjectCode()) | |||
.last(BizConst.LIMIT_1)); | |||
if(Objects.nonNull(project)){ | |||
if (Objects.nonNull(project)) { | |||
vo.setApprovalAmount(project.getApprovalAmount()); | |||
vo.setProjectName(project.getProjectName()); | |||
vo.setProjectType(project.getProjectType()); | |||
@@ -226,26 +227,24 @@ public class ProjectRenewalFundManage { | |||
List<ProjectRenewalFundDeclaration> renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||
.eq(ProjectRenewalFundDeclaration::getProjectId, vo.getProjectId()) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted, Boolean.FALSE) | |||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | |||
Optional.ofNullable(renewalDeclarations).ifPresent(declarations -> | |||
declarations.forEach(declaration -> { | |||
annualAmounts.add(AnnualAmountVO.builder() | |||
.projectId(project.getId()) | |||
.projectCode(project.getProjectCode()) | |||
.projectYear(declaration.getProjectYear()) | |||
.annualAmount(declaration.getAnnualPaymentAmount()) | |||
.haveAmount(declaration.getHaveAmount()) | |||
.govOwnFinanceAmount(declaration.getGovOwnFinanceAmount()) | |||
.bankLendingAmount(declaration.getBankLendingAmount()) | |||
.govSuperiorFinanceAmount(declaration.getGovSuperiorFinanceAmount()) | |||
.otherAmount(declaration.getOtherAmount()) | |||
.build()); | |||
}) | |||
declarations.forEach(declaration -> annualAmounts.add(AnnualAmountVO.builder() | |||
.projectId(project.getId()) | |||
.projectCode(project.getProjectCode()) | |||
.projectYear(declaration.getProjectYear()) | |||
.annualAmount(declaration.getAnnualPaymentAmount()) | |||
.haveAmount(declaration.getHaveAmount()) | |||
.govOwnFinanceAmount(declaration.getGovOwnFinanceAmount()) | |||
.bankLendingAmount(declaration.getBankLendingAmount()) | |||
.govSuperiorFinanceAmount(declaration.getGovSuperiorFinanceAmount()) | |||
.otherAmount(declaration.getOtherAmount()) | |||
.build())) | |||
); | |||
vo.setAnnualAccumulateAmountList(annualAmounts); | |||
}else if(Objects.nonNull(baseinfo)){ | |||
if(Objects.nonNull(approve)){ | |||
} else if (Objects.nonNull(baseinfo)) { | |||
if (Objects.nonNull(approve)) { | |||
vo.setApprovalAmount(approve.getBaseInitialReviewTotalMoney()); | |||
} | |||
vo.setProjectName(baseinfo.getBaseProjName()); | |||
@@ -265,26 +264,24 @@ public class ProjectRenewalFundManage { | |||
List<ProjectRenewalFundDeclaration> renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||
.eq(ProjectRenewalFundDeclaration::getProjectCode, vo.getProjectCode()) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted, Boolean.FALSE) | |||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | |||
Optional.ofNullable(renewalDeclarations).ifPresent(declarations -> | |||
declarations.forEach(declaration -> { | |||
annualAmounts.add(AnnualAmountVO.builder() | |||
.projectId(baseinfo.getId()) | |||
.projectCode(baseinfo.getBaseProjId()) | |||
.projectYear(declaration.getProjectYear()) | |||
.annualAmount(declaration.getAnnualPaymentAmount()) | |||
.haveAmount(declaration.getHaveAmount()) | |||
.govOwnFinanceAmount(declaration.getGovOwnFinanceAmount()) | |||
.bankLendingAmount(declaration.getBankLendingAmount()) | |||
.govSuperiorFinanceAmount(declaration.getGovSuperiorFinanceAmount()) | |||
.otherAmount(declaration.getOtherAmount()) | |||
.build()); | |||
}) | |||
declarations.forEach(declaration -> annualAmounts.add(AnnualAmountVO.builder() | |||
.projectId(baseinfo.getId()) | |||
.projectCode(baseinfo.getBaseProjId()) | |||
.projectYear(declaration.getProjectYear()) | |||
.annualAmount(declaration.getAnnualPaymentAmount()) | |||
.haveAmount(declaration.getHaveAmount()) | |||
.govOwnFinanceAmount(declaration.getGovOwnFinanceAmount()) | |||
.bankLendingAmount(declaration.getBankLendingAmount()) | |||
.govSuperiorFinanceAmount(declaration.getGovSuperiorFinanceAmount()) | |||
.otherAmount(declaration.getOtherAmount()) | |||
.build())) | |||
); | |||
vo.setAnnualAccumulateAmountList(annualAmounts); | |||
}else if(Objects.nonNull(operationBaseinfo)){ | |||
if(Objects.nonNull(approve)){ | |||
} else if (Objects.nonNull(operationBaseinfo)) { | |||
if (Objects.nonNull(approve)) { | |||
vo.setApprovalAmount(approve.getBaseInitialReviewTotalMoney()); | |||
} | |||
vo.setProjectName(operationBaseinfo.getBaseProjName()); | |||
@@ -303,7 +300,7 @@ public class ProjectRenewalFundManage { | |||
List<ProjectRenewalFundDeclaration> renewalDeclarations = projectRenewalFundDeclarationService.list(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||
.eq(ProjectRenewalFundDeclaration::getProjectCode, vo.getProjectCode()) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted,Boolean.FALSE) | |||
.eq(ProjectRenewalFundDeclaration::getDeleted, Boolean.FALSE) | |||
.orderByAsc(ProjectRenewalFundDeclaration::getProjectYear)); | |||
Optional.ofNullable(renewalDeclarations).ifPresent(declarations -> | |||
declarations.forEach(declaration -> annualAmounts.add(AnnualAmountVO.builder() | |||
@@ -325,6 +322,7 @@ public class ProjectRenewalFundManage { | |||
/** | |||
* 申报 | |||
* | |||
* @param dto | |||
* @return | |||
*/ | |||
@@ -342,18 +340,18 @@ public class ProjectRenewalFundManage { | |||
.eq(GovBizProjectApply::getBaseProjId, projectCode) | |||
.last(BizConst.LIMIT_1)); | |||
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo) && Objects.isNull(operationBaseinfo)).throwMessage(String.format("关联的项目【%s】不存在 提交失败!",projectCode)); | |||
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo) && Objects.isNull(operationBaseinfo)).throwMessage(String.format("关联的项目【%s】不存在 提交失败!", projectCode)); | |||
ProjectRenewalFundDeclaration declaration = new ProjectRenewalFundDeclaration(); | |||
//如果是重新申报 | |||
if(Objects.nonNull(dto.getId())){ | |||
if (Objects.nonNull(dto.getId())) { | |||
ProjectRenewalFundDeclaration oldDeclaration = projectRenewalFundDeclarationService.getById(dto.getId()); | |||
VUtils.isTrue(Objects.isNull(oldDeclaration)).throwMessage(String.format("重新申报失败 【%s】 该申报不存在!",dto.getId())); | |||
BeanUtils.copyProperties(oldDeclaration,declaration); | |||
}else{ | |||
VUtils.isTrue(Objects.isNull(oldDeclaration)).throwMessage(String.format("重新申报失败 【%s】 该申报不存在!", dto.getId())); | |||
BeanUtils.copyProperties(oldDeclaration, declaration); | |||
} else { | |||
declaration.setCreateOn(LocalDateTime.now()); | |||
declaration.setUpdateOn(LocalDateTime.now()); | |||
} | |||
BeanUtils.copyProperties(dto,declaration); | |||
BeanUtils.copyProperties(dto, declaration); | |||
//有2个条件要判断 续建资金 | |||
//1. 如果有审核中的 是不能继续申请的 | |||
@@ -366,38 +364,38 @@ public class ProjectRenewalFundManage { | |||
VUtils.isTrue(Objects.isNull(dto.getProjectYear())).throwMessage("新建的续建项目信息 年度不能为空"); | |||
ProjectRenewalFundDeclaration lastRenewalFund = projectRenewalFundDeclarationService.getOne(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||
.eq(ProjectRenewalFundDeclaration::getProjectCode, projectCode) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus,ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PASS.name()) | |||
.orderByDesc(ProjectRenewalFundDeclaration::getProjectYear) | |||
.last(BizConst.LIMIT_1)); | |||
//如果没有续建资金信息 就要比 当前项目的年度要大 | |||
if(Objects.isNull(lastRenewalFund)){ | |||
if(Objects.nonNull(project)){ | |||
if (Objects.isNull(lastRenewalFund)) { | |||
if (Objects.nonNull(project)) { | |||
VUtils.isTrue(project.getProjectYear() >= dto.getProjectYear()) | |||
.throwMessage("续建资金年度错误!"); | |||
}else if(Objects.nonNull(apply)){ | |||
} else if (Objects.nonNull(apply)) { | |||
VUtils.isTrue(StringUtils.isBlank(apply.getBaseProjSetYear()) || | |||
Integer.parseInt(apply.getBaseProjSetYear()) >= dto.getProjectYear()) | |||
.throwMessage("续建资金年度错误!"); | |||
} | |||
}else{ | |||
} else { | |||
VUtils.isTrue(lastRenewalFund.getProjectYear() >= dto.getProjectYear()) | |||
.throwMessage("续建资金年度错误!"); | |||
} | |||
declaration.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PENDING.name()); | |||
if(Objects.nonNull(project)){ | |||
if (Objects.nonNull(project)) { | |||
declaration.setRegionCode(project.getAreaCode()); | |||
declaration.setOrgCode(project.getBuildOrgCode()); | |||
}else if(Objects.nonNull(baseinfo)){ | |||
declaration.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); | |||
} else if (Objects.nonNull(baseinfo)) { | |||
declaration.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0, 6) : StringUtils.EMPTY); | |||
declaration.setOrgCode(baseinfo.getBaseBuildDeprtDing()); | |||
}else if(Objects.nonNull(operationBaseinfo)){ | |||
declaration.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? operationBaseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); | |||
} else if (Objects.nonNull(operationBaseinfo)) { | |||
declaration.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? operationBaseinfo.getBaseAreaCode().substring(0, 6) : StringUtils.EMPTY); | |||
declaration.setOrgCode(operationBaseinfo.getBaseBuildDeprtDing()); | |||
} | |||
if(!projectRenewalFundDeclarationService.saveOrUpdate(declaration)){ | |||
throw new BusinessException(String.format("申报失败 【%s】",dto.getId())); | |||
if (!projectRenewalFundDeclarationService.saveOrUpdate(declaration)) { | |||
throw new BusinessException(String.format("申报失败 【%s】", dto.getId())); | |||
} | |||
return declaration.getId(); | |||
} | |||
@@ -412,14 +410,14 @@ public class ProjectRenewalFundManage { | |||
VUtils.isTrue(CollUtil.isEmpty(paymentPlans)).throwMessage("未有所选年度的支付计划,无法提交"); | |||
boolean hasYearPlan = Boolean.FALSE; | |||
for(PaymentPlan plan : paymentPlans){ | |||
if(Objects.isNull(plan.getPaymentTime())){ | |||
for (PaymentPlan plan : paymentPlans) { | |||
if (Objects.isNull(plan.getPaymentTime())) { | |||
continue; | |||
} | |||
int year = plan.getPaymentTime().getYear(); | |||
if(projectYear.equals(year)){ | |||
if (projectYear.equals(year)) { | |||
hasYearPlan = Boolean.TRUE; | |||
}else if(projectYear.compareTo(year) > 0){ | |||
} else if (projectYear.compareTo(year) > 0) { | |||
//2 如果有 这一年前的实际支付金额有没有填 | |||
VUtils.isTrue(Objects.isNull(plan.getActualPaymentAmount())) | |||
.throwMessage("有漏填写此年度之前年度的实际支付金额,请去合同备案补充"); | |||
@@ -434,7 +432,7 @@ public class ProjectRenewalFundManage { | |||
(c.getPaymentTime().getYear() - projectYear) <= 0) | |||
.map(c -> Objects.nonNull(c.getPaymentAmount()) ? c.getPaymentAmount() : BigDecimal.ZERO) | |||
.reduce(BigDecimal::add); | |||
if(planSumOp.isPresent()){ | |||
if (planSumOp.isPresent()) { | |||
planSum = planSumOp.get(); | |||
} | |||
BigDecimal actualPlanSum = BigDecimal.ZERO; | |||
@@ -442,7 +440,7 @@ public class ProjectRenewalFundManage { | |||
(c.getPaymentTime().getYear() - projectYear) < 0) | |||
.map(c -> Objects.nonNull(c.getActualPaymentAmount()) ? c.getActualPaymentAmount() : BigDecimal.ZERO) | |||
.reduce(BigDecimal::add); | |||
if(actualPlanSumOp.isPresent()){ | |||
if (actualPlanSumOp.isPresent()) { | |||
actualPlanSum = actualPlanSumOp.get(); | |||
} | |||
BigDecimal maxAmount = planSum.subtract(actualPlanSum); | |||
@@ -452,6 +450,7 @@ public class ProjectRenewalFundManage { | |||
/** | |||
* 续建项目审核 | |||
* | |||
* @param param | |||
* @return | |||
*/ | |||
@@ -467,24 +466,24 @@ public class ProjectRenewalFundManage { | |||
.eq(GovOperationProjectBaseinfo::getBaseProjId, projectRenewal.getProjectCode()) | |||
.last(BizConst.LIMIT_1)); | |||
VUtils.isTrue(Objects.isNull(project) && Objects.isNull(baseinfo) && Objects.isNull(operationBaseinfo)).throwMessage("关联的项目已经被删除!"); | |||
if (Boolean.TRUE.equals(param.getResult())){ | |||
if (Boolean.TRUE.equals(param.getResult())) { | |||
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PASS.name()); | |||
}else { | |||
} else { | |||
String auditOpinion = param.getAuditOpinion(); | |||
if (StrUtil.isBlank(auditOpinion)){ | |||
if (StrUtil.isBlank(auditOpinion)) { | |||
throw new BizException("审核意见不能为空"); | |||
} | |||
projectRenewal.setAuditOpinion(auditOpinion); | |||
projectRenewal.setApprovalStatus(ProjectRenewalApprovalStatusEnum.NOT_PASS.name()); | |||
} | |||
if(Objects.nonNull(project)){ | |||
if (Objects.nonNull(project)) { | |||
projectRenewal.setRegionCode(project.getAreaCode()); | |||
projectRenewal.setOrgCode(project.getBuildOrgCode()); | |||
}else if(Objects.nonNull(baseinfo)){ | |||
projectRenewal.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); | |||
} else if (Objects.nonNull(baseinfo)) { | |||
projectRenewal.setRegionCode(StringUtils.isNotBlank(baseinfo.getBaseAreaCode()) ? baseinfo.getBaseAreaCode().substring(0, 6) : StringUtils.EMPTY); | |||
projectRenewal.setOrgCode(baseinfo.getBaseBuildDeprtDing()); | |||
}else if(Objects.nonNull(operationBaseinfo)){ | |||
projectRenewal.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? operationBaseinfo.getBaseAreaCode().substring(0,6) : StringUtils.EMPTY); | |||
} else if (Objects.nonNull(operationBaseinfo)) { | |||
projectRenewal.setRegionCode(StringUtils.isNotBlank(operationBaseinfo.getBaseAreaCode()) ? operationBaseinfo.getBaseAreaCode().substring(0, 6) : StringUtils.EMPTY); | |||
projectRenewal.setOrgCode(operationBaseinfo.getBaseBuildDeprtDing()); | |||
} | |||
projectRenewal.setAuditOpinion(param.getAuditOpinion()); | |||
@@ -495,6 +494,7 @@ public class ProjectRenewalFundManage { | |||
/** | |||
* 续建项目删除 | |||
* | |||
* @param projectRenewalId | |||
* @return | |||
*/ | |||
@@ -536,7 +536,7 @@ public class ProjectRenewalFundManage { | |||
String fileName = "续建项目资金库列表"; | |||
ExcelDownUtil.setFileName(fileName,response); | |||
ExcelDownUtil.setFileName(fileName, response); | |||
//数据导出处理函数 | |||
try { | |||
EasyExcel.write(response.getOutputStream(), ProjectRenewalExportDTO.class) | |||
@@ -577,7 +577,7 @@ public class ProjectRenewalFundManage { | |||
} | |||
String fileName = "续建项目资金申报列表"; | |||
ExcelDownUtil.setFileName(fileName,response); | |||
ExcelDownUtil.setFileName(fileName, response); | |||
//数据导出处理函数 | |||
try { | |||
EasyExcel.write(response.getOutputStream(), ProjectRenewalDeclareExportDTO.class) | |||
@@ -604,11 +604,8 @@ public class ProjectRenewalFundManage { | |||
req.setUserValue(user.getEmpPosUnitCode()); | |||
break; | |||
case COMPANY_MANAGER: | |||
//单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目 | |||
req.setUserType("org"); | |||
req.setUserValue(user.getEmpPosUnitCode()); | |||
break; | |||
case SUPER_ADMIN: | |||
//单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目 | |||
//超级管理员 也只能看本单位的 | |||
req.setUserType("org"); | |||
req.setUserValue(user.getEmpPosUnitCode()); | |||
@@ -25,7 +25,6 @@ import com.hz.pm.api.gov.model.entity.*; | |||
import com.hz.pm.api.gov.service.*; | |||
import com.hz.pm.api.meta.model.entity.ExpertTag; | |||
import com.hz.pm.api.meta.service.IExpertTagService; | |||
import com.hz.pm.api.meta.service.IMetaTagService; | |||
import com.hz.pm.api.performance.model.entity.PerformanceAppraisalProject; | |||
import com.hz.pm.api.performance.service.IPerformanceAppraisalProjectService; | |||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | |||
@@ -42,7 +41,6 @@ import lombok.extern.slf4j.Slf4j; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.flowable.engine.HistoryService; | |||
import org.flowable.engine.history.HistoricActivityInstance; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.beans.factory.annotation.Value; | |||
import org.springframework.scheduling.annotation.Scheduled; | |||
import org.springframework.stereotype.Component; | |||
@@ -71,52 +69,25 @@ public class CockpitStatsStatisticsTask { | |||
@Value("${spring.profiles.active}") | |||
public String active; | |||
@Autowired | |||
private ICockpitStatsService cockpitStatsService; | |||
@Autowired | |||
private RegionCacheHelper regionCacheHelper; | |||
@Autowired | |||
private IProjectService projectService; | |||
@Autowired | |||
private IProjectInstService projectInstService; | |||
@Autowired | |||
private IExpertUserFullInfoService expertUserFullInfoService; | |||
@Autowired | |||
private IPerformanceAppraisalProjectService performanceAppraisalProjectService; | |||
@Autowired | |||
private IGovBizProjectBaseinfoService baseinfoService; | |||
@Autowired | |||
private IGovBizProjectApplyService applyService; | |||
@Autowired | |||
private HistoryService historyService; | |||
@Autowired | |||
private IGovBizProjectApproveService approveService; | |||
@Autowired | |||
private IGovBizProjectProcureService procureService; | |||
@Autowired | |||
private IGovBizProjectCimplementService cimplementService; | |||
@Autowired | |||
private IEarlyWarningRecordsService earlyWarningRecordsService; | |||
@Autowired | |||
private IExpertIntentionWorkRegionService expertIntentionWorkRegionService; | |||
private final ICockpitStatsService cockpitStatsService; | |||
private final RegionCacheHelper regionCacheHelper; | |||
private final IProjectService projectService; | |||
private final IProjectInstService projectInstService; | |||
private final IExpertUserFullInfoService expertUserFullInfoService; | |||
private final IPerformanceAppraisalProjectService performanceAppraisalProjectService; | |||
private final IGovBizProjectBaseinfoService baseinfoService; | |||
private final IGovBizProjectApplyService applyService; | |||
private final HistoryService historyService; | |||
private final IGovBizProjectApproveService approveService; | |||
private final IGovBizProjectProcureService procureService; | |||
private final IGovBizProjectCimplementService cimplementService; | |||
private final IEarlyWarningRecordsService earlyWarningRecordsService; | |||
private final IExpertIntentionWorkRegionService expertIntentionWorkRegionService; | |||
private final IExpertTagService expertTagService; | |||
private List<Integer> years = Lists.newArrayList(2021,2022,2023,2024,2025); | |||
private final IMetaTagService metaTagService; | |||
private final IExpertTagService expertTagService; | |||
/** | |||
* 定义统计 驾驶舱数据 每天3点开始执行一次 | |||
@@ -185,10 +156,10 @@ public class CockpitStatsStatisticsTask { | |||
Integer thisYear = LocalDateTime.now().getYear(); | |||
CockpitStats thisYearData = map.get(cockpitStats.getRegionCode() + thisYear); | |||
CockpitStats lastYearData = map.get(cockpitStats.getRegionCode() + (thisYear - 1)); | |||
buidMonitorRise(cockpitStats,thisYearData,lastYearData); | |||
buildMonitorRise(cockpitStats,thisYearData,lastYearData); | |||
}else{ | |||
CockpitStats lastYearData = map.get(cockpitStats.getRegionCode() + (cockpitStats.getYear() - 1)); | |||
buidMonitorRise(cockpitStats,cockpitStats,lastYearData); | |||
buildMonitorRise(cockpitStats,cockpitStats,lastYearData); | |||
} | |||
} | |||
@@ -290,10 +261,10 @@ public class CockpitStatsStatisticsTask { | |||
cockpitStats.setMonitorAcceptConditionsNotStandardsNum(0); | |||
//1.6 总申报金额 | |||
Double totalDeclaredAmount = projects.stream().mapToDouble(p -> Objects.nonNull(p.getDeclareAmount()) ? p.getDeclareAmount().doubleValue() : 0.0).sum(); | |||
double totalDeclaredAmount = projects.stream().mapToDouble(p -> Objects.nonNull(p.getDeclareAmount()) ? p.getDeclareAmount().doubleValue() : 0.0).sum(); | |||
cockpitStats.setMonitorDeclaredAmount(BigDecimal.valueOf(totalDeclaredAmount)); | |||
//1.7 总安全投入 | |||
Double totalSafytyAmount = projects.stream().mapToDouble(p -> { | |||
double totalSafetyAmount = projects.stream().mapToDouble(p -> { | |||
if(Objects.nonNull(p.getSafetyInputDescribe())){ | |||
final Double[] total = {0.0}; | |||
try{ | |||
@@ -310,7 +281,7 @@ public class CockpitStatsStatisticsTask { | |||
} | |||
return 0.0; | |||
}).sum(); | |||
cockpitStats.setMonitorSafetyInputAmount(BigDecimal.valueOf(totalSafytyAmount)); | |||
cockpitStats.setMonitorSafetyInputAmount(BigDecimal.valueOf(totalSafetyAmount)); | |||
//1.8等保密评 | |||
SecrecyPasswordGradePO secrecyPasswordGradePo = cockpitStatsService.getSecrecyPasswordGrade(regionCode, year); | |||
@@ -570,7 +541,7 @@ public class CockpitStatsStatisticsTask { | |||
if(Objects.nonNull(p.getStatus()) && | |||
(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(p.getStatus()) || | |||
(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode().equals(p.getStatus()) && | |||
searchSechmeReviewFlow(p.getProjectCode())))){ | |||
searchSchemaReviewFlow(p.getProjectCode())))){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
@@ -590,7 +561,7 @@ public class CockpitStatsStatisticsTask { | |||
(ProjectStatusEnum.TO_BE_APPROVED.getCode().equals(p.getStatus()) || | |||
p.getStatus().compareTo(ProjectStatusEnum.APPROVED_AFTER_CHOICE.getCode()) > 0 || | |||
(ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode().equals(p.getStatus()) && | |||
searchSechmeReviewedFlow(p.getProjectCode())))){ | |||
searchSchemaReviewedFlow(p.getProjectCode())))){ | |||
return Boolean.TRUE; | |||
} | |||
return Boolean.FALSE; | |||
@@ -794,7 +765,6 @@ public class CockpitStatsStatisticsTask { | |||
//9.绩效 | |||
List<String> projectCodes = projects.stream().map(Project::getProjectCode).collect(Collectors.toList()); | |||
Map<String, String> projectMap = projects.stream().filter(p -> Objects.nonNull(p.getProjectCode())).collect(Collectors.toMap(Project::getProjectCode, Project::getProjectName)); | |||
if(CollUtil.isNotEmpty(projectCodes)){ | |||
List<PerformanceAppraisalProject> performanceAll = performanceAppraisalProjectService.list(Wrappers.lambdaQuery(PerformanceAppraisalProject.class) | |||
.in(PerformanceAppraisalProject::getProjectCode, projectCodes)); | |||
@@ -869,7 +839,7 @@ public class CockpitStatsStatisticsTask { | |||
* @param projectCode | |||
* @return | |||
*/ | |||
private boolean searchSechmeReviewFlow(String projectCode) { | |||
private boolean searchSchemaReviewFlow(String projectCode) { | |||
Project project = projectService.getProjectByCode(projectCode); | |||
if(Objects.isNull(project)){ | |||
return Boolean.FALSE; | |||
@@ -902,7 +872,7 @@ public class CockpitStatsStatisticsTask { | |||
return Boolean.FALSE; | |||
} | |||
//已经开始审批 | |||
private boolean searchSechmeReviewedFlow(String projectCode) { | |||
private boolean searchSchemaReviewedFlow(String projectCode) { | |||
Project project = projectService.getProjectByCode(projectCode); | |||
if(Objects.isNull(project)){ | |||
return Boolean.FALSE; | |||
@@ -936,7 +906,7 @@ public class CockpitStatsStatisticsTask { | |||
*/ | |||
private Integer computeLagging(List<Project> projects) { | |||
List<String> projectCodes = projects.stream().map(Project::getProjectCode).collect(Collectors.toList()); | |||
Map<String, Project> map = projects.stream().collect(Collectors.toMap(p -> p.getProjectCode(), p -> p)); | |||
Map<String, Project> map = projects.stream().collect(Collectors.toMap(Project::getProjectCode, p -> p)); | |||
List<WflowEarlyWarningRecords> records = Lists.newArrayList(); | |||
if(CollUtil.isNotEmpty(projectCodes)){ | |||
records = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) | |||
@@ -956,7 +926,7 @@ public class CockpitStatsStatisticsTask { | |||
}).sum(); | |||
} | |||
private void buidMonitorRise(CockpitStats cockpitStats, CockpitStats thisYearData, CockpitStats lastYearData) { | |||
private void buildMonitorRise(CockpitStats cockpitStats, CockpitStats thisYearData, CockpitStats lastYearData) { | |||
if(Objects.isNull(thisYearData) || Objects.isNull(lastYearData)){ | |||
return; | |||
} | |||
@@ -65,7 +65,7 @@ public class EarlyWarningManage { | |||
//1.存入 预警记录 | |||
UserFullInfoDTO user = userInfoHelper.getUserFullInfoByEmployeeCode(employeeCode); | |||
WflowEarlyWarningRecords records = new WflowEarlyWarningRecords(); | |||
String content = StringUtils.EMPTY; | |||
String content; | |||
switch (WarningRuleTypeEnum.checkByCode(ruleType)) { | |||
case PROCESS_WARNING: | |||
@@ -1,5 +1,8 @@ | |||
package com.hz.pm.api.sys.model.dto; | |||
import com.hz.pm.api.staging.enums.MsgTypeEnum; | |||
import lombok.Data; | |||
/** | |||
* <p> | |||
* AbstractExtraDTO | |||
@@ -8,6 +11,9 @@ package com.hz.pm.api.sys.model.dto; | |||
* @author WendyYang | |||
* @since 2023/4/12 | |||
**/ | |||
@Data | |||
public abstract class AbstractMsgExtraDTO { | |||
private MsgTypeEnum msgType; | |||
} |
@@ -2,8 +2,8 @@ package com.hz.pm.api.todocenter.model.dto; | |||
import com.hz.pm.api.sys.model.dto.AbstractMsgExtraDTO; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.NoArgsConstructor; | |||
/** | |||
@@ -13,12 +13,14 @@ import lombok.NoArgsConstructor; | |||
* @since 2023/04/12 16:13 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@EqualsAndHashCode(callSuper = true) | |||
public class ProjectAuditMsgExtraDTO extends AbstractMsgExtraDTO { | |||
@ApiModelProperty("项目ID") | |||
private Long projectId; | |||
@ApiModelProperty("流程实例ID") | |||
private String instanceId; | |||
} |
@@ -5,12 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.StringUtils; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.ningdatech.basic.model.GenericResult; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.hz.pm.api.common.model.constant.RegionConst; | |||
import com.hz.pm.api.common.helper.RegionCacheHelper; | |||
import com.hz.pm.api.common.helper.UserInfoHelper; | |||
import com.hz.pm.api.common.model.constant.RegionConst; | |||
import com.hz.pm.api.common.util.BizUtils; | |||
import com.hz.pm.api.common.util.StrUtils; | |||
import com.hz.pm.api.ding.constants.DingOrganizationContant; | |||
@@ -22,8 +19,8 @@ import com.hz.pm.api.sys.model.entity.Role; | |||
import com.hz.pm.api.sys.model.entity.UserRole; | |||
import com.hz.pm.api.sys.service.IRoleService; | |||
import com.hz.pm.api.sys.service.IUserRoleService; | |||
import com.hz.pm.api.user.model.enumeration.UserAvailableEnum; | |||
import com.hz.pm.api.user.entity.UserInfo; | |||
import com.hz.pm.api.user.model.enumeration.UserAvailableEnum; | |||
import com.hz.pm.api.user.model.po.ReqUserDetailEditPO; | |||
import com.hz.pm.api.user.model.po.ReqUserDetailPO; | |||
import com.hz.pm.api.user.model.po.ReqUserDisableOrEnablePO; | |||
@@ -34,6 +31,9 @@ import com.hz.pm.api.user.model.vo.UserRoleVO; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
import com.hz.pm.api.user.service.IUserInfoService; | |||
import com.hz.pm.api.user.util.LoginUserUtil; | |||
import com.ningdatech.basic.exception.BizException; | |||
import com.ningdatech.basic.model.GenericResult; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.zwdd.ZwddIntegrationProperties; | |||
import com.ningdatech.zwdd.client.ZwddClient; | |||
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; | |||
@@ -96,7 +96,7 @@ public class UserInfoManage { | |||
List<UserInfo> records = page.getRecords(); | |||
long total = page.getTotal(); | |||
List<ResUserInfoListVO> result = new ArrayList<>(); | |||
if (records != null && records.size() > 0) { | |||
if (records != null && !records.isEmpty()) { | |||
List<String> employeeCodeList = records.stream().map(UserInfo::getEmployeeCode) | |||
.distinct().collect(Collectors.toList()); | |||
@@ -134,7 +134,7 @@ public class UserInfoManage { | |||
private List<String> getCompliantOrgEmpCodeList(String orgName, String orgCode) { | |||
if (StringUtils.isBlank(orgName) && StringUtils.isBlank(orgCode)) { | |||
return null; | |||
return Collections.emptyList(); | |||
} | |||
List<String> compliantOrgCodeList = new ArrayList<>(); | |||
@@ -176,12 +176,8 @@ public class UserInfoManage { | |||
List<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class) | |||
.in(DingEmployeeInfo::getEmpPosUnitCode, compliantOrgCodeList)); | |||
List<String> compliantOrgEmpCodeList = dingEmployeeInfoList.stream() | |||
return dingEmployeeInfoList.stream() | |||
.map(DingEmployeeInfo::getEmployeeCode).distinct().collect(Collectors.toList()); | |||
// if (compliantOrgEmpCodeList.size() > 500) { | |||
// throw new BizException("搜索结果过多请缩小搜索范围"); | |||
// } | |||
return compliantOrgEmpCodeList; | |||
} | |||
/** | |||
@@ -194,7 +190,7 @@ public class UserInfoManage { | |||
userRoleList = userRoleList.stream().filter(r -> Objects.nonNull(r.getId())).collect(Collectors.toList()); | |||
} | |||
if (CollUtil.isEmpty(userRoleList)) { | |||
return null; | |||
return Collections.emptyList(); | |||
} | |||
List<Long> roleIdList = userRoleList.stream().map(UserRoleVO::getId).collect(Collectors.toList()); | |||
@@ -361,9 +357,7 @@ public class UserInfoManage { | |||
@Transactional(rollbackFor = Exception.class) | |||
public void bandUserMobile(UserInfo userInfo, ReqUserDetailEditPO reqUserDetailEditPO) { | |||
String employeeCode = reqUserDetailEditPO.getEmployeeCode(); | |||
String mobile = userInfo.getMobile(); | |||
Long userId = userInfo.getId(); | |||
// if (StringUtils.isBlank(mobile)) { | |||
// 校验手机号是否重复 | |||
UserInfo repeatMobileUserInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) | |||
.eq(UserInfo::getMobile, reqUserDetailEditPO.getPhoneNo()).ne(UserInfo::getId, userId)); | |||
@@ -382,8 +376,6 @@ public class UserInfoManage { | |||
.set(DingEmployeeInfo::getBindUserMobile, phoneNo)); | |||
iUserInfoService.updateById(userInfo); | |||
} | |||
// } | |||
} | |||
@Transactional(rollbackFor = Exception.class) | |||
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.hz.pm.api.user.entity.MhCompany; | |||
import com.hz.pm.api.user.entity.MhUnit; | |||
import com.ningdatech.basic.util.CollUtils; | |||
import java.util.Collection; | |||