边界入侵,企业端代码
parent
82a173a6f3
commit
9a1ea011e3
|
@ -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));
|
||||||
|
|
|
@ -4,12 +4,15 @@ 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.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;
|
||||||
|
@ -55,6 +58,8 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictionariesService dictionariesService;
|
||||||
|
|
||||||
/**地图插点
|
/**地图插点
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -66,10 +71,40 @@ public class MapPlatFormElectronicController extends BaseController {
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
if ("bianjieruqin".equals(pd.getString("TYPE"))){
|
if ("bianjieruqin".equals(pd.getString("TYPE"))){
|
||||||
List<PageData> varList = platformvideomanagementService.listAll(pd); //列出Platformvideomanagement列表
|
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) {
|
for (PageData data : varList) {
|
||||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
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("varList", varList);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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