地图代码
parent
8f1506cda4
commit
aa554a0f19
|
@ -26,8 +26,8 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Aspect
|
||||
//@Component
|
||||
//@Aspect
|
||||
public class DockingAspect {
|
||||
@Autowired
|
||||
private DockSendMessageService sendMessageService;
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
package com.zcloud.controller.anemometer;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.announcement.AnemometerMachineService;
|
||||
import com.zcloud.service.gatemachine.GateAreaService;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/anemometer")
|
||||
public class AnemometerController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private AnemometerMachineService anemometerMachineService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/page")
|
||||
public ReturnMap page(Page page) {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
page.setPd(pageData);
|
||||
List<PageData> data = anemometerMachineService.getDatalistpage(page);
|
||||
returnMap.put("varList", data);
|
||||
returnMap.put("page", page);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/anemometerList")
|
||||
public ReturnMap anemometerList(Page page) throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
List<PageData> data = anemometerMachineService.listAll(pageData);
|
||||
returnMap.put("varList", data);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getDetailByName")
|
||||
public ReturnMap getDetailById() throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pd = this.getPageData();
|
||||
PageData data = anemometerMachineService.getDetailById(pd);
|
||||
returnMap.put("varList", data);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/edit")
|
||||
public ReturnMap edit() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
anemometerMachineService.edit(pd);
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import com.zcloud.aspect.DockAnnotation;
|
|||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.fireresources.CzksFireResourcesService;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -24,7 +24,7 @@ import java.util.Map;
|
|||
public class FireResourcesController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CzksFireResourcesService fireResourcesService;
|
||||
private CmtFireResourcesService fireResourcesService;
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object page(Page page) {
|
||||
|
|
|
@ -45,6 +45,7 @@ public class GateVideoController extends BaseController {
|
|||
pd.put("GATEVIDEO_ID", this.get32UUID()); //主键
|
||||
pd.put("OPDATE", DateUtil.date2Str(new Date())); //操作日期
|
||||
pd.put("OPUSER", Jurisdiction.getUsername()); //操作人
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", "0"); //是否删除
|
||||
gateVideoService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
|
@ -156,9 +157,9 @@ public class GateVideoController extends BaseController {
|
|||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> videoList = gateVideoService.listAllForMap(pd); //根据ID读取
|
||||
map.put("videoList", videoList);
|
||||
map.put("varList", videoList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,434 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.czksbimap.CzksBiMapService;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import com.zcloud.service.gatemachine.GateMachineService;
|
||||
import com.zcloud.service.keyProjects.PlatformvideomanagementService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.HttpRequestUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/czks/map")
|
||||
public class CmtMapController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CzksBiMapService biMapService;
|
||||
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
|
||||
@Autowired
|
||||
private PlatformvideomanagementService platformvideomanagementService;
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
// @Autowired
|
||||
// private MeteorologicalinfoService meteorologicalinfoService;
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Autowired
|
||||
private CmtFireResourcesService fireResourcesService;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
@Autowired
|
||||
private GateMachineService gateMachineService;
|
||||
|
||||
|
||||
@RequestMapping("/getPointInfoADeviceByPid")
|
||||
@ResponseBody
|
||||
public Object getPointInfoADeviceByPid() {
|
||||
PageData pd = this.getPageData();
|
||||
PageData map = fireResourcesService.getPointInfoADeviceByPid(pd);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/getPointQualifiedPhotos")
|
||||
@ResponseBody
|
||||
public Object getPointQualifiedPhotos() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
map.put("result", "success");
|
||||
map.put("varList", fireResourcesService.getPointQualifiedPhotos(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 消防管控
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:30
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireControl")
|
||||
@ResponseBody
|
||||
public Object getFireControl() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
LinkedList<PageData> value = biMapService.getFireControl(pageData);
|
||||
for (PageData data : value) {
|
||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
}
|
||||
map.put("result", "success");
|
||||
map.put("varList", value);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 消防资源
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/26/026 17:36
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireResourceById")
|
||||
@ResponseBody
|
||||
public Object getFireResourceById() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pddata = this.getPageData();
|
||||
//获取当前人的公司id
|
||||
PageData pd = fireResourcesService.getDataById(pddata);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 消防救援队
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:30
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireRescueTeam")
|
||||
@ResponseBody
|
||||
public Object getFireRescueTeam() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
LinkedList<PageData> data = biMapService.getFireRescueTeam(pageData);
|
||||
map.put("result", "success");
|
||||
map.put("varList", data);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 气象信息对接接口
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
// @RequestMapping(value = "/tongMeteorologicalinfoList")
|
||||
// @ResponseBody
|
||||
// public ReturnMap tongMeteorologicalinfoList(@RequestBody List<PageData> list) throws Exception {
|
||||
// ReturnMap r = new ReturnMap();
|
||||
// r = meteorologicalinfoService.tongbuMeteorologicalinfo(list);
|
||||
// return r;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 闸机设备在线情况 只有人车闸机
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getOnlineGateEquipment")
|
||||
@ResponseBody
|
||||
public ReturnMap getOnlineGateEquipment() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
PageData value = gateMachineService.getOnlineGateMachine(pageData);
|
||||
returnMap.put("pd", value);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 闸机位置
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
// @RequestMapping("/getGatePosition")
|
||||
// @ResponseBody
|
||||
// public ReturnMap getGatePosition() {
|
||||
// ReturnMap returnMap = new ReturnMap();
|
||||
// PageData pageData = this.getPageData();
|
||||
// //
|
||||
// List<PageData> value = gateMachineService.getGatePosition(pageData);
|
||||
// // 添加标点上的统一的title
|
||||
// for (PageData data : value) {
|
||||
// if (Tools.notEmpty(data.getString("GATE_AREA_NAME"))) {
|
||||
// data.put("MAP_POINT_NAME", data.getString("GATE_AREA_NAME"));
|
||||
// } else {
|
||||
// data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
// }
|
||||
// }
|
||||
// returnMap.put("varList", value);
|
||||
// return returnMap;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 口门进出记录列表
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getDoorWayRecords")
|
||||
@ResponseBody
|
||||
public ReturnMap getDoorWayRecords(Page page) {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
page.setPd(pageData);
|
||||
if ("0".equals(pageData.getString("INDEX"))) {
|
||||
// 人
|
||||
List<PageData> value = biMapService.getDoorWayPeopleRecords(page);
|
||||
returnMap.put("varList", value);
|
||||
return returnMap;
|
||||
} else {
|
||||
// 车
|
||||
List<PageData> value = biMapService.getDoorWayCarRecords(page);
|
||||
returnMap.put("varList", value);
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 闸机进出车、人的数量
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getGatesInAndOutNumById")
|
||||
@ResponseBody
|
||||
public ReturnMap getGatesInAndOutNumById() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
Map<String, Object> data = biMapService.getGatesInAndOutNumById(pageData);
|
||||
returnMap.put("pd", data);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员进出记录列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getGatesInAndOutListById")
|
||||
@ResponseBody
|
||||
public ReturnMap getGatesInAndOutListById(Page page) {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pd = this.getPageData();
|
||||
page.setPd(pd);
|
||||
List<PageData> recordAllList = gateMachineService.getPersonRecordListAllByEId(page);
|
||||
returnMap.put("recordAllList", recordAllList);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/fireResource/list")
|
||||
@ResponseBody
|
||||
public Object page(Page page) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
//获取当前人的公司id
|
||||
page.setPd(pd);
|
||||
|
||||
List<PageData> varList = fireResourcesService.datalistPage(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/fireDevice/listByMap")
|
||||
@ResponseBody
|
||||
public Object devicelistByMap(Page page) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
String corpinfoId = Jurisdiction.getCORPINFO_ID();
|
||||
pd.put("CORPINFO_ID", corpinfoId);
|
||||
|
||||
//获取当前人的公司id
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = fireResourcesService.devicelistPage(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员、车辆进出记录
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getPerpleCarGateMachineCount")
|
||||
@ResponseBody
|
||||
public Object getPerpleCarGateMachineCount() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getMachineTodayInOutCount")
|
||||
@ResponseBody
|
||||
public Object getMachineTodayInOutCount() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> value = gateMachineService.getTodayInOutCount(pd);
|
||||
map.put("varList", value);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/getGatePosition")
|
||||
@ResponseBody
|
||||
public ReturnMap getCzksGatePosition() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
//
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> value = gateMachineService.getGatePosition(pageData);
|
||||
// 添加标点上的统一的title
|
||||
for (PageData data : value) {
|
||||
if (Tools.notEmpty(data.getString("GATE_AREA_NAME"))) {
|
||||
data.put("MAP_POINT_NAME", data.getString("GATE_AREA_NAME"));
|
||||
} else {
|
||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
}
|
||||
}
|
||||
returnMap.put("varList", value);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 获取摄像头定位
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/6/006 11:15
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping(value = "/getCameraPositioning")
|
||||
@ResponseBody
|
||||
public Object getCameraPositioning() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> dataList = platformvideomanagementService.listAllForMap(pageData);
|
||||
returnMap.put("varList",dataList);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 沧州矿石人员定位结束 定位基础信息
|
||||
*/
|
||||
/**
|
||||
* 获取人员、车辆进出记录
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getCurrentLocationOnline")
|
||||
@ResponseBody
|
||||
public Object getCurrentLocationOnline() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
// 获取人员定位信息 根据定位卡(身份证)编码
|
||||
@RequestMapping(value = "/getPersonByCardNo")
|
||||
@ResponseBody
|
||||
public Object getPersonByCardNo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
PageData value = usersService.getPersonByCardNo(pd);
|
||||
map.put("result", "success");
|
||||
map.put("pd", value);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取摄像头播放路径(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHlsPath")
|
||||
@ResponseBody
|
||||
public Object getHlsPath() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员在线及统计数据(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCurrentPersonnelData")
|
||||
@ResponseBody
|
||||
public Object getCurrentPersonnelData() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/getUserMapInfo")
|
||||
@ResponseBody
|
||||
public ReturnMap getUserMapInfo() throws Exception {
|
||||
PageData pd = this.getPageData();
|
||||
pd = usersService.findByCardNo(pd); //列出HotWorkApplicationDelayed列表
|
||||
ReturnMap r = ReturnMap.ok();
|
||||
r.put("pd", pd);
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,185 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.czksbimap.CzksMapEightService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作内容
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/czks/map/Eight")
|
||||
public class CmtMapEightController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CzksMapEightService mapEightService;
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getEcharts")
|
||||
@ResponseBody
|
||||
public Object getEcharts() throws Exception {
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
return mapEightService.getEchartsOrder(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 可视化首页统计数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/findFormCount")
|
||||
@ResponseBody
|
||||
public Object findFormCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
PageData data = mapEightService.statisticsHighRiskWorkByStateOrder(pd);
|
||||
map.put("pd", data);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 作业实时情况展示(最新18条)
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listHighRiskWork")
|
||||
@ResponseBody
|
||||
public Object listHighRiskWork(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = mapEightService.listHighRiskWorkOrder(page);
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有高危作业的位置坐标(有坐标数据)
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listAllHighRiskWorkLocation")
|
||||
@ResponseBody
|
||||
public Object listAllHighRiskWorkLocation() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
List<PageData> varList;
|
||||
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6", pd.getString("CORPINFO_ID"))) { //一公司
|
||||
varList = mapEightService.listAllHighRiskWorkLocation(pd);
|
||||
} else {
|
||||
varList = mapEightService.listAllHighRiskWorkLocationOrder(pd);
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id以及类型获取数据 一公司
|
||||
*
|
||||
* @param id 数据id
|
||||
* @param type 数据类型 动火 等等
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getById")
|
||||
@ResponseBody
|
||||
public Object getById(@RequestParam(value = "id") String id, @RequestParam("TYPE") String type) throws Exception {
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
return mapEightService.getById(pd);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id以及类型获取数据 其他公司
|
||||
*
|
||||
* @param id 数据id
|
||||
* @param type 数据类型 动火 等等
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getByIdOrder")
|
||||
@ResponseBody
|
||||
public Object getByIdOrder(@RequestParam(value = "id") String id, @RequestParam("TYPE") String type) throws Exception {
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
return mapEightService.getByIdOrder(pd);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
List<PageData> varList = mapEightService.listAll(pd); //列出HotWorkApplicationDelayed列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动火防护措施
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listAllMeasures")
|
||||
@ResponseBody
|
||||
public Object listAllMeasures() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
|
||||
List<PageData> varList = mapEightService.listAllMeasures(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -5,19 +5,25 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.gatemachine.GateAreaMapper;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import com.zcloud.service.gatemachine.GateCarMachineInfoService;
|
||||
import com.zcloud.service.gatemachine.GateMachineInfoService;
|
||||
import com.zcloud.service.gatemachine.GateMachineService;
|
||||
import com.zcloud.service.gatemachine.GateVideoService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.map.BiMapService;
|
||||
import com.zcloud.service.map.MapService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.hk.HKUtil;
|
||||
import com.zcloud.util.ys.YSUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
@ -34,12 +40,14 @@ import java.util.*;
|
|||
@RequestMapping("/map")
|
||||
public class MapController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BiMapService biMapService;
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
|
||||
@Autowired
|
||||
private CmtFireResourcesService fireResourcesService;
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
|
@ -70,6 +78,8 @@ public class MapController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private GateCarMachineInfoService gateCarMachineInfoService;
|
||||
@Autowired
|
||||
private GateVideoService gateVideoService;
|
||||
|
||||
|
||||
|
||||
|
@ -218,7 +228,7 @@ public class MapController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/getGatePositionCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getGatePositionCount() {
|
||||
public ReturnMap getGatePositionCount() throws Exception {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData data = new PageData();
|
||||
PageData pageData = this.getPageData();
|
||||
|
@ -230,6 +240,10 @@ public class MapController extends BaseController {
|
|||
pageData.put("GATE_AREA_TYPE", 1);
|
||||
List<PageData> carMachine = gateAreaMapper.getGatePosition(pageData);
|
||||
data.put("carMachineCount", carMachine.size());
|
||||
//摄像头数
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> camera = gateVideoService.listAllForMap(pageData);
|
||||
data.put("cameraCount", camera.size());
|
||||
returnMap.put("data", data);
|
||||
return returnMap;
|
||||
}
|
||||
|
@ -408,4 +422,62 @@ public class MapController extends BaseController {
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 消防管控
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:30
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireControl")
|
||||
@ResponseBody
|
||||
public Object getFireControl() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
LinkedList<PageData> value = biMapService.getFireControl(pageData);
|
||||
for (PageData data : value) {
|
||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
}
|
||||
map.put("result", "success");
|
||||
map.put("varList", value);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 消防资源
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/26/026 17:36
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireResourceById")
|
||||
@ResponseBody
|
||||
public Object getFireResourceById() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pddata = this.getPageData();
|
||||
//获取当前人的公司id
|
||||
PageData pd = fireResourcesService.getDataById(pddata);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 消防救援队
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:30
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getFireRescueTeam")
|
||||
@ResponseBody
|
||||
public Object getFireRescueTeam() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
LinkedList<PageData> data = biMapService.getFireRescueTeam(pageData);
|
||||
map.put("result", "success");
|
||||
map.put("varList", data);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,217 @@
|
|||
package com.zcloud.controller.videoreceive;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.receive.VideoReceiveService;
|
||||
import com.zcloud.util.ys.YSUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:特种设备安全巡检管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-06-19
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/videoreceive")
|
||||
public class VideoReceiveController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private VideoReceiveService videoReceiveService;
|
||||
@Autowired
|
||||
private YSUtil ysUtil;
|
||||
|
||||
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listAll")
|
||||
@ResponseBody
|
||||
public Object listAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = videoReceiveService.listAll(pd); //列出Platformvideomanagement列表
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/findVideo")
|
||||
@ResponseBody
|
||||
public Object findVideo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
pd.put("ResCode",pd.getString("org"));
|
||||
PageData videoByResCode = videoReceiveService.findVideoByResCode(pd);
|
||||
map.put("pd",videoByResCode);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/platformList")
|
||||
@ResponseBody
|
||||
public Object platformList() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd =this.getPageData();
|
||||
JSONObject area = ysUtil.queryAreaList(pd);
|
||||
JSONObject areaResult = (JSONObject) area.get("Result");
|
||||
Map resultMap = areaResult.toJavaObject(Map.class);
|
||||
List<PageData> list = JSONArray.parseArray(resultMap.get("InfoList").toString(), PageData.class);
|
||||
ArrayList<PageData> arrayList = new ArrayList<>();
|
||||
list.forEach(areaPd -> {
|
||||
JSONObject resItemV1 = (JSONObject) areaPd.get("ResItemV1");
|
||||
Map map1 = JSONObject.parseObject(resItemV1.toString(), Map.class);
|
||||
PageData data = new PageData();
|
||||
data.putAll(map1);
|
||||
arrayList.add(data);
|
||||
});
|
||||
|
||||
arrayList.forEach(pageData -> {
|
||||
String resCode = pageData.getString("ResCode");
|
||||
PageData condition = new PageData();
|
||||
condition.put("org", resCode);
|
||||
try {
|
||||
//查询是否有下一级区域
|
||||
JSONObject jsonObject1 = ysUtil.queryAreaList(condition);
|
||||
JSONObject result = (JSONObject) jsonObject1.get("Result");
|
||||
Map results = result.toJavaObject(Map.class);
|
||||
List<PageData> nextList = JSONArray.parseArray(results.get("InfoList").toString(), PageData.class);
|
||||
if (nextList.size()>0) {
|
||||
pageData.put("hasChildren",true);
|
||||
}
|
||||
//查询下一级是否有摄像头
|
||||
JSONObject cameraObject = ysUtil.queryCameraList(condition);
|
||||
JSONObject cameraResult = (JSONObject) cameraObject.get("Result");
|
||||
Map cameraMap = cameraResult.toJavaObject(Map.class);
|
||||
List<PageData> cameraList = JSONArray.parseArray(cameraMap.get("InfoList").toString(), PageData.class);
|
||||
if (cameraList.size()>0) {
|
||||
pageData.put("hasChildren",true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
//查询当前级摄像头数据
|
||||
JSONObject cameraObject = ysUtil.queryCameraList(pd);
|
||||
JSONObject cameraResult = (JSONObject) cameraObject.get("Result");
|
||||
Map cameraMap = cameraResult.toJavaObject(Map.class);
|
||||
List<PageData> cameraList = JSONArray.parseArray(cameraMap.get("InfoList").toString(), PageData.class);
|
||||
cameraList.forEach(cameraPd -> {
|
||||
JSONObject resItemV1 = (JSONObject) cameraPd.get("ResItemV1");
|
||||
Map map1 = JSONObject.parseObject(resItemV1.toString(), Map.class);
|
||||
PageData data = new PageData();
|
||||
data.putAll(map1);
|
||||
arrayList.add(data);
|
||||
});
|
||||
map.put("varList",arrayList);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("VIDEORECEIVE_ID", this.get32UUID()); //主键
|
||||
videoReceiveService.save(pd);
|
||||
map.put("pd",pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/savePosition")
|
||||
@ResponseBody
|
||||
public Object savePosition() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ISDELETE","0");
|
||||
if(pd.get("VIDEORECEIVE_ID") != null){
|
||||
videoReceiveService.edit(pd);
|
||||
}else{
|
||||
pd.put("VIDEORECEIVE_ID", this.get32UUID()); //主键
|
||||
videoReceiveService.save(pd);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delLocation")
|
||||
@ResponseBody
|
||||
public Object delLocation() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
videoReceiveService.delLocation(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/deleteVideo")
|
||||
@ResponseBody
|
||||
public Object deleteVideo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
videoReceiveService.deleteVideo(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value="/listAllCameraForMap")
|
||||
@ResponseBody
|
||||
public Object listAllCameraForMap() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
return videoReceiveService.listAllForMap(pd);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/getHlsPath")
|
||||
@ResponseBody
|
||||
public Object getHlsPath() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.zcloud.mapper.datasource.anemometer;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:35
|
||||
*/
|
||||
public interface AnemometerLocalMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void add(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**风速仪名称查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> findByName(PageData pd)throws Exception;
|
||||
|
||||
/**批量插入
|
||||
* @param listPd
|
||||
* @throws Exception
|
||||
*/
|
||||
void BatchinsertInfo(List<PageData> listPd);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.zcloud.mapper.datasource.anemometer;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:35
|
||||
*/
|
||||
public interface AnemometerMachineMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void add(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**风速仪名称查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> findByName(PageData pd)throws Exception;
|
||||
|
||||
/**批量插入
|
||||
* @param listPd
|
||||
* @throws Exception
|
||||
*/
|
||||
void BatchinsertInfo(List<PageData> listPd);
|
||||
|
||||
List<PageData> getDatalistPage(Page page);
|
||||
|
||||
PageData getDetailById(PageData pd);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface BiMapMapper {
|
||||
List<PageData> getCarRecordslistPage(Page page);
|
||||
|
||||
List<PageData> getPeopleRecordslistPage(Page page);
|
||||
|
||||
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
|
||||
|
||||
// 统计今日人员刷卡数据
|
||||
PageData statisticsCardUserCount(PageData pd);
|
||||
// 统计今日临时人员刷卡数据
|
||||
PageData statisticsOutsiderCount(PageData pd);
|
||||
|
||||
PageData getRiskIdentificationCount(PageData pageData);
|
||||
|
||||
PageData listbymeteorological(PageData pd);
|
||||
|
||||
// 部门把自己 -1
|
||||
PageData getPersonPositioningCount(PageData pageData);
|
||||
|
||||
List<PageData> getRiskIndex(PageData pageData);
|
||||
|
||||
List<PageData> inAndoutPeoCarToday(PageData pageData);
|
||||
}
|
|
@ -8,7 +8,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CzksFireResourcesMapper {
|
||||
public interface CmtFireResourcesMapper {
|
||||
/**新增
|
||||
* @param pd
|
||||
*/
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.service.announcement;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风速仪
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:39
|
||||
*/
|
||||
public interface AnemometerLocalService {
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void add(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**风速仪名称查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> findByName(PageData pd)throws Exception;
|
||||
|
||||
/**批量插入
|
||||
* @param listPd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void BatchinsertInfo(List<PageData> listPd);
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.zcloud.service.announcement;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风速仪
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:39
|
||||
*/
|
||||
public interface AnemometerMachineService {
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void add(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**风速仪名称查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> findByName(PageData pd)throws Exception;
|
||||
|
||||
/**批量插入
|
||||
* @param listPd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void BatchinsertInfo(List<PageData> listPd);
|
||||
|
||||
public List<PageData> getDatalistpage(Page page);
|
||||
|
||||
public PageData getDetailById(PageData pd);
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.zcloud.service.announcement.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper;
|
||||
import com.zcloud.service.announcement.AnemometerLocalService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风速仪
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:39
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class AnemometerLocalServiceImpl implements AnemometerLocalService {
|
||||
|
||||
@Autowired
|
||||
private AnemometerLocalMapper anemometerLocalMapper;
|
||||
|
||||
@Override
|
||||
public void add(PageData pd) throws Exception {
|
||||
anemometerLocalMapper.add(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) throws Exception {
|
||||
anemometerLocalMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) throws Exception {
|
||||
return anemometerLocalMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByName(PageData pd) throws Exception {
|
||||
return anemometerLocalMapper.findByName(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void BatchinsertInfo(List<PageData> listPd) {
|
||||
anemometerLocalMapper.BatchinsertInfo(listPd);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.service.announcement.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper;
|
||||
import com.zcloud.mapper.datasource.anemometer.AnemometerMachineMapper;
|
||||
import com.zcloud.service.announcement.AnemometerMachineService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风速仪
|
||||
* @author zy
|
||||
* @date 2024/1/16 19:39
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class AnemometerMachineServiceImpl implements AnemometerMachineService {
|
||||
|
||||
@Autowired
|
||||
private AnemometerMachineMapper anemometerMachineMapper;
|
||||
|
||||
@Override
|
||||
public void add(PageData pd) throws Exception {
|
||||
anemometerMachineMapper.add(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) throws Exception {
|
||||
anemometerMachineMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) throws Exception {
|
||||
return anemometerMachineMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByName(PageData pd) throws Exception {
|
||||
return anemometerMachineMapper.findByName(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void BatchinsertInfo(List<PageData> listPd) {
|
||||
anemometerMachineMapper.BatchinsertInfo(listPd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getDatalistpage(Page page) {
|
||||
return anemometerMachineMapper.getDatalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getDetailById(PageData pd) {
|
||||
return anemometerMachineMapper.getDetailById(pd);
|
||||
}
|
||||
}
|
|
@ -5,8 +5,8 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||
import com.zcloud.mapper.datasource.czksbimap.CzksBiMapMapper;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CzksFireResourcesMapper;
|
||||
import com.zcloud.mapper.datasource.keyProjects.PlatformvideomanagementMapper;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CmtFireResourcesMapper;
|
||||
import com.zcloud.service.czksbimap.CzksBiMapService;
|
||||
import com.zcloud.util.czksBiMapFactory.AbsCzksFireSourcesHandel;
|
||||
import com.zcloud.util.czksBiMapFactory.CzksAssemblyBeanFactory;
|
||||
|
@ -32,7 +32,7 @@ public class CzksBiMapServiceImpl implements CzksBiMapService {
|
|||
private CzksBiMapMapper czksBiMapper;
|
||||
|
||||
@Resource
|
||||
private CzksFireResourcesMapper czksfireResourcesMapper;
|
||||
private CmtFireResourcesMapper czksfireResourcesMapper;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
@Value("${perLoc.url}")
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
|||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
public interface CzksFireResourcesService {
|
||||
public interface CmtFireResourcesService {
|
||||
/**新增
|
||||
* @param pd
|
||||
*/
|
|
@ -2,9 +2,9 @@ package com.zcloud.service.fireresources.impl;
|
|||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CzksFireResourcesMapper;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CmtFireResourcesMapper;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.fireresources.CzksFireResourcesService;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -15,9 +15,9 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CzksFireResourcesServiceImpl implements CzksFireResourcesService {
|
||||
public class CmtFireResourcesServiceImpl implements CmtFireResourcesService {
|
||||
@Resource
|
||||
public CzksFireResourcesMapper czksfireResourcesMapper;
|
||||
public CmtFireResourcesMapper czksfireResourcesMapper;
|
||||
@Resource
|
||||
private ImgFilesService imgFilesService;
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.FireResourcesMapper;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防资源添加数据抽象类
|
||||
* @author dearLin
|
||||
*/
|
||||
public abstract class AbsFireSourcesHandel implements InitializingBean {
|
||||
|
||||
|
||||
@Resource
|
||||
public FireResourcesMapper fireResourcesMapper;
|
||||
@Resource
|
||||
public CmtFireResourcesService fireResourcesService;
|
||||
|
||||
|
||||
// 组装数据
|
||||
/**
|
||||
* @Description: 组装数据 方法
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 14:42
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public class AssemblyBeanFactory {
|
||||
|
||||
private static Map<String, AbsFireSourcesHandel> strategyMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* @Description: 获取组装数据工厂类
|
||||
* xfsy01 消防水源
|
||||
* xfbf01 消防泵房
|
||||
* xfjyd01 防救援队
|
||||
* xfkzs01 消防控制室
|
||||
*/
|
||||
public static AbsFireSourcesHandel getInvokeStrategy(String type) {
|
||||
return strategyMap.get(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 注册组装数据工厂类
|
||||
* xfsy01 消防水源
|
||||
* xfbf01 消防泵房
|
||||
* xfjyd01 防救援队
|
||||
* xfkzs01 消防控制室
|
||||
*/
|
||||
public static void register(String type, AbsFireSourcesHandel handler) {
|
||||
if (StringUtils.isEmpty(type) && handler == null) {
|
||||
return;
|
||||
}
|
||||
strategyMap.put(type, handler);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端Bi页map数据
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface BiMapService {
|
||||
|
||||
List<PageData> getDoorWayPeopleRecords(Page page);
|
||||
|
||||
List<PageData> getDoorWayCarRecords(Page page);
|
||||
|
||||
PageData getRiskIdentificationCount(PageData pageData);
|
||||
|
||||
public PageData listbymeteorological(PageData pd)throws Exception;
|
||||
|
||||
List<String> getCorpinfoIds(PageData pd);
|
||||
|
||||
|
||||
PageData getPersonPositioningCount(PageData pageData);
|
||||
|
||||
List<PageData> getRiskIndex(PageData pageData);
|
||||
|
||||
Object inAndoutPeoCarToday(PageData pageData);
|
||||
|
||||
LinkedList<PageData> getFireControl(PageData pageData) throws Exception;
|
||||
|
||||
LinkedList<PageData> getFireRescueTeam(PageData pageData);
|
||||
|
||||
PageData getGatesInAndOutNumById(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||
import com.zcloud.mapper.datasource.map.BiMapMapper;
|
||||
import com.zcloud.mapper.dsno2.keyProjects.VideoManagerMapper;
|
||||
import com.zcloud.mapper.dsno2.map.FireResourcesMapper;
|
||||
import com.zcloud.service.gatemachine.GateMachineService;
|
||||
import com.zcloud.service.map.AbsFireSourcesHandel;
|
||||
import com.zcloud.service.map.AssemblyBeanFactory;
|
||||
import com.zcloud.service.map.BiMapService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
public class BiMapServiceImpl implements BiMapService {
|
||||
|
||||
@Resource
|
||||
private BiMapMapper biMapMapper;
|
||||
|
||||
@Resource
|
||||
private FireResourcesMapper fireResourcesMapper;
|
||||
@Resource
|
||||
private GateMachineService gateMachineService;
|
||||
@Resource
|
||||
private VideoManagerMapper videoManagerMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 人记录
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/18/018 10:18
|
||||
* @Param: [com.zcloud.entity.Page] [page]
|
||||
* @Return: java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getDoorWayPeopleRecords(Page page) {
|
||||
return biMapMapper.getPeopleRecordslistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 车记录
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/18/018 10:18
|
||||
* @Param: [com.zcloud.entity.Page] [page]
|
||||
* @Return: java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getDoorWayCarRecords(Page page) {
|
||||
return biMapMapper.getCarRecordslistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getRiskIdentificationCount(PageData pageData) {
|
||||
return biMapMapper.getRiskIdentificationCount(pageData);
|
||||
// bus_riskunit
|
||||
// bus_identificationparts
|
||||
}
|
||||
|
||||
|
||||
public PageData listbymeteorological(PageData pd) throws Exception {
|
||||
return biMapMapper.listbymeteorological(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getCorpinfoIds(PageData pd) {
|
||||
String area = pd.getString("AREA");
|
||||
if (StringUtils.isNotBlank(area)) {
|
||||
String[] ArrayDATA_IDS = area.split(",");
|
||||
return biMapMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
String gangkou = pd.getString("GANGKOU");
|
||||
if (StringUtils.equals("00003", gangkou)) {
|
||||
String[] ArrayDATA_IDS = new String[]{"1", "2"};
|
||||
return biMapMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getPersonPositioningCount(PageData pageData) {
|
||||
return biMapMapper.getPersonPositioningCount(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getRiskIndex(PageData pageData) {
|
||||
return biMapMapper.getRiskIndex(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> inAndoutPeoCarToday(PageData pageData) {
|
||||
return biMapMapper.inAndoutPeoCarToday(pageData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 不一定用
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 16:42
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> getFireControl(PageData pageData) throws Exception {
|
||||
// GANGKOU 00003 秦皇岛岗
|
||||
// AREA 区域
|
||||
// CORPINFO_ID 区域
|
||||
|
||||
String area = pageData.getString("AREA");
|
||||
List<String> corpinfoIds = null;
|
||||
if (StringUtils.isNotBlank(area)) {
|
||||
String[] ArrayDATA_IDS = area.split(",");
|
||||
corpinfoIds = corpInfoMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
} else {
|
||||
String gangkou = pageData.getString("GANGKOU");
|
||||
if (StringUtils.equals("00003", gangkou)) {
|
||||
String[] ArrayDATA_IDS = new String[]{"1", "2"};
|
||||
corpinfoIds = corpInfoMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
}
|
||||
if (corpinfoIds != null && corpinfoIds.size() > 0) {
|
||||
if (Tools.isEmpty(pageData.getString("CORPINFO_ID"))) {
|
||||
pageData.put("list", corpinfoIds);
|
||||
}
|
||||
}
|
||||
String fireresourcesType = pageData.getString("TYPE");
|
||||
// 目前没有消防点位
|
||||
AbsFireSourcesHandel invokeStrategy = AssemblyBeanFactory.getInvokeStrategy(fireresourcesType);
|
||||
if (invokeStrategy != null) {
|
||||
return invokeStrategy.assemblyDataHandel(pageData);
|
||||
}
|
||||
|
||||
return new LinkedList<>();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LinkedList<PageData> getFireRescueTeam(PageData pageData) {
|
||||
return fireResourcesMapper.getRescueTeamDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getGatesInAndOutNumById(PageData pageData) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.announcement.AnemometerLocalService;
|
||||
import com.zcloud.service.announcement.AnemometerMachineService;
|
||||
import com.zcloud.service.announcement.AnemometerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class SaveAnemometerInfo {
|
||||
@Autowired
|
||||
private AnemometerService anemometerService;
|
||||
@Autowired
|
||||
private AnemometerLocalService anemometerLocalService;
|
||||
@Autowired
|
||||
private AnemometerMachineService anemometerMachineService;
|
||||
|
||||
// @Scheduled(cron ="*/5 * * * * ? ")
|
||||
public void scheduled() throws Exception{
|
||||
//存储车辆进出记录信息
|
||||
saveAnemometerInfo();
|
||||
}
|
||||
|
||||
public void saveAnemometerInfo() throws Exception{
|
||||
PageData pageData = new PageData();
|
||||
//访问对接数据库获取风速仪数据
|
||||
List<PageData> anemometerList = anemometerService.listAll(pageData);
|
||||
//查询本地风速仪
|
||||
List<PageData> anemometerMachineList = anemometerMachineService.listAll(pageData);
|
||||
Map<String, String> anemometerMachineMap = new HashMap<>();
|
||||
//将本地有的风速仪名称存入Map
|
||||
anemometerMachineList.forEach(anemometerMachine -> {
|
||||
anemometerMachineMap.put(anemometerMachine.getString("FID"), "FNAME");
|
||||
});
|
||||
anemometerList.forEach(anemometer -> {
|
||||
anemometer.put("FLID",UuidUtil.get32UUID());
|
||||
String ftime = anemometer.getString("FTIME");
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date date = simpleDateFormat.parse(ftime);
|
||||
anemometer.put("FTIME",simpleDateFormat.format(date));
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//判断获取的风速仪在本地是否存在
|
||||
if (!anemometerMachineMap.containsKey(anemometer.getString("FNAME"))) {
|
||||
//如果不存在,则保存该风速仪
|
||||
anemometer.put("FID",anemometer.getString("FNAME"));
|
||||
try {
|
||||
anemometerMachineService.add(anemometer);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
//保存获取的风速数据到本地
|
||||
anemometerLocalService.BatchinsertInfo(anemometerList);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,236 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.gatemachine.GateCarMachineInfoService;
|
||||
import com.zcloud.service.gatemachine.GateMachineInfoService;
|
||||
import com.zcloud.util.hk.HKUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
public class SaveMachineInfo {
|
||||
@Autowired
|
||||
private GateMachineInfoService gateMachineInfoService;
|
||||
@Autowired
|
||||
private GateCarMachineInfoService gateCarMachineInfoService;
|
||||
|
||||
@Scheduled(cron ="*/30 * * * * ? ")
|
||||
public void scheduled() {
|
||||
//存储人员进出记录信息
|
||||
savePersonMachineInfo();
|
||||
//存储车辆进出记录信息
|
||||
saveCarMachineInfo();
|
||||
}
|
||||
|
||||
public void saveCarMachineInfo() {
|
||||
List<PageData> all = gateCarMachineInfoService.findAll();
|
||||
if (all.size() > 0) {
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
String fendDate = dft.format(new Date())+"+08:00";
|
||||
String fstartDate = "";
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.SECOND, -30);
|
||||
Date before = now.getTime();
|
||||
fstartDate = dft.format(before)+"+08:00";
|
||||
int pageNo = 1; //第几页
|
||||
int pageSize = 100; //一页查询多少条
|
||||
Map<String, Object> carDoorComeAndOutInfo = HKUtil.getCarDoorComeAndOutInfo(null, Integer.toString(pageNo), Integer.toString(pageSize), fstartDate, fendDate);
|
||||
JSONObject data = (JSONObject)carDoorComeAndOutInfo.get("data");
|
||||
List<PageData> firstInfoList = getCarInfoList(data);
|
||||
if (firstInfoList.size() > 0) {
|
||||
gateCarMachineInfoService.BatchinsertInfo(firstInfoList);
|
||||
}
|
||||
int total = Integer.parseInt(data.getString("total"));
|
||||
int qvyu = total%pageSize;
|
||||
//判断是否有下一页,如果有继续请求并且插入
|
||||
int totalPage = 0;
|
||||
if (qvyu!=0){
|
||||
totalPage = total/pageSize + 1;
|
||||
}else {
|
||||
totalPage = total/pageSize;
|
||||
}
|
||||
|
||||
if (totalPage>1){
|
||||
for (int i=2;i<=totalPage;i++){
|
||||
pageNo = i;
|
||||
Map<String, Object> nextDoorComeAndOutInfo = HKUtil.getCarDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject nextData = (JSONObject)nextDoorComeAndOutInfo.get("data");
|
||||
List<PageData> nextInfoList = getCarInfoList(nextData);
|
||||
if (nextInfoList.size() > 0) {
|
||||
gateCarMachineInfoService.BatchinsertInfo(nextInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
InitSaveCarDoorComeAndOutInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public void savePersonMachineInfo(){
|
||||
List<PageData> all = gateMachineInfoService.findAll();
|
||||
if (all.size() > 0) {
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
String fendDate = dft.format(new Date())+"+08:00";
|
||||
String fstartDate = "";
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.SECOND, -30);
|
||||
Date before = now.getTime();
|
||||
fstartDate = dft.format(before)+"+08:00";
|
||||
int pageNo = 1; //第几页
|
||||
int pageSize = 100; //一页查询多少条
|
||||
Map<String, Object> doorComeAndOutInfo = HKUtil.getDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject data = (JSONObject)doorComeAndOutInfo.get("data");
|
||||
List<PageData> infoList = getInfoList(data);
|
||||
if (infoList.size()>0) {
|
||||
gateMachineInfoService.BatchinsertInfo(infoList);
|
||||
}
|
||||
//判断是否有下一页,如果有继续请求并且插入
|
||||
int totalPage = Integer.parseInt(data.getString("totalPage"));
|
||||
if (totalPage>1){
|
||||
for (int i=2;i<=totalPage;i++){
|
||||
pageNo = i;
|
||||
Map<String, Object> nextDoorComeAndOutInfo = HKUtil.getDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject nextData = (JSONObject)nextDoorComeAndOutInfo.get("data");
|
||||
List<PageData> nextInfoList = getInfoList(nextData);
|
||||
if (nextInfoList.size()>0) {
|
||||
gateMachineInfoService.BatchinsertInfo(nextInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
InitDoorComeAndOutInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public void InitSaveCarDoorComeAndOutInfo(){
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
String fendDate = dft.format(new Date())+"+08:00";
|
||||
String fstartDate = "";
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.DATE, -1);
|
||||
Date before = now.getTime();
|
||||
fstartDate = dft.format(before)+"+08:00";
|
||||
int pageNo = 1; //第几页
|
||||
int pageSize = 100; //一页查询多少条
|
||||
Map<String, Object> carDoorComeAndOutInfo = HKUtil.getCarDoorComeAndOutInfo(null, Integer.toString(pageNo), Integer.toString(pageSize), fstartDate, fendDate);
|
||||
JSONObject data = (JSONObject)carDoorComeAndOutInfo.get("data");
|
||||
List<PageData> firstInfoList = getCarInfoList(data);
|
||||
if (firstInfoList.size() > 0) {
|
||||
gateCarMachineInfoService.BatchinsertInfo(firstInfoList);
|
||||
}
|
||||
int total = Integer.parseInt(data.getString("total"));
|
||||
int qvyu = total%pageSize;
|
||||
//判断是否有下一页,如果有继续请求并且插入
|
||||
int totalPage = 0;
|
||||
if (qvyu!=0){
|
||||
totalPage = total/pageSize + 1;
|
||||
}else {
|
||||
totalPage = total/pageSize;
|
||||
}
|
||||
|
||||
if (totalPage>1){
|
||||
for (int i=2;i<=totalPage;i++){
|
||||
pageNo = i;
|
||||
Map<String, Object> nextDoorComeAndOutInfo = HKUtil.getCarDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject nextData = (JSONObject)nextDoorComeAndOutInfo.get("data");
|
||||
List<PageData> nextInfoList = getCarInfoList(nextData);
|
||||
if (nextInfoList.size() > 0) {
|
||||
gateCarMachineInfoService.BatchinsertInfo(nextInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void InitDoorComeAndOutInfo(){
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
String fendDate = dft.format(new Date())+"+08:00";
|
||||
String fstartDate = "";
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.DATE, -1);
|
||||
Date before = now.getTime();
|
||||
fstartDate = dft.format(before)+"+08:00";
|
||||
int pageNo = 1; //第几页
|
||||
int pageSize = 100; //一页查询多少条
|
||||
Map<String, Object> doorComeAndOutInfo = HKUtil.getDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject data = (JSONObject)doorComeAndOutInfo.get("data");
|
||||
List<PageData> firstInfoList = getInfoList(data);
|
||||
if (firstInfoList.size() > 0) {
|
||||
gateMachineInfoService.BatchinsertInfo(firstInfoList);
|
||||
}
|
||||
//判断是否有下一页,如果有继续请求并且插入
|
||||
int totalPage = Integer.parseInt(data.getString("totalPage"));
|
||||
if (totalPage>1){
|
||||
for (int i=2;i<=totalPage;i++){
|
||||
pageNo = i;
|
||||
Map<String, Object> nextDoorComeAndOutInfo = HKUtil.getDoorComeAndOutInfo(null,Integer.toString(pageNo),Integer.toString(pageSize),fstartDate,fendDate);
|
||||
JSONObject nextData = (JSONObject)nextDoorComeAndOutInfo.get("data");
|
||||
List<PageData> nextInfoList = getInfoList(nextData);
|
||||
if (nextInfoList.size() > 0) {
|
||||
gateMachineInfoService.BatchinsertInfo(nextInfoList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<PageData> getInfoList(JSONObject data){
|
||||
JSONArray list = (JSONArray)data.get("list");
|
||||
List<PageData> infoList = new ArrayList<>();
|
||||
list.forEach(JSONObject -> {
|
||||
Map<String,String> infoMap = (Map<String, String>) JSON.parse(JSONObject.toString());
|
||||
PageData infopd = new PageData();
|
||||
infopd.put("MACHINE_INFO_ID",UuidUtil.get32UUID());
|
||||
infopd.put("ISDELETE","0");
|
||||
infopd.putAll(infoMap);
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
try {
|
||||
String time = infopd.getString("eventTime");
|
||||
String replace = time.replace("+08:00", "");
|
||||
Date date = dft.parse(replace);
|
||||
String eventTime = format.format(date);
|
||||
infopd.put("eventTime",eventTime);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
infoList.add(infopd);
|
||||
});
|
||||
return infoList;
|
||||
}
|
||||
|
||||
public List<PageData> getCarInfoList(JSONObject data){
|
||||
JSONArray list = (JSONArray)data.get("list");
|
||||
List<PageData> infoList = new ArrayList<>();
|
||||
list.forEach(JSONObject -> {
|
||||
Map<String,String> infoMap = (Map<String, String>) JSON.parse(JSONObject.toString());
|
||||
PageData infopd = new PageData();
|
||||
infopd.put("CAR_MACHINE_INFO_ID",UuidUtil.get32UUID());
|
||||
infopd.put("ISDELETE","0");
|
||||
infopd.putAll(infoMap);
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date currentTime = new Date();
|
||||
String currentTimeSdf = format.format(currentTime);
|
||||
infopd.put("CREATTIME",currentTimeSdf);
|
||||
infopd.put("OPERATTIME",currentTimeSdf);
|
||||
DateFormat dft = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
|
||||
try {
|
||||
String time = infopd.getString("crossTime");
|
||||
String replace = time.replace("+08:00", "");
|
||||
Date date = dft.parse(replace);
|
||||
String eventTime = format.format(date);
|
||||
infopd.put("CROSSTIME",eventTime);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
infoList.add(infopd);
|
||||
});
|
||||
return infoList;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package com.zcloud.util.czksBiMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CzksFireResourcesMapper;
|
||||
import com.zcloud.service.fireresources.CzksFireResourcesService;
|
||||
import com.zcloud.mapper.dsno2.fireresources.CmtFireResourcesMapper;
|
||||
import com.zcloud.service.fireresources.CmtFireResourcesService;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -16,9 +16,9 @@ public abstract class AbsCzksFireSourcesHandel implements InitializingBean {
|
|||
|
||||
|
||||
@Resource
|
||||
public CzksFireResourcesMapper czksfireResourcesMapper;
|
||||
public CmtFireResourcesMapper czksfireResourcesMapper;
|
||||
@Resource
|
||||
public CzksFireResourcesService fireResourcesService;
|
||||
public CmtFireResourcesService fireResourcesService;
|
||||
|
||||
|
||||
// 组装数据
|
||||
|
|
|
@ -83,7 +83,7 @@ smb.password=Zcloud@zcloud88888
|
|||
smb.basePath=/mnt/wwag/file/
|
||||
|
||||
#Mq\u914D\u7F6E
|
||||
rocketmq.name-server=192.168.0.18:9876
|
||||
rocketmq.name-server=192.168.0.247:9876
|
||||
rocketmq.producer.group=libmiddle
|
||||
rocketmq.producer.send-message-timeout=300000
|
||||
rocketmq.producer.compress-message-body-threshold=4096
|
||||
|
@ -110,9 +110,9 @@ perLoc.pwd=Cfd2023@
|
|||
|
||||
|
||||
# \u6E2F\u80A1\u4F01\u4E1A\u7AEF-app\u767B\u5F55\u9ED8\u8BA4 \u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740\uFF08\u66F9\u7164\u70AD\u4E0D\u7528\uFF09
|
||||
corp.default.pic-path=https://qgqy.qhdsafety.com/file/
|
||||
corp.default.pic-path=https://wwag.qhdsafety.com/
|
||||
# \u6E2F\u80A1\u4F01\u4E1A\u7AEF-app\u767B\u5F55\u9ED8\u8BA4 \u540E\u53F0\u5730\u5740\u5730\u5740\uFF08\u66F9\u7164\u70AD\u4E0D\u7528\uFF09
|
||||
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
|
||||
corp.default.back-end-path=http://192.168.0.247:8091/
|
||||
# \u672C\u670D\u52A1\u56FE\u7247\u5730\u5740
|
||||
http.file.url=https://wwag.qhdsafety.com/file/
|
||||
# \u672C\u670D\u52A1\u56FE\u7247\u5730\u5740
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper">
|
||||
|
||||
<!--模型表名 -->
|
||||
<sql id="tableName">
|
||||
bus_anemometer_local
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
FLID,
|
||||
FNAME,
|
||||
FVALUE,
|
||||
FTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{FLID},
|
||||
#{FNAME},
|
||||
#{FVALUE},
|
||||
#{FTIME}
|
||||
</sql>
|
||||
|
||||
<!-- 批量插入字段值 -->
|
||||
<sql id="FieldValueBatch">
|
||||
#{item.FLID},
|
||||
#{item.FNAME},
|
||||
#{item.FVALUE},
|
||||
#{item.FTIME}
|
||||
</sql>
|
||||
|
||||
<!--新增 -->
|
||||
<insert id="add" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="BatchinsertInfo" parameterType="pd">
|
||||
insert into <include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
<include refid="FieldValueBatch"></include>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--编辑 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
FNAME =#{FNAME},
|
||||
FVALUE =#{FVALUE} ,
|
||||
FTIME=#{FTIME}
|
||||
where
|
||||
FLID=#{FLID}
|
||||
</update>
|
||||
|
||||
<!--查询所有 -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
</select>
|
||||
|
||||
<!--查询所有 -->
|
||||
<select id="findByName" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.FNAME = #{FNAME}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.anemometer.AnemometerMachineMapper">
|
||||
|
||||
<!--模型表名 -->
|
||||
<sql id="tableName">
|
||||
bus_anemometer_machine
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
FID,
|
||||
FNAME,
|
||||
LATITUDE,
|
||||
LONGITUDE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{FID},
|
||||
#{FNAME},
|
||||
#{LATITUDE},
|
||||
#{LONGITUDE}
|
||||
</sql>
|
||||
|
||||
<!-- 批量插入字段值 -->
|
||||
<sql id="FieldValueBatch">
|
||||
#{item.FID},
|
||||
#{item.FNAME},
|
||||
#{item.LATITUDE},
|
||||
#{item.LONGITUDE}
|
||||
</sql>
|
||||
|
||||
<!--新增 -->
|
||||
<insert id="add" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="BatchinsertInfo" parameterType="pd">
|
||||
insert into <include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
<include refid="FieldValueBatch"></include>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--编辑 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
FNAME=#{FNAME}
|
||||
</update>
|
||||
|
||||
<!--查询所有 -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,FNAME as MAP_POINT_NAME,FNAME as NAME
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
</select>
|
||||
|
||||
<!--查询所有 -->
|
||||
<select id="findByName" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.FNAME = #{FNAME}
|
||||
</select>
|
||||
|
||||
<select id="getDatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,CONCAT_WS('--', f.LATITUDE,f.LONGITUDE) LONGTITUDEANDLATITUDE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
</select>
|
||||
|
||||
<select id="getDetailById" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.FID,
|
||||
f.FNAME,
|
||||
CONCAT_WS( '--', f.LATITUDE, f.LONGITUDE ) LONGTITUDEANDLATITUDE,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
ba.FVALUE,
|
||||
ba.FTIME
|
||||
FROM
|
||||
bus_anemometer_machine f
|
||||
LEFT JOIN (select *,MAX(FTIME) from bus_anemometer_local GROUP BY FNAME) ba on f.FNAME =ba.FNAME
|
||||
WHERE
|
||||
f.FNAME = #{FNAME}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -68,7 +68,7 @@
|
|||
AND CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
-- </foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
STR_TO_DATE( CREATTIME, '%Y-%m-%d' ) UNION ALL
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
f.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
f.GATEVIDEO_ID,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE
|
||||
f.LONGITUDE,
|
||||
f.CORPINFO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -37,7 +38,8 @@
|
|||
PLATFORMVIDEOMANAGEMENT_ID,
|
||||
GATEVIDEO_ID,
|
||||
LATITUDE,
|
||||
LONGITUDE
|
||||
LONGITUDE,
|
||||
CORPINFO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -51,7 +53,8 @@
|
|||
#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
#{GATEVIDEO_ID},
|
||||
#{LATITUDE},
|
||||
#{LONGITUDE}
|
||||
#{LONGITUDE},
|
||||
#{CORPINFO_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -225,10 +228,15 @@
|
|||
<!-- 列表(全部) -->
|
||||
<select id="listAllForMap" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
f.*,VIDEONAME as MAP_POINT_NAME,VIDEONAME as NAME,GATEVIDEO_ID AS id
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
where f.ISDELETE = '0'
|
||||
and f.LATITUDE is not null
|
||||
and f.LONGITUDE is not null
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 消防点位已定位 -->
|
||||
|
|
|
@ -0,0 +1,326 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.map.BiMapMapper">
|
||||
|
||||
|
||||
<select id="getCarRecordslistPage" resultType="com.zcloud.entity.PageData">
|
||||
SELECT LICENSE_PLATE,
|
||||
STATE,
|
||||
COMING_REASON,
|
||||
CASE
|
||||
STATE
|
||||
WHEN 4 THEN
|
||||
TIME_IN
|
||||
WHEN 5 THEN
|
||||
TIME_OUT
|
||||
END TIME
|
||||
from bus_foreigncar
|
||||
where STATE in (4, 5) AND ISDELETE = 0 <if test="pd.AREA != null and pd.AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{pd.AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
ORDER BY TIME DESC
|
||||
</select>
|
||||
<!-- 统计今日临时人员检测
|
||||
* 提交申请数[COUNTAPPLY],门卫确认进入数[COUNTIN],现场车辆数[COUNTSITE],
|
||||
* 审核通过数[COUNPASS],门卫确认离开数[COUNTOUT],入场车辆比例[INRATIO]
|
||||
* 审核未通过数[COUNREFUSE] -->
|
||||
<select id="statisticsOutsiderCount" parameterType="pd" resultType="pd">
|
||||
SELECT F.*,
|
||||
(f.COUNTIN - f.COUNTOUT) COUNTSITE,
|
||||
IF(ISNULL(f.COUNTIN / f.COUNTAPPLY), 0, ROUND(f.COUNTIN / f.COUNTAPPLY * 100, 2)) INRATIO
|
||||
FROM (SELECT COUNT(case when f.STATE != '0' then f.OUTSIDERS_ID END) COUNTAPPLY,
|
||||
COUNT(case when f.TIME_IN IS NOT NULL then f.OUTSIDERS_ID END) COUNTIN,
|
||||
COUNT(case when f.TIME_OUT IS NOT NULL then f.OUTSIDERS_ID END) COUNTOUT,
|
||||
COUNT(case when f.STATE IN ('3', '4', '5', '7', '8') then f.OUTSIDERS_ID END) COUNPASS,
|
||||
COUNT(case when f.STATE = '6' then f.OUTSIDERS_ID END) COUNREFUSE
|
||||
FROM bus_outsiders f
|
||||
WHERE f.ISDELETE = 0
|
||||
AND f.CREATTIME >= CONCAT_WS(" ", DATE_FORMAT(CURDATE(), '%Y-%m-%d'), '00:00:00')) f
|
||||
</select>
|
||||
<!-- 统计今日临时车辆-->
|
||||
|
||||
|
||||
<!-- 统计今日人员刷卡数据(今日进入[COUNTUSERIN],今日离场[COUNTUSEROUT],现场人数[COUNTUSER],入场刷卡数[COUNTCARDIN],出场刷卡数[COUNTCARDOUT]) -->
|
||||
<select id="statisticsCardUserCount" parameterType="pd" resultType="pd">
|
||||
SELECT f.*, (COUNTUSERIN - COUNTUSEROUT) COUNTUSER
|
||||
FROM (SELECT COUNT(DISTINCT (case when f.STATE = 0 then f.USERID END)) COUNTUSERIN,
|
||||
COUNT(DISTINCT (case when f.STATE = 1 then f.USERID END)) COUNTUSEROUT,
|
||||
COUNT(case when f.STATE = 0 then f.CARDID END) COUNTCARDIN,
|
||||
COUNT(case when f.STATE = 1 then f.CARDID END) COUNTCARDOUT
|
||||
FROM bus_carduser f
|
||||
WHERE f.`TIME` >= CONCAT_WS(" ", DATE_FORMAT(CURDATE(), '%Y-%m-%d'), '00:00:00')) f
|
||||
</select>
|
||||
<!-- 统计今日车辆-->
|
||||
|
||||
<select id="getCorpinfoIds" parameterType="string" resultType="string">
|
||||
SELECT CORPINFO_ID FROM bus_corp_info WHERE ISDELETE = '0' AND AREA IN
|
||||
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getPeopleRecordslistPage" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
CARDID,
|
||||
CARDNUMBER,
|
||||
USERID,
|
||||
USERNAME,
|
||||
USERNUMBER,
|
||||
USERDEPARTMENTNAME,
|
||||
CARDTYPE,
|
||||
EQUIPMENTNAME,
|
||||
EQUIPMENTID,
|
||||
TIME,
|
||||
STATE
|
||||
from
|
||||
BUS_CARDUSER f
|
||||
where 1 = 1
|
||||
<if test="pd.AREA != null and pd.AREA != ''">
|
||||
and f.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{pd.AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.USERNAME != null and pd.USERNAME != ''"><!-- 关键词检索 -->
|
||||
and f.USERNAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
|
||||
</if>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 关键词检索 -->
|
||||
and f.TIME <![CDATA[ >= ]]> CONCAT_WS(' ',#{pd.STARTTIME}, '00:00')
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 关键词检索 -->
|
||||
and f.TIME <![CDATA[ <= ]]> CONCAT_WS(' ',#{pd.ENDTIME}, '23:59')
|
||||
</if>
|
||||
<if test="pd.STATE != null and pd.STATE != ''"><!-- 关键词检索 -->
|
||||
and f.STATE = #{pd.STATE}
|
||||
</if>
|
||||
ORDER BY f.`TIME` DESC
|
||||
|
||||
</select>
|
||||
<select id="getRiskIdentificationCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT *
|
||||
FROM (
|
||||
(SELECT COUNT(r.RISKUNIT_ID) '0'
|
||||
FROM bus_riskunit r
|
||||
WHERE r.ISDELETE = '0'
|
||||
AND r.CORPINFO_ID = #{CORPINFO_ID}) t1,
|
||||
(
|
||||
SELECT
|
||||
COUNT( i.IDENTIFICATIONPARTS_ID ) '1'
|
||||
FROM
|
||||
bus_identificationparts i
|
||||
WHERE
|
||||
i.ISDELETE = '0'
|
||||
AND i.CORPINFO_ID = #{CORPINFO_ID}
|
||||
) t2,
|
||||
( SELECT COUNT( 1 ) '2' FROM bus_riskpoint r WHERE r.ISDELETE = '0' AND r.CORPINFO_ID = #{CORPINFO_ID} )
|
||||
t3
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listbymeteorological" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
m.CORPINFO_ID,
|
||||
f.TEMPERATURE,
|
||||
f.HUMIDITY,
|
||||
f.WINDDIRECTION,
|
||||
f.WINDSPEED,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.METEOROLOGICALINFO_ID,
|
||||
f.OPERATOR,
|
||||
f.CODE,
|
||||
sd.NAME as NAME,
|
||||
m.EQUIPMENTNAME
|
||||
FROM
|
||||
`qa-czks-regulatory`.BUS_METEOROLOGICALINFO f
|
||||
LEFT JOIN `qa-czks-regulatory`.bus_meteorological m ON m.CODE = f.CODE
|
||||
LEFT JOIN sys_dictionaries sd on sd.DICTIONARIES_ID = m.EQUIPMENTTYPE
|
||||
WHERE 1=1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and m.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
|
||||
and m.EQUIPMENTTYPE = #{TYPE}
|
||||
</if>
|
||||
<if test="id != null and id != ''"><!-- 关键词检索 -->
|
||||
and m.METEOROLOGICAL_ID = #{id}
|
||||
</if>
|
||||
ORDER BY
|
||||
f.OPERATTIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getPersonPositioningCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT *
|
||||
FROM (
|
||||
(SELECT COUNT(u.USER_ID) '0'
|
||||
FROM sys_user u
|
||||
WHERE u.ISDELETE = '0'
|
||||
AND u.CORPINFO_ID = #{CORPINFO_ID}) t1,
|
||||
(
|
||||
SELECT
|
||||
COUNT( o.DEPARTMENT_ID )-1 '1'
|
||||
FROM
|
||||
oa_department o
|
||||
WHERE
|
||||
o.CORPINFO_ID = #{CORPINFO_ID}
|
||||
) t2,
|
||||
( SELECT 0 '2' )
|
||||
t3
|
||||
)
|
||||
|
||||
</select>
|
||||
<select id="getRiskIndex" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelA' TYPE,
|
||||
'重大风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelA'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelB' TYPE,
|
||||
'较大风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelB'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelC' TYPE,
|
||||
'一般风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelC'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelD' TYPE,
|
||||
'低风险性区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelD'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
<select id="inAndoutPeoCarToday" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日出港人员数' label,
|
||||
'PERSON_OUT' TYPE
|
||||
FROM
|
||||
bus_carduser c
|
||||
WHERE
|
||||
c.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
|
||||
AND c.STATE = 1 UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日进港人员数' label,
|
||||
'PERSON_IN' TYPE
|
||||
FROM
|
||||
bus_carduser c
|
||||
WHERE
|
||||
c.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
AND c.STATE = 0 UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日进港车辆数' label,
|
||||
'CAR_IN' TYPE
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.TIME_IN BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日出港车辆数' label,
|
||||
'CAR_OUT' TYPE
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.TIME_OUT BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT(
|
||||
DATE_FORMAT( now(), '%Y-%m-%d' ),
|
||||
' 23:59:59'
|
||||
)
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -177,5 +177,8 @@
|
|||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1 = 1
|
||||
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.fireresources.CzksFireResourcesMapper">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.fireresources.CmtFireResourcesMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
|
|
Loading…
Reference in New Issue