Browse Source

修复单位传参错误异常

tags/24080901
WendyYang 9 months ago
parent
commit
64bafbfe56
22 changed files with 449 additions and 159 deletions
  1. +63
    -64
      hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/EarlyWarningStatisticsManage.java
  2. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingCallOrMsgHelper.java
  3. +18
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java
  4. +3
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  5. +16
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectMapper.java
  6. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectMapper.xml
  7. +16
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectSchemaTargetDataMapper.java
  8. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectSchemaTargetDataMapper.xml
  9. +56
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/MhProject.java
  10. +107
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/MhProjectSchemaTargetData.java
  11. +16
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IMhProjectSchemaTargetDataService.java
  12. +16
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IMhProjectService.java
  13. +20
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/MhProjectSchemaTargetDataServiceImpl.java
  14. +20
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/MhProjectServiceImpl.java
  15. +7
    -9
      hz-pm-api/src/main/java/com/hz/pm/api/sms/constant/VoiceSmsTemplateConst.java
  16. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/sms/controller/VerificationCodeController.java
  17. +28
    -29
      hz-pm-api/src/main/java/com/hz/pm/api/sms/manage/VerificationCodeManage.java
  18. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/NoticeManage.java
  19. +4
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/sys/utils/EarlyWarningUtil.java
  20. +39
    -38
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java
  21. +2
    -2
      hz-pm-api/src/test/resources/application-dev.yml
  22. +2
    -2
      hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java

+ 63
- 64
hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/EarlyWarningStatisticsManage.java View File

@@ -60,127 +60,126 @@ public class EarlyWarningStatisticsManage {
private final TaskService taskService;

private static final List<Integer> threeYears = Lists.newArrayList(LocalDateTime.now().getYear() - 2,
LocalDateTime.now().getYear() - 1,LocalDateTime.now().getYear());
LocalDateTime.now().getYear() - 1, LocalDateTime.now().getYear());

public EarlyWarningStatisticsVO statistics(Integer year) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();

//项目
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class)
.eq(Project::getNewest, Boolean.TRUE));
.eq(Project::getNewest, Boolean.TRUE));

EarlyWarningStatisticsVO res = new EarlyWarningStatisticsVO();
LambdaQueryWrapper<WflowEarlyWarningRecords> wrapper = Wrappers.lambdaQuery(WflowEarlyWarningRecords.class);
EarlyWarningUtil.buildPermissionWrapper(wrapper,user);
EarlyWarningUtil.buildPermissionWrapper(wrapper, user);
List<WflowEarlyWarningRecords> records = earlyWarningRecordsService.list(wrapper);
//累积总告警数
res.setAccumulatedAlarmsTotal(records.size());
res.setAccumulatedAlarmsFlow(records.stream().filter(a -> {
res.setAccumulatedAlarmsFlow((int) records.stream().filter(a -> {
if (Objects.nonNull(a.getRuleType()) &&
a.getRuleType().equals(WarningRuleTypeEnum.PROCESS_WARNING.getCode())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size());
res.setAccumulatedAlarmsFilling(records.stream().filter(a -> {
}).count());
res.setAccumulatedAlarmsFilling((int) records.stream().filter(a -> {
if (Objects.nonNull(a.getRuleType()) &&
a.getRuleType().equals(WarningRuleTypeEnum.DECLARED_WARNING.getCode())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size());
}).count());

//近三年
List<DataDTO> threeYearsAlarms = Lists.newArrayList();
for(Integer thisYear : threeYears){
for (Integer thisYear : threeYears) {
DataDTO yearData = new DataDTO();
yearData.setName(thisYear.toString());
yearData.setNum(records.stream().filter(r -> {
if(Objects.nonNull(r.getWarningTime()) &&
thisYear.equals(r.getWarningTime().getYear())){
yearData.setNum((int) records.stream().filter(r -> {
if (Objects.nonNull(r.getWarningTime()) &&
thisYear.equals(r.getWarningTime().getYear())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size());
}).count());
threeYearsAlarms.add(yearData);
}
res.setThreeYearsAlarms(threeYearsAlarms);

//当前各流程报警数
List<DataDTO> alarmsFlowsNow = Lists.newArrayList();
for(ProjectProcessStageEnum stageEnum : ProjectProcessStageEnum.values()){
for (ProjectProcessStageEnum stageEnum : ProjectProcessStageEnum.values()) {
String processName = stageEnum.getDesc();
Integer processType = stageEnum.getCode();
alarmsFlowsNow.add(DataDTO.of(processName,computeFlowWarningNow(processType,records)));
alarmsFlowsNow.add(DataDTO.of(processName, computeFlowWarningNow(processType, records)));
}
res.setAlarmsFlowsNow(alarmsFlowsNow);

//当前各填报报警数
List<DataDTO> alarmsFillingNow = Lists.newArrayList();
for(WarningFlowTypeEnum fillingEnum : WarningFlowTypeEnum.values()){
for (WarningFlowTypeEnum fillingEnum : WarningFlowTypeEnum.values()) {
String processName = fillingEnum.getDesc();
Integer projectStutas = fillingEnum.getProjectStutas();
alarmsFillingNow.add(DataDTO.of(processName,computeFillingNow(projectStutas,records,projects)));
Integer projectStatus = fillingEnum.getProjectStutas();
alarmsFillingNow.add(DataDTO.of(processName, computeFillingNow(projectStatus, records, projects)));
}
res.setAlarmsFillingNow(alarmsFillingNow);

//实施预警
List<DataDTO> alarmsConstruction = Lists.newArrayList();
for(WarningNoticeTypeEnum noticeTypeEnum : WarningNoticeTypeEnum.values()){
for (WarningNoticeTypeEnum noticeTypeEnum : WarningNoticeTypeEnum.values()) {
String name = noticeTypeEnum.getDesc();
Integer noticeType = noticeTypeEnum.getCode();
alarmsConstruction.add(DataDTO.of(name,computeConstruction(noticeType,records,projects)));
alarmsConstruction.add(DataDTO.of(name, computeConstruction(noticeType, records, projects)));
}
res.setConstructionAlarms(alarmsConstruction);

//安全监测
List<DataDTO> safetyMonitoring = Lists.newArrayList();
//--1 安全设计
safetyMonitoring.add(DataDTO.of("安全设计",0));
safetyMonitoring.add(DataDTO.of("安全设计", 0));
//--2 安全投入低于5%
safetyMonitoring.add(DataDTO.of("安全投入低于5%",computeSafeLessFive(projects)));
safetyMonitoring.add(DataDTO.of("安全投入低于5%", computeSafeLessFive(projects)));
//--3 非信创
safetyMonitoring.add(DataDTO.of("非信创",computeNotXinChuang(projects)));
safetyMonitoring.add(DataDTO.of("非信创", computeNotXinChuang(projects)));
//--4 等保未做
safetyMonitoring.add(DataDTO.of("等保未做",0));
safetyMonitoring.add(DataDTO.of("等保未做", 0));
//--5 密评未做
safetyMonitoring.add(DataDTO.of("密评未做",0));
safetyMonitoring.add(DataDTO.of("密评未做", 0));
res.setSafetyMonitoring(safetyMonitoring);
return res;
}

//计算非信创
private Integer computeNotXinChuang(List<Project> projects) {
return projects.stream().filter(p -> StringUtils.isNotBlank(p.getCloudType()) &&
!p.getCloudType().contains("2"))
.collect(Collectors.toList()).size();
return (int) projects.stream().filter(p -> StringUtils.isNotBlank(p.getCloudType()) &&
!p.getCloudType().contains("2")).count();
}

//计算安全投入低于5%
private Integer computeSafeLessFive(List<Project> projects) {
return projects.stream().filter(p -> {
return (int) projects.stream().filter(p -> {
//计算出 安全投入
BigDecimal rate = new BigDecimal(DashboardProjectManage.convertSafetyInputRate(p));
if (rate.compareTo(new BigDecimal(5)) < 0) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size();
}).count();
}

private Integer computeConstruction(Integer noticeType, List<WflowEarlyWarningRecords> records,
List<Project> projects) {
//终验告警
List<WflowEarlyWarningRecords> constructionRecords = records.stream().filter(r -> {
if (Objects.nonNull(r.getRuleType()) &&
WarningRuleTypeEnum.OPERATION_WARNING.getCode().equals(r.getRuleType())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).filter(r -> Objects.nonNull(r.getNoticeType()) && r.getNoticeType().equals(noticeType) &&
if (Objects.nonNull(r.getRuleType()) &&
WarningRuleTypeEnum.OPERATION_WARNING.getCode().equals(r.getRuleType())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).filter(r -> Objects.nonNull(r.getNoticeType()) && r.getNoticeType().equals(noticeType) &&
WarningOperationTypeEnum.ZHONGYAN.getCode().equals(r.getBiz()))
.collect(Collectors.toList());
if(CollUtil.isEmpty(constructionRecords)){
if (CollUtil.isEmpty(constructionRecords)) {
return 0;
}
Map<String, List<WflowEarlyWarningRecords>> recordsMap = constructionRecords.stream().collect(Collectors.groupingBy(
@@ -188,21 +187,21 @@ public class EarlyWarningStatisticsManage {

//待终验的项目
List<Project> tobeFinalProjects = projects.stream().filter(p -> {
if(Objects.nonNull(p.getStatus()) &&
p.getStatus().equals(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode())){
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList());
if (Objects.nonNull(p.getStatus()) &&
p.getStatus().equals(ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode())) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList());

return tobeFinalProjects.stream().filter(p -> {
if(recordsMap.containsKey(p.getProjectCode())){
return (int) tobeFinalProjects.stream().filter(p -> {
if (recordsMap.containsKey(p.getProjectCode())) {
List<WflowEarlyWarningRecords> warningRecords = recordsMap.get(p.getProjectCode());
//如果是临期的 不能包含有超期的
if(noticeType.equals(WarningNoticeTypeEnum.ADVENT.getCode())){
for(WflowEarlyWarningRecords warningRecord : warningRecords){
if(Objects.isNull(warningRecord.getNoticeType()) || warningRecord.getNoticeType()
.equals(WarningNoticeTypeEnum.OVER.getCode())){
if (noticeType.equals(WarningNoticeTypeEnum.ADVENT.getCode())) {
for (WflowEarlyWarningRecords warningRecord : warningRecords) {
if (Objects.isNull(warningRecord.getNoticeType()) || warningRecord.getNoticeType()
.equals(WarningNoticeTypeEnum.OVER.getCode())) {
return Boolean.FALSE;
}
}
@@ -211,7 +210,7 @@ public class EarlyWarningStatisticsManage {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size();
}).count();
}

private Integer computeFillingNow(Integer projectStutas, List<WflowEarlyWarningRecords> records,
@@ -223,30 +222,30 @@ public class EarlyWarningStatisticsManage {
}
return Boolean.FALSE;
}).filter(r -> Objects.nonNull(r.getNodeId())).collect(Collectors.toList());
if(CollUtil.isEmpty(fillingRecords)){
if (CollUtil.isEmpty(fillingRecords)) {
return 0;
}
Map<String, List<WflowEarlyWarningRecords>> warningMap = fillingRecords.stream()
.collect(Collectors.groupingBy(WflowEarlyWarningRecords::getProjectCode));

List<Project> thisStatusProjects = projects.stream().filter(p -> {
if(Objects.nonNull(p.getStatus()) && p.getStatus().equals(projectStutas)){
if (Objects.nonNull(p.getStatus()) && p.getStatus().equals(projectStutas)) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList());

return thisStatusProjects.stream().filter(p -> {
if(warningMap.containsKey(p.getProjectCode())){
return (int) thisStatusProjects.stream().filter(p -> {
if (warningMap.containsKey(p.getProjectCode())) {
//这个状态有告警 并且 这个项目也是这个类型
return Boolean.TRUE;
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size();
}).count();
}

//计算某个流程当前正在告警的数量
private Integer computeFlowWarningNow(Integer processType,List<WflowEarlyWarningRecords> records) {
private Integer computeFlowWarningNow(Integer processType, List<WflowEarlyWarningRecords> records) {
List<WflowEarlyWarningRecords> processRecords = records.stream().filter(r -> {
if (Objects.nonNull(r.getRuleType()) &&
WarningRuleTypeEnum.PROCESS_WARNING.getCode().equals(r.getRuleType())) {
@@ -254,7 +253,7 @@ public class EarlyWarningStatisticsManage {
}
return Boolean.FALSE;
}).filter(r -> Objects.nonNull(r.getNodeId())).collect(Collectors.toList());
if(CollUtil.isEmpty(processRecords)){
if (CollUtil.isEmpty(processRecords)) {
return 0;
}
Map<String, List<WflowEarlyWarningRecords>> warningMap = processRecords.stream()
@@ -263,7 +262,7 @@ public class EarlyWarningStatisticsManage {
//1.先查出 所育 这个类型的 流程
List<ProjectInst> proInsts = projectInstService.list(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getInstType, processType));
if(CollUtil.isEmpty(proInsts)){
if (CollUtil.isEmpty(proInsts)) {
return 0;
}
//2.再筛选一下 选出 正在审核 未完成的
@@ -275,28 +274,28 @@ public class EarlyWarningStatisticsManage {
.orderByProcessInstanceStartTime()
.asc()
.list();
if(CollUtil.isEmpty(processes)){
if (CollUtil.isEmpty(processes)) {
return 0;
}
//查出所有正在执行的工作流任务
List<Task> tasks = taskService.createTaskQuery()
.list();
if(CollUtil.isEmpty(tasks)){
if (CollUtil.isEmpty(tasks)) {
return 0;
}
Map<String, List<Task>> taskMap = tasks.stream()
.collect(Collectors.groupingBy(Task::getProcessInstanceId));
return processes.stream().filter(p -> {
if(taskMap.containsKey(p.getId())){
return (int) processes.stream().filter(p -> {
if (taskMap.containsKey(p.getId())) {
List<Task> tasksThis = taskMap.get(p.getId());
for(Task taskThis : tasksThis){
for (Task taskThis : tasksThis) {
//说明 当前有告警
if(warningMap.containsKey(taskThis.getTaskDefinitionKey())){
if (warningMap.containsKey(taskThis.getTaskDefinitionKey())) {
return Boolean.TRUE;
}
}
}
return Boolean.FALSE;
}).collect(Collectors.toList()).size();
}).count();
}
}

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingCallOrMsgHelper.java View File

@@ -175,7 +175,7 @@ public class MeetingCallOrMsgHelper {
* @author WendyYang
**/
public void callExpertByMeeting(Meeting meeting, List<MeetingExpert> experts) {
String voiceContent = String.format(VoiceSmsTemplateConst.OFFLINE_TEMPLATE,
String voiceContent = String.format(VoiceSmsTemplateConst.EXPERT_INVITE,
meeting.getHoldOrg(), meeting.getName(), officialTime(meeting.getStartTime()),
meeting.getMeetingAddress());
List<SubmitTaskCallContext> callContexts = CollUtils.convert(experts, w -> {


+ 18
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/MhProjectController.java View File

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

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

/**
* <p>
* 前端控制器
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
@Controller
@RequestMapping("/api.projectlib/mhProject")
public class MhProjectController {

}

+ 3
- 5
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -542,7 +542,7 @@ public class ProjectLibManage {
item.setApproveUsers(buildApproveUsers(w.getInstCode(), map, userMap));
if (user.getIsOrgAdmin() && ProjectStatusEnum.PENDING_PREQUALIFICATION.eq(item.getStatus())
&& StringUtils.isNotBlank(w.getSuperOrgCode())
&& w.getSuperOrgCode().equals(user.getMhUserId())) {
&& w.getSuperOrgCode().equals(user.getMhUnitIdStr())) {
item.setCanPreDeclared(Boolean.TRUE);
}
item.setApprovedAmount(w.getApprovalAmount());
@@ -685,8 +685,7 @@ public class ProjectLibManage {
.eq(PaymentPlan::getProjectCode, projectInfo.getProjectCode())
.orderByAsc(PaymentPlan::getPaymentTime));
if (Objects.nonNull(contractVO)) {
contractVO.setPayments(convertPayments(payments,
contractVO.getTotalAmount()));
contractVO.setPayments(convertPayments(payments, contractVO.getTotalAmount()));
}

//查询实施信息
@@ -775,8 +774,7 @@ public class ProjectLibManage {
* @param instanceId
* @return
*/
public Project saveProjectInDeclared(ProjectDTO projectDto, String instanceId,
Long userId) {
public Project saveProjectInDeclared(ProjectDTO projectDto, String instanceId, Long userId) {
Project project = saveProjectNewVersion(projectDto, instanceId, userId, Boolean.FALSE);
//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();


+ 16
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectMapper.java View File

@@ -0,0 +1,16 @@
package com.hz.pm.api.projectlib.mapper;

import com.hz.pm.api.projectlib.model.entity.MhProject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* <p>
* Mapper 接口
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
public interface MhProjectMapper extends BaseMapper<MhProject> {

}

+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectMapper.xml View File

@@ -0,0 +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.projectlib.mapper.MhProjectMapper">

</mapper>

+ 16
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectSchemaTargetDataMapper.java View File

@@ -0,0 +1,16 @@
package com.hz.pm.api.projectlib.mapper;

import com.hz.pm.api.projectlib.model.entity.MhProjectSchemaTargetData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* <p>
* Mapper 接口
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
public interface MhProjectSchemaTargetDataMapper extends BaseMapper<MhProjectSchemaTargetData> {

}

+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/mapper/MhProjectSchemaTargetDataMapper.xml View File

@@ -0,0 +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.projectlib.mapper.MhProjectSchemaTargetDataMapper">

</mapper>

+ 56
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/MhProject.java View File

@@ -0,0 +1,56 @@
package com.hz.pm.api.projectlib.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;

import com.hz.pm.api.external.model.dto.MhProjectSchemeTargetDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
* 信产项目信息
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
@Data
@TableName("MH_PROJECT")
@ApiModel(value = "MhProject对象")
public class MhProject implements Serializable {

private static final long serialVersionUID = 1L;

@TableId(value = "ID", type = IdType.AUTO)
private Long id;

@ApiModelProperty("项目合规性检查附件")
private String fileId;

@ApiModelProperty("项目复核附件")
private String fileIdThree;

@ApiModelProperty("项目评审附件")
private String fileIdTwo;

@ApiModelProperty("项目评审预算金额")
private BigDecimal money;

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

@ApiModelProperty("项目总金额")
private BigDecimal totalMoney;

@ApiModelProperty("单位ID")
private Long unitId;

@ApiModelProperty("单位名称")
private String unitName;

}

+ 107
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/MhProjectSchemaTargetData.java View File

@@ -0,0 +1,107 @@
package com.hz.pm.api.projectlib.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;

/**
* <p>
* 项目关键指标信息
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
@Data
@TableName("MH_PROJECT_SCHEMA_TARGET_DATA")
@ApiModel(value = "MhProjectSchemaTargetData对象")
public class MhProjectSchemaTargetData implements Serializable {

private static final long serialVersionUID = 1L;

@TableId(type = IdType.INPUT)
@ApiModelProperty(value = "ID")
private String id;

/**
* 信产项目ID{@link MhProject#getId()}
*/
private Long mhProjectId;

@ApiModelProperty(value = "迁移上云信息系统数量")
private int cloudSystemNum;

@ApiModelProperty(value = "创建时间")
private Date createTime;

@ApiModelProperty(value = "创建单位")
private Long createUnit;

@ApiModelProperty(value = "创建人")
private String createUser;

@ApiModelProperty(value = "附件")
private String fileId;

@ApiModelProperty(value = "本地部署非涉密信息系统数量")
private Integer fsmLocalSystemNum;

@ApiModelProperty(value = "更新购置非涉密服务器数量")
private Integer fsmServerNum;

@ApiModelProperty(value = "更新购置非涉密数据库数量")
private Integer fsmUpdateDbNum;

@ApiModelProperty(value = "更新购置非涉密中间件数量")
private Integer fsmUpdateMiddleNum;

@ApiModelProperty(value = "vCPU(核数)")
private Integer hostCpuNum;

@ApiModelProperty(value = "内存(GB)")
private Integer hostMemoryNum;

@ApiModelProperty(value = "信创云虚拟主机数量")
private Integer hostNum;

@ApiModelProperty(value = "存储(GB)")
private Integer hostStoreNum;

@ApiModelProperty(value = "总投资预算金额(万元)")
private BigDecimal money;

@ApiModelProperty(value = "本地部署涉密信息系统数量")
private Integer smLocalSystemNum;

@ApiModelProperty(value = "更新购置涉密服务器数量")
private Integer smServerNum;

@ApiModelProperty(value = "更新购置涉密数据库数量")
private Integer smUpdateDbNum;

@ApiModelProperty(value = "更新购置涉密中间件数量")
private Integer smUpdateMiddleNum;

@ApiModelProperty(value = "更新时间")
private Date updateTime;

@ApiModelProperty(value = "更新人")
private String updateUser;

@ApiModelProperty(value = "信创云数据库数量")
private Integer xcDbNum;

@ApiModelProperty(value = "信创云中间件数量")
private Integer xcMiddleNum;

}

+ 16
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IMhProjectSchemaTargetDataService.java View File

@@ -0,0 +1,16 @@
package com.hz.pm.api.projectlib.service;

import com.hz.pm.api.projectlib.model.entity.MhProjectSchemaTargetData;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* <p>
* 服务类
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
public interface IMhProjectSchemaTargetDataService extends IService<MhProjectSchemaTargetData> {

}

+ 16
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IMhProjectService.java View File

@@ -0,0 +1,16 @@
package com.hz.pm.api.projectlib.service;

import com.hz.pm.api.projectlib.model.entity.MhProject;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* <p>
* 服务类
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
public interface IMhProjectService extends IService<MhProject> {

}

+ 20
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/MhProjectSchemaTargetDataServiceImpl.java View File

@@ -0,0 +1,20 @@
package com.hz.pm.api.projectlib.service.impl;

import com.hz.pm.api.projectlib.model.entity.MhProjectSchemaTargetData;
import com.hz.pm.api.projectlib.mapper.MhProjectSchemaTargetDataMapper;
import com.hz.pm.api.projectlib.service.IMhProjectSchemaTargetDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
@Service
public class MhProjectSchemaTargetDataServiceImpl extends ServiceImpl<MhProjectSchemaTargetDataMapper, MhProjectSchemaTargetData> implements IMhProjectSchemaTargetDataService {

}

+ 20
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/impl/MhProjectServiceImpl.java View File

@@ -0,0 +1,20 @@
package com.hz.pm.api.projectlib.service.impl;

import com.hz.pm.api.projectlib.model.entity.MhProject;
import com.hz.pm.api.projectlib.mapper.MhProjectMapper;
import com.hz.pm.api.projectlib.service.IMhProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author WendyYang
* @since 2024-01-30
*/
@Service
public class MhProjectServiceImpl extends ServiceImpl<MhProjectMapper, MhProject> implements IMhProjectService {

}

+ 7
- 9
hz-pm-api/src/main/java/com/hz/pm/api/sms/constant/VoiceSmsTemplateConst.java View File

@@ -8,26 +8,24 @@ package com.hz.pm.api.sms.constant;
* @author WendyYang
* @since 15:10 2023/3/30
*/
public interface VoiceSmsTemplateConst {
public class VoiceSmsTemplateConst {

private VoiceSmsTemplateConst() {
}

/**
* 短信登陆验证码
*/
String SMS_COMMON_TEMPLATE = "验证码:%s(有效期为%s分钟),请勿泄露给他人,如非本人操作,请忽略此信息。";
public static final String SMS_VERIFY_CODE = "验证码:%s(有效期为%s分钟),请勿泄露给他人,如非本人操作,请忽略此信息。";

/**
* 社会专家报名
*/
String EXPERT_REGISTER = "专家报名验证码:%s(有效期为%s分钟),请勿泄露给他人,如非本人操作,请忽略此信息。";
public static final String EXPERT_REGISTER = "专家报名验证码:%s(有效期为%s分钟),请勿泄露给他人,如非本人操作,请忽略此信息。";

/**
* 专家电话通知语音模版
*/
String OFFLINE_TEMPLATE = "尊敬的专家您好,%s现邀请您作为专家参加%s会议,会议时间:%s,会议地点:%s。 确认参加请按 1,拒绝参加请按 2。请您选择";

/**
* 专家同意参加短信通知模板
*/
String EXPERT_AGREE_ATTEND_TEMPLATE = "";
public static final String EXPERT_INVITE = "尊敬的专家您好,%s现邀请您作为专家参加%s会议,会议时间:%s,会议地点:%s。 确认参加请按 1,拒绝参加请按 2。请您选择";

}

+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/sms/controller/VerificationCodeController.java View File

@@ -2,7 +2,7 @@ package com.hz.pm.api.sms.controller;

import com.ningdatech.log.annotation.WebLog;
import com.hz.pm.api.sms.constant.VerificationCodeType;
import com.hz.pm.api.sms.manage.SmsManage;
import com.hz.pm.api.sms.manage.VerificationCodeManage;
import com.hz.pm.api.sms.model.po.ReqVerificationCodePO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
public class VerificationCodeController {


private final SmsManage smsManage;
private final VerificationCodeManage verificationCodeManage;

/**
* 通用的发送验证码功能
@@ -37,7 +37,7 @@ public class VerificationCodeController {
@PostMapping(value = "/send")
@WebLog("发送验证码")
public void send(@Validated @RequestBody ReqVerificationCodePO request) {
smsManage.sendVerificationCode(request);
verificationCodeManage.sendVerificationCode(request);
}

}

hz-pm-api/src/main/java/com/hz/pm/api/sms/manage/SmsManage.java → hz-pm-api/src/main/java/com/hz/pm/api/sms/manage/VerificationCodeManage.java View File

@@ -14,6 +14,7 @@ import com.hz.pm.api.sms.utils.SmsRedisKeyUtils;
import com.ningdatech.yxt.client.YxtClient;
import com.ningdatech.yxt.constants.YxtSmsSignEnum;
import com.ningdatech.yxt.model.cmd.SendSmsCmd;
import com.ningdatech.yxt.model.cmd.SendSmsCmd.SendSmsContext;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -32,53 +33,51 @@ import java.util.Objects;
@Slf4j
@Component
@RequiredArgsConstructor
public class SmsManage {
public class VerificationCodeManage {

private final YxtClient yxtClient;
private final CachePlusOps cachePlusOps;

public void sendVerificationCode(ReqVerificationCodePO request) {
Assert.isTrue(PhoneUtil.isMobile(request.getMobile()), "手机号码格式不正确");
String verificationType = request.getVerificationType();
VerificationCodeType verificationCodeTypeEnum = VerificationCodeType.of(verificationType);
public void sendVerificationCode(ReqVerificationCodePO req) {
Assert.isTrue(PhoneUtil.isMobile(req.getMobile()), "手机号码格式不正确");
String verificationType = req.getVerificationType();
VerificationCodeType codeType = VerificationCodeType.of(verificationType);

// 验证是否被锁定
String lockKey = SmsRedisKeyUtils.smsSendLockKey(verificationCodeTypeEnum, request.getMobile());
String lockKey = SmsRedisKeyUtils.smsSendLockKey(codeType, req.getMobile());
if (StringUtils.isNotBlank(cachePlusOps.get(lockKey))) {
throw BizException.wrap("今日" + verificationCodeTypeEnum.getDesc() + "的验证码发送次数过多,已被锁定");
throw BizException.wrap("今日" + codeType.getDesc() + "的验证码发送次数过多,已被锁定");
}
// 验证发送间隔
String cacheKey = SmsRedisKeyUtils.smsCodeVerifyKey(verificationCodeTypeEnum, request.getMobile());
VerifyCodeCacheDTO preCache = (VerifyCodeCacheDTO) cachePlusOps.get(cacheKey);
if (preCache != null) {
if (LocalDateTime.now().minusMinutes(verificationCodeTypeEnum.getSendInterval())
.isBefore(preCache.getSendTime())) {
throw BizException.wrap(verificationCodeTypeEnum.getSendInterval() + "分钟之内已发送过验证码,请稍后重试");
}
String cacheKey = SmsRedisKeyUtils.smsCodeVerifyKey(codeType, req.getMobile());
VerifyCodeCacheDTO preCache = cachePlusOps.get(cacheKey);
if (preCache != null && (LocalDateTime.now().minusMinutes(codeType.getSendInterval())
.isBefore(preCache.getSendTime()))) {
throw BizException.wrap(codeType.getSendInterval() + "分钟之内已发送过验证码,请稍后重试");
}
String code = RandomUtil.randomNumbers(6);
VerifyCodeCacheDTO cache = VerifyCodeCacheDTO.builder()
.code(code)
.sendTime(LocalDateTime.now())
.mobile(request.getMobile())
.mobile(req.getMobile())
.build();

// 创建短信内容
SendSmsCmd sendSmsCmd = new SendSmsCmd();
switch (verificationCodeTypeEnum) {
switch (codeType) {
case LOGIN: {
SendSmsCmd.SendSmsContext sendSmsContext = new SendSmsCmd.SendSmsContext();
sendSmsContext.setReceiveNumber(request.getMobile());
sendSmsContext.setContent(String.format(VoiceSmsTemplateConst.SMS_COMMON_TEMPLATE, code, verificationCodeTypeEnum.getExpireTime()));
sendSmsCmd.setContextList(Collections.singletonList(sendSmsContext));
SendSmsContext sendSmsCtx = new SendSmsContext();
sendSmsCtx.setReceiveNumber(req.getMobile());
sendSmsCtx.setContent(String.format(VoiceSmsTemplateConst.SMS_VERIFY_CODE, code, codeType.getExpireTime()));
sendSmsCmd.setContextList(Collections.singletonList(sendSmsCtx));
sendSmsCmd.setSmsSignEnum(YxtSmsSignEnum.LS_BIG_DATA_BUREAU);
}
break;
case EXPERT_REGISTER: {
SendSmsCmd.SendSmsContext sendSmsContext = new SendSmsCmd.SendSmsContext();
sendSmsContext.setReceiveNumber(request.getMobile());
sendSmsContext.setContent(String.format(VoiceSmsTemplateConst.EXPERT_REGISTER, code, verificationCodeTypeEnum.getExpireTime()));
sendSmsCmd.setContextList(Collections.singletonList(sendSmsContext));
SendSmsContext sendSmsCtx = new SendSmsContext();
sendSmsCtx.setReceiveNumber(req.getMobile());
sendSmsCtx.setContent(String.format(VoiceSmsTemplateConst.EXPERT_REGISTER, code, codeType.getExpireTime()));
sendSmsCmd.setContextList(Collections.singletonList(sendSmsCtx));
sendSmsCmd.setSmsSignEnum(YxtSmsSignEnum.LS_BIG_DATA_BUREAU);
}
break;
@@ -88,16 +87,16 @@ public class SmsManage {

// 发送 短信
yxtClient.submitSmsTask(sendSmsCmd);
log.info("send verificationCode mobile = {},code = {}", request.getMobile(), code);
log.info("发送短信验证码:{} -> {}", req.getMobile(), code);

cachePlusOps.set(new CacheKey(cacheKey, Duration.ofMinutes(verificationCodeTypeEnum.getExpireTime())), cache);
String limitKey = SmsRedisKeyUtils.smsSendLimitKey(verificationCodeTypeEnum, request.getMobile());
cachePlusOps.set(new CacheKey(cacheKey, Duration.ofMinutes(codeType.getExpireTime())), cache);
String limitKey = SmsRedisKeyUtils.smsSendLimitKey(codeType, req.getMobile());
if (Objects.nonNull(cachePlusOps.get(limitKey))) {
Integer limitCount = cachePlusOps.get(limitKey);
cachePlusOps.set(new CacheKey(limitKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), limitCount++);
// 超出单日发送次数之后直接锁定
if (limitCount >= verificationCodeTypeEnum.getSendTimesByDay().longValue()) {
cachePlusOps.set(new CacheKey(lockKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), request.getMobile());
if (limitCount >= codeType.getSendTimesByDay().longValue()) {
cachePlusOps.set(new CacheKey(lockKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), req.getMobile());
}
} else {
cachePlusOps.set(new CacheKey(limitKey, Duration.ofSeconds(DateUtil.restSecondsFromNowToNoon())), 1);

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/NoticeManage.java View File

@@ -345,7 +345,7 @@ public class NoticeManage {
wrapper.and(q3 -> q3.eq(Notice::getPermissions, NoticePermissionsEnum.SUPER.getCode())
.or(q1 -> q1.eq(Notice::getPermissions, NoticePermissionsEnum.REGION.getCode()))
.or(q2 -> q2.eq(Notice::getPermissions, NoticePermissionsEnum.ORG.getCode())
.eq(Notice::getPermissionsValue, user.getMhUnitId())));
.eq(Notice::getPermissionsValue, user.getMhUnitIdStr())));
}

private void permissionsWrapperByEdit(LambdaQueryWrapper<Notice> wrapper, UserFullInfoDTO user) {
@@ -354,7 +354,7 @@ public class NoticeManage {
log.info(user.getUsername() + ",超管可以看所有");
} else if (user.getIsOrgAdmin()) {
wrapper.eq(Notice::getPermissions, NoticePermissionsEnum.ORG.getCode())
.eq(Notice::getPermissionsValue, user.getMhUnitId());
.eq(Notice::getPermissionsValue, user.getMhUnitIdStr());
} else {
wrapper.eq(Notice::getCreateOn, user.getUserId());
}


+ 4
- 4
hz-pm-api/src/main/java/com/hz/pm/api/sys/utils/EarlyWarningUtil.java View File

@@ -23,10 +23,10 @@ public class EarlyWarningUtil {
if (user.getSuperAdmin() || user.getRegionAdmin()) {
// 可以看所有
} else if (user.getIsOrgAdmin()) {
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitId());
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitIdStr());
} else {
//否则都只能看自己单位的
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitId());
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitIdStr());
}
}

@@ -36,10 +36,10 @@ public class EarlyWarningUtil {
if (user.getSuperAdmin() || user.getRegionAdmin()) {
// 可以看所有
} else if (user.getIsOrgAdmin()) {
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitId());
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitIdStr());
} else {
//否则都只能看自己单位的
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitId());
wrapper.eq(WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitIdStr());
}
}



+ 39
- 38
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java View File

@@ -31,6 +31,7 @@ import com.hz.pm.api.user.security.model.UserFullInfoDTO;
import com.hz.pm.api.user.util.LoginUserUtil;
import com.hz.pm.api.workbench.converter.WorkbenchConverter;
import com.hz.pm.api.workbench.model.vo.WorkbenchVO;
import com.hz.pm.api.workbench.model.vo.WorkbenchVO.WarningStatistics;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.StrPool;
@@ -106,11 +107,11 @@ public class WorkbenchManage {
stopWatch.start();

//2.项目统计数据
res.setOrgDeclared(WorkbenchConverter.convert(defaultDeclaredProjectManage
.declaredProjectOrgStatistics(year, user), defaultDeclaredProjectManage.declaredProjectOrgStatistics(year - 1, user)));
res.setOrgDeclared(WorkbenchConverter.convert(defaultDeclaredProjectManage.declaredProjectOrgStatistics(year, user),
defaultDeclaredProjectManage.declaredProjectOrgStatistics(year - 1, user)));
if (userInfoHelper.isSuperOrRegionAdmin(user.getUserId())) {
res.setRegionDeclared(WorkbenchConverter.convert(defaultDeclaredProjectManage
.declaredProjectRegionStatistics(year, user), defaultDeclaredProjectManage.declaredProjectRegionStatistics(year - 1, user)));
res.setRegionDeclared(WorkbenchConverter.convert(defaultDeclaredProjectManage.declaredProjectRegionStatistics(year, user),
defaultDeclaredProjectManage.declaredProjectRegionStatistics(year - 1, user)));
} else {
res.setRegionDeclared(new WorkbenchVO.DeclaredStatistics());
}
@@ -165,7 +166,7 @@ public class WorkbenchManage {

//4.1
//累积预警统计
WorkbenchVO.WarningStatistics accumulate = new WorkbenchVO.WarningStatistics();
WarningStatistics accumulate = new WarningStatistics();
LambdaQueryWrapper<WflowEarlyWarningRecords> overWrapper = Wrappers.lambdaQuery(WflowEarlyWarningRecords.class)
.eq(WflowEarlyWarningRecords::getNoticeType, WarningNoticeTypeEnum.OVER.getCode())
.or(q2 -> q2.isNull(WflowEarlyWarningRecords::getNoticeType));
@@ -195,17 +196,17 @@ public class WorkbenchManage {
projectEarlyWarningService.page(adventPage, adventPewWrapper);
LambdaQueryWrapper<ProjectEarlyWarning> normalWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class)
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.NORMAL.name())
.eq((user.getIsOrgAdmin() && !user.getSuperAdmin()) || user.notAdmin(), ProjectEarlyWarning::getBuildOrgCode, user.getMhUnitId());
.eq((user.getIsOrgAdmin() && !user.getSuperAdmin()) || user.notAdmin(), ProjectEarlyWarning::getBuildOrgCode, user.getMhUnitIdStr());
projectEarlyWarningService.page(normalPage, normalWrapper);

WorkbenchVO.WarningStatistics cuurent = new WorkbenchVO.WarningStatistics();
WarningStatistics current = new WarningStatistics();
long overTotal = overPage.getTotal();
long adventTotal = adventPage.getTotal();
long normalTotal = normalPage.getTotal();
cuurent.setAdvent((int) adventTotal);
cuurent.setOver((int) overTotal);
cuurent.setNormal((int) normalTotal);
projectEarlyWarning.setCurrent(cuurent);
current.setAdvent((int) adventTotal);
current.setOver((int) overTotal);
current.setNormal((int) normalTotal);
projectEarlyWarning.setCurrent(current);

List<WflowEarlyWarningRecords> warningRecords = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class)
.eq((user.getIsOrgAdmin() && !user.getSuperAdmin()) || user.notAdmin(), WflowEarlyWarningRecords::getBuildOrgCode, user.getMhUnitId())
@@ -221,15 +222,15 @@ public class WorkbenchManage {
ProjectEarlyWarningVO vo = BeanUtil.copyProperties(o, ProjectEarlyWarningVO.class);
//取最新一条预警信息
if (warningMap.containsKey(vo.getProjectCode())) {
WflowEarlyWarningRecords record = warningMap.get(vo.getProjectCode());
vo.setWarningTime(record.getWarningTime());
vo.setInstStart(record.getInstStart());
vo.setWarningUserId(record.getWarningUserId());
vo.setNoticeMethod(record.getNoticeMethod());
vo.setNoticeContent(record.getNoticeContent());
vo.setPath(record.getPath());
vo.setBatchUserIds(record.getBatchUserIds());
vo.setRecordId(record.getId());
WflowEarlyWarningRecords currRecord = warningMap.get(vo.getProjectCode());
vo.setWarningTime(currRecord.getWarningTime());
vo.setInstStart(currRecord.getInstStart());
vo.setWarningUserId(currRecord.getWarningUserId());
vo.setNoticeMethod(currRecord.getNoticeMethod());
vo.setNoticeContent(currRecord.getNoticeContent());
vo.setPath(currRecord.getPath());
vo.setBatchUserIds(currRecord.getBatchUserIds());
vo.setRecordId(currRecord.getId());
} else {
vo.setWarningTime(now);
}
@@ -248,15 +249,15 @@ public class WorkbenchManage {
ProjectEarlyWarningVO vo = BeanUtil.copyProperties(o, ProjectEarlyWarningVO.class);
//取最新一条预警信息
if (warningMap.containsKey(vo.getProjectCode())) {
WflowEarlyWarningRecords record = warningMap.get(vo.getProjectCode());
vo.setWarningTime(record.getWarningTime());
vo.setInstStart(record.getInstStart());
vo.setWarningUserId(record.getWarningUserId());
vo.setNoticeMethod(record.getNoticeMethod());
vo.setNoticeContent(record.getNoticeContent());
vo.setPath(record.getPath());
vo.setBatchUserIds(record.getBatchUserIds());
vo.setRecordId(record.getId());
WflowEarlyWarningRecords currRecord = warningMap.get(vo.getProjectCode());
vo.setWarningTime(currRecord.getWarningTime());
vo.setInstStart(currRecord.getInstStart());
vo.setWarningUserId(currRecord.getWarningUserId());
vo.setNoticeMethod(currRecord.getNoticeMethod());
vo.setNoticeContent(currRecord.getNoticeContent());
vo.setPath(currRecord.getPath());
vo.setBatchUserIds(currRecord.getBatchUserIds());
vo.setRecordId(currRecord.getId());
} else {
vo.setWarningTime(now);
}
@@ -274,15 +275,15 @@ public class WorkbenchManage {
ProjectEarlyWarningVO vo = BeanUtil.copyProperties(o, ProjectEarlyWarningVO.class);
//取最新一条预警信息
if (warningMap.containsKey(vo.getProjectCode())) {
WflowEarlyWarningRecords record = warningMap.get(vo.getProjectCode());
vo.setWarningTime(record.getWarningTime());
vo.setInstStart(record.getInstStart());
vo.setWarningUserId(record.getWarningUserId());
vo.setNoticeMethod(record.getNoticeMethod());
vo.setNoticeContent(record.getNoticeContent());
vo.setPath(record.getPath());
vo.setBatchUserIds(record.getBatchUserIds());
vo.setRecordId(record.getId());
WflowEarlyWarningRecords currRecord = warningMap.get(vo.getProjectCode());
vo.setWarningTime(currRecord.getWarningTime());
vo.setInstStart(currRecord.getInstStart());
vo.setWarningUserId(currRecord.getWarningUserId());
vo.setNoticeMethod(currRecord.getNoticeMethod());
vo.setNoticeContent(currRecord.getNoticeContent());
vo.setPath(currRecord.getPath());
vo.setBatchUserIds(currRecord.getBatchUserIds());
vo.setRecordId(currRecord.getId());
}
vo.setProjectName(projectNameMap.get(o.getProjectCode()));
return vo;


+ 2
- 2
hz-pm-api/src/test/resources/application-dev.yml View File

@@ -23,7 +23,7 @@ spring:
max-active: 200
max-idle: 500
min-idle: 8
max-wait: 10000
max-wait: 60000
application:
name: hzpm
jackson:
@@ -61,7 +61,7 @@ spring:
# 配置从池返回的连接的默认自动提交行为。默认值为true。
auto-commit: true
# 开启连接监测泄露
leak-detection-threshold: 5000
leak-detection-threshold: 30000
# 测试连接数据库
connection-test-query: SELECT 1
#设置上传 单个文件的大小


+ 2
- 2
hz-pm-gen/src/main/java/com/hz/pm/gen/config/CodeGen.java View File

@@ -18,7 +18,7 @@ public class CodeGen {

private static final String PATH_YYD = "/Users/wendy/coding/java/hz-project-management/hz-pm-api/src/main/java";

private static final String URL = "jdbc:dm://47.98.125.47:5236/HZ_PROJECT_MANAGEMENT?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8";
private static final String URL = "jdbc:dm://47.98.125.47:5236/HZ_PROJECT_MANAGEMENT1?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8";
private static final String USER_NAME = "SYSDBA";
private static final String PASSWORD = "SYSDBA";

@@ -55,7 +55,7 @@ public class CodeGen {
}

public static void main(String[] args) {
generate("WendyYang", "meeting", PATH_YYD, "meeting_settings");
generate("WendyYang", "projectlib", PATH_YYD, "mh_project_schema_target_data");
}

}

Loading…
Cancel
Save