pq台账功能修改
This commit is contained in:
@@ -279,13 +279,25 @@ public class GeneralDeviceInfoController extends BaseController {
|
||||
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/deptGetRunLine")
|
||||
@ApiOperation("根据单位获取投运监测点")
|
||||
@ApiImplicitParam(name = "deptId", value = "单位部门索引", required = true)
|
||||
public HttpResult<List<String>> deptGetRunLine(@RequestParam("deptId")String deptId) {
|
||||
String methodDescribe = getMethodDescribe("deptGetRunLine");
|
||||
List<String> runLineIds = generalDeviceService.deptGetRunLine(deptId,Stream.of(0).collect(Collectors.toList()));
|
||||
List<String> runLineIds = generalDeviceService.deptGetRunLine(deptId,Stream.of(0).collect(Collectors.toList()),Stream.of(0,1,2).collect(Collectors.toList()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,runLineIds,methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/deptGetRunLineEvent")
|
||||
@ApiOperation("根据单位获取暂态系统投运监测点")
|
||||
@ApiImplicitParam(name = "deptId", value = "单位部门索引", required = true)
|
||||
public HttpResult<List<String>> deptGetRunLineEvent(@RequestParam("deptId")String deptId) {
|
||||
String methodDescribe = getMethodDescribe("deptGetRunLineEvent");
|
||||
List<String> runLineIds = generalDeviceService.deptGetRunLine(deptId,Stream.of(0).collect(Collectors.toList()),Stream.of(0,2).collect(Collectors.toList()));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,runLineIds,methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,5 +75,5 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
||||
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
||||
|
||||
|
||||
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,@Param("runFlag")List<Integer> runFlag);
|
||||
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,@Param("runFlag")List<Integer> runFlag,@Param("dataType")List<Integer> dataType);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,11 @@
|
||||
inner join pq_line voltage on point.pid = voltage.id
|
||||
inner join pq_line dev on voltage.pid = dev.id
|
||||
inner join pq_device device on dev.id = device.id
|
||||
where Dev_Model = 1
|
||||
where device.Dev_Model = 1
|
||||
and device.Dev_Data_Type in
|
||||
<foreach collection="dataType" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
and device.run_flag in
|
||||
<foreach collection="runFlag" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
|
||||
@@ -487,12 +487,14 @@
|
||||
subscale.name subScale,
|
||||
pqdevice.IP ip,
|
||||
factory.`Name` manufacturer,
|
||||
voltage.id voltageId,
|
||||
voltage.`Name` voltageName,
|
||||
scale.`Name` voltageScale,
|
||||
pqdevice.run_flag,
|
||||
pqdevice.com_flag,
|
||||
pqsubstation.Lng,
|
||||
pqsubstation.lat,
|
||||
detail.num,
|
||||
detail.ct1,
|
||||
detail.ct2,
|
||||
detail.pt1,
|
||||
|
||||
@@ -44,7 +44,7 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
* @param ids 部门ids
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<String> getLineByDeptIds(List<String> ids,List<Integer> runFlag);
|
||||
List<String> getLineByDeptIds(List<String> ids,List<Integer> runFlag,List<Integer> dataType);
|
||||
|
||||
/**
|
||||
* 部门解除绑定监测点
|
||||
|
||||
@@ -61,8 +61,8 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLineByDeptIds(List<String> ids,List<Integer> runFlag) {
|
||||
return this.baseMapper.getLineIdByDeptIds(ids,runFlag);
|
||||
public List<String> getLineByDeptIds(List<String> ids,List<Integer> runFlag,List<Integer> dataType) {
|
||||
return this.baseMapper.getLineIdByDeptIds(ids,runFlag,dataType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -727,12 +727,19 @@ public class GeneralDeviceService {
|
||||
}
|
||||
|
||||
|
||||
public List<String> deptGetRunLine(String deptId,List<Integer> runFlag) {
|
||||
/**
|
||||
* @param deptId 部门id
|
||||
* @param runFlag 设备运行状态 0:投运 1.热备用 2.停运
|
||||
* @param dataType 系统 0:暂态系统;1:稳态系统;2:两个系统
|
||||
* @author cdf
|
||||
* @date 2023/7/20
|
||||
*/
|
||||
public List<String> deptGetRunLine(String deptId,List<Integer> runFlag,List<Integer> dataType) {
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(deptId, Stream.of(0, 1).collect(Collectors.toList())).getData();
|
||||
if (CollUtil.isNotEmpty(deptDTOList)) {
|
||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
return deptLineService.getLineByDeptIds(deptIds,runFlag);
|
||||
return deptLineService.getLineByDeptIds(deptIds,runFlag,dataType);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user