冀北检测点试运行部分接口提交
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.bpm.listener.business;
|
||||||
|
|
||||||
|
import com.njcn.bpm.listener.BpmProcessInstanceStatusEvent;
|
||||||
|
import com.njcn.bpm.listener.BpmProcessInstanceStatusEventListener;
|
||||||
|
import com.njcn.supervision.api.UserReportNormalFeignClient;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class BpmUserReportNormalTreatStatusListener extends BpmProcessInstanceStatusEventListener {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private UserReportNormalFeignClient userReportNormalFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getProcessDefinitionKey() {
|
||||||
|
return "user_treat_check";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onEvent(BpmProcessInstanceStatusEvent event) {
|
||||||
|
userReportNormalFeignClient.updateUserReportNormalStatus(event.getBusinessKey(), event.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -62,4 +62,4 @@ public class SupervisionTempLineDebugParam extends BaseEntity {
|
|||||||
private List<Integer> statueList;
|
private List<Integer> statueList;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class UserReportNormalParam extends BaseParam {
|
|||||||
/**
|
/**
|
||||||
* 类型0:方案审查 1:治理工程
|
* 类型0:方案审查 1:治理工程
|
||||||
*/
|
*/
|
||||||
private Boolean type;
|
private Integer type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报告存放路径
|
* 报告存放路径
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.njcn.supervision.pojo.po.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2024-05-21
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("supervision_temp_line_run_test")
|
||||||
|
public class SupervisionTempLineRunTest extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程实例的编号
|
||||||
|
*/
|
||||||
|
private String processInstanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在线率
|
||||||
|
*/
|
||||||
|
private Float onlineRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据完整性
|
||||||
|
*/
|
||||||
|
private Float integrityRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据符合性
|
||||||
|
*/
|
||||||
|
private Float suitRate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1:审批中;2:审批通过;3:审批不通过;4:已取消
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0-删除 1-正常
|
||||||
|
*/
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:未试运行 1:试运行中 2.试运行成功 3.试运行异常
|
||||||
|
*/
|
||||||
|
private Integer testRunState;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,8 +16,17 @@ public class SupervisionTempLineDebugVO extends BaseEntity {
|
|||||||
private String id;
|
private String id;
|
||||||
private String lineId;
|
private String lineId;
|
||||||
private String lineName;
|
private String lineName;
|
||||||
|
private String userName;
|
||||||
|
private String connectedBus;
|
||||||
|
private String monitoringTerminalCode;
|
||||||
|
private String monitoringTerminalName;
|
||||||
|
private String powerSubstationName;
|
||||||
private String reason;
|
private String reason;
|
||||||
private String processInstanceId;
|
private String processInstanceId;
|
||||||
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 0:未试运行 1:试运行中 2.试运行成功 3.试运行异常
|
||||||
|
*/
|
||||||
|
private Integer testRunState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.supervision.controller.device;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @since 2024-05-21
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/supervisionTempLineRunTest")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionTempLineRunTestController extends BaseController {
|
||||||
|
|
||||||
|
private final ISupervisionTempLineRunTestService iSupervisionTempLineRunTestService;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -59,6 +59,17 @@ public class TempLineDebugController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/pageHasDebug")
|
||||||
|
@ApiOperation("查询已完成联调监测点")
|
||||||
|
@ApiImplicitParam(name = "supervisionTempLineDebugQuery", value = "参数", required = true)
|
||||||
|
public HttpResult<Page<SupervisionTempLineDebugVO>> pageHasDebug(@RequestBody @Validated SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||||
|
String methodDescribe = getMethodDescribe("pageHasDebug");
|
||||||
|
Page<SupervisionTempLineDebugVO> out = supervisionTempLineDebugPOService.pageHasDebug(supervisionTempLineDebugQuery);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, out, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getDetail")
|
@PostMapping("/getDetail")
|
||||||
@ApiOperation("查询详情")
|
@ApiOperation("查询详情")
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Date: 2024/5/17 15:26【需求编号】
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
*
|
*
|
||||||
@@ -18,4 +18,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
*/
|
*/
|
||||||
public interface SupervisionTempLineDebugPOMapper extends BaseMapper<SupervisionTempLineDebugPO> {
|
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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.supervision.mapper.device;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2024-05-21
|
||||||
|
*/
|
||||||
|
public interface SupervisionTempLineRunTestMapper extends BaseMapper<SupervisionTempLineRunTest> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, reason, process_instance_id, `status`, Create_By, Create_Time, Update_By, Update_Time,
|
id, reason, process_instance_id, `status`, Create_By, Create_Time, Update_By, Update_Time,
|
||||||
`State`
|
`State`
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -34,4 +34,27 @@
|
|||||||
where supervision_temp_line_report.`status`=2
|
where supervision_temp_line_report.`status`=2
|
||||||
and ${ew.sqlSegment}
|
and ${ew.sqlSegment}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
|
||||||
|
|
||||||
|
<select id="pageHasDebug" resultType="com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO">
|
||||||
|
SELECT
|
||||||
|
supervision_temp_line_report.id id,
|
||||||
|
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_debug.reason reason,
|
||||||
|
supervision_temp_line_run_test.process_instance_id process_instanceId,
|
||||||
|
supervision_temp_line_run_test.`status` `Status`,
|
||||||
|
IFNULL(supervision_temp_line_run_test.`test_run_state`,0) `testRunState`
|
||||||
|
FROM
|
||||||
|
supervision_temp_line_debug
|
||||||
|
inner JOIN supervision_temp_line_report ON supervision_temp_line_report.id = supervision_temp_line_debug.id
|
||||||
|
left join supervision_temp_line_run_test on supervision_temp_line_debug.id = supervision_temp_line_run_test.id
|
||||||
|
where supervision_temp_line_debug.`status`=2
|
||||||
|
and ${ew.sqlSegment}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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.device.mapper.SupervisionTempLineRunTestMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.supervision.service.device;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2024-05-21
|
||||||
|
*/
|
||||||
|
public interface ISupervisionTempLineRunTestService extends IService<SupervisionTempLineRunTest> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,19 +7,20 @@ import com.njcn.supervision.pojo.po.device.SupervisionTempLineDebugPO;
|
|||||||
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Description:
|
* Description:
|
||||||
* Date: 2024/5/17 15:26【需求编号】
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
*
|
*
|
||||||
* @author clam
|
* @author clam
|
||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
public interface SupervisionTempLineDebugPOService extends IService<SupervisionTempLineDebugPO>{
|
public interface SupervisionTempLineDebugPOService extends IService<SupervisionTempLineDebugPO> {
|
||||||
|
|
||||||
|
|
||||||
String addTempLineDebug(SupervisionTempLineDebugParam supervisionTempLineReportParam);
|
String addTempLineDebug(SupervisionTempLineDebugParam supervisionTempLineReportParam);
|
||||||
|
|
||||||
Page<SupervisionTempLineDebugVO> getTempLineDeug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery);
|
Page<SupervisionTempLineDebugVO> getTempLineDeug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery);
|
||||||
|
|
||||||
|
Page<SupervisionTempLineDebugVO> pageHasDebug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery);
|
||||||
|
|
||||||
SupervisionTempLineDebugVO getDetailTempLineDebug(String id);
|
SupervisionTempLineDebugVO getDetailTempLineDebug(String id);
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Date: 2024/5/17 15:26【需求编号】
|
* Date: 2024/5/17 15:26【需求编号】
|
||||||
*
|
*
|
||||||
@@ -105,6 +105,30 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<SupervisionTempLineDebugVO> pageHasDebug(SupervisionTempLineDebugParam.SupervisionTempLineDebugQuery supervisionTempLineDebugQuery) {
|
||||||
|
QueryWrapper<SupervisionDevMainReportVO> queryWrapper = new QueryWrapper<>();
|
||||||
|
|
||||||
|
String userIndex = RequestUtil.getUserIndex();
|
||||||
|
queryWrapper
|
||||||
|
.eq("supervision_temp_line_debug.state", DataStateEnum.ENABLE.getCode());
|
||||||
|
if (StrUtil.isNotBlank(supervisionTempLineDebugQuery.getOrgId())) {
|
||||||
|
/*获取直接下属子单位*/
|
||||||
|
List<String> data = deptFeignClient.getDepSonIdtByDeptId(supervisionTempLineDebugQuery.getOrgId()).getData();
|
||||||
|
queryWrapper.in("supervision_temp_line_debug.org_id", data);
|
||||||
|
|
||||||
|
}
|
||||||
|
//添加上时间范围
|
||||||
|
queryWrapper.between("supervision_temp_line_debug.Create_Time",
|
||||||
|
DateUtil.beginOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchBeginTime())),
|
||||||
|
DateUtil.endOfDay(DateUtil.parse(supervisionTempLineDebugQuery.getSearchEndTime())));
|
||||||
|
queryWrapper.orderByDesc("supervision_temp_line_debug.Update_Time");
|
||||||
|
|
||||||
|
Page<SupervisionTempLineDebugVO> page =this.baseMapper.pageHasDebug(new Page<>(PageFactory.getPageNum(supervisionTempLineDebugQuery), PageFactory.getPageSize(supervisionTempLineDebugQuery)), queryWrapper);
|
||||||
|
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
||||||
SupervisionTempLineDebugVO supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
SupervisionTempLineDebugVO supervisionTempLineDebugVO = new SupervisionTempLineDebugVO();
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.supervision.service.device.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.supervision.mapper.device.SupervisionTempLineRunTestMapper;
|
||||||
|
import com.njcn.supervision.pojo.po.device.SupervisionTempLineRunTest;
|
||||||
|
import com.njcn.supervision.service.device.ISupervisionTempLineRunTestService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2024-05-21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<SupervisionTempLineRunTestMapper, SupervisionTempLineRunTest> implements ISupervisionTempLineRunTestService {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -50,6 +50,8 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
|||||||
* 用户信息建档对应的流程定义 KEY
|
* 用户信息建档对应的流程定义 KEY
|
||||||
*/
|
*/
|
||||||
public static final String PROCESS_KEY = "user_go_net";
|
public static final String PROCESS_KEY = "user_go_net";
|
||||||
|
public static final String PROCESS_OTHER_KEY ="user_treat_check";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final BpmProcessFeignClient bpmProcessFeignClient;
|
private final BpmProcessFeignClient bpmProcessFeignClient;
|
||||||
@@ -72,7 +74,12 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
|||||||
// 发起 BPM 流程
|
// 发起 BPM 流程
|
||||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_KEY);
|
if(userReportNormalParam.getType() == 0){
|
||||||
|
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_KEY);
|
||||||
|
}else {
|
||||||
|
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(PROCESS_OTHER_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
bpmProcessInstanceCreateReqDTO.setBusinessKey(userReportNormalPO.getId());
|
bpmProcessInstanceCreateReqDTO.setBusinessKey(userReportNormalPO.getId());
|
||||||
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(userReportNormalParam.getStartUserSelectAssignees());
|
bpmProcessInstanceCreateReqDTO.setStartUserSelectAssignees(userReportNormalParam.getStartUserSelectAssignees());
|
||||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||||
@@ -133,6 +140,7 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
|||||||
UserReportVO.UserReportGoNetVO vo = new UserReportVO.UserReportGoNetVO();
|
UserReportVO.UserReportGoNetVO vo = new UserReportVO.UserReportGoNetVO();
|
||||||
BeanUtil.copyProperties(userReportPO,vo);
|
BeanUtil.copyProperties(userReportPO,vo);
|
||||||
BeanUtil.copyProperties(userReportNormalPO,vo);
|
BeanUtil.copyProperties(userReportNormalPO,vo);
|
||||||
|
vo.setOtherReport(userReportNormalPO.getReportUrl());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user