1.技术监督试运行,不通过整体预告警单流程
This commit is contained in:
@@ -2,6 +2,7 @@ package com.njcn.supervision.controller;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.bpm.service.IBpmReasonService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -34,10 +35,9 @@ public class BusinessCommonController extends BaseController {
|
||||
@GetMapping("/updateProcessStatus")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("更新流程状态")
|
||||
public HttpResult<Object> updateProcessStatus(String processKey,String businessId, Integer status) {
|
||||
public HttpResult<Object> updateProcessStatus(String processKey, String businessId, String reason, Integer status) {
|
||||
String methodDescribe = getMethodDescribe("updateProcessStatus");
|
||||
IBpmService iBpmService = getBpmServiceByBusinessKey(processKey);
|
||||
iBpmService.updateProcessStatus(businessId, status);
|
||||
getBpmServiceByBusinessStatusKey(processKey, businessId, reason, status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -45,15 +45,64 @@ public class BusinessCommonController extends BaseController {
|
||||
@GetMapping("/getInstanceInfo")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("获取业务数据")
|
||||
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey,String businessId) {
|
||||
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey, String businessId) {
|
||||
String methodDescribe = getMethodDescribe("getInstanceInfo");
|
||||
IBpmService iBpmService = getBpmServiceByBusinessKey(processKey);
|
||||
BpmInstanceInfo instanceInfo = iBpmService.getInstanceInfo(businessId);
|
||||
BpmInstanceInfo instanceInfo = getBpmServiceByBusinessKey(processKey,businessId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, instanceInfo, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据业务流key获取实现类对象
|
||||
*
|
||||
* @param processKey 业务流key
|
||||
*/
|
||||
private void getBpmServiceByBusinessStatusKey(String processKey, String businessId, String reason, Integer status) {
|
||||
String fullServicePath = SupervisionKeyEnum.getFullServicePathByKey(processKey);
|
||||
try {
|
||||
if ("SupervisionTempLineRunTestServiceImpl".equals(fullServicePath.substring(fullServicePath.lastIndexOf(".")+1))) {
|
||||
IBpmReasonService iBpmService = (IBpmReasonService) SpringUtil.getBean(Class.forName(fullServicePath));
|
||||
iBpmService.updateProcessStatus(businessId, reason, status);
|
||||
} else {
|
||||
IBpmService executor = (IBpmService) SpringUtil.getBean(Class.forName(fullServicePath));
|
||||
executor.updateProcessStatus(businessId, status);
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new BusinessException(SupervisionResponseEnum.SUPERVISION_SERVICE_NOT_FOUND);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据业务流key获取实现类对象
|
||||
*
|
||||
* @param processKey 业务流key
|
||||
*/
|
||||
private BpmInstanceInfo getBpmServiceByBusinessKey(String processKey, String businessId) {
|
||||
String fullServicePath = SupervisionKeyEnum.getFullServicePathByKey(processKey);
|
||||
BpmInstanceInfo instanceInfo ;
|
||||
try {
|
||||
if ("SupervisionTempLineRunTestServiceImpl".equals(fullServicePath.substring(fullServicePath.lastIndexOf(".")+1))) {
|
||||
IBpmReasonService iBpmService = (IBpmReasonService) SpringUtil.getBean(Class.forName(fullServicePath));
|
||||
instanceInfo = iBpmService.getInstanceInfo(businessId);
|
||||
} else {
|
||||
IBpmService executor = (IBpmService) SpringUtil.getBean(Class.forName(fullServicePath));
|
||||
instanceInfo = executor.getInstanceInfo(businessId);
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new BusinessException(SupervisionResponseEnum.SUPERVISION_SERVICE_NOT_FOUND);
|
||||
}
|
||||
return instanceInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据业务流key获取实现类对象
|
||||
*
|
||||
* @param processKey 业务流key
|
||||
*/
|
||||
private IBpmService getBpmServiceByBusinessKey(String processKey) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SupervisionTempLineRunTestController extends BaseController {
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("新增监测点试运行")
|
||||
@ApiOperation("重新发送监测点试运行")
|
||||
@ApiImplicitParam(name = "supervisionTempLineRunTestParam", value = "实体参数", required = true)
|
||||
public HttpResult<Object> updateRunTest(@RequestBody @Validated SupervisionTempLineRunTestParam.SupervisionTempLineRunTestUpdateParam supervisionTempLineRunTestParam){
|
||||
String methodDescribe = getMethodDescribe("updateRunTest");
|
||||
@@ -79,7 +79,7 @@ public class SupervisionTempLineRunTestController extends BaseController {
|
||||
@ApiOperation("修改业务审核状态")
|
||||
public HttpResult<Object> updateStatus(@RequestParam("businessKey") String businessKey, @RequestParam("status")Integer status){
|
||||
String methodDescribe = getMethodDescribe("updateLineRunTestStatus");
|
||||
iSupervisionTempLineRunTestService.updateProcessStatus(businessKey,status);
|
||||
iSupervisionTempLineRunTestService.updateProcessStatus(businessKey,null,status);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,5 @@ public class SupervisionTempLineRunTestController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, id, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.njcn.supervision.controller.problem;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningAddParam;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||
import com.njcn.supervision.service.leaflet.ILineRunTestProblemService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2024/7/3 9:02
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/lineRunTestProblem")
|
||||
@Api(tags = "试运行评估问题")
|
||||
@AllArgsConstructor
|
||||
public class LineRunTestProblemController extends BaseController {
|
||||
|
||||
private final ILineRunTestProblemService lineRunTestProblemService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/pageProblem")
|
||||
@ApiOperation("查询问题列表")
|
||||
@ApiImplicitParam(name = "supervisionTempLineDebugQuery", value = "参数", required = true)
|
||||
public HttpResult<Page<SupervisionTempLineDebugVO>> pageProblem(@RequestBody @Validated SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||
String methodDescribe = getMethodDescribe("pageProblem");
|
||||
Page<SupervisionTempLineDebugVO> out = lineRunTestProblemService.pageProblem(supervisionTempLineDebugQuery);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/initiateWarningLeaflet")
|
||||
@ApiOperation("针对试运行发起告警单")
|
||||
public HttpResult<Boolean> initiateWarningLeaflet(@RequestBody WarningAddParam.Extend warningAddParam){
|
||||
String methodDescribe = getMethodDescribe("initiateWarningLeaflet");
|
||||
lineRunTestProblemService.initiateWarningLeaflet(warningAddParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Boolean.TRUE, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userReportNormal")
|
||||
@ApiOperation("干扰源常态化管理")
|
||||
@RequiredArgsConstructor
|
||||
public class UserReportNormalController extends BaseController {
|
||||
|
||||
|
||||
@@ -17,7 +17,19 @@ import org.apache.ibatis.annotations.Param;
|
||||
*/
|
||||
public interface SupervisionTempLineDebugPOMapper extends BaseMapper<SupervisionTempLineDebugPO> {
|
||||
|
||||
Page<SupervisionTempLineDebugVO> page(@Param("page") Page<Object> objectPage, @Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||
Page<SupervisionTempLineDebugVO> page(@Param("page") Page<Object> objectPage,
|
||||
@Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||
|
||||
Page<SupervisionTempLineDebugVO> pageHasDebug(@Param("page") Page<Object> objectPage,
|
||||
@Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||
|
||||
/**
|
||||
* 问题分页并查询是否有告警单
|
||||
* @param objectPage
|
||||
* @param queryWrapper
|
||||
* @return
|
||||
*/
|
||||
Page<SupervisionTempLineDebugVO> pageProblem(@Param("page") Page<Object> objectPage,
|
||||
@Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||
|
||||
Page<SupervisionTempLineDebugVO> pageHasDebug(@Param("page") Page<Object> objectPage, @Param("ew") QueryWrapper<SupervisionDevMainReportVO> queryWrapper);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,11 @@ package com.njcn.supervision.mapper.device;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||
import com.njcn.supervision.pojo.vo.device.TempLineRunTestWarningVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -17,4 +20,8 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface SupervisionTempLineRunTestMapper extends BaseMapper<SupervisionTempLineRunTestPO> {
|
||||
|
||||
SupervisionTempLineRunTestVO getRunTestInfo(@Param("id")String id);
|
||||
|
||||
|
||||
List<TempLineRunTestWarningVO> selectResults(@Param("id")String id);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.supervision.mapper.device;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
|
||||
/**
|
||||
* @author web2023
|
||||
* @description 针对表【supervision_temp_line_run_test_warning】的数据库操作Mapper
|
||||
* @createDate 2024-07-03 13:52:39
|
||||
* @Entity
|
||||
*/
|
||||
public interface TempLineRunTestWarningMapper extends BaseMapper<TempLineRunTestWarning> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,4 +72,36 @@
|
||||
where supervision_temp_line_debug.`status`=5
|
||||
and ${ew.sqlSegment}
|
||||
</select>
|
||||
<select id="pageProblem" resultType="com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO">
|
||||
SELECT
|
||||
supervision_temp_line_run_test.id id,
|
||||
supervision_temp_line_run_test_warning.id problemId,
|
||||
supervision_temp_line_report.user_name,
|
||||
supervision_temp_line_report.connected_bus,
|
||||
supervision_temp_line_report.monitoring_terminal_code,
|
||||
supervision_temp_line_report.monitoring_terminal_name,
|
||||
supervision_temp_line_report.Power_Substation_Name,
|
||||
supervision_temp_line_report.line_id lineId,
|
||||
supervision_temp_line_report.line_name lineName,
|
||||
supervision_temp_line_run_test_warning.test_run_report,
|
||||
supervision_temp_line_debug.reason reason,
|
||||
supervision_temp_line_run_test.process_instance_id process_instanceId,
|
||||
supervision_temp_line_run_test.history_instance_id,
|
||||
supervision_temp_line_run_test.`status` `Status`,
|
||||
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`,
|
||||
supervision_temp_line_run_test.test_run_time,
|
||||
supervision_temp_line_run_test.create_by,
|
||||
supervision_warning_leaflet.problem_type problemType,
|
||||
supervision_temp_line_run_test_warning.reason problemReason
|
||||
FROM
|
||||
supervision_temp_line_debug
|
||||
inner JOIN supervision_temp_line_report ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
inner join supervision_temp_line_run_test on supervision_temp_line_debug.id = supervision_temp_line_run_test.id
|
||||
inner join supervision_temp_line_run_test_warning on supervision_temp_line_run_test_warning.line_run_id = supervision_temp_line_run_test.id
|
||||
left join supervision_warning_leaflet on supervision_warning_leaflet.problem_id = supervision_temp_line_run_test_warning.id
|
||||
where supervision_temp_line_debug.`status`=5
|
||||
and ${ew.sqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -28,4 +28,20 @@
|
||||
where supervision_temp_line_run_test.id = #{id}
|
||||
|
||||
</select>
|
||||
<select id="selectResults" resultType="com.njcn.supervision.pojo.vo.device.TempLineRunTestWarningVO">
|
||||
SELECT
|
||||
supervision_temp_line_run_test_warning.id id,
|
||||
supervision_warning_leaflet.id warningId,
|
||||
supervision_warning_leaflet.status status,
|
||||
supervision_warning_leaflet.create_time `time`
|
||||
FROM
|
||||
supervision_temp_line_debug
|
||||
inner JOIN supervision_temp_line_report ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||
inner join supervision_temp_line_run_test on supervision_temp_line_debug.id = supervision_temp_line_run_test.id
|
||||
inner join supervision_temp_line_run_test_warning on supervision_temp_line_run_test_warning.line_run_id = supervision_temp_line_run_test.id
|
||||
left join supervision_warning_leaflet on supervision_warning_leaflet.problem_id = supervision_temp_line_run_test_warning.id
|
||||
where supervision_temp_line_run_test_warning.line_run_id = #{id}
|
||||
order by supervision_warning_leaflet.create_time desc
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.supervision.mapper.device.TempLineRunTestWarningMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -18,6 +18,7 @@ import com.njcn.supervision.pojo.vo.device.QuitRunningDeviceVO;
|
||||
public interface IQuitRunningDeviceService extends IBpmService<QuitRunningDevice> {
|
||||
|
||||
String addRunningDevice(QuitRunningDeviceParam quitRunningDeviceParam);
|
||||
|
||||
String updateQuitRunningDevice(QuitRunningDeviceParam.QuitRunningDeviceUpdateParam quitRunningDeviceUpdateParam);
|
||||
|
||||
Page<QuitRunningDeviceVO> getQuitRunningDevice(QuitRunningDeviceParam.QuitRunningDeviceQueryParam quitRunningDeviceQueryParam);
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.njcn.supervision.service.device;
|
||||
|
||||
|
||||
import com.njcn.bpm.pojo.param.instance.BpmProcessInstanceCancelParam;
|
||||
import com.njcn.bpm.service.IBpmService;
|
||||
import com.njcn.bpm.service.IBpmReasonService;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineRunTestParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||
@@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
* @author hongawen
|
||||
* @since 2024-05-21
|
||||
*/
|
||||
public interface ISupervisionTempLineRunTestService extends IBpmService<SupervisionTempLineRunTestPO> {
|
||||
public interface ISupervisionTempLineRunTestService extends IBpmReasonService<SupervisionTempLineRunTestPO> {
|
||||
|
||||
Boolean addRunTest(SupervisionTempLineRunTestParam supervisionTempLineRunTestParam);
|
||||
|
||||
@@ -29,6 +29,4 @@ public interface ISupervisionTempLineRunTestService extends IBpmService<Supervis
|
||||
|
||||
String cancel(BpmProcessInstanceCancelParam cancelReqVO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.njcn.supervision.service.device;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
|
||||
/**
|
||||
* @author web2023
|
||||
* @description 针对表【supervision_temp_line_run_test_warning】的数据库操作Service
|
||||
* @createDate 2024-07-03 13:52:39
|
||||
*/
|
||||
public interface TempLineRunTestWarningService extends IService<TempLineRunTestWarning> {
|
||||
|
||||
}
|
||||
@@ -5,9 +5,12 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.text.StrPool;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.bpm.api.BpmProcessFeignClient;
|
||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||
@@ -15,16 +18,19 @@ import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||
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.bpm.utils.DateUtils;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.biz.commApi.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||
import com.njcn.device.pq.api.TerminalBaseClient;
|
||||
import com.njcn.device.pq.pojo.dto.LineDataQualityDTO;
|
||||
import com.njcn.device.pq.pojo.param.LineDataQualityParam;
|
||||
import com.njcn.harmonic.api.ReportFeignClient;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.supervision.enums.FlowStatusEnum;
|
||||
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||
import com.njcn.supervision.enums.SupervisionUserStatusEnum;
|
||||
import com.njcn.supervision.mapper.device.SupervisionTempLineReportMapper;
|
||||
@@ -32,12 +38,17 @@ import com.njcn.supervision.mapper.device.SupervisionTempLineRunTestMapper;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineRunTestParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineReport;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportNormalPO;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportProjectPO;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportSensitivePO;
|
||||
import com.njcn.supervision.pojo.po.user.UserReportSubstationPO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||
import com.njcn.supervision.pojo.vo.device.TempLineRunTestWarningVO;
|
||||
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||
import com.njcn.supervision.service.device.TempLineRunTestWarningService;
|
||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||
import com.njcn.supervision.service.user.*;
|
||||
import com.njcn.supervision.utils.InstanceUtil;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
@@ -83,7 +94,8 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
private final IUserReportNormalService iUserReportNormalService;
|
||||
private final ReportFeignClient reportFeignClient;
|
||||
private final FileStorageUtil fileStorageUtil;
|
||||
|
||||
private final TerminalBaseClient terminalBaseClient;
|
||||
private final TempLineRunTestWarningService tempLineRunTestWarningService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -149,12 +161,9 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
supervisionTempLineRunTestPO.setOnlineRate(0.00);
|
||||
supervisionTempLineRunTestPO.setIntegrityRate(0.00);
|
||||
supervisionTempLineRunTestPO.setTestRunTime(supervisionTempLineRunTestParam.getStartTime() + "--" + supervisionTempLineRunTestParam.getEndTime());
|
||||
supervisionTempLineRunTestPO.setProcessInstanceId("tem暂无");
|
||||
if (Objects.nonNull(supervisionTempLineRunTestParam.getOperateType()) && supervisionTempLineRunTestParam.getOperateType() == 1) {
|
||||
|
||||
SupervisionTempLineRunTestPO testPo = this.getById(item.getId());
|
||||
String historyInstanceIds = InstanceUtil.dealHistoryId(testPo.getProcessInstanceId(), testPo.getHistoryInstanceId());
|
||||
|
||||
supervisionTempLineRunTestPO.setHistoryInstanceId(historyInstanceIds);
|
||||
}
|
||||
poList.add(supervisionTempLineRunTestPO);
|
||||
@@ -164,14 +173,35 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String updateRunTest(SupervisionTempLineRunTestParam.SupervisionTempLineRunTestUpdateParam supervisionTempLineRunTestParam) {
|
||||
SupervisionTempLineRunTestPO supervisionTempLineRunTestPO = this.baseMapper.selectById(supervisionTempLineRunTestParam.getId());
|
||||
|
||||
supervisionTempLineRunTestParam.setProcessInstanceId(supervisionTempLineRunTestPO.getProcessInstanceId());
|
||||
supervisionTempLineRunTestParam.setHistoryInstanceId(supervisionTempLineRunTestPO.getHistoryInstanceId());
|
||||
BeanUtil.copyProperties(supervisionTempLineRunTestParam, supervisionTempLineRunTestPO);
|
||||
supervisionTempLineRunTestPO.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
if (Objects.isNull(supervisionTempLineRunTestPO)) {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL, "无法查询到该信息,请检查信息是否存在!");
|
||||
}
|
||||
//1.先判断是否发送告警单,没有则不允许重新发送
|
||||
List<TempLineRunTestWarningVO> tempLineRunTestWarningVOS = this.baseMapper.selectResults(supervisionTempLineRunTestParam.getId());
|
||||
long count = tempLineRunTestWarningVOS.stream().filter(x -> StrUtil.isBlank(x.getWarningId())).count();
|
||||
if (count>0) {
|
||||
throw new BusinessException(CommonResponseEnum.FAIL, "请先发送告警单信息!");
|
||||
}
|
||||
//2.判断告警单,是否有未审核通过则不允许重新发送
|
||||
if(CollUtil.isNotEmpty(tempLineRunTestWarningVOS)){
|
||||
Integer status = tempLineRunTestWarningVOS.get(0).getStatus();
|
||||
if(!status.equals(FlowStatusEnum.APPROVE.getCode())){
|
||||
throw new BusinessException(CommonResponseEnum.FAIL, "请处理告警单信息,处理审核通过才可重新发送!");
|
||||
}
|
||||
String startTime = DateUtil.format(DateUtil.offsetDay(DateUtil.date(), 1), DatePattern.NORM_DATE_PATTERN);
|
||||
String endTime = DateUtil.format(DateUtil.offsetDay(DateUtil.date(), 3), DatePattern.NORM_DATE_PATTERN);
|
||||
supervisionTempLineRunTestPO.setTestRunTime(startTime + "--" + endTime);
|
||||
}
|
||||
supervisionTempLineRunTestPO.setStatus(1);
|
||||
supervisionTempLineRunTestPO.setTestRunReport("");
|
||||
supervisionTempLineRunTestPO.setState(DataStateEnum.ENABLE.getCode());
|
||||
supervisionTempLineRunTestPO.setTestRunState(DataStateEnum.ENABLE.getCode());
|
||||
|
||||
//处理历史流程id列表
|
||||
String historyInstanceIds = InstanceUtil.dealHistoryId(supervisionTempLineRunTestPO.getProcessInstanceId(), supervisionTempLineRunTestPO.getHistoryInstanceId());
|
||||
@@ -192,6 +222,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void isTestRunStartOrEnd(HttpServletResponse response) {
|
||||
LocalDateTime time = LocalDateTime.now();
|
||||
LambdaQueryWrapper<SupervisionTempLineRunTestPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -220,18 +251,20 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
List<LineDataQualityDTO> lineDataQualityDTOList = lineIntegrityClient.getLineDataQuality(lineDataQualityParam).getData();
|
||||
Map<String, LineDataQualityDTO> qualityDTOMap = lineDataQualityDTOList.stream().collect(Collectors.toMap(LineDataQualityDTO::getLineId, Function.identity()));
|
||||
for (SupervisionTempLineRunTestPO supervisionTempLineRunTestPO : val) {
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.LINE_RUN_TEST.getKey());
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(supervisionTempLineRunTestPO.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(new HashMap<>());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
String processInstanceId = bpmProcessFeignClient.createProcessInstance(supervisionTempLineRunTestPO.getCreateBy(), bpmProcessInstanceCreateReqDTO).getData();
|
||||
// 将工作流的编号,更新到流程单中
|
||||
SupervisionTempLineRunTestPO po = new SupervisionTempLineRunTestPO();
|
||||
if(supervisionTempLineRunTestPO.getStatus()!=1&&StrUtil.isBlank(supervisionTempLineRunTestPO.getProcessInstanceId())){
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.LINE_RUN_TEST.getKey());
|
||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(supervisionTempLineRunTestPO.getId());
|
||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(new HashMap<>());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
String processInstanceId = bpmProcessFeignClient.createProcessInstance(supervisionTempLineRunTestPO.getCreateBy(), bpmProcessInstanceCreateReqDTO).getData();
|
||||
po.setProcessInstanceId(processInstanceId);
|
||||
}
|
||||
po.setId(supervisionTempLineRunTestPO.getId());
|
||||
po.setProcessInstanceId(processInstanceId);
|
||||
po.setStatus(1);
|
||||
po.setTestRunState(2);
|
||||
if (qualityDTOMap.containsKey(supervisionTempLineRunTestPO.getId())) {
|
||||
@@ -288,11 +321,21 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateProcessStatus(String businessKey, Integer status) {
|
||||
public void updateProcessStatus(String businessKey,String reason, Integer status) {
|
||||
SupervisionTempLineRunTestPO supervisionTempLineRunTestPO = this.baseMapper.selectById(businessKey);
|
||||
//如果状态为审批通过
|
||||
if (status.equals(BpmProcessInstanceStatusEnum.APPROVE.getStatus())) {
|
||||
userReportPOService.updateUserStatus(businessKey, SupervisionUserStatusEnum.PRODUCT.getCode());
|
||||
terminalBaseClient.terminalSyncRunFly(businessKey);
|
||||
}
|
||||
//如果状态为审批不通过,则插入一条数据标识问题信息
|
||||
if (status.equals(BpmProcessInstanceStatusEnum.REJECT.getStatus())) {
|
||||
TempLineRunTestWarning warning = new TempLineRunTestWarning();
|
||||
warning.setId(IdWorker.get32UUID());
|
||||
warning.setLineRunId(businessKey);
|
||||
warning.setReason(reason);
|
||||
warning.setTestRunReport(supervisionTempLineRunTestPO.getTestRunReport());
|
||||
tempLineRunTestWarningService.save(warning);
|
||||
}
|
||||
supervisionTempLineRunTestPO.setStatus(status);
|
||||
this.updateById(supervisionTempLineRunTestPO);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.supervision.service.device.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.supervision.mapper.device.TempLineRunTestWarningMapper;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
import com.njcn.supervision.service.device.TempLineRunTestWarningService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author web2023
|
||||
* @description 针对表【supervision_temp_line_run_test_warning】的数据库操作Service实现
|
||||
* @createDate 2024-07-03 13:52:39
|
||||
*/
|
||||
@Service
|
||||
public class TempLineRunTestWarningServiceImpl extends ServiceImpl<TempLineRunTestWarningMapper, TempLineRunTestWarning> implements TempLineRunTestWarningService {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.supervision.service.leaflet;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningAddParam;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||
|
||||
/**
|
||||
* @Description: 试运行评估问题 服务类
|
||||
* @Author: wr
|
||||
* @Date: 2024/7/3 9:45
|
||||
*/
|
||||
public interface ILineRunTestProblemService{
|
||||
|
||||
/**
|
||||
* 查询审核不通过,试运行列表。来表示电能问题
|
||||
* @param supervisionTempLineDebugQuery
|
||||
* @return
|
||||
*/
|
||||
Page<SupervisionTempLineDebugVO> pageProblem(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery);
|
||||
|
||||
/**
|
||||
* 发起告警单
|
||||
* @param warningAddParam
|
||||
*/
|
||||
void initiateWarningLeaflet(WarningAddParam.Extend warningAddParam);
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.njcn.supervision.service.leaflet.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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.util.ObjectUtil;
|
||||
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.njcn.bpm.api.BpmProcessFeignClient;
|
||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||
import com.njcn.bpm.enums.BpmTaskStatusEnum;
|
||||
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.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.harmonic.pojo.dto.RMpPartHarmonicDetailDTO;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.supervision.enums.FlowStatusEnum;
|
||||
import com.njcn.supervision.enums.LeafletTypeEnum;
|
||||
import com.njcn.supervision.enums.ProblemTypeEnum;
|
||||
import com.njcn.supervision.enums.SupervisionKeyEnum;
|
||||
import com.njcn.supervision.mapper.device.SupervisionTempLineDebugPOMapper;
|
||||
import com.njcn.supervision.mapper.leaflet.WarningLeafletMapper;
|
||||
import com.njcn.supervision.pojo.param.device.SupervisionTempLineDebugParam;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningAddParam;
|
||||
import com.njcn.supervision.pojo.param.leaflet.WarningLeafletParam;
|
||||
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.problem.SupervisionUserComplaintPO;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineRunTestVO;
|
||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||
import com.njcn.supervision.service.device.SupervisionTempLineDebugPOService;
|
||||
import com.njcn.supervision.service.leaflet.ILineRunTestProblemService;
|
||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||
import com.njcn.supervision.service.survey.SupervisionGeneralSurveyPlanPOService;
|
||||
import com.njcn.supervision.utils.InstanceUtil;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.utils.RequestUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 试运行评估问题 服务实现类
|
||||
* @Author: wr
|
||||
* @Date: 2024/7/3 9:44
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class LineRunTestProblemServiceImpl implements ILineRunTestProblemService {
|
||||
|
||||
|
||||
private final UserFeignClient userFeignClient;
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final SupervisionTempLineDebugPOMapper lineDebugPOMapper;
|
||||
private final IWarningLeafletService warningLeafletService;
|
||||
private final ISupervisionTempLineRunTestService lineRunTestService;
|
||||
|
||||
@Override
|
||||
public Page<SupervisionTempLineDebugVO> pageProblem(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||
List<String> colleaguesIds = userFeignClient.getColleaguesIdByUserId(RequestUtil.getUserIndex()).getData();
|
||||
queryWrapper.in("supervision_temp_line_debug.Create_By", colleaguesIds)
|
||||
.eq("supervision_temp_line_debug.state", DataStateEnum.ENABLE.getCode());
|
||||
if (StrUtil.isNotBlank(supervisionTempLineDebugQuery.getOrgNo())) {
|
||||
/*获取直接下属子单位*/
|
||||
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineDebugQuery.getOrgNo()).getData();
|
||||
queryWrapper.in("supervision_temp_line_report.org_id", data);
|
||||
}
|
||||
//添加上时间范围
|
||||
queryWrapper.between("supervision_temp_line_run_test_warning.create_time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||
queryWrapper.orderByDesc("supervision_temp_line_run_test_warning.create_time");
|
||||
Page<SupervisionTempLineDebugVO> page = lineDebugPOMapper.pageProblem(new Page<>(PageFactory.getPageNum(supervisionTempLineDebugQuery), PageFactory.getPageSize(supervisionTempLineDebugQuery)), queryWrapper);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initiateWarningLeaflet(WarningAddParam.Extend warningAddParam) {
|
||||
SupervisionTempLineRunTestVO runTestById = lineRunTestService.getRunTestById(warningAddParam.getId());
|
||||
if(ObjectUtil.isNull(runTestById)){
|
||||
throw new BusinessException(CommonResponseEnum.FAIL, "无法查询到该信息,请检查信息是否存在!");
|
||||
}
|
||||
//组装告警单
|
||||
String complainteDetail = assembleWarningDetail(runTestById);
|
||||
/*
|
||||
* 1、预告警单名称,此处暂时用用户名+投诉
|
||||
* 2、预告警编号暂时随机by yxb
|
||||
* 3、问题类型:1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标,此处是现场测试超标
|
||||
* 4、对应问题源id,用于查询详细数据
|
||||
* 5、单子类型:1:预警单;2:告警单
|
||||
* 6、问题详细描述
|
||||
* */
|
||||
warningLeafletService.createLeaflet(
|
||||
complainteDetail,
|
||||
RequestUtil.getDeptIndex(),
|
||||
IdWorker.get32UUID(),
|
||||
warningAddParam.getProblemId(),
|
||||
ProblemTypeEnum.SITE_TEST.getCode(),
|
||||
warningAddParam.getType(),
|
||||
warningAddParam.getIssueDetail(),
|
||||
warningAddParam.getReformAdvice(),
|
||||
null
|
||||
);
|
||||
}
|
||||
private String assembleWarningDetail(SupervisionTempLineRunTestVO byId) {
|
||||
String issueDetail = byId.getPowerSubstationName()
|
||||
.concat("_")
|
||||
.concat(byId.getMonitoringTerminalName())
|
||||
.concat("_")
|
||||
.concat(byId.getConnectedBus())
|
||||
.concat("_")
|
||||
.concat(byId.getLineName())
|
||||
.concat("试运行评估问题")
|
||||
;
|
||||
return issueDetail;
|
||||
}
|
||||
}
|
||||
@@ -25,9 +25,13 @@ 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.SupervisionTempLineRunTestPO;
|
||||
import com.njcn.supervision.pojo.po.device.TempLineRunTestWarning;
|
||||
import com.njcn.supervision.pojo.po.leaflet.WarningLeaflet;
|
||||
import com.njcn.supervision.pojo.po.survey.SurveyTest;
|
||||
import com.njcn.supervision.pojo.vo.leaflet.WarningLeafletVO;
|
||||
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||
import com.njcn.supervision.service.device.TempLineRunTestWarningService;
|
||||
import com.njcn.supervision.service.leaflet.IWarningLeafletService;
|
||||
import com.njcn.supervision.service.survey.ISurveyTestService;
|
||||
import com.njcn.supervision.service.survey.SupervisionGeneralSurveyPlanPOService;
|
||||
@@ -82,6 +86,9 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
@Resource
|
||||
private FileStorageUtil fileStorageUtil;
|
||||
|
||||
@Resource
|
||||
private TempLineRunTestWarningService lineRunTestWarningService;
|
||||
|
||||
/**
|
||||
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
|
||||
*/
|
||||
@@ -223,8 +230,10 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
String problemId = warningLeaflet.getProblemId();
|
||||
//查询谐波普测,获取该普测计划上传的文件
|
||||
//查询到现场测试超标附件地址
|
||||
SurveyTest surveyTest = surveyTestService.getById(problemId);
|
||||
warningLeafletVO.setProblemPath(surveyTest.getTestReport());
|
||||
TempLineRunTestWarning byId = lineRunTestWarningService.getById(problemId);
|
||||
if(Objects.nonNull(byId)){
|
||||
warningLeafletVO.setProblemPath(byId.getTestRunReport());
|
||||
}
|
||||
}
|
||||
}
|
||||
return warningLeafletVO;
|
||||
@@ -289,9 +298,10 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
for (WarningLeafletVO record : records) {
|
||||
if (record.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode()) && StrUtil.isNotBlank(record.getProblemId())) {
|
||||
//查询到现场测试超标附件地址
|
||||
SurveyTest surveyTest = surveyTestService.getById(record.getProblemId());
|
||||
record.setProblemPath(surveyTest.getTestReport());
|
||||
record.setSupervisionReport(surveyTest.getSupervisionReport());
|
||||
TempLineRunTestWarning byId = lineRunTestWarningService.getById(record.getProblemId());
|
||||
if(Objects.nonNull(byId)){
|
||||
record.setProblemPath(byId.getTestRunReport());
|
||||
}
|
||||
}
|
||||
if (deptMap.containsKey(record.getDutyOrgId())) {
|
||||
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
||||
|
||||
@@ -493,7 +493,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
.map(LineDetail::getRunFlag)
|
||||
.filter(temp -> !Objects.equals(temp, 2))
|
||||
.collect(Collectors.toList());
|
||||
if (CollectionUtil.isEmpty(data)) {
|
||||
if (CollectionUtil.isEmpty(collect1)) {
|
||||
userReportPO.setUserStatus(userStatus);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user