Commit f9396219 authored by zhangsen's avatar zhangsen

大屏API提供修改数据结构

parent af717b55
...@@ -2,15 +2,21 @@ package com.yeejoin.equipmanage.common.vo; ...@@ -2,15 +2,21 @@ package com.yeejoin.equipmanage.common.vo;
import lombok.Data; import lombok.Data;
import java.util.List;
import java.util.Map; import java.util.Map;
@Data @Data
public class BigScreenVo { public class BigScreenVo {
private Map<String, Object> systemAlarmInfoNum;
private Map<String, Object> pool; private List<Map<String, Object>> infoList;
private Map<String, Object> industryPool; private List<Map<String, Object>> carNumInfo;
private Integer carNum; // private Map<String, Object> systemAlarmInfoNum;
//
// private Map<String, Object> pool;
//
// private Map<String, Object> industryPool;
//
// private Integer carNum;
} }
...@@ -8,6 +8,7 @@ import java.util.Map; ...@@ -8,6 +8,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -52,6 +53,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -52,6 +53,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
@Autowired @Autowired
IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService; IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService;
@Autowired
private EquipmentSpecificMapper equipmentSpecificMapper;
@Value("${equip.enabled}") @Value("${equip.enabled}")
private Boolean equioEnabled; private Boolean equioEnabled;
/** /**
...@@ -379,4 +384,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -379,4 +384,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
return CommonResponseUtil.success(map); return CommonResponseUtil.success(map);
} }
@RequestMapping(value = "/getAllEquipNum", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查装备数量", produces = "application/json;charset=UTF-8", notes = "查装备数量")
public ResponseModel getAllEquipNum(@RequestParam(required = false) String bizOrgCode) {
return CommonResponseUtil.success(equipmentSpecificMapper.getAllEquipNum(bizOrgCode));
}
} }
...@@ -232,4 +232,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -232,4 +232,5 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings); List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings);
Integer getAllEquipNum(@Param("bizOrgCode") String bizOrgCode);
} }
...@@ -1325,14 +1325,24 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -1325,14 +1325,24 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override @Override
public BigScreenVo getSystemAlarmInfoNum(String companyCode) { public BigScreenVo getSystemAlarmInfoNum(String companyCode) {
BigScreenVo bigScreenVo = new BigScreenVo(); BigScreenVo bigScreenVo = new BigScreenVo();
List<Map<String, Object>> infoList = new ArrayList<>();
Map<String, Object> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(companyCode); Map<String, Object> systemAlarmInfoNum = fireFightingSystemMapper.getSystemAlarmInfoNum(companyCode);
bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum); // bigScreenVo.setSystemAlarmInfoNum(systemAlarmInfoNum);
infoList.add(systemAlarmInfoNum);
Map<String, Object> pool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "pool"); Map<String, Object> pool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "pool");
bigScreenVo.setPool(pool); // bigScreenVo.setPool(pool);
infoList.add(pool);
Map<String, Object> industryPool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "industryPool"); Map<String, Object> industryPool = fireFightingSystemMapper.getWaterPoolInfoNum(companyCode, "industryPool");
bigScreenVo.setIndustryPool(industryPool); // bigScreenVo.setIndustryPool(industryPool);
infoList.add(industryPool);
List<Map<String, Object>> carInfoList = new ArrayList<>();
Integer carNum = fireFightingSystemMapper.getCarNum(companyCode); Integer carNum = fireFightingSystemMapper.getCarNum(companyCode);
bigScreenVo.setCarNum(carNum); Map<String, Object> carInfo = new HashMap<>();
carInfo.put("carNum", carNum);
carInfoList.add(carInfo);
// bigScreenVo.setCarNum(carNum);
bigScreenVo.setCarNumInfo(carInfoList);
bigScreenVo.setInfoList(infoList);
return bigScreenVo; return bigScreenVo;
} }
} }
...@@ -1624,4 +1624,13 @@ ...@@ -1624,4 +1624,13 @@
</where> </where>
ORDER BY realtiemIotIndexUpdateDate DESC ORDER BY realtiemIotIndexUpdateDate DESC
</select> </select>
<select id="getAllEquipNum" resultType="java.lang.Integer">
select count(*) from wl_equipment_specific
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code = #{bizOrgCode}
</if>
</where>
</select>
</mapper> </mapper>
\ No newline at end of file
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