预告警单增加问题详细描述

This commit is contained in:
2024-05-22 10:46:24 +08:00
parent 7b7d7de923
commit 05c70cb289
7 changed files with 49 additions and 8 deletions

View File

@@ -98,7 +98,7 @@ public class BpmModelController extends BaseController {
} }
@GetMapping("/getById") @GetMapping("/getById")
@Operation(summary = "获得模型") @ApiOperation("根据id获取模型")
@OperateInfo(info = LogEnum.BUSINESS_COMMON) @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
public HttpResult<BpmModelRespVO> getById(String id) { public HttpResult<BpmModelRespVO> getById(String id) {
@@ -111,7 +111,6 @@ public class BpmModelController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, BpmModelConvert.INSTANCE.buildModel(model, bpmnBytes), methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, BpmModelConvert.INSTANCE.buildModel(model, bpmnBytes), methodDescribe);
} }
@Operation(summary = "新建模型")
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("新建模型") @ApiOperation("新建模型")
@@ -146,7 +145,7 @@ public class BpmModelController extends BaseController {
@PostMapping("/deploy") @PostMapping("/deploy")
@Operation(summary = "部署模型") @ApiOperation("部署模型")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
public HttpResult<Boolean> deployModel(String id) { public HttpResult<Boolean> deployModel(String id) {
String methodDescribe = getMethodDescribe("deployModel"); String methodDescribe = getMethodDescribe("deployModel");
@@ -164,7 +163,7 @@ public class BpmModelController extends BaseController {
// } // }
// //
@GetMapping("/delete") @GetMapping("/delete")
@Operation(summary = "删除模型") @ApiOperation("删除模型")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
public HttpResult<Boolean> deleteModel(String id) { public HttpResult<Boolean> deleteModel(String id) {
String methodDescribe = getMethodDescribe("deleteModel"); String methodDescribe = getMethodDescribe("deleteModel");

View File

@@ -69,6 +69,12 @@ public class WarningLeafletParam extends BaseEntity implements Serializable{
@ApiModelProperty(value = "设备编号") @ApiModelProperty(value = "设备编号")
private String processInstanceId; private String processInstanceId;
/**
* 问题详细描述
*/
@ApiModelProperty(value = "问题详细描述")
private String issueDetail;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)

View File

@@ -63,6 +63,11 @@ public class WarningLeaflet extends BaseEntity implements Serializable{
*/ */
private String processInstanceId; private String processInstanceId;
/**
* 问题详细描述
*/
private String issueDetail;
/** /**
* 采取措施 * 采取措施

View File

@@ -1,6 +1,7 @@
package com.njcn.supervision.pojo.vo.leaflet; package com.njcn.supervision.pojo.vo.leaflet;
import com.njcn.db.bo.BaseEntity; import com.njcn.db.bo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@@ -69,4 +70,9 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
*/ */
private String processInstanceId; private String processInstanceId;
/**
* 问题详细描述
*/
private String issueDetail;
} }

View File

@@ -22,9 +22,10 @@ public interface IWarningLeafletService extends IService<WarningLeaflet> {
* code预告警编号暂时随机by yxb * code预告警编号暂时随机by yxb
* id对应问题源id用于查询详细数据 * id对应问题源id用于查询详细数据
* problemType问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标 * problemType问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* leaflet:单子类型1预警单2告警单 * leaflet单子类型1预警单2告警单
* issueDetail问题详细描述
*/ */
void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet); void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet,String issueDetail);
Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam); Page<WarningLeafletVO> alarmPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam);

View File

@@ -39,13 +39,14 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程 * 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
*/ */
@Override @Override
public void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet) { public void createLeaflet(String name, String code, String id, Integer problemType, Integer leaflet,String issueDetail) {
WarningLeaflet warningLeaflet = new WarningLeaflet(); WarningLeaflet warningLeaflet = new WarningLeaflet();
warningLeaflet.setLeafletName(name); warningLeaflet.setLeafletName(name);
warningLeaflet.setLeafletNo(code); warningLeaflet.setLeafletNo(code);
warningLeaflet.setProblemType(problemType); warningLeaflet.setProblemType(problemType);
warningLeaflet.setProblemId(id); warningLeaflet.setProblemId(id);
warningLeaflet.setLeafletType(leaflet); warningLeaflet.setLeafletType(leaflet);
warningLeaflet.setIssueDetail(issueDetail);
warningLeaflet.setState(DataStateEnum.ENABLE.getCode()); warningLeaflet.setState(DataStateEnum.ENABLE.getCode());
warningLeaflet.setStatus(FlowStatusEnum.NO_FEEDBACK.getCode()); warningLeaflet.setStatus(FlowStatusEnum.NO_FEEDBACK.getCode());
this.baseMapper.insert(warningLeaflet); this.baseMapper.insert(warningLeaflet);

View File

@@ -1,8 +1,10 @@
package com.njcn.supervision.service.survey.impl; package com.njcn.supervision.service.survey.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.text.StrPool; import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -341,13 +343,15 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
* 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标 * 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* 4、对应问题源id用于查询详细数据 * 4、对应问题源id用于查询详细数据
* 5、单子类型1预警单2告警单 * 5、单子类型1预警单2告警单
* 6、问题详细描述
* */ * */
warningLeafletService.createLeaflet( warningLeafletService.createLeaflet(
generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()), generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
IdWorker.get32UUID(), IdWorker.get32UUID(),
id, id,
ProblemTypeEnum.SITE_TEST.getCode(), ProblemTypeEnum.SITE_TEST.getCode(),
LeafletTypeEnum.ALARM.getCode() LeafletTypeEnum.ALARM.getCode(),
assembleIssueDetail(detailPlan,generalSurveyPlan)
); );
//将当前的问题记录是否告警修改为已告警 //将当前的问题记录是否告警修改为已告警
LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
@@ -357,6 +361,25 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper); supervisionGeneralSurveyPlanDetailPOService.update(detailPOLambdaUpdateWrapper);
} }
/**
* 组装谐波普测的问题
* 格式planCreateTime发起的planName普测计划由负责人leader测试后于planComplateTime完成其中subName在本次普测计划测试中存在电能质量问题详细请查看附件
*/
private String assembleIssueDetail(SupervisionGeneralSurveyPlanDetailPO detailPlan, SupervisionGeneralSurveyPlanPO generalSurveyPlan) {
String issueDetail = ""
.concat(LocalDateTimeUtil.format(generalSurveyPlan.getPlanCreateTime(), DatePattern.CHINESE_DATE_PATTERN))
.concat("发起的")
.concat(generalSurveyPlan.getPlanName())
.concat("普测计划,由负责人")
.concat(generalSurveyPlan.getLeader())
.concat("测试后,于")
.concat(LocalDateTimeUtil.format(generalSurveyPlan.getPlanComplateTime(), DatePattern.CHINESE_DATE_PATTERN))
.concat("完成,其中")
.concat(detailPlan.getSubName())
.concat("在本次普测计划测试中存在电能质量问题,详细请查看问题附件");
return issueDetail;
}
public List<DeptSubstationVO> recursion(DeptSubstationVO result, String orgdid) { public List<DeptSubstationVO> recursion(DeptSubstationVO result, String orgdid) {
List<DeptSubstationVO> deptSubstationVOList = new ArrayList<>(); List<DeptSubstationVO> deptSubstationVOList = new ArrayList<>();