Commit 4e0995e3 authored by zhangsen's avatar zhangsen

bug修改

parent 9f240abd
...@@ -454,7 +454,7 @@ public class ConfigureController extends AbstractBaseController { ...@@ -454,7 +454,7 @@ public class ConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "物联监控大屏3大-获取某站下装备数量、摄像头数量") @ApiOperation(value = "物联监控大屏3大-获取某站下装备数量、摄像头数量")
@GetMapping("/statisticsByStation") @GetMapping("/statisticsByStation")
public ResponseModel getEquipmentState(@RequestParam(required = false) String bizOrgCode) { public ResponseModel statisticsByStation(@RequestParam(required = false) String bizOrgCode) {
if (ObjectUtils.isEmpty(bizOrgCode)) { if (ObjectUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
......
...@@ -1179,7 +1179,7 @@ public class ExcelServiceImpl { ...@@ -1179,7 +1179,7 @@ public class ExcelServiceImpl {
excelDtoList.forEach(item -> { excelDtoList.forEach(item -> {
if (StringUtils.isEmpty(item.getCompanyName()) || StringUtils.isEmpty(item.getName()) || if (StringUtils.isEmpty(item.getCompanyName()) || StringUtils.isEmpty(item.getName()) ||
StringUtils.isEmpty(item.getTypeCode()) || StringUtils.isEmpty(item.getAddress())) { StringUtils.isEmpty(item.getType()) || StringUtils.isEmpty(item.getAddress())) {
throw new BadRequest("请检查必填项是否为空"); throw new BadRequest("请检查必填项是否为空");
} }
FireTeam fireTeam = new FireTeam(); FireTeam fireTeam = new FireTeam();
......
...@@ -2225,6 +2225,9 @@ ...@@ -2225,6 +2225,9 @@
<if test="bizOrgCode!=null and bizOrgCode!=''"> <if test="bizOrgCode!=null and bizOrgCode!=''">
and es.biz_org_code like concat(#{bizOrgCode}, '%') and es.biz_org_code like concat(#{bizOrgCode}, '%')
</if> </if>
<if test="systemCode!=null and systemCode!=''">
and FIND_IN_SET( #{systemCode,jdbcType=VARCHAR}, log.system_codes )
</if>
</where> </where>
) AS unConfirmInfoNum ) AS unConfirmInfoNum
</select> </select>
...@@ -2507,37 +2510,69 @@ ...@@ -2507,37 +2510,69 @@
</select> </select>
<select id="equipmentState" resultType="java.util.Map"> <select id="equipmentState" resultType="java.util.Map">
<!-- SELECT-->
<!-- b.equipName,-->
<!-- (CASE WHEN-->
<!-- b.totalNum > 0 THEN-->
<!-- '异常' ELSE '正常' END) `status`,-->
<!-- b.totalNum AS totalNum,-->
<!-- b.`code` AS equipDetailCode-->
<!-- FROM-->
<!-- (-->
<!-- SELECT-->
<!-- a.equipName,-->
<!-- count( wesl.id ) AS totalNum,-->
<!-- a.`code`-->
<!-- FROM-->
<!-- (-->
<!-- SELECT-->
<!-- wes.`name` AS equipName,-->
<!-- wed.equipment_id AS equipmentId,-->
<!-- wed.`code` AS code-->
<!-- FROM-->
<!-- wl_equipment_specific wes-->
<!-- LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id-->
<!-- WHERE-->
<!-- FIND_IN_SET( #{id}, wes.system_id ) > 0-->
<!-- GROUP BY-->
<!-- wed.equipment_id-->
<!-- ) a-->
<!-- LEFT JOIN wl_equipment_specific_alarm_log wesl ON wesl.equipment_id = a.equipmentId-->
<!-- GROUP BY-->
<!-- a.equipmentId-->
<!-- ) b-->
SELECT SELECT
b.equipName, b.equipName,
(CASE WHEN ( CASE WHEN b.totalNum > 0 THEN '异常' ELSE '正常' END ) `status`,
b.totalNum > 0 THEN b.totalNum AS totalNum,
'异常' ELSE '正常' END) `status`, b.`code` AS equipDetailCode
b.totalNum AS totalNum,
b.`code` AS equipDetailCode
FROM FROM
( (
SELECT SELECT
a.equipName, a.equipName,
count( wesl.id ) AS totalNum, count( DISTINCT wesa.equipment_specific_id ) AS totalNum,
a.`code` a.`code`
FROM FROM
( (
SELECT SELECT
wes.`name` AS equipName, wed.`name` AS equipName,
wed.equipment_id AS equipmentId, wed.equipment_id AS equipmentId,
wed.`code` AS code wed.`code` AS `code`
FROM FROM
wl_equipment_specific wes wl_equipment_detail wed
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id LEFT JOIN wl_equipment_specific wes ON wed.id = wes.equipment_detail_id
WHERE WHERE
FIND_IN_SET( #{id}, wes.system_id ) > 0 FIND_IN_SET( #{id}, wes.system_id ) > 0
GROUP BY GROUP BY
wed.equipment_id wed.equipment_id
) a ) a
LEFT JOIN wl_equipment_specific_alarm_log wesl ON wesl.equipment_id = a.equipmentId LEFT JOIN wl_equipment_specific_alarm wesa ON wesa.equipment_id = a.equipmentId
GROUP BY AND wesa.`status` = 1
a.equipmentId GROUP BY
) b a.equipmentId
) b
</select> </select>
<select id="getPressurePumpInfo" resultType="java.util.Map"> <select id="getPressurePumpInfo" resultType="java.util.Map">
......
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