相关方端bug
parent
e2dc13b349
commit
4be8922c59
src/main
java/com/zcloud
mapper
service
map
impl
system
resources/mybatis
|
@ -0,0 +1,363 @@
|
|||
package com.zcloud.controller.api;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.BiTongjiService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/api/biTongji")
|
||||
public class ApiBiTongjiCotroller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private BiTongjiService biTongjiService;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String url;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
/**
|
||||
* 地图下方的统计 安全环保检查情况统计
|
||||
* 近8年数据
|
||||
* 港股公司和分公司
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCountInsByCorpSource")
|
||||
@ResponseBody
|
||||
public Object getCountInsByCorpSource() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> corpinfoAllList = biTongjiService.getCorpinfoAllByOrder(pd); // 所有需要统计的企业信息
|
||||
List<PageData> insList = biTongjiService.getCountInsByCorpSource(pd); // 数据库中有的
|
||||
Map<String, String> insMap = new HashMap<>(); // key= 企业id + 标识 ;val = 数量 ; 检查来源(4-监管端 5-企业端)
|
||||
for (PageData pageData : insList) {
|
||||
String key = pageData.getString("CORPINFO_ID") + "_" + pageData.getString("INSPECTION_SOURCE");
|
||||
String val = pageData.getString("count");
|
||||
insMap.put(key, val);
|
||||
}
|
||||
List<Map<String, Object>> valList = new ArrayList<>();
|
||||
for (PageData corpinfo : corpinfoAllList) {
|
||||
String supeCount = "0";
|
||||
String corpCount = "0";
|
||||
String corpinfoID = corpinfo.getString("CORPINFO_ID");
|
||||
if (insMap.containsKey(corpinfoID + "_4")) {
|
||||
supeCount = insMap.get(corpinfoID + "_4");
|
||||
}
|
||||
if (insMap.containsKey(corpinfoID + "_5")) {
|
||||
corpCount = insMap.get(corpinfoID + "_5");
|
||||
}
|
||||
Map<String, Object> corpinfoCount = new HashMap<>();
|
||||
corpinfoCount.put("corpinfName", corpinfo.getString("CORP_NAME"));
|
||||
corpinfoCount.put("supeCount", supeCount);
|
||||
corpinfoCount.put("corpCount", corpCount);
|
||||
valList.add(corpinfoCount);
|
||||
}
|
||||
map.put("varList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 按照隐患类型bi页进行统计
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/10/30/030 15:21
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getHiddenCountByHiddenType")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByHiddenType() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pageData = this.getPageData();
|
||||
new ArrayList<String>();
|
||||
//物的不安全状态
|
||||
//管理的缺陷
|
||||
//其他
|
||||
//环境的不安全因素
|
||||
//人的不安全因素
|
||||
List<String> typeList = Arrays.asList(
|
||||
"rdbaqys",
|
||||
"wdbaqzt",
|
||||
"hjdbaqys",
|
||||
"gldqx",
|
||||
"aqyh-qt"
|
||||
);
|
||||
pageData.put("typeList", typeList);
|
||||
List<PageData> varList = biTongjiService.getHiddenCountByHiddenType(pageData);
|
||||
map.put("result", errInfo);
|
||||
map.put("varList", varList);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 客户数据
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getUserCount")
|
||||
@ResponseBody
|
||||
public Object getUserCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
// Integer corpUserCount = biTongjiService.getCorpUser(pd); // 企业的所有人数
|
||||
List<PageData> corpUserCount = biTongjiService.getCorpUser2(pd); // 企业的所有人数
|
||||
|
||||
// Integer superUserCount = biTongjiService.getSupeUser(pd); // 部门的所有人数
|
||||
List<PageData> superUserCount = biTongjiService.getSupeUser2(pd); // 部门的所有人数
|
||||
|
||||
map.put("corpUserCount", corpUserCount.size());
|
||||
map.put("superUserCount", superUserCount.size());
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分公司使用统计 -- 人员数量
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCorpUserCountTop10")
|
||||
@ResponseBody
|
||||
public Object getCorpUserCountTop10() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> corpUserCountTop10 = biTongjiService.getCorpUserCountTop10(pd); // 所有需要统计的企业信息
|
||||
map.put("corpUserCountTop10", corpUserCountTop10);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//分子公司数量
|
||||
@RequestMapping(value = "/getCorpCount")
|
||||
@ResponseBody
|
||||
public Object getCorpCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> pageData = biTongjiService.listAllCorp(pd);
|
||||
int size = pageData.size();
|
||||
map.put("corpCount", size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
// 股份公司部门数量
|
||||
@RequestMapping(value = "/getRegulatoryDepartmentCount")
|
||||
@ResponseBody
|
||||
public Object getRegulatoryDepartmentCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd.put("PARENT_ID", "28945926d1e34cad8c6a91e2a18ae0ce"); // BI页统计只查询港股第一级部门
|
||||
List<PageData> pageData = (List<PageData>) departmentService.listAll(pd);
|
||||
int size = pageData.size();
|
||||
map.put("regulatoryDepartmentCount", size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
// 相关方单位数
|
||||
@RequestMapping("/unitCorpCount")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getUnitCorpCount() {
|
||||
Map<String, Object> result = restTemplate.getForObject(url + "/api/corpinfo/unitCorpInfo", Map.class);
|
||||
String errInfo = "success";
|
||||
List<PageData> unitCorp = (List<PageData>) result.get("unitCorp");
|
||||
int size = unitCorp.size();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("unitCorpCount", size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分公司使用统计 -- 部门使用情况
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCorpDeptCount")
|
||||
@ResponseBody
|
||||
public Object getCorpDeptCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
List<PageData> corpinfoAllList = biTongjiService.getCorpinfoAllByOrder(pd); // 所有需要统计的企业信息
|
||||
List<PageData> corpDeptCount = biTongjiService.getCorpDeptCount(pd); // 所有需要统计的企业信息
|
||||
Map<String, Object> corpLevelMap = new HashMap<>();
|
||||
for (PageData pageData : corpDeptCount) {
|
||||
corpLevelMap.put(pageData.getString("CORPINFO_ID") + "-" + pageData.getString("LEVEL"), pageData.getString("count"));
|
||||
}
|
||||
String[] levelAll = {"departmentLevel0001", "departmentLevel0002", "departmentLevel0003",};
|
||||
|
||||
List<Map<String, Object>> valList = new ArrayList<>();
|
||||
for (PageData corpinfo : corpinfoAllList) {
|
||||
Map<String, Object> valMap = new HashMap<>();
|
||||
for (int le = 0; le < levelAll.length; le++) {
|
||||
String key = corpinfo.getString("CORPINFO_ID") + "-" + levelAll[le];
|
||||
String deptLevelCount = "0";
|
||||
if (corpLevelMap.containsKey(key)) {
|
||||
deptLevelCount = corpLevelMap.get(key).toString();
|
||||
}
|
||||
valMap.put(levelAll[le], deptLevelCount);
|
||||
}
|
||||
valMap.put("corpName", corpinfo.getString("CORP_NAME"));
|
||||
valList.add(valMap);
|
||||
}
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* bus_inspection_safetyenvironmental
|
||||
* 秦港股份 统计 - 安全环保检查此事- 发现隐患数
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getSuperInsCountAndHiddeCount")
|
||||
@ResponseBody
|
||||
public Object getSuperInsCountAndHiddeCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Integer superInsCount = biTongjiService.getInsCountBySuper(pd);
|
||||
Integer superHiddenCount = biTongjiService.getHiddenCountBySuper(pd);
|
||||
map.put("superInsCount", superInsCount);
|
||||
map.put("superHiddenCount", superHiddenCount);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* bus_inspection_safetyenvironmental
|
||||
* 秦港股份 统计 - 安全环保检查此事- 发现隐患数
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getSuperInsBySubjectAndTop")
|
||||
@ResponseBody
|
||||
public Object getSuperInsBySubjectAndTop() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
|
||||
List<PageData> count = biTongjiService.getSuperInsCountBySubjec(pd);
|
||||
List<PageData> insList = biTongjiService.getSuperInsTop(pd);
|
||||
map.put("count", count);
|
||||
map.put("insList", insList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患来源 日常检查 安环环保检查 隐患快报
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHiddenCountBySubject")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountBySubject() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountBySubjec(pd);
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患处置情况 忽略 一般 重大 特殊
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHiddenCountByHiddenLevel")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByHiddenLevel() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountByHiddenLevel(pd);
|
||||
Integer countByStateIsSpecial = biTongjiService.getHiddenCountBySpecial(pd);
|
||||
PageData pecial = new PageData();
|
||||
pecial.put("count", countByStateIsSpecial);
|
||||
pecial.put("HIDDENLEVEL", "pecial");
|
||||
valList.add(pecial);
|
||||
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getHiddenCountByCorpInfoHandle")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByCorpInfoHandle() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountByCorpInfoHandle(pd);
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取高危作业数量
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHighriskworkCount")
|
||||
@ResponseBody
|
||||
public Object getHighriskworkCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHighriskworkCount(pd);
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,454 @@
|
|||
package com.zcloud.controller.bus;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.bus.HiddenService;
|
||||
import com.zcloud.service.map.BiTongjiService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.service.system.corpsystem.CorpUsersService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/biTongji")
|
||||
public class BiTongjiController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private BiTongjiService biTongjiService;
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
@Autowired
|
||||
private CorpUsersService corpUsersService;
|
||||
@Autowired
|
||||
private HiddenService hiddenService;
|
||||
/**
|
||||
* 地图下方的统计 安全环保检查情况统计
|
||||
* 近8年数据
|
||||
* 港股公司和分公司
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCountInsByCorpSource")
|
||||
@ResponseBody
|
||||
public Object getCountInsByCorpSource() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("istongji","1"); //2023年10月31日17:34:28 孙部提出的BI右侧中间的只统计 19加数据
|
||||
List<PageData> corpinfoAllList = biTongjiService.getCorpinfoAllByOrder(pd); // 所有需要统计的企业信息
|
||||
List<PageData> insList = biTongjiService.getCountInsByCorpSource(pd); // 数据库中有的
|
||||
List<PageData> hidList = biTongjiService.getHiddenBySource(pd);
|
||||
Map<String,String> insMap = new HashMap<>(); // key= 企业id + 标识 ;val = 数量 ; 检查来源(4-监管端 5-企业端)
|
||||
for (PageData pageData: insList){
|
||||
String key = pageData.getString("CORPINFO_ID") +"_" + pageData.getString("INSPECTION_SOURCE");
|
||||
String val = pageData.getString("count");
|
||||
insMap.put(key,val);
|
||||
}
|
||||
Map<String,String> hidMap = new HashMap<>();
|
||||
for (PageData pageData: hidList){
|
||||
String key = pageData.getString("CORPINFO_ID") +"_" + pageData.getString("SOURCE");
|
||||
String val = pageData.getString("count(*)");
|
||||
hidMap.put(key,val);
|
||||
}
|
||||
List<Map<String,Object>> valList = new ArrayList<>();
|
||||
for (PageData corpinfo : corpinfoAllList){
|
||||
String supeCount = "0";
|
||||
String corpCount = "0";
|
||||
String supeHiddenCount = "0";
|
||||
String corpHiddenCount = "0";
|
||||
String corpinfoID = corpinfo.getString("CORPINFO_ID");
|
||||
if(insMap.containsKey(corpinfoID + "_4")){
|
||||
supeCount = insMap.get(corpinfoID + "_4");
|
||||
}
|
||||
if(insMap.containsKey(corpinfoID + "_5")){
|
||||
corpCount = insMap.get(corpinfoID + "_5");
|
||||
}
|
||||
if(hidMap.containsKey(corpinfoID + "_4")){
|
||||
supeHiddenCount = hidMap.get(corpinfoID + "_4");
|
||||
}
|
||||
if(hidMap.containsKey(corpinfoID + "_5")){
|
||||
corpHiddenCount = hidMap.get(corpinfoID + "_5");
|
||||
}
|
||||
Map<String,Object> corpinfoCount = new HashMap<>();
|
||||
corpinfoCount.put("corpinfName",corpinfo.getString("CORP_NAME"));
|
||||
corpinfoCount.put("supeCount",supeCount);
|
||||
corpinfoCount.put("corpCount",corpCount);
|
||||
corpinfoCount.put("supeHiddenCount",supeHiddenCount);
|
||||
corpinfoCount.put("corpHiddenCount",corpHiddenCount);
|
||||
valList.add(corpinfoCount);
|
||||
}
|
||||
map.put("varList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户数据
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getUserCount")
|
||||
@ResponseBody
|
||||
public Object getUserCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Integer corpUserCount = biTongjiService.getCorpUser(pd); // 企业的所有人数
|
||||
Integer superUserCount = biTongjiService.getSupeUser(pd); // 部门的所有人数
|
||||
map.put("corpUserCount", corpUserCount);
|
||||
map.put("superUserCount", superUserCount);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分公司使用统计 -- 人员数量
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
//分子公司人员数量
|
||||
@RequestMapping(value = "/getcorpUserCount")
|
||||
@ResponseBody
|
||||
public Object getcorpUserCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> pageData = corpUsersService.listAllUser(pd);
|
||||
int size = pageData.size();
|
||||
map.put("corpUserCount",size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//监控端用户数量
|
||||
@RequestMapping(value = "/getRegulatoryUserCount")
|
||||
@ResponseBody
|
||||
public Object getRegulatoryUserCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> pageData = usersService.listAllUser(pd);
|
||||
int size = pageData.size();
|
||||
map.put("regulatoryUserCount",size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//分子公司数量
|
||||
@RequestMapping(value = "/getCorpCount")
|
||||
@ResponseBody
|
||||
public Object getCorpCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> pageData = corpInfoService.listAll(pd);
|
||||
int size = pageData.size();
|
||||
map.put("corpCount",size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//股份公司部门数量
|
||||
@RequestMapping(value = "/getRegulatoryDepartmentCount")
|
||||
@ResponseBody
|
||||
public Object getRegulatoryDepartmentCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd.put("PARENT_ID", "28945926d1e34cad8c6a91e2a18ae0ce"); // BI页统计只查询港股第一级部门
|
||||
List<PageData> pageData = (List<PageData>)departmentService.listAll(pd);
|
||||
int size = pageData.size();
|
||||
map.put("regulatoryDepartmentCount",size);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//隐患数 港股检查发现隐患数 分子公司发现隐患数
|
||||
@RequestMapping(value = "/getHiddenDangerCount")
|
||||
@ResponseBody
|
||||
public Object getHiddenDangerCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> hiddenList = hiddenService.listAll(pd);
|
||||
int allHiddenCount = hiddenList.size();
|
||||
int regulatoryHiddenCount = hiddenService.findBySource(5).size();
|
||||
int corpHiddenCount = hiddenService.findBySource(4).size();
|
||||
map.put("allHiddenCount",allHiddenCount);
|
||||
map.put("regulatoryHiddenCount",regulatoryHiddenCount);
|
||||
map.put("corpHiddenCount",corpHiddenCount);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getCorpUserCountTop10")
|
||||
@ResponseBody
|
||||
public Object getCorpUserCountTop10() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> corpUserCountTop10 = biTongjiService.getCorpUserCountTop10(pd); // 所有需要统计的企业信息
|
||||
map.put("corpUserCountTop10", corpUserCountTop10);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 分公司使用统计 -- 部门使用情况
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCorpDeptCount")
|
||||
@ResponseBody
|
||||
public Object getCorpDeptCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
List<PageData> corpinfoAllList = biTongjiService.getCorpinfoAllByOrder(pd); // 所有需要统计的企业信息
|
||||
List<PageData> corpDeptCount = biTongjiService.getCorpDeptCount(pd); // 所有需要统计的企业信息
|
||||
Map<String,Object> corpLevelMap = new HashMap<>();
|
||||
for (PageData pageData : corpDeptCount){
|
||||
corpLevelMap.put(pageData.getString("CORPINFO_ID") + "-" + pageData.getString("LEVEL") ,pageData.getString("count"));
|
||||
}
|
||||
String[] levelAll = {"departmentLevel0001", "departmentLevel0002", "departmentLevel0003",};
|
||||
|
||||
List<Map<String,Object>> valList = new ArrayList<>();
|
||||
for (PageData corpinfo :corpinfoAllList){
|
||||
Map<String,Object> valMap = new HashMap<>();
|
||||
for (int le = 0;le <levelAll.length ;le ++){
|
||||
String key = corpinfo.getString("CORPINFO_ID") + "-" + levelAll[le];
|
||||
String deptLevelCount = "0";
|
||||
if(corpLevelMap.containsKey(key)){
|
||||
deptLevelCount = corpLevelMap.get(key).toString();
|
||||
}
|
||||
valMap.put(levelAll[le],deptLevelCount);
|
||||
}
|
||||
valMap.put("corpName",corpinfo.getString("CORP_NAME"));
|
||||
valList.add(valMap);
|
||||
}
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* bus_inspection_safetyenvironmental
|
||||
* 秦港股份 统计 - 安全环保检查此事- 发现隐患数
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getSuperInsCountAndHiddeCount")
|
||||
@ResponseBody
|
||||
public Object getSuperInsCountAndHiddeCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
// Integer superInsCount = biTongjiService.getInsCountBySuper(pd);
|
||||
// Integer superHiddenCount = biTongjiService.getHiddenCountBySuper(pd);
|
||||
|
||||
List<PageData> superInsCount = biTongjiService.getInsCountPageBySuper(pd);
|
||||
List<PageData> superHiddenCount = biTongjiService.getHiddenCountPageBySuper(pd);
|
||||
|
||||
map.put("superInsCount", superInsCount);
|
||||
map.put("superHiddenCount", superHiddenCount);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* bus_inspection_safetyenvironmental
|
||||
* 秦港股份 统计 - 安全环保检查此事- 发现隐患数
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getSuperInsBySubjectAndTop")
|
||||
@ResponseBody
|
||||
public Object getSuperInsBySubjectAndTop() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
|
||||
List<PageData> count = biTongjiService.getSuperInsCountBySubjec(pd);
|
||||
List<PageData> insList = biTongjiService.getSuperInsTop(pd);
|
||||
map.put("count", count);
|
||||
map.put("insList", insList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患来源 隐患排查 安环环保检查 隐患快报
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHiddenCountBySubject")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountBySubject() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountBySubjec(pd);
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 海因里希
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHiddenCountByHeinrich")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByHeinrich() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
PageData valList = biTongjiService.getHiddenCountByHeinrich(pd);
|
||||
map.put("pd", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患处置情况 忽略 一般 重大 特殊
|
||||
*
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHiddenCountByHiddenLevel")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByHiddenLevel() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountByHiddenLevel(pd);
|
||||
Integer countByStateIsSpecial = biTongjiService.getHiddenCountBySpecial(pd);
|
||||
PageData pecial = new PageData();
|
||||
pecial.put("count",countByStateIsSpecial);
|
||||
pecial.put("HIDDENLEVEL","pecial");
|
||||
valList.add(pecial);
|
||||
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
@RequestMapping(value = "/getHiddenCountByCorpInfoHandle")
|
||||
@ResponseBody
|
||||
public Object getHiddenCountByCorpInfoHandle() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHiddenCountByCorpInfoHandle(pd);
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 获取高危作业数量
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getHighriskworkCount")
|
||||
@ResponseBody
|
||||
public Object getHighriskworkCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> valList = biTongjiService.getHighriskworkCount(pd);
|
||||
|
||||
map.put("valList", valList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/statisticsByCorpinfo")
|
||||
@ResponseBody
|
||||
public Object mainStatisticsByCorpinfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd.put("CITY_CODE", Jurisdiction.getUserCityCode());
|
||||
|
||||
List<PageData> corpinfoAllList = biTongjiService.getCorpinfoAllByOrder(pd); // 所有需要统计的企业信息
|
||||
List<PageData> corpinfoCount = biTongjiService.mainStatisticsByCorpinfo(pd);
|
||||
Map<String,PageData> corpMap = new HashMap<>();
|
||||
for (PageData pageData :corpinfoCount){
|
||||
corpMap.put(pageData.getString("corpId"),pageData);
|
||||
}
|
||||
|
||||
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
for (PageData corpinfo:corpinfoAllList){
|
||||
PageData valMap = new PageData();
|
||||
valMap.put("SBHD_NUM","0");
|
||||
valMap.put("ZGHD_NUM","0");
|
||||
valMap.put("corpId",corpinfo.getString("CORPINFO_ID"));
|
||||
valMap.put("corpName",corpinfo.getString("CORP_NAME"));
|
||||
if(corpMap.containsKey(corpinfo.getString("CORPINFO_ID"))){
|
||||
PageData countMap = corpMap.get(corpinfo.getString("CORPINFO_ID"));
|
||||
valMap.put("SBHD_NUM",countMap.getString("SBHD_NUM"));
|
||||
valMap.put("ZGHD_NUM",countMap.getString("ZGHD_NUM"));
|
||||
}
|
||||
varList.add(valMap);
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/mainInsByCorpinfo")
|
||||
@ResponseBody
|
||||
public Object mainInsByCorpinfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> varList = this.biTongjiService.mainInsByCorpinfo(pd);
|
||||
|
||||
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,987 @@
|
|||
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.bus.CorpInfoService;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.map.*;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.service.map.util.WeatherUtil;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 说明:实时地图
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/map")
|
||||
public class MapController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@Autowired
|
||||
private MeteorologicalinfoService meteorologicalinfoService;
|
||||
@Autowired
|
||||
private MeteorologicalService meteorologicalService;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String url;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String xgfUrl;
|
||||
|
||||
|
||||
@Value("${cfd.prevention.api.url}")
|
||||
private String cfdUrl;
|
||||
|
||||
@Autowired
|
||||
private BiMapService biMapService;
|
||||
@Autowired
|
||||
private FireResourcesService fireResourcesService;
|
||||
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
@Autowired
|
||||
private GateMachineService gateMachineService;
|
||||
|
||||
@Autowired
|
||||
private WeatherUtil weatherUtil;
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/getCorpInfo")
|
||||
public Object getCorpInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData condition = new PageData();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
|
||||
PageData entity = corpInfoService.findById(condition);
|
||||
PageData info = new PageData();
|
||||
info.put("CORP_INFO_ID",entity.get("CORPINFO_ID"));
|
||||
info.put("longitude",entity.get("LONGITUDE"));
|
||||
info.put("latitude",entity.get("LATITUDE"));
|
||||
map.put("info", info);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 单位基础信息
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/21/021 16:14
|
||||
* @Param: AREA
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping(value = "/basicInformation")
|
||||
@ResponseBody
|
||||
public Object basicInformation() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
// 分公司数量
|
||||
PageData numberCountData = corpInfoService.listAllByArea(pd);
|
||||
// 相关方单位数
|
||||
// 0 ->分公司企业数
|
||||
// 1 ->相关方单位数
|
||||
// 2 ->员工数
|
||||
Map<String, Object> result = restTemplate.getForObject(url + "/api/corpinfo/unitCorpInfo", Map.class);
|
||||
List<PageData> unitCorp = (List<PageData>) result.get("unitCorp");
|
||||
int size = unitCorp != null ? unitCorp.size() : 0;
|
||||
// 员工数
|
||||
PageData userCountData = usersService.countAllByArea(pd);
|
||||
PageData resData = new PageData();
|
||||
resData.put("UNITCOUNT", size);
|
||||
resData.putAll(numberCountData);
|
||||
resData.putAll(userCountData);
|
||||
map.put("data", resData);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 风险区域统计
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/21/021 16:14
|
||||
* @Param: AREA
|
||||
* @Return: 重大风险区域数
|
||||
* @Return: 较大风险区域数
|
||||
* @Return: 一般风险区域数
|
||||
* @Return: 低风险区域数
|
||||
*/
|
||||
@RequestMapping(value = "/getRiskAreaCount")
|
||||
@ResponseBody
|
||||
public Object getRiskAreaCount() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
List<PageData> riskIndex = biMapService.getRiskIndex(pd);
|
||||
PageData pageData = new PageData();
|
||||
riskIndex.forEach(item -> {
|
||||
pageData.put(item.getString("TYPE"), item.getString("COUNT"));
|
||||
});
|
||||
map.put("pd", pageData);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* listRetrieval
|
||||
*
|
||||
* @Description: 单位人员信息统计
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/21/021 17:48
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping(value = "/getUnitPersonnel")
|
||||
@ResponseBody
|
||||
public Object getUnitPersonnel(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
page.setPd(pd);
|
||||
if (pd.getString("INDEX").equals("0")) {
|
||||
List<PageData> varList = corpInfoService.listRetrieval(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
} else {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("showCount", page.getShowCount());
|
||||
paramMap.add("currentPage", pd.get("currentPage"));
|
||||
// Map result = HttpClientService.doPost(xgfUrl + "/api/corpinfo/list", pd);
|
||||
Map result = restTemplate.postForObject(xgfUrl + "/api/corpinfo/list", paramMap, Map.class);
|
||||
map.put("varList", result.get("varList"));
|
||||
map.put("page", result.get("page"));
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/corpsForMap")
|
||||
@ResponseBody
|
||||
public Object corpsForMap() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = corpInfoService.listAllForMap(pd); //根据ID读取
|
||||
for (PageData pageData : varList) {
|
||||
if (StringUtils.isBlank(pageData.getString("CORP_NAME"))) {
|
||||
pageData.put("MAP_POINT_NAME", "");
|
||||
} else {
|
||||
pageData.put("MAP_POINT_NAME", pageData.getString("CORP_NAME"));
|
||||
}
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listbymeteorological")
|
||||
@ResponseBody
|
||||
public Object listbymeteorological() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = biMapService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
pd = meteorologicalinfoService.listbymeteorological(pd); //列出meteorological列表
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listbyType")
|
||||
@ResponseBody
|
||||
public Object listbyType(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = biMapService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
page.setPd(pd);
|
||||
if (pd.getString("INDEX").equals("0") || "".equals(pd.getString("INDEX"))) {
|
||||
List<PageData> varList = meteorologicalService.listbyType(page);
|
||||
for (PageData data : varList) {
|
||||
data.put("MAP_POINT_NAME", data.getString("NAME"));
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
}
|
||||
// List<PageData> varList = meteorologicalService.listbyType(page); //列出electronic列表
|
||||
// map.put("varList", varList);
|
||||
// map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listbyequipmentcount")
|
||||
@ResponseBody
|
||||
public Object listbyequipmentcount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = biMapService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
pd = meteorologicalService.listbyequipmentcount(pd); //列出electronic列表
|
||||
map.put("pd", pd);
|
||||
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 {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String typeStr = pd.getString("TYPE");
|
||||
String idStr = pd.getString("id");
|
||||
List<PageData> pageDataList = new ArrayList<>();
|
||||
if (StringUtils.equals(typeStr, "293187ddfd984c9ab3fd716aef58da0e")) {
|
||||
pd.put("METEOROLOGICAL_ID", idStr);
|
||||
pd = biMapService.listbymeteorological(pd);
|
||||
} else if (StringUtils.equals(typeStr, "561347f0cff641dba8b2b22c0f443348")) {
|
||||
pd.put("METEOROLOGICAL_ID", idStr);
|
||||
pd = biMapService.listbymeteorological(pd);
|
||||
} else if (StringUtils.equals(typeStr, "2da29f00852a4653ba3e760b9de57412")) {
|
||||
pd.put("METEOROLOGICAL_ID", idStr);
|
||||
pd = biMapService.listbymeteorological(pd);
|
||||
} else if (StringUtils.equals(typeStr, "732fe73933b845c6b1e2aee06a38ed31")) {
|
||||
pd.put("METEOROLOGICAL_ID", idStr);
|
||||
pd = biMapService.listbymeteorological(pd);
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getWeatherInfo")
|
||||
@ResponseBody
|
||||
public Object getWeatherInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
map.put("data", WeatherUtil.getWeatherInfo());
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getPointsInfo")
|
||||
@ResponseBody
|
||||
public Object getPointsInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
|
||||
List<PageData> pointsList = videomanagerService.getPointsInfo(pd); //根据ID读取
|
||||
map.put("pointsList", pointsList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/*************************************************/
|
||||
|
||||
/**
|
||||
* @Description: 风险辨识管控
|
||||
* 风险单元数
|
||||
* 辨识部位数
|
||||
* 风险因素数
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/19/019 16:14
|
||||
* @Param: CORPINFO_ID
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getRiskIdentificationCount")
|
||||
@ResponseBody
|
||||
public Object getRiskIdentificationCount() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
// bus_riskunit
|
||||
// bus_identificationparts
|
||||
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/ObtainDisplayData/getRiskList", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
PageData data = biMapService.getRiskIdentificationCount(pageData);
|
||||
map.put("result", "success");
|
||||
map.put("riskIdentificationCount", data);
|
||||
return map;
|
||||
}
|
||||
// 人员定位信息
|
||||
|
||||
/**
|
||||
* @Description: 人员定位信息
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 11:06
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getPersonPositioningCount")
|
||||
@ResponseBody
|
||||
public Object getPersonPositioningCount() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
try {
|
||||
result = restTemplate.postForObject(cfdUrl + "/sync/ObtainDisplayData/getUsersCount", paramMap, Map.class);
|
||||
} catch (Exception e) {
|
||||
result.put("regulatoryUsersInfo", 0);
|
||||
result.put("preventionUsersInfo", 0);
|
||||
}
|
||||
try {
|
||||
|
||||
Map<String, Object> perResult = restTemplate.postForObject(cfdUrl + "/sync/UserPosition/getCurrentLocationOnlineCount", paramMap, Map.class);
|
||||
result.put("perCount", perResult.get("perCount"));
|
||||
} catch (Exception e) {
|
||||
result.put("perCount", 0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
// bus_riskunit
|
||||
// bus_identificationparts
|
||||
PageData data = biMapService.getPersonPositioningCount(pageData);
|
||||
map.put("result", "success");
|
||||
map.put("personPositioningCount", data);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 口门管理 Gate management
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 11:07
|
||||
* @Param: [] []
|
||||
* @Return: java.lang.Object
|
||||
*/
|
||||
@RequestMapping("/getDoorManagement")
|
||||
@ResponseBody
|
||||
public Object getDoorManagement() {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pageData = this.getPageData();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("id", pageData.get("id"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getPerpleCarGateMachineCount", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
List<PageData> data = new ArrayList<>();
|
||||
PageData riskIndex = new PageData();
|
||||
riskIndex.put("title", "风险指数");
|
||||
riskIndex.put("list", biMapService.getRiskIndex(pageData));
|
||||
data.add(riskIndex);
|
||||
// 今日情况
|
||||
/*
|
||||
* todo
|
||||
* 是否也按照公司来进行统计
|
||||
* bus_carduser 人员进出
|
||||
* bus_foreigncar 车辆进出
|
||||
*
|
||||
* */
|
||||
PageData today = new PageData();
|
||||
today.put("title", "今日情况");
|
||||
today.put("list", biMapService.inAndoutPeoCarToday(pageData));
|
||||
data.add(today);
|
||||
map.put("result", "success");
|
||||
map.put("varList", data);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/getPointInfoADeviceByPid")
|
||||
@ResponseBody
|
||||
public Object getPointInfoADeviceByPid() {
|
||||
PageData pd = this.getPageData();
|
||||
if ("00004".equals(pd.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("FIRE_POINT_ID", pd.getString("FIRE_POINT_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getPointInfoADeviceByPid", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
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();
|
||||
if ("00004".equals(pd.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("FIRE_POINT_ID", pd.getString("FIRE_POINT_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getPointQualifiedPhotos", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
map.put("result", "success");
|
||||
map.put("varList", fireResourcesService.getPointQualifiedPhotos(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
//股份公司部门数量 所有的
|
||||
@RequestMapping(value = "/getRegulatoryDepartmentCount")
|
||||
@ResponseBody
|
||||
public Object getRegulatoryDepartmentCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
List<PageData> pageData = (List<PageData>) departmentService.listAll(pd);
|
||||
int size = pageData.size();
|
||||
map.put("regulatoryDepartmentCount", size);
|
||||
map.put("result", errInfo);
|
||||
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();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("TYPE", pageData.getString("TYPE"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getFireControl", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
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();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/listMapSluiceCount", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
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();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
if ("CAMERA".equals(pageData.getString("TYPE"))) {
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/ObtainDisplayData/listAllCameraForMapToBayonet", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
} else {
|
||||
paramMap.add("TYPE", pageData.getString("TYPE"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getGatePosition", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
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("/getCfdDoorWayRecords")
|
||||
@ResponseBody
|
||||
public ReturnMap getCfdDoorWayRecords() {
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("TYPE", pageData.get("TYPE"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/listPerpleCarGateMachine", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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();
|
||||
if ("00004".equals(pageData.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("id", pageData.get("id"));
|
||||
paramMap.add("TYPE", pageData.get("TYPE"));
|
||||
paramMap.add("status", pageData.get("status"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getGatesInAndOutNumById", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
PageData 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();
|
||||
//获取当前人的公司id
|
||||
page.setPd(pd);
|
||||
if ("00004".equals(pd.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("FIRE_DEVICE_TYPE_ID", pd.getString("FIRE_DEVICE_TYPE_ID"));
|
||||
paramMap.add("FIRE_POINT_NAME", pd.getString("FIRE_POINT_NAME"));
|
||||
paramMap.add("showCount", page.getShowCount());
|
||||
paramMap.add("currentPage", pd.get("currentPage"));
|
||||
// /sync/map/fireDevice/listByMap?showCount=¤tPage=
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/fireDevice/listByMap", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
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();
|
||||
if ("00004".equals(pd.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("id", pd.get("id"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getPerpleCarGateMachineCount", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
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";
|
||||
PageData pd = this.getPageData();
|
||||
if ("00004".equals(pd.getString("GANGKOU")) && pd.getString("TYPE").equals("peoplePosition")) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/getCurrentLocationOnline", paramMap, Map.class);
|
||||
return result;
|
||||
} else if ("00004".equals(pd.getString("GANGKOU")) && pd.getString("TYPE").equals("carPosition")) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/getCarCurrentLocationOnline", paramMap, Map.class);
|
||||
return result;
|
||||
} else if ("00004".equals(pd.getString("GANGKOU")) && pd.getString("TYPE").equals("CAMERA")) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/ObtainDisplayData/listAllCameraForMap", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
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>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("INDEXCODE", pd.get("INDEXCODE"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getHlsPath", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员在线及统计数据(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCurrentPersonnelData")
|
||||
@ResponseBody
|
||||
public Object getCurrentPersonnelData() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("route", pd.get("route"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/getCurrentPersonnelData", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询告警数据甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCfdAlarmNum")
|
||||
@ResponseBody
|
||||
public Object getCfdAlarmNum() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/getAlarmNum", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆在线及统计数据(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getCurrentCarData")
|
||||
@ResponseBody
|
||||
public Object getCurrentCarData() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("route", pd.get("route"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/getCurrentCarData", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆在线及统计数据(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/carPositioningStatistics")
|
||||
@ResponseBody
|
||||
public Object carPositioningStatistics() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("route", pd.get("route"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/carPositioningStatistics", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员定位统计列表(曹妃甸使用)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/personPositioningStatistics")
|
||||
@ResponseBody
|
||||
public Object personPositioningStatistics() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("route", pd.get("route"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/UserPosition/personPositioningStatistics", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping("/getUserMapInfo")
|
||||
@ResponseBody
|
||||
public ReturnMap getUserMapInfo() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = usersService.findByCardNo(pd); //列出HotWorkApplicationDelayed列表
|
||||
ReturnMap r = ReturnMap.ok();
|
||||
r.put("pd", pd);
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
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.MapEightCfdService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作内容
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/map/Eight/cfd")
|
||||
public class MapEightCfdController extends BaseController {
|
||||
@Autowired
|
||||
private MapEightCfdService mapEightCfdService;
|
||||
|
||||
/**
|
||||
* 根据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();
|
||||
return mapEightCfdService.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();
|
||||
List<PageData> varList = mapEightCfdService.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();
|
||||
List<PageData> varList = mapEightCfdService.listAllMeasures(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,354 @@
|
|||
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.map.util.ReturnMap;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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;
|
||||
@Value("${cfd.prevention.api.url}")
|
||||
private String cfdUrl;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getEcharts")
|
||||
@ResponseBody
|
||||
public Object getEcharts() throws Exception {
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6", pd.getString("CORPINFO_ID"))) { //一公司
|
||||
return mapEightService.getEcharts(pd);
|
||||
}else if (StringUtils.equals("8854edee3aa94be496cee676b6d4845a", pd.getString("CORPINFO_ID"))) { //曹妃甸东
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
//paramMap.add("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/getEcharts", paramMap, Map.class);
|
||||
return result;
|
||||
} else {
|
||||
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 = new PageData();
|
||||
pd = this.getPageData();
|
||||
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6", pd.getString("CORPINFO_ID"))) { // 一公司
|
||||
/*风险管控 数据统计*/
|
||||
//获取高危作业统计数据(申请数[COUNTAPPLY],审批中[COUNTAPPROVE],归档[COUNTARCHIVE])
|
||||
PageData data = mapEightService.statisticsHighRiskWorkByState(pd);
|
||||
map.put("pd", data);
|
||||
}else if (StringUtils.equals("8854edee3aa94be496cee676b6d4845a", pd.getString("CORPINFO_ID"))) { //曹妃甸东
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
//paramMap.add("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/findFormCount", paramMap, Map.class);
|
||||
return result;
|
||||
} else {
|
||||
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 = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = mapEightService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
page.setPd(pd);
|
||||
if (StringUtils.equals("035958e685cf4850bc40151c5e0617a6", pd.getString("CORPINFO_ID"))) { //一公司
|
||||
//pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业
|
||||
varList = mapEightService.listHighRiskWork(page);
|
||||
} else if (StringUtils.equals("8854edee3aa94be496cee676b6d4845a", pd.getString("CORPINFO_ID"))) { //曹妃甸
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
//paramMap.add("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/listHighRiskWork", paramMap, Map.class);
|
||||
return result;
|
||||
} else {
|
||||
varList = mapEightService.listHighRiskWorkOrder(page);
|
||||
}
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有高危作业的位置坐标(有坐标数据)
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listAllHighRiskWorkLocation")
|
||||
@ResponseBody
|
||||
public Object listAllHighRiskWorkLocation(@RequestParam(value = "CORPINFO_ID") String CORPINFO_ID, @RequestParam("TYPE") String type, @RequestParam("GANGKOU") String GANGKOU, @RequestParam("AREA") String AREA) 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 = new ArrayList<>();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = mapEightService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
if (StringUtils.equals("8854edee3aa94be496cee676b6d4845a", pd.getString("CORPINFO_ID"))) { //曹妃甸
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("TYPE", pd.getString("TYPE"));
|
||||
if (StringUtils.equals("CAMERA", pd.getString("TYPE"))) {
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/ObtainDisplayData/listAllCameraForMap", paramMap, Map.class);
|
||||
List<Map<String, String>> pageDataList = (List<Map<String, String>>) result.get("varList");
|
||||
if(pageDataList.size()>0){
|
||||
for(int i = 0;i<pageDataList.size();i++){
|
||||
Map<String, String> stringMap = pageDataList.get(i);
|
||||
stringMap.put("CORPINFO_ID","635917e77af8461691d5da5507b56347");
|
||||
}
|
||||
}
|
||||
result.put("varList",pageDataList);
|
||||
return result;
|
||||
} else {
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/listAllHighRiskWorkLocation", paramMap, Map.class);
|
||||
List<Map<String, String>> pageDataList = (List<Map<String, String>>) result.get("varList");
|
||||
if(pageDataList.size()>0){
|
||||
for(int i = 0;i<pageDataList.size();i++){
|
||||
Map<String, String> stringMap = pageDataList.get(0);
|
||||
stringMap.put("CORPINFO_ID","635917e77af8461691d5da5507b56347");
|
||||
}
|
||||
}
|
||||
result.put("varList",pageDataList);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
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();
|
||||
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();
|
||||
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();
|
||||
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();
|
||||
// 港口04消防点东港
|
||||
if ("00004".equals(pd.getString("GANGKOU"))) {
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("HOTWORKAPPLICATION_ID", pd.getString("HOTWORKAPPLICATION_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/listAllMeasures", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
List<PageData> varList = mapEightService.listAllMeasures(pd); //根据ID读取
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据id以及类型获取数据 //曹妃甸东
|
||||
*
|
||||
* @param id 数据id
|
||||
* @param type 数据类型 动火 等等
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/getByIdCfdD")
|
||||
@ResponseBody
|
||||
public Object getByIdCfdD(@RequestParam(value = "id") String id, @RequestParam("TYPE") String type) throws Exception {
|
||||
PageData pd = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("id", pd.getString("id"));
|
||||
paramMap.add("TYPE", pd.getString("TYPE"));
|
||||
paramMap.add("HOTWORK_ID", pd.getString("HOTWORK_ID"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/getByIdOrder", paramMap, Map.class);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*曹妃甸专用接口-开始*/
|
||||
|
||||
/**
|
||||
* @Description: 获取八项作业所有作业人员
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getAllWorkUserCards")
|
||||
@ResponseBody
|
||||
public ReturnMap getAllWorkUserCards() {
|
||||
PageData pageData = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/getAllWorkUserCards", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 获取八项作业所有作业人员
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/getAllTickets")
|
||||
@ResponseBody
|
||||
public ReturnMap getAllTickets() {
|
||||
PageData pageData = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/getAllTickets", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 获取八项作业所有作业人员
|
||||
* @Date: 2023/9/23/023 9:04
|
||||
* @Param:
|
||||
* @Return:
|
||||
*/
|
||||
@RequestMapping("/findEightsByUserId")
|
||||
@ResponseBody
|
||||
public ReturnMap findEightsByUserId() {
|
||||
PageData pageData = this.getPageData();
|
||||
MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<String, Object>();
|
||||
paramMap.add("empNo", pageData.getString("empNo"));
|
||||
paramMap.add("TYPE", pageData.getString("TYPE"));
|
||||
Map<String, Object> result =
|
||||
restTemplate.postForObject(cfdUrl + "/sync/map/Eight/findEightsByUserId", paramMap, Map.class);
|
||||
return ReturnMap.ok(result);
|
||||
}
|
||||
|
||||
|
||||
/*曹妃甸专用接口-结束*/
|
||||
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
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.map.MapKetProjectService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
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/keyProject")
|
||||
public class MapKeyProjectController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MapKetProjectService mapKetProjectService;
|
||||
|
||||
@Autowired
|
||||
private MapEightService mapEightService;
|
||||
|
||||
@Value("${cfd.prevention.api.url}")
|
||||
private String cfdUrl;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
/**
|
||||
* 可视化首页统计数据
|
||||
* 重点工程开工数量:STATE_COUNT
|
||||
* 视频总数:VIDEO_COUNT
|
||||
* 安全环保检查总数:CHECK_COUNT
|
||||
* 隐患总数:HIDDEN_COUNT
|
||||
* 处罚总数:PUNISH_COUNT
|
||||
* 处罚金额:AMOUT_SUM
|
||||
*
|
||||
* @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 = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mapKetProjectService.findFormCount(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患处理记录(最新18条)
|
||||
*
|
||||
* @param
|
||||
* @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();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = mapEightService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
page.setPd(pd);
|
||||
return mapKetProjectService.list(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据的位置坐标(有坐标数据) 根据type区分是视频还是工程
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listAllLocation")
|
||||
@ResponseBody
|
||||
public Object listAllLocation(@RequestParam(value = "CORPINFO_ID") String CORPINFO_ID, @RequestParam("TYPE") String type, @RequestParam("GANGKOU") String GANGKOU, @RequestParam("AREA") String AREA) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mapKetProjectService.listAllLocation(pd);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据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();
|
||||
return mapKetProjectService.getById(pd);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package com.zcloud.controller.map;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.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 com.zcloud.service.map.PlatformelectronicService;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -76,5 +76,13 @@ public interface CorpInfoMapper{
|
|||
|
||||
//从公司端修改企业用户信息 新
|
||||
void editCorpUserNew(PageData pd);
|
||||
|
||||
List<String> getCorpinfoIds(String[] arrayDATAIds);
|
||||
|
||||
PageData listAllByArea(PageData pd);
|
||||
|
||||
List<PageData> datalistPageRetrieval(Page page);
|
||||
|
||||
List<PageData> listAllForMap(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -352,5 +352,7 @@ public interface HiddenMapper{
|
|||
void deleteForEmis(PageData pd);
|
||||
void saveForEmis(PageData pd);
|
||||
void updateGoConfirm (PageData pd);
|
||||
|
||||
List<PageData> findBySource(Integer sourceNumber);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface BiMapMapper {
|
||||
List<PageData> getCarRecordslistPage(Page page);
|
||||
|
||||
List<PageData> getPeopleRecordslistPage(Page page);
|
||||
|
||||
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
|
||||
|
||||
// 统计今日人员刷卡数据
|
||||
PageData statisticsCardUserCount(PageData pd);
|
||||
// 统计今日临时人员刷卡数据
|
||||
PageData statisticsOutsiderCount(PageData pd);
|
||||
|
||||
PageData getRiskIdentificationCount(PageData pageData);
|
||||
|
||||
PageData listbymeteorological(PageData pd);
|
||||
|
||||
// 部门把自己 -1
|
||||
PageData getPersonPositioningCount(PageData pageData);
|
||||
|
||||
List<PageData> getRiskIndex(PageData pageData);
|
||||
|
||||
List<PageData> inAndoutPeoCarToday(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* bi
|
||||
*/
|
||||
public interface BiTongjiMapper {
|
||||
|
||||
List<PageData> getCountInsByCorpSource(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getCorpinfoAllByOrder(PageData pd);
|
||||
|
||||
Integer getCorpUser(PageData pd);
|
||||
|
||||
Integer getSupeUser(PageData pd);
|
||||
|
||||
List<PageData> getCorpUserCountTop10(PageData pd);
|
||||
List<PageData> getCorpDeptCount(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getCorpinfoAllByDeptCountOrder(PageData pd);
|
||||
|
||||
Integer getInsCountBySuper(PageData pd);
|
||||
List<PageData> getInsCountPageBySuper(PageData pd);
|
||||
|
||||
|
||||
Integer getHiddenCountBySuper(PageData pd);
|
||||
List<PageData> getHiddenCountPageBySuper(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getSuperInsCountBySubjec(PageData pd);
|
||||
List<PageData> getSuperInsTop(PageData pd);
|
||||
List<PageData> getHiddenCountBySubjec(PageData pd);
|
||||
List<PageData> getHiddenCountByHiddenLevel(PageData pd);
|
||||
List<PageData> getHighriskworkCount(PageData pd);
|
||||
|
||||
Integer getHiddenCountBySpecial(PageData pd);
|
||||
|
||||
List<PageData> getHiddenCountByCorpInfoHandle(PageData pd);
|
||||
List<PageData> mainStatisticsByCorpinfo(PageData pd);
|
||||
List<PageData> mainInsByCorpinfo(PageData pd);
|
||||
List<PageData> getHiddenBySource(PageData pd);
|
||||
|
||||
List<PageData> getCorpUser2(PageData pd);
|
||||
|
||||
List<PageData> getSupeUser2(PageData pd);
|
||||
|
||||
List<PageData> listAllCorp(PageData pd);
|
||||
|
||||
List<PageData> getHiddenCountByHiddenType(PageData pageData);
|
||||
|
||||
PageData getHiddenCountByHeinrich(PageData pd);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Mapper
|
||||
public interface GateAreaMapper {
|
||||
List<PageData> getDatalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void removeByIds(PageData pageData);
|
||||
|
||||
void save(PageData pageData);
|
||||
|
||||
List<PageData> getGatePosition(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Mapper
|
||||
public interface GateMachineMapper {
|
||||
ArrayList<PageData> getDatalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void removeByIds(PageData pageData);
|
||||
|
||||
void save(PageData pageData);
|
||||
|
||||
List<PageData> getOnlineGateMachine(PageData pageData);
|
||||
|
||||
List<PageData> getTodayInOutCount(PageData pageData);
|
||||
|
||||
// 弃用 因需求变更
|
||||
List<PageData> getGatePosition(PageData pageData);
|
||||
|
||||
PageData getGateMachineInfoById(PageData pageData);
|
||||
|
||||
List<PageData> getPersonRecordCountByEId(PageData gateMachineInfo);
|
||||
|
||||
List<PageData> getCarRecordCountByEId(PageData gateMachineInfo);
|
||||
|
||||
List<PageData> getCarRecordCountByCorpId(PageData gateMachineInfo);
|
||||
|
||||
/**
|
||||
* 今天闸机的进出记录
|
||||
* @param gateMachineInfo
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getPersonRecordListAllByIdlistPage(Page page);
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface GateVideoMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
void savePosition(PageData pd);
|
||||
void editIsShow(PageData pd);
|
||||
void editIsShowBycorpinfoid(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listBo(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
PageData findByCode(PageData pd);
|
||||
|
||||
List<PageData> listAllForMap(PageData pd);
|
||||
|
||||
List<PageData> getPointsInfo(PageData pd);
|
||||
|
||||
List<PageData> getCameraPosition(PageData pageData);
|
||||
}
|
||||
|
|
@ -0,0 +1,401 @@
|
|||
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);
|
||||
|
||||
|
||||
List<PageData> listAllGasELECTRICTITYOrder(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);
|
||||
|
||||
/**
|
||||
* 获取cfd动火作业高危作业坐标统计
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getHOTWORKHighRiskWorkLocationCfd(PageData pd);
|
||||
|
||||
|
||||
List<PageData> findByELECTRICTITYAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByELECTRICTITYAcceptuserIds(PageData pd);
|
||||
|
||||
List<PageData> findByBLINDBOARDAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByBLINDBOARDAcceptuserIds(PageData pd);
|
||||
|
||||
List<PageData> findByCUTROADAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByCUTROADAcceptuserIds(PageData pd);
|
||||
|
||||
List<PageData> findByBREAKGROUNDAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByBREAKGROUNDAcceptuserIds(PageData pd);
|
||||
|
||||
List<PageData> findByHIGHWORKAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByHIGHWORKAcceptuserIds(PageData pd);
|
||||
|
||||
List<PageData> findByHOISTINGAcceptuserId(PageData pd);
|
||||
|
||||
List<PageData> findByHOISTINGAcceptuserIds(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.datasource.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:重点工程处罚
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MapKeyProjectMapper {
|
||||
|
||||
/**
|
||||
* 获取统计数数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData findFormCount(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**
|
||||
* 获取重点工程有坐标数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getProjectLocation(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取视频有坐标数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getVideoLocation(PageData pd);
|
||||
|
||||
/**
|
||||
* 通过重点工程id获取重点工程详细信息
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData getProjectById(PageData pd);
|
||||
|
||||
/**
|
||||
* 通过摄像头id 获取摄像头详细信息
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData getVideoById(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -181,5 +181,7 @@ public interface DepartmentMapper{
|
|||
List<Department> listSubCorpDepartmentByParentId(String parentId);
|
||||
|
||||
PageData findByCorpDepartmentId(PageData condition);
|
||||
|
||||
List<PageData> listTreeManageAndCorp(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -302,4 +302,10 @@ public interface UsersMapper {
|
|||
|
||||
PageData getUserInfo(PageData pd);
|
||||
List<PageData> getUsersInfo(PageData pd);
|
||||
|
||||
PageData countAllByArea(PageData pd);
|
||||
|
||||
PageData getPersonByCardNo(PageData pd);
|
||||
|
||||
PageData findByCardNo(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.dsno2.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:曹妃甸数据对接日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-09-11
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface DataDockingLogMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.zcloud.mapper.dsno2.map;
|
||||
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.mapper.dsno2.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MeteorologicalMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
void savePosition(PageData pd);
|
||||
void editIsShow(PageData pd);
|
||||
void editIsShowBycorpinfoid(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listBo(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listByEquipmentdatalistPage(Page page);
|
||||
List<PageData> listbyTypeLocation(PageData pd);
|
||||
PageData listbyequipmentcount(PageData pd);
|
||||
List<PageData> listbyType(Page page);
|
||||
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
PageData findByCode(PageData pd);
|
||||
|
||||
List<PageData> listAllForMap(PageData pd);
|
||||
|
||||
List<PageData> getPointsInfo(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.zcloud.mapper.dsno2.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MeteorologicalinfoMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
void savePosition(PageData pd);
|
||||
void editIsShow(PageData pd);
|
||||
void editIsShowBycorpinfoid(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData listbymeteorological(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listBo(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listbyinfodatalistPage(Page page);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
PageData findByCode(PageData pd);
|
||||
|
||||
List<PageData> listAllForMap(PageData pd);
|
||||
|
||||
List<PageData> getPointsInfo(PageData pd);
|
||||
|
||||
/**
|
||||
* 根据部门ID列表查询气象信息
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getMeteorologicalinfoListByIds(PageData pd);
|
||||
|
||||
Integer insertAll(@Param("list") List<PageData> list);
|
||||
|
||||
Integer updateMeteorologicalinfo(PageData pageData);
|
||||
|
||||
/**
|
||||
* 10秒内相同设备的数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> tensList(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.zcloud.mapper.dsno2.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PlatformelectronicMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**
|
||||
* 获取总摄像头数
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer countAllForMap(PageData pd);
|
||||
|
||||
|
||||
List<PageData> countAllByArea(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -88,5 +88,11 @@ public interface CorpInfoService{
|
|||
* @throws Exception
|
||||
*/
|
||||
void editCorpUserNew(PageData pd)throws Exception;
|
||||
|
||||
PageData listAllByArea(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> listRetrieval(Page page) throws Exception;
|
||||
|
||||
List<PageData> listAllForMap(PageData pd) throws Exception;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.zcloud.service.bus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
|
@ -442,5 +444,8 @@ public interface HiddenService{
|
|||
* @throws Exception
|
||||
*/
|
||||
public void updateGoConfirm(PageData hiddens)throws Exception;
|
||||
|
||||
//根据Source查询Hidden
|
||||
public List<PageData> findBySource(Integer sourceNumber);
|
||||
}
|
||||
|
||||
|
|
|
@ -121,5 +121,20 @@ public class CorpInfoServiceImpl implements CorpInfoService{
|
|||
public void editCorpUserNew(PageData pd) throws Exception {
|
||||
corpinfoMapper.editCorpUserNew(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData listAllByArea(PageData pd) throws Exception {
|
||||
return corpinfoMapper.listAllByArea(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listRetrieval(Page page) throws Exception {
|
||||
return corpinfoMapper.datalistPageRetrieval(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllForMap(PageData pd) throws Exception {
|
||||
return corpinfoMapper.listAllForMap(pd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -703,5 +703,10 @@ public class HiddenServiceImpl implements HiddenService{
|
|||
public void updateGoConfirm(PageData hiddens)throws Exception{
|
||||
hiddenMapper.updateGoConfirm(hiddens);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findBySource(Integer sourceNumber) {
|
||||
return hiddenMapper.findBySource(sourceNumber);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.FireResourcesMapper;
|
||||
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,42 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public class AssemblyBeanFactory {
|
||||
|
||||
private static Map<String, AbsFireSourcesHandel> strategyMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* @Description: 获取组装数据工厂类
|
||||
* xfsy01 消防水源
|
||||
* xfbf01 消防泵房
|
||||
* xfjyd01 防救援队
|
||||
* xfkzs01 消防控制室
|
||||
*/
|
||||
public static AbsFireSourcesHandel getInvokeStrategy(String type) {
|
||||
return strategyMap.get(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 注册组装数据工厂类
|
||||
* xfsy01 消防水源
|
||||
* xfbf01 消防泵房
|
||||
* xfjyd01 防救援队
|
||||
* xfkzs01 消防控制室
|
||||
*/
|
||||
public static void register(String type, AbsFireSourcesHandel handler) {
|
||||
if (StringUtils.isEmpty(type) && handler == null) {
|
||||
return;
|
||||
}
|
||||
strategyMap.put(type, handler);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
/**
|
||||
* @desc 对象返回到前端以及异常抛出的接口类
|
||||
*/
|
||||
public interface BaseResultInterface {
|
||||
|
||||
|
||||
String getCode();
|
||||
|
||||
|
||||
String getMessage();
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:监管端Bi页map数据
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface BiMapService {
|
||||
|
||||
List<PageData> getDoorWayPeopleRecords(Page page);
|
||||
|
||||
List<PageData> getDoorWayCarRecords(Page page);
|
||||
|
||||
PageData getRiskIdentificationCount(PageData pageData);
|
||||
|
||||
public PageData listbymeteorological(PageData pd)throws Exception;
|
||||
|
||||
List<String> getCorpinfoIds(PageData pd);
|
||||
|
||||
|
||||
PageData getPersonPositioningCount(PageData pageData);
|
||||
|
||||
List<PageData> getRiskIndex(PageData pageData);
|
||||
|
||||
Object inAndoutPeoCarToday(PageData pageData);
|
||||
|
||||
LinkedList<PageData> getFireControl(PageData pageData) throws Exception;
|
||||
|
||||
LinkedList<PageData> getFireRescueTeam(PageData pageData);
|
||||
|
||||
PageData getGatesInAndOutNumById(PageData pageData);
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BiTongjiService {
|
||||
/**
|
||||
* 地图下方的统计 安全环保检查情况统计
|
||||
* 近8年数据
|
||||
* 港股公司和分公司
|
||||
*/
|
||||
List<PageData> getCountInsByCorpSource(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取首页需要显示的企业信息
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getCorpinfoAllByOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取用户数量
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer getCorpUser(PageData pd);
|
||||
|
||||
Integer getSupeUser(PageData pd);
|
||||
|
||||
List<PageData> getCorpUserCountTop10(PageData pd);
|
||||
List<PageData> getCorpDeptCount(PageData pd);
|
||||
|
||||
/**
|
||||
* 分公司使用情况的前十部门数的分公司
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getCorpinfoAllByDeptCountOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取港股安全环保检查次数
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
public Integer getInsCountBySuper(PageData pd);
|
||||
|
||||
public Integer getHiddenCountBySuper(PageData pd);
|
||||
|
||||
/**
|
||||
* 安全环保检查分类 数量
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getSuperInsCountBySubjec(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取前十的安全环保的数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getSuperInsTop(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取所有的隐患 -根据隐患类型分类
|
||||
*
|
||||
*/
|
||||
List<PageData> getHiddenCountBySubjec(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 获取所有的隐患 -根据隐患等级分类
|
||||
*
|
||||
*/
|
||||
List<PageData> getHiddenCountByHiddenLevel(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取已经处理的特殊隐患
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer getHiddenCountBySpecial(PageData pd);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
List<PageData> getHighriskworkCount(PageData pd);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
List<PageData> getHiddenCountByCorpInfoHandle(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 首页统计
|
||||
*/
|
||||
List<PageData> mainStatisticsByCorpinfo (PageData pd);
|
||||
|
||||
|
||||
|
||||
List<PageData> mainInsByCorpinfo (PageData pd);
|
||||
List<PageData> getHiddenBySource (PageData pd);
|
||||
|
||||
List<PageData> getInsCountPageBySuper(PageData pd);
|
||||
|
||||
List<PageData> getHiddenCountPageBySuper(PageData pd);
|
||||
|
||||
List<PageData> getCorpUser2(PageData pd);
|
||||
|
||||
List<PageData> getSupeUser2(PageData pd);
|
||||
|
||||
List<PageData> listAllCorp(PageData pd);
|
||||
|
||||
List<PageData> getHiddenCountByHiddenType(PageData pageData);
|
||||
|
||||
PageData getHiddenCountByHeinrich(PageData pd);
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明: 组织机构接接口
|
||||
* 创建人:FH Q313596790
|
||||
* 官网:
|
||||
*/
|
||||
public interface CorpDepartmentService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @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;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
/**通过名称获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByName(PageData pd)throws Exception;
|
||||
|
||||
/**通过编码获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByBianma(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 通过ID获取其子级列表
|
||||
* @param parentId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listSubDepartmentByParentId(String parentId) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listAllDepartment(String parentId) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listAllDepartment(String parentId,String url) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)下拉ztree用
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllDepartmentToSelect(String parentId, List<PageData> zdepartmentPdList) throws Exception;
|
||||
|
||||
/**获取某个部门所有下级部门ID(返回拼接字符串 in的形式)
|
||||
* @param DEPARTMENT_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception;
|
||||
|
||||
/**通过条件获取全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过企业主部门
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCorpId(PageData pd)throws Exception;
|
||||
/**列表 关联 部门级别名称
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listForLevelName(Page page)throws Exception;
|
||||
|
||||
/**
|
||||
* 向下递归查询企业部门
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listTreeCorpDept(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 向下递归查询企业部门(集团部门+子公司部门)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listTreeManageAndCorp(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* pc新增需求,重点工程中添加处罚人功能所用的 根据企业ID查询部门的service
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd)throws Exception;
|
||||
/**
|
||||
* 向下递归查询企业部门(只查监管端部门)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listTreeManageAndCorp1(PageData pd)throws Exception;
|
||||
/**
|
||||
* 向下递归查询企业部门(只查企业端部门)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listTreeManageAndCorp2(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> listTreeManageAndCorpHasOrder(PageData pd)throws Exception;
|
||||
List<PageData> listDept(PageData pd)throws Exception;
|
||||
|
||||
public List<Department> listTreeCorp(String s)throws Exception;
|
||||
|
||||
/**
|
||||
* 使用数据库中的函数
|
||||
* 获取pid下的所有子集id
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getSonIdsByParid(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:曹妃甸数据对接日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-09-11
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface DataDockingLogService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @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
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
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,46 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface GateMachineService {
|
||||
|
||||
|
||||
ArrayList<PageData> getDatalistpage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void removeByIds(PageData pageData);
|
||||
|
||||
void save(PageData pageData);
|
||||
|
||||
PageData getOnlineGateMachine(PageData pageData);
|
||||
|
||||
List<PageData> getGatePosition(PageData pageData);
|
||||
|
||||
PageData getGateMachineInfoById(PageData pageData);
|
||||
|
||||
|
||||
List<PageData> getPersonRecordCountByEId(PageData gateMachineInfo);
|
||||
List<PageData> getTodayInOutCount(PageData pd);
|
||||
|
||||
List<PageData> getCarRecordCountByEId(PageData gateMachineInfo);
|
||||
|
||||
List<PageData> getCarRecordCountByCorpId(PageData gateMachineInfo);
|
||||
|
||||
/**
|
||||
* 一公司
|
||||
* 今天闸机的进出记录
|
||||
* @param gateMachineInfo
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getPersonRecordListAllByEId(Page page);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实施地图八项作业
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MapEightCfdService {
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**动火
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasures(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取其他公司详细数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getByIdOrder(PageData pd) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
* 说明:实施地图八项作业
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MapKetProjectService {
|
||||
|
||||
Object findFormCount(PageData pd);
|
||||
|
||||
Object listAllLocation(PageData pd);
|
||||
|
||||
Object getById(PageData pd) throws Exception ;
|
||||
|
||||
Object list(Page page);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MeteorologicalService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @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;
|
||||
public void savePosition(PageData pd)throws Exception;
|
||||
public void editIsShowBycorpinfoid(PageData pd)throws Exception;
|
||||
public void editIsShow(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByEquipment(Page page)throws Exception;
|
||||
|
||||
List<PageData> listbyTypeLocation(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listbyType(Page page)throws Exception;
|
||||
|
||||
public PageData listbyequipmentcount(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public PageData findByCode(PageData video)throws Exception;
|
||||
|
||||
public List<PageData> listAllForMap(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getPointsInfo(PageData pd)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MeteorologicalinfoService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @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;
|
||||
public void savePosition(PageData pd)throws Exception;
|
||||
public void editIsShowBycorpinfoid(PageData pd)throws Exception;
|
||||
public void editIsShow(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData listbymeteorological(PageData pd)throws Exception;
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listbyinfo(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
public PageData findByCode(PageData video)throws Exception;
|
||||
|
||||
public List<PageData> listAllForMap(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getPointsInfo(PageData pd)throws Exception;
|
||||
|
||||
/**同步气象数据
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
ReturnMap tongbuMeteorologicalinfo(List<PageData> list) throws Exception;
|
||||
|
||||
/**批量新增
|
||||
* @param list
|
||||
* @throws Exception
|
||||
*/
|
||||
Integer saveMeteorologicalinfo(List<PageData> list);
|
||||
|
||||
/**修改气象数据
|
||||
* @param pageData
|
||||
* @throws Exception
|
||||
*/
|
||||
Integer updateMeteorologicalinfo(PageData pageData);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.zcloud.service.map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface PlatformelectronicService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @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
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
|
||||
Integer countAllForMap(PageData pd)throws Exception;
|
||||
|
||||
|
||||
List<PageData> countAllByArea(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.bus.CorpInfoMapper;
|
||||
import com.zcloud.mapper.datasource.map.BiMapMapper;
|
||||
import com.zcloud.mapper.datasource.map.GateVideoMapper;
|
||||
import com.zcloud.mapper.dsno2.keyProjects.VideoManagerMapper;
|
||||
import com.zcloud.mapper.dsno2.map.FireResourcesMapper;
|
||||
import com.zcloud.service.map.AbsFireSourcesHandel;
|
||||
import com.zcloud.service.map.AssemblyBeanFactory;
|
||||
import com.zcloud.service.map.BiMapService;
|
||||
import com.zcloud.service.map.GateMachineService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
public class BiMapServiceImpl implements BiMapService {
|
||||
|
||||
@Resource
|
||||
private BiMapMapper biMapMapper;
|
||||
|
||||
@Resource
|
||||
private FireResourcesMapper fireResourcesMapper;
|
||||
@Resource
|
||||
private GateMachineService gateMachineService;
|
||||
|
||||
@Resource
|
||||
private GateVideoMapper gateVideoMapper;
|
||||
@Resource
|
||||
private VideoManagerMapper videoManagerMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private CorpInfoMapper corpInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 人记录
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/18/018 10:18
|
||||
* @Param: [com.zcloud.entity.Page] [page]
|
||||
* @Return: java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getDoorWayPeopleRecords(Page page) {
|
||||
return biMapMapper.getPeopleRecordslistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 车记录
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/18/018 10:18
|
||||
* @Param: [com.zcloud.entity.Page] [page]
|
||||
* @Return: java.util.List<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getDoorWayCarRecords(Page page) {
|
||||
return biMapMapper.getCarRecordslistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getRiskIdentificationCount(PageData pageData) {
|
||||
return biMapMapper.getRiskIdentificationCount(pageData);
|
||||
// bus_riskunit
|
||||
// bus_identificationparts
|
||||
}
|
||||
|
||||
|
||||
public PageData listbymeteorological(PageData pd) throws Exception {
|
||||
return biMapMapper.listbymeteorological(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getCorpinfoIds(PageData pd) {
|
||||
String area = pd.getString("AREA");
|
||||
if (StringUtils.isNotBlank(area)) {
|
||||
String[] ArrayDATA_IDS = area.split(",");
|
||||
return biMapMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
String gangkou = pd.getString("GANGKOU");
|
||||
if (StringUtils.equals("00003", gangkou)) {
|
||||
String[] ArrayDATA_IDS = new String[]{"1", "2"};
|
||||
return biMapMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getPersonPositioningCount(PageData pageData) {
|
||||
return biMapMapper.getPersonPositioningCount(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getRiskIndex(PageData pageData) {
|
||||
return biMapMapper.getRiskIndex(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> inAndoutPeoCarToday(PageData pageData) {
|
||||
return biMapMapper.inAndoutPeoCarToday(pageData);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 不一定用
|
||||
* @Author: dearLin
|
||||
* @Date: 2023/9/20/020 16:42
|
||||
* @Param: [com.zcloud.entity.PageData] [pageData]
|
||||
* @Return: java.util.LinkedList<com.zcloud.entity.PageData>
|
||||
*/
|
||||
@Override
|
||||
public LinkedList<PageData> getFireControl(PageData pageData) throws Exception {
|
||||
// GANGKOU 00003 秦皇岛岗
|
||||
// AREA 区域
|
||||
// CORPINFO_ID 区域
|
||||
|
||||
String area = pageData.getString("AREA");
|
||||
List<String> corpinfoIds = null;
|
||||
if (StringUtils.isNotBlank(area)) {
|
||||
String[] ArrayDATA_IDS = area.split(",");
|
||||
corpinfoIds = corpInfoMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
} else {
|
||||
String gangkou = pageData.getString("GANGKOU");
|
||||
if (StringUtils.equals("00003", gangkou)) {
|
||||
String[] ArrayDATA_IDS = new String[]{"1", "2"};
|
||||
corpinfoIds = corpInfoMapper.getCorpinfoIds(ArrayDATA_IDS);
|
||||
}
|
||||
}
|
||||
if (corpinfoIds != null && corpinfoIds.size() > 0) {
|
||||
if (Tools.isEmpty(pageData.getString("CORPINFO_ID"))) {
|
||||
pageData.put("list", corpinfoIds);
|
||||
}
|
||||
}
|
||||
String fireresourcesType = pageData.getString("TYPE");
|
||||
// 目前没有消防点位
|
||||
AbsFireSourcesHandel invokeStrategy = AssemblyBeanFactory.getInvokeStrategy(fireresourcesType);
|
||||
if (invokeStrategy != null) {
|
||||
return invokeStrategy.assemblyDataHandel(pageData);
|
||||
}
|
||||
|
||||
return new LinkedList<>();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LinkedList<PageData> getFireRescueTeam(PageData pageData) {
|
||||
return fireResourcesMapper.getRescueTeamDataList(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getGatesInAndOutNumById(PageData pageData) {
|
||||
PageData value = new PageData();
|
||||
// 基础信息
|
||||
if ("CAMERA".equals(pageData.getString("TYPE"))) {
|
||||
pageData.put("GATEVIDEO_ID",pageData.getString("GATE_AREA_ID"));
|
||||
pageData.put("GATE_AREA_ID",null);
|
||||
PageData gateMachineInfo = gateMachineService.getGateMachineInfoById(pageData);
|
||||
value.put("info", gateMachineInfo);
|
||||
value.putAll(gateVideoMapper.findById(pageData));
|
||||
return value;
|
||||
}
|
||||
PageData gateMachineInfo = gateMachineService.getGateMachineInfoById(pageData);
|
||||
if(Tools.isEmpty(gateMachineInfo)){
|
||||
return value;
|
||||
}
|
||||
value.put("info", gateMachineInfo);
|
||||
gateMachineInfo.put("array",gateMachineInfo.getString("EQUIPMENTID").split(","));
|
||||
// 进出信息
|
||||
if ("CAR".equals(pageData.getString("TYPE"))) {
|
||||
// 车进出
|
||||
// todo 车辆进出。现在需要配置闸机的id。
|
||||
// List<PageData> recordList = gateMachineService.getCarRecordCountByEId(gateMachineInfo);
|
||||
// 不配闸机的替代方案 用于展示 按照公司id去查,真是需要配置闸机的id
|
||||
List<PageData> recordList = gateMachineService.getCarRecordCountByCorpId(gateMachineInfo);
|
||||
value.put("varList", recordList);
|
||||
|
||||
} else {
|
||||
// 人进出
|
||||
List<PageData> recordList = gateMachineService.getPersonRecordCountByEId(gateMachineInfo);
|
||||
value.put("varList", recordList);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.BiTongjiMapper;
|
||||
import com.zcloud.service.map.BiTongjiService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class BiTongjiServiceImpl implements BiTongjiService {
|
||||
@Resource
|
||||
private BiTongjiMapper biTongjiMapper;
|
||||
|
||||
/**
|
||||
* 地图下方的统计 安全环保检查情况统计
|
||||
* 近8年数据
|
||||
* 港股公司和分公司
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getCountInsByCorpSource(PageData pd) {
|
||||
return biTongjiMapper.getCountInsByCorpSource(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCorpinfoAllByOrder(PageData pd) {
|
||||
return biTongjiMapper.getCorpinfoAllByOrder(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCorpUser(PageData pd) {
|
||||
return biTongjiMapper.getCorpUser(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getSupeUser(PageData pd) {
|
||||
return biTongjiMapper.getSupeUser(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> getCorpUserCountTop10(PageData pd) {
|
||||
return biTongjiMapper.getCorpUserCountTop10(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> getCorpDeptCount(PageData pd) {
|
||||
return biTongjiMapper.getCorpDeptCount(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分公司使用情况的前十部门数的分公司
|
||||
*
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getCorpinfoAllByDeptCountOrder(PageData pd) {
|
||||
return biTongjiMapper.getCorpinfoAllByDeptCountOrder(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getInsCountBySuper(PageData pd) {
|
||||
return biTongjiMapper.getInsCountBySuper(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHiddenCountBySuper(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountBySuper(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getSuperInsCountBySubjec(PageData pd) {
|
||||
return biTongjiMapper.getSuperInsCountBySubjec(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getSuperInsTop(PageData pd) {
|
||||
return biTongjiMapper.getSuperInsTop(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenCountBySubjec(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountBySubjec(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenCountByHiddenLevel(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountByHiddenLevel(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHighriskworkCount(PageData pd) {
|
||||
return biTongjiMapper.getHighriskworkCount(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHiddenCountBySpecial(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountBySpecial(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenCountByCorpInfoHandle(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountByCorpInfoHandle(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> mainStatisticsByCorpinfo(PageData pd) {
|
||||
return biTongjiMapper.mainStatisticsByCorpinfo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> mainInsByCorpinfo(PageData pd) {
|
||||
return biTongjiMapper.mainInsByCorpinfo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenBySource(PageData pd) {
|
||||
return biTongjiMapper.getHiddenBySource(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getInsCountPageBySuper(PageData pd) {
|
||||
return biTongjiMapper.getInsCountPageBySuper(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenCountPageBySuper(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountPageBySuper(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCorpUser2(PageData pd) {
|
||||
return biTongjiMapper.getCorpUser2(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getSupeUser2(PageData pd) {
|
||||
return biTongjiMapper.getSupeUser2(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> listAllCorp(PageData pd) {
|
||||
return biTongjiMapper.listAllCorp(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getHiddenCountByHiddenType(PageData pageData) {
|
||||
return biTongjiMapper.getHiddenCountByHiddenType(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getHiddenCountByHeinrich(PageData pd) {
|
||||
return biTongjiMapper.getHiddenCountByHeinrich(pd);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,267 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Department;
|
||||
import com.zcloud.mapper.datasource.system.DepartmentMapper;
|
||||
import com.zcloud.service.map.CorpDepartmentService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明: 组织机构
|
||||
* 创建人:FH Q313596790
|
||||
* 官网:
|
||||
*/
|
||||
@Service(value="corpDepartmentService")
|
||||
@Transactional //开启事物
|
||||
public class CorpDepartmentServiceImpl implements CorpDepartmentService {
|
||||
|
||||
@Autowired
|
||||
private DepartmentMapper departmentMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
departmentMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
departmentMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
departmentMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return (List<PageData>)departmentMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return (PageData)departmentMapper.findById(pd);
|
||||
}
|
||||
/**通过名称获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByName(PageData pd)throws Exception{
|
||||
List<PageData> dept = departmentMapper.findByName(pd);
|
||||
if(dept != null && dept.size() > 0) {
|
||||
return dept.get(0);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**通过编码获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByBianma(PageData pd)throws Exception{
|
||||
return (PageData)departmentMapper.findByBianma(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取其子级列表
|
||||
* @param parentId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listSubDepartmentByParentId(String parentId) throws Exception {
|
||||
return (List<Department>)departmentMapper.listSubDepartmentByParentId(parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listAllDepartment(String parentId) throws Exception {
|
||||
List<Department> departmentList = this.listSubDepartmentByParentId(parentId);
|
||||
for(Department depar : departmentList){
|
||||
depar.setTreeurl("department_list.html?DEPARTMENT_ID="+depar.getDEPARTMENT_ID());
|
||||
depar.setSubDepartment(this.listAllDepartment(depar.getDEPARTMENT_ID()));
|
||||
depar.setTarget("treeFrame");
|
||||
depar.setIcon("../../../assets/images/user.gif");
|
||||
}
|
||||
return departmentList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listAllDepartment(String parentId,String url) throws Exception {
|
||||
List<Department> departmentList = this.listSubDepartmentByParentId(parentId);
|
||||
for(Department depar : departmentList){
|
||||
depar.setTreeurl(url+depar.getDEPARTMENT_ID());
|
||||
depar.setSubDepartment(this.listAllDepartment(depar.getDEPARTMENT_ID(),url));
|
||||
depar.setTarget("treeFrame");
|
||||
depar.setIcon("../../../assets/images/user.gif");
|
||||
}
|
||||
return departmentList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)下拉ztree用
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllDepartmentToSelect(String parentId,List<PageData> zdepartmentPdList) throws Exception {
|
||||
List<PageData>[] arrayDep = this.listAllbyPd(parentId,zdepartmentPdList);
|
||||
List<PageData> departmentPdList = arrayDep[1];
|
||||
for(PageData pd : departmentPdList){
|
||||
this.listAllDepartmentToSelect(pd.getString("id"),arrayDep[0]);
|
||||
}
|
||||
return arrayDep[0];
|
||||
}
|
||||
|
||||
/**下拉ztree用
|
||||
* @param parentId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<PageData>[] listAllbyPd(String parentId,List<PageData> zdepartmentPdList) throws Exception {
|
||||
List<Department> departmentList = this.listSubDepartmentByParentId(parentId);
|
||||
List<PageData> departmentPdList = new ArrayList<PageData>();
|
||||
for(Department depar : departmentList){
|
||||
PageData pd = new PageData();
|
||||
pd.put("id", depar.getDEPARTMENT_ID());
|
||||
pd.put("parentId", depar.getPARENT_ID());
|
||||
pd.put("name", depar.getNAME());
|
||||
pd.put("icon", "../../../assets/images/user.gif");
|
||||
departmentPdList.add(pd);
|
||||
zdepartmentPdList.add(pd);
|
||||
}
|
||||
List<PageData>[] arrayDep = new List[2];
|
||||
arrayDep[0] = zdepartmentPdList;
|
||||
arrayDep[1] = departmentPdList;
|
||||
return arrayDep;
|
||||
}
|
||||
|
||||
/**获取某个部门所有下级部门ID(返回拼接字符串 in的形式, ('a','b','c'))
|
||||
* @param DEPARTMENT_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception {
|
||||
DEPARTMENT_ID = Tools.notEmpty(DEPARTMENT_ID)?DEPARTMENT_ID:"0";
|
||||
List<PageData> zdepartmentPdList = new ArrayList<PageData>();
|
||||
zdepartmentPdList = this.listAllDepartmentToSelect(DEPARTMENT_ID,zdepartmentPdList);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("");
|
||||
for(PageData dpd : zdepartmentPdList){
|
||||
sb.append(dpd.getString("id"));
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append("'fh'");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**通过条件获取全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return (List<PageData>)departmentMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过企业主部门
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCorpId(PageData pd)throws Exception{
|
||||
return departmentMapper.findByCorpId(pd);
|
||||
}
|
||||
/**列表 关联 部门级别名称
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> listForLevelName(Page page) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return departmentMapper.forLevelNamedatalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listTreeCorpDept(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeCorpDept(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listTreeManageAndCorp(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeManageAndCorp(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeManageAndCorpForPcPunishThePerson(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> listTreeManageAndCorp1(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeManageAndCorp1(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> listTreeManageAndCorp2(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeManageAndCorp2(pd);
|
||||
}
|
||||
@Override
|
||||
public List<PageData> listTreeManageAndCorpHasOrder(PageData pd) throws Exception {
|
||||
return departmentMapper.listTreeManageAndCorpHasOrder(pd);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PageData> listDept(PageData pd) throws Exception {
|
||||
return departmentMapper.listDept(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Department> listTreeCorp(String parentId) throws Exception {
|
||||
List<Department> departmentList = this.listSubDepartmentByParentId(parentId);
|
||||
for(Department depar : departmentList){
|
||||
depar.setTreeurl("department_list.html?DEPARTMENT_ID="+depar.getDEPARTMENT_ID());
|
||||
depar.setSubDepartment(this.listTreeCorp(depar.getDEPARTMENT_ID()));
|
||||
depar.setTarget("treeFrame");
|
||||
depar.setIcon("../../../assets/images/user.gif");
|
||||
}
|
||||
return departmentList;
|
||||
}
|
||||
|
||||
public List<PageData> getSonIdsByParid(PageData pd) throws Exception {
|
||||
return departmentMapper.getSonIdsByParid(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.DataDockingLogMapper;
|
||||
import com.zcloud.service.map.DataDockingLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:曹妃甸数据对接日志
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-09-11
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class DataDockingLogServiceImpl implements DataDockingLogService {
|
||||
|
||||
@Autowired
|
||||
private DataDockingLogMapper datadockinglogMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
datadockinglogMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
datadockinglogMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
datadockinglogMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return datadockinglogMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return datadockinglogMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return datadockinglogMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
datadockinglogMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.FireResourcesMapper;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.map.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.GateAreaMapper;
|
||||
import com.zcloud.mapper.datasource.map.GateMachineMapper;
|
||||
import com.zcloud.mapper.datasource.map.GateVideoMapper;
|
||||
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||
import com.zcloud.service.map.GateMachineService;
|
||||
import com.zcloud.util.InitPageDataUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
public class GateMachineServiceImpl implements GateMachineService {
|
||||
|
||||
|
||||
@Resource
|
||||
private GateMachineMapper gateMachineMapper;
|
||||
@Resource
|
||||
private GateAreaMapper gateAreaMapper;
|
||||
|
||||
@Resource
|
||||
private GateVideoMapper gateVideoMapper;
|
||||
|
||||
@Resource
|
||||
private InitPageDataUtil initPageDataUtil;
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<PageData> getDatalistpage(Page page) {
|
||||
return gateMachineMapper.getDatalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void edit(PageData pd) {
|
||||
initPageDataUtil.initEdit(pd);
|
||||
gateMachineMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void removeByIds(PageData pageData) {
|
||||
String[] dataIds = pageData.getString("DATA_IDS").split(",");
|
||||
initPageDataUtil.initEdit(pageData);
|
||||
if (dataIds.length > 0) {
|
||||
pageData.put("item", dataIds);
|
||||
gateMachineMapper.removeByIds(pageData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(PageData pageData) {
|
||||
initPageDataUtil.initSave(pageData, "GATE_MACHINE_ID");
|
||||
gateMachineMapper.save(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getOnlineGateMachine(PageData pageData) {
|
||||
List<PageData> gateMachineList = gateMachineMapper.getOnlineGateMachine(pageData);
|
||||
PageData value = new PageData();
|
||||
gateMachineList.forEach(item -> {
|
||||
value.put(item.getString("TYPE"), item.getString("COUNT"));
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
||||
@Resource
|
||||
private VideoManagerService videoManagerService;
|
||||
|
||||
@Override
|
||||
public List<PageData> getGatePosition(PageData pageData) {
|
||||
// todo 需求变更,现在闸机变成了区域
|
||||
if (pageData.getString("TYPE").equals("PERSON")) {
|
||||
pageData.put("GATE_AREA_TYPE", 0);
|
||||
// 人闸机定位
|
||||
}
|
||||
|
||||
if (pageData.getString("TYPE").equals("CAR")) {
|
||||
// 车闸机定位
|
||||
pageData.put("GATE_AREA_TYPE", 1);
|
||||
}
|
||||
if (pageData.getString("TYPE").equals("CAMERA")) {
|
||||
// 摄像头定位
|
||||
return gateVideoMapper.getCameraPosition(pageData);
|
||||
}
|
||||
|
||||
return gateAreaMapper.getGatePosition(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getGateMachineInfoById(PageData pageData) {
|
||||
return gateMachineMapper.getGateMachineInfoById(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public List<PageData> getPersonRecordCountByEId(PageData gateMachineInfo) {
|
||||
return gateMachineMapper.getPersonRecordCountByEId(gateMachineInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getTodayInOutCount(PageData pd) {
|
||||
List<PageData> todayInOutCount = gateMachineMapper.getTodayInOutCount(pd);
|
||||
// 当日进出 闸机数
|
||||
// 0 海域消防泵房南 1 大庆路与消防南路 2 一期停泊泊位 3 107 4 105 5 南北入口 6
|
||||
int[] counts = {0, 0, 0, 0, 0, 0};
|
||||
PageData pageData = new PageData();
|
||||
pageData.put("todayInOutCountList", todayInOutCount);
|
||||
for (PageData item : todayInOutCount) {
|
||||
// 海域消防泵房南入口
|
||||
if ("65270348-1df7-494a-b2e5-32f6b19d040b".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[0] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("44d9a3be-a778-4988-bb7d-04d8d87c53c3".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[0] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 大庆路与消防南路出口
|
||||
if ("189a90f0-5022-4df3-b2ac-1e276ce3585e".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[1] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("9cfcbc32-9466-4b44-a0cd-533a87e8a839".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[1] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 一期泊位出口
|
||||
if ("466988ac-d58c-4d9e-8065-74d9a8ad1ec9".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[2] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("f2293484-667e-4e4b-bbeb-831938c541e0".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[2] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 107出口
|
||||
if ("89e68dc2-8951-41e5-80ed-0e3ded220e1e".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[3] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("cdf76fde-f2c5-4981-83a6-eb696ab2a76b".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[3] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 105出口
|
||||
if ("2ccf4d42-114c-4427-9f25-c1895de0ce48".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[4] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("7de29a72-8937-4b40-94b9-00afaee13034".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[4] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 南入口
|
||||
if ("bfc2d476-ab57-4f1c-9186-8dd3d3f76d2a".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[5] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("96943c10-be7c-4798-9271-473176c1f047".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[5] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// 北入口
|
||||
if ("9652687e-b679-4be0-bd2a-b110b44e06d1".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[5] += Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
if ("059fd7c8-8ec9-4444-8123-3b6a08b8a1dd".equals(item.getString("EQUIPMENTID"))) {
|
||||
counts[5] -= Integer.parseInt(item.getString("COUNT"));
|
||||
}
|
||||
// AND f.EQUIPMENTID NOT IN ( '96943c10-be7c-4798-9271-473176c1f047', '059fd7c8-8ec9-4444-8123-3b6a08b8a1dd' )
|
||||
// 96943c10-be7c-4798-9271-473176c1f047 60 南出口
|
||||
// 059fd7c8-8ec9-4444-8123-3b6a08b8a1dd 128 北出口
|
||||
}
|
||||
List<PageData> dataArrayList = new ArrayList<>();
|
||||
for (int i = 0; i < counts.length; i++) {
|
||||
PageData value = new PageData();
|
||||
if (i == 0) {
|
||||
value.put("title", "海域消防泵房南闸机");
|
||||
value.put("count", counts[0]);
|
||||
}
|
||||
if (i == 1) {
|
||||
value.put("title", "大庆路与消防南路闸机");
|
||||
value.put("count", counts[1]);
|
||||
}
|
||||
if (i == 2) {
|
||||
value.put("title", "一期停泊泊位闸机");
|
||||
value.put("count", counts[2]);
|
||||
}
|
||||
if (i == 3) {
|
||||
value.put("title", "107闸机");
|
||||
value.put("count", counts[3]);
|
||||
}
|
||||
if (i == 4) {
|
||||
value.put("title", "105闸机");
|
||||
value.put("count", counts[4]);
|
||||
}
|
||||
if (i == 5) {
|
||||
value.put("title", "其他区域");
|
||||
value.put("count", counts[5]
|
||||
-counts[4]
|
||||
-counts[3]
|
||||
-counts[2]
|
||||
-counts[1]
|
||||
-counts[0]
|
||||
);
|
||||
}
|
||||
value.put("company", "人");
|
||||
dataArrayList.add(value);
|
||||
}
|
||||
return dataArrayList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCarRecordCountByEId(PageData gateMachineInfo) {
|
||||
return gateMachineMapper.getCarRecordCountByEId(gateMachineInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCarRecordCountByCorpId(PageData gateMachineInfo) {
|
||||
return gateMachineMapper.getCarRecordCountByCorpId(gateMachineInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一公司人员进出记录的详情
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
public List<PageData> getPersonRecordListAllByEId(Page page) {
|
||||
return gateMachineMapper.getPersonRecordListAllByIdlistPage(page);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.MapEightMapper;
|
||||
import com.zcloud.service.highriskwork.HotworkAcceptUserCfdService;
|
||||
import com.zcloud.service.highriskwork.HotworkCfdService;
|
||||
import com.zcloud.service.highriskwork.HotworkGasCfdService;
|
||||
import com.zcloud.service.map.MapEightCfdService;
|
||||
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.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MapEightCfdServiceImpl implements MapEightCfdService {
|
||||
@Autowired
|
||||
private MapEightMapper mapEightMapper;
|
||||
@Autowired
|
||||
private HotworkCfdService hotworkCfdService;
|
||||
@Autowired
|
||||
private HotworkGasCfdService hotworkGasCfdService;
|
||||
@Autowired
|
||||
private HotworkAcceptUserCfdService hotworkacceptuserCfdService;
|
||||
|
||||
@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> getByIdOrder(PageData pd) throws Exception {
|
||||
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 = hotworkCfdService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
|
||||
map.put("gasList", hotworkGasCfdService.listAll(pd));
|
||||
map.put("imgList", hotworkacceptuserCfdService.findByIds(pd));
|
||||
map.put("imgList1", hotworkacceptuserCfdService.findById(pd));
|
||||
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
|
||||
//用电作业√
|
||||
// pd.put("ELECTRICITY_ID",idStr);
|
||||
// pd = electricityService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", electricityService.listAllMeasures(pd));
|
||||
// map.put("imgList",electricityacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",electricityacceptuserService.findById(pd));
|
||||
// map.put("gasList", electricityGasService.listAll(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
|
||||
//盲板作业√
|
||||
// pd.put("BLINDBOARD_ID",idStr);
|
||||
// pd = blindboardService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", blindboardService.listAllMeasures(pd));
|
||||
// map.put("imgList",blindboardacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",blindboardacceptuserService.findById(pd));
|
||||
// map.put("boardList", blindBoardInfoService.listAll(pd));
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
//高空作业√
|
||||
// pd.put("HIGHWORK_ID",idStr);
|
||||
// pd = highworkService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", highworkService.listAllMeasures(pd));
|
||||
// map.put("imgList",highworkacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",highworkacceptuserService.findById(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
|
||||
//有限空间√
|
||||
// pd.put("CONFINEDSPACE_ID",idStr);
|
||||
// pd = confinedspaceService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", confinedspaceService.listAllMeasures(pd));
|
||||
// map.put("imgList",confinedspaceacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",confinedspaceacceptuserService.findById(pd));
|
||||
// map.put("gasList", confinedspaceGasService.listAll(pd));
|
||||
// map.put("gas", confinedspacegaswhService.findById(pd));
|
||||
}else if(StringUtils.equals(typeStr,"HOISTING")){
|
||||
//吊装作业√
|
||||
// pd.put("HOISTING_ID",idStr);
|
||||
// pd = hoistingService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", hoistingService.listAllMeasures(pd));
|
||||
// map.put("imgList",hoistingacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",hoistingacceptuserService.findById(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BREAKGROUND")){
|
||||
//破土作业√
|
||||
// pd.put("BREAKGROUND_ID",idStr);
|
||||
// pd = breakgroundService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", breakgroundService.listAllMeasures(pd));
|
||||
// map.put("imgList",breakgroundacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",breakgroundacceptuserService.findById(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CUTROAD")){
|
||||
//断路作业√
|
||||
// pd.put("CUTROAD_ID",idStr);
|
||||
// pd = cutroadService.findById(pd); //根据ID读取
|
||||
// map.put("pd", pd);
|
||||
// map.put("measuresList", cutroadService.listAllMeasures(pd));
|
||||
// map.put("imgList",cutroadacceptuserService.findByIds(pd));
|
||||
// map.put("imgList1",cutroadacceptuserService.findById(pd));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,586 @@
|
|||
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.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;
|
||||
|
||||
@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);
|
||||
r = mapEightMapper.getHOTWORKHighRiskWorkLocationCfd(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";
|
||||
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if(StringUtils.isBlank(pd.getString("CORPINFO_ID"))){
|
||||
List<String> ArrayDATA_IDS = getCorpinfoIds(pd);
|
||||
if(ArrayDATA_IDS.size()==0){
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}else {
|
||||
pd.put("ids",ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if(StringUtils.isBlank(pd.getString("CORPINFO_ID"))){
|
||||
List<String> ArrayDATA_IDS = getCorpinfoIds(pd);
|
||||
if(ArrayDATA_IDS.size()==0){
|
||||
return new PageData();
|
||||
}else {
|
||||
pd.put("ids",ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
}
|
||||
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));
|
||||
map.put("gasList", mapEightMapper.listAllGasELECTRICTITYOrder(pd));
|
||||
map.put("imgList1",mapEightMapper.findByELECTRICTITYAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByELECTRICTITYAcceptuserIds(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);
|
||||
map.put("imgList1",mapEightMapper.findByBLINDBOARDAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByBLINDBOARDAcceptuserIds(pd));
|
||||
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
|
||||
pd.put("HIGHWORK_ID",idStr);
|
||||
pd = mapEightMapper.findByIdHIGHWORKOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresHIGHWORKOrder(pd));
|
||||
map.put("imgList1",mapEightMapper.findByHIGHWORKAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByHIGHWORKAcceptuserIds(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));
|
||||
map.put("imgList1",mapEightMapper.findByHOISTINGAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByHOISTINGAcceptuserIds(pd));
|
||||
}else if(StringUtils.equals(typeStr,"BREAKGROUND")){
|
||||
pd.put("BREAKGROUND_ID",idStr);
|
||||
pd = mapEightMapper.findByIdBREAKGROUNDOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresBREAKGROUNDOrder(pd));
|
||||
map.put("imgList1",mapEightMapper.findByBREAKGROUNDAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByBREAKGROUNDAcceptuserIds(pd));
|
||||
}else if(StringUtils.equals(typeStr,"CUTROAD")){
|
||||
pd.put("CUTROAD_ID",idStr);
|
||||
pd = mapEightMapper.findByIdCUTROADOrder(pd);
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresCUTROADOrder(pd));
|
||||
map.put("imgList1",mapEightMapper.findByCUTROADAcceptuserId(pd));
|
||||
map.put("imgList",mapEightMapper.findByCUTROADAcceptuserIds(pd));
|
||||
}
|
||||
map.put("pd", pd);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.map.MapKeyProjectMapper;
|
||||
import com.zcloud.service.bus.ImgFilesService;
|
||||
import com.zcloud.service.map.CorpDepartmentService;
|
||||
import com.zcloud.service.map.MapEightService;
|
||||
import com.zcloud.service.map.MapKetProjectService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
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.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:实时地图八项工作
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2022-09-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MapKeyProjectServiceImpl implements MapKetProjectService {
|
||||
|
||||
@Autowired
|
||||
private MapKeyProjectMapper keyProjectMapper;
|
||||
|
||||
@Autowired
|
||||
private CorpDepartmentService corpDepartmentService;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
|
||||
@Autowired
|
||||
private ImgFilesService imgfilesService;
|
||||
|
||||
@Autowired
|
||||
private MapEightService mapEightService;
|
||||
|
||||
|
||||
@Override
|
||||
public Object findFormCount(PageData pd) {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if(StringUtils.isBlank(pd.getString("CORPINFO_ID"))){
|
||||
List<String> ArrayDATA_IDS = mapEightService.getCorpinfoIds(pd);
|
||||
if(ArrayDATA_IDS.size()==0){
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}else {
|
||||
pd.put("ids",ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
}
|
||||
PageData pageData = keyProjectMapper.findFormCount(pd);
|
||||
returnMap.put("pd", pageData);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object listAllLocation(PageData pd) {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
if (StringUtils.isBlank(pd.getString("CORPINFO_ID"))) {
|
||||
List<String> ArrayDATA_IDS = mapEightService.getCorpinfoIds(pd);
|
||||
if (ArrayDATA_IDS.size() == 0) {
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
ArrayDATA_IDS.add("1");
|
||||
pd.put("ids", ArrayDATA_IDS);
|
||||
pd.remove("CORPINFO_ID");
|
||||
}
|
||||
String typeStr = pd.getString("TYPE");
|
||||
List<PageData> r = new ArrayList<>();
|
||||
//重点工程
|
||||
if(StringUtils.equals(typeStr,"PROJECT")){
|
||||
r = keyProjectMapper.getProjectLocation(pd);
|
||||
//视频
|
||||
}else if(StringUtils.equals(typeStr,"VIDEO")){
|
||||
r = keyProjectMapper.getVideoLocation(pd);
|
||||
}
|
||||
returnMap.put("varList", r);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getById(PageData pd) throws Exception {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
String typeStr = pd.getString("TYPE");
|
||||
//重点工程
|
||||
if(StringUtils.equals(typeStr,"PROJECT")){
|
||||
pd = keyProjectMapper.getProjectById(pd);
|
||||
PageData selectPageData = new PageData();
|
||||
|
||||
selectPageData.put("CORPINFO_ID",pd.get("PUNISH_THE_PERSON"));
|
||||
List<PageData> deptList = corpDepartmentService.listTreeManageAndCorpForPcPunishThePerson(selectPageData); //根据ID读取
|
||||
|
||||
|
||||
String userStr = pd.getString("PUNISH_THE_PERSON");
|
||||
if (!Tools.isEmpty(userStr)) {
|
||||
String[] split = userStr.split(",");
|
||||
selectPageData.put("ids",split);
|
||||
List<PageData> pageData = usersService.selectUserListByUserIds(selectPageData);
|
||||
returnMap.put("punishThePerson", pageData);
|
||||
}
|
||||
PageData pd3 = new PageData();
|
||||
pd3.put("TYPE", 300);
|
||||
pd3.put("FOREIGN_KEY", pd.getString("OUTSOURCED_ID"));
|
||||
List<PageData> file9 = imgfilesService.listAll(pd3);
|
||||
returnMap.put("file9", file9);
|
||||
//视频
|
||||
}else if(StringUtils.equals(typeStr,"VIDEO")){
|
||||
pd = keyProjectMapper.getVideoById(pd);
|
||||
}
|
||||
returnMap.put("pd", pd);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object list(Page page) {
|
||||
Map<String,Object> returnMap = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
List<PageData> varList = keyProjectMapper.datalistPage(page);
|
||||
returnMap.put("varList", varList);
|
||||
returnMap.put("result", errInfo);
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.MeteorologicalMapper;
|
||||
import com.zcloud.service.map.MeteorologicalService;
|
||||
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.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MeteorologicalServiceImpl implements MeteorologicalService {
|
||||
|
||||
@Autowired
|
||||
private MeteorologicalMapper meteorologicalMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
meteorologicalMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
meteorologicalMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
meteorologicalMapper.edit(pd);
|
||||
}
|
||||
public void savePosition(PageData pd)throws Exception{
|
||||
meteorologicalMapper.savePosition(pd);
|
||||
}
|
||||
public void editIsShowBycorpinfoid(PageData pd)throws Exception{
|
||||
meteorologicalMapper.editIsShowBycorpinfoid(pd);
|
||||
}
|
||||
public void editIsShow(PageData pd)throws Exception{
|
||||
meteorologicalMapper.editIsShow(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return meteorologicalMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.listBo(pd);
|
||||
}
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByEquipment(Page page)throws Exception{
|
||||
return meteorologicalMapper.listByEquipmentdatalistPage(page);
|
||||
}
|
||||
|
||||
public List<PageData> listbyType(Page page)throws Exception{
|
||||
return meteorologicalMapper.listbyType(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listbyTypeLocation(PageData pd) throws Exception {
|
||||
List<PageData> r = new ArrayList<>();
|
||||
String typeStr = pd.getString("TYPE");
|
||||
//动火
|
||||
if(StringUtils.equals(typeStr,"293187ddfd984c9ab3fd716aef58da0e")){
|
||||
r = meteorologicalMapper.listbyTypeLocation(pd);
|
||||
//风向站
|
||||
}else if(StringUtils.equals(typeStr,"561347f0cff641dba8b2b22c0f443348")){
|
||||
r = meteorologicalMapper.listbyTypeLocation(pd);
|
||||
//温度站
|
||||
}else if(StringUtils.equals(typeStr,"2da29f00852a4653ba3e760b9de57412")){
|
||||
r = meteorologicalMapper.listbyTypeLocation(pd);
|
||||
// 风速站
|
||||
}else if(StringUtils.equals(typeStr,"732fe73933b845c6b1e2aee06a38ed31")){
|
||||
r = meteorologicalMapper.listbyTypeLocation(pd);
|
||||
// 湿度站
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
public PageData listbyequipmentcount(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.listbyequipmentcount(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
meteorologicalMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**通过CODE获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCode(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.findByCode(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listAllForMap(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.listAllForMap(pd);
|
||||
}
|
||||
|
||||
public List<PageData> getPointsInfo(PageData pd)throws Exception{
|
||||
return meteorologicalMapper.getPointsInfo(pd);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.MeteorologicalinfoMapper;
|
||||
import com.zcloud.service.map.DataDockingLogService;
|
||||
import com.zcloud.service.map.MeteorologicalinfoService;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-05-10
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MeteorologicalinfoServiceImpl implements MeteorologicalinfoService {
|
||||
|
||||
@Autowired
|
||||
private MeteorologicalinfoMapper meteorologicalinfoMapper;
|
||||
|
||||
@Autowired
|
||||
private DataDockingLogService dataDockingLogService;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.edit(pd);
|
||||
}
|
||||
public void savePosition(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.savePosition(pd);
|
||||
}
|
||||
public void editIsShowBycorpinfoid(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.editIsShowBycorpinfoid(pd);
|
||||
}
|
||||
public void editIsShow(PageData pd)throws Exception{
|
||||
meteorologicalinfoMapper.editIsShow(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return meteorologicalinfoMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData listbymeteorological(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.listbymeteorological(pd);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listBo(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.listBo(pd);
|
||||
}
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listbyinfo(Page page)throws Exception{
|
||||
return meteorologicalinfoMapper.listbyinfodatalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
meteorologicalinfoMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**通过CODE获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByCode(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.findByCode(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listAllForMap(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.listAllForMap(pd);
|
||||
}
|
||||
|
||||
public List<PageData> getPointsInfo(PageData pd)throws Exception{
|
||||
return meteorologicalinfoMapper.getPointsInfo(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnMap tongbuMeteorologicalinfo(List<PageData> list) throws Exception {
|
||||
PageData info = new PageData();
|
||||
list.forEach(weather ->{
|
||||
if(weather.get("variableName").equals("风速")){
|
||||
info.put("WINDSPEED", weather.get("value").toString());
|
||||
}else if(weather.get("variableName").equals("风向")){
|
||||
info.put("WINDDIRECTION", weather.get("value").toString());
|
||||
}else if(weather.get("variableName").equals("迎风角度")){
|
||||
info.put("WINDDIRECTION", weather.get("value").toString());
|
||||
}else if(weather.get("variableName").equals("雨量")){
|
||||
info.put("RAINFALL", weather.get("value").toString());
|
||||
}
|
||||
info.put("CODE",weather.get("cusdeviceNo").toString());
|
||||
info.put("OPERATTIME",DateUtil.date2Str(new Date(Long.parseLong(weather.get("time").toString() + "000"))));
|
||||
});
|
||||
if(info.get("WINDSPEED") == null && info.get("WINDDIRECTION") == null && info.get("RAINFALL") == null){ //都没有值 不保存
|
||||
return ReturnMap.error(200,"操作成功");
|
||||
}
|
||||
List<PageData> tenSList = meteorologicalinfoMapper.tensList(info); //10秒内相同设备的数据
|
||||
if(tenSList.size()>0){
|
||||
PageData old = tenSList.get(0);
|
||||
old.putAll(info);
|
||||
edit(old);
|
||||
}else{
|
||||
info.put("METEOROLOGICALINFO_ID", UuidUtil.get32UUID());
|
||||
save(info);
|
||||
}
|
||||
System.out.println("---------------------保存对接数据------------------");
|
||||
System.out.println(info);
|
||||
return ReturnMap.error(200,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增数据对接日志
|
||||
* @param saveMeteorologicalinfoCount
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveMeteorologicalinfoDataDocking(Integer saveMeteorologicalinfoCount) throws Exception {
|
||||
PageData savePd = new PageData();
|
||||
savePd.put("BUS_DATA_DOCKING_ID", UuidUtil.get32UUID());
|
||||
savePd.put("DOCKING_TYPE",0);
|
||||
savePd.put("DOCKING_MODULE","气象信息");
|
||||
savePd.put("NUMBER",saveMeteorologicalinfoCount);
|
||||
savePd.put("DOCKING_TIME", DateUtil.date2Str(new Date()));
|
||||
dataDockingLogService.save(savePd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存修改数据对接日志
|
||||
* @param updateMeteorologicalinfoCount
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateMeteorologicalinfoDataDocking(Integer updateMeteorologicalinfoCount) throws Exception {
|
||||
PageData updatePd = new PageData();
|
||||
updatePd.put("BUS_DATA_DOCKING_ID", UuidUtil.get32UUID());
|
||||
updatePd.put("DOCKING_TYPE",1);
|
||||
updatePd.put("DOCKING_MODULE","气象信息");
|
||||
updatePd.put("NUMBER",updateMeteorologicalinfoCount);
|
||||
updatePd.put("DOCKING_TIME", DateUtil.date2Str(new Date()));
|
||||
dataDockingLogService.save(updatePd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户IDS 获取气象信息
|
||||
* @param MeteorologicalinfoIds 气象ids
|
||||
* @return
|
||||
*/
|
||||
public List<PageData> getMeteorologicalinfoListByIds (List<String> MeteorologicalinfoIds) {
|
||||
PageData pd = new PageData();
|
||||
pd.put("MeteorologicalinfoIds",MeteorologicalinfoIds);
|
||||
return meteorologicalinfoMapper.getMeteorologicalinfoListByIds(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer saveMeteorologicalinfo(List<PageData> list) {
|
||||
if (list.size() < 1) return 0;
|
||||
return meteorologicalinfoMapper.insertAll(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateMeteorologicalinfo(PageData pageData) {
|
||||
return meteorologicalinfoMapper.updateMeteorologicalinfo(pageData);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.zcloud.service.map.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.dsno2.map.PlatformelectronicMapper;
|
||||
import com.zcloud.service.map.PlatformelectronicService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:平台视频管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-07-21
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class PlatformelectronicServiceImpl implements PlatformelectronicService {
|
||||
|
||||
@Autowired
|
||||
private PlatformelectronicMapper platformelectronicMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
platformelectronicMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
platformelectronicMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
platformelectronicMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return platformelectronicMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return platformelectronicMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return platformelectronicMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
platformelectronicMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countAllForMap(PageData pd) throws Exception {
|
||||
return platformelectronicMapper.countAllForMap(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> countAllByArea(PageData pd) {
|
||||
return platformelectronicMapper.countAllByArea(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
package com.zcloud.service.map.util;
|
||||
|
||||
import com.zcloud.service.map.BaseResultInterface;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public enum CodeMessageEnum implements BaseResultInterface {
|
||||
|
||||
/** ********* 0000成功 *************** */
|
||||
SUCCESS("0000", "成功!"),
|
||||
SUCCESS_LOGIN("0001", "用户登录成功"),
|
||||
SUCCESS_LOGOUT("0002", "用户退出成功"),
|
||||
|
||||
/* 默认失败 */
|
||||
COMMON_FAIL("999", "失败"),
|
||||
|
||||
/** ********* 1xxx系统错误 *************** */
|
||||
SERVER_BUSY("1001", "服务器正忙,请稍后再试!"),
|
||||
INTERNAL_SERVER_ERROR("1002", "服务器内部错误"),
|
||||
NOT_FOUND("1003", "未找到该资源!"),
|
||||
REQUEST_METHOD_ERROR("1004", "接口请求方法异常"),
|
||||
SQL_SYNTAX_ERROR_EXCEPTION("1005", "SQL语法错误异常"),
|
||||
NULL_POINT_ERROR_EXCEPTION("1006", "空指针异常信息"),
|
||||
INNER_FRAME_EXCEPTION("1007", "内部框架执行异常"),
|
||||
PARSE_TOKEN_EXCEPTION("1008", "解析token异常"),
|
||||
TOKEN_NOT_EXIST("1009", "token不存在"),
|
||||
TOKEN_SIGNATURE_EXCEPTION("1010", "token签名异常"),
|
||||
TOKEN_EXPIRE("1011", "token过期,请重新登录"),
|
||||
IMG_TYPE_NOT_CONFIG("1012", "请配置图片类型"),
|
||||
NOT_CONFIG_FILE_DIR("1013", "请配置文件路径"),
|
||||
UPLOAD_FILE_ERROR("1014", "文件上传失败"),
|
||||
FILE_NOT_EXIST("1015", "文件不存在"),
|
||||
FILE_HAS_DELETED("1016", "文件已被删除"),
|
||||
DRIVER_CLASS_NOT_FOUND("1017", "数据库的连接驱动正在加载中..."),
|
||||
TRY_CONNECT_DATABASE_ERROR("1018", "尝试连接数据库失败"),
|
||||
CLOSE_CONNECT_DATABASE_ERROR("1019", "关闭数据库连接失败"),
|
||||
DATABASE_NAME_NOT_EXIST("1020", "数据库名称不存在"),
|
||||
CLOSE_DATASOURCE_ERROR("1021", "释放数据库资源异常"),
|
||||
DRUID_DATASOURCE_ERROR("1022", "数据源创建中..."),
|
||||
CREATE_DATABASE_ERROR("1023", "创建数据库失败"),
|
||||
CREATE_TABLE_ERROR("1024", "创建表失败"),
|
||||
UPDATE_TABLE_FIELD_ERROR("1025", "更新表字段失败"),
|
||||
DELETE_TABLE_FIELD_ERROR("1026", "删除表字段失败"),
|
||||
QUERY_ROLE_ERROR("1027", "查询角色失败"),
|
||||
UPDATE_GROUP_ERROR("1028", "更新接口组失败"),
|
||||
DELETE_GROUP_ERROR("1029", "删除接口组失败"),
|
||||
SAVE_INTERFACE_ERROR("1030", "保存接口信息失败"),
|
||||
|
||||
/**
|
||||
* ******2xxx参数错误 *********************
|
||||
*/
|
||||
BODY_NOT_MATCH("2001", "请求的数据格式不符"),
|
||||
SIGNATURE_NOT_MATCH("2002", "请求的数字签名不匹配!"),
|
||||
REQUEST_PATH_NOT_MATCH("2003", "当前请求路径没有权限!"),
|
||||
NOT_UPLOAD_FILE_NAME_ERROR("2004", "上传的文件名不存在,请重新上传"),
|
||||
NOT_SUPPORT_IMG_TYPE("2005", "图片格式不正确,请重新上传"),
|
||||
NOT_SUPPORT_USERNAME_TYPE("2006", "excel用户名不能为空"),
|
||||
NOT_SUPPORT_ROLE_TYPE("2007", "角色不存在"),
|
||||
NOT_SUPPORT_DEPT_TYPE("2008", "部门不存在"),
|
||||
SQL_INJECT_NOT_ALLOWED("2009", "参数中存在数据库关键字,请修改"),
|
||||
TABLE_FIELD_NOT_EXIST("2010", "表字段不存在"),
|
||||
FILE_PICTURE_IS_NULL("2011", "附件不存在"),
|
||||
FILE_PICTURE_DELETE("2012", "删除附件失败"),
|
||||
DIC_BIANMA_REPEAT("2013", "字典编码重复"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** *********** 3xxx用户错误 ******************* */
|
||||
USER_NOT_LOGIN("3001", "用户未登录"),
|
||||
USER_ACCOUNT_EXPIRED("3002", "账号已过期"),
|
||||
USER_CREDENTIALS_ERROR("3003", "用户名或密码错误"),
|
||||
USER_CREDENTIALS_EXPIRED("3004", "密码过期"),
|
||||
USER_ACCOUNT_NOT_BIND_ENTERPRISE("3005", "当前账号未绑定企业"),
|
||||
USER_ACCOUNT_LOCKED("3006", "账号被锁定"),
|
||||
USER_ACCOUNT_NOT_EXIST("3007", "账号不存在"),
|
||||
USER_ACCOUNT_ALREADY_EXIST("3008", "账号已存在"),
|
||||
USER_ACCOUNT_USE_BY_OTHERS("3009", "账号下线"),
|
||||
USER_NO_PERMISSION("3010", "当前账号没有此权限"),
|
||||
USERNAME_NOT_BLANK("3011", "用户不能为空"),
|
||||
USER_LOGIN_ERROR("3012", "用户登录失败"),
|
||||
USER_LOGOUT_ERROR("3013", "用户退出失败"),
|
||||
USER_ACCOUNT_USE_BY_OTHERS_ERROR("3014", "账号下线异常"),
|
||||
USER_ACCESS_DENIED("3015", "权限认证失败"),
|
||||
USERNAME_EXIST_ERROR("3016", "用户名重名"),
|
||||
|
||||
ROLE_NAME_ALREADY_EXIST("3101", "角色已存在"),
|
||||
|
||||
/** ********** 4xxx业务错误 *********************** */
|
||||
ENTERPRISE_NOT_EXIST("4001", "当前企业不存在"),
|
||||
APP_KEY_EXIST("4002", "应用key已存在"),
|
||||
APP_NOT_EXIST("4003", "应用不存在"),
|
||||
APP_PAGE_NAME_EXIST("4004", "当前页面名称已存在"),
|
||||
APP_PAGE_KEY_EXIST("4005", "当前页面key已存在"),
|
||||
APP_PAGE_NOT_EXIST("4006", "当前页面不存在,或已删除"),
|
||||
APP_PAGE_TYPE_ERROR("4007", "页面类型有误"),
|
||||
APP_PAGE_HOME_IS_NOT_EXIST("4008", "请设置首页"),
|
||||
CAN_NOT_DELETE_HOME_PAGE("4009", "请勿删除首页"),
|
||||
DELETE_PAGE_ERROR("4010", "删除页面失败"),
|
||||
CONFIG_CUSTOM_ERROR("4011", "配置自定义页面失败"),
|
||||
APP_PAGE_PARENT_NOT_EXIST("4012", "当前页面的父级页面不存在,或已删除"),
|
||||
DATASOURCE_NAME_EXIST("4013", "当前数据源名称已经存在,请修改后重试"),
|
||||
DATASOURCE_NOT_EXIST("4014", "当前数据源不存在"),
|
||||
DATASOURCE_HAS_DELETED("4015", "当前数据源已删除"),
|
||||
MODEL_NOT_EXIST("4016", "当前模型不存在"),
|
||||
MODEL_HAS_DELETED("4017", "当前模型已删除"),
|
||||
MODEL_NAME_HAS_EXIST("4018", "当前模型名称已存在"),
|
||||
DATASOURCE_NOT_CONFIG("4019", "数据源配置为空,请联系管理员"),
|
||||
DATASOURCE_NOT_CONFIG_DIALECT("4020", "未配置数据源的类型"),
|
||||
DATASOURCE_NOT_CONFIG_DRIVER_CLASS_NAME("4021", "未配置数据源的驱动"),
|
||||
DEPT_USER_EXIST("4022", "部门下存在用户"),
|
||||
NOT_CONFIG_PAGE_BUTTON_TYPE("4023", "未配置按钮雷星"),
|
||||
MODEL_PAGE_RELATION_MODEL("4024", "已关联当前模型页面"),
|
||||
MODEL_PAGE_NOT_EXIST("4025", "模型页面不存在或已被删除"),
|
||||
MODEL_HAS_RELATION_MODEL_PAGE("4026", "当前模型已关联模型页面,不允许删除"),
|
||||
FORM_NOT_EXIST("4027", "模型表单不存在"),
|
||||
READ_FILE_ERROR("4028", "读取模型页面的模板文件失败"),
|
||||
MODEL_PAGE_CONTENT_NULL("4029", "未配置模型页面的模板文件"),
|
||||
NOT_CONFIG_QUERY_SQL("4030", "未配置查询语句"),
|
||||
APP_PAGE_BUTTON_OPTION_VALUE_ERROR("4031", "未配置接口"),
|
||||
DELETE_COLUMN_ERROR("4032", "删除当前失败"),
|
||||
INSERT_DATA_ERROR("4033", "新建数据失败"),
|
||||
EDIT_DATA_ERROR("4034", "编辑数据失败"),
|
||||
DATASOURCE_HAS_MODELS("4035", "当前数据源存在模型,不允许删除"),
|
||||
NOT_CONFIG_FORM_API("4036", "未配置模型表单页的接口信息"),
|
||||
PLEASE_WRITE_AT_LEAST_DATA("4037", "请至少填写一行数据"),
|
||||
AMIS_PAGE_ERROR("4038", "分页参数异常"),
|
||||
QUERY_APP_PAGE_QUERY_FIELD_ERROR("4039", "查询搜素参数异常"),
|
||||
REQUEST_PARAM_NOT_IN_APP_PAGE_QUERY_FIELD("4040", "请求参数不在查询数据表中"),
|
||||
STYLE_LANGUAGE_ON_CSS("4041", "自定义css中的样式语言不能为空"),
|
||||
APP_CONFIG_TYPE_NOT_EXIST("4042", "不支持当前应用设置的类型"),
|
||||
APP_CONFIG_NOT_EXIST_OR_DELETED("4043", "当前设置不存在或已被删除"),
|
||||
APP_HAS_CONFIG_ON_THIS_TYPE("4044", "当前应用设置的类型已存在,请更新"),
|
||||
NOT_SUPPORT_COMPONENT_FRAME("4045", "不支持当前组件框架"),
|
||||
NOT_SUPPORT_COMPONENT_TYPE("4046", "不支持当前组件类型"),
|
||||
CURRENT_APP_KEY_EXIST("4047", "当前应用的组件key已存在"),
|
||||
CREATE_CUSTOM_COMPONENT_ERROR("4048", "新增自定义组件失败"),
|
||||
APP_CUSTOM_COMPONENT_NOT_EXIST("4049", "当前组件不存在或已被删除"),
|
||||
UPDATE_CUSTOM_COMPONENT_ERROR("4050", "更新自定义组件失败"),
|
||||
DELETED_CUSTOM_COMPONENT_ERROR("4051", "删除自定义组件失败"),
|
||||
INSERT_COMPONENT_DEPENDENCE_ERROR("4052", "新增自定义组件依赖项失败"),
|
||||
DELETE_COMPONENT_DEPENDENCE_ERROR("4053", "删除自定义组件依赖项失败"),
|
||||
CURRENT_COMPONENT_DEPENDENCE_NOT_EXIST("4054", "当前自定义组件依赖项不存在或已被删除"),
|
||||
CURRENT_APP_NAME_EXIST("4055", "当前应用的组件名称已存在"),
|
||||
NOT_SUPPORT_DATASOURCE_FROM("4056", "不支持当前的数据库来源"),
|
||||
JDBC_CONFIG_ERROR("4057", "平台内置的数据源配置有误"),
|
||||
NOT_SUPPORT_MODEL_TYPE("4058", "不支持当前的页面模板"),
|
||||
NOT_SUPPORT_CUSTOM_PAGE("4059", "暂不支持自定义页面"),
|
||||
FORM_PAGE_ON_DEVELOPING("4060", "自定义页面的该功能正在开发中..."),
|
||||
APP_PAGE_QUERY_FIELD_NOT_EXIST("4061", "当前查询条件不存在,或已被删除"),
|
||||
APP_PAGE_BUTTON_NOT_EXIST("4062", "当前页面按钮不存在,或已被删除"),
|
||||
TABLE_KEY_MORE_THEN_ONE("4063", "主键超过一个"),
|
||||
TABLE_KEY_LESS_THEN_ONE("4064", "主键必须存在"),
|
||||
TABLE_KEY_MUST_BE_INT("4065", "主键必须为整数类型"),
|
||||
TABLE_FIELD_MUST_EXIST("4066", "必须存在表字段"),
|
||||
CURRENT_MODEL_PAGE_HAS_CONVERSION_CUSTOM_PAGE("4067", "当前模型页面已转成自定义页面"),
|
||||
NOT_SUPPORT_RELEASE_STATUS("4068", "发布版本状态有误"),
|
||||
APP_FORM_BUTTON_NOT_EXIST("4067", "当前表单按钮不存在,或已被删除"),
|
||||
DATASOURCE_KEY_EXIST_ERROR("4068","数据源key已存在")
|
||||
;
|
||||
|
||||
CodeMessageEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/** 返回到前端的code值 */
|
||||
private String code;
|
||||
|
||||
/** 返回到前端的code对应的message值 */
|
||||
private String message;
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
// public static CodeVo getJsonObjectByCode(String code) {
|
||||
// CodeVo codeVo = new CodeVo();
|
||||
// if (Tools.isEmpty(code)) {
|
||||
// return codeVo;
|
||||
// }
|
||||
// for (CodeMessageEnum enumObj : CodeMessageEnum.values()) {
|
||||
// if (enumObj.getCode().equals(code)) {
|
||||
// return new CodeVo(code, enumObj.message);
|
||||
// }
|
||||
// }
|
||||
// return codeVo;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
package com.zcloud.service.map.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hikvision.artemis.sdk.Client;
|
||||
import com.hikvision.artemis.sdk.Request;
|
||||
import com.hikvision.artemis.sdk.Response;
|
||||
import com.hikvision.artemis.sdk.constant.Constants;
|
||||
import com.hikvision.artemis.sdk.enums.Method;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author fangjiakai
|
||||
* @date 2023/09/12 10:16
|
||||
*/
|
||||
public class HKPostUtil {
|
||||
// 代理API网关nginx服务器ip端口
|
||||
// private static final String host = "192.168.211.185:443";
|
||||
// // 秘钥appkey
|
||||
// private static final String appKey = "21830372";
|
||||
// // 秘钥appSecret
|
||||
// private static final String appSecret = "vBZ89ltwQjHhFHLfg61V";
|
||||
private static final String host = "192.168.150.80:5443";
|
||||
// 秘钥appkey
|
||||
private static final String appKey = "25448524";
|
||||
// 秘钥appSecret
|
||||
private static final String appSecret = "DoHeB3gR2dxgaEvANqNr";
|
||||
/**
|
||||
* 能力开放平台的网站路径
|
||||
* TODO 路径不用修改,就是/artemis
|
||||
*/
|
||||
private static final String ARTEMIS_PATH = "/artemis";
|
||||
|
||||
/**
|
||||
* 通用海康接口
|
||||
* 调用POST请求类型(application/json)接口*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> publicHkInterface(JSONObject jsonBody, String url){
|
||||
final String getCamsApi = ARTEMIS_PATH +url;
|
||||
Map<String, String> path = new HashMap<String, String>(2);
|
||||
path.put("https://", getCamsApi);
|
||||
// post请求application/json类型参数
|
||||
String result = doPostStringArtemis(path,jsonBody.toJSONString(),null,null,"application/json",null);
|
||||
JSONObject parseObject = JSONArray.parseObject(result);
|
||||
return parseObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取监控点预览取流URL
|
||||
* @param id 设备编号
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> camerasPreviewURLs(String id,String type){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("cameraIndexCode", id);
|
||||
jsonBody.put("netZoneCode", "1");
|
||||
jsonBody.put("transmode", 1);
|
||||
jsonBody.put("streamType", 0);
|
||||
jsonBody.put("protocol",type);
|
||||
jsonBody.put("expireTime", -1);
|
||||
jsonBody.put("expand","transcode=1&streamform=rtp");
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/video/v1/cameras/previewURLs");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有区域数
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> getAllArea(){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("parentIndexCode", "root000000");
|
||||
jsonBody.put("resourceType", "camera");
|
||||
jsonBody.put("pageNo", 1);
|
||||
jsonBody.put("pageSize", 100);
|
||||
jsonBody.put("cascadeFlag",0);
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/resource/v2/regions/subRegions");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域内摄像头数
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> getAreaCamera(String indexCode){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("regionIndexCode", indexCode);
|
||||
jsonBody.put("resourceType", "camera");
|
||||
jsonBody.put("pageNo", 1);
|
||||
jsonBody.put("pageSize", 100);
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/irds/v2/resource/subResources");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 查询监控点列表v2
|
||||
* 分组:
|
||||
* 视频资源接口
|
||||
* 提供方名称:
|
||||
* 资源目录服务
|
||||
* qps:
|
||||
* 描述:根据条件查询目录下有权限的监控点列表
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> cameraSearch(PageData pd){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", pd.get("pageNo"));
|
||||
jsonBody.put("pageSize", pd.get("pageSize"));
|
||||
if(pd.get("name")!=null && !"".equals(pd.getString("name")))
|
||||
jsonBody.put("name", pd.get("name"));
|
||||
jsonBody.put("orderBy", "name");
|
||||
jsonBody.put("orderType", "desc");
|
||||
jsonBody.put("resourceType", "camera");
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/irds/v2/deviceResource/resources");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅事件
|
||||
* @param ids 事件编号 131588
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> subscribeEvent(String[] ids){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("eventTypes", ids);
|
||||
jsonBody.put("eventDest", "1");
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/eventService/v1/eventSubscriptionByEventTypes");
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
public static String doPostStringArtemis(Map<String, String> path, String body, Map<String, String> querys, String accept, String contentType, Map<String, String> header) {
|
||||
String httpSchema = (String)path.keySet().toArray()[0];
|
||||
if (httpSchema != null && !StringUtils.isEmpty(httpSchema)) {
|
||||
String responseStr = null;
|
||||
|
||||
try {
|
||||
Map<String, String> headers = new HashMap();
|
||||
if (StringUtils.isNotBlank(accept)) {
|
||||
headers.put("Accept", accept);
|
||||
} else {
|
||||
headers.put("Accept", "*/*");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(contentType)) {
|
||||
headers.put("Content-Type", contentType);
|
||||
} else {
|
||||
headers.put("Content-Type", "application/text;charset=UTF-8");
|
||||
}
|
||||
|
||||
if (header != null) {
|
||||
headers.putAll(header);
|
||||
}
|
||||
|
||||
Request request = new Request(Method.POST_STRING, httpSchema + host, (String)path.get(httpSchema), appKey, appSecret, Constants.DEFAULT_TIMEOUT);
|
||||
request.setHeaders(headers);
|
||||
request.setQuerys(querys);
|
||||
request.setStringBody(body);
|
||||
Response response = Client.execute(request);
|
||||
responseStr = getResponseResult(response);
|
||||
} catch (Exception var11) {
|
||||
var11.printStackTrace();
|
||||
}
|
||||
return responseStr;
|
||||
} else {
|
||||
throw new RuntimeException("http和https参数错误httpSchema: " + httpSchema);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getResponseResult(Response response) {
|
||||
String responseStr = null;
|
||||
int statusCode = response.getStatusCode();
|
||||
if (!String.valueOf(statusCode).startsWith("2") && !String.valueOf(statusCode).startsWith("3")) {
|
||||
String msg = response.getErrorMessage();
|
||||
responseStr = response.getBody();
|
||||
System.out.println("the Artemis Request is Failed,statusCode:" + statusCode + " errorMsg:" + msg);
|
||||
} else {
|
||||
responseStr = response.getBody();
|
||||
System.out.println("the Artemis Request is Success,statusCode:" + statusCode + " SuccessMsg:" + response.getBody());
|
||||
}
|
||||
|
||||
return responseStr;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.zcloud.service.map.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
|
||||
import com.hikvision.artemis.sdk.config.ArtemisConfig;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 海康工具类
|
||||
*/
|
||||
public class HKUtil {
|
||||
static {
|
||||
// 代理API网关nginx服务器ip端口
|
||||
ArtemisConfig.host = "192.168.150.80:5443";
|
||||
// 秘钥appkey
|
||||
ArtemisConfig.appKey = "25448524";
|
||||
// 秘钥appSecret
|
||||
ArtemisConfig.appSecret = "DoHeB3gR2dxgaEvANqNr";
|
||||
}
|
||||
/**
|
||||
* 能力开放平台的网站路径
|
||||
* TODO 路径不用修改,就是/artemis
|
||||
*/
|
||||
private static final String ARTEMIS_PATH = "/artemis";
|
||||
/**
|
||||
* 通用海康接口
|
||||
* 调用POST请求类型(application/json)接口*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> publicHkInterface(JSONObject jsonBody,String url){
|
||||
final String getCamsApi = ARTEMIS_PATH +url;
|
||||
Map<String, String> path = new HashMap<String, String>(2);
|
||||
path.put("https://", getCamsApi);
|
||||
// post请求application/json类型参数
|
||||
String result =ArtemisHttpUtil.doPostStringArtemis(path,jsonBody.toJSONString(),null,null,"application/json",null);
|
||||
JSONObject parseObject = JSONArray.parseObject(result);
|
||||
return parseObject;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取监控点预览取流URL
|
||||
* @param id 设备编号
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> camerasPreviewURLs(String id,String type){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("indexCode", id);
|
||||
jsonBody.put("netZoneCode", "1");
|
||||
jsonBody.put("transmode", 1);
|
||||
jsonBody.put("streamType", 0);
|
||||
jsonBody.put("protocol",type);
|
||||
jsonBody.put("expireTime", -1);
|
||||
jsonBody.put("expand","transcode=1&streamform=rtp");
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/vnsc/mls/v1/preview/openApi/getPreviewParam");
|
||||
/*/api/video/v1/cameras/previewURLs*/
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* API名称:
|
||||
* 查询监控点列表v2
|
||||
* 分组:
|
||||
* 视频资源接口
|
||||
* 提供方名称:
|
||||
* 资源目录服务
|
||||
* qps:
|
||||
* 描述:根据条件查询目录下有权限的监控点列表
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,Object> cameraSearch(PageData pd){
|
||||
JSONObject jsonBody = new JSONObject();
|
||||
jsonBody.put("pageNo", pd.get("pageNo"));
|
||||
jsonBody.put("pageSize", pd.get("pageSize"));
|
||||
if(pd.get("name")!=null && !"".equals(pd.getString("name")))
|
||||
jsonBody.put("name", pd.get("name"));
|
||||
jsonBody.put("orderBy", "name");
|
||||
jsonBody.put("orderType", "desc");
|
||||
Map<String,Object> returnMap=publicHkInterface(jsonBody,"/api/resource/v2/camera/search");
|
||||
return returnMap;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
package com.zcloud.service.map.util;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: R类
|
||||
**/
|
||||
public class ReturnMap extends HashMap<String, Object> {
|
||||
/**
|
||||
* 序列ID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* R的无参构造, 初始化信息
|
||||
*/
|
||||
public ReturnMap() {
|
||||
put("code", 0);
|
||||
put("msg", "success");
|
||||
put("result", "success");
|
||||
}
|
||||
|
||||
/**
|
||||
* error1: 返回默认error
|
||||
*
|
||||
* @return 返回默认error
|
||||
*/
|
||||
public static ReturnMap error() {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常, 请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* error2
|
||||
*
|
||||
* @param msg 错误信息
|
||||
* @return 返回自定义信息的error
|
||||
*/
|
||||
public static ReturnMap error(String msg) {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
|
||||
}
|
||||
|
||||
public static ReturnMap error(CodeMessageEnum codeMessageEnum, String uri) {
|
||||
return error(codeMessageEnum.getCode(), codeMessageEnum.getMessage(), uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* 原先R的code和msg被覆盖
|
||||
*
|
||||
* @param code 错误码
|
||||
* @param msg 错误信息
|
||||
* @return 自定义的错误码和错误信息
|
||||
*/
|
||||
public static ReturnMap error(int code, String msg) {
|
||||
ReturnMap r = new ReturnMap();
|
||||
r.put("code", code);
|
||||
r.put("result", "error");
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static ReturnMap error(String code, String msg) {
|
||||
ReturnMap r = new ReturnMap();
|
||||
r.put("code", code);
|
||||
r.put("result", "error");
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static ReturnMap error(String code, String msg, String uri) {
|
||||
ReturnMap r = new ReturnMap();
|
||||
r.put("code", code);
|
||||
r.put("result", "error");
|
||||
r.put("msg", msg);
|
||||
r.put("uri", uri);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* ok1
|
||||
* 加入了msg
|
||||
*
|
||||
* @param msg
|
||||
* @return
|
||||
*/
|
||||
public static ReturnMap ok(String msg) {
|
||||
ReturnMap r = new ReturnMap();
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* ok2: 加入了map
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public static ReturnMap ok(Map<String, Object> map) {
|
||||
ReturnMap r = new ReturnMap();
|
||||
r.putAll(map);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* ok3: 直接返回"0", "success"
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static ReturnMap ok() {
|
||||
return new ReturnMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* 放入自定义的key和value, 然后返回
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ReturnMap put(String key, Object value) {
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到这个对象的code
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Integer getCode() {
|
||||
return (Integer) this.get("code");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.zcloud.service.map.util;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author fangjiakai
|
||||
* @date 2023/09/08 11:32
|
||||
*/
|
||||
@Component
|
||||
public class WeatherUtil {
|
||||
private static final String WEATHER_PATH = "http://yunlink.027010.cn/OpenAPI/GetAllReal";
|
||||
private static final String sn="01803353066";
|
||||
private static final String pwd="353066";
|
||||
|
||||
public static Map<String,Object> getWeatherInfo() throws IOException {
|
||||
CloseableHttpClient client = null;
|
||||
CloseableHttpResponse response = null;
|
||||
HttpPost httpPost = new HttpPost(buildUrl(WEATHER_PATH,sn,pwd));
|
||||
|
||||
client = HttpClients.createDefault();
|
||||
response = client.execute(httpPost);
|
||||
HttpEntity entity = response.getEntity();
|
||||
String result = EntityUtils.toString(entity);
|
||||
return JSON.parseObject(result, HashMap.class);//返回结果转换为map
|
||||
}
|
||||
|
||||
private static String buildUrl(String uri,String sn,String pwd) {
|
||||
StringBuilder urlBuilder = new StringBuilder(uri+"?");
|
||||
try {
|
||||
urlBuilder.append("sn=").append(URLEncoder.encode(sn, "UTF-8"));
|
||||
urlBuilder.append("&pwd=").append(URLEncoder.encode(pwd, "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return urlBuilder.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
Map<String,Object> map = getWeatherInfo();
|
||||
List<Map<String,Object>> datas = (List<Map<String,Object>>)map.get("Datas");
|
||||
datas.forEach(item -> {
|
||||
List<Map<String,Object>> weathers = (List<Map<String,Object>>)item.get("Weathers");
|
||||
if(weathers.size()>0){
|
||||
PageData info = new PageData();
|
||||
info.put("METEOROLOGICALINFO_ID", UuidUtil.get32UUID());
|
||||
info.put("OPERATTIME", item.get("DateTime"));
|
||||
info.put("CODE", item.get("ID"));
|
||||
weathers.forEach(weather ->{
|
||||
if(weather.get("Index").equals(3)){
|
||||
info.put("TEMPERATURE", weather.get("Value").toString());
|
||||
}
|
||||
if(weather.get("Index").equals(6)){
|
||||
info.put("WINDSPEED", weather.get("Value").toString());
|
||||
}
|
||||
if(weather.get("Index").equals(7)){
|
||||
info.put("WINDDIRECTION", weather.get("Value").toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -354,4 +354,10 @@ public interface UsersService {
|
|||
PageData getUserInfo(PageData pd);
|
||||
|
||||
List<PageData> getRegUserInfo(PageData pd);
|
||||
|
||||
PageData countAllByArea(PageData pd) throws Exception;
|
||||
|
||||
PageData getPersonByCardNo(PageData pd) throws Exception;
|
||||
|
||||
PageData findByCardNo(PageData pd) throws Exception;
|
||||
}
|
||||
|
|
|
@ -478,4 +478,17 @@ public class UsersServiceImpl implements UsersService {
|
|||
public List<PageData> getRegUserInfo(PageData pd) {
|
||||
return usersMapper.getUsersInfo(pd);
|
||||
}
|
||||
|
||||
public PageData countAllByArea(PageData pd) throws Exception{
|
||||
return usersMapper.countAllByArea(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getPersonByCardNo(PageData pd) throws Exception{
|
||||
return usersMapper.getPersonByCardNo(pd);
|
||||
}
|
||||
|
||||
public PageData findByCardNo(PageData pd)throws Exception{
|
||||
return usersMapper.findByCardNo(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,4 +61,6 @@ public class Const {
|
|||
public static final String topic_eightWork="eightWork";
|
||||
public static final String topic_info="info";
|
||||
|
||||
public static final String USER_CITY_CODE = "SESSION_USER_CITY_CODE";
|
||||
public static final String USER_CITY_NAME = "SESSION_USER_CITY_NAME";
|
||||
}
|
||||
|
|
|
@ -105,4 +105,11 @@ public class Jurisdiction {
|
|||
}
|
||||
return pd;
|
||||
}
|
||||
|
||||
/** USER_CITY_CODE
|
||||
* @return
|
||||
*/
|
||||
public static String getUserCityCode(){
|
||||
return getSession().getAttribute(Const.USER_CITY_CODE).toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -435,6 +435,235 @@
|
|||
(select count(1) from bus_units r where r.CORPINFO_ID = #{CORPINFO_ID} and r.ISDELETE = 0) as units_num,
|
||||
(select count(1) from BUS_SPECIALEQUIPMENT r where r.CORPINFO_ID = #{CORPINFO_ID} and r.ISDELETE = 0) as equipment_num
|
||||
</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="listAllByArea" resultType="com.zcloud.entity.PageData">
|
||||
SELECT ifnull(count(f.CORPINFO_ID),0) CORPCOUNT FROM bus_corp_info f WHERE f.ISDELETE = '0' and f.AREA is not
|
||||
null and f.AREA != '' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and f.AREA = #{AREA}
|
||||
</if>
|
||||
</select>
|
||||
<select id="datalistPageRetrieval" parameterType="page" resultType="pd">
|
||||
select
|
||||
sub.BIANMA,
|
||||
sub.DICTIONARIES_ID,
|
||||
<include refid="Field"></include>,
|
||||
state.name as CORP_STATE_NAME,
|
||||
d.NAME as REPORT_CYCLE_NAME,
|
||||
prvince.name as prvinceName,
|
||||
city.name as cityName ,
|
||||
country.name as countryName ,
|
||||
village.name as villageName,
|
||||
sd.NAME as INDUSTRY_NAME,
|
||||
type.name as CORP_OF_TYPE_VAL ,
|
||||
type2.name as CORP_OF_TYPE2_VAL ,
|
||||
corpState.name as corpStateName,
|
||||
sub.name as sub_VAL,
|
||||
CONCAT_WS('--',ct1.name,ct2.name,ct3.name,ct4.name) INDUSTRYALL,
|
||||
COUNT(su.USER_ID) count,
|
||||
(select u.STATUS from `qa-gwj-prevention`.sys_user u where u.CORPINFO_ID = f.CORPINFO_ID and u.ISMAIN = '1' ) AS
|
||||
STATUS,
|
||||
(select count(1) from OA_MFOLDER mf where mf.CORPINFO_ID = f.CORPINFO_ID) as wjCount, <!--上传文件数-->
|
||||
(select count(1) from OA_DEPARTMENT allDept where allDept.CORPINFO_ID = f.CORPINFO_ID ) as
|
||||
allDeptCount,<!--全部部门数-->
|
||||
(select count(1) from OA_DEPARTMENT chang where chang.CORPINFO_ID = f.CORPINFO_ID and chang.LEVEL =
|
||||
'departmentLevel0001' ) as changCount,<!--厂队级别数-->
|
||||
(select count(1) from OA_DEPARTMENT ke where ke.CORPINFO_ID = f.CORPINFO_ID and ke.LEVEL = 'departmentLevel0002'
|
||||
) as keCount, <!--科队级别数-->
|
||||
(select count(1) from OA_DEPARTMENT ban where ban.CORPINFO_ID = f.CORPINFO_ID and ban.LEVEL =
|
||||
'departmentLevel0003' ) as banCount <!--班组级别数-->
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.REPORT_CYCLE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = f.CORP_OF_TYPE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type2 on type2.CORPTYPE_ID = f.CORP_OF_TYPE2
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries prvince ON prvince.BIANMA = f.PROVINCE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = f.CITY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = f.COUNTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = f.VILLAGE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries corpState on corpState.BIANMA = f.CORP_STATE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries sub on sub.BIANMA = f.SUBORDINATION
|
||||
left join `qa-gwj-prevention`.sys_dictionaries ct1 on ct1.DICTIONARIES_ID = f.CORP_TYPE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries ct2 on ct2.DICTIONARIES_ID = f.CORP_TYPE2
|
||||
left join `qa-gwj-prevention`.sys_dictionaries ct3 on ct3.DICTIONARIES_ID = f.CORP_TYPE3
|
||||
left join `qa-gwj-prevention`.sys_dictionaries ct4 on ct4.DICTIONARIES_ID = f.CORP_TYPE4
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries sd ON sd.DICTIONARIES_ID = f.INDUSTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries state on state.BIANMA = f.CORP_STATE
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user su on su.CORPINFO_ID = f.CORPINFO_ID and su.isdelete = '0'
|
||||
where 1=1 and f.ISDELETE ='0' and su.ISDELETE ='0'
|
||||
|
||||
<if test="pd.AREA != null and pd.AREA != ''"><!-- 企业名称搜索-->
|
||||
and f.AREA = #{pd.AREA}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 企业名称搜索-->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYLX != null and pd.KEYQYLX != ''"><!-- 请选企业类型 -->
|
||||
and ( f.INDUSTRY = #{pd.KEYQYLX})
|
||||
</if>
|
||||
<if test="pd.KEYLS != null and pd.KEYLS != ''"><!-- 隶属关系 -->
|
||||
and ( sub.DICTIONARIES_ID = #{pd.KEYLS})<!-- 因为前台传的参数是id,所以将搜索条件改成id的搜索 -->
|
||||
</if>
|
||||
<if test="pd.ISUSE != null and pd.ISUSE != ''"><!-- 企业状态 -->
|
||||
and ( f.ISUSE = #{pd.ISUSE} )
|
||||
</if>
|
||||
<!-- <if test="pd.KEYLS != null and pd.KEYLS != ''"><!– 请选隶属关系 –>-->
|
||||
<!-- and ( f.SUBORDINATION LIKE CONCAT(CONCAT('%', #{pd.KEYLS}),'%') )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.CORP_NAME != null and pd.CORP_NAME != ''"><!-- 请选隶属关系 -->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYZT != null and pd.KEYQYZT != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.KEYQYZT} )
|
||||
</if>
|
||||
<if test="pd.KEYSFQR != null and pd.KEYSFQR != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_CONFIRM = #{pd.KEYSFQR} )
|
||||
</if>
|
||||
<if test="pd.KEYCOUNTRY != null and pd.KEYCOUNTRY != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.PROVINCE = #{pd.KEYCOUNTRY} )
|
||||
</if>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ >= ]]> #{pd.STARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ <= ]]> #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.ADDRESS != null and pd.ADDRESS != ''"><!-- 企事业单位注册地址 -->
|
||||
and ( f.ADDRESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_OFFICE != null and pd.ADDRESS_OFFICE != ''"><!-- 企事业单位办公地址 -->
|
||||
and ( f.ADDRESS_OFFICE LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_OFFICE}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_BUSINESS != null and pd.ADDRESS_BUSINESS != ''"><!-- 企事业单位经营地址 -->
|
||||
and ( f.ADDRESS_BUSINESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_BUSINESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CODE != null and pd.CODE != ''"><!-- 统一社会信用代码 -->
|
||||
and ( f.CODE LIKE CONCAT(CONCAT('%', #{pd.CODE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_STATE != null and pd.CORP_STATE != ''"><!-- 企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.CORP_STATE} )
|
||||
</if>
|
||||
<if test="pd.ECO_TYPE != null and pd.ECO_TYPE != ''"><!-- 企业经济类型 -->
|
||||
and ( f.ECO_TYPE = #{pd.ECO_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CREATE_DATE != null and pd.CREATE_DATE != ''"><!-- 成立日期 -->
|
||||
and ( f.CREATE_DATE = #{pd.CREATE_DATE} )
|
||||
</if>
|
||||
<if test="pd.REGCAPITAL != null and pd.REGCAPITAL != ''"><!-- 注册资金 -->
|
||||
and ( f.REGCAPITAL = #{pd.REGCAPITAL} )
|
||||
</if>
|
||||
<if test="pd.FIXED_ASSETS != null and pd.FIXED_ASSETS != ''"><!-- 固定资产 -->
|
||||
and ( f.FIXED_ASSETS = #{pd.FIXED_ASSETS} )
|
||||
</if>
|
||||
<if test="pd.ANNUALPROFIT != null and pd.ANNUALPROFIT != ''"><!-- 年利润 -->
|
||||
and ( f.ANNUALPROFIT = #{pd.ANNUALPROFIT} )
|
||||
</if>
|
||||
<if test="pd.YEAR_OUTPUT_VALUE != null and pd.YEAR_OUTPUT_VALUE != ''"><!-- 年产值 -->
|
||||
and ( f.YEAR_OUTPUT_VALUE = #{pd.YEAR_OUTPUT_VALUE} )
|
||||
</if>
|
||||
<if test="pd.REG_TYPE != null and pd.REG_TYPE != ''"><!-- 单位注册登记类型 -->
|
||||
and ( f.REG_TYPE = #{pd.REG_TYPE} )
|
||||
</if>
|
||||
<if test="pd.SUBORDINATION != null and pd.SUBORDINATION != ''"><!-- 隶属关系 -->
|
||||
and ( f.SUBORDINATION = #{pd.SUBORDINATION} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE != null and pd.CORP_OF_TYPE != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE = #{pd.CORP_OF_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE2 != null and pd.CORP_OF_TYPE2 != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE2 = #{pd.CORP_OF_TYPE2} )
|
||||
</if>
|
||||
<if test="pd.INDUSTRY_DEPARTMENT != null and pd.INDUSTRY_DEPARTMENT != ''"><!-- 行业监管部门 -->
|
||||
and ( f.INDUSTRY_DEPARTMENT = #{pd.INDUSTRY_DEPARTMENT} )
|
||||
</if>
|
||||
<if test="pd.SCALE != null and pd.SCALE != ''"><!-- 企业规模 -->
|
||||
and ( f.SCALE = #{pd.SCALE} )
|
||||
</if>
|
||||
<if test="pd.SCALE_TYPE != null and pd.SCALE_TYPE != ''"><!-- 是否规模以上 -->
|
||||
and ( f.SCALE_TYPE = #{pd.SCALE_TYPE} )
|
||||
</if>
|
||||
<!-- <if test="pd.LONGITUDE != null and pd.LONGITUDE != ''"><!– 经度 –>-->
|
||||
<!-- and ( f.LONGITUDE = #{pd.LONGITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="pd.LATITUDE != null and pd.LATITUDE != ''"><!– 纬度 –>-->
|
||||
<!-- and ( f.LATITUDE = #{pd.LATITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.LR_NAME != null and pd.LR_NAME != ''"><!-- 法定代表人信息 姓名 -->
|
||||
and ( f.LR_NAME LIKE CONCAT(CONCAT('%', #{pd.LR_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.LR_PHONE != null and pd.LR_PHONE != ''"><!-- 法定代表人信息 手机号码 -->
|
||||
and ( f.LR_PHONE LIKE CONCAT(CONCAT('%', #{pd.LR_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS != null and pd.CONTACTS != ''"><!-- 主要负责人信息 姓名 -->
|
||||
and ( f.CONTACTS LIKE CONCAT(CONCAT('%', #{pd.CONTACTS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS_PHONE != null and pd.CONTACTS_PHONE != ''"><!-- 主要负责人信息 手机号码 -->
|
||||
and ( f.CONTACTS_PHONE LIKE CONCAT(CONCAT('%', #{pd.CONTACTS_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NAME != null and pd.SAFETY_NAME != ''"><!-- 安全负责人信息 姓名 -->
|
||||
and ( f.SAFETY_NAME LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_POST != null and pd.SAFETY_POST != ''"><!-- 安全负责人信息 职务 -->
|
||||
and ( f.SAFETY_POST LIKE CONCAT(CONCAT('%', #{pd.SAFETY_POST}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_BACKGROUND != null and pd.SAFETY_BACKGROUND != ''"><!-- 安全负责人信息 学历 -->
|
||||
and ( f.SAFETY_BACKGROUND LIKE CONCAT(CONCAT('%', #{pd.SAFETY_BACKGROUND}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_MAJOR != null and pd.SAFETY_MAJOR != ''"><!-- 安全负责人信息 专业 -->
|
||||
and ( f.SAFETY_MAJOR LIKE CONCAT(CONCAT('%', #{pd.SAFETY_MAJOR}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NUMBER != null and pd.SAFETY_NUMBER != ''"><!-- 安全负责人信息 单位电话 -->
|
||||
and ( f.SAFETY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NUMBER}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_PHONE != null and pd.SAFETY_PHONE != ''"><!-- 安全负责人信息 手机号码 -->
|
||||
and ( f.SAFETY_PHONE LIKE CONCAT(CONCAT('%', #{pd.SAFETY_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_TECHNICAL != null and pd.SAFETY_TECHNICAL != ''"><!-- 安全负责人信息 技术职称 -->
|
||||
and ( f.SAFETY_TECHNICAL LIKE CONCAT(CONCAT('%', #{pd.SAFETY_TECHNICAL}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_ATTRIBUTE != null and pd.CORP_ATTRIBUTE != ''"><!-- 企业相关属性 -->
|
||||
and ( f.CORP_ATTRIBUTE LIKE CONCAT(CONCAT('%', #{pd.CORP_ATTRIBUTE}),'%') )
|
||||
</if>
|
||||
|
||||
<if test="pd.GAS_CORP != null and pd.GAS_CORP != ''"><!-- 企业相关属性 -->
|
||||
and F.CORPINFO_ID not in (select gas.CORPINFO_ID from `qa-gwj-regulatory`.BUS_GASREPORTCORP gas)
|
||||
</if>
|
||||
<if test="pd.PROVINCE != null and pd.PROVINCE != ''">
|
||||
and f.PROVINCE = #{pd.PROVINCE}
|
||||
</if>
|
||||
<if test="pd.CITY != null and pd.CITY != ''">
|
||||
and f.CITY = #{pd.CITY}
|
||||
</if>
|
||||
<if test="pd.COUNTRY != null and pd.COUNTRY != ''">
|
||||
and f.COUNTRY = #{pd.COUNTRY}
|
||||
</if>
|
||||
<if test="pd.VILLAGE != null and pd.VILLAGE != ''">
|
||||
and f.VILLAGE = #{pd.VILLAGE}
|
||||
</if>
|
||||
GROUP BY f.CORPINFO_ID
|
||||
ORDER BY (f.COR_ORDER+0) asc
|
||||
</select>
|
||||
<select id="listAllForMap" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
f.CORPINFO_ID,
|
||||
f.CORP_NAME,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE
|
||||
FROM
|
||||
bus_corp_info f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and f.AREA = #{AREA}
|
||||
</if>
|
||||
ORDER BY
|
||||
( f.COR_ORDER + 0 ) ASC
|
||||
</select>
|
||||
|
||||
|
||||
<!--从公司端修改企业用户New-->
|
||||
|
|
|
@ -2937,7 +2937,17 @@
|
|||
group by f.HIDDEN_ID
|
||||
order by f.CREATTIME desc,f.STATE + 0 asc
|
||||
</select>
|
||||
<insert id="saveForEmis" parameterType="pd">
|
||||
<select id="findBySource" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
bus_hidden
|
||||
WHERE
|
||||
ISDELETE = 0
|
||||
and
|
||||
SOURCE = #{sourceNumber}
|
||||
</select>
|
||||
<insert id="saveForEmis" parameterType="pd">
|
||||
INSERT INTO bus_hidden_emis(
|
||||
HIDDEN_ID,SOURCE,RISK_UNIT,IDENTIFICATION,RISK_DESCR,RISK_POSITION,LEVEL,CHECK_CONTENT,HIDDENDESCR,HIDDENPART,CREATOR,
|
||||
CREATTIME,RECTIFYDESCR,RECTIFICATIONTYPE,RECTIFICATIONDEPT,RECTIFICATIONOR,RECTIFICATIONDEADLINE,
|
||||
|
|
|
@ -0,0 +1,326 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.map.BiMapMapper">
|
||||
|
||||
|
||||
<select id="getCarRecordslistPage" resultType="com.zcloud.entity.PageData">
|
||||
SELECT LICENSE_PLATE,
|
||||
STATE,
|
||||
COMING_REASON,
|
||||
CASE
|
||||
STATE
|
||||
WHEN 4 THEN
|
||||
TIME_IN
|
||||
WHEN 5 THEN
|
||||
TIME_OUT
|
||||
END TIME
|
||||
from bus_foreigncar
|
||||
where STATE in (4, 5) AND ISDELETE = 0 <if test="pd.AREA != null and pd.AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{pd.AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
ORDER BY TIME DESC
|
||||
</select>
|
||||
<!-- 统计今日临时人员检测
|
||||
* 提交申请数[COUNTAPPLY],门卫确认进入数[COUNTIN],现场车辆数[COUNTSITE],
|
||||
* 审核通过数[COUNPASS],门卫确认离开数[COUNTOUT],入场车辆比例[INRATIO]
|
||||
* 审核未通过数[COUNREFUSE] -->
|
||||
<select id="statisticsOutsiderCount" parameterType="pd" resultType="pd">
|
||||
SELECT F.*,
|
||||
(f.COUNTIN - f.COUNTOUT) COUNTSITE,
|
||||
IF(ISNULL(f.COUNTIN / f.COUNTAPPLY), 0, ROUND(f.COUNTIN / f.COUNTAPPLY * 100, 2)) INRATIO
|
||||
FROM (SELECT COUNT(case when f.STATE != '0' then f.OUTSIDERS_ID END) COUNTAPPLY,
|
||||
COUNT(case when f.TIME_IN IS NOT NULL then f.OUTSIDERS_ID END) COUNTIN,
|
||||
COUNT(case when f.TIME_OUT IS NOT NULL then f.OUTSIDERS_ID END) COUNTOUT,
|
||||
COUNT(case when f.STATE IN ('3', '4', '5', '7', '8') then f.OUTSIDERS_ID END) COUNPASS,
|
||||
COUNT(case when f.STATE = '6' then f.OUTSIDERS_ID END) COUNREFUSE
|
||||
FROM bus_outsiders f
|
||||
WHERE f.ISDELETE = 0
|
||||
AND f.CREATTIME >= CONCAT_WS(" ", DATE_FORMAT(CURDATE(), '%Y-%m-%d'), '00:00:00')) f
|
||||
</select>
|
||||
<!-- 统计今日临时车辆-->
|
||||
|
||||
|
||||
<!-- 统计今日人员刷卡数据(今日进入[COUNTUSERIN],今日离场[COUNTUSEROUT],现场人数[COUNTUSER],入场刷卡数[COUNTCARDIN],出场刷卡数[COUNTCARDOUT]) -->
|
||||
<select id="statisticsCardUserCount" parameterType="pd" resultType="pd">
|
||||
SELECT f.*, (COUNTUSERIN - COUNTUSEROUT) COUNTUSER
|
||||
FROM (SELECT COUNT(DISTINCT (case when f.STATE = 0 then f.USERID END)) COUNTUSERIN,
|
||||
COUNT(DISTINCT (case when f.STATE = 1 then f.USERID END)) COUNTUSEROUT,
|
||||
COUNT(case when f.STATE = 0 then f.CARDID END) COUNTCARDIN,
|
||||
COUNT(case when f.STATE = 1 then f.CARDID END) COUNTCARDOUT
|
||||
FROM bus_carduser f
|
||||
WHERE f.`TIME` >= CONCAT_WS(" ", DATE_FORMAT(CURDATE(), '%Y-%m-%d'), '00:00:00')) f
|
||||
</select>
|
||||
<!-- 统计今日车辆-->
|
||||
|
||||
<select id="getCorpinfoIds" parameterType="string" resultType="string">
|
||||
SELECT CORPINFO_ID FROM bus_corp_info WHERE ISDELETE = '0' AND AREA IN
|
||||
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getPeopleRecordslistPage" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
CARDID,
|
||||
CARDNUMBER,
|
||||
USERID,
|
||||
USERNAME,
|
||||
USERNUMBER,
|
||||
USERDEPARTMENTNAME,
|
||||
CARDTYPE,
|
||||
EQUIPMENTNAME,
|
||||
EQUIPMENTID,
|
||||
TIME,
|
||||
STATE
|
||||
from
|
||||
BUS_CARDUSER f
|
||||
where 1 = 1
|
||||
<if test="pd.AREA != null and pd.AREA != ''">
|
||||
and f.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{pd.AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.USERNAME != null and pd.USERNAME != ''"><!-- 关键词检索 -->
|
||||
and f.USERNAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
|
||||
</if>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 关键词检索 -->
|
||||
and f.TIME <![CDATA[ >= ]]> CONCAT_WS(' ',#{pd.STARTTIME}, '00:00')
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 关键词检索 -->
|
||||
and f.TIME <![CDATA[ <= ]]> CONCAT_WS(' ',#{pd.ENDTIME}, '23:59')
|
||||
</if>
|
||||
<if test="pd.STATE != null and pd.STATE != ''"><!-- 关键词检索 -->
|
||||
and f.STATE = #{pd.STATE}
|
||||
</if>
|
||||
ORDER BY f.`TIME` DESC
|
||||
|
||||
</select>
|
||||
<select id="getRiskIdentificationCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT *
|
||||
FROM (
|
||||
(SELECT COUNT(r.RISKUNIT_ID) '0'
|
||||
FROM bus_riskunit r
|
||||
WHERE r.ISDELETE = '0'
|
||||
AND r.CORPINFO_ID = #{CORPINFO_ID}) t1,
|
||||
(
|
||||
SELECT
|
||||
COUNT( i.IDENTIFICATIONPARTS_ID ) '1'
|
||||
FROM
|
||||
bus_identificationparts i
|
||||
WHERE
|
||||
i.ISDELETE = '0'
|
||||
AND i.CORPINFO_ID = #{CORPINFO_ID}
|
||||
) t2,
|
||||
( SELECT COUNT( 1 ) '2' FROM bus_riskpoint r WHERE r.ISDELETE = '0' AND r.CORPINFO_ID = #{CORPINFO_ID} )
|
||||
t3
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listbymeteorological" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
m.CORPINFO_ID,
|
||||
f.TEMPERATURE,
|
||||
f.HUMIDITY,
|
||||
f.WINDDIRECTION,
|
||||
f.WINDSPEED,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.METEOROLOGICALINFO_ID,
|
||||
f.OPERATOR,
|
||||
f.CODE,
|
||||
sd.NAME as NAME,
|
||||
m.EQUIPMENTNAME
|
||||
FROM
|
||||
`qa-gwj-regulatory`.BUS_METEOROLOGICALINFO f
|
||||
LEFT JOIN `qa-gwj-regulatory`.bus_meteorological m ON m.CODE = f.CODE
|
||||
LEFT JOIN sys_dictionaries sd on sd.DICTIONARIES_ID = m.EQUIPMENTTYPE
|
||||
WHERE 1=1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and m.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
|
||||
and m.EQUIPMENTTYPE = #{TYPE}
|
||||
</if>
|
||||
<if test="id != null and id != ''"><!-- 关键词检索 -->
|
||||
and m.METEOROLOGICAL_ID = #{id}
|
||||
</if>
|
||||
ORDER BY
|
||||
f.OPERATTIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getPersonPositioningCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT *
|
||||
FROM (
|
||||
(SELECT COUNT(u.USER_ID) '0'
|
||||
FROM sys_user u
|
||||
WHERE u.ISDELETE = '0'
|
||||
AND u.CORPINFO_ID = #{CORPINFO_ID}) t1,
|
||||
(
|
||||
SELECT
|
||||
COUNT( o.DEPARTMENT_ID )-1 '1'
|
||||
FROM
|
||||
oa_department o
|
||||
WHERE
|
||||
o.CORPINFO_ID = #{CORPINFO_ID}
|
||||
) t2,
|
||||
( SELECT 0 '2' )
|
||||
t3
|
||||
)
|
||||
|
||||
</select>
|
||||
<select id="getRiskIndex" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelA' TYPE,
|
||||
'重大风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelA'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelB' TYPE,
|
||||
'较大风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelB'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelC' TYPE,
|
||||
'一般风险区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelC'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT,
|
||||
'levelD' TYPE,
|
||||
'低风险性区域数' label
|
||||
FROM
|
||||
bus_riskpoint p
|
||||
LEFT JOIN bus_corp_info ci ON p.CORPINFO_ID = ci.CORPINFO_ID
|
||||
LEFT JOIN sys_dictionaries d ON p.LEVELID = d.BIANMA
|
||||
WHERE
|
||||
p.ISDELETE = 0
|
||||
AND p.LEVELID = 'levelD'
|
||||
AND ci.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and p.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and p.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
<select id="inAndoutPeoCarToday" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日出港人员数' label,
|
||||
'PERSON_OUT' TYPE
|
||||
FROM
|
||||
bus_carduser c
|
||||
WHERE
|
||||
c.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
|
||||
AND c.STATE = 1 UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日进港人员数' label,
|
||||
'PERSON_IN' TYPE
|
||||
FROM
|
||||
bus_carduser c
|
||||
WHERE
|
||||
c.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
AND c.STATE = 0 UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日进港车辆数' label,
|
||||
'CAR_IN' TYPE
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.TIME_IN BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
IFNULL( COUNT( 1 ), 0 ) count,
|
||||
'今日出港车辆数' label,
|
||||
'CAR_OUT' TYPE
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.TIME_OUT BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT(
|
||||
DATE_FORMAT( now(), '%Y-%m-%d' ),
|
||||
' 23:59:59'
|
||||
)
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,573 @@
|
|||
<?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.BiTongjiMapper">
|
||||
|
||||
|
||||
<!-- * 地图下方的统计 安全环保检查情况统计-->
|
||||
<select id="getCountInsByCorpSource" parameterType="pd" resultType="pd">
|
||||
SELECT count(*) AS count,
|
||||
INSPECTION_SOURCE,
|
||||
corp.CORPINFO_ID ,
|
||||
corp.CORP_NAME
|
||||
|
||||
FROM
|
||||
BUS_INSPECTION_SAFETYENVIRONMENTAL f
|
||||
LEFT JOIN oa_department dept
|
||||
on dept.DEPARTMENT_ID = f.INSPECTED_DEPARTMENT_ID
|
||||
LEFT JOIN bus_corp_info corp on corp.CORPINFO_ID = dept.CORPINFO_ID
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and corp.COR_ORDER is not null
|
||||
and corp.COR_ORDER !=''
|
||||
GROUP BY
|
||||
INSPECTION_SOURCE,
|
||||
dept.CORPINFO_ID
|
||||
ORDER BY corp.COR_ORDER *1
|
||||
</select>
|
||||
|
||||
<select id="getHiddenBySource" parameterType="pd" resultType="pd">
|
||||
SELECT count(*),
|
||||
CORPINFO_ID,
|
||||
SOURCE
|
||||
FROM BUS_HIDDEN h
|
||||
WHERE h.ISDELETE = '0'
|
||||
AND (h.SOURCE = '4' OR h.SOURCE = '5')
|
||||
AND (h.STATE != '0' OR h.STATE != '-2' OR h.STATE != '16' OR h.STATE != '100')
|
||||
GROUP BY CORPINFO_ID, h.SOURCE
|
||||
</select>
|
||||
|
||||
<select id="getCorpinfoAllByOrder" parameterType="pd" resultType="pd">
|
||||
SELECT corp.*
|
||||
FROM bus_corp_info corp
|
||||
WHERE corp.ISDELETE = '0'
|
||||
and corp.COR_ORDER is not null
|
||||
and corp.COR_ORDER !=''
|
||||
|
||||
<if test="istongji != null and istongji != ''"><!-- 角色检索 -->
|
||||
and corp.CORPINFO_ID in ('035958e685cf4850bc40151c5e0617a6',
|
||||
'17973964c87346e7a4a737cf252557d9',
|
||||
'97b87eba9f9c49a0a917c1f412016fb1',
|
||||
'286dcae730aa43ba82c97a676f9d8ee2',
|
||||
'21590a00ea5e462e9ee44dd332dddc26',
|
||||
'033549ed3bd648e49c8a65eb4993ec2f',
|
||||
'66131d4e5c8f4c8893b80975dca39ac3',
|
||||
'f1478d64109445948d819beb6c1b52ee',
|
||||
'f21cf733f1354503865af705ecc8dba2',
|
||||
'd7e15394923740bf979efd8c0105063b',
|
||||
'c4e000a8245843ad82f8e172ce063671',
|
||||
'9595235dfa334b2898a0e75d160418fa',
|
||||
'0407e689f75746358326f040e59d1e32',
|
||||
'4e1b8e11c2a94d9eac8cfa07145f9f69',
|
||||
'f8da1790b1034058ae2efefd69af3284',
|
||||
'6aa255d41602497fa0f934a822820df4',
|
||||
'8e2bef340f0e4d81b7560d363e2b5113',
|
||||
'e52f138ca0444c55bdae2a429e3cdbfe',
|
||||
'1fc6f50705de4fd6a76e80f2fc6e4720')
|
||||
</if>
|
||||
|
||||
ORDER BY corp.COR_ORDER *1
|
||||
</select>
|
||||
|
||||
<select id="getCorpUser" parameterType="pd" resultType="Integer">
|
||||
SELECT count(*) as count
|
||||
FROM
|
||||
sys_user f
|
||||
where f.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where ISDELETE = '0') and f.USERNAME !='admin'
|
||||
</select>
|
||||
<select id="getSupeUser" parameterType="pd" resultType="Integer">
|
||||
SELECT count(*) as count
|
||||
FROM
|
||||
`qa-gwj-regulatory`.sys_user
|
||||
where USERNAME != 'admin' and ISDELETE = '0'
|
||||
</select>
|
||||
<select id="getCorpUserCountTop10" parameterType="pd" resultType="pd">
|
||||
SELECT count(*) as count ,
|
||||
corp.CORP_NAME,
|
||||
f.CORPINFO_ID
|
||||
FROM
|
||||
sys_user f
|
||||
LEFT JOIN bus_corp_info corp on corp.CORPINFO_ID = f.CORPINFO_ID
|
||||
WHERE
|
||||
1 = 1 and
|
||||
f.ISDELETE = '0' and f.USERNAME !='admin' and corp.ISDELETE = '0' and corp.COR_ORDER is not null and corp.COR_ORDER !=''
|
||||
GROUP BY
|
||||
f.CORPINFO_ID
|
||||
ORDER BY (corp.COR_ORDER+0) asc
|
||||
</select>
|
||||
|
||||
<select id="getCorpDeptCount" parameterType="pd" resultType="pd">
|
||||
SELECT f.CORPINFO_ID,
|
||||
c.CORP_NAME,
|
||||
f.LEVEL,
|
||||
count(f.DEPARTMENT_ID) AS count
|
||||
FROM
|
||||
oa_department f
|
||||
LEFT JOIN bus_corp_info c
|
||||
ON c.CORPINFO_ID = f.CORPINFO_ID
|
||||
WHERE
|
||||
c.ISDELETE = '0'
|
||||
AND f.PARENT_ID != '0'
|
||||
AND c.COR_ORDER IS NOT NULL
|
||||
AND c.COR_ORDER != ''
|
||||
GROUP BY
|
||||
f.CORPINFO_ID,
|
||||
f.LEVEL
|
||||
</select>
|
||||
<select id="getCorpinfoAllByDeptCountOrder" parameterType="pd" resultType="pd">
|
||||
SELECT f.CORPINFO_ID,
|
||||
c.CORP_NAME,
|
||||
count(1) AS count
|
||||
FROM
|
||||
oa_department f
|
||||
LEFT JOIN bus_corp_info c
|
||||
ON c.CORPINFO_ID = f.CORPINFO_ID
|
||||
WHERE
|
||||
c.ISDELETE = '0'
|
||||
AND c.COR_ORDER IS NOT NULL
|
||||
AND c.COR_ORDER != ''
|
||||
GROUP BY
|
||||
f.CORPINFO_ID
|
||||
ORDER BY count desc
|
||||
LIMIT 10
|
||||
</select>
|
||||
|
||||
<select id="getInsCountBySuper" parameterType="pd" resultType="Integer">
|
||||
SELECT count(*) as count
|
||||
|
||||
FROM
|
||||
bus_inspection_safetyenvironmental f
|
||||
where INSPECTION_SOURCE = '4' and ISDELETE = '0'
|
||||
|
||||
</select>
|
||||
<select id="getInsCountPageBySuper" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
count(*) AS COUNT,
|
||||
CONCAT( INSPECTION_SUBJECT, '检查' ) INSPECTION_SUBJECT,
|
||||
CASE
|
||||
INSPECTION_SUBJECT
|
||||
WHEN '安全' THEN '#f8b62c'
|
||||
WHEN '环保' THEN '#f53f8c'
|
||||
WHEN '综合' THEN '#28b1ff'
|
||||
END ITEMCOLOR
|
||||
|
||||
FROM
|
||||
bus_inspection_safetyenvironmental f
|
||||
WHERE
|
||||
INSPECTION_SOURCE = '4'
|
||||
AND ISDELETE = '0'
|
||||
GROUP BY
|
||||
INSPECTION_SUBJECT
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getHiddenCountBySuper" parameterType="pd" resultType="Integer">
|
||||
SELECT count(*) as count
|
||||
FROM
|
||||
bus_hidden f
|
||||
LEFT JOIN bus_inspection_safetyenvironmental d on f.FOREIGN_ID = d.INSPECTION_ID
|
||||
where f.SOURCE = '4'
|
||||
AND f.ISDELETE = '0' and INSPECTION_SUBJECT is not null and d.ISDELETE = 0
|
||||
</select>
|
||||
|
||||
<select id="getSuperInsCountBySubjec" parameterType="pd" resultType="pd">
|
||||
SELECT count(1) AS count,
|
||||
f.INSPECTION_SUBJECT
|
||||
FROM
|
||||
bus_inspection_safetyenvironmental f
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and f.INSPECTION_SOURCE = '4'
|
||||
GROUP BY
|
||||
f.INSPECTION_SUBJECT
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getSuperInsTop" parameterType="pd" resultType="pd">
|
||||
SELECT f.INSPECTION_PLACE,
|
||||
f.INSPECTION_TIME_START
|
||||
FROM bus_inspection_safetyenvironmental f
|
||||
WHERE f.ISDELETE = '0'
|
||||
and f.INSPECTION_TIME_START !='请选择'
|
||||
order BY
|
||||
f.INSPECTION_TIME_START desc
|
||||
LIMIT 6
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getHiddenCountBySubjec" parameterType="pd" resultType="pd">
|
||||
SELECT count(1) as count,
|
||||
f.SOURCE
|
||||
FROM
|
||||
bus_hidden f
|
||||
where f.ISDELETE = '0'
|
||||
and STATE in (
|
||||
'1','2','3', '4','6','7','8','10' , '13' , '14' , '15')
|
||||
and HIDDENTYPE2 = '安全隐患'
|
||||
and HIDDENLEVEL in ('hiddenLevel1004'
|
||||
, 'hiddenLevel1002'
|
||||
, 'jdyh001'
|
||||
, 'hiddenLevel2002')
|
||||
GROUP BY f.SOURCE
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getHiddenCountByHiddenLevel" parameterType="pd" resultType="pd">
|
||||
SELECT count(1) AS count,
|
||||
HIDDENLEVEL
|
||||
FROM
|
||||
bus_hidden f
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and STATE in (
|
||||
'1','2','3', '4','6','7','8','10' , '13' , '14' , '15')
|
||||
and HIDDENLEVEL in ('hiddenLevel1004'
|
||||
, 'hiddenLevel1002'
|
||||
, 'jdyh001'
|
||||
, 'hiddenLevel2002')
|
||||
and HIDDENTYPE2 = '安全隐患'
|
||||
and f.SOURCE in ('1','2','4','5')
|
||||
GROUP BY HIDDENLEVEL
|
||||
</select>
|
||||
<select id="getHiddenCountBySpecial" parameterType="pd" resultType="Integer">
|
||||
SELECT count(1) AS count,
|
||||
HIDDENLEVEL
|
||||
FROM
|
||||
bus_hidden f
|
||||
WHERE
|
||||
f.ISDELETE = '0'
|
||||
and STATE ='8'
|
||||
</select>
|
||||
<select id="getHiddenCountByCorpInfoHandle" parameterType="pd" resultType="pd">
|
||||
SELECT count(1) AS countAll,
|
||||
count(f.STATE = 4 OR f.STATE = 8 OR NULL) AS countRec,
|
||||
corp.CORP_NAME
|
||||
FROM bus_hidden f
|
||||
LEFT JOIN bus_corp_info corp ON corp.CORPINFO_ID = f.CORPINFO_ID
|
||||
WHERE f.ISDELETE = '0'
|
||||
AND f.STATE NOT IN ( '0', '7', '8', '100', '101', '102' )
|
||||
AND f.HIDDENLEVEL != 'hiddenLevel2002'
|
||||
AND f.HIDDENLEVEL != 'hiddenLevel1001'
|
||||
AND f.HIDDENLEVEL != 'jdyh001'
|
||||
AND f.HIDDENLEVEL NOT IN ( 'hiddenLevel2002', 'hiddenLevel1001', 'jdyh001' )
|
||||
AND corp.COR_ORDER IS NOT NULL
|
||||
AND corp.COR_ORDER != ''
|
||||
GROUP BY
|
||||
f.CORPINFO_ID
|
||||
ORDER BY
|
||||
corp.COR_ORDER *1
|
||||
|
||||
</select>
|
||||
<select id="getHighriskworkCount" parameterType="pd" resultType="pd">
|
||||
SELECT a.countNum1 as hotwork,
|
||||
b.countNum2 as electricity,
|
||||
c.countNum3 as hoisting,
|
||||
d.countNum4 as blindboard,
|
||||
e.countNum5 as highwork,
|
||||
f.countNum6 as confinedspace
|
||||
FROM (
|
||||
(SELECT COUNT(*) AS countNum1 FROM bus_hotworkapplication where ISDELETE = '0') a,
|
||||
( SELECT COUNT(*) AS countNum2 FROM bus_electricity WHERE APPLY_STATUS != '0' ) b,
|
||||
( SELECT COUNT(*) AS countNum3 FROM bus_hoisting where ISDELETE = '0' ) c,
|
||||
( SELECT COUNT(*) AS countNum4 FROM bus_blindboard where ISDELETE = '0' ) d,
|
||||
( SELECT COUNT(*) AS countNum5 FROM bus_highwork WHERE ISDELETE = '0' ) e,
|
||||
( SELECT COUNT(*) AS countNum6 FROM bus_confinedspace WHERE ISDELETE = '0' ) f
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 首页统计 -->
|
||||
<select id="mainStatisticsByCorpinfo" parameterType="pd" resultType="pd">
|
||||
SELECT corpinfo.CORP_NAME AS corpName,
|
||||
corpinfo.CORPINFO_ID AS corpId,
|
||||
count(CASE WHEN h.HIDDEN_ID != '' THEN 1 ELSE NULL END) AS SBHD_NUM,
|
||||
count(CASE WHEN h.STATE = 4 THEN 1 ELSE NULL END) AS ZGHD_NUM
|
||||
FROM bus_corp_info corpinfo
|
||||
LEFT JOIN BUS_HIDDEN h ON corpinfo.CORPINFO_ID = h.CORPINFO_ID AND h.ISDELETE = '0'
|
||||
WHERE 1 = 1
|
||||
and h.STATE not in ('100', '101', '102')
|
||||
GROUP BY corpinfo.CORPINFO_ID
|
||||
</select>
|
||||
|
||||
<!-- 首页统计 -->
|
||||
<select id="mainInsByCorpinfo" parameterType="pd" resultType="pd">
|
||||
SELECT cop.CORP_NAME AS corpName,
|
||||
cop.CORPINFO_ID AS corpId,
|
||||
count(*) as count
|
||||
FROM
|
||||
`qa-gwj-prevention`.BUS_HIDDEN h
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info cop
|
||||
ON cop.CORPINFO_ID = h.CORPINFO_ID
|
||||
WHERE
|
||||
1 = 1
|
||||
AND h.ISDELETE = '0'
|
||||
and h.SOURCE in ('4'
|
||||
, '5')
|
||||
and cop.CORP_NAME is not null
|
||||
AND cop.COR_ORDER IS NOT NULL
|
||||
AND cop.COR_ORDER != ''
|
||||
GROUP BY
|
||||
cop.CORPINFO_ID
|
||||
ORDER BY
|
||||
cop.COR_ORDER *1
|
||||
</select>
|
||||
<select id="getHiddenCountPageBySuper" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
count(*) AS COUNT,
|
||||
CONCAT( INSPECTION_SUBJECT, '检查' ) INSPECTION_SUBJECT,
|
||||
CASE
|
||||
INSPECTION_SUBJECT
|
||||
WHEN '安全' THEN '#f8b62c'
|
||||
WHEN '环保' THEN '#f53f8c'
|
||||
WHEN '综合' THEN '#28b1ff'
|
||||
END ITEMCOLOR
|
||||
FROM
|
||||
bus_hidden f
|
||||
LEFT JOIN bus_inspection_safetyenvironmental d on f.FOREIGN_ID = d.INSPECTION_ID
|
||||
WHERE
|
||||
SOURCE = '4'
|
||||
AND f.ISDELETE = '0' and INSPECTION_SUBJECT is not null
|
||||
|
||||
|
||||
GROUP BY INSPECTION_SUBJECT
|
||||
</select>
|
||||
|
||||
<select id="getCorpUser2" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME
|
||||
from SYS_USER u, SYS_ROLE r
|
||||
where u.ROLE_ID = r.ROLE_ID
|
||||
and u.USERNAME != 'admin'
|
||||
and u.ISDELETE = '0'
|
||||
and u.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info c where c.isdelete ='0' )
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="ROLE_ID != null and ROLE_ID != ''"><!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{ROLE_ID}
|
||||
</if>
|
||||
<if test="STRARTTIME!=null and STRARTTIME!=''"><!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{STRARTTIME}
|
||||
</if>
|
||||
<if test="ENDTIME!=null and ENDTIME!=''"><!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{ENDTIME}
|
||||
</if>
|
||||
<if test="PRECINCT_ID != null and PRECINCT_ID != ''"><!-- 关键词检索 -->
|
||||
AND
|
||||
u.PRECINCT_ID = #{PRECINCT_ID}
|
||||
</if>
|
||||
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"><!-- 用户部门 -->
|
||||
AND u.DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||
</if>
|
||||
order by u.LAST_LOGIN desc
|
||||
</select>
|
||||
<select id="getSupeUser2" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME
|
||||
from `qa-gwj-regulatory`.sys_user u, `qa-gwj-regulatory`.sys_role r
|
||||
where u.ROLE_ID = r.ROLE_ID
|
||||
and u.USERNAME != 'admin'
|
||||
and r.PARENT_ID = '1'
|
||||
and u.ISDELETE = '0'
|
||||
|
||||
</select>
|
||||
<select id="listAllCorp" resultType="com.zcloud.entity.PageData">
|
||||
|
||||
select
|
||||
f.CORPINFO_ID,
|
||||
f.CORP_NAME,
|
||||
f.CODE,
|
||||
f.COMPANY_AREA,
|
||||
f.ADDRESS,
|
||||
f.CREATE_DATE,
|
||||
/*f.SCALE,*/
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.POSTAL_CODE,
|
||||
f.EMPLOYEES,
|
||||
f.AREA_COVERED,
|
||||
f.TOTALASSETS,
|
||||
f.REGCAPITAL,
|
||||
f.SALESREVENUE,
|
||||
f.ANNUALPROFIT,
|
||||
f.ECO_TYPE,
|
||||
f.ECO_TYPE2,
|
||||
/* f.INDUSTRY,
|
||||
*/ f.CORP_TYPE,
|
||||
f.CORP_TYPE2,
|
||||
f.CORP_TYPE3,
|
||||
f.CORP_TYPE4,
|
||||
f.CORP_TYPE_SMALL,
|
||||
f.LR_NAME,
|
||||
f.LR_POSITION,
|
||||
f.LR_PHONE,
|
||||
f.LR_MOBILE,
|
||||
f.CONTACTS,
|
||||
f.CONTACTS_PHONE,
|
||||
f.CHECKPERSON,
|
||||
f.CHECKPERSONPHONE,
|
||||
f.ISDELETE,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.CREATTIME,
|
||||
f.CREATOR,
|
||||
f.FOURTYPE,
|
||||
f.ISRECEIVE,
|
||||
f.CITY,
|
||||
f.PROVINCE,
|
||||
f.COUNTRY,
|
||||
f.VILLAGE,
|
||||
f.LOGIN_USER_ID,
|
||||
f.ADDRESS_BUSINESS,
|
||||
f.ADDRESS_OFFICE,
|
||||
/* f.CORP_STATE,
|
||||
*/ f.FIXED_ASSETS,
|
||||
f.YEAR_OUTPUT_VALUE,
|
||||
f.REG_TYPE,
|
||||
f.SUBORDINATION,
|
||||
f.CORP_OF_TYPE,
|
||||
f.CORP_OF_TYPE2,
|
||||
f.INDUSTRY_DEPARTMENT,
|
||||
f.SCALE_TYPE,
|
||||
f.SAFETY_NAME,
|
||||
f.SAFETY_POST,
|
||||
f.SAFETY_NUMBER,
|
||||
f.SAFETY_PHONE,
|
||||
f.CORP_CONFIRM,
|
||||
f.CORP_EXAMINE,
|
||||
f.REPORT_CYCLE,
|
||||
f.REPORT_STATUS,
|
||||
f.ASCRIPTION,
|
||||
f.COR_ORDER,
|
||||
f.AREA,
|
||||
<if test="HIDDEN_GIS != null and HIDDEN_GIS != ''">
|
||||
(select count(1) from BUS_HIDDEN h where h.CORPINFO_ID = f.CORPINFO_ID and h.ISDELETE='0' and h.STATE='4') as zgCount,
|
||||
(select count(1) from BUS_HIDDEN h where h.CORPINFO_ID = f.CORPINFO_ID and h.ISDELETE='0' and h.STATE!='4') as wzgCount,
|
||||
</if>
|
||||
t.NAME as TYPE_NAME,
|
||||
s.NAME as STATUS_NAME
|
||||
from
|
||||
BUS_CORP_INFO f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries t on t.DICTIONARIES_ID = f.CORP_OF_TYPE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries s on s.DICTIONARIES_ID = f.CORP_STATE
|
||||
where f.ISDELETE='0'
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and f.CORP_NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
</if>
|
||||
<if test="DEPT_PROVINCE != null and DEPT_PROVINCE != ''">
|
||||
and f.PROVINCE = #{DEPT_PROVINCE}
|
||||
</if>
|
||||
<if test="DEPT_CITY != null and DEPT_CITY != ''">
|
||||
and f.CITY = #{DEPT_CITY}
|
||||
</if>
|
||||
<if test="DEPT_COUNTRY != null and DEPT_COUNTRY != ''">
|
||||
and f.COUNTRY = #{DEPT_COUNTRY}
|
||||
</if>
|
||||
<if test="DEPT_VILLAGE != null and DEPT_VILLAGE != ''">
|
||||
and f.VILLAGE = #{DEPT_VILLAGE}
|
||||
</if>
|
||||
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
|
||||
and f.CORP_OF_TYPE in (select CORPTYPE_ID from `qa-gwj-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID})
|
||||
</if>
|
||||
<if test="CORP_NAME != null and CORP_NAME != ''">
|
||||
and f.CORP_NAME = #{CORP_NAME}
|
||||
</if>
|
||||
|
||||
<if test="COUNTRY != null and COUNTRY != ''">
|
||||
and f.COUNTRY = #{COUNTRY}
|
||||
</if>
|
||||
<if test="VILLAGE != null and VILLAGE != ''">
|
||||
and f.VILLAGE = #{VILLAGE}
|
||||
</if>
|
||||
<if test="CORP_OF_TYPE != null and CORP_OF_TYPE != ''">
|
||||
and f.CORP_OF_TYPE = #{CORP_OF_TYPE}
|
||||
</if>
|
||||
|
||||
<if test="corpInfoIds != null and corpInfoIds.size()>0">
|
||||
and f.CORPINFO_ID in
|
||||
<foreach item="item" index="index" collection="corpInfoIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="HIDDEN_GIS != null and HIDDEN_GIS != ''">
|
||||
and (select count(1) from BUS_HIDDEN h where h.CORPINFO_ID=f.CORPINFO_ID and h.STATE != 4 and h.ISDELETE=0)>0
|
||||
</if>
|
||||
|
||||
<if test="DANGER_GIS != null and DANGER_GIS != ''">
|
||||
and (select count(1) from `qa-gwj-regulatory`.BUS_MAJORINFORMATION m where m.CORP_INFO_ID = f.CORPINFO_ID and m.ISDELETE='0')>0
|
||||
</if>
|
||||
</select>
|
||||
<select id="getHiddenCountByHiddenType" resultType="com.zcloud.entity.PageData">
|
||||
<foreach collection="typeList" item="item" separator=" union all " index="index" >
|
||||
SELECT
|
||||
COUNT( 1 ) HIDDEN_COUNT,
|
||||
(SELECT name from sys_dictionaries WHERE BIANMA = #{item} ) LABEL,
|
||||
#{item} TYPE
|
||||
FROM
|
||||
bus_hidden h
|
||||
WHERE
|
||||
h.ISDELETE = 0
|
||||
AND ( h.HIDDENTYPE IN (
|
||||
<if test="item == 'aqyh-qt'">
|
||||
#{item} )
|
||||
</if>
|
||||
<if test="item != 'aqyh-qt'">
|
||||
SELECT
|
||||
BIANMA
|
||||
FROM
|
||||
sys_dictionaries dic
|
||||
WHERE
|
||||
dic.PARENT_ID IN (
|
||||
SELECT
|
||||
d.DICTIONARIES_ID
|
||||
FROM
|
||||
sys_dictionaries d
|
||||
WHERE
|
||||
FIND_IN_SET( #{item}, d.BIANMA ))
|
||||
)
|
||||
</if>
|
||||
or h.HIDDENTYPE = #{item}
|
||||
)
|
||||
AND STATE in (4,8) AND HIDDENTYPE2 = '安全隐患'
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getHiddenCountByHeinrich" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
COUNT( 1 ) HIDDEN_COUNT
|
||||
FROM
|
||||
bus_hidden h
|
||||
where
|
||||
h.ISDELETE = 0
|
||||
AND STATE in (4,8)
|
||||
and HIDDENTYPE2 = '安全隐患'
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,104 @@
|
|||
<?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.GateAreaMapper">
|
||||
<sql id="table"> mk_gate_area </sql>
|
||||
|
||||
<sql id="filed">
|
||||
f.GATE_AREA_ID,
|
||||
f.GATE_AREA_NAME,
|
||||
f.GATE_AREA_TYPE,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.CORPINFO_ID,
|
||||
f.ISDELETE,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME
|
||||
</sql>
|
||||
<insert id="save">
|
||||
INSERT INTO <include refid="table"></include>
|
||||
(
|
||||
GATE_AREA_ID,
|
||||
GATE_AREA_NAME,
|
||||
GATE_AREA_TYPE,
|
||||
LATITUDE,
|
||||
LONGITUDE,
|
||||
CORPINFO_ID,
|
||||
ISDELETE,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME
|
||||
)
|
||||
VALUES (
|
||||
#{GATE_AREA_ID},
|
||||
#{GATE_AREA_NAME},
|
||||
#{GATE_AREA_TYPE},
|
||||
#{LATITUDE},
|
||||
#{LONGITUDE},
|
||||
#{CORPINFO_ID},
|
||||
#{ISDELETE},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME}
|
||||
)
|
||||
</insert>
|
||||
<select id="getDatalistPage" resultType="com.zcloud.entity.PageData">
|
||||
select <include refid="filed"></include>, CONCAT_WS('--', f.LATITUDE,f.LONGITUDE) LONGTITUDEANDLATITUDE,
|
||||
(select count(1) from BUS_GATEVIDEO v where v.GATE_AREA_ID = f.GATE_AREA_ID and v.ISDELETE = '0') as VIDEO_COUNT,
|
||||
(select count(1) from mk_gate_machine m where m.GATE_AREA_ID = f.GATE_AREA_ID and m.ISDELETE = '0') as GATE_COUNT
|
||||
from
|
||||
<include refid="table"></include> f where f.ISDELETE = 0
|
||||
<if test="pd.GATE_AREA_NAME != null and pd.GATE_AREA_NAME != ''">
|
||||
and f.GATE_AREA_NAME like CONCAT(CONCAT('%', #{pd.GATE_AREA_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.GATE_AREA_TYPE != null and pd.GATE_AREA_TYPE != ''">
|
||||
and f.GATE_AREA_TYPE = #{pd.GATE_AREA_TYPE}
|
||||
</if>
|
||||
order by f.OPERATTIME desc
|
||||
</select>
|
||||
<select id="getGatePosition" resultType="com.zcloud.entity.PageData">
|
||||
select LONGITUDE,
|
||||
LATITUDE,
|
||||
GATE_AREA_NAME,
|
||||
'${TYPE}' TYPE,
|
||||
GATE_AREA_ID id
|
||||
FROM
|
||||
mk_gate_area
|
||||
WHERE
|
||||
isdelete = 0 and GATE_AREA_TYPE = #{GATE_AREA_TYPE}
|
||||
<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>
|
||||
<update id="edit">
|
||||
update
|
||||
<include refid="table"></include>
|
||||
set
|
||||
GATE_AREA_NAME = #{GATE_AREA_NAME},
|
||||
GATE_AREA_TYPE = #{GATE_AREA_TYPE},
|
||||
LONGITUDE = #{LONGITUDE},
|
||||
LATITUDE = #{LATITUDE},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
GATE_AREA_ID = #{GATE_AREA_ID}
|
||||
</update>
|
||||
<update id="removeByIds">
|
||||
update mk_gate_area
|
||||
set ISDELETE = 1
|
||||
where GATE_AREA_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,333 @@
|
|||
<?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.GateMachineMapper">
|
||||
<sql id="table"> mk_gate_machine </sql>
|
||||
|
||||
<sql id="filed">
|
||||
f
|
||||
.
|
||||
GATE_MACHINE_ID
|
||||
,
|
||||
f.GATE_MACHINE_TYPE,
|
||||
f.EQUIPMENTID,
|
||||
f.GATE_MACHINE_MODEL,
|
||||
f.GATE_MACHINE_NAME,
|
||||
f.STATE,
|
||||
f.DESCR,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.REMAKE
|
||||
</sql>
|
||||
<insert id="save">
|
||||
INSERT INTO mk_gate_machine
|
||||
(
|
||||
GATE_MACHINE_ID,
|
||||
GATE_AREA_ID,
|
||||
GATE_MACHINE_NAME,
|
||||
GATE_MACHINE_TYPE,
|
||||
EQUIPMENTID,
|
||||
GATE_MACHINE_MODEL,
|
||||
STATE,
|
||||
DESCR,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME)
|
||||
VALUES (#{GATE_MACHINE_ID},
|
||||
#{GATE_AREA_ID},
|
||||
#{GATE_MACHINE_NAME},
|
||||
#{GATE_MACHINE_TYPE},
|
||||
#{EQUIPMENTID},
|
||||
#{GATE_MACHINE_MODEL},
|
||||
#{STATE},
|
||||
#{DESCR},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME})
|
||||
</insert>
|
||||
<select id="getDatalistPage" resultType="com.zcloud.entity.PageData">
|
||||
select <include refid="filed"></include>, CONCAT_WS('--', f.LATITUDE,f.LONGITUDE) LONGTITUDEANDLATITUDE
|
||||
from
|
||||
mk_gate_machine f where ISDELETE = 0
|
||||
<if test="pd.GATE_MACHINE_NAME != null and pd.GATE_MACHINE_NAME != ''">
|
||||
and f.GATE_MACHINE_NAME like CONCAT(CONCAT('%', #{pd.GATE_MACHINE_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''">
|
||||
and f.GATE_AREA_ID = #{pd.GATE_AREA_ID}
|
||||
</if>
|
||||
<if test="pd.GATE_MACHINE_TYPE != null and pd.GATE_MACHINE_TYPE != ''">
|
||||
and f.GATE_MACHINE_TYPE = #{pd.GATE_MACHINE_TYPE}
|
||||
</if>
|
||||
<if test="pd.GATE_MACHINE_MODEL != null and pd.GATE_MACHINE_MODEL != ''">
|
||||
and f.GATE_MACHINE_MODEL like CONCAT(CONCAT('%', #{pd.GATE_MACHINE_MODEL}),'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getOnlineGateMachine" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
'PERSON_OUT' TYPE,
|
||||
COUNT( 1 ) COUNT
|
||||
FROM
|
||||
`bus_carduser` f
|
||||
WHERE
|
||||
f.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
AND STATE = 1
|
||||
<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="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
'PERSON_IN' TYPE,
|
||||
COUNT( 1 ) count
|
||||
FROM
|
||||
`bus_carduser` f
|
||||
WHERE
|
||||
f.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
AND STATE = 0
|
||||
<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="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
'CAR_IN' TYPE,
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.ISDELETE = 0 and
|
||||
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="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
'CAR_OUT' TYPE,
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT
|
||||
FROM
|
||||
bus_foreigncar c
|
||||
WHERE
|
||||
c.ISDELETE = 0 and
|
||||
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="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT
|
||||
'CAMERA' TYPE,
|
||||
IFNULL( COUNT( 1 ), 0 ) COUNT
|
||||
FROM
|
||||
bus_gatevideo v
|
||||
LEFT JOIN mk_gate_area o on v.GATE_AREA_ID = o.GATE_AREA_ID
|
||||
WHERE
|
||||
v.isdelete = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and o.CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getTodayInOutCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.EQUIPMENTID,
|
||||
COUNT( 1 ) COUNT,
|
||||
m.GATE_MACHINE_NAME
|
||||
FROM
|
||||
bus_carduser f
|
||||
LEFT JOIN mk_gate_machine m ON f.EQUIPMENTID = m.EQUIPMENTID
|
||||
WHERE
|
||||
f.TIME > CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and m.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where AREA = #{AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
<if test="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and m.CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and m.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
f.EQUIPMENTID
|
||||
ORDER BY
|
||||
GATE_MACHINE_NAME DESC
|
||||
</select>
|
||||
<select id="getGatePosition" resultType="com.zcloud.entity.PageData">
|
||||
select LONGITUDE,
|
||||
LATITUDE,
|
||||
GATE_MACHINE_NAME,
|
||||
'${TYPE}' TYPE,
|
||||
GATE_MACHINE_ID id
|
||||
FROM
|
||||
mk_gate_machine
|
||||
WHERE
|
||||
isdelete = 0
|
||||
and GATE_MACHINE_TYPE = #{GATE_MACHINE_TYPE}
|
||||
<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="CORP_INFO_ID != null and CORP_INFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORP_INFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getGateMachineInfoById" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
r.GATE_AREA_NAME,
|
||||
GROUP_CONCAT( f.GATE_MACHINE_NAME ) GATE_MACHINE_NAME,
|
||||
GROUP_CONCAT( DISTINCT f.GATE_MACHINE_MODEL ) GATE_MACHINE_MODEL,
|
||||
GROUP_CONCAT( DISTINCT r.CORPINFO_ID ) CORPINFO_ID,
|
||||
GROUP_CONCAT( f.EQUIPMENTID ) EQUIPMENTID
|
||||
FROM
|
||||
mk_gate_machine f
|
||||
LEFT JOIN mk_gate_area r ON r.GATE_AREA_ID = f.GATE_AREA_ID
|
||||
|
||||
left join bus_gatevideo v on v.GATE_AREA_ID = f.GATE_AREA_ID
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
<if test="GATE_AREA_ID != null and GATE_AREA_ID != ''" >
|
||||
and f.GATE_AREA_ID = #{GATE_AREA_ID}
|
||||
</if>
|
||||
<if test="GATEVIDEO_ID != null and GATEVIDEO_ID != ''" >
|
||||
AND v.GATEVIDEO_ID = #{GATEVIDEO_ID}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
f.GATE_AREA_ID
|
||||
</select>
|
||||
<select id="getPersonRecordCountByEId" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
COUNT( 1 ) COUNT,
|
||||
CASE
|
||||
STATE
|
||||
WHEN 0 THEN
|
||||
'PERSON_IN' ELSE 'PERSON_OUT'
|
||||
END TYPE
|
||||
FROM
|
||||
bus_carduser
|
||||
WHERE
|
||||
EQUIPMENTID in <foreach collection="array" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
GROUP BY
|
||||
STATE
|
||||
</select>
|
||||
<select id="getCarRecordCountByEId" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
COUNT( 1 ) COUNT,
|
||||
'CAR_IN' TYPE
|
||||
FROM
|
||||
bus_foreigncar
|
||||
WHERE
|
||||
EQUIPMENTID in
|
||||
<foreach collection="array" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND TIME_IN BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' ) UNION ALL
|
||||
SELECT
|
||||
COUNT( 1 ) COUNT,
|
||||
'CAR_OUT' TYPE
|
||||
FROM
|
||||
bus_foreigncar
|
||||
WHERE
|
||||
EQUIPMENTID in
|
||||
<foreach collection="array" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND TIME_OUT BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
</select>
|
||||
<select id="getCarRecordCountByCorpId" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
COUNT( 1 ) COUNT,
|
||||
'CAR_IN' TYPE
|
||||
FROM
|
||||
bus_foreigncar
|
||||
WHERE
|
||||
ISDELETE = 0
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND TIME_IN BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' ) UNION ALL
|
||||
SELECT
|
||||
COUNT( 1 ) COUNT,
|
||||
'CAR_OUT' TYPE
|
||||
FROM
|
||||
bus_foreigncar
|
||||
WHERE
|
||||
ISDELETE = 0
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND TIME_OUT BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
</select>
|
||||
|
||||
<update id="edit">
|
||||
update
|
||||
<include refid="table"></include>
|
||||
set
|
||||
GATE_MACHINE_TYPE = #{GATE_MACHINE_TYPE},
|
||||
GATE_MACHINE_MODEL = #{GATE_MACHINE_MODEL},
|
||||
GATE_MACHINE_NAME = #{GATE_MACHINE_NAME},
|
||||
STATE = #{STATE},
|
||||
DESCR = #{DESCR},
|
||||
LONGITUDE = #{LONGITUDE},
|
||||
LATITUDE = #{LATITUDE},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
REMAKE = #{REMAKE}
|
||||
where
|
||||
GATE_MACHINE_ID = #{GATE_MACHINE_ID}
|
||||
</update>
|
||||
|
||||
<update id="removeByIds">
|
||||
update mk_gate_machine
|
||||
set ISDELETE = 1
|
||||
where GATE_MACHINE_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getPersonRecordListAllByIdlistPage" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.*
|
||||
from bus_carduser f
|
||||
WHERE
|
||||
1=1
|
||||
and f.EQUIPMENTID in (select EQUIPMENTID from mk_gate_machine where GATE_AREA_ID = #{pd.GATE_AREA_ID})
|
||||
AND f.TIME BETWEEN CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 00:00:00' )
|
||||
AND CONCAT( DATE_FORMAT( now(), '%Y-%m-%d' ), ' 23:59:59' )
|
||||
order by f.time desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,263 @@
|
|||
<?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.GateVideoMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_GATEVIDEO
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.GATE_AREA_ID,
|
||||
f.VIDEONAME,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.CODE,
|
||||
f.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
f.GATEVIDEO_ID,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
GATE_AREA_ID,
|
||||
VIDEONAME,
|
||||
OPDATE,
|
||||
OPUSER,
|
||||
ISDELETE,
|
||||
CODE,
|
||||
PLATFORMVIDEOMANAGEMENT_ID,
|
||||
GATEVIDEO_ID,
|
||||
LATITUDE,
|
||||
LONGITUDE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{GATE_AREA_ID},
|
||||
#{VIDEONAME},
|
||||
#{OPDATE},
|
||||
#{OPUSER},
|
||||
#{ISDELETE},
|
||||
#{CODE},
|
||||
#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
#{GATEVIDEO_ID},
|
||||
#{LATITUDE},
|
||||
#{LONGITUDE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
GATEVIDEO_ID = #{GATEVIDEO_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
<if test="GATE_AREA_ID != null and GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
GATE_AREA_ID = #{GATE_AREA_ID},
|
||||
</if>
|
||||
<if test="VIDEONAME != null and VIDEONAME != ''"><!-- 关键词检索 -->
|
||||
VIDEONAME = #{VIDEONAME},
|
||||
</if>
|
||||
<if test="PLATFORMVIDEOMANAGEMENT_ID != null and PLATFORMVIDEOMANAGEMENT_ID != ''"><!-- 关键词检索 -->
|
||||
PLATFORMVIDEOMANAGEMENT_ID = #{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
CODE = #{CODE},
|
||||
</if>
|
||||
GATEVIDEO_ID = GATEVIDEO_ID
|
||||
where
|
||||
GATEVIDEO_ID = #{GATEVIDEO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
GATEVIDEO_ID = #{GATEVIDEO_ID}
|
||||
</update>
|
||||
|
||||
<update id="editIsShowBycorpinfoid" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
GATE_AREA_ID = #{GATE_AREA_ID}
|
||||
</update>
|
||||
<update id="editIsShow" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
GATEVIDEO_ID = #{GATEVIDEO_ID}
|
||||
</update>
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
<if test="GATEVIDEO_ID != null and GATEVIDEO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATEVIDEO_ID=#{GATEVIDEO_ID}
|
||||
</if>
|
||||
<if test="GATE_AREA_ID != null and GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATE_AREA_ID=#{GATE_AREA_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 通过CODE获取数据 -->
|
||||
<select id="findByCode" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CODE=#{CODE}
|
||||
</select>
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
pv.INDEXCODE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.GATE_AREA_ID != null and pd.GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATE_AREA_ID=#{pd.GATE_AREA_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.VIDEONAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="GATE_AREA_ID != null and GATE_AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.GATE_AREA_ID=#{GATE_AREA_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listBo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.VIDEONAME,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.GATEVIDEO_ID,
|
||||
pv.INDEXCODE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
|
||||
and GATEVIDEO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
GATEVIDEO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAllForMap" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
|
||||
<!-- 消防点位已定位 -->
|
||||
<select id="getPointsInfo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
<select id="getCameraPosition" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
GATEVIDEO_ID AS id,
|
||||
VIDEONAME AS `NAME`,
|
||||
'CAMERA' AS TYPE,
|
||||
v.LATITUDE,
|
||||
v.LONGITUDE
|
||||
FROM
|
||||
bus_gatevideo v
|
||||
LEFT JOIN mk_gate_machine o on v.GATE_AREA_ID = o.GATE_AREA_ID
|
||||
WHERE
|
||||
v.ISDELETE = 0
|
||||
and v.LATITUDE is not null and v.LONGITUDE is not null
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.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 o.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,177 @@
|
|||
<?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.MapKeyProjectMapper">
|
||||
|
||||
|
||||
<select id="findFormCount" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
SUM( STATE_COUNT ) STATE_COUNT,
|
||||
SUM( VIDEOKG_COUNT ) VIDEO_COUNT,
|
||||
SUM( CHECK_COUNT ) CHECK_COUNT,
|
||||
SUM( HIDDEN_COUNT ) HIDDEN_COUNT,
|
||||
SUM( PUNISH_COUNT ) PUNISH_COUNT,
|
||||
SUM( AMOUT_SUM ) AMOUT_SUM
|
||||
FROM
|
||||
`qa-gwj-regulatory`.vi_keyproj_count
|
||||
where 1=1
|
||||
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ids!= null and ids.size()>0">
|
||||
AND CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="datalistPage" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
v.OUTSOURCED_COUNT,
|
||||
v.CHECK_COUNT,
|
||||
v.HIDDEN_COUNT,
|
||||
c.CORP_NAME
|
||||
FROM
|
||||
`qa-gwj-regulatory`.vi_keyproj_count v
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c on v.CORPINFO_ID=c.CORPINFO_ID
|
||||
where 1=1
|
||||
<if test="pd.CORPINFO_ID!= null and pd.CORPINFO_ID!=''">
|
||||
and v.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.ids!= null and pd.ids.size()>0">
|
||||
AND v.CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
|
||||
#{pd.ids[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
order by v.CHECK_COUNT desc
|
||||
</select>
|
||||
|
||||
<select id="getProjectLocation" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
'PROJECT' TYPE,
|
||||
o.OUTSOURCED_ID id,
|
||||
o.WORK_LONGITUDE LONGITUDE,
|
||||
o.WORK_LATITUDE LATITUDE,
|
||||
u.CORPINFO_ID,
|
||||
o.OUTSOURCED_NAME as MAP_POINT_NAME
|
||||
FROM
|
||||
`qa-gwj-regulatory`.bus_outsourced o
|
||||
LEFT JOIN `qa-gwj-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
WHERE
|
||||
o.ISDELETE = '0'
|
||||
AND o.STATE = '1'
|
||||
AND o.WORK_LONGITUDE IS NOT NULL
|
||||
AND o.WORK_LONGITUDE != ''
|
||||
AND o.WORK_LATITUDE IS NOT NULL
|
||||
AND o.WORK_LATITUDE != ''
|
||||
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
|
||||
and u.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ids!= null and ids.size()>0">
|
||||
AND u.CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getVideoLocation" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
'VIDEO' TYPE,
|
||||
v.VIDEOMANAGER_ID id,
|
||||
v.LONGITUDE,
|
||||
v.LATITUDE,
|
||||
u.CORPINFO_ID,
|
||||
v.VIDEONAME as MAP_POINT_NAME
|
||||
FROM
|
||||
`qa-gwj-regulatory`.bus_videomanager v
|
||||
LEFT JOIN `qa-gwj-regulatory`.bus_outsourced o on v.OUTSOURCED_ID = o.OUTSOURCED_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
WHERE
|
||||
v.ISDELETE = '0'
|
||||
AND o.STATE = '1'
|
||||
AND o.ISDELETE = '0'
|
||||
AND v.LONGITUDE IS NOT NULL
|
||||
AND v.LONGITUDE != ''
|
||||
AND v.LATITUDE IS NOT NULL
|
||||
AND v.LATITUDE != ''
|
||||
<if test="CORPINFO_ID!= null and CORPINFO_ID!=''">
|
||||
and u.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ids!= null and ids.size()>0">
|
||||
AND u.CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="getProjectById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
|
||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
|
||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
|
||||
(select GROUP_CONCAT(t.NAME) from (
|
||||
SELECT
|
||||
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
||||
FROM
|
||||
`qa-gwj-prevention`.OA_DEPARTMENT t
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON c.CORPINFO_ID = t.CORPINFO_ID
|
||||
) t where FIND_IN_SET(t.DEPARTMENT_ID, f.JURISDICTION_UNIT)) as JURISDICTION_UNIT_NAME,
|
||||
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.MANAGE_NAME)) as MANAGE_CORPS_NAME,
|
||||
-- isd.NAME DEPARTMENT_NAME,
|
||||
isdd.NAME MANAGER_DEPARTMENT_NAME,
|
||||
isu.NAME USER_NAME,
|
||||
pci.NAME Q_COMPETENT_DEPT_NAME,
|
||||
pcij.NAME Q_DEPARTMENT_NAME,
|
||||
pcijd.NAME Q_INVOLVING_CORPS_DEPART_NAME,
|
||||
b.UNITS_NAME as UNITS_ID,
|
||||
b.UNITS_NAME as UNITS_NAME,
|
||||
p.`NAME` as UNITS_PIC_NAME
|
||||
from
|
||||
`qa-gwj-regulatory`.bus_outsourced f
|
||||
-- LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isd ON isd.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-gwj-regulatory`.SYS_DEPARTMENT isdd ON isdd.DEPARTMENT_ID = f.MANAGER_DEPARTMENT_ID
|
||||
LEFT JOIN `qa-gwj-regulatory`.SYS_USER isu ON isu.USER_ID = f.CONTRACT_PIC
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department pci ON pci.DEPARTMENT_ID = f.COMPETENT_DEPT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department pcij ON pcij.DEPARTMENT_ID = f.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department pcijd ON pcijd.DEPARTMENT_ID = f.INVOLVING_CORPS_DEPART_ID
|
||||
left join `qa-gwj-regulatory`.bus_units b using (UNITS_ID)
|
||||
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||
where
|
||||
f.OUTSOURCED_ID = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="getVideoById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.OUTSOURCED_ID,
|
||||
f.VIDEONAME,
|
||||
f.VIDEOURL,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.CODE,
|
||||
f.VIDEO_RESOURCES_ID,
|
||||
f.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
f.VIDEOMANAGER_ID,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
o.OUTSOURCED_NAME,
|
||||
c.CORP_NAME,
|
||||
pv.INDEXCODE
|
||||
from
|
||||
`qa-gwj-regulatory`.BUS_VIDEOMANAGER f
|
||||
LEFT JOIN `qa-gwj-regulatory`.bus_outsourced o on o.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.vi_user_all u on o.CREATOR = u.USER_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c on u.CORPINFO_ID=c.CORPINFO_ID
|
||||
left join `qa-gwj-regulatory`.bus_platformvideomanagement pv on pv.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where
|
||||
f.VIDEOMANAGER_ID = #{id}
|
||||
</select>
|
||||
</mapper>
|
|
@ -592,4 +592,39 @@
|
|||
where DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||
order by DEP_ORDER asc, NAME
|
||||
</select>
|
||||
<!-- 向下递归查询企业部门(集团部门+子公司部门) -->
|
||||
<select id="listTreeManageAndCorp" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
DEP_ORDER,
|
||||
DEPARTMENT_ID id,
|
||||
NAME name,
|
||||
PARENT_ID pId,
|
||||
CORPINFO_ID,
|
||||
0 as COR_ORDER
|
||||
FROM
|
||||
`qa-gwj-regulatory`.sys_department f
|
||||
WHERE
|
||||
FIND_IN_SET( DEPARTMENT_ID, `qa-gwj-regulatory`.queryRecursiveDeptDown ( #{DEPARTMENT_ID} ) ) UNION ALL
|
||||
SELECT
|
||||
DEP_ORDER,
|
||||
DEPARTMENT_ID id,
|
||||
NAME name,
|
||||
PARENT_ID pId,
|
||||
f.CORPINFO_ID,
|
||||
c.COR_ORDER
|
||||
FROM
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info c on f.CORPINFO_ID = c.CORPINFO_ID
|
||||
where c.ISDELETE = '0'
|
||||
ORDER BY
|
||||
NAME,DEP_ORDER ASC
|
||||
) t
|
||||
ORDER BY
|
||||
(COR_ORDER+0) asc,
|
||||
NAME,DEP_ORDER asc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -1346,4 +1346,90 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ISASSESS = #{ISASSESS}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countAllByArea" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
ifnull(COUNT( 1 ),0) USERCOUNT
|
||||
FROM
|
||||
`qa-gwj-prevention`.sys_user s
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info ci ON s.CORPINFO_ID = ci.CORPINFO_ID
|
||||
WHERE s.ISDELETE = '0' and ci.AREA is not null and ci.AREA != ''
|
||||
<if test=" AREA != null and AREA != ''">
|
||||
and ci.AREA = #{AREA}
|
||||
</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-gwj-prevention`.sys_user u
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info c ON u.CORPINFO_ID = c.CORPINFO_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_post p on u.POST_ID = p.POST_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department d on u.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
WHERE
|
||||
u.ISDELETE = 0 and
|
||||
u.CARDNO = #{CARDNO}
|
||||
</select>
|
||||
<!-- 通过用户卡号获取数据(查询企业端用户) -->
|
||||
<select id="findByCardNo" parameterType="pd" resultType="pd">
|
||||
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
|
||||
`qa-gwj-prevention`.sys_user u
|
||||
left join `qa-gwj-prevention`oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||
left join `qa-gwj-prevention`sys_post p on p.POST_ID = u.POST_ID
|
||||
where
|
||||
u.CARDNO = #{CARDNO}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.map.DataDockingLogMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_DATA_DOCKING_LOG
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.DOCKING_MODULE,
|
||||
f.DOCKING_TYPE,
|
||||
f.DOCKING_TIME,
|
||||
f.NUMBER,
|
||||
f.BUS_DATA_DOCKING_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
DOCKING_MODULE,
|
||||
DOCKING_TYPE,
|
||||
DOCKING_TIME,
|
||||
NUMBER,
|
||||
BUS_DATA_DOCKING_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{DOCKING_MODULE},
|
||||
#{DOCKING_TYPE},
|
||||
#{DOCKING_TIME},
|
||||
#{NUMBER},
|
||||
#{BUS_DATA_DOCKING_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
BUS_DATA_DOCKING_ID = #{BUS_DATA_DOCKING_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
DOCKING_MODULE = #{DOCKING_MODULE},
|
||||
DOCKING_TYPE = #{DOCKING_TYPE},
|
||||
DOCKING_TIME = #{DOCKING_TIME},
|
||||
NUMBER = #{NUMBER},
|
||||
BUS_DATA_DOCKING_ID = BUS_DATA_DOCKING_ID
|
||||
where
|
||||
BUS_DATA_DOCKING_ID = #{BUS_DATA_DOCKING_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.BUS_DATA_DOCKING_ID = #{BUS_DATA_DOCKING_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
BUS_DATA_DOCKING_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,472 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.map.FireResourcesMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
bus_fireresources
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
FIRERESOURCES_ID,
|
||||
FIRERESOURCES_NAME,
|
||||
FIRERESOURCES_TYPE,
|
||||
LONGTITUDE,
|
||||
LATITUDE,
|
||||
DESCR,
|
||||
CREATIME,
|
||||
OPERATIME,
|
||||
ISDELETE,
|
||||
CORPINFO_ID,
|
||||
STATE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{FIRERESOURCES_ID},
|
||||
#{FIRERESOURCES_NAME},
|
||||
#{FIRERESOURCES_TYPE},
|
||||
#{LONGTITUDE},
|
||||
#{LATITUDE},
|
||||
#{DESCR},
|
||||
#{CREATIME},
|
||||
#{OPERATIME},
|
||||
#{ISDELETE},
|
||||
#{CORPINFO_ID},
|
||||
#{STATE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set ISDELETE = '1'
|
||||
where
|
||||
FIRERESOURCES_ID = #{FIRERESOURCES_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
FIRERESOURCES_NAME = #{FIRERESOURCES_NAME},
|
||||
FIRERESOURCES_TYPE = #{FIRERESOURCES_TYPE},
|
||||
LONGTITUDE = #{LONGTITUDE},
|
||||
LATITUDE = #{LATITUDE},
|
||||
DESCR = #{DESCR},
|
||||
OPERATIME = #{OPERATIME},
|
||||
ISDELETE = #{ISDELETE},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
STATE = #{STATE}
|
||||
where
|
||||
FIRERESOURCES_ID = #{FIRERESOURCES_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
FIRERESOURCES_ID = #{FIRERESOURCES_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
c.CORP_NAME,
|
||||
sd1.NAME as FIRERESOURCES_TYPENAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries sd1 on sd1.BIANMA = f.FIRERESOURCES_TYPE
|
||||
left join `qa-gwj-prevention`.bus_corp_info c on c.CORPINFO_ID = f.CORPINFO_ID
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
<if test="pd.FIRERESOURCES_NAME != null and pd.FIRERESOURCES_NAME != ''">
|
||||
and ( f.FIRERESOURCES_NAME LIKE CONCAT(CONCAT('%', #{pd.FIRERESOURCES_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.FIRERESOURCES_TYPE != null and pd.FIRERESOURCES_TYPE != ''">
|
||||
and f.FIRERESOURCES_TYPE = #{pd.FIRERESOURCES_TYPE}
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
order by f.CREATIME desc
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
</select>
|
||||
<select id="getControlRoomDataList" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
FIRERESOURCES_ID id,
|
||||
FIRERESOURCES_NAME NAME,
|
||||
d.BIANMA TYPE,
|
||||
LONGTITUDE LONGITUDE,
|
||||
LATITUDE,
|
||||
DESCR,
|
||||
'./bi/images/map/xiaofang/contro.png' IMAGE_FILE
|
||||
FROM
|
||||
bus_fireresources f
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries d ON f.FIRERESOURCES_TYPE = d.BIANMA
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
AND f.FIRERESOURCES_TYPE = 'xfkzs01'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND f.CORPINFO_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getPumpRoomDataList" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
FIRERESOURCES_ID id,
|
||||
FIRERESOURCES_NAME NAME,
|
||||
d.BIANMA TYPE,
|
||||
LONGTITUDE LONGITUDE,
|
||||
LATITUDE,
|
||||
DESCR,
|
||||
'./bi/images/map/xiaofang/pumpRoom.png' IMAGE_FILE
|
||||
FROM
|
||||
bus_fireresources f
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries d ON f.FIRERESOURCES_TYPE = d.BIANMA
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
AND f.FIRERESOURCES_TYPE = 'xfbf01'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND f.CORPINFO_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getRescueTeamDataList" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
FIRERESOURCES_ID id,
|
||||
FIRERESOURCES_NAME NAME,
|
||||
d.BIANMA TYPE,
|
||||
LONGTITUDE LONGITUDE,
|
||||
LATITUDE,
|
||||
DESCR,
|
||||
'./bi/images/map/xiaofang/rescueTeam.png' IMAGE_FILE
|
||||
FROM
|
||||
bus_fireresources f
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries d ON f.FIRERESOURCES_TYPE = d.BIANMA
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
AND f.FIRERESOURCES_TYPE = 'xfjyd01'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND f.CORPINFO_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getWaterSourceDataList" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
FIRERESOURCES_ID id,
|
||||
FIRERESOURCES_NAME NAME,
|
||||
d.BIANMA TYPE,
|
||||
LONGTITUDE LONGITUDE,
|
||||
LATITUDE,
|
||||
DESCR,
|
||||
'./bi/images/map/xiaofang/waterSource.png' IMAGE_FILE
|
||||
FROM
|
||||
bus_fireresources f
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries d ON f.FIRERESOURCES_TYPE = d.BIANMA
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
AND f.FIRERESOURCES_TYPE = 'xfsy01'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND f.CORPINFO_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPointDataList" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
FIRE_POINT_ID id,
|
||||
FIRE_POINT_NAME NAME,
|
||||
'point' TYPE,
|
||||
LONGITUDE,
|
||||
LATITUDE
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_fire_point f
|
||||
WHERE
|
||||
f.ISDELETE = 0
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND f.CORPINFO_ID in
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDataById" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
f.*,
|
||||
c.CORP_NAME
|
||||
FROM
|
||||
bus_fireresources f
|
||||
left join `qa-gwj-prevention`.bus_corp_info c on f.CORPINFO_ID = c.CORPINFO_ID
|
||||
where f.ISDELETE = 0
|
||||
and f.FIRERESOURCES_ID = #{FIRERESOURCES_ID}
|
||||
</select>
|
||||
<select id="getCheckRecordByPid" resultType="pd">
|
||||
SELECT
|
||||
frp.EQUIPMENT_POINT_ID,
|
||||
fc.FIRE_CHECK_STANDARD_NAME,
|
||||
fc.FIRE_CHECK_TYPE,
|
||||
u.`NAME` USERNAME,
|
||||
dep.`NAME` deptName,
|
||||
d.`NAME` dicName,
|
||||
fpp.FIRE_CHECK_ID,
|
||||
fr.FIRE_RECORD_ID,
|
||||
fp.FIRE_POINT_NAME,
|
||||
reg.FIRE_REGION_NAME,
|
||||
fpp.FIRE_POINT_ID,
|
||||
fr.CHECK_TIME,
|
||||
fr.PERIODSTART,
|
||||
fr.PERIODEND
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_fire_record fr
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_point_prepared fpp ON fr.FIRE_CHECK_ID = fpp.FIRE_CHECK_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_checklist fc ON fpp.FIRE_CHECK_ID = fc.FIRE_CHECK_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries d ON fc.FIRE_CHECK_TYPE = d.BIANMA
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user u ON fc.USER_ID = u.USER_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_point fp ON fp.FIRE_POINT_ID = fpp.FIRE_POINT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_region reg ON reg.FIRE_REGION_ID = fp.FIRE_REGION_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department dep ON dep.DEPARTMENT_ID = fc.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_record_point frp ON fr.FIRE_RECORD_ID = frp.FIRE_RECORD_ID AND fp.FIRE_POINT_ID = frp.FIRE_POINT_ID
|
||||
WHERE
|
||||
fr.FINISHED = 1
|
||||
and fc.ISDELETE = 0
|
||||
and frp.ISDELETE = 0
|
||||
<if test="FIRE_POINT_ID != null and FIRE_POINT_ID != ''" >
|
||||
AND fpp.FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
</if>
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''" >
|
||||
AND fc.FIRE_CHECK_STANDARD_NAME like concat('%',concat(#{KEYWORDS},'%'))
|
||||
</if>
|
||||
GROUP BY
|
||||
fr.FIRE_CHECK_ID,
|
||||
fr.FIRE_RECORD_ID
|
||||
ORDER BY
|
||||
fr.OPERATTIME DESC
|
||||
</select>
|
||||
<select id="findPointById" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
p.FIRE_POINT_ID,
|
||||
p.FIRE_POINT_NAME,
|
||||
p.FIRE_POINT_CODE,
|
||||
p.QUALIFIED_PHOTOS_ID,
|
||||
p.LONGITUDE,
|
||||
p.LATITUDE,
|
||||
CONCAT_WS('--', p.LATITUDE,p.LONGITUDE) LONGTITUDEANDLATITUDE,
|
||||
r.FIRE_REGION_ID,
|
||||
d.`NAME` AS DEPARTMENT_NAME,
|
||||
u.`NAME` AS USERNAME,
|
||||
r.FIRE_REGION_NAME,
|
||||
u.USER_ID,
|
||||
p.DEPARTMENT_ID
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_fire_point AS p
|
||||
left JOIN `qa-gwj-prevention`.bus_fire_region AS r ON p.FIRE_REGION_ID = r.FIRE_REGION_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user AS u ON p.USER_ID = u.USER_ID
|
||||
left JOIN `qa-gwj-prevention`.oa_department AS d ON p.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
WHERE
|
||||
r.ISDELETE = 0 AND p.ISDELETE = 0
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
AND r.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="FIRE_POINT_ID != null and FIRE_POINT_ID != ''">
|
||||
AND FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
<select id="listAll4H5" resultType="com.zcloud.entity.PageData">
|
||||
SELECT fp.USER_ID,
|
||||
fp.DEPARTMENT_ID,
|
||||
fp.FIRE_POINT_NAME,
|
||||
fp.FIRE_POINT_CODE,
|
||||
fp.FIRE_POINT_ID,
|
||||
fr.FIRE_REGION_NAME,
|
||||
fr.FIRE_REGION_ID,
|
||||
fd.FIRE_DEVICE_CODE,
|
||||
fd.FIRE_DEVICE_TYPE_ID,
|
||||
fd.VALIDITY_START_TIME,
|
||||
fd.VALIDITY_END_TIME,
|
||||
fd.REMAKE,
|
||||
fd.FIRE_DEVICE_ID,
|
||||
su.`NAME` AS USERNAME,
|
||||
d.`NAME` AS DEPARTMENTNAME,
|
||||
`qa-gwj-prevention`.sys_dictionaries.`NAME` AS FIRE_DEVICE_TYPE_NAME,
|
||||
GROUP_CONCAT(DISTINCT FIRE_CHECK_STANDARD_ITEM ORDER BY FIRE_CHECK_STANDARD_ITEM SEPARATOR '@@' ) FIRE_CHECK_STANDARD_ITEM
|
||||
FROM `qa-gwj-prevention`.bus_fire_point AS fp
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_device AS fd ON fp.FIRE_POINT_ID = fd.FIRE_POINT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_region AS fr ON fd.FIRE_REGION_ID = fr.FIRE_REGION_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user AS su ON fp.USER_ID = su.USER_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.oa_department AS d ON fd.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries ON fd.FIRE_DEVICE_TYPE_ID = sys_dictionaries.BIANMA
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_check_standard fcs on fd.FIRE_DEVICE_TYPE_ID = fcs.FIRE_DEVICE_TYPE
|
||||
WHERE fp.ISDELETE = 0
|
||||
AND fd.ISDELETE = 0
|
||||
and fcs.ISDELETE = 0
|
||||
AND fp.FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
GROUP BY fd.FIRE_DEVICE_CODE
|
||||
ORDER BY fr.FIRE_REGION_ID,
|
||||
fr.CREATTIME,
|
||||
fp.FIRE_POINT_ID,
|
||||
fp.CREATTIME,
|
||||
fd.FIRE_DEVICE_TYPE_ID,
|
||||
fd.CREATTIME,
|
||||
fd.OPERATTIME DESC
|
||||
</select>
|
||||
<select id="getPointQualifiedPhotosByEpid" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
img.*
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_imgfiles img
|
||||
LEFT JOIN `qa-gwj-prevention`.`qa-gwj-prevention`.bus_fire_record_point p ON p.QUALIFIED_PHOTOS_ID = img.FOREIGN_KEY
|
||||
WHERE
|
||||
img.TYPE = 115
|
||||
and p.EQUIPMENT_POINT_ID = #{EQUIPMENT_POINT_ID}
|
||||
</select>
|
||||
<select id="getPointQualifiedPhotos" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
img.*
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_imgfiles img
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_point p ON p.QUALIFIED_PHOTOS_ID = img.FOREIGN_KEY
|
||||
WHERE
|
||||
img.TYPE = 115
|
||||
and p.FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
</select>
|
||||
<select id="goRecordDeviceByPid" resultType="com.zcloud.entity.PageData">
|
||||
|
||||
SELECT
|
||||
frd.EQUIPMENT_RECORD_ID,
|
||||
frd.ISNORMAL,
|
||||
IFNULL( frd.HIDDEN_ID, '' ) HIDDEN_ID,
|
||||
frd.FIRE_RECORD_ID,
|
||||
fp.FIRE_POINT_ID,
|
||||
fp.FIRE_POINT_NAME,
|
||||
fr.FIRE_REGION_ID,
|
||||
fr.FIRE_REGION_NAME,
|
||||
frp.P_ISCHECKED ISCHECKED,
|
||||
GROUP_CONCAT( DISTINCT d.NAME ) dicName,
|
||||
GROUP_CONCAT( DISTINCT fd.FIRE_DEVICE_CODE ) FIRE_DEVICE_CODE,
|
||||
GROUP_CONCAT( DISTINCT fd.FIRE_DEVICE_TYPE_ID ) FIRE_DEVICE_TYPE_ID,
|
||||
GROUP_CONCAT( DISTINCT fcs.FIRE_CHECK_STANDARD_ITEM ORDER BY FIRE_CHECK_STANDARD_ITEM desc SEPARATOR '@@' ) FIRE_CHECK_STANDARD_ITEM
|
||||
FROM
|
||||
bus_fire_record_device frd
|
||||
LEFT JOIN bus_fire_device fd ON frd.FIRE_DEVICE_ID = fd.FIRE_DEVICE_ID
|
||||
LEFT JOIN sys_dictionaries d ON fd.FIRE_DEVICE_TYPE_ID = d.BIANMA
|
||||
LEFT JOIN bus_fire_point fp ON fd.FIRE_POINT_ID = fp.FIRE_POINT_ID
|
||||
LEFT JOIN bus_fire_record_point frp ON frp.FIRE_POINT_ID = fp.FIRE_POINT_ID
|
||||
AND frd.FIRE_RECORD_ID = frp.FIRE_RECORD_ID
|
||||
LEFT JOIN bus_fire_region fr ON fp.FIRE_REGION_ID = fr.FIRE_REGION_ID
|
||||
LEFT JOIN bus_fire_check_standard fcs ON fd.FIRE_DEVICE_TYPE_ID = fcs.FIRE_DEVICE_TYPE
|
||||
AND fcs.ISDELETE = 0
|
||||
|
||||
where frd.FIRE_RECORD_ID = #{FIRE_RECORD_ID} and fp.FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
GROUP BY
|
||||
frd.FIRE_RECORD_ID,
|
||||
fd.FIRE_DEVICE_ID
|
||||
ORDER BY fd.FIRE_DEVICE_CODE
|
||||
</select>
|
||||
<select id="devicelistPage" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
d.FIRE_POINT_ID,
|
||||
p.FIRE_POINT_NAME,
|
||||
FIRE_DEVICE_TYPE_ID,
|
||||
dic.`NAME` FIRE_DEVICE_TYPE_NAME,
|
||||
COUNT( 1 ) COUNT
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_fire_device d
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_point p ON d.FIRE_POINT_ID = p.FIRE_POINT_ID
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries dic ON d.FIRE_DEVICE_TYPE_ID = dic.BIANMA
|
||||
WHERE
|
||||
d.ISDELETE = 0 and p.isdelete = 0
|
||||
<if test="pd.FIRE_DEVICE_TYPE_ID != null and pd.FIRE_DEVICE_TYPE_ID != ''">
|
||||
and d.FIRE_DEVICE_TYPE_ID = #{pd.FIRE_DEVICE_TYPE_ID}
|
||||
</if>
|
||||
<if test="pd.FIRE_POINT_NAME != null and pd.FIRE_POINT_NAME != ''">
|
||||
and p.FIRE_POINT_NAME like concat('%',concat(#{pd.FIRE_POINT_NAME},'%'))
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
|
||||
and d.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.AREA != null and pd.AREA != ''">
|
||||
and d.CORPINFO_ID IN (select CORPINFO_ID from `qa-gwj-prevention`.bus_corp_info where AREA = #{pd.AREA} and ISDELETE = 0)
|
||||
</if>
|
||||
GROUP BY
|
||||
d.FIRE_POINT_ID,
|
||||
d.FIRE_DEVICE_TYPE_ID
|
||||
ORDER BY
|
||||
d.CREATTIME DESC
|
||||
</select>
|
||||
<select id="getPointCheckPhotoById" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
GROUP_CONCAT( img.FILEPATH SEPARATOR '@@' ) FILEPATHLIST,
|
||||
u.`NAME` CREATOR_NAME,
|
||||
cl.FIRE_CHECK_ID,
|
||||
cl.FIRE_CHECK_STANDARD_NAME,
|
||||
frp.EQUIPMENT_POINT_ID,
|
||||
frp.FIRE_POINT_ID,
|
||||
frp.FIRE_RECORD_ID,
|
||||
frp.CREATTIME
|
||||
FROM
|
||||
`qa-gwj-prevention`.bus_fire_checklist cl
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_fire_record_point frp ON frp.fire_check_id = cl.fire_check_id
|
||||
AND cl.ISDELETE = 0
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_imgfiles img ON frp.EQUIPMENT_POINT_ID = img.FOREIGN_KEY
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user u on frp.CREATOR = u.USER_ID
|
||||
WHERE
|
||||
frp.ISDELETE = 0
|
||||
AND frp.FIRE_POINT_ID = #{FIRE_POINT_ID}
|
||||
AND frp.P_ISCHECKED = 0
|
||||
GROUP BY
|
||||
cl.FIRE_CHECK_ID
|
||||
ORDER BY
|
||||
frp.CREATTIME DESC
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,521 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.map.MeteorologicalMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_METEOROLOGICAL
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.OUTSOURCED_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.EQUIPMENTNAME,
|
||||
f.EQUIPMENTTYPE,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.CODE,
|
||||
f.PLATFORMMETEOROLOGICAL_ID,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.TYPE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
OUTSOURCED_ID,
|
||||
CORPINFO_ID,
|
||||
EQUIPMENTNAME,
|
||||
EQUIPMENTTYPE,
|
||||
OPDATE,
|
||||
OPUSER,
|
||||
ISDELETE,
|
||||
CODE,
|
||||
PLATFORMMETEOROLOGICAL_ID,
|
||||
METEOROLOGICAL_ID,
|
||||
LATITUDE,
|
||||
LONGITUDE,
|
||||
TYPE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{OUTSOURCED_ID},
|
||||
#{CORPINFO_ID},
|
||||
#{EQUIPMENTNAME},
|
||||
#{EQUIPMENTTYPE},
|
||||
#{OPDATE},
|
||||
#{OPUSER},
|
||||
#{ISDELETE},
|
||||
#{CODE},
|
||||
#{PLATFORMMETEOROLOGICAL_ID},
|
||||
#{METEOROLOGICAL_ID},
|
||||
#{LATITUDE},
|
||||
#{LONGITUDE},
|
||||
#{TYPE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
OUTSOURCED_ID = #{OUTSOURCED_ID},
|
||||
</if>
|
||||
<if test="EQUIPMENTNAME != null and EQUIPMENTNAME != ''"><!-- 关键词检索 -->
|
||||
EQUIPMENTNAME = #{EQUIPMENTNAME},
|
||||
</if>
|
||||
<if test="EQUIPMENTTYPE != null and EQUIPMENTTYPE != ''"><!-- 关键词检索 -->
|
||||
EQUIPMENTTYPE = #{EQUIPMENTTYPE},
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
CODE = #{CODE},
|
||||
</if>
|
||||
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
|
||||
TYPE = #{TYPE},
|
||||
</if>
|
||||
METEOROLOGICAL_ID = METEOROLOGICAL_ID
|
||||
where
|
||||
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
|
||||
</update>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
|
||||
</update>
|
||||
|
||||
<update id="editIsShowBycorpinfoid" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
OUTSOURCED_ID = #{OUTSOURCED_ID}
|
||||
</update>
|
||||
<update id="editIsShow" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID}
|
||||
</update>
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.METEOROLOGICAL_ID = #{METEOROLOGICAL_ID} and
|
||||
f.ISDELETE = '0'
|
||||
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
and f.OUTSOURCED_ID=#{OUTSOURCED_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 通过CODE获取数据 -->
|
||||
<select id="findByCode" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CODE=#{CODE}
|
||||
</select>
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
pv.INDEXCODE,
|
||||
d.NAME as EQUIPMENTTYPE_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_platformmeteorological pv on pv.PLATFORMMETEOROLOGICAL_ID = f.PLATFORMMETEOROLOGICAL_ID
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.EQUIPMENTNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listbyTypeLocation" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.CORPINFO_ID,
|
||||
f.EQUIPMENTNAME as NAME,
|
||||
f.EQUIPMENTTYPE,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.CODE,
|
||||
f.METEOROLOGICAL_ID as id,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.TYPE,
|
||||
d.NAME as EQUIPMENTTYPE_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
|
||||
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and a.AREA = #{AREA}
|
||||
</if>
|
||||
<if test="TYPE != null and TYPE != ''"><!-- 关键词检索 -->
|
||||
and f.EQUIPMENTTYPE=#{TYPE}
|
||||
</if>
|
||||
</select>
|
||||
<select id="listbyType" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.CORPINFO_ID,
|
||||
f.EQUIPMENTNAME as NAME,
|
||||
f.EQUIPMENTTYPE as TYPE,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.CODE,
|
||||
f.METEOROLOGICAL_ID as id,
|
||||
f.LATITUDE,
|
||||
f.LONGITUDE,
|
||||
f.TYPE as isshow,
|
||||
d.NAME as EQUIPMENTTYPE_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.EQUIPMENTTYPE
|
||||
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.ids!= null and pd.ids.size()>0">
|
||||
AND f.CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="pd.ids" open="(" separator="," close=")">
|
||||
#{pd.ids[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pd.AREA != null and pd.AREA != ''">
|
||||
and a.AREA = #{pd.AREA}
|
||||
</if>
|
||||
<if test="pd.TYPE != null and pd.TYPE != ''"><!-- 关键词检索 -->
|
||||
and f.EQUIPMENTTYPE=#{pd.TYPE}
|
||||
</if>
|
||||
</select>
|
||||
<!-- 列表 -->
|
||||
<select id="listbyequipmentcount" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
sum(case f.TYPE when 1 then 1 end ) as onlinecount,
|
||||
sum(case f.TYPE when 2 then 1 end ) as offlinecount
|
||||
FROM
|
||||
BUS_METEOROLOGICAL f
|
||||
left join `qa-gwj-prevention`.bus_corp_info a on a.CORPINFO_ID = f.CORPINFO_ID
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ids!= null and ids.size()>0">
|
||||
AND f.CORPINFO_ID IN
|
||||
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
|
||||
#{ids[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and a.AREA = #{AREA}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listByEquipmentdatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
sub.BIANMA,
|
||||
sub.DICTIONARIES_ID,
|
||||
f.*,
|
||||
state.name as CORP_STATE_NAME,
|
||||
d.NAME as REPORT_CYCLE_NAME,prvince.name as prvinceName,city.name as cityName ,country.name as countryName ,village.name as villageName,sd.NAME as INDUSTRY_NAME,
|
||||
type.name as CORP_OF_TYPE_VAL ,type2.name as CORP_OF_TYPE2_VAL , corpState.name as corpStateName, sub.name as sub_VAL,COUNT(su.USER_ID) count,
|
||||
(select u.STATUS from `qa-gwj-prevention`.sys_user u where u.CORPINFO_ID = f.CORPINFO_ID and u.ISMAIN = '1' ) AS STATUS,
|
||||
(select count(1) from `qa-gwj-regulatory`.BUS_METEOROLOGICAL m where m.CORPINFO_ID = f.CORPINFO_ID and m.ISDELETE = '0') as EQUIPMENT_COUNT
|
||||
|
||||
from `qa-gwj-prevention`.bus_corp_info f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.REPORT_CYCLE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = f.CORP_OF_TYPE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type2 on type2.CORPTYPE_ID = f.CORP_OF_TYPE2
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries prvince ON prvince.BIANMA = f.PROVINCE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = f.CITY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = f.COUNTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = f.VILLAGE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries corpState on corpState.BIANMA = f.CORP_STATE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries sub on sub.BIANMA = f.SUBORDINATION
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries sd ON sd.DICTIONARIES_ID = f.INDUSTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries state on state.BIANMA = f.CORP_STATE
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user su on su.CORPINFO_ID = f.CORPINFO_ID and su.isdelete = '0'
|
||||
where 1=1 and f.ISDELETE ='0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 企业名称搜索-->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYLX != null and pd.KEYQYLX != ''"><!-- 请选企业类型 -->
|
||||
and ( f.INDUSTRY = #{pd.KEYQYLX})
|
||||
</if>
|
||||
<if test="pd.KEYLS != null and pd.KEYLS != ''"><!-- 隶属关系 -->
|
||||
and ( sub.DICTIONARIES_ID = #{pd.KEYLS})<!-- 因为前台传的参数是id,所以将搜索条件改成id的搜索 -->
|
||||
</if>
|
||||
<if test="pd.ISUSE != null and pd.ISUSE != ''"><!-- 企业状态 -->
|
||||
and ( f.ISUSE = #{pd.ISUSE} )
|
||||
</if>
|
||||
<!-- <if test="pd.KEYLS != null and pd.KEYLS != ''"><!– 请选隶属关系 –>-->
|
||||
<!-- and ( f.SUBORDINATION LIKE CONCAT(CONCAT('%', #{pd.KEYLS}),'%') )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.CORP_NAME != null and pd.CORP_NAME != ''"><!-- 请选隶属关系 -->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYZT != null and pd.KEYQYZT != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.KEYQYZT} )
|
||||
</if>
|
||||
<if test="pd.KEYSFQR != null and pd.KEYSFQR != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_CONFIRM = #{pd.KEYSFQR} )
|
||||
</if>
|
||||
<if test="pd.KEYCOUNTRY != null and pd.KEYCOUNTRY != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.PROVINCE = #{pd.KEYCOUNTRY} )
|
||||
</if>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ >= ]]> #{pd.STARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ <= ]]> #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.ADDRESS != null and pd.ADDRESS != ''"><!-- 企事业单位注册地址 -->
|
||||
and ( f.ADDRESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_OFFICE != null and pd.ADDRESS_OFFICE != ''"><!-- 企事业单位办公地址 -->
|
||||
and ( f.ADDRESS_OFFICE LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_OFFICE}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_BUSINESS != null and pd.ADDRESS_BUSINESS != ''"><!-- 企事业单位经营地址 -->
|
||||
and ( f.ADDRESS_BUSINESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_BUSINESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CODE != null and pd.CODE != ''"><!-- 统一社会信用代码 -->
|
||||
and ( f.CODE LIKE CONCAT(CONCAT('%', #{pd.CODE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_STATE != null and pd.CORP_STATE != ''"><!-- 企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.CORP_STATE} )
|
||||
</if>
|
||||
<if test="pd.ECO_TYPE != null and pd.ECO_TYPE != ''"><!-- 企业经济类型 -->
|
||||
and ( f.ECO_TYPE = #{pd.ECO_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CREATE_DATE != null and pd.CREATE_DATE != ''"><!-- 成立日期 -->
|
||||
and ( f.CREATE_DATE = #{pd.CREATE_DATE} )
|
||||
</if>
|
||||
<if test="pd.REGCAPITAL != null and pd.REGCAPITAL != ''"><!-- 注册资金 -->
|
||||
and ( f.REGCAPITAL = #{pd.REGCAPITAL} )
|
||||
</if>
|
||||
<if test="pd.FIXED_ASSETS != null and pd.FIXED_ASSETS != ''"><!-- 固定资产 -->
|
||||
and ( f.FIXED_ASSETS = #{pd.FIXED_ASSETS} )
|
||||
</if>
|
||||
<if test="pd.ANNUALPROFIT != null and pd.ANNUALPROFIT != ''"><!-- 年利润 -->
|
||||
and ( f.ANNUALPROFIT = #{pd.ANNUALPROFIT} )
|
||||
</if>
|
||||
<if test="pd.YEAR_OUTPUT_VALUE != null and pd.YEAR_OUTPUT_VALUE != ''"><!-- 年产值 -->
|
||||
and ( f.YEAR_OUTPUT_VALUE = #{pd.YEAR_OUTPUT_VALUE} )
|
||||
</if>
|
||||
<if test="pd.REG_TYPE != null and pd.REG_TYPE != ''"><!-- 单位注册登记类型 -->
|
||||
and ( f.REG_TYPE = #{pd.REG_TYPE} )
|
||||
</if>
|
||||
<if test="pd.SUBORDINATION != null and pd.SUBORDINATION != ''"><!-- 隶属关系 -->
|
||||
and ( f.SUBORDINATION = #{pd.SUBORDINATION} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE != null and pd.CORP_OF_TYPE != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE = #{pd.CORP_OF_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE2 != null and pd.CORP_OF_TYPE2 != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE2 = #{pd.CORP_OF_TYPE2} )
|
||||
</if>
|
||||
<if test="pd.INDUSTRY_DEPARTMENT != null and pd.INDUSTRY_DEPARTMENT != ''"><!-- 行业监管部门 -->
|
||||
and ( f.INDUSTRY_DEPARTMENT = #{pd.INDUSTRY_DEPARTMENT} )
|
||||
</if>
|
||||
<if test="pd.SCALE != null and pd.SCALE != ''"><!-- 企业规模 -->
|
||||
and ( f.SCALE = #{pd.SCALE} )
|
||||
</if>
|
||||
<if test="pd.SCALE_TYPE != null and pd.SCALE_TYPE != ''"><!-- 是否规模以上 -->
|
||||
and ( f.SCALE_TYPE = #{pd.SCALE_TYPE} )
|
||||
</if>
|
||||
<!-- <if test="pd.LONGITUDE != null and pd.LONGITUDE != ''"><!– 经度 –>-->
|
||||
<!-- and ( f.LONGITUDE = #{pd.LONGITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="pd.LATITUDE != null and pd.LATITUDE != ''"><!– 纬度 –>-->
|
||||
<!-- and ( f.LATITUDE = #{pd.LATITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.LR_NAME != null and pd.LR_NAME != ''"><!-- 法定代表人信息 姓名 -->
|
||||
and ( f.LR_NAME LIKE CONCAT(CONCAT('%', #{pd.LR_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.LR_PHONE != null and pd.LR_PHONE != ''"><!-- 法定代表人信息 手机号码 -->
|
||||
and ( f.LR_PHONE LIKE CONCAT(CONCAT('%', #{pd.LR_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS != null and pd.CONTACTS != ''"><!-- 主要负责人信息 姓名 -->
|
||||
and ( f.CONTACTS LIKE CONCAT(CONCAT('%', #{pd.CONTACTS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS_PHONE != null and pd.CONTACTS_PHONE != ''"><!-- 主要负责人信息 手机号码 -->
|
||||
and ( f.CONTACTS_PHONE LIKE CONCAT(CONCAT('%', #{pd.CONTACTS_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NAME != null and pd.SAFETY_NAME != ''"><!-- 安全负责人信息 姓名 -->
|
||||
and ( f.SAFETY_NAME LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_POST != null and pd.SAFETY_POST != ''"><!-- 安全负责人信息 职务 -->
|
||||
and ( f.SAFETY_POST LIKE CONCAT(CONCAT('%', #{pd.SAFETY_POST}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_BACKGROUND != null and pd.SAFETY_BACKGROUND != ''"><!-- 安全负责人信息 学历 -->
|
||||
and ( f.SAFETY_BACKGROUND LIKE CONCAT(CONCAT('%', #{pd.SAFETY_BACKGROUND}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_MAJOR != null and pd.SAFETY_MAJOR != ''"><!-- 安全负责人信息 专业 -->
|
||||
and ( f.SAFETY_MAJOR LIKE CONCAT(CONCAT('%', #{pd.SAFETY_MAJOR}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NUMBER != null and pd.SAFETY_NUMBER != ''"><!-- 安全负责人信息 单位电话 -->
|
||||
and ( f.SAFETY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NUMBER}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_PHONE != null and pd.SAFETY_PHONE != ''"><!-- 安全负责人信息 手机号码 -->
|
||||
and ( f.SAFETY_PHONE LIKE CONCAT(CONCAT('%', #{pd.SAFETY_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_TECHNICAL != null and pd.SAFETY_TECHNICAL != ''"><!-- 安全负责人信息 技术职称 -->
|
||||
and ( f.SAFETY_TECHNICAL LIKE CONCAT(CONCAT('%', #{pd.SAFETY_TECHNICAL}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_ATTRIBUTE != null and pd.CORP_ATTRIBUTE != ''"><!-- 企业相关属性 -->
|
||||
and ( f.CORP_ATTRIBUTE LIKE CONCAT(CONCAT('%', #{pd.CORP_ATTRIBUTE}),'%') )
|
||||
</if>
|
||||
|
||||
<if test="pd.GAS_CORP != null and pd.GAS_CORP != ''"><!-- 企业相关属性 -->
|
||||
and F.CORPINFO_ID not in (select gas.CORPINFO_ID from `qa-gwj-regulatory`.BUS_GASREPORTCORP gas)
|
||||
</if>
|
||||
<if test="pd.PROVINCE != null and pd.PROVINCE != ''">
|
||||
and f.PROVINCE = #{pd.PROVINCE}
|
||||
</if>
|
||||
<if test="pd.CITY != null and pd.CITY != ''">
|
||||
and f.CITY = #{pd.CITY}
|
||||
</if>
|
||||
<if test="pd.COUNTRY != null and pd.COUNTRY != ''">
|
||||
and f.COUNTRY = #{pd.COUNTRY}
|
||||
</if>
|
||||
<if test="pd.VILLAGE != null and pd.VILLAGE != ''">
|
||||
and f.VILLAGE = #{pd.VILLAGE}
|
||||
</if>
|
||||
GROUP BY f.CORPINFO_ID
|
||||
ORDER BY (f.COR_ORDER+0) asc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listBo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.EQUIPMENTNAME,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.TYPE,
|
||||
f.EQUIPMENTTYPE GBSFENCEURL,
|
||||
pv.INDEXCODE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join BUS_PLATFORMELECTRONIC pv on pv.PLATFORMMETEOROLOGICAL_ID = f.PLATFORMMETEOROLOGICAL_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
|
||||
and METEOROLOGICAL_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
METEOROLOGICAL_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAllForMap" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
|
||||
<!-- 消防点位已定位 -->
|
||||
<select id="getPointsInfo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,514 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.map.MeteorologicalinfoMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_METEOROLOGICALINFO
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.CORPINFO_ID,
|
||||
f.TEMPERATURE,
|
||||
f.HUMIDITY,
|
||||
f.WINDDIRECTION,
|
||||
f.WINDSPEED,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.METEOROLOGICALINFO_ID,
|
||||
f.OPERATOR,
|
||||
f.CODE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
CORPINFO_ID,
|
||||
TEMPERATURE,
|
||||
HUMIDITY,
|
||||
WINDDIRECTION,
|
||||
WINDSPEED,
|
||||
ISDELETE,
|
||||
OPERATTIME,
|
||||
METEOROLOGICAL_ID,
|
||||
METEOROLOGICALINFO_ID,
|
||||
OPERATOR,
|
||||
CODE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{CORPINFO_ID},
|
||||
#{TEMPERATURE},
|
||||
#{HUMIDITY},
|
||||
#{WINDDIRECTION},
|
||||
#{WINDSPEED},
|
||||
#{ISDELETE},
|
||||
#{OPERATTIME},
|
||||
#{METEOROLOGICAL_ID},
|
||||
#{METEOROLOGICALINFO_ID},
|
||||
#{OPERATOR},
|
||||
#{CODE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
<if test="TEMPERATURE != null and TEMPERATURE != ''"><!-- 关键词检索 -->
|
||||
TEMPERATURE = #{TEMPERATURE},
|
||||
</if>
|
||||
<if test="HUMIDITY != null and HUMIDITY != ''"><!-- 关键词检索 -->
|
||||
HUMIDITY = #{HUMIDITY},
|
||||
</if>
|
||||
<if test="WINDDIRECTION != null and WINDDIRECTION != ''"><!-- 关键词检索 -->
|
||||
WINDDIRECTION = #{WINDDIRECTION},
|
||||
</if>
|
||||
<if test="WINDSPEED != null and WINDSPEED != ''"><!-- 关键词检索 -->
|
||||
WINDSPEED = #{WINDSPEED},
|
||||
</if>
|
||||
METEOROLOGICALINFO_ID = METEOROLOGICALINFO_ID
|
||||
where
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID}
|
||||
</update>
|
||||
|
||||
<update id="editIsShowBycorpinfoid" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
OUTSOURCED_ID = #{OUTSOURCED_ID}
|
||||
</update>
|
||||
<update id="editIsShow" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CODE= #{CODE}
|
||||
where
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID}
|
||||
</update>
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID} and
|
||||
f.ISDELETE = '0'
|
||||
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
and f.OUTSOURCED_ID=#{OUTSOURCED_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 通过CODE获取数据 -->
|
||||
<select id="findByCode" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.CODE=#{CODE}
|
||||
</select>
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.EQUIPMENTNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listbymeteorological" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
m.CORPINFO_ID,
|
||||
m.EQUIPMENTNAME,
|
||||
f.TEMPERATURE,
|
||||
f.HUMIDITY,
|
||||
f.WINDDIRECTION,
|
||||
f.WINDSPEED,
|
||||
f.ISDELETE,
|
||||
f.OPERATTIME,
|
||||
f.METEOROLOGICAL_ID,
|
||||
f.METEOROLOGICALINFO_ID,
|
||||
f.OPERATOR,
|
||||
f.CODE
|
||||
FROM
|
||||
BUS_METEOROLOGICALINFO f
|
||||
LEFT JOIN bus_meteorological m ON m.CODE = f.CODE
|
||||
WHERE 1=1
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and m.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
ORDER BY
|
||||
f.OPERATTIME DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="OUTSOURCED_ID != null and OUTSOURCED_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="CODE != null and CODE != ''"><!-- 关键词检索 -->
|
||||
and f.CODE=#{CODE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listbyinfodatalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
sub.BIANMA,
|
||||
sub.DICTIONARIES_ID,
|
||||
f.*,
|
||||
state.name as CORP_STATE_NAME,
|
||||
d.NAME as REPORT_CYCLE_NAME,prvince.name as prvinceName,city.name as cityName ,country.name as countryName ,village.name as villageName,sd.NAME as INDUSTRY_NAME,
|
||||
type.name as CORP_OF_TYPE_VAL ,type2.name as CORP_OF_TYPE2_VAL , corpState.name as corpStateName, sub.name as sub_VAL,COUNT(su.USER_ID) count,
|
||||
(select u.STATUS from `qa-gwj-prevention`.sys_user u where u.CORPINFO_ID = f.CORPINFO_ID and u.ISMAIN = '1' ) AS STATUS,
|
||||
cc.MONITORING_COUNT as MONITORING_COUNT
|
||||
|
||||
from `qa-gwj-prevention`.bus_corp_info f
|
||||
left join `qa-gwj-prevention`.sys_dictionaries d on d.DICTIONARIES_ID = f.REPORT_CYCLE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type on type.CORPTYPE_ID = f.CORP_OF_TYPE
|
||||
left join `qa-gwj-regulatory`.BUS_CORPTYPE type2 on type2.CORPTYPE_ID = f.CORP_OF_TYPE2
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries prvince ON prvince.BIANMA = f.PROVINCE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries city on city.BIANMA = f.CITY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries country on country.BIANMA = f.COUNTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries village on village.BIANMA = f.VILLAGE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries corpState on corpState.BIANMA = f.CORP_STATE
|
||||
left join `qa-gwj-prevention`.sys_dictionaries sub on sub.BIANMA = f.SUBORDINATION
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_dictionaries sd ON sd.DICTIONARIES_ID = f.INDUSTRY
|
||||
left join `qa-gwj-prevention`.sys_dictionaries state on state.BIANMA = f.CORP_STATE
|
||||
LEFT JOIN `qa-gwj-prevention`.sys_user su on su.CORPINFO_ID = f.CORPINFO_ID and su.isdelete = '0'
|
||||
LEFT JOIN (
|
||||
select m.CORPINFO_ID,count(m.CORPINFO_ID) MONITORING_COUNT from `qa-gwj-regulatory`.BUS_METEOROLOGICALINFO m where m.CORPINFO_ID is not null AND m.ISDELETE = '0'
|
||||
GROUP BY m.CORPINFO_ID) cc on cc.CORPINFO_ID = f.CORPINFO_ID
|
||||
where 1=1 and f.ISDELETE ='0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 企业名称搜索-->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYLX != null and pd.KEYQYLX != ''"><!-- 请选企业类型 -->
|
||||
and ( f.INDUSTRY = #{pd.KEYQYLX})
|
||||
</if>
|
||||
<if test="pd.KEYLS != null and pd.KEYLS != ''"><!-- 隶属关系 -->
|
||||
and ( sub.DICTIONARIES_ID = #{pd.KEYLS})<!-- 因为前台传的参数是id,所以将搜索条件改成id的搜索 -->
|
||||
</if>
|
||||
<if test="pd.ISUSE != null and pd.ISUSE != ''"><!-- 企业状态 -->
|
||||
and ( f.ISUSE = #{pd.ISUSE} )
|
||||
</if>
|
||||
<!-- <if test="pd.KEYLS != null and pd.KEYLS != ''"><!– 请选隶属关系 –>-->
|
||||
<!-- and ( f.SUBORDINATION LIKE CONCAT(CONCAT('%', #{pd.KEYLS}),'%') )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.CORP_NAME != null and pd.CORP_NAME != ''"><!-- 请选隶属关系 -->
|
||||
and ( f.CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.CORP_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.KEYQYZT != null and pd.KEYQYZT != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.KEYQYZT} )
|
||||
</if>
|
||||
<if test="pd.KEYSFQR != null and pd.KEYSFQR != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.CORP_CONFIRM = #{pd.KEYSFQR} )
|
||||
</if>
|
||||
<if test="pd.KEYCOUNTRY != null and pd.KEYCOUNTRY != ''"><!-- 请选择企业状态 -->
|
||||
and ( f.PROVINCE = #{pd.KEYCOUNTRY} )
|
||||
</if>
|
||||
<if test="pd.STARTTIME != null and pd.STARTTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ >= ]]> #{pd.STARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME != null and pd.ENDTIME != ''"><!-- 请选择企业状态 -->
|
||||
and f.CREATTIME <![CDATA[ <= ]]> #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.ADDRESS != null and pd.ADDRESS != ''"><!-- 企事业单位注册地址 -->
|
||||
and ( f.ADDRESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_OFFICE != null and pd.ADDRESS_OFFICE != ''"><!-- 企事业单位办公地址 -->
|
||||
and ( f.ADDRESS_OFFICE LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_OFFICE}),'%') )
|
||||
</if>
|
||||
<if test="pd.ADDRESS_BUSINESS != null and pd.ADDRESS_BUSINESS != ''"><!-- 企事业单位经营地址 -->
|
||||
and ( f.ADDRESS_BUSINESS LIKE CONCAT(CONCAT('%', #{pd.ADDRESS_BUSINESS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CODE != null and pd.CODE != ''"><!-- 统一社会信用代码 -->
|
||||
and ( f.CODE LIKE CONCAT(CONCAT('%', #{pd.CODE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_STATE != null and pd.CORP_STATE != ''"><!-- 企业状态 -->
|
||||
and ( f.CORP_STATE = #{pd.CORP_STATE} )
|
||||
</if>
|
||||
<if test="pd.ECO_TYPE != null and pd.ECO_TYPE != ''"><!-- 企业经济类型 -->
|
||||
and ( f.ECO_TYPE = #{pd.ECO_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CREATE_DATE != null and pd.CREATE_DATE != ''"><!-- 成立日期 -->
|
||||
and ( f.CREATE_DATE = #{pd.CREATE_DATE} )
|
||||
</if>
|
||||
<if test="pd.REGCAPITAL != null and pd.REGCAPITAL != ''"><!-- 注册资金 -->
|
||||
and ( f.REGCAPITAL = #{pd.REGCAPITAL} )
|
||||
</if>
|
||||
<if test="pd.FIXED_ASSETS != null and pd.FIXED_ASSETS != ''"><!-- 固定资产 -->
|
||||
and ( f.FIXED_ASSETS = #{pd.FIXED_ASSETS} )
|
||||
</if>
|
||||
<if test="pd.ANNUALPROFIT != null and pd.ANNUALPROFIT != ''"><!-- 年利润 -->
|
||||
and ( f.ANNUALPROFIT = #{pd.ANNUALPROFIT} )
|
||||
</if>
|
||||
<if test="pd.YEAR_OUTPUT_VALUE != null and pd.YEAR_OUTPUT_VALUE != ''"><!-- 年产值 -->
|
||||
and ( f.YEAR_OUTPUT_VALUE = #{pd.YEAR_OUTPUT_VALUE} )
|
||||
</if>
|
||||
<if test="pd.REG_TYPE != null and pd.REG_TYPE != ''"><!-- 单位注册登记类型 -->
|
||||
and ( f.REG_TYPE = #{pd.REG_TYPE} )
|
||||
</if>
|
||||
<if test="pd.SUBORDINATION != null and pd.SUBORDINATION != ''"><!-- 隶属关系 -->
|
||||
and ( f.SUBORDINATION = #{pd.SUBORDINATION} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE != null and pd.CORP_OF_TYPE != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE = #{pd.CORP_OF_TYPE} )
|
||||
</if>
|
||||
<if test="pd.CORP_OF_TYPE2 != null and pd.CORP_OF_TYPE2 != ''"><!-- 企业类型 -->
|
||||
and ( f.CORP_OF_TYPE2 = #{pd.CORP_OF_TYPE2} )
|
||||
</if>
|
||||
<if test="pd.INDUSTRY_DEPARTMENT != null and pd.INDUSTRY_DEPARTMENT != ''"><!-- 行业监管部门 -->
|
||||
and ( f.INDUSTRY_DEPARTMENT = #{pd.INDUSTRY_DEPARTMENT} )
|
||||
</if>
|
||||
<if test="pd.SCALE != null and pd.SCALE != ''"><!-- 企业规模 -->
|
||||
and ( f.SCALE = #{pd.SCALE} )
|
||||
</if>
|
||||
<if test="pd.SCALE_TYPE != null and pd.SCALE_TYPE != ''"><!-- 是否规模以上 -->
|
||||
and ( f.SCALE_TYPE = #{pd.SCALE_TYPE} )
|
||||
</if>
|
||||
<!-- <if test="pd.LONGITUDE != null and pd.LONGITUDE != ''"><!– 经度 –>-->
|
||||
<!-- and ( f.LONGITUDE = #{pd.LONGITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="pd.LATITUDE != null and pd.LATITUDE != ''"><!– 纬度 –>-->
|
||||
<!-- and ( f.LATITUDE = #{pd.LATITUDE} )-->
|
||||
<!-- </if>-->
|
||||
<if test="pd.LR_NAME != null and pd.LR_NAME != ''"><!-- 法定代表人信息 姓名 -->
|
||||
and ( f.LR_NAME LIKE CONCAT(CONCAT('%', #{pd.LR_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.LR_PHONE != null and pd.LR_PHONE != ''"><!-- 法定代表人信息 手机号码 -->
|
||||
and ( f.LR_PHONE LIKE CONCAT(CONCAT('%', #{pd.LR_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS != null and pd.CONTACTS != ''"><!-- 主要负责人信息 姓名 -->
|
||||
and ( f.CONTACTS LIKE CONCAT(CONCAT('%', #{pd.CONTACTS}),'%') )
|
||||
</if>
|
||||
<if test="pd.CONTACTS_PHONE != null and pd.CONTACTS_PHONE != ''"><!-- 主要负责人信息 手机号码 -->
|
||||
and ( f.CONTACTS_PHONE LIKE CONCAT(CONCAT('%', #{pd.CONTACTS_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NAME != null and pd.SAFETY_NAME != ''"><!-- 安全负责人信息 姓名 -->
|
||||
and ( f.SAFETY_NAME LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NAME}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_POST != null and pd.SAFETY_POST != ''"><!-- 安全负责人信息 职务 -->
|
||||
and ( f.SAFETY_POST LIKE CONCAT(CONCAT('%', #{pd.SAFETY_POST}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_BACKGROUND != null and pd.SAFETY_BACKGROUND != ''"><!-- 安全负责人信息 学历 -->
|
||||
and ( f.SAFETY_BACKGROUND LIKE CONCAT(CONCAT('%', #{pd.SAFETY_BACKGROUND}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_MAJOR != null and pd.SAFETY_MAJOR != ''"><!-- 安全负责人信息 专业 -->
|
||||
and ( f.SAFETY_MAJOR LIKE CONCAT(CONCAT('%', #{pd.SAFETY_MAJOR}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_NUMBER != null and pd.SAFETY_NUMBER != ''"><!-- 安全负责人信息 单位电话 -->
|
||||
and ( f.SAFETY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.SAFETY_NUMBER}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_PHONE != null and pd.SAFETY_PHONE != ''"><!-- 安全负责人信息 手机号码 -->
|
||||
and ( f.SAFETY_PHONE LIKE CONCAT(CONCAT('%', #{pd.SAFETY_PHONE}),'%') )
|
||||
</if>
|
||||
<if test="pd.SAFETY_TECHNICAL != null and pd.SAFETY_TECHNICAL != ''"><!-- 安全负责人信息 技术职称 -->
|
||||
and ( f.SAFETY_TECHNICAL LIKE CONCAT(CONCAT('%', #{pd.SAFETY_TECHNICAL}),'%') )
|
||||
</if>
|
||||
<if test="pd.CORP_ATTRIBUTE != null and pd.CORP_ATTRIBUTE != ''"><!-- 企业相关属性 -->
|
||||
and ( f.CORP_ATTRIBUTE LIKE CONCAT(CONCAT('%', #{pd.CORP_ATTRIBUTE}),'%') )
|
||||
</if>
|
||||
|
||||
<if test="pd.GAS_CORP != null and pd.GAS_CORP != ''"><!-- 企业相关属性 -->
|
||||
and F.CORPINFO_ID not in (select gas.CORPINFO_ID from `qa-gwj-regulatory`.BUS_GASREPORTCORP gas)
|
||||
</if>
|
||||
<if test="pd.PROVINCE != null and pd.PROVINCE != ''">
|
||||
and f.PROVINCE = #{pd.PROVINCE}
|
||||
</if>
|
||||
<if test="pd.CITY != null and pd.CITY != ''">
|
||||
and f.CITY = #{pd.CITY}
|
||||
</if>
|
||||
<if test="pd.COUNTRY != null and pd.COUNTRY != ''">
|
||||
and f.COUNTRY = #{pd.COUNTRY}
|
||||
</if>
|
||||
<if test="pd.VILLAGE != null and pd.VILLAGE != ''">
|
||||
and f.VILLAGE = #{pd.VILLAGE}
|
||||
</if>
|
||||
GROUP BY f.CORPINFO_ID
|
||||
ORDER BY (f.COR_ORDER+0) asc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listBo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.EQUIPMENTNAME,
|
||||
f.OPDATE,
|
||||
f.OPUSER,
|
||||
f.ISDELETE,
|
||||
f.METEOROLOGICALINFO_ID
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="ArrayDATA_IDS != null and ArrayDATA_IDS != ''"><!-- 关键词检索 -->
|
||||
and METEOROLOGICALINFO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
METEOROLOGICALINFO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAllForMap" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
|
||||
<!-- 消防点位已定位 -->
|
||||
<select id="getPointsInfo" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0' and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
</select>
|
||||
|
||||
<select id="getMeteorologicalinfoListByIds" resultType="pd" parameterType="pd">
|
||||
select
|
||||
<include refid="Field2"></include>
|
||||
from <include refid="tableName"></include>
|
||||
where 1=1
|
||||
<if test="METEOROLOGICALINFO_IDS != null">
|
||||
and METEOROLOGICALINFO_ID in
|
||||
<foreach collection="METEOROLOGICALINFO_IDS" index="index" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertAll" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
insert into <include refid="tableName"></include> (
|
||||
METEOROLOGICALINFO_ID,
|
||||
METEOROLOGICAL_ID,
|
||||
CORPINFO_ID,
|
||||
TEMPERATURE,
|
||||
HUMIDITY,
|
||||
WINDDIRECTION,
|
||||
WINDSPEED,
|
||||
OPERATTIME,
|
||||
OPERATOR,
|
||||
ISDELETE
|
||||
) values
|
||||
<foreach collection="list" item="data" separator=",">
|
||||
(
|
||||
#{data.METEOROLOGICALINFO_ID},
|
||||
#{data.METEOROLOGICAL_ID},
|
||||
#{data.CORPINFO_ID},
|
||||
#{data.TEMPERATURE},
|
||||
#{data.HUMIDITY},
|
||||
#{data.WINDDIRECTION},
|
||||
#{data.WINDSPEED},
|
||||
#{data.OPERATTIME},
|
||||
#{data.OPERATOR},
|
||||
#{data.ISDELETE}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateMeteorologicalinfo" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID},
|
||||
METEOROLOGICAL_ID = #{METEOROLOGICAL_ID},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
TEMPERATURE = #{TEMPERATURE},
|
||||
HUMIDITY = #{HUMIDITY},
|
||||
WINDDIRECTION = #{WINDDIRECTION},
|
||||
WINDSPEED = #{WINDSPEED},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
ISDELETE = #{ISDELETE}
|
||||
where
|
||||
METEOROLOGICALINFO_ID = #{METEOROLOGICALINFO_ID}
|
||||
</update>
|
||||
|
||||
<select id="tensList" resultType="pd" parameterType="pd">
|
||||
select f.*
|
||||
from <include refid="tableName"></include> f
|
||||
where f.CODE = #{CODE}
|
||||
and ABS(TIMESTAMPDIFF(SECOND, f.OPERATTIME, #{OPERATTIME})) < 10;
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,243 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.map.PlatformelectronicMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_PLATFORMELECTRONIC
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.INDEXCODE,
|
||||
f.REGIONINDEXCODE,
|
||||
f.EXTERNALINDEXCODE,
|
||||
f.NAME,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.CAMERATYPE,
|
||||
f.CASCADECODE,
|
||||
f.DECODETAG,
|
||||
f.RESOURCETYPE,
|
||||
f.CREATETIME,
|
||||
f.UPDATETIME,
|
||||
f.SORT,
|
||||
f.DISORDER,
|
||||
f.RECORDLOCATION,
|
||||
f.CASCADETYPE,
|
||||
f.REGIONNAME,
|
||||
f.REGIONPATH,
|
||||
f.REGIONPATHNAME,
|
||||
f.PLATFORMELECTRONIC_ID,
|
||||
f.FANGQU_IDS,
|
||||
f.SUOSHUQUYU,
|
||||
f.CORPINFO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
INDEXCODE,
|
||||
REGIONINDEXCODE,
|
||||
EXTERNALINDEXCODE,
|
||||
NAME,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CAMERATYPE,
|
||||
CASCADECODE,
|
||||
DECODETAG,
|
||||
RESOURCETYPE,
|
||||
CREATETIME,
|
||||
UPDATETIME,
|
||||
SORT,
|
||||
DISORDER,
|
||||
RECORDLOCATION,
|
||||
CASCADETYPE,
|
||||
REGIONNAME,
|
||||
REGIONPATH,
|
||||
REGIONPATHNAME,
|
||||
PLATFORMELECTRONIC_ID,
|
||||
FANGQU_IDS,
|
||||
SUOSHUQUYU,
|
||||
CORPINFO_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{INDEXCODE},
|
||||
#{REGIONINDEXCODE},
|
||||
#{EXTERNALINDEXCODE},
|
||||
#{NAME},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CAMERATYPE},
|
||||
#{CASCADECODE},
|
||||
#{DECODETAG},
|
||||
#{RESOURCETYPE},
|
||||
#{CREATETIME},
|
||||
#{UPDATETIME},
|
||||
#{SORT},
|
||||
#{DISORDER},
|
||||
#{RECORDLOCATION},
|
||||
#{CASCADETYPE},
|
||||
#{REGIONNAME},
|
||||
#{REGIONPATH},
|
||||
#{REGIONPATHNAME},
|
||||
#{PLATFORMELECTRONIC_ID},
|
||||
#{FANGQU_IDS},
|
||||
#{SUOSHUQUYU},
|
||||
#{CORPINFO_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PLATFORMELECTRONIC_ID = #{PLATFORMELECTRONIC_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
INDEXCODE = #{INDEXCODE},
|
||||
REGIONINDEXCODE = #{REGIONINDEXCODE},
|
||||
EXTERNALINDEXCODE = #{EXTERNALINDEXCODE},
|
||||
NAME = #{NAME},
|
||||
LONGITUDE = #{LONGITUDE},
|
||||
LATITUDE = #{LATITUDE},
|
||||
CAMERATYPE = #{CAMERATYPE},
|
||||
CASCADECODE = #{CASCADECODE},
|
||||
DECODETAG = #{DECODETAG},
|
||||
RESOURCETYPE = #{RESOURCETYPE},
|
||||
CREATETIME = #{CREATETIME},
|
||||
UPDATETIME = #{UPDATETIME},
|
||||
SORT = #{SORT},
|
||||
DISORDER = #{DISORDER},
|
||||
RECORDLOCATION = #{RECORDLOCATION},
|
||||
CASCADETYPE = #{CASCADETYPE},
|
||||
REGIONNAME = #{REGIONNAME},
|
||||
REGIONPATH = #{REGIONPATH},
|
||||
REGIONPATHNAME = #{REGIONPATHNAME},
|
||||
FANGQU_IDS = #{FANGQU_IDS},
|
||||
SUOSHUQUYU = #{SUOSHUQUYU},
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
where
|
||||
PLATFORMELECTRONIC_ID = #{PLATFORMELECTRONIC_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.PLATFORMELECTRONIC_ID = #{PLATFORMELECTRONIC_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include> ,corp.CORP_NAME as corpName,
|
||||
(select GROUP_CONCAT(t.NAME) from `qa-gwj-prevention`.sys_dictionaries t where FIND_IN_SET(f.FANGQU_IDS, t.BIANMA)) as fangquNames
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join `qa-gwj-prevention`.bus_corp_info corp on corp.CORPINFO_ID = f.CORPINFO_ID
|
||||
where 1=1
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
f.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,f.PLATFORMELECTRONIC_ID as id
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info o on f.CORPINFO_ID = o.CORPINFO_ID
|
||||
where
|
||||
f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
and o.ISDELETE = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.AREA = #{AREA}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
<if test="forMap != null and forMap != ''">
|
||||
-- and f.REGIONINDEXCODE in ('3152c0150e93491fb37f5c015fbb943e','1b0f290142534d62957bf0b6f852c589')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
PLATFORMELECTRONIC_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countAllForMap" resultType="int">
|
||||
select
|
||||
count(1)
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info o on f.CORPINFO_ID = o.CORPINFO_ID
|
||||
where 1=1
|
||||
and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
and o.ISDELETE = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.AREA = #{AREA}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countAllByArea" resultType="pd">
|
||||
select
|
||||
f.SUOSHUQUYU,count(1) co
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_corp_info o on f.CORPINFO_ID = o.CORPINFO_ID
|
||||
where 1=1
|
||||
and f.LATITUDE is not null and f.LONGITUDE is not null
|
||||
and o.ISDELETE = 0
|
||||
<if test="AREA != null and AREA != ''">
|
||||
and o.AREA = #{AREA}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
group by f.SUOSHUQUYU
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue