forked from integrated_whb/integrated_whb
bi页人员定位,ai视频分析完成
parent
771d0f04e7
commit
0b707e9261
|
@ -5,6 +5,8 @@ import com.zcloud.controller.base.BaseController;
|
|||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.service.video.VideoManagerService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.PLSUtil;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
|
@ -13,6 +15,10 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:TODO
|
||||
* 作者:wangxuan
|
||||
|
@ -23,7 +29,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
public class MapController extends BaseController {
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
@Autowired
|
||||
private VideoManagerService videomanagerService;
|
||||
|
||||
// ----------人员定位相关-------------//
|
||||
|
||||
/**
|
||||
* @Description: 人员类型统计 告警类型统计
|
||||
|
@ -67,4 +76,121 @@ public class MapController extends BaseController {
|
|||
JSONObject personnelPositioningCount = PLSUtil.getPersonnelPositioningCount(Jurisdiction.getCORPINFO_ID(), page.getCurrentPage(), page.getShowCount());
|
||||
return ReturnMap.ok().put("data", personnelPositioningCount);
|
||||
}
|
||||
// ----------摄像头相关-------------//
|
||||
|
||||
// 摄像头告警数 disposed
|
||||
@RequestMapping(value = "/getCameraTopToShow")
|
||||
@ResponseBody
|
||||
public ReturnMap getCameraTopToShow() {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData cameraCount = videomanagerService.getCameraTopToShow(pageData);
|
||||
return ReturnMap.ok().put("pd", cameraCount);
|
||||
}
|
||||
/**
|
||||
* @Description: 摄像头告警数
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/29/029 15:35
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getCameraAlarmCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getCameraAlarmCount() {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> cameraCount = videomanagerService.getCameraAlarmCount(pageData);
|
||||
return ReturnMap.ok().put("CameraAlarmCount", cameraCount);
|
||||
}
|
||||
/**
|
||||
* @Description: 摄像头报警类型
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/29/029 10:52
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getCameraAlarmTypeCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getCameraAlarmTypeCount() {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<PageData> cameraCount = videomanagerService.getCameraAlarmTypeCount(pageData);
|
||||
return ReturnMap.ok().put("varList", cameraCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 摄像头告警时间趋势
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/29/029 10:51
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getCameraAlarmTimeCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getCameraAlarmTimeCount() throws Exception {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
List<Map<String, String>> generateTimeArraySevenMonth = DateUtil.generateTimeArraySevenMonth(6);
|
||||
pageData.put("generateTimeArray", generateTimeArraySevenMonth);
|
||||
return ReturnMap.ok().put("varList", videomanagerService.getCameraAlarmTimeCount(pageData));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 摄像头告警来源
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/29/029 10:51
|
||||
* @Param: [] []
|
||||
* @Return: com.zcloud.util.ReturnMap
|
||||
*/
|
||||
@RequestMapping(value = "/getCameraAlarmSourceCount")
|
||||
@ResponseBody
|
||||
public ReturnMap getCameraAlarmSourceCount() throws Exception {
|
||||
PageData pageData = getPageData();
|
||||
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
int cameraCount = usersService.getUserCount(pageData);
|
||||
return ReturnMap.ok().put("cameraCount", cameraCount);
|
||||
}
|
||||
// -----------------------//
|
||||
|
||||
public static List<Map<String, String>> generateTimeArray() {
|
||||
List<Map<String, String>> timeArray = new ArrayList<>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (int i = 6; i >= 0; i--) {
|
||||
Map<String, String> monthInfo = new HashMap<>();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
int month = calendar.get(Calendar.MONTH) + 1;
|
||||
|
||||
String monthString = String.format(year+"-%02d", month);
|
||||
String firstDayOfMonth = String.format("%04d-%02d-01 00:00:00", year, month);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
String lastDayOfMonth = dateFormat.format(calendar.getTime());
|
||||
|
||||
monthInfo.put("month", monthString);
|
||||
monthInfo.put("dateBegin", firstDayOfMonth);
|
||||
monthInfo.put("dateEnd", lastDayOfMonth);
|
||||
|
||||
timeArray.add(monthInfo);
|
||||
|
||||
calendar.add(Calendar.MONTH, -1); // Go to the previous month
|
||||
}
|
||||
|
||||
// Reverse the timeArray to have the order from past to present
|
||||
Collections.reverse(timeArray);
|
||||
|
||||
return timeArray;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
List<Map<String, String>> timeArray = generateTimeArray();
|
||||
for (Map<String, String> monthInfo : timeArray) {
|
||||
System.out.println(monthInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.zcloud.controller.mapApi;
|
|||
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.util.Jurisdiction;
|
||||
import com.zcloud.util.ReturnMap;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -28,239 +30,86 @@ import java.util.Map;
|
|||
@RequestMapping("/map/Eight")
|
||||
public class MapEightController extends BaseController {
|
||||
|
||||
// @Autowired
|
||||
// private MapEightService mapEightService;
|
||||
//
|
||||
// @Autowired
|
||||
// private RestTemplate restTemplate;
|
||||
//
|
||||
// /**
|
||||
// * @return
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @RequestMapping(value = "/getEcharts")
|
||||
// @ResponseBody
|
||||
// public Object getEcharts() throws Exception {
|
||||
// PageData pd = new PageData();
|
||||
// pd = this.getPageData();
|
||||
// return mapEightService.getEchartsOrder(pd);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 可视化首页统计数据
|
||||
// *
|
||||
// * @param
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @RequestMapping(value = "/findFormCount")
|
||||
// @ResponseBody
|
||||
// public Object findFormCount() throws Exception {
|
||||
// Map<String, Object> map = new HashMap<String, Object>();
|
||||
// String errInfo = "success";
|
||||
// PageData pd = this.getPageData();
|
||||
//
|
||||
// PageData data = mapEightService.statisticsHighRiskWorkByStateOrder(pd);
|
||||
// map.put("pd", data);
|
||||
// map.put("result", errInfo);
|
||||
// return map;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 作业实时情况展示(最新18条)
|
||||
// *
|
||||
// * @param
|
||||
// * @throws Exception
|
||||
// */
|
||||
// @RequestMapping(value = "/listHighRiskWork")
|
||||
// @ResponseBody
|
||||
// public Object listHighRiskWork(Page page) throws Exception {
|
||||
// Map<String, Object> map = new HashMap<String, Object>();
|
||||
// String errInfo = "success";
|
||||
// PageData pd = 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);
|
||||
// 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<>();
|
||||
// //根据条件增加参数或减少参数 都没有 直接返回空
|
||||
// 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 = this.getPageData();
|
||||
//
|
||||
// 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);
|
||||
// }
|
||||
@Autowired
|
||||
private MapEightService mapEightService;
|
||||
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/getEcharts")
|
||||
@ResponseBody
|
||||
public Object getEcharts() throws Exception {
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mapEightService.getEchartsOrder(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 可视化首页统计数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/findFormCount")
|
||||
@ResponseBody
|
||||
public Object findFormCount() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
PageData data = mapEightService.statisticsHighRiskWorkByStateOrder(pd);
|
||||
map.put("pd", data);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 作业实时情况展示(最新18条)
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listHighRiskWork")
|
||||
@ResponseBody
|
||||
public Object listHighRiskWork(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> varList = new ArrayList<>();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
page.setPd(pd);
|
||||
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<>();
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
varList = mapEightService.listAllHighRiskWorkLocationOrder(pd);
|
||||
map.put("varList", varList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*曹妃甸专用接口-结束*/
|
||||
|
||||
}
|
||||
|
|
|
@ -92,18 +92,9 @@ public class VideoManagerController extends BaseController {
|
|||
public Object editZhiding() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
if(Tools.isEmpty(Jurisdiction.getCORPINFO_ID())) {
|
||||
pd.put("CORPINFO_TYPE", "2");
|
||||
}else {
|
||||
pd.put("CORPINFO_TYPE", "1");
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
}
|
||||
pd.put("ISSHOW", "0");//重置置顶信息。把所有的数据全部取消置顶
|
||||
videomanagerService.editZhiding(pd);
|
||||
pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pd = this.getPageData();
|
||||
pd.put("ISSHOW", "1");
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
videomanagerService.editZhiding(pd);//置顶信息
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -0,0 +1,441 @@
|
|||
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);
|
||||
|
||||
/**有限空间作业查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByIdCONFINEDSPACEOrder(PageData pd);
|
||||
|
||||
/**有限空间作业措施查询
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllMeasuresCONFINEDSPACEOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 有限空间
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listAllCONFINEDSPACEOrder(PageData pd);
|
||||
|
||||
/**
|
||||
* 有限空间
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> findByIdCONFINEDSPACEAcceptuser(PageData pd);
|
||||
|
||||
/**
|
||||
* 有限空间
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> findByIdCONFINEDSPACEAcceptusers(PageData pd);
|
||||
|
||||
/**
|
||||
* 有限空间气体检测
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData findByIdCONFINEDSPACEGasWH(PageData pd);
|
||||
}
|
||||
|
|
@ -66,5 +66,13 @@ public interface VideoManagerMapper {
|
|||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
PageData findByCode(PageData videoPd);
|
||||
|
||||
List<PageData> getCameraAlarmCount(PageData pageData);
|
||||
|
||||
List<PageData> getCameraAlarmTypeCount(PageData pageData);
|
||||
|
||||
List<PageData> getCameraAlarmTimeCount(PageData pageData);
|
||||
|
||||
PageData getCameraTopToShow(PageData pageData);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,576 @@
|
|||
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.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);
|
||||
}
|
||||
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 {
|
||||
//根据条件增加参数或减少参数 都没有 直接返回空
|
||||
|
||||
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.findByIdCONFINEDSPACEOrder(pd); //根据ID读取
|
||||
map.put("measuresList", mapEightMapper.listAllMeasuresCONFINEDSPACEOrder(pd));
|
||||
map.put("gasList", mapEightMapper.listAllCONFINEDSPACEOrder(pd));
|
||||
map.put("gas", mapEightMapper.findByIdCONFINEDSPACEGasWH(pd));
|
||||
map.put("imgList", mapEightMapper.findByIdCONFINEDSPACEAcceptusers(pd));
|
||||
map.put("imgList1", mapEightMapper.findByIdCONFINEDSPACEAcceptuser(pd));
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:视频管理
|
||||
|
@ -66,5 +67,13 @@ public interface VideoManagerService {
|
|||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
PageData findByCode(PageData videoPd);
|
||||
|
||||
List<PageData> getCameraAlarmCount(PageData pageData);
|
||||
|
||||
List<PageData> getCameraAlarmTypeCount(PageData pageData);
|
||||
|
||||
PageData getCameraAlarmTimeCount(PageData pageData);
|
||||
|
||||
PageData getCameraTopToShow(PageData pageData);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ 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;
|
||||
|
||||
/**
|
||||
|
@ -99,5 +100,43 @@ public class VideoManagerServiceImpl implements VideoManagerService {
|
|||
return videomanagerMapper.findByCode(videoPd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCameraAlarmCount(PageData pageData) {
|
||||
return videomanagerMapper.getCameraAlarmCount(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getCameraAlarmTypeCount(PageData pageData) {
|
||||
return videomanagerMapper.getCameraAlarmTypeCount(pageData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getCameraAlarmTimeCount(PageData pageData) {
|
||||
List<PageData> cameraAlarmTimeCount = videomanagerMapper.getCameraAlarmTimeCount(pageData);
|
||||
int leijicont = 0;
|
||||
// 月份集合
|
||||
List<String> monthStrList = new ArrayList<>();
|
||||
// 当月数据
|
||||
List<Integer> monthList = new ArrayList<>();
|
||||
// 累计数据
|
||||
List<Integer> accumulatedList = new ArrayList<>();
|
||||
for (PageData item : cameraAlarmTimeCount) {
|
||||
monthStrList.add(item.getString("MONTH"));
|
||||
monthList.add(Integer.parseInt(item.getString("MONTH_COUNT")));
|
||||
leijicont += Integer.parseInt(item.getString("MONTH_COUNT"));
|
||||
accumulatedList.add(leijicont);
|
||||
}
|
||||
PageData valuePd = new PageData();
|
||||
valuePd.put("monthStrList",monthStrList);
|
||||
valuePd.put("monthList",monthList);
|
||||
valuePd.put("accumulatedList",accumulatedList);
|
||||
return valuePd;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData getCameraTopToShow(PageData pageData) {
|
||||
return videomanagerMapper.getCameraTopToShow(pageData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,7 @@ package com.zcloud.util;
|
|||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:日期处理
|
||||
|
@ -26,6 +23,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getSdfTimes() {
|
||||
|
@ -34,20 +32,24 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取YYYY格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getYear() {
|
||||
return sdfYear.format(new Date());
|
||||
}
|
||||
|
||||
public static String getYear(Date date) {
|
||||
return sdfYear.format(date);
|
||||
}
|
||||
|
||||
public static String getMonth() {
|
||||
return sdfMonth.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取DD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getOnlyDay() {
|
||||
|
@ -56,17 +58,20 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取YYYY-MM-DD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDay() {
|
||||
return sdfDay.format(new Date());
|
||||
}
|
||||
|
||||
public static String MDay() {
|
||||
return sdfMDay.format(new Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取YYYYMMDD格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDays() {
|
||||
|
@ -75,6 +80,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取YYYY-MM-DD HH:mm:ss格式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getTime() {
|
||||
|
@ -82,12 +88,12 @@ public class DateUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* @Title: compareDate
|
||||
* @Description: TODO(日期比较,如果s>=e 返回true 否则返回false)
|
||||
* @param s
|
||||
* @param e
|
||||
* @return boolean
|
||||
* @throws
|
||||
* @Title: compareDate
|
||||
* @Description: TODO(日期比较 , 如果s > = e 返回true 否则返回false)
|
||||
* @author fh
|
||||
*/
|
||||
public static boolean compareDate(String s, String e) {
|
||||
|
@ -99,6 +105,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDate(String date) {
|
||||
|
@ -113,6 +120,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDateTime(String date) {
|
||||
|
@ -127,6 +135,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 校验日期是否合法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static boolean isValidDate(String s) {
|
||||
|
@ -156,10 +165,10 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* <li>功能描述:时间相减得到天数
|
||||
*
|
||||
* @param beginDateStr
|
||||
* @param endDateStr
|
||||
* @return
|
||||
* long
|
||||
* @return long
|
||||
* @author Administrator
|
||||
*/
|
||||
public static long getDaySub(String beginDateStr, String endDateStr) {
|
||||
|
@ -180,6 +189,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 得到n天之后的日期
|
||||
*
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
|
@ -195,6 +205,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 当前时间加n小时之后的时间
|
||||
*
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
|
@ -210,6 +221,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 得到n天之后是周几
|
||||
*
|
||||
* @param days
|
||||
* @return
|
||||
*/
|
||||
|
@ -225,18 +237,21 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,日期转字符串
|
||||
*
|
||||
* @param date
|
||||
* @return yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
public static String date2Str(Date date) {
|
||||
return date2Str(date, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
public static String date3Str(Date date) {
|
||||
return date2Str(date, "yyyy-M-d");
|
||||
}
|
||||
|
||||
/**
|
||||
* 按照yyyy-MM-dd HH:mm:ss的格式,字符串转日期
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
|
@ -256,6 +271,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 把时间根据时、分、秒转换为时间段
|
||||
*
|
||||
* @param StrDate
|
||||
*/
|
||||
public static String getTimes(String StrDate) {
|
||||
|
@ -289,6 +305,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 按照参数format的格式,日期转字符串
|
||||
*
|
||||
* @param date
|
||||
* @param format
|
||||
* @return
|
||||
|
@ -304,9 +321,10 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取当年的第一天
|
||||
*
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
* @author zhangyue
|
||||
*/
|
||||
public static String getCurrYearFirst() {
|
||||
Calendar currCal = Calendar.getInstance();
|
||||
|
@ -320,9 +338,10 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取当年的最后一天
|
||||
*
|
||||
* @param year
|
||||
* @author zhangyue
|
||||
* @return
|
||||
* @author zhangyue
|
||||
*/
|
||||
public static String getCurrYearLast() {
|
||||
Calendar currCal = Calendar.getInstance();
|
||||
|
@ -336,11 +355,11 @@ public class DateUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前季度第一天
|
||||
* @author zhangyue
|
||||
*
|
||||
* @return
|
||||
* @author zhangyue
|
||||
*/
|
||||
public static String quarterStart() {
|
||||
Date dBegin = new Date();
|
||||
|
@ -358,8 +377,9 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取当前季度最后一天
|
||||
* @author zhangyue
|
||||
*
|
||||
* @return
|
||||
* @author zhangyue
|
||||
*/
|
||||
public static String quarterEnd() {
|
||||
Date dEnd = new Date();
|
||||
|
@ -375,6 +395,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取本月第一天日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthFirstDay() {
|
||||
|
@ -386,6 +407,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取本月最后一天日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getMonthEndDay() {
|
||||
|
@ -394,6 +416,7 @@ public class DateUtil {
|
|||
String thisMonthEndTime = sdfDay.format(thisMonthEndDateCal.getTime());
|
||||
return thisMonthEndTime;
|
||||
}
|
||||
|
||||
public static boolean timeCalendar(Date nowTime, Date amBeginTime, Date amEndTime) {
|
||||
//设置当前时间
|
||||
Calendar date = Calendar.getInstance();
|
||||
|
@ -414,8 +437,9 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取本周的第一天
|
||||
*
|
||||
* @return String
|
||||
* **/
|
||||
**/
|
||||
public static String getWeekStart() {
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
|
@ -441,10 +465,12 @@ public class DateUtil {
|
|||
|
||||
return new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + " 00:00:00";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本周的最后一天
|
||||
*
|
||||
* @return String
|
||||
* **/
|
||||
**/
|
||||
public static String getWeekEnd() {
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // 设置时间格式
|
||||
|
@ -470,11 +496,11 @@ public class DateUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 判断时间格式 格式必须为“YYYY-MM-dd”
|
||||
* 2004-2-30 是无效的
|
||||
* 2003-2-29 是无效的
|
||||
*
|
||||
* @param sDate
|
||||
* @return
|
||||
*/
|
||||
|
@ -495,6 +521,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 时间比较
|
||||
*
|
||||
* @param amBeginTime
|
||||
* @param amEndTime
|
||||
* @return
|
||||
|
@ -516,6 +543,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 获取6个月内月份日期
|
||||
*
|
||||
* @param flag 结果是否显示年份
|
||||
* @return
|
||||
*/
|
||||
|
@ -564,9 +592,11 @@ public class DateUtil {
|
|||
calendar.add(Calendar.DATE, amount);
|
||||
return sdf.format(calendar.getTime());
|
||||
}
|
||||
|
||||
public static SimpleDateFormat sdf() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
// 获取上周的开始时间
|
||||
public static String getBeginDayOfLastWeek() {
|
||||
//上周日期
|
||||
|
@ -619,6 +649,7 @@ public class DateUtil {
|
|||
String gtime = sdf2.format(c.getTime()); //上月第一天
|
||||
return gtime;
|
||||
}
|
||||
|
||||
// 获得上月最后一天24点时间
|
||||
public static String getTimesLastMonthnight() {
|
||||
//上月日期
|
||||
|
@ -633,6 +664,7 @@ public class DateUtil {
|
|||
String gtime = sdf.format(c.getTime()); //上月最后一天
|
||||
return gtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上一季度 开始和结束时间
|
||||
*
|
||||
|
@ -761,6 +793,7 @@ public class DateUtil {
|
|||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date fomatDateByNian(String date) {
|
||||
|
@ -793,4 +826,50 @@ public class DateUtil {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 返回从当前月份到指定月份的开始和结束时间
|
||||
* {dateBegin=2023-07-01 00:00:00, month=2023-07, dateEnd=2023-07-31 23:59:59}
|
||||
* {dateBegin=2023-08-01 00:00:00, month=2023-08, dateEnd=2023-08-31 23:59:59}
|
||||
* {dateBegin=2023-09-01 00:00:00, month=2023-09, dateEnd=2023-09-30 23:59:59}
|
||||
* {dateBegin=2023-10-01 00:00:00, month=2023-10, dateEnd=2023-10-31 23:59:59}
|
||||
* {dateBegin=2023-11-01 00:00:00, month=2023-11, dateEnd=2023-11-30 23:59:59}
|
||||
* {dateBegin=2023-12-01 00:00:00, month=2023-12, dateEnd=2023-12-31 23:59:59}
|
||||
* {dateBegin=2024-01-01 00:00:00, month=2024-01, dateEnd=2024-01-31 23:59:59}
|
||||
* @Author: dearLin
|
||||
* @Date: 2024/1/29/029 14:12
|
||||
* @Param: [] []
|
||||
* @Return: java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
*/
|
||||
public static List<Map<String, String>> generateTimeArraySevenMonth(int monthIndex) {
|
||||
List<Map<String, String>> timeArray = new ArrayList<>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
for (int i = monthIndex; i >= 0; i--) {
|
||||
Map<String, String> monthInfo = new HashMap<>();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
int month = calendar.get(Calendar.MONTH) + 1;
|
||||
|
||||
String monthString = String.format(year + "-%02d", month);
|
||||
String firstDayOfMonth = String.format("%04d-%02d-01 00:00:00", year, month);
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
String lastDayOfMonth = dateFormat.format(calendar.getTime());
|
||||
|
||||
monthInfo.put("month", monthString);
|
||||
monthInfo.put("dateBegin", firstDayOfMonth);
|
||||
monthInfo.put("dateEnd", lastDayOfMonth);
|
||||
|
||||
timeArray.add(monthInfo);
|
||||
|
||||
calendar.add(Calendar.MONTH, -1); // Go to the previous month
|
||||
}
|
||||
Collections.reverse(timeArray);
|
||||
return timeArray;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,7 +14,10 @@
|
|||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.CORPINFO_ID,
|
||||
f
|
||||
.
|
||||
CORPINFO_ID
|
||||
,
|
||||
f.VIDEONAME,
|
||||
f.VIDEOURL,
|
||||
f.OPDATE,
|
||||
|
@ -29,7 +32,8 @@
|
|||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
CORPINFO_ID,
|
||||
CORPINFO_ID
|
||||
,
|
||||
VIDEONAME,
|
||||
VIDEOURL,
|
||||
OPDATE,
|
||||
|
@ -43,7 +47,8 @@
|
|||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{CORPINFO_ID},
|
||||
#{CORPINFO_ID}
|
||||
,
|
||||
#{VIDEONAME},
|
||||
#{VIDEOURL},
|
||||
#{OPDATE},
|
||||
|
@ -131,7 +136,8 @@
|
|||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where
|
||||
f.VIDEOMANAGER_ID = #{VIDEOMANAGER_ID} and
|
||||
f.ISDELETE = '0'
|
||||
|
@ -149,7 +155,8 @@
|
|||
<include refid="Field"></include>,
|
||||
c.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f left join bus_CORP_INFO c on f.CORPINFO_ID=c.CORPINFO_ID
|
||||
<include refid="tableName"></include>
|
||||
f left join bus_CORP_INFO c on f.CORPINFO_ID=c.CORPINFO_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{pd.CORPINFO_ID}
|
||||
|
@ -172,7 +179,8 @@
|
|||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID=#{CORPINFO_ID}
|
||||
|
@ -185,10 +193,51 @@
|
|||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where
|
||||
f.CODE=#{CODE}
|
||||
</select>
|
||||
<select id="getCameraAlarmCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT COUNT(1) count,
|
||||
a.ISTRUE type
|
||||
FROM
|
||||
bus_aiwarning a
|
||||
WHERE
|
||||
a.ISDELETE = 0
|
||||
AND a.CORPINFO_ID = #{CORPINFO_ID}
|
||||
GROUP BY
|
||||
a.ISTRUE
|
||||
</select>
|
||||
<select id="getCameraAlarmTypeCount" resultType="com.zcloud.entity.PageData">
|
||||
SELECT ROUND((COUNT(a.TYPE) / (SELECT COUNT(*)
|
||||
FROM bus_aiwarning
|
||||
WHERE CORPINFO_ID =
|
||||
#{CORPINFO_ID}
|
||||
AND ISDELETE = 0)) * 100, 2) AS PERCENTAGE,
|
||||
a.TYPE
|
||||
FROM bus_aiwarning a
|
||||
WHERE a.ISDELETE = 0
|
||||
AND a.CORPINFO_ID = #{CORPINFO_ID}
|
||||
GROUP BY a.TYPE;
|
||||
</select>
|
||||
<select id="getCameraAlarmTimeCount" resultType="com.zcloud.entity.PageData">
|
||||
<foreach item="item" index="index" collection="generateTimeArray" separator="UNION">
|
||||
SELECT
|
||||
count( 1 ) MONTH_COUNT,
|
||||
#{item.month} MONTH
|
||||
FROM
|
||||
bus_aiwarning a
|
||||
WHERE
|
||||
a.ISDELETE = 0
|
||||
AND a.CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND WARNING_TIME BETWEEN #{item.dateBegin}
|
||||
AND #{item.dateEnd}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getCameraTopToShow" resultType="com.zcloud.entity.PageData">
|
||||
select * from bus_videomanager where ISSHOW = 1 and CORPINFO_ID = #{CORPINFO_ID} and ISDELETE = 0
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
|
@ -204,18 +253,8 @@
|
|||
</delete>
|
||||
<!-- 修改 -->
|
||||
<update id="editZhiding" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISSHOW = #{ISSHOW}
|
||||
where
|
||||
1=1
|
||||
<if test="VIDEOMANAGER_ID != null and VIDEOMANAGER_ID != ''">
|
||||
and VIDEOMANAGER_ID = #{VIDEOMANAGER_ID}
|
||||
</if>
|
||||
<if test="CORPINFO_ID != null and CORPINFO_ID != ''">
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</if>
|
||||
|
||||
UPDATE bus_videomanager
|
||||
SET ISSHOW = (CASE WHEN VIDEOMANAGER_ID = #{VIDEOMANAGER_ID} THEN 1 ELSE 0 END)
|
||||
where CORPINFO_ID = #{CORPINFO_ID}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue