Compare commits
4 Commits
abe20ba360
...
8f5bbae950
Author | SHA1 | Date |
---|---|---|
|
8f5bbae950 | |
|
9d52c53c8d | |
|
9a1ea011e3 | |
|
82a173a6f3 |
|
@ -939,7 +939,7 @@ public class MapController extends BaseController {
|
||||||
AlarmGet alarmGet = new AlarmGet();
|
AlarmGet alarmGet = new AlarmGet();
|
||||||
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
||||||
alarmGet.getPage().setCurrent("1");
|
alarmGet.getPage().setCurrent("1");
|
||||||
alarmGet.getPage().setSize("12");
|
alarmGet.getPage().setSize("5");
|
||||||
alarmGet.setCorpId(pd.getString("corpId"));
|
alarmGet.setCorpId(pd.getString("corpId"));
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
map.put("alarmList", dwService.getAlarmList(alarmGet));
|
map.put("alarmList", dwService.getAlarmList(alarmGet));
|
||||||
|
@ -952,7 +952,7 @@ public class MapController extends BaseController {
|
||||||
AlarmGet alarmGet = new AlarmGet();
|
AlarmGet alarmGet = new AlarmGet();
|
||||||
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
|
||||||
alarmGet.getPage().setCurrent("1");
|
alarmGet.getPage().setCurrent("1");
|
||||||
alarmGet.getPage().setSize("12");
|
alarmGet.getPage().setSize("9");
|
||||||
alarmGet.setCorpId(pd.getString("corpId"));
|
alarmGet.setCorpId(pd.getString("corpId"));
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
map.put("alarmList", new ArrayList<>());
|
map.put("alarmList", new ArrayList<>());
|
||||||
|
|
|
@ -2,13 +2,17 @@ package com.zcloud.controller.map;
|
||||||
|
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.keyProjects.PlatformvideomanagementService;
|
||||||
import com.zcloud.service.map.util.HKPostUtil;
|
import com.zcloud.service.map.util.HKPostUtil;
|
||||||
|
import com.zcloud.service.system.DictionariesService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.zcloud.service.map.PlatformelectronicService;
|
import com.zcloud.service.map.PlatformelectronicService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -19,6 +23,9 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private PlatformelectronicService platformelectronicService;
|
private PlatformelectronicService platformelectronicService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PlatformvideomanagementService platformvideomanagementService;
|
||||||
|
|
||||||
/**总摄像头数
|
/**总摄像头数
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +34,7 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
public Object listAll() throws Exception{
|
public Object listAll() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = this.getPageData();
|
||||||
pd = this.getPageData();
|
|
||||||
Integer allForMap = platformelectronicService.countAllForMap(pd); //列出Platformelectronic列表
|
Integer allForMap = platformelectronicService.countAllForMap(pd); //列出Platformelectronic列表
|
||||||
map.put("allForMap", allForMap);
|
map.put("allForMap", allForMap);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -52,6 +58,8 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictionariesService dictionariesService;
|
||||||
|
|
||||||
/**地图插点
|
/**地图插点
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -61,8 +69,46 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
public Object listAllLocation() throws Exception{
|
public Object listAllLocation() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = new PageData();
|
PageData pd = this.getPageData();
|
||||||
pd = this.getPageData();
|
if ("bianjieruqin".equals(pd.getString("TYPE"))){
|
||||||
|
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID"))){
|
||||||
|
pd.put("CORPINFO_ID",pd.get("corpId"));
|
||||||
|
}
|
||||||
|
//列出Platformvideomanagement列表
|
||||||
|
PageData condition = new PageData();
|
||||||
|
List<PageData> varList = platformvideomanagementService.listAll(pd);
|
||||||
|
for (PageData data : varList) {
|
||||||
|
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||||
|
condition.clear();
|
||||||
|
condition.put("INDEXCODE",data.getString("INDEXCODE"));
|
||||||
|
//增加容错
|
||||||
|
List<PageData> list = platformelectronicService.listAll(condition);
|
||||||
|
if (list.size() > 0){
|
||||||
|
data.put("FANGQU_IDS",list.get(0).getString("FANGQU_IDS"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
condition.clear();
|
||||||
|
condition.put("PARENT_ID","f0bae7becdee4d779a2cb82037948ab4");
|
||||||
|
Map<String,List<PageData>> tongJi = new HashMap<>();
|
||||||
|
List<PageData> dic = dictionariesService.findByCondition(condition);
|
||||||
|
// 找出要统计的图标信息
|
||||||
|
for (PageData _dic : dic){
|
||||||
|
condition.clear();
|
||||||
|
condition.put("PARENT_ID",_dic.getString("DICTIONARIES_ID"));
|
||||||
|
List<PageData> dic2 = dictionariesService.findByCondition(condition);
|
||||||
|
for (PageData _dic2 : dic2){
|
||||||
|
_dic2.put("NAME",_dic.getString("NAME") + _dic2.getString("NAME"));
|
||||||
|
// 统计不同防区中的不同的
|
||||||
|
_dic2.put("num",varList.stream().filter(n -> n.getString("FANGQU_IDS").contains(_dic2.getString("DICTIONARIES_ID"))).count());
|
||||||
|
}
|
||||||
|
tongJi.put(_dic.getString("NAME"),dic2);
|
||||||
|
}
|
||||||
|
map.put("iconData",tongJi);
|
||||||
|
// 根据统计的数据
|
||||||
|
map.put("varList", varList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
pd.put("forMap","1");
|
pd.put("forMap","1");
|
||||||
List<PageData> varList = platformelectronicService.listAll(pd); //列出Platformelectronic列表
|
List<PageData> varList = platformelectronicService.listAll(pd); //列出Platformelectronic列表
|
||||||
for (PageData data : varList) {
|
for (PageData data : varList) {
|
||||||
|
|
|
@ -106,4 +106,6 @@ public interface DictionariesMapper {
|
||||||
*/
|
*/
|
||||||
List<PageData> getIdsByRecuByParentId(String parentId);
|
List<PageData> getIdsByRecuByParentId(String parentId);
|
||||||
List<PageData> getIdsByParentIds(List<String> parentIds);
|
List<PageData> getIdsByParentIds(List<String> parentIds);
|
||||||
|
|
||||||
|
List<PageData> findByCondition(PageData condition);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,7 @@ public class AlarmGet {
|
||||||
private String status;
|
private String status;
|
||||||
private String corpId;
|
private String corpId;
|
||||||
private Page page;
|
private Page page;
|
||||||
|
// 告警来源
|
||||||
|
private String sourceNum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,4 +151,5 @@ public interface DictionariesService {
|
||||||
*/
|
*/
|
||||||
public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception;
|
public List<PageData> getIdsByParentIds(List<String> parentIds) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> findByCondition(PageData condition) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,4 +256,9 @@ public class DictionariesServiceImpl implements DictionariesService {
|
||||||
return dictionariesMapper.getIdsByParentIds(parentIds);
|
return dictionariesMapper.getIdsByParentIds(parentIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> findByCondition(PageData condition) throws Exception {
|
||||||
|
return dictionariesMapper.findByCondition(condition);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,4 +266,23 @@
|
||||||
#{PARENT_ID}
|
#{PARENT_ID}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="findByCondition" resultType="com.zcloud.entity.PageData">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where ISDELETE = 0
|
||||||
|
<if test="BIANMA != null and BIANMA != ''">
|
||||||
|
and BIANMA = #{BIANMA}
|
||||||
|
</if>
|
||||||
|
<if test="NAME != null and NAME != ''">
|
||||||
|
and NAME = #{NAME}
|
||||||
|
</if>
|
||||||
|
<if test="PARENT_ID != null and PARENT_ID != ''">
|
||||||
|
and PARENT_ID = #{PARENT_ID}
|
||||||
|
</if>
|
||||||
|
<if test="DICTIONARIES_ID != null and DICTIONARIES_ID != ''">
|
||||||
|
and DICTIONARIES_ID = #{DICTIONARIES_ID}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue