Commit 66efb316 authored by 高建强's avatar 高建强

Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp

parents 1dad96f6 844a1cb4
......@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.controller;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.constant.Constant;
import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO;
......@@ -407,6 +408,19 @@ public class EquipmentSpecificController extends AbstractBaseController {
return CommonResponseUtil.success(equipmentSpecificSerivce.normalIndexInfoList(startDate, endDate));
}
@GetMapping(value = "/index/normalByPage")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "分页查询非告警指标list", notes = "分页查询非告警指标list")
public ResponseModel normalIndexInfoListByPage(@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate,
@RequestParam(required = false) String systemCode,
@RequestParam(required = false) String name,
@RequestParam Integer pageNumber,
@RequestParam Integer pageSize){
Page<Map<String, Object>> page = new Page<>(pageNumber, pageSize);
return CommonResponseUtil.success(equipmentSpecificSerivce.normalIndexInfoListByPage(page, startDate, endDate,systemCode,name));
}
@GetMapping(value = "/info/fire")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询火报系统指标", notes = "查询火报系统指标")
......
......@@ -246,6 +246,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> normalIndexInfoList(@Param("startDate") String startDate, @Param("endDate") String endDate);
Page<Map<String, Object>> normalIndexInfoListByPage(@Param("Page")Page<Map<String, Object>> page, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("systemCode") String systemCode, @Param("name") String name);
Map<String, Object> getFireAutoSysInfo();
Map<String, Object> getPaomoSysInfo();
......
......@@ -248,6 +248,8 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
List<Map<String, Object>> normalIndexInfoList(String startDate, String endDate);
Page<Map<String, Object>> normalIndexInfoListByPage(Page<Map<String, Object>> page, String startDate, String endDate, String systemCode, String name);
Map<String, Object> getFireAutoSysInfo(String startDate, String endDate);
Map<String, Object> getPaomoSysInfo(String startDate, String endDate);
......
......@@ -2003,6 +2003,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
@Override
public Page<Map<String, Object>> normalIndexInfoListByPage(Page<Map<String, Object>> page, String startDate, String endDate, String systemCode, String name) {
return equipmentSpecificMapper.normalIndexInfoListByPage(page, startDate, endDate, systemCode, name);
}
@Override
public Map<String, Object> getFireAutoSysInfo(String startDate, String endDate) {
return equipmentSpecificMapper.getFireAutoSysInfo();
}
......
......@@ -997,7 +997,7 @@
(
SELECT
es.id,
ed.`name`,
e.`name`,
DATE_FORMAT( ed.production_date, '%Y-%m-%d' ) AS productDate,
ed.CODE,
ifnull(sd.amount,0) as amount
......
......@@ -1816,6 +1816,52 @@
AND DATE_FORMAT(si.update_date,'%y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{endDate},'%y-%m-%d')
</if>
</select>
<select id="normalIndexInfoListByPage" resultType="java.util.Map">
SELECT
`s`.`name` AS `equipName`,
`si`.`equipment_index_key` AS `equipmentIndexKey`,
(CASE si.`value` WHEN 'true' THEN '是' WHEN 'false' THEN '否' ELSE concat(si.`value`, IFNULL(wei.unit, '')) END)
AS `value`,
'' AS standardValue,
si.update_date AS `time`,
`si`.`equipment_index_name` AS `equipmentIndexName`,
`s`.`code` AS `code`,
a.`name` AS `areaName`,
(SELECT
group_concat( `fs`.`charge_person_name` SEPARATOR ',' )
FROM
`f_fire_fighting_system` `fs`
WHERE
(
0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `s`.`system_id` ))) AS `chargePersonName`,
(SELECT
group_concat( `fs`.`name` SEPARATOR ',' )
FROM
`f_fire_fighting_system` `fs`
WHERE
(
0 <![CDATA[<>]]> find_in_set( `fs`.`id`, `s`.`system_id` ))) AS `fightSysName`
FROM
`wl_equipment_specific_index` `si` JOIN `wl_equipment_specific` `s`
LEFT JOIN wl_area a ON a.id = s.area_id
LEFT JOIN wl_equipment_index wei ON wei.id = si.equipment_index_id
WHERE
`si`.`equipment_specific_id` = `s`.`id` AND si.is_alarm = 0
<if test="startDate!=null">
AND DATE_FORMAT(si.update_date,'%y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{startDate},'%y-%m-%d')
</if>
<if test="endDate!=null">
AND DATE_FORMAT(si.update_date,'%y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{endDate},'%y-%m-%d')
</if>
<if test="name != null and name != ''">
AND (s.name LIKE CONCAT('%', #{name}, '%') or si.equipment_index_name LIKE CONCAT('%',#{name},'%'))
</if>
<if test="systemCode != null and systemCode != ''">
AND FIND_IN_SET((SELECT id FROM f_fire_fighting_system WHERE code = #{systemCode} ),s.system_id)
</if>
</select>
<select id="getFireAutoSysInfo" resultType="java.util.Map">
SELECT
ifnull(`b`.`fightSysId`, NULL) AS `fightSysId`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment