Commit 00a3888e authored by litengwei's avatar litengwei

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

parents 9db7581f 0324dcbb
......@@ -600,7 +600,7 @@ WHERE
ou.sequence_nbr as id,
ou.biz_org_name as userName,
IFNULL( MAX( CASE WHEN cfi.field_code = 'telephone' THEN field_value END ), '' ) AS telephone,
IFNULL( MAX( CASE WHEN cfi.field_code = 'positionType' THEN field_value_label END ), '' ) AS postTypeName,
IF(MAX( CASE WHEN cfi.field_code = 'positionType' THEN field_value_label END ) = '', NULL, MAX( CASE WHEN cfi.field_code = 'positionType' THEN field_value_label END )) AS postTypeName,
IFNULL( MAX( CASE WHEN cfi.field_code = 'personImg' THEN field_value END ), '' ) AS personImg,
IFNULL( MAX( CASE WHEN cfi.field_code = 'peopleType' THEN field_value END ), '' ) AS peopleType
FROM
......
......@@ -62,10 +62,6 @@ public class SupervisionConfigureController extends AbstractBaseController {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getWaterInfoBySuper(page, bizOrgCode));
}
......@@ -94,10 +90,6 @@ public class SupervisionConfigureController extends AbstractBaseController {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
if (StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
return CommonResponseUtil.success(fireFightingSystemMapper.getPipeNetworkBySuper(page, bizOrgCode));
}
......@@ -196,11 +188,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping(value = "/fireAlarmLogPage", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "消防报警列表分页查询", produces = "application/json;charset=UTF-8", notes = "消防报警列表分页查询")
public ResponseModel pageQuery(@RequestParam(required = false) String code, @RequestParam(required = false) String typeCode, CommonPageable commonPageable) {
public ResponseModel pageQuery(@RequestParam(required = false) String code,
@RequestParam(required = false) String typeCode,
@RequestParam(required = false) String bizOrgCode,
CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
ReginParams reginParams = getSelectedOrgInfo();
List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request7 = new CommonRequest();
request7.setName("system");
......@@ -210,12 +204,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
request8.setName("specificIndexKey");
request8.setValue(StringUtil.isNotEmpty(typeCode) ? StringUtils.trimToNull(typeCode) : null);
queryRequests.add(request8);
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())) {
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null);
queryRequests.add(request13);
}
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(bizOrgCode) ? StringUtils.trimToNull(typeCode) : null);
queryRequests.add(request13);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
return CommonResponseUtil.success(equipmentSpecificAlarmService.fireAlarmLogPage(param));
}
......@@ -225,16 +217,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
@RequestMapping(value = "/alarmTrend", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "报警类型趋势", produces = "application/json;charset=UTF-8", notes = "报警类型趋势")
public ResponseModel alarmTrend() {
String bizOrgCode = null;
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
if (!ValidationUtil.isEmpty(personIdentity)) {
bizOrgCode = personIdentity.getBizOrgCode();
if (bizOrgCode == null) {
return CommonResponseUtil.success(null);
}
}
public ResponseModel alarmTrend(@RequestParam(required = false) String bizOrgCode) {
return CommonResponseUtil.success(equipmentSpecificAlarmService.alarmTrend(bizOrgCode));
}
......@@ -242,12 +225,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "概览稳压泵信息")
@GetMapping("/getPressurePumpInfo")
public ResponseModel getPressurePumpInfo(CommonPageable commonPageable) {
public ResponseModel getPressurePumpInfo(CommonPageable commonPageable,@RequestParam(required = false) String bizOrgCode) {
if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1);
}
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
Page page = new Page<>(commonPageable.getPageNumber(), commonPageable.getPageSize());
if (StringUtils.isEmpty(bizOrgCode)) {
return CommonResponseUtil.success(null);
......
......@@ -4538,7 +4538,6 @@
select * from (
(SELECT
r.`name`,
ou.`code`,
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(
......@@ -4585,12 +4584,9 @@
IFNULL( rp.volume, 0 ) AS volume,
ec.image,
r.resource_type,
r.sequence_nbr,
fs.`code` AS systemCode
r.sequence_nbr
FROM
cb_water_resource r
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = r.biz_org_code
AND ou.is_delete = 0
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_specific_index ei ON ei.equipment_specific_id = rp.level_device_id
LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id
......@@ -4598,7 +4594,7 @@
WHERE
r.resource_type = 'industryPool'
AND r.is_delete = 1
AND ou.`code` IS NOT NULL
AND r.`biz_org_code` IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
......@@ -4607,7 +4603,6 @@
(
SELECT
a.`name`,
a.`code`,
a.minLevel,
a.maxLevel,
(
......@@ -4654,13 +4649,11 @@
a.volume,
a.image,
a.resource_type,
a.sequence_nbr,
a.`code` AS systemCode
a.sequence_nbr
FROM
(
SELECT
r.`name`,
ou.`code`,
IFNULL( rp.min_water_level, 0 ) AS minLevel,
IFNULL( rp.max_water_level, 0 ) AS maxLevel,
(select
......@@ -4674,19 +4667,16 @@
ec.image,
r.resource_type,
r.sequence_nbr,
rp.level_device_id,
fs.`code` AS systemCode
rp.level_device_id
FROM
cb_water_resource r
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = r.biz_org_code
AND ou.is_delete = 0
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_category ec ON ec.id = r.equip_category_id
LEFT JOIN f_fire_fighting_system fs ON fs.id = r.belong_fighting_system_id
WHERE
r.resource_type = 'pool'
AND r.is_delete = 1
AND ou.`code` IS NOT NULL
AND r.`biz_org_code` IS NOT NULL
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
......@@ -4893,7 +4883,9 @@
WHERE
ed.`code` LIKE '92011000%'
<!-- AND es.iot_code IS NOT NULL-->
AND es.biz_org_code like concat(#{bizOrgCode}, '%')
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND r.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
GROUP BY
es.id
) a
......
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