在线监测点效率修改,监测点下来框接口
This commit is contained in:
@@ -49,7 +49,14 @@ public class CommLineController extends BaseController {
|
||||
LineALLInfoDTO result = lineService.getLineAllDetail(id);
|
||||
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)
|
||||
@PostMapping("/getLineDetailBatch")
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
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.web.controller.BaseController;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
@@ -109,6 +110,16 @@ public class DeptLineController extends BaseController {
|
||||
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")
|
||||
@ApiOperation("获取部门和监测点的关系(分稳态暂态)")
|
||||
@ApiImplicitParam(name = "devDataType", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true)
|
||||
|
||||
@@ -623,10 +623,13 @@
|
||||
AND device.id = subv.pid
|
||||
AND device1.id = device.id
|
||||
AND sub.id = device1.pid
|
||||
<if test="list!=null and list.size()!=0">
|
||||
|
||||
AND t.id in
|
||||
<foreach item="item" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<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.param.SubstationParam;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -119,4 +120,6 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
* @return 查询结果
|
||||
*/
|
||||
DeptLine getLineByLineIds(String ids);
|
||||
|
||||
List<LineDeviceStateVO> getLineDetailByDeptId(String id);
|
||||
}
|
||||
|
||||
@@ -213,4 +213,6 @@ public interface LineService extends IService<Line> {
|
||||
DeviceVO getDeviceDetailData(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.QueryWrapper;
|
||||
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.TerminalGetBase;
|
||||
import com.njcn.device.biz.pojo.param.SubstationParam;
|
||||
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.vo.LineDeviceStateVO;
|
||||
import com.njcn.device.pq.service.DeptLineService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
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 DeptFeignClient deptFeignClient;
|
||||
private final LineMapper lineMapper;
|
||||
|
||||
@Override
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
@Override
|
||||
public LineALLInfoDTO getLineAllDetail(String id) {
|
||||
LineALLInfoDTO lineALLInfoDTO = new LineALLInfoDTO();
|
||||
//根据id查询当前信息的pids
|
||||
//根据id查询当前信息的pids
|
||||
List<String> pids = Arrays.asList(this.baseMapper.selectById(id).getPids().split(","));
|
||||
List<String> list = new ArrayList(pids);
|
||||
list.add(id);
|
||||
@@ -655,6 +655,12 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LineALLInfoDTO> getLineAllDetailList(List<String> ids) {
|
||||
List<LineALLInfoDTO> collect = ids.stream().map(this::getLineAllDetail).collect(Collectors.toList());
|
||||
return collect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Overlimit> getOverLimitByList(PollutionParamDTO pollutionParamDTO) {
|
||||
return overlimitMapper.selectBatchIds(pollutionParamDTO.getLineList());
|
||||
|
||||
Reference in New Issue
Block a user