草稿功能各个页面开发引起的查询bug,预告警单新增整改意见字段

This commit is contained in:
hzj
2024-06-19 20:29:11 +08:00
parent 1f3ea231ad
commit b91970d5be
8 changed files with 92 additions and 64 deletions

View File

@@ -1,7 +1,5 @@
package com.njcn.supervision.pojo.param.leaflet;
import com.njcn.db.bo.BaseEntity;
import com.njcn.supervision.pojo.param.device.QuitRunningDeviceParam;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -28,7 +26,8 @@ import java.util.Map;
public class WarningLeafletParam implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "保存1,提交审批2")
private String saveOrCheckflag;
/**
* 预告警单名称
*/
@@ -71,6 +70,11 @@ public class WarningLeafletParam implements Serializable{
@ApiModelProperty(value = "设备编号")
private String processInstanceId;
/**
* 整改意见
*/
@ApiModelProperty(value = "整改意见")
private String reformAdvice;
/**
* 问题详细描述
*/

View File

@@ -2,12 +2,9 @@ package com.njcn.supervision.pojo.po.leaflet;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.db.bo.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
/**
* <p>
@@ -74,7 +71,10 @@ public class WarningLeaflet extends BaseEntity implements Serializable{
* 问题详细描述
*/
private String issueDetail;
/**
* 整改意见
*/
private String reformAdvice;
/**
* 采取措施

View File

@@ -68,6 +68,7 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
SupervisionDevMainReportPO supervisionDevMainReportPO = new SupervisionDevMainReportPO();
BeanUtils.copyProperties(supervisionDevMainReportParam, supervisionDevMainReportPO);
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"2")){
if(StringUtils.isEmpty(supervisionDevMainReportParam.getId())){
//设备校验ip
checkIp(supervisionDevMainReportParam, false);
@@ -77,6 +78,8 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
checkIp(supervisionDevMainReportParam, true);
}
}
//设置状态
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"1")){
supervisionDevMainReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());

View File

@@ -72,7 +72,7 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
public String addTempLineReport(SupervisionTempLineReportParam supervisionTempLineReportParam) {
SupervisionTempLineReport supervisionTempLineReport = new SupervisionTempLineReport();
BeanUtils.copyProperties(supervisionTempLineReportParam,supervisionTempLineReport);
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"2")){
if(StringUtils.isEmpty(supervisionTempLineReportParam.getId())){
//判断监测点是否重复
checkLineId(supervisionTempLineReportParam, false);
@@ -82,6 +82,7 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
checkLineId(supervisionTempLineReportParam, true);
}
}
//设置状态
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"1")){
supervisionTempLineReport.setStatus(BpmTaskStatusEnum.WAIT.getStatus());

View File

@@ -6,10 +6,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.bpm.api.BpmProcessFeignClient;
@@ -19,7 +17,6 @@ import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.harmonic.pojo.dto.RMpPartHarmonicDetailDTO;
import com.njcn.supervision.enums.FlowStatusEnum;
import com.njcn.supervision.enums.LeafletTypeEnum;
@@ -27,11 +24,8 @@ import com.njcn.supervision.enums.ProblemTypeEnum;
import com.njcn.supervision.enums.SupervisionKeyEnum;
import com.njcn.supervision.mapper.leaflet.WarningLeafletMapper;
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
import com.njcn.supervision.pojo.po.survey.SupervisionGeneralSurveyPlanPO;
import com.njcn.supervision.pojo.po.survey.SurveyTest;
import com.njcn.supervision.pojo.vo.device.CheckDeviceVo;
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
import com.njcn.supervision.service.survey.ISurveyTestService;
@@ -149,6 +143,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
warningLeaflet.setTakeStep(warningLeafletUpdateParam.getTakeStep());
warningLeaflet.setReportPath(warningLeafletUpdateParam.getReportPath());
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
if(Objects.equals(warningLeafletUpdateParam.getSaveOrCheckflag(),"2")) {
// 发起 BPM 流程
Map<String, Object> processInstanceVariables = new HashMap<>();
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
@@ -159,6 +154,8 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
String processInstanceId = bpmProcessFeignClient.createProcessInstance(RequestUtil.getUserIndex(), bpmProcessInstanceCreateReqDTO).getData();
// 将工作流的编号,更新到流程单中
warningLeaflet.setProcessInstanceId(processInstanceId);
}
this.baseMapper.updateById(warningLeaflet);
}

View File

@@ -106,14 +106,21 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
//回显变电站名称
if (record.getCustomSubstationFlag() == 0) {
//关联台账内的变电站名称
String substation = record.getSubstation();
String[] subIds = substation.split(StrPool.COMMA);
String subName = "";
String substation = record.getSubstation();
//保存草稿时未选择电站判断
if(StringUtils.isNotEmpty(substation)){
String[] subIds = substation.split(StrPool.COMMA);
for (String subId : subIds) {
String name = lineFeignClient.getSubstationInfo(subId).getData().getName();
subName = subName.concat(StrPool.COMMA).concat(name);
}
subName = subName.substring(1);
}
record.setSubstation(subName);
} else {
record.setSubstationName(record.getSubstation());
@@ -210,6 +217,8 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
//计划审核成功后,需要将计划拆成一个个待测试的
if (surveyPlan.getCustomSubstationFlag() == 0) {
String substation = surveyPlan.getSubstation();
//保存草稿时未选择电站判断
if(StringUtils.isNotEmpty(substation)){
String[] subIds = substation.split(StrPool.COMMA);
for (String subId : subIds) {
SurveyTest surveyTest = new SurveyTest();
@@ -222,6 +231,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
surveyTest.setCreateBy(surveyPlan.getCreateBy());
surveyTestService.save(surveyTest);
}
}
} else {
SurveyTest surveyTest = new SurveyTest();
surveyTest.setPlanId(surveyPlan.getId());

View File

@@ -130,7 +130,9 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
if (record.getCustomSubstationFlag() == 0) {
//关联台账内的变电站名称
String substation = record.getSubstation();
if(StringUtils.isNotEmpty(substation)){
record.setSubstationName(lineFeignClient.getSubstationInfo(substation).getData().getName());
}
} else {
record.setSubstationName(record.getSubstation());
}
@@ -182,7 +184,9 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
if (record.getCustomSubstationFlag() == 0) {
//关联台账内的变电站名称
String substation = record.getSubstation();
if(StringUtils.isNotEmpty(substation)){
record.setSubstationName(lineFeignClient.getSubstationInfo(substation).getData().getName());
}
} else {
record.setSubstationName(record.getSubstation());
}
@@ -322,9 +326,12 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
if (surveyTestVO.getCustomSubstationFlag() == 0) {
//关联台账内的变电站名称
String substation = surveyTestVO.getSubstation();
if(StringUtils.isNotEmpty(substation)){
PollutionSubstationDTO data = lineFeignClient.getSubstationInfo(substation).getData();
surveyTestVO.setSubstationName(data.getName());
surveyTestVO.setVoltageLevel(data.getVoltageLevel());
}
} else {
surveyTestVO.setSubstationName(surveyTestVO.getSubstation());
surveyTestVO.setVoltageLevel("/");

View File

@@ -101,6 +101,8 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
UserReportPO userReportPO = new UserReportPO();
BeanUtils.copyProperties(userReportParam, userReportPO);
userReportPO.setState(DataStateEnum.ENABLE.getCode());
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"2")){
if(StringUtils.isEmpty(userReportParam.getId())){
checkProjectName(userReportParam, false);
@@ -108,6 +110,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
checkProjectName(userReportParam, true);
}
}
//判断工程名称是否有重复的
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"1")){
userReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
@@ -982,6 +985,9 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
if (isExcludeSelf) {
if (userReportParam instanceof UserReportParam.UserReportUpdate) {
userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, ((UserReportParam.UserReportUpdate) userReportParam).getId());
}else {
userReportPOLambdaQueryWrapper.ne(UserReportPO::getId, ( userReportParam).getId());
}
}
List<UserReportPO> userReportPOList = this.baseMapper.selectList(userReportPOLambdaQueryWrapper);