Merge branch 'cmt1.0' into dev
# Conflicts: # src/main/java/com/zcloud/service/gatemachine/impl/GateMachineServiceImpl.java # src/main/java/com/zcloud/util/ReturnMap.java # src/main/resources/application-dev.properties # src/main/resources/application-local.properties # src/main/resources/application-master.properties # src/main/resources/application.properties # src/main/resources/mybatis/datasource/gatemachine/GateAreaMapper.xml # src/main/resources/mybatis/datasource/gatemachine/GateMachineMapper.xml # src/main/resources/mybatis/datasource/gatemachine/GateVideoMapper.xmlpull/15/head
commit
25077ea9a6
6
pom.xml
6
pom.xml
|
@ -56,6 +56,12 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DevTools 热部署 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.zcloud.aspect;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Description: 对接切面注解
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/3/8
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface DockAnnotation {
|
||||
// 是否有额外数据
|
||||
boolean isAdd() default false;
|
||||
//是否有附件
|
||||
boolean hasAnnex() default false;
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
package com.zcloud.aspect;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.dto.TenCorpDto;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.docking.DockingRelationService;
|
||||
import com.zcloud.service.mq.SendMessageService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Aspect
|
||||
public class DockingAspect {
|
||||
@Autowired
|
||||
private SendMessageService sendMessageService;
|
||||
@Autowired
|
||||
private DockingRelationService dockingRelationService;
|
||||
|
||||
@Pointcut("@annotation(com.zcloud.aspect.DockAnnotation)")
|
||||
public void pointcut() {}
|
||||
|
||||
public static Map<String, String> dockingRelationMap = new HashMap();
|
||||
|
||||
// 增强逻辑:在切点方法执行前打印日志
|
||||
@Around("pointcut()")
|
||||
public Object beforeApi(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
Map<String,String> proceed = (HashMap<String,String>)joinPoint.proceed();
|
||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
Method method = joinPoint.getTarget().getClass().getDeclaredMethod(signature.getName(), signature.getParameterTypes());
|
||||
try {
|
||||
HttpServletRequest request = getRequest();
|
||||
//获取资源映射路径:servlet路径
|
||||
String servletPath = request.getServletPath();
|
||||
//验证该数据是否需要对接
|
||||
System.out.println("------------------------切面方法执行------------------------");
|
||||
//将路径换为对应的访问路径
|
||||
/*servletPath=dockingRelationMap.get(servletPath);
|
||||
//完整访问路径(访问港务局的路径,不是被访问的路径)
|
||||
String fullPath = gwjUrl+servletPath;
|
||||
System.out.println("完整路径:"+fullPath);*/
|
||||
//获取所有访问参数
|
||||
PageData pageData = getPageData();
|
||||
DockAnnotation annotation = method.getAnnotation(DockAnnotation.class);
|
||||
if (annotation != null) {
|
||||
if (annotation.isAdd()){
|
||||
if (Tools.notEmpty(proceed.get("dockData"))){
|
||||
pageData.put("dockData",proceed.get("dockData"));
|
||||
}
|
||||
}else if (annotation.hasAnnex()) {
|
||||
//查找附件
|
||||
String dockDataJson = pageData.getString("dockData");
|
||||
if (Tools.notEmpty(dockDataJson)){
|
||||
Map<String,String> dockData = (Map<String,String>) JSON.parse(dockDataJson);
|
||||
String img = dockData.get("img");
|
||||
for (String imgurl : img.split(",")) {
|
||||
//获取附件名称
|
||||
String[] split = imgurl.split("/");
|
||||
String filename = split[split.length - 1];
|
||||
PageData imgpd = new PageData();
|
||||
imgpd.put("imgUrl",imgurl);
|
||||
imgpd.put("filename",filename);
|
||||
imgpd.put("url","/file/saveImg");
|
||||
imgpd.put("TARGETURL","https://qgqy.qhdsafety.com/file/");
|
||||
imgpd.put("ORIGINURL","https://qgqy.qhdsafety.com/file/");
|
||||
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||
tenCorpDto.setMessage("一条新增消息");
|
||||
tenCorpDto.setData(imgpd);
|
||||
tenCorpDto.setId(UuidUtil.get32UUID());
|
||||
tenCorpDto.setTopic("docking");
|
||||
tenCorpDto.setProducer_name("qa-prevention-czks");
|
||||
sendMessageService.sendMessage(tenCorpDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PageData login_user = new PageData();
|
||||
login_user.put("USER_ID",Jurisdiction.getUSER_ID());
|
||||
login_user.put("USERNAME",Jurisdiction.getUsername());
|
||||
login_user.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
||||
login_user.put("DEPARTMENT_ID",Jurisdiction.getDEPARTMENT_ID());
|
||||
login_user.put("NAME",Jurisdiction.getName());
|
||||
login_user.put("ISSUPERVISE",Jurisdiction.getISSUPERVISE());
|
||||
login_user.put("POST_ID",Jurisdiction.getPOST_ID());
|
||||
pageData.put("LOGIN_USER",login_user);
|
||||
pageData.put("url",servletPath);
|
||||
/*//连接redis
|
||||
Jedis jedis = new Jedis(host,port);
|
||||
//测试是否连接成功
|
||||
String ping = jedis.ping();
|
||||
System.out.println(ping);
|
||||
//切换数据库
|
||||
String select = jedis.select(0);
|
||||
System.out.println(select);
|
||||
//存储数据至redis
|
||||
String rq = JSON.toJSONString(map);
|
||||
jedis.zadd("request",0,rq);
|
||||
System.out.println(rq);*/
|
||||
TenCorpDto tenCorpDto = new TenCorpDto();
|
||||
tenCorpDto.setMessage("一条新增消息");
|
||||
tenCorpDto.setData(pageData);
|
||||
tenCorpDto.setId(UuidUtil.get32UUID());
|
||||
tenCorpDto.setTopic("docking");
|
||||
tenCorpDto.setProducer_name("qa-prevention-czks");
|
||||
sendMessageService.sendMessage(tenCorpDto);
|
||||
System.out.println("------------------------方法执行完毕------------------------");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return proceed;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
private void initDockingRelationship() throws Exception {
|
||||
dockingRelationMap = dockingRelationService.listAll(null);
|
||||
}
|
||||
|
||||
private PageData getPageData() {
|
||||
return new PageData(this.getRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到request对象
|
||||
* @return
|
||||
*/
|
||||
private HttpServletRequest getRequest() {
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
|
||||
.getRequest();
|
||||
return request;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
@Configuration
|
||||
public class MyRedisConfig {
|
||||
|
||||
@Bean(name = "redisTemplate")
|
||||
public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory){
|
||||
RedisTemplate redisTemplate = new RedisTemplate<>();
|
||||
////参照StringRedisTemplate内部实现指定序列化器
|
||||
redisTemplate.setConnectionFactory(redisConnectionFactory);
|
||||
redisTemplate.setKeySerializer(keySerializer());
|
||||
redisTemplate.setHashKeySerializer(keySerializer());
|
||||
redisTemplate.setValueSerializer(valueSerializer());
|
||||
redisTemplate.setHashValueSerializer(valueSerializer());
|
||||
return redisTemplate;
|
||||
}
|
||||
|
||||
private RedisSerializer keySerializer(){
|
||||
return new StringRedisSerializer();
|
||||
}
|
||||
|
||||
//使用Jackson序列化器
|
||||
private RedisSerializer valueSerializer(){
|
||||
return new StringRedisSerializer();
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.config;
|
||||
|
||||
import com.zcloud.plugins.websocketPositioning.PositioningServer;
|
||||
import org.java_websocket.WebSocketImpl;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
|
@ -20,14 +21,15 @@ import com.zcloud.util.PathUtil;
|
|||
@Component
|
||||
@Order(value = 1) // 1 代表启动顺序
|
||||
public class StartWebsocketServer implements ApplicationRunner{
|
||||
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments var1) throws Exception{
|
||||
startWebsocketOnline(); //启动在线管理服务
|
||||
startWebsocketInstantMsg(); //启动即时聊天服务
|
||||
startWebsocketPositioning();
|
||||
System.out.println("-------------------系统启动成功-------------------");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 启动在线管理服务
|
||||
*/
|
||||
|
@ -43,7 +45,7 @@ public class StartWebsocketServer implements ApplicationRunner{
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 启动即时聊天服务
|
||||
*/
|
||||
|
@ -60,4 +62,20 @@ public class StartWebsocketServer implements ApplicationRunner{
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动即时人员定位推送
|
||||
*/
|
||||
public void startWebsocketPositioning(){
|
||||
WebSocketImpl.DEBUG = false;
|
||||
PositioningServer s;
|
||||
try {
|
||||
String infFilePath = PathUtil.getClasspath()+Const.SYSSET; //启动即时人员定位推送
|
||||
String positioningPort = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "positioningPort", "8899"); //启动即时人员定位推送
|
||||
s = new PositioningServer(Integer.parseInt(positioningPort));
|
||||
s.start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1079,8 +1079,7 @@ public class AppGFBreakGroundController extends BaseController {
|
|||
public Object countCheck() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd = this.getPageData();
|
||||
PageData count = GFbreakGroundService.countCheck(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("count", count);
|
||||
|
|
|
@ -0,0 +1,391 @@
|
|||
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.bimap.BiMapService;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.fireresources.FireResourcesService;
|
||||
import com.zcloud.service.gatemachine.GateMachineService;
|
||||
//import com.zcloud.service.keyProjects.MeteorologicalService;
|
||||
//import com.zcloud.service.keyProjects.MeteorologicalinfoService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
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("/map")
|
||||
public class MapController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private BiMapService biMapService;
|
||||
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
// @Autowired
|
||||
// private MeteorologicalinfoService meteorologicalinfoService;
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Autowired
|
||||
private FireResourcesService 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员、车辆进出记录
|
||||
*
|
||||
* @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,212 @@
|
|||
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.map.MapEightService;
|
||||
import com.zcloud.service.system.UserInfoService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
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 org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作内容
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/map/Eight")
|
||||
public class MapEightController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MapEightService mapEightService;
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
/**
|
||||
* @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);
|
||||
//pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动火防护措施
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/findEightsByUserCardNo")
|
||||
@ResponseBody
|
||||
public Object findEightsByUserId() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData byCardNo = usersService.findByCardNo(pd);
|
||||
map.put("INFO", byCardNo);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
//import com.zcloud.service.keyProjects.PlatformelectronicService;
|
||||
//import com.zcloud.util.hk.HKPostUtil;
|
||||
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.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/map/mapPlatformelectronic")
|
||||
public class MapPlatFormElectronicController extends BaseController {
|
||||
// @Autowired
|
||||
// private PlatformelectronicService platformelectronicService;
|
||||
|
||||
/**总摄像头数
|
||||
* @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();
|
||||
// Integer allForMap = platformelectronicService.countAllForMap(pd); //列出Platformelectronic列表
|
||||
// map.put("allForMap", allForMap);
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
|
||||
|
||||
/**根据区域统计摄像头总数
|
||||
* @throws Exception
|
||||
*/
|
||||
// @RequestMapping(value="/listAllByArea")
|
||||
// @ResponseBody
|
||||
// public Object listAllByArea() throws Exception{
|
||||
// Map<String,Object> map = new HashMap<String,Object>();
|
||||
// String errInfo = "success";
|
||||
// PageData pd = new PageData();
|
||||
// pd = this.getPageData();
|
||||
// List<PageData> countAllByArea = platformelectronicService.countAllByArea(pd); //列出Platformelectronic列表
|
||||
// map.put("varList", countAllByArea);
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
|
||||
|
||||
/**地图插点
|
||||
* @throws Exception
|
||||
*/
|
||||
// @RequestMapping(value="/listAllLocation")
|
||||
// @ResponseBody
|
||||
// public Object listAllLocation() throws Exception{
|
||||
// Map<String,Object> map = new HashMap<String,Object>();
|
||||
// String errInfo = "success";
|
||||
// PageData pd = new PageData();
|
||||
// pd = this.getPageData();
|
||||
// pd.put("forMap","1");
|
||||
// List<PageData> varList = platformelectronicService.listAll(pd); //列出Platformelectronic列表
|
||||
// for (PageData data : varList) {
|
||||
// data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
// }
|
||||
// map.put("varList", varList);
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
// @RequestMapping(value="/getHlsPathById")
|
||||
// @ResponseBody
|
||||
// public Object getHlsPath() throws Exception{
|
||||
// Map<String,Object> map = new HashMap<String,Object>();
|
||||
// PageData pd =this.getPageData();
|
||||
// pd = platformelectronicService.findById(pd);
|
||||
// map = HKPostUtil.camerasPreviewURLs(pd.getString("INDEXCODE"),"hls");
|
||||
// map.put("pd",pd);
|
||||
// map.put("result", "success");
|
||||
// return map;
|
||||
// }
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.RiskUnitService;
|
||||
import com.zcloud.service.keyProjects.PlatformvideomanagementService;
|
||||
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;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/ObtainDisplayData")
|
||||
public class ObtainDisplayDataController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RiskUnitService riskUnitService;
|
||||
@Autowired
|
||||
private PlatformvideomanagementService platformvideomanagementService;
|
||||
|
||||
@RequestMapping(value="/getRiskList")
|
||||
@ResponseBody
|
||||
public Object getRiskList() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
return riskUnitService.listAllForMap(pd);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/listAllCameraForMap")
|
||||
@ResponseBody
|
||||
public Object listAllCameraForMap() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
return platformvideomanagementService.listAllForMap(pd);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
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;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/UserPosition")
|
||||
public class UserPositionController extends BaseController {
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@RequestMapping(value="/getCurrentLocationOnline")
|
||||
@ResponseBody
|
||||
public Object getCurrentLocationOnline() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
return usersService.getCurrentLocation(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员在线及统计数据
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCurrentPersonnelData")
|
||||
@ResponseBody
|
||||
public Object getCurrentPersonnelData() throws Exception{
|
||||
PageData pd = this.getPageData();
|
||||
return usersService.getCurrentPersonnelData(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员定位统计列表
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/personPositioningStatistics")
|
||||
@ResponseBody
|
||||
public Object getPersonPositioningStatistics() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return usersService.getPersonPositioningStatistics(pd);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/getCurrentLocationOnlineCount")
|
||||
@ResponseBody
|
||||
public Object getCurrentLocationOnlineCount() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return usersService.getCurrentLocationCount(pd);
|
||||
}
|
||||
}
|
|
@ -105,6 +105,10 @@ public class HeadController extends BaseController {
|
|||
String imPort = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "imPort", "8869"); //即时聊天端口
|
||||
map.put("wimadress", imIp+":"+imPort); //即时聊天websocket地址
|
||||
|
||||
String positioningIP = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "positioningIP", "127.0.0.1"); //即时聊天IP
|
||||
String positioningPort = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "positioningPort", "8899"); //即时聊天端口
|
||||
map.put("positioningAdress", positioningIP+":"+positioningPort); //即时聊天websocket地址
|
||||
|
||||
String alarmIp = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "alarmIp", "127.0.0.1"); //即时聊天IP
|
||||
String alarmPort = IniFileUtil.readCfgValue(infFilePath, "SysSet1", "alarmPort", "8889"); //即时聊天端口
|
||||
map.put("alarmAdress", alarmIp+":"+alarmPort); //重大危险源报警推送websocket地址
|
||||
|
@ -251,6 +255,7 @@ public class HeadController extends BaseController {
|
|||
pd.put("onlinePort", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "onlinePort", "8869")); //在线管理端口
|
||||
pd.put("imIp", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "imIp", "127.0.0.1")); //即时聊天IP
|
||||
pd.put("imPort", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "imPort", "8879")); //即时聊天端口
|
||||
pd.put("positioningPort", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "positioningPort", "8899")); //即时聊天端口
|
||||
pd.put("fhsmsSound", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "fhsmsSound", "m1")); //信息提示音
|
||||
pd.put("SMTP", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "SMTP", "smtp.qq.com")); //邮箱服务器SMTP
|
||||
pd.put("PORT", IniFileUtil.readCfgValue(infFilePath, "SysSet1", "PORT", "465")); //邮箱服务器端口
|
||||
|
|
|
@ -68,6 +68,24 @@ public class LoginController extends BaseController {
|
|||
@Autowired
|
||||
private OffDutyService offdutyService;
|
||||
|
||||
@Value("${czks-useridentity}")
|
||||
private String czksIdentity;
|
||||
@Value("${czks-baseimgpath}")
|
||||
private String czksBaseimgpath;
|
||||
@Value("${czks-backendaddr}")
|
||||
private String czksBackendaddr;
|
||||
|
||||
@Value("${gwj-useridentity}")
|
||||
private String gwjIdentity;
|
||||
@Value("${gwj-baseimgpath}")
|
||||
private String gwjBaseimgpath;
|
||||
@Value("${gwj-backendaddr}")
|
||||
private String gwjBackendaddr;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private PhotoService photoService;
|
||||
|
||||
|
@ -171,6 +189,27 @@ public class LoginController extends BaseController {
|
|||
map.put("failMsg", "帐号已锁定,请联系管理员");
|
||||
return map;
|
||||
}
|
||||
// 判断是不是沧州矿石的用户
|
||||
if (czksIdentity.equals(pd.getString("USER_IDENTITY"))) {
|
||||
// 沧州矿石的用户
|
||||
// 用户标识
|
||||
map.put("USER_IDENTITY", czksIdentity);
|
||||
// 图片路径
|
||||
map.put("baseImgPath", czksBaseimgpath);
|
||||
// 后台地址
|
||||
map.put("BACKENDADDR", czksBackendaddr);
|
||||
}
|
||||
if ("".equals(pd.getString("USER_IDENTITY"))) {
|
||||
// 港股的用户
|
||||
// 用户标识
|
||||
map.put("USER_IDENTITY", gwjIdentity);
|
||||
// 图片路径
|
||||
map.put("baseImgPath", gwjBaseimgpath);
|
||||
// 后台地址
|
||||
map.put("BACKENDADDR", gwjBackendaddr);
|
||||
}
|
||||
|
||||
|
||||
PageData cpd = corpinfoService.findById(pd);
|
||||
//System.out.println(cpd.getString("ISUSE"));
|
||||
if (cpd != null) {
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.mapper.datasource.bimap;
|
||||
|
||||
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);
|
||||
|
||||
PageData getPersonPositioningCount(PageData pageData);
|
||||
|
||||
List<PageData> getRiskIndex(PageData pageData);
|
||||
|
||||
List<PageData> inAndoutPeoCarToday(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.mapper.datasource.docking;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DockingRelationMapper {
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.zcloud.mapper.datasource.fireresources;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FireResourcesMapper {
|
||||
/**新增
|
||||
* @param pd
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
LinkedList<PageData> getControlRoomDataList(PageData pageData);
|
||||
LinkedList<PageData> getPumpRoomDataList(PageData pageData);
|
||||
LinkedList<PageData> getRescueTeamDataList(PageData pageData);
|
||||
LinkedList<PageData> getWaterSourceDataList(PageData pageData);
|
||||
|
||||
LinkedList<PageData> getPointDataList(PageData pageData);
|
||||
|
||||
PageData getDataById(PageData pddata);
|
||||
|
||||
|
||||
List<PageData> getCheckRecordByPid(PageData pageData);
|
||||
|
||||
|
||||
PageData findPointById(PageData pageData);
|
||||
|
||||
List<PageData> listAll4H5(PageData pageData);
|
||||
|
||||
List<PageData> getPointQualifiedPhotosByEpid(PageData pageData);
|
||||
|
||||
List<PageData> getPointQualifiedPhotos(PageData pageData);
|
||||
|
||||
List<PageData> goRecordDeviceByPid(PageData pd);
|
||||
|
||||
List<PageData> devicelistPage(Page page);
|
||||
|
||||
List<PageData> getPointCheckPhotoById(PageData pageData);
|
||||
}
|
|
@ -55,5 +55,8 @@ public interface PlatformvideomanagementMapper {
|
|||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
List<PageData> listAllForMap(PageData pd);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,368 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:重点工程处罚
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MapEightMapper {
|
||||
|
||||
|
||||
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
|
||||
|
||||
/**
|
||||
* 获取柱状图
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getEcharts(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE])
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData statisticsHighRiskWorkByState(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 作业实时情况展示
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> realTimeHighRiskWorklistPage(Page page);
|
||||
|
||||
|
||||
/**动火查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHOTWORKHighRiskWorkLocation(PageData pd);
|
||||
|
||||
/**临时用电查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getELECTRICITYHighRiskWorkLocation(PageData pd);
|
||||
|
||||
/**盲板查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getBLINDBOARDHighRiskWorkLocation(PageData pd);
|
||||
|
||||
/**高处作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHIGHWORKHighRiskWorkLocation(PageData pd);
|
||||
|
||||
/**有限空间作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCONFINEDSPACEHighRiskWorkLocation(PageData pd);
|
||||
|
||||
/**吊装作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHOISTINGHighRiskWorkLocation(PageData pd);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**动火查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdHOTWORK(PageData pd);
|
||||
|
||||
/**
|
||||
* 动火数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAlldelayed(PageData pd);
|
||||
|
||||
/**
|
||||
* 动火数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllcuoshiHOTWORK(PageData pd);
|
||||
/**动火措施查询
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllMeasuresHOTWORK(PageData pd);
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**动火审批详情
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getList(PageData pd);
|
||||
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasures(PageData pd);
|
||||
|
||||
/**动火查询数据列表
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllHOTWORK(PageData pd);
|
||||
|
||||
/**临时用电查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdELECTRICITY(PageData pd);
|
||||
|
||||
/**临时用电措施查询
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllMeasuresELECTRICITY(PageData pd);
|
||||
|
||||
/**盲板查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdBLINDBOARD(PageData pd);
|
||||
|
||||
/**通过id数据经纬度 盲板
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdJWD(PageData pd);
|
||||
|
||||
/**盲板图片查询
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllBLINDBOARD(PageData pd);
|
||||
|
||||
/**高处作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdHIGHWORK(PageData pd);
|
||||
|
||||
/**高处作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresHIGHWORK(PageData pd);
|
||||
|
||||
/**有限空间作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdCONFINEDSPACE(PageData pd);
|
||||
|
||||
/**有限空间作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresCONFINEDSPACE(PageData pd);
|
||||
|
||||
/**有限空间作业
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllCONFINEDSPACE(PageData pd);
|
||||
|
||||
/**吊装作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdHOISTING(PageData pd);
|
||||
|
||||
/**吊装作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresHOISTING(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 获取其他公司柱状图
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getEchartsOrder(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 其他公司获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE])
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData statisticsHighRiskWorkByStateOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 其他公司作业实时情况展示
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> realTimeHighRiskWorklistPageOrder(Page page);
|
||||
|
||||
/**临时用电查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getELECTRICITYHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**盲板查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getBLINDBOARDHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**高处作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHIGHWORKHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**有限空间作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCONFINEDSPACEHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**吊装作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHOISTINGHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**破土作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getBREAKGROUNDHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
|
||||
/**断路作业查询数据(有坐标数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCUTROADHighRiskWorkLocationOrder(PageData pd);
|
||||
|
||||
/**临时用电查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdELECTRICITYOrder(PageData pd);
|
||||
|
||||
/**临时用电措施查询
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllMeasuresELECTRICITYOrder(PageData pd);
|
||||
|
||||
/**盲板查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdBLINDBOARDOrder(PageData pd);
|
||||
|
||||
/**通过id数据经纬度 盲板
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdJWDOrder(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 获取盲板安全措施数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllMeasuresBLINDBOARDOrder(PageData pd);
|
||||
|
||||
|
||||
/**高处作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdHIGHWORKOrder(PageData pd);
|
||||
|
||||
/**高处作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresHIGHWORKOrder(PageData pd);
|
||||
|
||||
/**吊装作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdHOISTINGOrder(PageData pd);
|
||||
|
||||
/**吊装作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresHOISTINGOrder(PageData pd);
|
||||
|
||||
/**破土作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdBREAKGROUNDOrder(PageData pd);
|
||||
|
||||
/**破土作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresBREAKGROUNDOrder(PageData pd);
|
||||
|
||||
/**断路作业查询数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdCUTROADOrder(PageData pd);
|
||||
|
||||
/**断路作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresCUTROADOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 动火获取字典展示
|
||||
* @param shuzu
|
||||
* @return
|
||||
*/
|
||||
List<String> getListDongHuo(List<String> shuzu);
|
||||
|
||||
PageData getAllWorkUserIds(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
* @author zhangyue
|
||||
* @date 2023/9/20/020 17:41
|
||||
*/
|
||||
public interface PersonLocationTokenMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(String token);
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
String getToken();
|
||||
|
||||
}
|
|
@ -301,4 +301,10 @@ public interface UsersMapper {
|
|||
void resetCardNo(PageData pd);
|
||||
|
||||
PageData getUserInfo(PageData pd);
|
||||
|
||||
PageData getPersonByCardNo(PageData pd);
|
||||
|
||||
PageData findByCardNo(PageData pd);
|
||||
|
||||
void updateCardNoByPhone(String phone, String cardId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package com.zcloud.plugins.websocketPositioning;
|
||||
|
||||
import org.java_websocket.WebSocket;
|
||||
import org.java_websocket.WebSocketImpl;
|
||||
import org.java_websocket.handshake.ClientHandshake;
|
||||
import org.java_websocket.server.WebSocketServer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
/**
|
||||
* 人员的定位
|
||||
*/
|
||||
public class PositioningServer extends WebSocketServer {
|
||||
|
||||
public PositioningServer(int port) {
|
||||
super(new InetSocketAddress(port));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen(WebSocket conn, ClientHandshake handshake) {
|
||||
PositioningServerPool.addUser(null,conn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(WebSocket conn, int code, String reason, boolean remote) {
|
||||
PositioningServerPool.remove(conn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(WebSocket conn, String message) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(WebSocket conn, Exception ex) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
}
|
||||
|
||||
public static void main( String[] args ) throws InterruptedException , IOException {
|
||||
WebSocketImpl.DEBUG = false;
|
||||
int port = 8899; //端口
|
||||
PositioningServer s = new PositioningServer(port);
|
||||
s.start();
|
||||
System.out.println( "服务器的端口" + s.getPort() );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.plugins.websocketPositioning;
|
||||
|
||||
import org.java_websocket.WebSocket;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class PositioningServerPool {
|
||||
|
||||
private static final Map<WebSocket,String> userconnections = new HashMap<WebSocket,String>();
|
||||
|
||||
/**
|
||||
* 向连接池中添加连接
|
||||
* @param inbound
|
||||
*/
|
||||
public static void addUser(String user, WebSocket conn){
|
||||
userconnections.put(conn,user); //添加连接
|
||||
}
|
||||
|
||||
/**
|
||||
* 向所有的用户发送消息
|
||||
* @param message
|
||||
*/
|
||||
public static void sendMessage(String message){
|
||||
Set<WebSocket> keySet = userconnections.keySet();
|
||||
for (WebSocket conn : keySet) {
|
||||
conn.send(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除
|
||||
* @param conn
|
||||
*/
|
||||
public static void remove(WebSocket conn){
|
||||
userconnections.remove(conn);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.zcloud.service.bimap;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:监管端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);
|
||||
|
||||
Map<String, Object> getGatesInAndOutNumById(PageData pageData);
|
||||
|
||||
Map<String, Object> getPerpleCarGateMachineCount(PageData pageData);
|
||||
|
||||
Map<String, Object> listPerpleCarGateMachine(PageData pageData);
|
||||
|
||||
Map<String, Object> listMapSluiceCount(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,306 @@
|
|||
package com.zcloud.service.bimap.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.bimap.BiMapMapper;
|
||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||
import com.zcloud.mapper.datasource.fireresources.FireResourcesMapper;
|
||||
import com.zcloud.mapper.datasource.keyProjects.PlatformvideomanagementMapper;
|
||||
import com.zcloud.service.bimap.BiMapService;
|
||||
import com.zcloud.util.biMapFactory.AbsFireSourcesHandel;
|
||||
import com.zcloud.util.biMapFactory.AssemblyBeanFactory;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
public class BiMapServiceImpl implements BiMapService {
|
||||
|
||||
@Resource
|
||||
private BiMapMapper biMapMapper;
|
||||
|
||||
@Resource
|
||||
private FireResourcesMapper fireResourcesMapper;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
@Value("${perLoc.url}")
|
||||
private String url2;
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
@Resource
|
||||
private PlatformvideomanagementMapper platformvideomanagementMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @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) {
|
||||
PageData value = new PageData();
|
||||
PageData gateMachineInfo = gateMachineService.getGateMachineInfoById(pageData);
|
||||
// 基础信息
|
||||
value.put("info", gateMachineInfo);
|
||||
if ("CAMERA".equals(pageData.getString("TYPE"))) {
|
||||
pageData.put("VIDEOMANAGER_ID",pageData.getString("GATE_MACHINE_ID"));
|
||||
value.putAll(videoManagerMapper.findById(pageData));
|
||||
return value;
|
||||
}
|
||||
// 进出信息
|
||||
if ("CAR".equals(pageData.getString("TYPE"))) {
|
||||
// 车进出
|
||||
List<PageData> recordList = gateMachineService.getCarRecordCountByEId(gateMachineInfo);
|
||||
value.put("varList", recordList);
|
||||
|
||||
} else {
|
||||
// 人进出
|
||||
List<PageData> recordList = gateMachineService.getPersonRecordCountByEId(gateMachineInfo);
|
||||
value.put("varList", recordList);
|
||||
}
|
||||
return value;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getGatesInAndOutNumById(PageData pd) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String fendDate = simpleDateFormat.format(new Date());
|
||||
Calendar now = Calendar.getInstance();
|
||||
now.add(Calendar.MINUTE, -1);
|
||||
Date before = now.getTime();
|
||||
String fstartDate = simpleDateFormat.format(before);
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
if (pd.getString("TYPE").equals("PERSON")){
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetPersonnelEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate="+fendDate+"&workNumber=&accId="+pd.getString("id"),Map.class);
|
||||
}else {
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetVehicleEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate="+fendDate+"&carsign=&accId="+pd.getString("id"),Map.class);
|
||||
}
|
||||
Object msg = result.get("msg");
|
||||
if (msg!=null && msg.equals("success")) {
|
||||
result.remove("msg");
|
||||
result.put("result","success");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPerpleCarGateMachineCount(PageData pd) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String fstartDate = simpleDateFormat.format(calendar.getTime());
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
result = restTemplate.getForObject(url2+"/region/access/obtainBayonetData", Map.class);
|
||||
ArrayList data = (ArrayList) result.get("data");
|
||||
int Gate = data.size();
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetPersonnelEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&empNo=&empId=&entrystatus=0&accId="+pd.getString("id"),Map.class);
|
||||
data = (ArrayList) result.get("data");
|
||||
int inpeopleGate = data.size();
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetPersonnelEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&empNo=&empId=&entrystatus=1&accId="+pd.getString("id"),Map.class);
|
||||
data = (ArrayList) result.get("data");
|
||||
int outpeopleGate = data.size();
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetVehicleEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&carsign=&accId="+pd.getString("id")+"&entrystatus=0&cartype=",Map.class);
|
||||
data = (ArrayList) result.get("data");
|
||||
int invehicleGate = data.size();
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetVehicleEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&carsign=&accId="+pd.getString("id")+"&entrystatus=1&cartype=",Map.class);
|
||||
data = (ArrayList) result.get("data");
|
||||
int outvehicleGate = data.size();
|
||||
result.remove("msg");
|
||||
result.remove("data");
|
||||
result.put("Gate",Gate);
|
||||
result.put("inpeopleGate",inpeopleGate);
|
||||
result.put("outpeopleGate",outpeopleGate);
|
||||
result.put("invehicleGate",invehicleGate);
|
||||
result.put("outvehicleGate",outvehicleGate);
|
||||
Object msg = result.get("msg");
|
||||
if (msg!=null && msg.equals("success")) {
|
||||
result.remove("msg");
|
||||
}
|
||||
result.put("result","success");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPerpleCarGateMachine(PageData pd) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String fstartDate = simpleDateFormat.format(calendar.getTime());
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
if("1".equals(pd.getString("TYPE"))){
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetVehicleEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&carsign=&accId="+pd.getString("id")+"&entrystatus=1&cartype=",Map.class);
|
||||
} else if("0".equals(pd.getString("TYPE"))){
|
||||
result = restTemplate.getForObject(url2+"/region/access/bayonetPersonnelEntryAndExitRecords?fstartDate="+fstartDate+"&fendDate=&empNo=&empId=&entrystatus=0&accId="+pd.getString("id"),Map.class);
|
||||
}
|
||||
if(result.get("data") != null){
|
||||
List<JSONObject> inOutLog = (List<JSONObject>) result.get("data");
|
||||
result.put("data", inOutLog.size() > 7 ? inOutLog.subList(0, 7) : inOutLog);
|
||||
|
||||
}
|
||||
if("200".equals(result.get("code").toString())){
|
||||
result.put("result", "success");
|
||||
} else {
|
||||
result.put("result", "error");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listMapSluiceCount(PageData pd) {
|
||||
List<PageData> cameraList = platformvideomanagementMapper.listAllForMap(pd);
|
||||
Map<String,Object> result = restTemplate.getForObject(url2+"/region/access/obtainBayonetData?type=",Map.class);
|
||||
int onlinePerGate = 0;
|
||||
int offlinePerGate = 0;
|
||||
int onlineCarGate = 0;
|
||||
int offlineCarGate = 0;
|
||||
if(result != null && result.get("data") != null){
|
||||
List<JSONObject> gateList = (List<JSONObject>) result.get("data");
|
||||
// JSONObject gateList = JSONArray.parseArray(.toString());
|
||||
if(gateList != null && gateList.size() > 0){
|
||||
for(JSONObject gate : gateList){
|
||||
if("0".equals(gate.getString("type"))){
|
||||
onlineCarGate++;
|
||||
} else if("1".equals(gate.getString("type"))){
|
||||
onlinePerGate++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.put("onlinePerGate", onlinePerGate);
|
||||
result.put("offlinePerGate", offlinePerGate);
|
||||
result.put("onlineCarGate", onlineCarGate);
|
||||
result.put("offlineCarGate", offlineCarGate);
|
||||
result.put("cameraCount", cameraList.size());
|
||||
if("200".equals(result.get("code").toString())){
|
||||
result.put("result", "success");
|
||||
} else {
|
||||
result.put("result", "error");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zcloud.service.bus;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PositioningService {
|
||||
|
||||
public List<String> findRedisAll();
|
||||
|
||||
void syncCardNo() throws Exception;
|
||||
|
||||
}
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 说明:风险单元
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-30
|
||||
|
@ -17,25 +17,25 @@ public interface RiskUnitService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -52,7 +52,7 @@ public interface RiskUnitService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listIndexAll(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -63,13 +63,15 @@ public interface RiskUnitService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> findByName(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
|
||||
public List<PageData> getRisByUnitId (Page page) throws Exception;
|
||||
|
||||
Object listAllForMap(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package com.zcloud.service.bus.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.service.bus.PositioningService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.HttpRequestUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Service(value="iPositioningServiceImpl")
|
||||
public class PositioningServiceImpl implements PositioningService {
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@Override
|
||||
public List<String> findRedisAll() {
|
||||
Set<String> keys = redisTemplate.keys("*");
|
||||
return redisTemplate.opsForValue().multiGet(keys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncCardNo() throws Exception {
|
||||
String _response = HttpRequestUtil.doGet("https://badge.hongchuankeji.com:7812/mapi/v1/queryWorkCardLocation");
|
||||
JSONObject responseResult = JSONObject.parseObject(_response);
|
||||
JSONArray jsonArray = responseResult.getJSONArray("data");
|
||||
for (int i = 0; i < jsonArray.size() ; i++) {
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||
if (
|
||||
StringUtils.isNotBlank(jsonObject.getString("phone"))
|
||||
&& StringUtils.isNotBlank(jsonObject.getString("cardId"))
|
||||
) {
|
||||
usersService.updateCardNoByPhone(jsonObject.getString("phone"), jsonObject.getString("cardId"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,11 @@
|
|||
package com.zcloud.service.bus.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.mapper.datasource.bus.IdentificationPartsMapper;
|
||||
import com.zcloud.mapper.datasource.bus.RiskPointMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -9,7 +14,7 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.mapper.datasource.bus.RiskUnitMapper;
|
||||
import com.zcloud.service.bus.RiskUnitService;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 说明:风险单元
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-30
|
||||
|
@ -21,7 +26,10 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
|
||||
@Autowired
|
||||
private RiskUnitMapper riskunitMapper;
|
||||
|
||||
@Autowired
|
||||
private IdentificationPartsMapper identificationPartsMapper;
|
||||
@Autowired
|
||||
private RiskPointMapper riskPointMapper;
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -29,7 +37,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public void save(PageData pd)throws Exception{
|
||||
riskunitMapper.save(pd);
|
||||
}
|
||||
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -37,7 +45,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public void delete(PageData pd)throws Exception{
|
||||
riskunitMapper.delete(pd);
|
||||
}
|
||||
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -45,7 +53,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public void edit(PageData pd)throws Exception{
|
||||
riskunitMapper.edit(pd);
|
||||
}
|
||||
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
|
@ -53,7 +61,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public List<PageData> list(Page page)throws Exception{
|
||||
return riskunitMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -75,7 +83,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public List<PageData> listIndexAll(PageData pd)throws Exception{
|
||||
return riskunitMapper.listIndexAll(pd);
|
||||
}
|
||||
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
|
@ -90,7 +98,7 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
public List<PageData> findByName(PageData pd)throws Exception{
|
||||
return riskunitMapper.findByName(pd);
|
||||
}
|
||||
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
|
@ -104,6 +112,21 @@ public class RiskUnitServiceImpl implements RiskUnitService{
|
|||
// TODO Auto-generated method stub
|
||||
return riskunitMapper.getRisByUnitId(page);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object listAllForMap(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
//获取风险单元数、辨识部位数和风险因素数
|
||||
List<PageData> riskUnit = riskunitMapper.listAll(pd);
|
||||
List<PageData> identificationParts = identificationPartsMapper.listAll(pd);
|
||||
List<PageData> riskPoint = riskPointMapper.listAll(pd);
|
||||
map.put("riskUnit",riskUnit.size());
|
||||
map.put("identificationParts",identificationParts.size());
|
||||
map.put("riskPoint",riskPoint.size());
|
||||
map.put("result",errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.service.docking;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:图片管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface DockingRelationService {
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String,String> listAll(PageData pd)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.zcloud.service.docking.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.docking.DockingRelationMapper;
|
||||
import com.zcloud.service.docking.DockingRelationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:图片管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2020-12-24
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class DockingRelationServiceImpl implements DockingRelationService {
|
||||
|
||||
@Autowired
|
||||
private DockingRelationMapper dockingRelationMapper;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String,String> listAll(PageData pd)throws Exception{
|
||||
HashMap<String, String> relationMap = new HashMap<>();
|
||||
List<PageData> relationList = dockingRelationMapper.listAll(pd);
|
||||
for (PageData pageData : relationList) {
|
||||
String originurl = pageData.getString("ORIGINURL");
|
||||
String targeturl = pageData.getString("TARGETURL");
|
||||
relationMap.put(originurl,targeturl);
|
||||
}
|
||||
return relationMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.zcloud.service.fireresources;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 点检标准
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/3/8/008 17:21
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
public interface FireResourcesService {
|
||||
/**新增
|
||||
* @param pd
|
||||
*/
|
||||
void save(PageData pd, MultipartFile[] files) throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
*/
|
||||
void edit(PageData pd, MultipartFile[] files) throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
//消防控制室
|
||||
LinkedList<PageData> getControlRoomDataList(PageData pageData);
|
||||
|
||||
PageData getDataById(PageData pddata);
|
||||
|
||||
List<PageData> getCheckRecordByPid(PageData pageData);
|
||||
|
||||
PageData getPointInfoADeviceByPid(PageData pageData);
|
||||
|
||||
List<PageData> getPointQualifiedPhotos(PageData pageData);
|
||||
|
||||
List<PageData> goRecordDeviceByPid(PageData pd);
|
||||
|
||||
List<PageData> devicelistPage(Page page);
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
package com.zcloud.service.fireresources.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.fireresources.FireResourcesMapper;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.fireresources.FireResourcesService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class FireResourcesServiceImpl implements FireResourcesService {
|
||||
@Resource
|
||||
public FireResourcesMapper fireResourcesMapper;
|
||||
@Resource
|
||||
private ImgFilesService imgFilesService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(PageData pd, MultipartFile[] files) throws Exception {
|
||||
if (files != null && files.length > 0) {
|
||||
imgFilesService.uploadPicture(files, "xfbf01".equals(pd.getString("FIRERESOURCES_TYPE")) ? "117" : "116", pd.getString("FIRERESOURCES_ID"));
|
||||
}
|
||||
String deleteIds = pd.getString("DELETE_IDS");
|
||||
if (Tools.notEmpty(deleteIds)) {
|
||||
String[] split = deleteIds.split(",");
|
||||
imgFilesService.deleteAll(split);
|
||||
}
|
||||
fireResourcesMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(PageData pd) {
|
||||
fireResourcesMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void edit(PageData pd, MultipartFile[] files) throws Exception {
|
||||
if (files != null && files.length > 0) {
|
||||
imgFilesService.uploadPicture(files, "xfbf01".equals(pd.getString("FIRERESOURCES_TYPE")) ? "117" : "116", pd.getString("FIRERESOURCES_ID"));
|
||||
}
|
||||
String deleteIds = pd.getString("DELETE_IDS");
|
||||
if (Tools.notEmpty(deleteIds)) {
|
||||
String[] split = deleteIds.split(",");
|
||||
imgFilesService.deleteAll(split);
|
||||
}
|
||||
fireResourcesMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> datalistPage(Page page) {
|
||||
return fireResourcesMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) {
|
||||
return fireResourcesMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) {
|
||||
return fireResourcesMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<PageData> getControlRoomDataList(PageData pageData) {
|
||||
return fireResourcesMapper.getControlRoomDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getDataById(PageData pddata) {
|
||||
return fireResourcesMapper.getDataById(pddata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCheckRecordByPid(PageData pageData) {
|
||||
return fireResourcesMapper.getCheckRecordByPid(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getPointInfoADeviceByPid(PageData pageData) {
|
||||
PageData resData = new PageData();
|
||||
PageData pointInfo = fireResourcesMapper.findPointById(pageData);
|
||||
// 只取最新的信息
|
||||
List<PageData> checkImages = fireResourcesMapper.getPointCheckPhotoById(pageData);
|
||||
if (checkImages != null && checkImages.size() > 0) {
|
||||
checkImages.forEach(item -> {
|
||||
String[] checkImagesItems = item.getString("FILEPATHLIST").split("@@");
|
||||
item.put("FILEPATH_LIST", checkImagesItems);
|
||||
});
|
||||
}
|
||||
List<PageData> deviceListByPointId = fireResourcesMapper.listAll4H5(pageData);
|
||||
if (deviceListByPointId.size() > 0) {
|
||||
deviceListByPointId.forEach(item -> {
|
||||
String[] fireCheckStandardItems = item.getString("FIRE_CHECK_STANDARD_ITEM").split("@@");
|
||||
item.put("FIRE_CHECK_STANDARD_ITEM", fireCheckStandardItems);
|
||||
});
|
||||
}
|
||||
resData.put("deviceList", deviceListByPointId);
|
||||
resData.put("checkImages", checkImages);
|
||||
resData.put("pointInfo", pointInfo);
|
||||
return resData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getPointQualifiedPhotos(PageData pageData) {
|
||||
if (pageData.getString("ISLOG").equals("1")) {
|
||||
// 记录 EQUIPMENT_POINT_ID
|
||||
return fireResourcesMapper.getPointQualifiedPhotosByEpid(pageData);
|
||||
}
|
||||
return fireResourcesMapper.getPointQualifiedPhotos(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> goRecordDeviceByPid(PageData pd) {
|
||||
List<PageData> list = fireResourcesMapper.goRecordDeviceByPid(pd);
|
||||
list.forEach(item -> {
|
||||
String[] fireCheckStandardItems = item.getString("FIRE_CHECK_STANDARD_ITEM").split("@@");
|
||||
item.put("fireDeviceTypeList", fireCheckStandardItems);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> devicelistPage(Page page) {
|
||||
return fireResourcesMapper.devicelistPage(page);
|
||||
}
|
||||
}
|
|
@ -54,6 +54,7 @@ public interface PlatformvideomanagementService {
|
|||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
Object listAllForMap(PageData pd);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,14 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.keyProjects.PlatformvideomanagementMapper;
|
||||
import com.zcloud.service.keyProjects.PlatformvideomanagementService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
|
@ -79,5 +82,16 @@ public class PlatformvideomanagementServiceImpl implements Platformvideomanageme
|
|||
platformvideomanagementMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object listAllForMap(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> varList = platformvideomanagementMapper.listAllForMap(pd);
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实施地图八项作业
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MapEightService {
|
||||
|
||||
List<String> getCorpinfoIds(PageData pd);
|
||||
|
||||
Object getEcharts(PageData pd);
|
||||
|
||||
PageData statisticsHighRiskWorkByState(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 作业实时情况展示
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listHighRiskWork(Page page)throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有高危作业的位置坐标(有坐标数据)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllHighRiskWorkLocation(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasures(PageData pd);
|
||||
|
||||
/**
|
||||
* 根据id获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getById (PageData pd);
|
||||
|
||||
/**
|
||||
* 获取其他公司柱状图
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Object getEchartsOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 其他公司获取统计数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData statisticsHighRiskWorkByStateOrder(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 其他作业实时情况展示
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listHighRiskWorkOrder(Page page)throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有高危作业的位置坐标(有坐标数据)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllHighRiskWorkLocationOrder(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取其他公司详细数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getByIdOrder(PageData pd);
|
||||
|
||||
Object getAllWorkUserCards(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,606 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.MapEightMapper;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.service.map.MapEightService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MapEightServiceImpl implements MapEightService {
|
||||
|
||||
@Autowired
|
||||
private MapEightMapper mapEightMapper;
|
||||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
|
||||
@Override
|
||||
public List<String> getCorpinfoIds(PageData pd) {
|
||||
String area = pd.getString("AREA");
|
||||
if(StringUtils.isNotBlank(area)){
|
||||
String[] ArrayDATA_IDS = area.split(",");
|
||||
return mapEightMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
String gangkou = pd.getString("GANGKOU");
|
||||
if(StringUtils.equals("00003",gangkou)){
|
||||
String[] ArrayDATA_IDS = new String[]{"1","2"};
|
||||
return mapEightMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getEcharts(PageData pd) {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -4);
|
||||
String dateStr = sdf.format(calendar.getTime());
|
||||
List<Map<String,Object>> list = mapEightMapper.getEcharts(pd);
|
||||
List<String> clickDate = new ArrayList<>();
|
||||
List<String> dhzyCount = new ArrayList<>();
|
||||
List<String> dbzyCount = new ArrayList<>();
|
||||
List<String> yxgjzyCount = new ArrayList<>();
|
||||
List<String> gczyCount = new ArrayList<>();
|
||||
List<String> dzzyCount = new ArrayList<>();
|
||||
List<String> lsydCount = new ArrayList<>();
|
||||
//用于排序,并整理数据
|
||||
for(int i = 0;i<5;i++){
|
||||
for(Map<String,Object> map :list){
|
||||
if(StringUtils.equals(dateStr,map.get("clickDate").toString())){
|
||||
clickDate.add(map.get("clickDate").toString());
|
||||
dhzyCount.add(map.get("dhzyCount").toString());
|
||||
dbzyCount.add(map.get("dbzyCount").toString());
|
||||
yxgjzyCount.add(map.get("yxgjzyCount").toString());
|
||||
gczyCount.add(map.get("gczyCount").toString());
|
||||
dzzyCount.add(map.get("dzzyCount").toString());
|
||||
lsydCount.add(map.get("lsydCount").toString());
|
||||
}
|
||||
}
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1);
|
||||
dateStr = sdf.format(calendar.getTime());
|
||||
}
|
||||
List<String> name = new ArrayList<>();
|
||||
List<List<String>> date = new ArrayList<>();
|
||||
name.add("动火作业");
|
||||
date.add(dhzyCount);
|
||||
name.add("盲板作业");
|
||||
date.add(dbzyCount);
|
||||
name.add("有限空间作业");
|
||||
date.add(yxgjzyCount);
|
||||
name.add("高处作业");
|
||||
date.add(gczyCount);
|
||||
name.add("吊装作业");
|
||||
date.add(dzzyCount);
|
||||
name.add("临时用电");
|
||||
date.add(lsydCount);
|
||||
returnMap.put("clickDate",clickDate);
|
||||
returnMap.put("name",name);
|
||||
returnMap.put("date",date);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData statisticsHighRiskWorkByState(PageData pd) throws Exception {
|
||||
return mapEightMapper.statisticsHighRiskWorkByState(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listHighRiskWork(Page page) throws Exception {
|
||||
return mapEightMapper.realTimeHighRiskWorklistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllHighRiskWorkLocation(PageData pd) throws Exception {
|
||||
List<PageData> r = new ArrayList<>();
|
||||
String typeStr = pd.getString("TYPE");
|
||||
//动火
|
||||
if(StringUtils.equals(typeStr,"HOTWORK")){
|
||||
r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
|
||||
//临时用电
|
||||
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
|
||||
r = mapEightMapper.getELECTRICITYHighRiskWorkLocation(pd);
|
||||
//盲板
|
||||
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
|
||||
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocation(pd);
|
||||
// 高处
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
r = mapEightMapper.getHIGHWORKHighRiskWorkLocation(pd);
|
||||
//有限空间
|
||||
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
|
||||
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocation(pd);
|
||||
//吊装
|
||||
}else if(StringUtils.equals(typeStr,"HOISTING")){
|
||||
r = mapEightMapper.getHOISTINGHighRiskWorkLocation(pd);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<PageData> listAll(PageData pd) {
|
||||
return mapEightMapper.listAll(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllMeasures(PageData pd) {
|
||||
return mapEightMapper.listAllMeasures(pd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getById(PageData pd) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String typeStr = pd.getString("TYPE");
|
||||
String idStr = pd.getString("id");
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if(StringUtils.equals(typeStr,"HOTWORK")){
|
||||
pd.put("HOTWORKAPPLICATION_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHOTWORK(pd);
|
||||
pd = dianhuo(pd);
|
||||
List<PageData> list = mapEightMapper.getList(pd);
|
||||
//这里封装前台要的参数
|
||||
pd = shenpi(pd,list);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHOTWORK(pd));
|
||||
map.put("gasList", mapEightMapper.listAllHOTWORK(pd));
|
||||
List<PageData> safetymethodrecordList = mapEightMapper.listAllcuoshiHOTWORK(pd);//其它安全措施明细集合
|
||||
map.put("safetymethodrecordList", safetymethodrecordList);
|
||||
List<PageData> delayedList = mapEightMapper.listAlldelayed(pd);
|
||||
map.put("delayedList", delayedList);
|
||||
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
|
||||
pd.put("ELECTRICITY_ID",idStr);
|
||||
pd = mapEightMapper.findByIdELECTRICITY(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresELECTRICITY(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
|
||||
pd.put("BLINDBOARD_ID",idStr);
|
||||
pd = mapEightMapper.findByIdBLINDBOARD(pd);
|
||||
PageData Info = mapEightMapper.findByIdJWD(pd);
|
||||
pd.put("TYPE",105);//盲板位置图
|
||||
pd.put("FOREIGN_KEY",pd.getString("BLINDBOARD_ID"));
|
||||
List<PageData> ImgList = mapEightMapper.listAllBLINDBOARD(pd);
|
||||
map.put("Info",Info);//获取经纬度
|
||||
map.put("ImgList",ImgList);
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
pd.put("HIGHWORK_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHIGHWORK(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHIGHWORK(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
|
||||
pd.put("CONFINEDSPACE_ID",idStr);
|
||||
pd = mapEightMapper.findByIdCONFINEDSPACE(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresCONFINEDSPACE(pd));
|
||||
map.put("gasList", mapEightMapper.listAllCONFINEDSPACE(pd));
|
||||
}else if(StringUtils.equals(typeStr,"HOISTING")){
|
||||
pd.put("HOISTING_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHOISTING(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHOISTING(pd));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getEchartsOrder(PageData pd) {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(new Date());
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -4);
|
||||
String dateStr = sdf.format(calendar.getTime());
|
||||
List<Map<String,Object>> list = mapEightMapper.getEchartsOrder(pd);
|
||||
List<String> clickDate = new ArrayList<>();
|
||||
List<String> dhzyCount = new ArrayList<>();
|
||||
List<String> dbzyCount = new ArrayList<>();
|
||||
List<String> yxgjzyCount = new ArrayList<>();
|
||||
List<String> gczyCount = new ArrayList<>();
|
||||
List<String> dzzyCount = new ArrayList<>();
|
||||
List<String> lsydCount = new ArrayList<>();
|
||||
List<String> dtzyCount = new ArrayList<>();
|
||||
List<String> dlzyCount = new ArrayList<>();
|
||||
//用于排序,并整理数据
|
||||
for(int i = 0;i<5;i++){
|
||||
for(Map<String,Object> map :list){
|
||||
if(StringUtils.equals(dateStr,map.get("clickDate").toString())){
|
||||
clickDate.add(map.get("clickDate").toString());
|
||||
dhzyCount.add(map.get("dhzyCount").toString());
|
||||
dbzyCount.add(map.get("dbzyCount").toString());
|
||||
yxgjzyCount.add(map.get("yxgjzyCount").toString());
|
||||
gczyCount.add(map.get("gczyCount").toString());
|
||||
dzzyCount.add(map.get("dzzyCount").toString());
|
||||
lsydCount.add(map.get("lsydCount").toString());
|
||||
dtzyCount.add(map.get("dtzyCount").toString());
|
||||
dlzyCount.add(map.get("dlzyCount").toString());
|
||||
}
|
||||
}
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1);
|
||||
dateStr = sdf.format(calendar.getTime());
|
||||
}
|
||||
List<String> name = new ArrayList<>();
|
||||
List<List<String>> date = new ArrayList<>();
|
||||
name.add("动火作业");
|
||||
date.add(dhzyCount);
|
||||
name.add("盲板作业");
|
||||
date.add(dbzyCount);
|
||||
name.add("有限空间作业");
|
||||
date.add(yxgjzyCount);
|
||||
name.add("高处作业");
|
||||
date.add(gczyCount);
|
||||
name.add("吊装作业");
|
||||
date.add(dzzyCount);
|
||||
name.add("临时用电");
|
||||
date.add(lsydCount);
|
||||
name.add("动土作业");
|
||||
date.add(dtzyCount);
|
||||
name.add("断路作业");
|
||||
date.add(dlzyCount);
|
||||
returnMap.put("clickDate",clickDate);
|
||||
returnMap.put("name",name);
|
||||
returnMap.put("date",date);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData statisticsHighRiskWorkByStateOrder(PageData pd) throws Exception {
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
return mapEightMapper.statisticsHighRiskWorkByStateOrder(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listHighRiskWorkOrder(Page page) throws Exception {
|
||||
return mapEightMapper.realTimeHighRiskWorklistPageOrder(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllHighRiskWorkLocationOrder(PageData pd) throws Exception {
|
||||
List<PageData> r = new ArrayList<>();
|
||||
String typeStr = pd.getString("TYPE");
|
||||
//动火
|
||||
if(StringUtils.equals(typeStr,"HOTWORK")){
|
||||
r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
|
||||
//临时用电
|
||||
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
|
||||
r = mapEightMapper.getELECTRICITYHighRiskWorkLocationOrder(pd);
|
||||
//盲板
|
||||
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
|
||||
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocationOrder(pd);
|
||||
// 高处
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
r = mapEightMapper.getHIGHWORKHighRiskWorkLocationOrder(pd);
|
||||
//有限空间
|
||||
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
|
||||
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocationOrder(pd);
|
||||
//吊装
|
||||
}else if(StringUtils.equals(typeStr,"HOISTING")){
|
||||
r = mapEightMapper.getHOISTINGHighRiskWorkLocationOrder(pd);
|
||||
//动土
|
||||
}else if(StringUtils.equals(typeStr,"BREAKGROUND")){
|
||||
r = mapEightMapper.getBREAKGROUNDHighRiskWorkLocationOrder(pd);
|
||||
//断路
|
||||
}else if(StringUtils.equals(typeStr,"CUTROAD")){
|
||||
r = mapEightMapper.getCUTROADHighRiskWorkLocationOrder(pd);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getByIdOrder(PageData pd) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
String typeStr = pd.getString("TYPE");
|
||||
String idStr = pd.getString("id");
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if(StringUtils.equals(typeStr,"HOTWORK")){
|
||||
pd.put("HOTWORKAPPLICATION_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHOTWORK(pd);
|
||||
pd = dianhuo(pd);
|
||||
List<PageData> list = mapEightMapper.getList(pd);
|
||||
//这里封装前台要的参数
|
||||
pd = shenpi(pd,list);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHOTWORK(pd));
|
||||
map.put("gasList", mapEightMapper.listAllHOTWORK(pd));
|
||||
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
|
||||
pd.put("ELECTRICITY_ID",idStr);
|
||||
pd = mapEightMapper.findByIdELECTRICITYOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresELECTRICITYOrder(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
|
||||
pd.put("BLINDBOARD_ID",idStr);
|
||||
pd = mapEightMapper.findByIdBLINDBOARDOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresBLINDBOARDOrder(pd));
|
||||
PageData Info = mapEightMapper.findByIdJWDOrder(pd);
|
||||
pd.put("TYPE",105);//盲板位置图
|
||||
pd.put("FOREIGN_KEY",pd.getString("BLINDBOARD_ID"));
|
||||
List<PageData> ImgList = mapEightMapper.listAllBLINDBOARD(pd);
|
||||
map.put("Info",Info);//获取经纬度
|
||||
map.put("ImgList",ImgList);
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
pd.put("HIGHWORK_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHIGHWORKOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHIGHWORKOrder(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
|
||||
//没有有限空间作业
|
||||
//pd.put("CONFINEDSPACE_ID",idStr);
|
||||
//pd = mapEightMapper.findByIdCONFINEDSPACE(pd);
|
||||
pd = new PageData();
|
||||
map.put("measuresList", null);
|
||||
map.put("gasList", null);
|
||||
}else if(StringUtils.equals(typeStr,"HOISTING")){
|
||||
pd.put("HOISTING_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHOISTINGOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHOISTINGOrder(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BREAKGROUND")){
|
||||
pd.put("BREAKGROUND_ID",idStr);
|
||||
pd = mapEightMapper.findByIdBREAKGROUNDOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresBREAKGROUNDOrder(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CUTROAD")){
|
||||
pd.put("CUTROAD_ID",idStr);
|
||||
pd = mapEightMapper.findByIdCUTROADOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresCUTROADOrder(pd));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* @Description: 曹妃甸项目 暂时未用
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/12/13/013 16:45
|
||||
* @Param: [com.zcloud.entity.PageData] [pd]
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@Override
|
||||
public Object getAllWorkUserCards(PageData pd) {
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData allWorkUserIds = mapEightMapper.getAllWorkUserIds(pd);
|
||||
/*String userCards = "";*/
|
||||
if (allWorkUserIds!=null){
|
||||
//临时用电
|
||||
String electricity_work_user_ids = allWorkUserIds.getString("ELECTRICITY_WORK_USER_IDS");
|
||||
//受限空间作业
|
||||
String confinedspace_work_user_ids = allWorkUserIds.getString("CONFINEDSPACE_WORK_USER_IDS");
|
||||
//高处作业
|
||||
String hiwork_work_user_ids = allWorkUserIds.getString("HIGHWORK_WORK_USER_IDS");
|
||||
//吊装作业
|
||||
String hoisting_work_user_ids = allWorkUserIds.getString("HOISTING_WORK_USER_IDS");
|
||||
//盲板作业
|
||||
String blindboard_work_user_ids = allWorkUserIds.getString("BLINDBOARD_WORK_USER_IDS");
|
||||
//拼接ids
|
||||
String ids = "";
|
||||
if (Tools.notEmpty(electricity_work_user_ids)){
|
||||
ids += electricity_work_user_ids + ",";
|
||||
}
|
||||
if (Tools.notEmpty(confinedspace_work_user_ids)){
|
||||
ids += confinedspace_work_user_ids + ",";
|
||||
}
|
||||
if (Tools.notEmpty(hiwork_work_user_ids)){
|
||||
ids += hiwork_work_user_ids + ",";
|
||||
}
|
||||
if (Tools.notEmpty(hoisting_work_user_ids)){
|
||||
ids += hoisting_work_user_ids + ",";
|
||||
}
|
||||
if (Tools.notEmpty(blindboard_work_user_ids)){
|
||||
ids += blindboard_work_user_ids + ",";
|
||||
}
|
||||
String[] split = ids.split(",");
|
||||
//查询作业人员卡号
|
||||
// List<String> userCardsByIds = usersMapper.getUserCardsByIds(split);
|
||||
/* for (String usercard : userCardsByIds){
|
||||
if (Tools.notEmpty(usercard) && !userCards.contains(usercard)){
|
||||
userCards += usercard + ",";
|
||||
}
|
||||
}*/
|
||||
// map.put("userCardsList", userCardsByIds);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
private PageData shenpi(PageData pd,List<PageData> list){
|
||||
List<PageData> specialUserList = new ArrayList<>();
|
||||
for (PageData userPageData : list){
|
||||
String type = userPageData.get("STATE").toString();
|
||||
if("0".equals(type)){ // 申请办理人
|
||||
pd.put("APPLY_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("APPLY_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("APPLY_USER_ID",userPageData.getString("USER_ID"));
|
||||
}else if("1".equals(type)){ // 动火单位确认人
|
||||
pd.put("HOT_WORK_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("HOT_WORK_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("HOT_WORK_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("HOT_WORK_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("HOT_WORK_USER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("HOT_WORK_USER_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("HOT_WORK_USER_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("2".equals(type)){ // 项目发包单位
|
||||
pd.put("PROJECT_UNIT_LEADER_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("PROJECT_UNIT_LEADER_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("PROJECT_UNIT_LEADER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("PROJECT_UNIT_LEADER_NAME",userPageData.getString("userName"));
|
||||
pd.put("PROJECT_UNIT_LEADER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("PROJECT_UNIT_LEADER_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("PROJECT_UNIT_LEADER_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("3".equals(type)){ // 现场管辖单位负责人
|
||||
pd.put("UNIT_LEADER_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("UNIT_LEADER_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("UNIT_LEADER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("UNIT_LEADER_NAME",userPageData.getString("userName"));
|
||||
pd.put("UNIT_LEADER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("UNIT_LEADER_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("UNIT_LEADER_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("4".equals(type)){ //动火许可签发单位负责人
|
||||
pd.put("ISSUING_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("ISSUING_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("ISSUING_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("ISSUING_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("ISSUING_USER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("ISSUING_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("ISSUING_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("5".equals(type)){ // 安全总监审批
|
||||
pd.put("SAFETY_DIRECTOR_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("SAFETY_DIRECTOR_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("SAFETY_DIRECTOR_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("SAFETY_DIRECTOR_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("SAFETY_DIRECTOR_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("SAFETY_DIRECTOR_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("SAFETY_DIRECTOR_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("6".equals(type)){ // 现场负责人接收
|
||||
pd.put("SITE_LEADER_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("SITE_LEADER_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("SITE_LEADER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("SITE_LEADER_NAME",userPageData.getString("userName"));
|
||||
pd.put("SITE_LEADER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("SITE_DIRECTOR_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("SITE_DIRECTOR_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("7".equals(type)){ // 动火前
|
||||
pd.put("HOT_WORK_PERSON_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("HOT_WORK_PERSON_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("HOT_WORK_PERSON_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("HOT_WORK_PERSON_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("HOT_WORK_PERSON_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("HOT_WORK_PERSON_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("8".equals(type)){ // 现在负责人
|
||||
pd.put("PERSON_CONFIRM_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("PERSON_CONFIRM_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("PERSON_CONFIRM_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("PERSON_CONFIRM_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("PERSON_CONFIRM_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("PERSON_CONFIRM_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("9".equals(type)){ // 动火后
|
||||
pd.put("HOT_WORK_AFTER_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("HOT_WORK_AFTER_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("HOT_WORK_AFTER_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("HOT_WORK_AFTER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("HOT_WORK_AFTER_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("HOT_WORK_AFTER_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("10".equals(type)){ // 延时监火
|
||||
pd.put("TIME_LAPSE_FIREMAN_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("TIME_LAPSE_FIREMAN_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("TIME_LAPSE_FIREMAN_NAME",userPageData.getString("userName"));
|
||||
pd.put("TIME_LAPSE_FIREMAN_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("TIME_LAPSE_FIREMAN_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("TIME_LAPSE_FIREMAN_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}
|
||||
else if("21".equals(type)){ // 动火操作人
|
||||
String userName = userPageData.getString("userName2") +",";
|
||||
String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString();
|
||||
pd.put("HOT_WORK_OPERATOR_NAME",oldName + userName);
|
||||
}else if("22".equals(type)){ // 动火操作人
|
||||
pd.put("SUPERVISOR_OF_HOT_WORK_UNIT",userPageData.getString("USER_ID"));
|
||||
String userName = userPageData.getString("userName2") +",";
|
||||
String oldName = Tools.isEmpty(pd.get("HOT_WORK_OPERATOR_NAME"))?"":pd.get("HOT_WORK_OPERATOR_NAME").toString();
|
||||
pd.put("SUPERVISOR_OF_HOT_WORK_UNIT_NAME",oldName + userName);
|
||||
}else if("24".equals(type)){ // 需要气体检测
|
||||
pd.put("GAS_TESTING_DEPARTMENT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("GAS_TESTING_DEPARTMENT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("GAS_TESTING_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("GAS_TESTING_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("GAS_TESTING_USER_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("GAS_TESTING_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("GAS_TESTING_PRINCIPAL_TIME",userPageData.getString("OPERATTIME"));
|
||||
}else if("30".equals(type)){ // 特级动火 动火负责人确认
|
||||
pd.put("projectCompetent_DEPT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("projectCompetent_DEPT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("projectCompetent_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("projectCompetent_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("projectCompetent_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("projectCompetent_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("projectCompetent_TYPE",userPageData.getString("TYPE"));
|
||||
// APP回显使用
|
||||
|
||||
pd.put("CHARGECONFIRM_DEPT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("CHARGECONFIRM_DEPT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("CHARGECONFIRM_USER_ID",userPageData.getString("USER_ID"));
|
||||
pd.put("CHARGECONFIRM_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("CHARGECONFIRM_USER_PHONE",userPageData.getString("userPhone"));
|
||||
}else if("31".equals(type)){ // 特级动火 动火负责人确认
|
||||
pd.put("projectSupervisor_DEPT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("projectSupervisor_DEPT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("projectSupervisor_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("projectSupervisor_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("projectCompetent_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("projectSupervisor_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("32".equals(type)){ // 特级动火 动火负责人确认
|
||||
pd.put("projectPreliminarily_DEPT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("projectPreliminarily_DEPT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("projectPreliminarily_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("projectPreliminarily_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("projectPreliminarily_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("projectPreliminarily_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("projectPreliminarily_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("33".equals(type)){ // 特级动火 动火负责人确认
|
||||
pd.put("inspectorGeneral_DEPT_ID",userPageData.getString("DEPARTMENT_ID"));
|
||||
pd.put("inspectorGeneral_DEPT_NAME",userPageData.getString("deptName"));
|
||||
pd.put("inspectorGeneral_USER_NAME",userPageData.getString("userName"));
|
||||
pd.put("inspectorGeneral_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("inspectorGeneral_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("inspectorGeneral_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("inspectorGeneral_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("34".equals(type)){ //分公司主要负责人
|
||||
pd.put("OFFICE_RESPOMSIBLE_DEPT_NAME",userPageData.getString("REGULATORY_DEPT_NAME"));
|
||||
pd.put("OFFICE_RESPOMSIBLE_USER_NAME",userPageData.getString("REGULATORY_USER_NAME"));
|
||||
pd.put("OFFICE_RESPOMSIBLE_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("OFFICE_RESPOMSIBLE_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("OFFICE_RESPOMSIBLE_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("OFFICE_RESPOMSIBLE_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("35".equals(type)){ // 特级动火 安全监督部初审
|
||||
pd.put("SUPERVISION_DEPARTMENT_DEPT_NAME",userPageData.getString("REGULATORY_DEPT_NAME"));
|
||||
pd.put("SUPERVISION_DEPARTMENT_USER_NAME",userPageData.getString("REGULATORY_USER_NAME"));
|
||||
pd.put("SUPERVISION_DEPARTMENT_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("SUPERVISION_DEPARTMENT_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("SUPERVISION_DEPARTMENT_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("SUPERVISION_DEPARTMENT_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("36".equals(type)){ // 特级动火 安委会办公室审批
|
||||
pd.put("SECURITY_COMMITTEE_DEPT_NAME",userPageData.getString("REGULATORY_DEPT_NAME"));
|
||||
pd.put("SECURITY_COMMITTEE_USER_NAME",userPageData.getString("REGULATORY_USER_NAME"));
|
||||
pd.put("SECURITY_COMMITTEE_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("SECURITY_COMMITTEE_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("SECURITY_COMMITTEE_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("SECURITY_COMMITTEE_TYPE",userPageData.getString("TYPE"));
|
||||
}else if("37".equals(type)){ // 特级动火 安全总监签批
|
||||
pd.put("SAFETY_DIRECTOR_DEPT_NAME",userPageData.getString("REGULATORY_DEPT_NAME"));
|
||||
pd.put("SAFETY_DIRECTOR_USER_NAME",userPageData.getString("REGULATORY_USER_NAME"));
|
||||
pd.put("SAFETY_DIRECTOR_PHONE",userPageData.getString("userPhone"));
|
||||
pd.put("SAFETY_DIRECTOR_PRINCIPAL",userPageData.getString("AUTOGRAPH"));
|
||||
pd.put("SAFETY_DIRECTOR_OPERATTIME",userPageData.getString("OPERATTIME"));
|
||||
pd.put("SAFETY_DIRECTOR_TYPE",userPageData.getString("TYPE"));
|
||||
}
|
||||
}
|
||||
pd.put("specialUserList", specialUserList);
|
||||
return pd;
|
||||
}
|
||||
|
||||
private PageData dianhuo(PageData pd){
|
||||
if(StringUtils.isBlank(pd.getString("HOT_WORK_METHOD_NAME"))){
|
||||
String zidian = pd.getString("HOT_WORK_METHOD_ID");
|
||||
List<String> shuzu = Arrays.asList(zidian.split(","));
|
||||
List<String> wenzi = mapEightMapper.getListDongHuo(shuzu);
|
||||
String pinjie = String.join(",",wenzi);
|
||||
pd.put("HOT_WORK_METHOD_NAME",pinjie);
|
||||
}
|
||||
return pd;
|
||||
}
|
||||
}
|
||||
|
|
@ -352,4 +352,18 @@ public interface UsersService {
|
|||
void resetCardNo(PageData pd);
|
||||
|
||||
PageData getUserInfo(PageData pd);
|
||||
|
||||
PageData getPersonByCardNo(PageData pd);
|
||||
|
||||
PageData findByCardNo(PageData pd);
|
||||
|
||||
Object getCurrentLocation(PageData pd);
|
||||
|
||||
Object getCurrentPersonnelData(PageData pd) throws Exception;
|
||||
|
||||
Object getPersonPositioningStatistics(PageData pd) throws Exception;
|
||||
|
||||
Object getCurrentLocationCount(PageData pd);
|
||||
|
||||
void updateCardNoByPhone(String phone, String cardId);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.system.Role;
|
||||
import com.zcloud.util.HttpRequestUtil;
|
||||
import com.zcloud.util.PerLocUtil;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -23,10 +31,12 @@ import com.zcloud.service.system.UsersService;
|
|||
@Service
|
||||
@Transactional //开启事物
|
||||
public class UsersServiceImpl implements UsersService {
|
||||
|
||||
@Autowired
|
||||
private PerLocUtil perLocUtil;
|
||||
@Autowired
|
||||
private UsersMapper usersMapper;
|
||||
|
||||
@Value("${perLoc.url}")
|
||||
private String url;
|
||||
/**通
|
||||
* @param pd
|
||||
* @return
|
||||
|
@ -473,4 +483,149 @@ public class UsersServiceImpl implements UsersService {
|
|||
public PageData getUserInfo(PageData pd) {
|
||||
return usersMapper.getUserInfo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getPersonByCardNo(PageData pd) {
|
||||
return usersMapper.getPersonByCardNo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findByCardNo(PageData pd) {
|
||||
return usersMapper.findByCardNo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCurrentLocation(PageData pd) {
|
||||
// Map<String,Object> map = new HashMap<String,Object>();
|
||||
// String errInfo = "success";
|
||||
// String _response = HttpRequestUtil.doGetUser( url + "/deploy/psnmgt/getTheCurrentLocationOfAllEmployeesWhosePersonnelCardsAreOnline?office=", perLocUtil.getToken());
|
||||
// if (Tools.notEmpty(_response)) {
|
||||
// JSONObject response = JSONObject.parseObject(_response);
|
||||
// if (response.get("data")!=null){
|
||||
// List<PageData> _varList = JSONObject.parseArray(JSON.toJSON(response.get("data")).toString(), PageData.class);
|
||||
// List<PageData> varList = new ArrayList<>();
|
||||
// if (!Tools.isEmpty(_varList)){
|
||||
// for (PageData varData : _varList){
|
||||
// List<String> position = JSONObject.parseArray(JSON.toJSON(varData.get("coordinate")).toString(), String.class);
|
||||
// if (position!=null){
|
||||
// varData.put("LONGITUDE",position.get(0));
|
||||
// varData.put("LATITUDE",position.get(1));
|
||||
// }
|
||||
// varData.put("NAME",varData.getString("name"));
|
||||
// varList.add(varData);
|
||||
// }
|
||||
// }
|
||||
// map.put("varList",varList);
|
||||
// }
|
||||
// }
|
||||
// map.put("result",errInfo);
|
||||
return ReturnMap.ok();
|
||||
}
|
||||
@Override
|
||||
public Object getCurrentLocationCount(PageData pd){
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
return ReturnMap.ok();
|
||||
// try {
|
||||
// String _response = HttpRequestUtil.doGetUser( url + "/deploy/psnmgt/getTheCurrentLocationOfAllEmployeesWhosePersonnelCardsAreOnline?office=", perLocUtil.getToken());
|
||||
// map.put("perCount",0);
|
||||
// if (Tools.notEmpty(_response)) {
|
||||
// JSONObject response = JSONObject.parseObject(_response);
|
||||
// if (response.get("data")!=null){
|
||||
// List<PageData> _varList = JSONObject.parseArray(JSON.toJSON(response.get("data")).toString(), PageData.class);
|
||||
// map.put("perCount",_varList.size());
|
||||
// }
|
||||
// }
|
||||
// map.put("result",errInfo);
|
||||
// } catch (Exception e){
|
||||
// map.put("result", "error");
|
||||
// map.put("msg", "第三方登录失败");
|
||||
//
|
||||
// }
|
||||
//
|
||||
// return map;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCardNoByPhone(String phone, String cardId) {
|
||||
usersMapper.updateCardNoByPhone(phone, cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员在线统计数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getCurrentPersonnelData(PageData pd) throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
String path = url + pd.getString("route") + "?office=";
|
||||
String _response = HttpRequestUtil.doGetUser(path, perLocUtil.getToken());
|
||||
if (Tools.notEmpty(_response)) {
|
||||
JSONObject response = JSONObject.parseObject(_response);
|
||||
if(response.get("data") != null && Tools.notEmpty(response.get("data").toString())){
|
||||
List<PageData> _varList = JSONObject.parseArray(JSON.toJSON(response.get("data")).toString(), PageData.class);
|
||||
PageData resultPd = new PageData();
|
||||
int internalPersonCount = 0; // 内部人员在线数量
|
||||
int outsourcingPersonCount = 0; // 外协人员在线数量
|
||||
int temporaryPersonCount = 0; // 临时人员在线数量
|
||||
if (!Tools.isEmpty(_varList)) {
|
||||
for (PageData pageData : _varList) {
|
||||
if ("内部员工".equals(pageData.getString("officeName"))){ // 内部员工
|
||||
internalPersonCount++;
|
||||
continue;
|
||||
}
|
||||
if ("外协员工".equals(pageData.getString("officeName"))){
|
||||
outsourcingPersonCount++;
|
||||
continue;
|
||||
}
|
||||
if ("临时员工".equals(pageData.getString("officeName"))){
|
||||
temporaryPersonCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
resultPd.put("onlinePersonCount",_varList.size());
|
||||
resultPd.put("internalPersonCount",internalPersonCount);
|
||||
resultPd.put("outsourcingPersonCount",outsourcingPersonCount);
|
||||
resultPd.put("temporaryPersonCount", temporaryPersonCount);
|
||||
map.put("pd",resultPd);
|
||||
}
|
||||
|
||||
}
|
||||
map.put("result",errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getPersonPositioningStatistics(PageData pd) throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
String path = url + pd.getString("route");
|
||||
String _response = HttpRequestUtil.doGetUser(path, perLocUtil.getToken());
|
||||
if (Tools.notEmpty(_response)) {
|
||||
JSONObject response = JSONObject.parseObject(_response);
|
||||
List<PageData> _varList = JSONObject.parseArray(JSON.toJSON(response.get("data")).toString(), PageData.class);
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
if (!Tools.isEmpty(_varList)) {
|
||||
for (PageData pageData : _varList) {
|
||||
PageData data = new PageData();
|
||||
data.put("cardNo",pageData.getString("cardNo"));
|
||||
data.put("name",pageData.getString("name"));
|
||||
data.put("cardType", (boolean) pageData.get("cardType") ? "在线" : "离线");
|
||||
varList.add(data);
|
||||
}
|
||||
}
|
||||
if (varList.size() > 8) {
|
||||
map.put("varList",varList.subList(0,8));
|
||||
} else {
|
||||
map.put("varList",varList);
|
||||
}
|
||||
}
|
||||
map.put("result",errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,285 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
||||
/**
|
||||
* description: http请求工具类
|
||||
*
|
||||
* @date 2022-07-01
|
||||
*/
|
||||
public class HttpRequestUtil {
|
||||
|
||||
public static String sendRequest(String urlParam) throws Exception {
|
||||
InputStream inputStream = null;
|
||||
BufferedReader buffer = null;
|
||||
try {
|
||||
URL url = new URL(urlParam);
|
||||
URLConnection con = url.openConnection();
|
||||
//设置请求需要返回的数据类型和字符集类型
|
||||
con.setRequestProperty("Content-Type", "application/json;charset=GBK");
|
||||
//允许写出
|
||||
con.setDoOutput(true);
|
||||
//允许读入
|
||||
con.setDoInput(true);
|
||||
//不使用缓存
|
||||
con.setUseCaches(false);
|
||||
//得到响应流
|
||||
inputStream = con.getInputStream();
|
||||
//将响应流转换成字符串
|
||||
StringBuffer resultBuffer = new StringBuffer();
|
||||
String line;
|
||||
buffer = new BufferedReader(new InputStreamReader(inputStream, "GBK"));
|
||||
while ((line = buffer.readLine()) != null) {
|
||||
resultBuffer.append(line);
|
||||
}
|
||||
return resultBuffer.toString();
|
||||
} catch (Exception e) {
|
||||
buffer.close();
|
||||
inputStream.close();
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getRestInformation(HttpServletRequest request) throws Exception {
|
||||
return getRestInformation(request, String.class);
|
||||
}
|
||||
|
||||
public static <T> T getRestInformation(HttpServletRequest request, Class<T> clazz) throws Exception {
|
||||
BufferedReader reader = null;
|
||||
try {
|
||||
|
||||
StringBuffer data = new StringBuffer();
|
||||
String line = null;
|
||||
reader = request.getReader();
|
||||
while (null != (line = reader.readLine())) data.append(line);
|
||||
reader.close();
|
||||
T result = JSONObject.parseObject(data.toString(), clazz);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("解析请求报文出错");
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Http get请求
|
||||
*
|
||||
* @param httpUrl 连接
|
||||
* @return 响应数据
|
||||
*/
|
||||
public static String doGet(String httpUrl) throws Exception {
|
||||
//链接
|
||||
HttpURLConnection connection = null;
|
||||
InputStream is = null;
|
||||
BufferedReader br = null;
|
||||
StringBuffer result = new StringBuffer();
|
||||
try {
|
||||
//创建连接
|
||||
URL url = new URL(httpUrl);
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
//设置请求方式
|
||||
connection.setRequestMethod("GET");
|
||||
//设置连接超时时间
|
||||
connection.setReadTimeout(15000);
|
||||
//开始连接
|
||||
connection.connect();
|
||||
//获取响应数据
|
||||
if (connection.getResponseCode() == 200) {
|
||||
//获取返回的数据
|
||||
is = connection.getInputStream();
|
||||
if (null != is) {
|
||||
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
|
||||
String temp = null;
|
||||
while (null != (temp = br.readLine())) {
|
||||
result.append(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (null != br) {
|
||||
try {
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (null != is) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//关闭远程连接
|
||||
connection.disconnect();
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Http get请求
|
||||
*
|
||||
* @param httpUrl 连接
|
||||
* @return 响应数据
|
||||
*/
|
||||
public static String doGetUser(String httpUrl,String token) throws Exception {
|
||||
//链接
|
||||
HttpURLConnection connection = null;
|
||||
InputStream is = null;
|
||||
BufferedReader br = null;
|
||||
StringBuffer result = new StringBuffer();
|
||||
try {
|
||||
//创建连接
|
||||
URL url = new URL(httpUrl);
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
//设置请求方式
|
||||
connection.setRequestMethod("GET");
|
||||
//设置连接超时时间
|
||||
connection.setReadTimeout(15000);
|
||||
//设置token
|
||||
connection.setRequestProperty("Authorization", token);
|
||||
//开始连接
|
||||
connection.connect();
|
||||
//获取响应数据
|
||||
if (connection.getResponseCode() == 200) {
|
||||
//获取返回的数据
|
||||
is = connection.getInputStream();
|
||||
if (null != is) {
|
||||
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
|
||||
String temp = null;
|
||||
while (null != (temp = br.readLine())) {
|
||||
result.append(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (null != br) {
|
||||
try {
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (null != is) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//关闭远程连接
|
||||
connection.disconnect();
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Http post请求
|
||||
*
|
||||
* @param httpUrl 连接
|
||||
* @param param 参数
|
||||
* @return
|
||||
*/
|
||||
public static String doPost(String httpUrl, @Nullable String param) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
//连接
|
||||
HttpURLConnection connection = null;
|
||||
OutputStream os = null;
|
||||
InputStream is = null;
|
||||
BufferedReader br = null;
|
||||
try {
|
||||
//创建连接对象
|
||||
URL url = new URL(httpUrl);
|
||||
//创建连接
|
||||
connection = (HttpURLConnection) url.openConnection();
|
||||
//设置请求方法
|
||||
connection.setRequestMethod("POST");
|
||||
//设置连接超时时间
|
||||
connection.setConnectTimeout(15000);
|
||||
//设置读取超时时间
|
||||
connection.setReadTimeout(15000);
|
||||
//DoOutput设置是否向httpUrlConnection输出,DoInput设置是否从httpUrlConnection读入,此外发送post请求必须设置这两个
|
||||
//设置是否可读取
|
||||
connection.setDoOutput(true);
|
||||
connection.setDoInput(true);
|
||||
//设置通用的请求属性
|
||||
// connection.setRequestProperty("accept", "*/*");
|
||||
// connection.setRequestProperty("connection", "Keep-Alive");
|
||||
// connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
|
||||
connection.setRequestProperty("Content-Type", "application/json;charset=utf-8");
|
||||
System.out.println(param);
|
||||
//拼装参数
|
||||
if (null != param && !param.equals("")) {
|
||||
//设置参数
|
||||
os = connection.getOutputStream();
|
||||
//拼装参数
|
||||
os.write(param.getBytes());
|
||||
}
|
||||
//设置权限
|
||||
//设置请求头等
|
||||
//开启连接
|
||||
//connection.connect();
|
||||
//读取响应
|
||||
if (connection.getResponseCode() == 200) {
|
||||
is = connection.getInputStream();
|
||||
if (null != is) {
|
||||
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
|
||||
String temp = null;
|
||||
while (null != (temp = br.readLine())) {
|
||||
result.append(temp);
|
||||
result.append("\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
//关闭连接
|
||||
if (br != null) {
|
||||
try {
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (os != null) {
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//关闭连接
|
||||
connection.disconnect();
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.mapper.datasource.map.PersonLocationTokenMapper;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 人员定位系统工具类
|
||||
* @author zhangyue
|
||||
* @date 2023/9/20/020 17:33
|
||||
*/
|
||||
@Component
|
||||
public class PerLocUtil {
|
||||
|
||||
@Value("${perLoc.url}")
|
||||
private String url;
|
||||
@Value("${perLoc.userName}")
|
||||
private String userName;
|
||||
@Value("${perLoc.pwd}")
|
||||
private String pwd;
|
||||
@Resource
|
||||
private PersonLocationTokenMapper personLocationTokenMapper;
|
||||
|
||||
public String getToken() throws Exception{
|
||||
String token = personLocationTokenMapper.getToken();
|
||||
// token 不为空。验证token是否失效
|
||||
if (Tools.notEmpty(token)){
|
||||
String httpResponseStr = HttpRequestUtil.doGet(this.url + "/system/token/verifyThatTheTokenIsInvalid"+"?token="+token);
|
||||
JSONObject httpResponse = JSONObject.parseObject(httpResponseStr);
|
||||
// token 有效
|
||||
if(Tools.notEmpty(httpResponseStr) && httpResponse != null
|
||||
&& httpResponse.get("code") != null && httpResponse.getInteger("code") == 200){
|
||||
return token;
|
||||
} else { // token 失效 或者报错
|
||||
token = goToLogin();
|
||||
}
|
||||
} else {
|
||||
token = goToLogin();
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
private String goToLogin() throws Exception{
|
||||
JSONObject request = new JSONObject();
|
||||
request.put("username", userName);
|
||||
request.put("password", pwd);
|
||||
String loginResStr = HttpRequestUtil.doPost(this.url + "/auth/login", request.toJSONString());
|
||||
JSONObject loginResponse = JSONObject.parseObject(loginResStr);
|
||||
// 登录成功
|
||||
if(Tools.notEmpty(loginResStr) && loginResponse != null
|
||||
&& loginResponse.get("code") != null && loginResponse.getInteger("code") == 200
|
||||
&& loginResponse.get("data") != null && loginResponse.getJSONObject("data").getString("access_token") != null){
|
||||
personLocationTokenMapper.edit(loginResponse.getJSONObject("data").getString("access_token"));
|
||||
return loginResponse.getJSONObject("data").getString("access_token");
|
||||
} else { // 登录失败
|
||||
throw new RuntimeException("第三方登录失败");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.util;
|
||||
|
||||
import com.zcloud.plugins.websocketPositioning.PositioningServerPool;
|
||||
import com.zcloud.service.bus.PositioningService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class PositioningScheduled {
|
||||
|
||||
@Autowired
|
||||
private PositioningService positioningService;
|
||||
|
||||
@Scheduled(cron ="0/10 * * * * ? ")
|
||||
public void syncPositioning(){
|
||||
try {
|
||||
System.out.println("==========定时发送人员定位信息==========");
|
||||
List<String> varList = positioningService.findRedisAll();
|
||||
PositioningServerPool.sendMessage(varList.toString());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Scheduled(cron ="0 0 2 * * ? ") // 凌晨两点
|
||||
public void syncCardNo(){
|
||||
try {
|
||||
System.out.println("==========定时同步定位卡号==========");
|
||||
positioningService.syncCardNo();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.fireresources.FireResourcesMapper;
|
||||
import com.zcloud.service.fireresources.FireResourcesService;
|
||||
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 FireResourcesService 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,37 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防水源
|
||||
* * xfsy01 消防水源
|
||||
* * xfbf01 消防泵房
|
||||
* * xfjyd01 防救援队 Rescue team
|
||||
* * xfkzs01 消防控制室 control
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Component
|
||||
public class AssembleControlRoomHandel extends AbsFireSourcesHandel {
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 消防控制室
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:37
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception {
|
||||
return fireResourcesMapper.getControlRoomDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AssemblyBeanFactory.register("xfkzs01", this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防水源
|
||||
* * xfsy01 消防水源
|
||||
* * xfbf01 消防泵房
|
||||
* * xfjyd01 防救援队
|
||||
* * xfkzs01 消防控制室
|
||||
* * Point 消防点位
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Component
|
||||
public class AssemblePointSourceHandel extends AbsFireSourcesHandel {
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 消防点位
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:38
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception {
|
||||
// 自己的业务
|
||||
|
||||
return fireResourcesMapper.getPointDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AssemblyBeanFactory.register("point", this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防水源
|
||||
* * xfsy01 消防水源
|
||||
* * xfbf01 消防泵房 PumpRoom
|
||||
* * xfjyd01 防救援队 Rescue team
|
||||
* * xfkzs01 消防控制室 control
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Component
|
||||
public class AssemblePumpRoomHandel extends AbsFireSourcesHandel {
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 消防泵房
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:38
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception {
|
||||
// 自己的业务
|
||||
return fireResourcesMapper.getPumpRoomDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AssemblyBeanFactory.register("xfbf01", this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防水源
|
||||
* * xfsy01 消防水源
|
||||
* * xfbf01 消防泵房
|
||||
* * xfjyd01 消防救援队 Rescue team
|
||||
* * xfkzs01 消防控制室
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Component
|
||||
public class AssembleRescueTeamHandel extends AbsFireSourcesHandel {
|
||||
|
||||
/**
|
||||
* @Description: 消防救援队
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:38
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception {
|
||||
pageData.put("CORPINFO_ID",null);
|
||||
// 自己的业务
|
||||
return fireResourcesMapper.getRescueTeamDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AssemblyBeanFactory.register("xfjyd01", this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 说明:消防水源
|
||||
* * xfsy01 消防水源
|
||||
* * xfbf01 消防泵房
|
||||
* * xfjyd01 防救援队
|
||||
* * xfkzs01 消防控制室
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Component
|
||||
public class AssembleWaterSourceHandel extends AbsFireSourcesHandel {
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 消防水源
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 15:38
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> assemblyDataHandel(PageData pageData) throws Exception {
|
||||
// 自己的业务
|
||||
return fireResourcesMapper.getWaterSourceDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
AssemblyBeanFactory.register("xfsy01", this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.zcloud.util.biMapFactory;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,26 +1,25 @@
|
|||
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
datasource.no1.url=jdbc:mysql://192.168.0.18:3306/qa-cmt-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||
datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||
datasource.no1.username=root
|
||||
datasource.no1.password=root
|
||||
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
datasource.no2.url=jdbc:mysql://192.168.0.18:3306/qa-cmt-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||
datasource.no1.password=Mysql@zcloud88888
|
||||
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||
datasource.no2.username=root
|
||||
datasource.no2.password=root
|
||||
datasource.no2.password=Mysql@zcloud88888
|
||||
|
||||
|
||||
|
||||
#druid\u8FDE\u63A5\u6C60
|
||||
#druid???
|
||||
spring.datasource.type: com.alibaba.druid.pool.DruidDataSource
|
||||
#\u6700\u5927\u6D3B\u8DC3\u6570
|
||||
#?????
|
||||
spring.datasource.maxActive: 20
|
||||
#\u521D\u59CB\u5316\u6570\u91CF
|
||||
#?????
|
||||
spring.datasource.initialSize: 1
|
||||
#\u6700\u5927\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u65F6\u95F4
|
||||
#??????????
|
||||
spring.datasource.maxWait: 60000
|
||||
#\u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5PSCache\u7684\u5927\u5C0F
|
||||
#??PSCache?????????PSCache???
|
||||
spring.datasource.poolPreparedStatements: true
|
||||
spring.datasource.maxPoolPreparedStatementPerConnectionSize: 20
|
||||
#\u901A\u8FC7connectionProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55
|
||||
#??connectionProperties?????mergeSql????SQL??
|
||||
#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
spring.datasource.minIdle: 1
|
||||
spring.datasource.timeBetweenEvictionRunsMillis: 60000
|
||||
|
@ -29,33 +28,100 @@ spring.datasource.validationQuery: select 1 from dual
|
|||
spring.datasource.testWhileIdle: true
|
||||
spring.datasource.testOnBorrow: false
|
||||
spring.datasource.testOnReturn: false
|
||||
#\u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u5C06\u65E0\u6CD5\u7EDF\u8BA1,'wall'\u7528\u4E8E\u9632\u706B\u5899
|
||||
#?????????filters????????sql?????,'wall'?????
|
||||
filters: stat, wall, log4j
|
||||
|
||||
#\u7F13\u5B58\u914D\u7F6E\u6587\u4EF6\u4F4D\u7F6E
|
||||
#????????
|
||||
spring.cache.ehcache.cofnig=ehcache.xml
|
||||
|
||||
#\u914D\u7F6E\u8FD9\u53E5\u8BDD,\u63A7\u5236\u53F0\u8F93\u51FAsql\u8BED\u53E5
|
||||
#?????,?????sql??
|
||||
logging.level.com.zcloud.mapper=debug
|
||||
|
||||
#\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F\u9650\u5236
|
||||
#????????
|
||||
spring.servlet.multipart.max-file-size=500MB
|
||||
spring.servlet.multipart.max-request-size=500MB
|
||||
|
||||
#activiti\u6A21\u578B\u68C0\u6D4B
|
||||
#activiti????
|
||||
spring.activiti.check-process-definitions=false
|
||||
|
||||
#\u5B57\u7B26
|
||||
#??
|
||||
spring.http.encoding.charset=UTF-8
|
||||
spring.http.encoding.force=true
|
||||
spring.http.encoding.enabled=true
|
||||
# \u5173\u95EDspringboot\u542F\u52A8\u65F6\u7684banner
|
||||
# ??springboot????banner
|
||||
spring.main.banner-mode=off
|
||||
#jar\u5305\u90E8\u7F72\u65F6\u53BB\u6389\u6CE8\u91CA
|
||||
#jar????????
|
||||
#web.upload-path=h:/
|
||||
#web.front-path=h:/
|
||||
#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path}
|
||||
#
|
||||
preventionxgf.api.url=http://192.168.0.18:8993/qa-prevention-xgf/
|
||||
qa-regulatory-gwj.api.url=http://192.168.0.18:8092/qa-regulatory-gwj/
|
||||
|
||||
#preventionxgf.api.url=http://192.168.0.79:8088
|
||||
#
|
||||
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
|
||||
|
||||
preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/
|
||||
qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/
|
||||
#?????
|
||||
smb.host=39.103.224.166
|
||||
smb.port=22
|
||||
smb.user=root
|
||||
smb.password=Zcloud@zcloud88888
|
||||
smb.basePath=/mnt/qgfile/file/
|
||||
|
||||
# \u6CA7\u5DDE\u77FF\u77F3\u7528\u6237\u6807\u8BC6
|
||||
czks-useridentity=CZKS
|
||||
czks-baseimgpath=https://qgqy.qhdsafety.com/file/
|
||||
czks-backendaddr=http://192.168.0.31:7811/qa-prevention-gwj/
|
||||
# \u6E2F\u52A1\u5C40\u7528\u6237\u6807\u8BC6
|
||||
gwj-useridentity=GWJ
|
||||
gwj-baseimgpath=https://qgqy.qhdsafety.com/file/
|
||||
gwj-backendaddr=http://192.168.0.31:8991/qa-prevention-gwj/
|
||||
|
||||
#Mq\u914D\u7F6E
|
||||
rocketmq.consumer.group2=edu-admin-edit
|
||||
rocketmq.consumer.group1=edu-admin-add
|
||||
#rocketmq.name-server=10.0.140.141:9876
|
||||
#rocketmq.name-server=192.168.0.70:9876
|
||||
rocketmq.name-server=192.168.0.31:9876
|
||||
rocketmq.producer.group=libmiddle
|
||||
rocketmq.producer.send-message-timeout=3000
|
||||
rocketmq.producer.compress-message-body-threshold=4096
|
||||
rocketmq.producer.max-message-size=4194304
|
||||
rocketmq.producer.retry-times-when-send-failed=3
|
||||
rocketmq.producer.retry-next-server=true
|
||||
rocketmq.producer.retry-times-when-send-async-failed=3
|
||||
## topic \u524D\u7F00
|
||||
mq.topic.info=info
|
||||
mq.topic.eightWork=eightWork
|
||||
mq.group.info=scheduled_tasks
|
||||
mq.group.eightWork=scheduled_tasks_eightWork
|
||||
#\u5BF9\u63A5\u4EBA\u5458\u5B9A\u4F4D
|
||||
perLoc.url=http://192.168.210.32:8084
|
||||
perLoc.userName=qaaqadmin
|
||||
perLoc.pwd=Cfd2023@
|
||||
#\u6570\u636E\u540C\u6B65
|
||||
mq.topic.docking=docking
|
||||
mq.group.docking=scheduled_tasks_docking
|
||||
|
||||
base.info.USER_IDENTITY=GWJ
|
||||
base.info.baseImgPath=https://qgqy.qhdsafety.com/file/
|
||||
base.info.BACKENDADDR=http://192.168.0.31:8992/qa-regulatory-gwj/
|
||||
|
||||
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
|
||||
spring.redis.database=0
|
||||
# Redis\u670D\u52A1\u5668\u5730\u5740
|
||||
spring.redis.host=39.103.224.166
|
||||
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
|
||||
spring.redis.port=63799
|
||||
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
|
||||
spring.redis.password=redis@zcloud88888
|
||||
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
||||
spring.redis.jedis.pool.max-active=20
|
||||
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
|
||||
spring.redis.jedis.pool.max-wait=-1
|
||||
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
|
||||
spring.redis.jedis.pool.max-idle=10
|
||||
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
|
||||
spring.redis.jedis.pool.min-idle=0
|
||||
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09
|
||||
spring.redis.timeout=1000
|
||||
|
|
|
@ -29,3 +29,8 @@ imPort=8879
|
|||
alarmIp=192.168.210.7
|
||||
;重大危险源报警推送端口
|
||||
alarmPort=8889
|
||||
|
||||
;人员定位
|
||||
alarmIp=127.0.0.1
|
||||
;人员定位
|
||||
alarmPort=8899
|
||||
|
|
|
@ -0,0 +1,319 @@
|
|||
<?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.bimap.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'
|
||||
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.AREA IS NOT NULL
|
||||
AND ci.AREA != ''
|
||||
<if test="AREA != null and AREA != ''">
|
||||
AND ci.AREA = #{AREA}
|
||||
</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.AREA IS NOT NULL
|
||||
AND ci.AREA != ''
|
||||
<if test="AREA != null and AREA != ''">
|
||||
AND ci.AREA = #{AREA}
|
||||
</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.AREA IS NOT NULL
|
||||
AND ci.AREA != ''
|
||||
<if test="AREA != null and AREA != ''">
|
||||
AND ci.AREA = #{AREA}
|
||||
</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.AREA IS NOT NULL
|
||||
AND ci.AREA != ''
|
||||
<if test="AREA != null and AREA != ''">
|
||||
AND ci.AREA = #{AREA}
|
||||
</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>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
<?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.PersonLocationTokenMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_PERSON_LOCATION_TOKEN
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
TOKEN
|
||||
) values (
|
||||
#{TOKEN}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="string">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
TOKEN = #{TOKEN}
|
||||
</update>
|
||||
|
||||
<select id="getToken" resultType="string">
|
||||
select
|
||||
TOKEN
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,33 @@
|
|||
<?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.docking.DockingRelationMapper">
|
||||
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_DOCKING_RELATION
|
||||
</sql>
|
||||
|
||||
<sql id="Field">
|
||||
f.DOCKING_RRELATION_ID,
|
||||
f.ORIGINURL,
|
||||
f.TARGETURL
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{DOCKING_RRELATION_ID},
|
||||
#{ORIGINURL},
|
||||
#{TARGETURL}
|
||||
</sql>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1=1
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -2,6 +2,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.gatemachine.GateAreaMapper">
|
||||
<sql id="table"> mk_gate_area </sql>
|
||||
|
||||
<sql id="filed">
|
||||
f.GATE_AREA_ID,
|
||||
f.GATE_AREA_NAME,
|
||||
|
|
|
@ -166,8 +166,23 @@
|
|||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
<select id="listAllForMap" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
PLATFORMVIDEOMANAGEMENT_ID as id,
|
||||
NAME as NAME,
|
||||
NAME as MAP_POINT_NAME,
|
||||
LONGITUDE as LONGITUDE,
|
||||
LATITUDE as LATITUDE,
|
||||
INDEXCODE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where 1 = 1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
|
|
|
@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JCR,
|
||||
CORPINFO_ID,
|
||||
CARDNO,
|
||||
USER_IDENTITY,
|
||||
ISDELETE
|
||||
</sql>
|
||||
<!-- 字段 -->
|
||||
|
@ -131,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
f.JCR,
|
||||
f.CORPINFO_ID,
|
||||
f.CARDNO,
|
||||
f.USER_IDENTITY,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
<!-- 字段值 -->
|
||||
|
@ -1203,6 +1205,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update sys_user set CARDNO = null where CARDNO = #{CARDNO}
|
||||
</update>
|
||||
|
||||
<update id="updateCardNoByPhone">
|
||||
update sys_user
|
||||
set CARDNO = #{cardId}
|
||||
where USERNAME = #{phone}
|
||||
</update>
|
||||
|
||||
<!-- 通过岗位ID查用户列表-->
|
||||
<select id="findByPostId" parameterType="pd" resultType="pd">
|
||||
select
|
||||
|
@ -1328,4 +1336,77 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPersonByCardNo" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
u.USER_ID,
|
||||
u.NAME,
|
||||
u.USERNAME,
|
||||
u.USERAVATARURL,
|
||||
u.IS_HAZARDCONFIRMER,
|
||||
u.PERSON_TYPE,
|
||||
d.`NAME` DEPARTMENT_NAME,
|
||||
p.`NAME` POST_NAME,
|
||||
u.CARDNO,
|
||||
c.CORP_NAME
|
||||
FROM
|
||||
`qa-czks-prevention`.sys_user u
|
||||
LEFT JOIN `qa-czks-prevention`.bus_corp_info c ON u.CORPINFO_ID = c.CORPINFO_ID
|
||||
LEFT JOIN `qa-czks-prevention`.sys_post p on u.POST_ID = p.POST_ID
|
||||
LEFT JOIN `qa-czks-prevention`.oa_department d on u.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
WHERE
|
||||
u.ISDELETE = 0 and
|
||||
u.CARDNO = #{CARDNO}
|
||||
</select>
|
||||
<select id="findByCardNo" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.NAME,
|
||||
u.ROLE_ID,
|
||||
u.LAST_LOGIN,
|
||||
u.IP,
|
||||
u.STATUS,
|
||||
u.BZ,
|
||||
u.SKIN,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
u.ROLE_IDS,
|
||||
u.DEPARTMENT_ID,
|
||||
u.CORPINFO_ID,
|
||||
u.FUN_IDS,
|
||||
u.APPID,
|
||||
u.POST_ID,
|
||||
u.ISMAIN,
|
||||
u.ERROR_COUNT,
|
||||
u.SORT,
|
||||
u.LEARNERCATEGORY,
|
||||
u.USERAVATARPREFIX,
|
||||
u.USERAVATARURL,
|
||||
u.SHIFTDUTYONE,
|
||||
u.SHIFTDUTYTWO,
|
||||
u.DURATION,
|
||||
u.WORKSTATUS,
|
||||
u.WORKPERIOD,
|
||||
u.IS_RECORDER,
|
||||
u.PERSONNEL_TYPE,
|
||||
u.IS_HAZARDCONFIRMER,
|
||||
u.IS_ONLINELEARNING,
|
||||
u.PERSON_TYPE,
|
||||
u.JCR,
|
||||
u.ISDELETE,
|
||||
u.PUSH_CID,
|
||||
u.EMPNO,
|
||||
u.CFD_STATUS,
|
||||
u.CARDNO,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
p.NAME as POST_NAME
|
||||
from
|
||||
sys_user u
|
||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||
left join sys_post p on p.POST_ID = u.POST_ID
|
||||
where
|
||||
u.CARDNO = #{CARDNO}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 545 KiB |
Loading…
Reference in New Issue