监管端地图八项作业处理

pull/14/head
zhaoyu 2024-01-31 10:20:10 +08:00
parent 6e79d931e4
commit f0f9d01c04
5 changed files with 1361 additions and 867 deletions

View File

@ -287,6 +287,9 @@ public interface CzksMapEightMapper {
*/
List<PageData> listAllMeasuresELECTRICITYOrder(PageData pd);
List<PageData> listAllGasELECTRICTITYOrder(PageData pd);
/**
* @param pd
* @throws Exception
@ -363,6 +366,79 @@ public interface CzksMapEightMapper {
*/
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);
PageData getAllWorkUserIds(PageData pd);
}

View File

@ -430,5 +430,12 @@ public interface MapEightMapper {
* @return
*/
List<PageData> findByIdCONFINEDSPACEAcceptusers(PageData pd);
/**
*
* @param pd
* @return
*/
PageData findByIdCONFINEDSPACEGasWH(PageData pd);
}

View File

@ -96,6 +96,6 @@ public interface CzksMapEightService {
*/
Map<String, Object> getByIdOrder(PageData pd);
Object getAllWorkUserCards(PageData pd);
public Object getAllWorkUserCards(PageData pd);
}

View File

@ -3,9 +3,10 @@ package com.zcloud.service.czksbimap.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.czksbimap.CzksMapEightMapper;
import com.zcloud.mapper.datasource.system.UsersMapper;
import com.zcloud.mapper.datasource.map.MapEightMapper;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.czksbimap.CzksMapEightService;
import com.zcloud.service.map.MapEightService;
import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -27,8 +29,6 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
@Autowired
private CzksMapEightMapper mapEightMapper;
@Autowired
private UsersMapper usersMapper;
@Override
public List<String> getCorpinfoIds(PageData pd) {
@ -116,22 +116,23 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
String typeStr = pd.getString("TYPE");
//动火
if(StringUtils.equals(typeStr,"HOTWORK")){
r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
// r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
r = mapEightMapper.getHOTWORKHighRiskWorkLocationCfd(pd);
//临时用电
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
r = mapEightMapper.getELECTRICITYHighRiskWorkLocation(pd);
r = mapEightMapper.getELECTRICITYHighRiskWorkLocationOrder(pd);
//盲板
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocation(pd);
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocationOrder(pd);
// 高处
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
r = mapEightMapper.getHIGHWORKHighRiskWorkLocation(pd);
r = mapEightMapper.getHIGHWORKHighRiskWorkLocationOrder(pd);
//有限空间
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocation(pd);
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocationOrder(pd);
//吊装
}else if(StringUtils.equals(typeStr,"HOISTING")){
r = mapEightMapper.getHOISTINGHighRiskWorkLocation(pd);
r = mapEightMapper.getHOISTINGHighRiskWorkLocationOrder(pd);
}
return r;
}
@ -206,6 +207,19 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
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");
@ -267,6 +281,15 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
@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);
}
@ -327,6 +350,9 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
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);
@ -337,41 +363,46 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
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);
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;
}
/**
* @Description:
* @Author: dearLin
* @Date: 2023/12/13/013 16:45
* @Param: [com.zcloud.entity.PageData] [pd]
* @Return: java.lang.Object
*/
@Override
public Object getAllWorkUserCards(PageData pd) {
Map<String,Object> map = new HashMap<String,Object>();
@ -419,6 +450,7 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
map.put("result", errInfo);
return map;
}
private PageData shenpi(PageData pd,List<PageData> list){
List<PageData> specialUserList = new ArrayList<>();
for (PageData userPageData : list){