Commit 2b75457a authored by zhangsen's avatar zhangsen

大屏API提供修改数据结构

parent 85a2391c
...@@ -7,7 +7,11 @@ import java.util.Map; ...@@ -7,7 +7,11 @@ import java.util.Map;
@Data @Data
public class BigScreen1VO { public class BigScreen1VO {
private Map<String, Object> firefightersInfo; // private Map<String, Object> firefightersInfo;
private Integer teamNum; List<Map<String, Object>> personList;
List<Map<String, Object>> teamNumInfo;
// private Integer teamNum;
} }
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.Collection; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
...@@ -279,8 +276,27 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi ...@@ -279,8 +276,27 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
BigScreen1VO bigScreen1VO = new BigScreen1VO(); BigScreen1VO bigScreen1VO = new BigScreen1VO();
Integer teamCount = firefightersMapper.getTeamCountByCode(companyCode); Integer teamCount = firefightersMapper.getTeamCountByCode(companyCode);
Map<String, Object> fireForceInfoByCode = firefightersMapper.getFireForceInfoByCode(companyCode); Map<String, Object> fireForceInfoByCode = firefightersMapper.getFireForceInfoByCode(companyCode);
bigScreen1VO.setTeamNum(teamCount); List<Map<String, Object>> personInfoList = new ArrayList<>();
bigScreen1VO.setFirefightersInfo(fireForceInfoByCode); HashMap<String, Object> fireInfo = new HashMap<>();
fireInfo.put("fireCer", fireForceInfoByCode.get("fireCer"));
fireInfo.put("unfireCer", fireForceInfoByCode.get("unfireCer"));
fireInfo.put("firefightersNum", fireForceInfoByCode.get("firefightersNum"));
fireInfo.put("fireAbs", fireForceInfoByCode.get("fireAbs"));
personInfoList.add(fireInfo);
HashMap<String, Object> operInfo = new HashMap<>();
operInfo.put("operCer", fireForceInfoByCode.get("operCer"));
operInfo.put("unoperCer", fireForceInfoByCode.get("unoperCer"));
operInfo.put("opertNum", fireForceInfoByCode.get("opertNum"));
operInfo.put("operAbs", fireForceInfoByCode.get("operAbs"));
personInfoList.add(operInfo);
bigScreen1VO.setPersonList(personInfoList);
List<Map<String, Object>> teamInfoList = new ArrayList<>();
HashMap<String, Object> teamInfoMap = new HashMap<>();
teamInfoMap.put("teamNum", teamCount);
teamInfoList.add(teamInfoMap);
bigScreen1VO.setTeamNumInfo(teamInfoList);
// bigScreen1VO.setTeamNum(teamCount);
// bigScreen1VO.setFirefightersInfo(fireForceInfoByCode);
return bigScreen1VO; return bigScreen1VO;
} }
} }
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