自定义报表优化处理
This commit is contained in:
@@ -322,4 +322,19 @@ public class CommTerminalController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("getStatisticsMonitor");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new ArrayList<>(), methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监测点的台账详细信息
|
||||
* @author cdf
|
||||
* @date 2023/10/23
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@GetMapping("/getCustomDetailByLineId")
|
||||
@ApiOperation("获取监测点的台账详细信息(自定义报表用)")
|
||||
@ApiImplicitParam(name = "id", value = "监测点ID", required = true)
|
||||
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getCustomDetailByLineId");
|
||||
Map<String,String> result = commTerminalService.getCustomDetailByLineId(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.apache.ibatis.annotations.Select;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -523,4 +524,6 @@ public interface LineMapper extends BaseMapper<Line> {
|
||||
* @Date: 2023/9/22 10:20
|
||||
*/
|
||||
LineDTO selectLineDetail(@Param("id") String id);
|
||||
|
||||
Map<String,String> getCustomDetailByLineId(@Param("lineId")String lineId);
|
||||
}
|
||||
|
||||
@@ -1365,4 +1365,37 @@
|
||||
AND line.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getCustomDetailByLineId" resultType="map">
|
||||
SELECT
|
||||
line.id AS lineId,
|
||||
concat(sub.name,"_",vo.name,"_",line.name) as lineName,
|
||||
concat(detail.pt1,concat(':',detail.pt2)) as pt,
|
||||
concat(detail.ct1,concat(':',detail.ct2)) as ct,
|
||||
detail.Dev_Capacity as Dev_Capacity,
|
||||
detail.Short_Capacity as Short_Capacity,
|
||||
detail.Standard_Capacity as Standard_Capacity,
|
||||
detail.Deal_Capacity as Deal_Capacity,
|
||||
pqd.This_Time_Check AS This_Time_Check,
|
||||
dic.name AS voltageLevel
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail detail,
|
||||
pq_line vo,
|
||||
pq_voltage vg,
|
||||
pq_line dev,
|
||||
pq_device pqd,
|
||||
sys_dict_data dic,
|
||||
pq_line sub
|
||||
WHERE
|
||||
line.id = detail.id
|
||||
AND vo.id = line.pid
|
||||
AND dev.id = vo.pid
|
||||
AND vo.id = vg.id
|
||||
AND pqd.id = dev.id
|
||||
and vg.scale = dic.id
|
||||
and sub.id = dev.pid
|
||||
AND line.id = #{lineId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -2,8 +2,10 @@ package com.njcn.device.pq.service;
|
||||
|
||||
import com.njcn.device.biz.pojo.dto.*;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -72,6 +74,14 @@ public interface CommTerminalService {
|
||||
LineDevGetBandDTO substationGetLine(String substationId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取监测点的台账详细信息
|
||||
* @author cdf
|
||||
* @date 2023/10/23
|
||||
*/
|
||||
Map<String,String> getCustomDetailByLineId(String id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -200,8 +200,10 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
||||
return lineDevGetBandDTO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, String> getCustomDetailByLineId(String id) {
|
||||
return lineMapper.getCustomDetailByLineId(id);
|
||||
}
|
||||
|
||||
|
||||
private List<Integer> filterDataTypeNew(String serverName) {
|
||||
|
||||
Reference in New Issue
Block a user