forked from integrated_whb/integrated_whb
隐患检查隐患
parent
8de91d0ca9
commit
be0e9caa41
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,312 @@
|
|||
package com.zcloud.mapper.datasource.hiddenDangerCheckStandard;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CustomHiddenMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**修改信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editInfo(PageData pd);
|
||||
void editISCONFIRM(PageData pd);
|
||||
void editHIDDENLEVEL(PageData pd);
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editDeadline(PageData pd);
|
||||
|
||||
/**整改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void rectify(PageData pd);
|
||||
|
||||
/**复查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void review(PageData pd);
|
||||
|
||||
/**验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void check(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getYestoday(PageData pd);
|
||||
|
||||
/**列表(全部,用于打印)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllToPrint(PageData pd);
|
||||
List<PageData> listHiddenAll(PageData pd);
|
||||
|
||||
/**
|
||||
* 查询清单检查记录中的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getHiddenByRecord(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**根据用户ID获取待验收隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getCountByCheckorId(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**批量修改
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateAll(PageData hiddens);
|
||||
|
||||
List<PageData> hiddenStatisticsByDay(PageData pd);
|
||||
|
||||
List<PageData> hiddenStatisticsAll(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getCountByCreatorId(PageData pd);
|
||||
List<PageData> getCountByRectifiCationorId(PageData pd);
|
||||
|
||||
void changeState(PageData pd);
|
||||
|
||||
List<PageData> getBICount(PageData pd);
|
||||
|
||||
void submit(PageData pd);
|
||||
|
||||
/**
|
||||
* 提交清单(其他)隐患
|
||||
* @param pd
|
||||
*/
|
||||
void submitList(PageData pd);
|
||||
|
||||
/**清单其他隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getOtherHidden(PageData pd);
|
||||
List<PageData> getCountByHiddenType(PageData pd);
|
||||
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getHiddenNum(PageData pd);
|
||||
|
||||
/**列表(全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllRoll(PageData pd);
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd);
|
||||
|
||||
List<PageData> getUserExamine(PageData pd);
|
||||
|
||||
List<PageData> listAllForDiagnosis(PageData pd);
|
||||
|
||||
List<PageData> listForDocking(PageData pd);
|
||||
void updateDocking(PageData pageData);
|
||||
|
||||
PageData getUserIndexData(PageData pd);
|
||||
|
||||
PageData getDeptIndexData(PageData pd);
|
||||
|
||||
PageData getSuperviseDeptIndexData(PageData pd);
|
||||
|
||||
List<PageData> findByMainId(PageData x);
|
||||
|
||||
List<PageData> anaysis(PageData util);
|
||||
|
||||
List<PageData> findByKey(PageData condition);
|
||||
|
||||
List<PageData> findByQue(PageData condition);
|
||||
|
||||
List<PageData> findByYin(PageData condition);
|
||||
|
||||
List<PageData> findByTs(PageData condition);
|
||||
|
||||
List<PageData> findByInspectionId(PageData pd);
|
||||
|
||||
/**
|
||||
* 获取安全环保检查下的隐患列表
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllInspection(PageData pd);
|
||||
|
||||
/**
|
||||
* 安全环保检查流程归档更新隐患状态为暂存
|
||||
* @param pd
|
||||
*/
|
||||
void editStateInspection(PageData pd);
|
||||
|
||||
void deleteByKey(PageData pd);
|
||||
|
||||
void deleteArray(PageData pd);
|
||||
|
||||
List<PageData> getCountByConfirmId(PageData pd);
|
||||
|
||||
List<PageData> getCountSpecialByhId(PageData pd);
|
||||
|
||||
void editInformation(PageData pd);
|
||||
|
||||
void editstate(PageData hiddenExa);
|
||||
|
||||
/**
|
||||
* 获取其他没有验收的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> listOtherNotAccept(PageData pd);
|
||||
|
||||
/**
|
||||
* 隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listGwjdatalistPage (Page page);
|
||||
|
||||
/**
|
||||
* 忽略隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listIgnoredatalistPage (Page page);
|
||||
|
||||
void saveForEmis(PageData pd);
|
||||
|
||||
void deleteForEmis(PageData pd);
|
||||
|
||||
/**
|
||||
* 确认隐患,修改隐患状态
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void confirmHidden(PageData pd);
|
||||
|
||||
List<PageData> hiddenInspectionlistPage(Page page);
|
||||
|
||||
/**
|
||||
* 获取其他没有指派完成的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listOtherNotAssign(PageData pd);
|
||||
|
||||
/**
|
||||
* 安全环保检查隐患指派
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void assign(PageData pd);
|
||||
|
||||
/**安全环保检查验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void finalcheck(PageData pd);
|
||||
|
||||
List<PageData> listOtherNotAccept4pc(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getListForTianzhangdatalistPage(Page page);
|
||||
|
||||
/**
|
||||
* 修改隐患信息,隐患级别 ,整改负责人 , 整改期限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void confirmUpdate(PageData pd);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void updateStateByHidden (PageData pd);
|
||||
|
||||
List<PageData> majordatalistPage(Page page);
|
||||
|
||||
List<PageData> verifydatalistPage(Page page);
|
||||
|
||||
List<PageData> majormanagelistPage(Page page);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByEmisId(PageData pd);
|
||||
|
||||
List<PageData> getListForemisdatalistPage(Page page);
|
||||
}
|
||||
|
|
@ -0,0 +1,375 @@
|
|||
package com.zcloud.service.hiddenDangerCheckStandard;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface CustomHiddenService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**修改信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editInfo(PageData pd)throws Exception;
|
||||
public void editISCONFIRM(PageData pd)throws Exception;
|
||||
public void editHIDDENLEVEL(PageData pd)throws Exception;
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editDeadline(PageData pd)throws Exception;
|
||||
|
||||
/**整改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void rectify(PageData pd)throws Exception;
|
||||
|
||||
/**复查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void review(PageData pd)throws Exception;
|
||||
|
||||
/**验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void check(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getYestoday(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**列表(全部,打印使用)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllToPrint(PageData pd)throws Exception;
|
||||
public List<PageData> listHiddenAll(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 查询清单检查记录中的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getHiddenByRecord(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**批量修改
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateAll(PageData hiddens)throws Exception;
|
||||
|
||||
/**按日统计
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> hiddenStatisticsByDay(PageData pd)throws Exception;
|
||||
|
||||
/**总数统计
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> hiddenStatisticsAll(PageData pd)throws Exception;
|
||||
|
||||
/**根据用户ID获取待验收隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByCheckorId(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* app首页 根据用户ID获取发现隐患信息
|
||||
* @param pd CREATOR
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByCreatorId(PageData pd) throws Exception;
|
||||
/**
|
||||
* app首页 根据用户ID获取整改隐患信息
|
||||
* @param pd CREATOR
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByRectifiCationorId(PageData pd)throws Exception;
|
||||
|
||||
void changeState(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> getBICount(PageData pd) throws Exception;
|
||||
|
||||
void submit(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 提交清单(其他)隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void submitList(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 清单其他隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getOtherHidden(PageData pd) throws Exception;
|
||||
public List<PageData> getCountByHiddenType(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 清单其他隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getHiddenNum(PageData pd) throws Exception;
|
||||
|
||||
/**列表(全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllRoll(PageData pd);
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> getDeptExamine(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> getUserExamine(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> listAllForDiagnosis(PageData pd)throws Exception;
|
||||
|
||||
PageData getUserIndexData(PageData pd)throws Exception;
|
||||
|
||||
PageData getDeptIndexData(PageData pd)throws Exception;
|
||||
|
||||
PageData getSuperviseDeptIndexData(PageData pd)throws Exception;
|
||||
|
||||
void createExcel(HttpServletResponse response, PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByKey(PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByQue(PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByYin(PageData condition) throws Exception;
|
||||
|
||||
List<PageData> findByTs(PageData condition) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过安全环保检查ID获取隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> findByInspectionId(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取安全环保检查下的隐患列表
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllInspection(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 安全环保检查流程归档更新隐患状态为暂存
|
||||
* @param pd
|
||||
*/
|
||||
void editStateInspection(PageData pd)throws Exception;
|
||||
|
||||
void deleteByKey(PageData pd) throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteArray(PageData pd)throws Exception;
|
||||
|
||||
/**根据用户ID获取待验收隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByConfirmId(PageData pd) throws Exception;
|
||||
|
||||
/**根据用户ID获取特殊处置隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountSpecialByhId(PageData pd) throws Exception;
|
||||
|
||||
/**修改位置描述信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editInformation(PageData pd)throws Exception;
|
||||
|
||||
void editstate(PageData hiddenExa);
|
||||
|
||||
/**
|
||||
* 获取其他没有验收的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listOtherNotAccept(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listGwj(Page page) throws Exception;
|
||||
|
||||
/**
|
||||
* 忽略隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listIgnore(Page page) throws Exception;
|
||||
|
||||
public String goEmis (PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 确认隐患,修改隐患状态
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmHidden (PageData pd) throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listForSafetyEnvironmental(Page page)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取其他没有指派完成的隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listOtherNotAssign(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 安全环保检查隐患指派
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void assign(PageData pd)throws Exception;
|
||||
|
||||
/**安全环保检查验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void finalcheck(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> listOtherNotAccept4pc(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getListForTianzhang(Page page)throws Exception;
|
||||
|
||||
/**
|
||||
* 修改隐患信息,隐患级别 ,整改负责人 , 整改期限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmUpdate(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 修改隐患状态,进入隐患特殊处理审核
|
||||
*/
|
||||
public void updteStateBySpecialExamine(PageData pageData)throws Exception;
|
||||
|
||||
/**
|
||||
* 重大隐患列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> majorlist(Page page) throws Exception;
|
||||
|
||||
/**
|
||||
* 重大隐患核实列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> verifylist(Page page) throws Exception;
|
||||
|
||||
/**
|
||||
* 重大隐患列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> majormanage(Page page) throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByEmisId(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> getListForemis(Page page)throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,791 @@
|
|||
package com.zcloud.service.hiddenDangerCheckStandard.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
|
||||
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
|
||||
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zcloud.entity.HiddenExcel;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Dictionaries;
|
||||
import com.zcloud.mapper.datasource.bus.HiddenExamineMapper;
|
||||
import com.zcloud.mapper.datasource.hidden.HiddenCheckMapper;
|
||||
import com.zcloud.mapper.datasource.hidden.HiddenMapper;
|
||||
import com.zcloud.mapper.datasource.hidden.HiddenSchemeMapper;
|
||||
import com.zcloud.mapper.datasource.hiddenDangerCheckStandard.CustomHiddenMapper;
|
||||
import com.zcloud.service.bus.HiddenRegionService;
|
||||
import com.zcloud.service.hiddenDangerCheckStandard.CustomHiddenService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.DictionariesService;
|
||||
import com.zcloud.service.system.ImgFilesService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.*;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2021-01-04
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CustomHiddenServiceImpl implements CustomHiddenService {
|
||||
|
||||
@Resource
|
||||
private CustomHiddenMapper customHiddenServiceMapper;
|
||||
@Resource
|
||||
private DictionariesService dictionariesService;
|
||||
@Resource
|
||||
private UsersService usersService;
|
||||
@Resource
|
||||
private DepartmentService departmentService;
|
||||
@Resource
|
||||
private HiddenSchemeMapper hiddenSchemeMapper;
|
||||
@Resource
|
||||
private HiddenCheckMapper hiddenCheckMapper;
|
||||
@Resource
|
||||
private ImgFilesService imgFilesService;
|
||||
@Resource
|
||||
private HiddenExamineMapper hiddenexamineMapper;
|
||||
@Autowired
|
||||
private HiddenRegionService hiddenRegionService; // 隐患区域维护
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**修改信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editInfo(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.editInfo(pd);
|
||||
}
|
||||
public void editISCONFIRM(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.editISCONFIRM(pd);
|
||||
}
|
||||
public void editHIDDENLEVEL(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.editHIDDENLEVEL(pd);
|
||||
}
|
||||
|
||||
/**提交隐患
|
||||
* @throws Exception
|
||||
*/
|
||||
public void submit(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.submit(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void changeState(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.changeState(pd);
|
||||
}
|
||||
|
||||
/**定时修改过期隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editDeadline(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.editDeadline(pd);
|
||||
}
|
||||
|
||||
/**验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void check(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.check(pd);
|
||||
}
|
||||
|
||||
/**复查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void review(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.review(pd);
|
||||
}
|
||||
|
||||
/**整改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void rectify(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.rectify(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return customHiddenServiceMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**查询昨日过期隐患。发短信
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getYestoday(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getYestoday(pd);
|
||||
}
|
||||
/**列表(全部,打印使用)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllToPrint(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.listAllToPrint(pd);
|
||||
}
|
||||
public List<PageData> listHiddenAll(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.listHiddenAll(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询清单检查记录中的隐患
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getHiddenByRecord(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getHiddenByRecord(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
customHiddenServiceMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**批量修改
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateAll(PageData hiddens)throws Exception{
|
||||
customHiddenServiceMapper.updateAll(hiddens);
|
||||
}
|
||||
|
||||
/**按日统计
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> hiddenStatisticsByDay(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.hiddenStatisticsByDay(pd);
|
||||
}
|
||||
|
||||
/**总数统计
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> hiddenStatisticsAll(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.hiddenStatisticsAll(pd);
|
||||
}
|
||||
/**
|
||||
*app首页 根据用户ID获取发现隐患信息
|
||||
* @param pd CREATOR
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByCreatorId(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountByCreatorId(pd);
|
||||
}
|
||||
/**
|
||||
* app首页 根据用户ID获取整改隐患信息
|
||||
* @param pd CREATOR
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByRectifiCationorId(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountByRectifiCationorId(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* app首页根据用户ID获取待验收隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByCheckorId(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountByCheckorId(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
*根据企业ID获取驾驶舱隐患统计信息
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getBICount(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getBICount(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清单其他隐患
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> getOtherHidden(PageData pd) throws Exception {
|
||||
return customHiddenServiceMapper.getOtherHidden(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交清单(其他)隐患
|
||||
*/
|
||||
@Override
|
||||
public void submitList(PageData pd) throws Exception {
|
||||
customHiddenServiceMapper.submitList(pd);
|
||||
}
|
||||
|
||||
|
||||
public List<PageData> getCountByHiddenType(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountByHiddenType(pd);
|
||||
}
|
||||
/**按日统计
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getHiddenNum(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getHiddenNum(pd);
|
||||
}
|
||||
|
||||
|
||||
/**列表(全部
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllRoll(PageData pd){
|
||||
return customHiddenServiceMapper.listAllRoll(pd);
|
||||
}
|
||||
|
||||
/**绩效得分
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getDeptExamine(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getDeptExamine(pd);
|
||||
}
|
||||
public List<PageData> getUserExamine(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getUserExamine(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listAllForDiagnosis(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.listAllForDiagnosis(pd);
|
||||
}
|
||||
|
||||
public PageData getUserIndexData(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getUserIndexData(pd);
|
||||
}
|
||||
|
||||
public PageData getDeptIndexData(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getDeptIndexData(pd);
|
||||
}
|
||||
|
||||
public PageData getSuperviseDeptIndexData(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.getSuperviseDeptIndexData(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByKey(PageData condition) throws Exception {
|
||||
return customHiddenServiceMapper.findByKey(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByQue(PageData condition) throws Exception {
|
||||
return customHiddenServiceMapper.findByQue(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByYin(PageData condition) throws Exception {
|
||||
return customHiddenServiceMapper.findByYin(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByTs(PageData condition) throws Exception {
|
||||
return customHiddenServiceMapper.findByTs(condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过安全检查ID获取隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public List<PageData> findByInspectionId(PageData pd) throws Exception {
|
||||
return customHiddenServiceMapper.findByInspectionId(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listAllInspection(PageData pd) throws Exception {
|
||||
List<PageData> hiddenList = customHiddenServiceMapper.listAllInspection(pd);
|
||||
for (PageData hd : hiddenList) {
|
||||
PageData pd2 = new PageData();
|
||||
pd2.put("FOREIGN_KEY",hd.getString("HIDDEN_ID"));
|
||||
pd2.put("TYPE",3); //隐患图片
|
||||
hd.put("hiddenImgs", imgFilesService.listAll(pd2));
|
||||
pd2.put("TYPE",102); //隐患视频
|
||||
hd.put("hiddenVideos", imgFilesService.listAll(pd2));//整改图片
|
||||
}
|
||||
return hiddenList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editStateInspection(PageData pd) throws Exception {
|
||||
customHiddenServiceMapper.editStateInspection(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByKey(PageData pd) throws Exception {
|
||||
customHiddenServiceMapper.deleteByKey(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteArray(PageData pd) throws Exception {
|
||||
customHiddenServiceMapper.deleteArray(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* app应用页面根据用户ID获取待确认隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountByConfirmId(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountByConfirmId(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* app应用页面根据用户ID获取特殊处置隐患
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getCountSpecialByhId(PageData pd) throws Exception{
|
||||
return customHiddenServiceMapper.getCountSpecialByhId(pd);
|
||||
}
|
||||
|
||||
/**修改位置描述信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editInformation(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.editInformation(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editstate(PageData hiddenExa) {
|
||||
customHiddenServiceMapper.editstate(hiddenExa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listOtherNotAccept(PageData pd) throws Exception {
|
||||
return customHiddenServiceMapper.listOtherNotAccept(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listGwj(Page page) throws Exception{
|
||||
return customHiddenServiceMapper.listGwjdatalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 忽略隐患列表 -- 港务局
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listIgnore(Page page) throws Exception{
|
||||
return customHiddenServiceMapper.listIgnoredatalistPage(page);
|
||||
}
|
||||
|
||||
public void saveForEmis(String hiddenId,String resXML)throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd.put("HIDDEN_ID",hiddenId);
|
||||
pd.put("resXML",resXML);
|
||||
customHiddenServiceMapper.saveForEmis(pd);
|
||||
}
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteForEmis(String hiddenId)throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd.put("HIDDEN_ID",hiddenId);
|
||||
customHiddenServiceMapper.deleteForEmis(pd);
|
||||
}
|
||||
public String goEmis (PageData pd) throws Exception{
|
||||
String result = "";
|
||||
// 1.整理数据
|
||||
PageData hiddenPd = this.findById(pd); /** 确认之前,记录现在的隐患信息 */
|
||||
// 隐患确认人
|
||||
PageData dianjianUserPd = new PageData();
|
||||
dianjianUserPd.put("USER_ID",hiddenPd.getString("CONFIRM_USER"));
|
||||
PageData dianjianUser = usersService.findByIdForEmis(dianjianUserPd);
|
||||
if(Tools.isEmpty(dianjianUser)){
|
||||
return "未找到隐患确认人!";
|
||||
}
|
||||
|
||||
if(Tools.isEmpty(dianjianUser.get("DJBM"))){
|
||||
result += "隐患确认人部门没有维护对接编码!";
|
||||
}
|
||||
if(Tools.isEmpty(dianjianUser.get("JCR"))){
|
||||
result += "隐患确认人没有维护对接编码!";
|
||||
}
|
||||
PageData hiddenRegion= hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"),hiddenPd.getString("HIDDENPART"));
|
||||
PageData hiddenRegionPar = new PageData();
|
||||
if(null != hiddenRegion){
|
||||
if(!hiddenRegion.getString("PARENT_ID").equals("0")){
|
||||
hiddenRegionPar = hiddenRegionService.findById(hiddenPd.getString("CORPINFO_ID"),hiddenRegion.getString("PARENT_ID"));
|
||||
if(!"0".equals(hiddenRegionPar.getString("PARENT_ID"))){
|
||||
return "隐患区域等级维护错误!";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return "隐患区域等级维护错误!";
|
||||
}
|
||||
|
||||
List<PageData> imgList = imgFilesService.getListByKeyAndType(hiddenPd.getString("HIDDEN_ID"),"3");
|
||||
String imgStr = "";
|
||||
for (PageData pageData:imgList){
|
||||
imgStr += "192.168.192.201/file" + pageData.getString("FILEPATH")+";";
|
||||
}
|
||||
if (result != ""){
|
||||
return result;
|
||||
}
|
||||
String DJSJ = DateUtil.date2Str(new Date()); // 点检时间
|
||||
String BC = ""; // 班次,自动算
|
||||
String DJBM = dianjianUser.get("DJBM").toString(); // 点检部门t_b_bm
|
||||
String DJBC = pd.getString("DJBC"); // 点检班次
|
||||
String JCR = dianjianUser.get("JCR").toString(); // 检查人
|
||||
String JCLX = pd.getString("JCLX"); // 检查类型t_b_jclx--fid
|
||||
String SBDL = hiddenRegionPar.getString("SBDL"); // 设备大类t_b_sbdlxx--sbdlxxdm
|
||||
String SBMC = hiddenRegion.getString("SBMC");; // 设备名称t_b_shebeixx--shebeidm
|
||||
String DJWT = hiddenPd.getString("HIDDENDESCR"); // 点检问题
|
||||
String CJR = dianjianUser.get("JCR").toString(); // 创建人
|
||||
String CJSJ = DateUtil.date2Str(new Date()); // 创建时间
|
||||
String GZFL = pd.getString("GZFL"); // 故障分类 t_b_kclx
|
||||
String SBZJGID = ""; // 子机构v_b_bujian_zjg
|
||||
String BUJIANID = ""; // 部件v_b_bujian_bj
|
||||
String PICTURE = imgStr; // 图片
|
||||
|
||||
StringBuffer strUrl = new StringBuffer();
|
||||
strUrl.append("strDjsj=" + DJSJ);
|
||||
strUrl.append("&strBc=" + "");
|
||||
strUrl.append("&strDjbm=" + DJBM);
|
||||
strUrl.append("&strDjbc=" + DJBC);
|
||||
strUrl.append("&strJcr=" + JCR);
|
||||
strUrl.append("&strJclx=" + JCLX);
|
||||
strUrl.append("&strSbdl=" + SBDL);
|
||||
strUrl.append("&strSbmc=" + SBMC);
|
||||
strUrl.append("&strDjwt=" + DJWT);
|
||||
strUrl.append("&strCjr=" + CJR);
|
||||
strUrl.append("&strCjsj=" + CJSJ);
|
||||
strUrl.append("&strGzfl=" + GZFL);
|
||||
strUrl.append("&strSbzjgId=" + SBZJGID);
|
||||
strUrl.append("&strBuJianId=" + BUJIANID);
|
||||
strUrl.append("&strPicture=" + PICTURE);
|
||||
String resXML = HttpEmisDuijieUtil.sendPostNoAccept(strUrl.toString());
|
||||
StringBuffer strUrl2 = new StringBuffer();
|
||||
strUrl2.append("djsj:" + DJSJ);
|
||||
strUrl2.append(",bc:" + "");
|
||||
strUrl2.append(",djbm:" + DJBM);
|
||||
strUrl2.append(",djbc:" + DJBC);
|
||||
strUrl2.append(",jcr:" + JCR);
|
||||
strUrl2.append(",jclx:" + JCLX);
|
||||
strUrl2.append(",sbdl:" + SBDL);
|
||||
strUrl2.append(",sbmc:" + SBMC);
|
||||
strUrl2.append(",djwt:" + DJWT);
|
||||
strUrl2.append(",cjr:" + CJR);
|
||||
strUrl2.append(",cjsj:" + CJSJ);
|
||||
strUrl2.append(",gzfl:" + GZFL);
|
||||
strUrl2.append(",sbzjgID:" + SBZJGID);
|
||||
strUrl2.append(",bujianid:" + BUJIANID);
|
||||
strUrl2.append(",pic:" + PICTURE);
|
||||
if(strUrl2.toString().equals(resXML)){
|
||||
/**
|
||||
* 成功
|
||||
* 1.删除现在的隐患内容
|
||||
* 2.存储这次的隐患内容
|
||||
*/
|
||||
this.saveForEmis(hiddenPd.getString("HIDDEN_ID"),resXML);
|
||||
this.deleteForEmis(hiddenPd.getString("HIDDEN_ID"));
|
||||
return "success";
|
||||
}else{
|
||||
//失败
|
||||
return resXML;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认隐患,修改隐患状态
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmHidden (PageData pd) throws Exception{
|
||||
customHiddenServiceMapper.confirmHidden(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForSafetyEnvironmental(Page page) throws Exception {
|
||||
return customHiddenServiceMapper.hiddenInspectionlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listOtherNotAssign(PageData pd) throws Exception {
|
||||
return customHiddenServiceMapper.listOtherNotAssign(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void assign(PageData pd) throws Exception {
|
||||
customHiddenServiceMapper.assign(pd);
|
||||
}
|
||||
|
||||
/**安全环保检查验收
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void finalcheck(PageData pd)throws Exception{
|
||||
customHiddenServiceMapper.finalcheck(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listOtherNotAccept4pc(PageData pd) throws Exception {
|
||||
return customHiddenServiceMapper.listOtherNotAccept4pc(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getListForTianzhang(Page page)throws Exception{
|
||||
return customHiddenServiceMapper.getListForTianzhangdatalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改隐患信息,隐患级别 ,整改负责人 , 整改期限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmUpdate(PageData pd) throws Exception{
|
||||
customHiddenServiceMapper.confirmUpdate(pd);
|
||||
}
|
||||
|
||||
public void updateStateByHidden(String type,String hiddenId) throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd.put("STATE",type);
|
||||
pd.put("HIDDEN_ID",hiddenId);
|
||||
customHiddenServiceMapper.updateStateByHidden(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改隐患状态,进入隐患特殊处理审核
|
||||
*/
|
||||
public void updteStateBySpecialExamine(PageData pageData)throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID());
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
|
||||
pd.put("OPERATOR",Jurisdiction.getUSER_ID());
|
||||
pd.put("OPERATTIME",DateUtil.date2Str(new Date()));
|
||||
pd.put("TYPE","1");
|
||||
pd.put("STATE","-1");
|
||||
pd.put("EXAMINE",pageData.get("EXAMINE")); // 无法整改原因
|
||||
pd.put("HIDDEN_ID",pageData.get("HIDDEN_ID"));// 隐患id
|
||||
hiddenexamineMapper.save(pd);
|
||||
|
||||
this.updateStateByHidden("7",pageData.get("HIDDEN_ID").toString()); //修改隐患状态
|
||||
}
|
||||
|
||||
/**
|
||||
* 重大隐患列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> majorlist(Page page) throws Exception{
|
||||
return customHiddenServiceMapper.majordatalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重大隐患核实列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> verifylist(Page page) throws Exception{
|
||||
return customHiddenServiceMapper.verifydatalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重大隐患列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> majormanage(Page page) throws Exception{
|
||||
return customHiddenServiceMapper.majormanagelistPage(page);
|
||||
}
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByEmisId(PageData pd)throws Exception{
|
||||
return customHiddenServiceMapper.findByEmisId(pd);
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> getListForemis(Page page)throws Exception{
|
||||
return customHiddenServiceMapper.getListForemisdatalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createExcel(HttpServletResponse response, PageData request) throws Exception {
|
||||
PageData lock = new PageData();
|
||||
lock.putAll(request);
|
||||
// 隐患级别数据字典dicMap(id:name)
|
||||
String dicParentId = "5e7cf8620ba54ad89719d0be62133c7a";
|
||||
List<Dictionaries> dicList = dictionariesService.listSubDictByParentId(dicParentId);// 字典
|
||||
Map<String, String> dicMap = dicList.stream().collect(Collectors.toMap(Dictionaries::getBIANMA, Dictionaries::getNAME));
|
||||
|
||||
PageData condition = new PageData();
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());// CORPINFO_ID
|
||||
// 公司内所有的人员信息userList(id:name)
|
||||
List<PageData> userList = usersService.listAllUser(condition);
|
||||
Map<String, String> userMap = userList.stream().collect(Collectors.toMap((x -> x.getString("USER_ID")), (y -> y.getString("NAME"))));
|
||||
// 公司内所有部门信息(id:name)
|
||||
List<PageData> deparList = departmentService.listAll(condition);
|
||||
// 查看企业下的所有部门,根据部门id匹配信息
|
||||
Map<String, String> deparMap = deparList.stream().collect(Collectors.toMap((x -> x.getString("DEPARTMENT_ID")), (y -> y.getString("NAME"))));
|
||||
// 校验请求参数
|
||||
Warden.checkRequestHiddenCreateExcel(lock);
|
||||
// 查看隐患信息
|
||||
condition.clear();
|
||||
if ("1".equals(lock.getString("havePicture"))) {
|
||||
condition.put("HIDDEN_IDS", lock.getString("hiddenIds").split(","));
|
||||
} else {
|
||||
condition.put("KEYWORDS", lock.getString("KEYWORDS"));
|
||||
condition.put("DISPOSESTATE", lock.getString("DISPOSESTATE"));
|
||||
condition.put("STATE", lock.getString("STATE"));
|
||||
condition.put("STARTTIME", lock.getString("STARTTIME"));
|
||||
condition.put("ENDTIME", lock.getString("ENDTIME"));
|
||||
condition.put("DEPTIDS", lock.getString("DEPTIDS"));
|
||||
condition.put("ISQUALIFIED", lock.getString("ISQUALIFIED"));
|
||||
condition.put("HIDDENLEVEL", lock.getString("HIDDENLEVEL"));
|
||||
condition.put("IS_SELF", lock.getString("IS_SELF"));
|
||||
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
}
|
||||
List<PageData> varOList = customHiddenServiceMapper.listAll(condition);
|
||||
|
||||
Set<String> imgIds = varOList.stream().map(n -> n.getString("HIDDEN_ID")).collect(Collectors.toSet());
|
||||
// 查询整改方案
|
||||
List<PageData> schemeList = hiddenSchemeMapper.listExport(condition);
|
||||
Map<String, PageData> schemeMap = schemeList.stream().filter(n -> "0".equals(n.getString("ISDELETE"))).collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (m -> m)));
|
||||
imgIds.addAll(schemeList.stream().map(n -> n.getString("HIDDENSCHEME_ID")).collect(Collectors.toSet()));
|
||||
// 验收信息
|
||||
List<PageData> checkList = hiddenCheckMapper.listExport(condition);
|
||||
imgIds.addAll(checkList.stream().map(n -> n.getString("HIDDENCHECK_ID")).collect(Collectors.toSet()));
|
||||
Map<String, List<PageData>> checkMap = checkList.stream().collect(Collectors.toMap((n -> n.getString("HIDDEN_ID")), (Arrays::asList)));
|
||||
int checkMaxCount = checkMap.values().stream().mapToInt(List::size).max().orElse(0);
|
||||
// 组织参数查询出所有跟隐患相关的图片
|
||||
condition.clear();
|
||||
condition.put("ArrayDATA_IDS", imgIds.toArray(new String[0]));
|
||||
List<PageData> imgList = imgFilesService.listAllByIds(condition)
|
||||
.stream()
|
||||
.filter(n -> n.get("TYPE") != null && StringUtils.isNotBlank(n.get("TYPE").toString()))
|
||||
.filter(n -> n.get("FOREIGN_KEY") != null && StringUtils.isNotBlank(n.getString("FOREIGN_KEY")))
|
||||
.filter(n -> !(n.getString("FILEPATH").contains(".mp4")))//排除视频
|
||||
.filter(n -> !(n.getString("FILEPATH").contains(".MP4")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Map<String, List<PageData>> imgMap = imgList.stream().collect(Collectors.groupingBy(m -> m.getString("FOREIGN_KEY")));
|
||||
|
||||
List<String> index = Arrays.asList("3", "4", "5", "8");
|
||||
Map<String, Integer> limit = new HashMap<>();
|
||||
for (String x : index) {
|
||||
int number = imgList.stream()
|
||||
.filter(n -> x.equals(n.get("TYPE").toString()))
|
||||
.collect(Collectors.groupingBy(m -> m.getString("FOREIGN_KEY")))
|
||||
.values().stream()
|
||||
.mapToInt(List::size)
|
||||
.max()
|
||||
.orElse(0);
|
||||
limit.put(x, number);
|
||||
}
|
||||
// 组装数据
|
||||
HiddenExcel excel = new HiddenExcel(limit.get("3"), limit.get("4"), limit.get("8"), checkMaxCount, limit.get("5"));
|
||||
excel.setHavePicture(request.getString("havePicture"));
|
||||
excel.setLeveMap(dicMap);
|
||||
excel.setDepMap(deparMap);
|
||||
excel.setUserMap(userMap);
|
||||
excel.setFoot(schemeMap);
|
||||
excel.setImgMap(imgMap);
|
||||
excel.setCheckMap(checkMap);
|
||||
excel.setNuTitle(JSONObject.parseArray(request.getString("options"), String.class));
|
||||
excel.initHead();
|
||||
excel.addAllBody(varOList);
|
||||
// 组装表格样式
|
||||
WriteCellStyle headWriteCellStyle = HiddenExcel.getHeadStyle();
|
||||
WriteCellStyle cellStyle = HiddenExcel.getHeadStyle();
|
||||
HorizontalCellStyleStrategy horizontalCellStyleStrategy = new HorizontalCellStyleStrategy(headWriteCellStyle, cellStyle);
|
||||
|
||||
EasyExcel.write(response.getOutputStream())
|
||||
.useDefaultStyle(true)
|
||||
.relativeHeadRowIndex(1)
|
||||
.registerWriteHandler(horizontalCellStyleStrategy)
|
||||
.registerWriteHandler(new SimpleColumnWidthStyleStrategy(25))
|
||||
.sheet("隐患台账")
|
||||
.head(excel.getHead())
|
||||
.doWrite(excel.getHand());
|
||||
}
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
(select h.HIDDEN_ID from BUS_HIDDEN h where h.RECORDITEM_ID=f.RECORDITEM_ID and h.CHECKRECORD_ID=f.CHECKRECORD_ID and h.ISDELETE= '0') as HIDDEN_ID,
|
||||
(select h.HIDDEN_ID from BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN h where h.RECORDITEM_ID=f.RECORDITEM_ID and h.CHECKRECORD_ID=f.CHECKRECORD_ID and h.ISDELETE= '0') as HIDDEN_ID,
|
||||
( select count(1) from bus_imgfiles i where i.FOREIGN_KEY = f.RECORDITEM_ID and i.TYPE = '14' ) AS IMGCOUNT,
|
||||
r.IDENTIFICATION_ID
|
||||
from
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue