Compare commits

..

No commits in common. "8f5bbae95018d545eb2005bc8769794fdf260dcc" and "abe20ba36088c64638ef221fb2dcc747cff01cc2" have entirely different histories.

7 changed files with 6 additions and 81 deletions

View File

@ -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("5"); alarmGet.getPage().setSize("12");
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("9"); alarmGet.getPage().setSize("12");
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<>());

View File

@ -2,17 +2,13 @@ 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;
@ -23,9 +19,6 @@ public class MapPlatFormElectronicController extends BaseController {
@Autowired @Autowired
private PlatformelectronicService platformelectronicService; private PlatformelectronicService platformelectronicService;
@Autowired
private PlatformvideomanagementService platformvideomanagementService;
/** /**
* @throws Exception * @throws Exception
*/ */
@ -34,7 +27,8 @@ 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 = this.getPageData(); PageData pd = new PageData();
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);
@ -58,8 +52,6 @@ public class MapPlatFormElectronicController extends BaseController {
return map; return map;
} }
@Resource
private DictionariesService dictionariesService;
/** /**
* @throws Exception * @throws Exception
@ -69,46 +61,8 @@ 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 = this.getPageData(); PageData pd = new PageData();
if ("bianjieruqin".equals(pd.getString("TYPE"))){ pd = this.getPageData();
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) {

View File

@ -106,6 +106,4 @@ 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);
} }

View File

@ -10,7 +10,5 @@ public class AlarmGet {
private String status; private String status;
private String corpId; private String corpId;
private Page page; private Page page;
// 告警来源
private String sourceNum;
} }

View File

@ -151,5 +151,4 @@ 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;
} }

View File

@ -256,9 +256,4 @@ 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);
}
} }

View File

@ -266,23 +266,4 @@
#{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>