监管端地图八项作业处理

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

@ -15,7 +15,7 @@ import java.util.Map;
public interface CzksMapEightMapper {
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
/**
*
@ -287,6 +287,9 @@ public interface CzksMapEightMapper {
*/
List<PageData> listAllMeasuresELECTRICITYOrder(PageData pd);
List<PageData> listAllGasELECTRICTITYOrder(PageData pd);
/**
* @param pd
* @throws Exception
@ -356,13 +359,86 @@ public interface CzksMapEightMapper {
*/
List<PageData> listAllMeasuresCUTROADOrder(PageData pd);
/**
*
* @param shuzu
* @return
*/
/**
*
* @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);
PageData getAllWorkUserIds(PageData pd);
}

View File

@ -15,7 +15,7 @@ import java.util.Map;
public interface MapEightMapper {
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
List<String> getCorpinfoIds(String[] ArrayDATA_IDS);
/**
*
@ -359,11 +359,11 @@ public interface MapEightMapper {
*/
List<PageData> listAllMeasuresCUTROADOrder(PageData pd);
/**
*
* @param shuzu
* @return
*/
/**
*
* @param shuzu
* @return
*/
List<String> getListDongHuo(List<String> shuzu);
/**
@ -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,11 +29,9 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
@Autowired
private CzksMapEightMapper mapEightMapper;
@Autowired
private UsersMapper usersMapper;
@Override
public List<String> getCorpinfoIds(PageData pd) {
@Override
public List<String> getCorpinfoIds(PageData pd) {
String area = pd.getString("AREA");
if(StringUtils.isNotBlank(area)){
String[] ArrayDATA_IDS = area.split(",");
@ -43,12 +43,12 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
return mapEightMapper.getCorpinfoIds(ArrayDATA_IDS);
}
return new ArrayList<>();
}
}
@Override
@Override
public Object getEcharts(PageData pd) {
Map<String,Object> returnMap = new HashMap<>();
String errInfo = "success";
String errInfo = "success";
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
@ -112,27 +112,28 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
@Override
public List<PageData> listAllHighRiskWorkLocation(PageData pd) throws Exception {
List<PageData> r = new ArrayList<>();
String typeStr = pd.getString("TYPE");
//动火
if(StringUtils.equals(typeStr,"HOTWORK")){
r = mapEightMapper.getHOTWORKHighRiskWorkLocation(pd);
//临时用电
}else if(StringUtils.equals(typeStr,"ELECTRICITY")){
r = mapEightMapper.getELECTRICITYHighRiskWorkLocation(pd);
//盲板
}else if(StringUtils.equals(typeStr,"BLINDBOARD")){
r = mapEightMapper.getBLINDBOARDHighRiskWorkLocation(pd);
// 高处
}else if(StringUtils.equals(typeStr,"HIGHWORK")){
r = mapEightMapper.getHIGHWORKHighRiskWorkLocation(pd);
//有限空间
}else if(StringUtils.equals(typeStr,"CONFINEDSPACE")){
r = mapEightMapper.getCONFINEDSPACEHighRiskWorkLocation(pd);
//吊装
}else if(StringUtils.equals(typeStr,"HOISTING")){
r = mapEightMapper.getHOISTINGHighRiskWorkLocation(pd);
}
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;
}
@ -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,51 +350,59 @@ 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);
map.put("measuresList", mapEightMapper.listAllMeasuresBLINDBOARDOrder(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);
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){
@ -590,18 +622,18 @@ public class CzksMapEightServiceImpl implements CzksMapEightService {
}
}
pd.put("specialUserList", specialUserList);
return pd;
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(","));
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;
}
return pd;
}
}