冀北检测点试运行部分接口提交
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@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)
|
||||
@PostMapping("/getDetail")
|
||||
@ApiOperation("查询详情")
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.njcn.supervision.pojo.vo.device.SupervisionTempLineDebugVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/5/17 15:26【需求编号】
|
||||
*
|
||||
@@ -18,4 +18,7 @@ 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> 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>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@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`
|
||||
</sql>
|
||||
|
||||
@@ -34,4 +34,27 @@
|
||||
where supervision_temp_line_report.`status`=2
|
||||
and ${ew.sqlSegment}
|
||||
</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;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/5/17 15:26【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @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);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* Date: 2024/5/17 15:26【需求编号】
|
||||
*
|
||||
@@ -105,6 +105,30 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
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
|
||||
public SupervisionTempLineDebugVO getDetailTempLineDebug(String id) {
|
||||
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
|
||||
*/
|
||||
public static final String PROCESS_KEY = "user_go_net";
|
||||
public static final String PROCESS_OTHER_KEY ="user_treat_check";
|
||||
|
||||
|
||||
|
||||
private final BpmProcessFeignClient bpmProcessFeignClient;
|
||||
@@ -72,7 +74,12 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
||||
// 发起 BPM 流程
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>();
|
||||
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.setStartUserSelectAssignees(userReportNormalParam.getStartUserSelectAssignees());
|
||||
bpmProcessInstanceCreateReqDTO.setVariables(processInstanceVariables);
|
||||
@@ -133,6 +140,7 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
||||
UserReportVO.UserReportGoNetVO vo = new UserReportVO.UserReportGoNetVO();
|
||||
BeanUtil.copyProperties(userReportPO,vo);
|
||||
BeanUtil.copyProperties(userReportNormalPO,vo);
|
||||
vo.setOtherReport(userReportNormalPO.getReportUrl());
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user