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

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

@@ -22,9 +22,10 @@ public interface IWarningLeafletService extends IService<WarningLeaflet> {
* code预告警编号暂时随机by yxb
* id对应问题源id用于查询详细数据
* 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);

View File

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

View File

@@ -1,8 +1,10 @@
package com.njcn.supervision.service.survey.impl;
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.LocalDateTimeUtil;
import cn.hutool.core.text.StrPool;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -341,13 +343,15 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
* 3、问题类型1技术监督管理2在线监测超标问题3用户投诉4现场测试超标此处是现场测试超标
* 4、对应问题源id用于查询详细数据
* 5、单子类型1预警单2告警单
* 6、问题详细描述
* */
warningLeafletService.createLeaflet(
generalSurveyPlan.getPlanName().concat(StrPool.UNDERLINE).concat(detailPlan.getSubName()),
IdWorker.get32UUID(),
id,
ProblemTypeEnum.SITE_TEST.getCode(),
LeafletTypeEnum.ALARM.getCode()
LeafletTypeEnum.ALARM.getCode(),
assembleIssueDetail(detailPlan,generalSurveyPlan)
);
//将当前的问题记录是否告警修改为已告警
LambdaUpdateWrapper<SupervisionGeneralSurveyPlanDetailPO> detailPOLambdaUpdateWrapper = new LambdaUpdateWrapper<>();
@@ -357,6 +361,25 @@ public class SupervisionGeneralSurveyPlanPOServiceImpl extends ServiceImpl<Super
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) {
List<DeptSubstationVO> deptSubstationVOList = new ArrayList<>();