草稿功能各个页面开发引起的查询bug,预告警单新增整改意见字段
This commit is contained in:
@@ -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;
|
||||
/**
|
||||
* 问题详细描述
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
* 采取措施
|
||||
|
||||
@@ -68,15 +68,18 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
|
||||
SupervisionDevMainReportPO supervisionDevMainReportPO = new SupervisionDevMainReportPO();
|
||||
BeanUtils.copyProperties(supervisionDevMainReportParam, supervisionDevMainReportPO);
|
||||
if(StringUtils.isEmpty(supervisionDevMainReportParam.getId())){
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, false);
|
||||
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"2")){
|
||||
if(StringUtils.isEmpty(supervisionDevMainReportParam.getId())){
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, false);
|
||||
|
||||
}else {
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, true);
|
||||
}else {
|
||||
//设备校验ip
|
||||
checkIp(supervisionDevMainReportParam, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//设置状态
|
||||
if(Objects.equals(supervisionDevMainReportParam.getSaveOrCheckflag(),"1")){
|
||||
supervisionDevMainReportPO.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
@@ -72,15 +72,16 @@ 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);
|
||||
|
||||
if(StringUtils.isEmpty(supervisionTempLineReportParam.getId())){
|
||||
//判断监测点是否重复
|
||||
checkLineId(supervisionTempLineReportParam, false);
|
||||
|
||||
}else {
|
||||
//判断监测点是否重复
|
||||
checkLineId(supervisionTempLineReportParam, true);
|
||||
}else {
|
||||
//判断监测点是否重复
|
||||
checkLineId(supervisionTempLineReportParam, true);
|
||||
|
||||
}
|
||||
}
|
||||
//设置状态
|
||||
if(Objects.equals(supervisionTempLineReportParam.getSaveOrCheckflag(),"1")){
|
||||
|
||||
@@ -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,16 +143,19 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
warningLeaflet.setTakeStep(warningLeafletUpdateParam.getTakeStep());
|
||||
warningLeaflet.setReportPath(warningLeafletUpdateParam.getReportPath());
|
||||
warningLeaflet.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.WARN_LEAFLET.getKey());
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(warningLeaflet.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(warningLeafletUpdateParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
String processInstanceId = bpmProcessFeignClient.createProcessInstance(RequestUtil.getUserIndex(), bpmProcessInstanceCreateReqDTO).getData();
|
||||
// 将工作流的编号,更新到流程单中
|
||||
warningLeaflet.setProcessInstanceId(processInstanceId);
|
||||
if(Objects.equals(warningLeafletUpdateParam.getSaveOrCheckflag(),"2")) {
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.WARN_LEAFLET.getKey());
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(warningLeaflet.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(warningLeafletUpdateParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
String processInstanceId = bpmProcessFeignClient.createProcessInstance(RequestUtil.getUserIndex(), bpmProcessInstanceCreateReqDTO).getData();
|
||||
// 将工作流的编号,更新到流程单中
|
||||
warningLeaflet.setProcessInstanceId(processInstanceId);
|
||||
}
|
||||
|
||||
this.baseMapper.updateById(warningLeaflet);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = "";
|
||||
for (String subId : subIds) {
|
||||
String name = lineFeignClient.getSubstationInfo(subId).getData().getName();
|
||||
subName = subName.concat(StrPool.COMMA).concat(name);
|
||||
|
||||
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);
|
||||
}
|
||||
subName = subName.substring(1);
|
||||
|
||||
record.setSubstation(subName);
|
||||
} else {
|
||||
record.setSubstationName(record.getSubstation());
|
||||
@@ -210,17 +217,20 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
//计划审核成功后,需要将计划拆成一个个待测试的
|
||||
if (surveyPlan.getCustomSubstationFlag() == 0) {
|
||||
String substation = surveyPlan.getSubstation();
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
for (String subId : subIds) {
|
||||
SurveyTest surveyTest = new SurveyTest();
|
||||
surveyTest.setPlanId(surveyPlan.getId());
|
||||
surveyTest.setDeptId(surveyPlan.getDeptId());
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setSubstation(subId);
|
||||
surveyTest.setCustomSubstationFlag(0);
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
//保存草稿时未选择电站判断
|
||||
if(StringUtils.isNotEmpty(substation)){
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
for (String subId : subIds) {
|
||||
SurveyTest surveyTest = new SurveyTest();
|
||||
surveyTest.setPlanId(surveyPlan.getId());
|
||||
surveyTest.setDeptId(surveyPlan.getDeptId());
|
||||
surveyTest.setInitiateWarningFlag(0);
|
||||
surveyTest.setSubstation(subId);
|
||||
surveyTest.setCustomSubstationFlag(0);
|
||||
surveyTest.setStatus(FlowStatusEnum.NEW.getCode());
|
||||
surveyTest.setCreateBy(surveyPlan.getCreateBy());
|
||||
surveyTestService.save(surveyTest);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SurveyTest surveyTest = new SurveyTest();
|
||||
|
||||
@@ -130,7 +130,9 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
if (record.getCustomSubstationFlag() == 0) {
|
||||
//关联台账内的变电站名称
|
||||
String substation = record.getSubstation();
|
||||
record.setSubstationName(lineFeignClient.getSubstationInfo(substation).getData().getName());
|
||||
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();
|
||||
record.setSubstationName(lineFeignClient.getSubstationInfo(substation).getData().getName());
|
||||
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();
|
||||
PollutionSubstationDTO data = lineFeignClient.getSubstationInfo(substation).getData();
|
||||
surveyTestVO.setSubstationName(data.getName());
|
||||
surveyTestVO.setVoltageLevel(data.getVoltageLevel());
|
||||
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("/");
|
||||
|
||||
@@ -101,12 +101,15 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
UserReportPO userReportPO = new UserReportPO();
|
||||
BeanUtils.copyProperties(userReportParam, userReportPO);
|
||||
userReportPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
if(StringUtils.isEmpty(userReportParam.getId())){
|
||||
checkProjectName(userReportParam, false);
|
||||
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"2")){
|
||||
|
||||
}else {
|
||||
checkProjectName(userReportParam, true);
|
||||
if(StringUtils.isEmpty(userReportParam.getId())){
|
||||
checkProjectName(userReportParam, false);
|
||||
|
||||
}else {
|
||||
checkProjectName(userReportParam, true);
|
||||
|
||||
}
|
||||
}
|
||||
//判断工程名称是否有重复的
|
||||
if(Objects.equals(userReportParam.getSaveOrCheckflag(),"1")){
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user