在线监测点效率修改,监测点下来框接口
This commit is contained in:
@@ -48,4 +48,8 @@ public interface CommLineClient {
|
|||||||
|
|
||||||
@GetMapping("/getLineAllDetail")
|
@GetMapping("/getLineAllDetail")
|
||||||
HttpResult<LineALLInfoDTO> getLineAllDetail(@RequestParam("id") String id);
|
HttpResult<LineALLInfoDTO> getLineAllDetail(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/getLineAllDetailList")
|
||||||
|
HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(@RequestParam("ids") List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ public class CommLineClientFallbackFactory implements FallbackFactory<CommLineCl
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(List<String> ids) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取监测点列表信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,14 @@ public class CommLineController extends BaseController {
|
|||||||
LineALLInfoDTO result = lineService.getLineAllDetail(id);
|
LineALLInfoDTO result = lineService.getLineAllDetail(id);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@GetMapping("/getLineAllDetailList")
|
||||||
|
@ApiOperation("获取多监测点id取超标监测点信息")
|
||||||
|
public HttpResult<List<LineALLInfoDTO>> getLineAllDetailList(@RequestParam("ids") List<String> ids) {
|
||||||
|
String methodDescribe = getMethodDescribe("getLineAllDetailList");
|
||||||
|
List<LineALLInfoDTO> result = lineService.getLineAllDetailList(ids);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getLineDetailBatch")
|
@PostMapping("/getLineDetailBatch")
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.DeptLineParam;
|
import com.njcn.web.pojo.param.DeptLineParam;
|
||||||
@@ -109,6 +110,16 @@ public class DeptLineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/getLineDetailByDeptId")
|
||||||
|
@ApiOperation("部门Id获取绑定监测点详情")
|
||||||
|
@ApiImplicitParam(name = "id", value = "部门id", required = true)
|
||||||
|
public HttpResult<List<LineDeviceStateVO>> getLineDetailByDeptId(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getLineDetailByDeptId");
|
||||||
|
List<LineDeviceStateVO> list = deptLineService.getLineDetailByDeptId(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/getLineByDeptRelation")
|
@PostMapping("/getLineByDeptRelation")
|
||||||
@ApiOperation("获取部门和监测点的关系(分稳态暂态)")
|
@ApiOperation("获取部门和监测点的关系(分稳态暂态)")
|
||||||
@ApiImplicitParam(name = "devDataType", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true)
|
@ApiImplicitParam(name = "devDataType", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true)
|
||||||
|
|||||||
@@ -623,10 +623,13 @@
|
|||||||
AND device.id = subv.pid
|
AND device.id = subv.pid
|
||||||
AND device1.id = device.id
|
AND device1.id = device.id
|
||||||
AND sub.id = device1.pid
|
AND sub.id = device1.pid
|
||||||
|
<if test="list!=null and list.size()!=0">
|
||||||
|
|
||||||
AND t.id in
|
AND t.id in
|
||||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getSubstationInfo" resultType="PollutionSubstationDTO">
|
<select id="getSubstationInfo" resultType="PollutionSubstationDTO">
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.device.biz.pojo.dto.SubGetBase;
|
|||||||
import com.njcn.device.biz.pojo.dto.TerminalGetBase;
|
import com.njcn.device.biz.pojo.dto.TerminalGetBase;
|
||||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.web.pojo.param.DeptLineParam;
|
import com.njcn.web.pojo.param.DeptLineParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -119,4 +120,6 @@ public interface DeptLineService extends IService<DeptLine> {
|
|||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
DeptLine getLineByLineIds(String ids);
|
DeptLine getLineByLineIds(String ids);
|
||||||
|
|
||||||
|
List<LineDeviceStateVO> getLineDetailByDeptId(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,4 +213,6 @@ public interface LineService extends IService<Line> {
|
|||||||
DeviceVO getDeviceDetailData(String id);
|
DeviceVO getDeviceDetailData(String id);
|
||||||
|
|
||||||
List<Line> getSubIndexLineDetail(String id);
|
List<Line> getSubIndexLineDetail(String id);
|
||||||
|
|
||||||
|
List<LineALLInfoDTO> getLineAllDetailList(List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ package com.njcn.device.pq.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||||
import com.njcn.device.biz.pojo.dto.SubGetBase;
|
import com.njcn.device.biz.pojo.dto.SubGetBase;
|
||||||
import com.njcn.device.biz.pojo.dto.TerminalGetBase;
|
import com.njcn.device.biz.pojo.dto.TerminalGetBase;
|
||||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||||
import com.njcn.device.pq.mapper.DeptLineMapper;
|
import com.njcn.device.pq.mapper.DeptLineMapper;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
import com.njcn.device.pq.mapper.LineMapper;
|
||||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||||
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.device.pq.service.DeptLineService;
|
import com.njcn.device.pq.service.DeptLineService;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
@@ -36,6 +38,7 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
|||||||
private final DeptLineMapper deptLineMapper;
|
private final DeptLineMapper deptLineMapper;
|
||||||
|
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
private final LineMapper lineMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -138,5 +141,12 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LineDeviceStateVO> getLineDetailByDeptId(String id) {
|
||||||
|
List<String> lineByDeptId = this.getLineByDeptId(id);
|
||||||
|
List<LineDeviceStateVO> lineDeviceStateVO = lineMapper.getLineDeviceStateVO(lineByDeptId);
|
||||||
|
return lineDeviceStateVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -655,6 +655,12 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
|||||||
.list();
|
.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LineALLInfoDTO> getLineAllDetailList(List<String> ids) {
|
||||||
|
List<LineALLInfoDTO> collect = ids.stream().map(this::getLineAllDetail).collect(Collectors.toList());
|
||||||
|
return collect;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.harmonic.pojo.param;
|
package com.njcn.harmonic.pojo.param;
|
||||||
|
|
||||||
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ import java.util.List;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RMpPartHarmonicDetailQueryParam {
|
public class RMpPartHarmonicDetailQueryParam extends BaseParam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计起始日期
|
* 统计起始日期
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.njcn.supervision.pojo.param.device;
|
package com.njcn.supervision.pojo.param.device;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.njcn.db.bo.BaseEntity;
|
|
||||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
@@ -68,11 +64,11 @@ public class SupervisionTempLineRunTestParam {
|
|||||||
private List<String> lineIds;
|
private List<String> lineIds;
|
||||||
|
|
||||||
@NotBlank(message = "开始时间不可为空")
|
@NotBlank(message = "开始时间不可为空")
|
||||||
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeStrValid(format = "yyyy-MM-dd")
|
||||||
private String startTime;
|
private String startTime;
|
||||||
|
|
||||||
@NotBlank(message = "结束时间不可为空")
|
@NotBlank(message = "结束时间不可为空")
|
||||||
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeStrValid(format = "yyyy-MM-dd")
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ public class SupervisionPlanPO extends BaseEntity {
|
|||||||
private String effectUserName;
|
private String effectUserName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0.未上送 1.上送 2.取消上送 3.待重新上送
|
* 0.未上送 1.上送是否发起告警单
|
||||||
*/
|
*/
|
||||||
@TableField(value = "is_upload_head")
|
@TableField(value = "is_upload_head")
|
||||||
private Integer isUploadHead;
|
private Integer isUploadHead;
|
||||||
|
|||||||
@@ -83,5 +83,13 @@ public class SupervisionPlanController extends BaseController {
|
|||||||
supervisionPlanPOService.updateStatus(businessKey,status);
|
supervisionPlanPOService.updateStatus(businessKey,status);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
}
|
}
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@GetMapping("/initiateWarningLeaflet")
|
||||||
|
@ApiOperation("针对技术监督问题发起告警单")
|
||||||
|
public HttpResult<Boolean> initiateWarningLeaflet(@RequestParam("id") String id){
|
||||||
|
String methodDescribe = getMethodDescribe("initiateWarningLeaflet");
|
||||||
|
supervisionPlanPOService.initiateWarningLeaflet(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Boolean.TRUE, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,6 @@ public interface SupervisionPlanPOService extends IService<SupervisionPlanPO>{
|
|||||||
SupervisionPlanVO getDetailPlan(String id);
|
SupervisionPlanVO getDetailPlan(String id);
|
||||||
|
|
||||||
void updateStatus(String businessKey, Integer status);
|
void updateStatus(String businessKey, Integer status);
|
||||||
|
|
||||||
|
void initiateWarningLeaflet(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
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;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||||
@@ -17,11 +18,14 @@ import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
|||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.utils.PubUtils;
|
import com.njcn.common.utils.PubUtils;
|
||||||
|
import com.njcn.supervision.enums.LeafletTypeEnum;
|
||||||
|
import com.njcn.supervision.enums.ProblemTypeEnum;
|
||||||
import com.njcn.supervision.mapper.plan.SupervisionPlanPOMapper;
|
import com.njcn.supervision.mapper.plan.SupervisionPlanPOMapper;
|
||||||
import com.njcn.supervision.pojo.param.plan.SupervisionPlanParam;
|
import com.njcn.supervision.pojo.param.plan.SupervisionPlanParam;
|
||||||
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
import com.njcn.supervision.pojo.po.plan.SupervisionPlanPO;
|
||||||
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
import com.njcn.supervision.pojo.po.plan.SupervisionProblemPO;
|
||||||
import com.njcn.supervision.pojo.vo.plan.SupervisionPlanVO;
|
import com.njcn.supervision.pojo.vo.plan.SupervisionPlanVO;
|
||||||
|
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||||
import com.njcn.supervision.service.plan.SupervisionPlanPOService;
|
import com.njcn.supervision.service.plan.SupervisionPlanPOService;
|
||||||
import com.njcn.supervision.service.plan.SupervisionProblemPOService;
|
import com.njcn.supervision.service.plan.SupervisionProblemPOService;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
@@ -58,6 +62,8 @@ public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOM
|
|||||||
private final BpmProcessFeignClient bpmProcessFeignClient;
|
private final BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
public static final String PROCESS_KEY = "sup_plan_add";
|
public static final String PROCESS_KEY = "sup_plan_add";
|
||||||
private final SupervisionProblemPOService supervisionProblemPOService;
|
private final SupervisionProblemPOService supervisionProblemPOService;
|
||||||
|
private final IWarningLeafletService warningLeafletService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String addPlan(SupervisionPlanParam supvPlanParam) {
|
public String addPlan(SupervisionPlanParam supvPlanParam) {
|
||||||
@@ -102,6 +108,7 @@ public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
supvPlan.setState(DataStateEnum.ENABLE.getCode());
|
supvPlan.setState(DataStateEnum.ENABLE.getCode());
|
||||||
|
supvPlan.setIsUploadHead(0);
|
||||||
supvPlan.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
supvPlan.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||||
this.save(supvPlan);
|
this.save(supvPlan);
|
||||||
return supvPlan.getPlanId();
|
return supvPlan.getPlanId();
|
||||||
@@ -288,6 +295,54 @@ public class SupervisionPlanPOServiceImpl extends ServiceImpl<SupervisionPlanPOM
|
|||||||
this.lambdaUpdate().set(SupervisionPlanPO::getStatus,status).eq(SupervisionPlanPO::getPlanId,businessKey).update();
|
this.lambdaUpdate().set(SupervisionPlanPO::getStatus,status).eq(SupervisionPlanPO::getPlanId,businessKey).update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void initiateWarningLeaflet(String id) {
|
||||||
|
//获取数据源用于组装数据
|
||||||
|
List<SupervisionProblemPO> list = supervisionProblemPOService.lambdaQuery().eq(SupervisionProblemPO::getPlanId, id).list();
|
||||||
|
|
||||||
|
SupervisionPlanPO byId = this.getById(id);
|
||||||
|
/*
|
||||||
|
* 1、预告警单名称,此处暂时用计算监督计划名称
|
||||||
|
* 2、预告警编号暂时随机by yxb
|
||||||
|
* 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
||||||
|
* 4、对应问题源id,用于查询详细数据
|
||||||
|
* 5、单子类型:1:预警单;2:告警单
|
||||||
|
* 6、问题详细描述
|
||||||
|
* */
|
||||||
|
warningLeafletService.createLeaflet(
|
||||||
|
byId.getWorkPlanName(),
|
||||||
|
IdWorker.get32UUID(),
|
||||||
|
id,
|
||||||
|
ProblemTypeEnum.PLAN.getCode(),
|
||||||
|
LeafletTypeEnum.ALARM.getCode(),
|
||||||
|
assembleIssueDetail(list,byId)
|
||||||
|
);
|
||||||
|
//将当前的问题记录是否告警修改为已告警
|
||||||
|
this.lambdaUpdate().eq(SupervisionPlanPO::getPlanId,id).set(SupervisionPlanPO::getIsUploadHead,1).update();
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 组装谐波普测的问题
|
||||||
|
* 格式:planCreateTime发起的planName普测计划,由负责人leader测试后,于planComplateTime完成,其中subName在本次普测计划测试中存在电能质量问题,详细请查看附件
|
||||||
|
*/
|
||||||
|
private String assembleIssueDetail(List<SupervisionProblemPO> supervisionProblemPOList, SupervisionPlanPO supervisionPlanPO) {
|
||||||
|
String join = String.join(",", supervisionProblemPOList.stream().map(SupervisionProblemPO::getRemark).collect(Collectors.toList()));
|
||||||
|
String issueDetail = "于"
|
||||||
|
.concat(LocalDateTimeUtil.format(supervisionPlanPO.getCreateTime(), DatePattern.CHINESE_DATE_PATTERN))
|
||||||
|
.concat("发起的")
|
||||||
|
.concat(supervisionPlanPO.getWorkPlanName())
|
||||||
|
.concat("技术监督计划,由负责人")
|
||||||
|
.concat(supervisionPlanPO.getEffectUserName())
|
||||||
|
.concat("实施,于")
|
||||||
|
.concat(LocalDateTimeUtil.format(supervisionPlanPO.getEffectEndTime(), DatePattern.CHINESE_DATE_PATTERN))
|
||||||
|
.concat("完成,其中存在问题")
|
||||||
|
.concat(join)
|
||||||
|
.concat("在本次技术监督计划测试中存在电能质量问题,详细请查看问题附件");
|
||||||
|
return issueDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void checkParam(SupervisionPlanParam supvPlanParam, Boolean updateFlag) {
|
private void checkParam(SupervisionPlanParam supvPlanParam, Boolean updateFlag) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user