/* package cn.com.goldenwater.dcproj.service.impl.system; import cn.com.goldenwater.dcproj.constValue.*; import cn.com.goldenwater.dcproj.dao.*; import cn.com.goldenwater.dcproj.dto.*; import cn.com.goldenwater.dcproj.model.*; import cn.com.goldenwater.dcproj.param.*; import cn.com.goldenwater.dcproj.service.*; import cn.com.goldenwater.dcproj.service.impl.wdtst.BisInspWtdstTrackServiceImpl; import cn.com.goldenwater.dcproj.utils.AdLevelUtil; import cn.com.goldenwater.dcproj.utils.BeanUtil; import cn.com.goldenwater.dcproj.utils.DateUtils; import cn.com.goldenwater.dcproj.utils.GeoUtil; import cn.com.goldenwater.id.util.UuidUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.collections.map.HashedMap; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.*; import static cn.com.goldenwater.dcproj.utils.impexcel.ImpUtil.XLS; */ /** * Created by 61618 on 2019/4/17. *//* @Service @Transactional(rollbackFor = Exception.class) public class SupervisionPlanServiceImpl implements SupervisionPlanService { @Autowired private BisZhejiangVillRgstrService bisZhejiangVillRgstrService; @Autowired private AttJskejianFlkdisBaseDao jskejianFlkdisBaseDao; @Autowired private AttJskejianFlkdisRgstrDao jskejianFlkdisRgstrDao; @Autowired private AttJskejianWaterRgstrDao jskejianWaterRgstrDao; @Autowired private AttJskejianWaterBaseDao jskejianWaterBaseDao; @Autowired private AttJskejianEcofrdBaseDao jskejianEcofrdBaseDao; @Autowired private AttJskejianEcofrdRgstrDao jskejianEcofrdRgstrDao; @Autowired private AttWagaBaseDao attWagaBaseDao; @Autowired private SupervisionPlanDao supervisionPlanDao; @Autowired private BisInspAllObjDao bisInspAllObjDao; @Autowired private AttRsBaseDao attRsBaseDao; @Autowired private BisInspRsvrRgstrDao bisInspRsvrRgstrDao; @Autowired private BisInspVillRgstrDao bisInspVillRgstrDao; @Autowired private BisInspWtdstTrackDao bisInspWtdstTrackDao; @Autowired private AttEmpwtprjBaseDao attEmpwtprjBaseDao; @Autowired private BisInspKeyRegisterDao bisInspKeyRegisterDao; @Autowired private BisInspBaseDao bisInspBaseDao; @Autowired private BisInspGrwDao bisInspGrwDao; @Autowired private AttWagaRgstrDao attWagaRgstrDao; @Autowired private AttWagaBaseDao wagaBaseDao; @Autowired private BisInspBaseExtDao bisInspBaseExtDao; @Autowired private BisInspSafeExtManageDao bisInspSafeExtManageDao; @Autowired private BisInspPreListDao bisInspPreListDao; @Autowired private BisInspBaseViewDao bisInspBaseViewDao; @Autowired private BisInspBasePresExtDao bisInspBasePresExtDao; @Autowired BisInspRsvrProjectDao bisInspRsvrProjectDao; @Autowired BisInspRsvrBenefitsDao bisInspRsvrBenefitsDao;//水库效益发挥情况 @Autowired private BisInspPblmDao bisInspPblmDao; @Autowired private BisInspVlgdrinkProjManageDao bisInspVlgdrinkProjManageDao; @Autowired private BisInspProSourceProtectDao bisInspProSourceProtectDao; @Autowired private BisInspSecsurveyVlgDao bisInspSecsurveyVlgDao; @Autowired private BisInspVlgdrinkFacOperDao bisInspVlgdrinkFacOperDao; @Autowired private BisInspWateruserInfoDao bisInspWateruserInfoDao; @Autowired private BisInspManageResponsibilityDao bisInspManageResponsibilityDao; @Autowired private BisInspKeyRegisterSectionDao bisInspKeyRegisterSectionDao; @Autowired private BisInspKeyRegSecUnitDao bisInspKeyRegSecUnitDao; @Autowired private AttMampuInfoDao attMampuInfoDao; @Autowired private BisInspWagaMrsCiDao bisInspWagaMrsCiDao; @Autowired private BisInspWagaSafeManageDao bisInspWagaSafeManageDao; @Autowired private BisInspWagaDmamInfoDao bisInspWagaDmamInfoDao; @Autowired private BisInspWagaProenInfoDao bisInspWagaProenInfoDao; @Autowired private BisInspRsvrRgstrService bisInspRsvrRgstrService; @Autowired private AttWagaRgstrService attWagaRgstrService; @Autowired private BisInspGrwService bisInspGrwService; @Autowired private BisInspKeyRegisterService bisInspKeyRegisterService; @Autowired private BisInspVillRgstrService bisInspVillRgstrService; @Autowired private BisInspWtdstDao bisInspWtdstDao; @Autowired private BisInspWtdstTrackServiceImpl bisInspWtdstTrackServiceImpl; @Autowired private BisInspSelAreaDao bisInspSelAreaDao; @Autowired private BisInspAllRlationDao bisInspAllRlationDao; @Autowired private BisInspAllDao bisInspAllDao; @Autowired private AttRsBaseCrrctDao attRsBaseCrrctDao; //稽察项目基本信息表 @Autowired private TacAttPawpBaseDao tacAttPawpBaseDao; //稽察项目登记表 @Autowired private TacPawpRgstrDao tacPawpRgstrDao; //专业稽察工作底稿 @Autowired private TacPawpListDao tacPawpListDao; //查阅的资料目录 @Autowired private TacPawpDrmDao tacPawpDrmDao; //前期与设计基本情况表 @Autowired private TacPawpPdbstDao tacPawpPdbstDao; //建设管理基本情况表-项目法人责任制-TAC_PAWP_BSTOCM_PLPRS @Autowired private TacPawpBstocmPlprsDao tacPawpBstocmPlprsDao; //建设管理基本情况表-招标投标制-TAC_PAWP_BSTOCM_TSOPBFP @Autowired private TacPawpBstocmTsopbfpDao tacPawpBstocmTsopbfpDao; //建设管理基本情况表-招标投标制-标段-TAC_PAWP_BSTOCM_TSOPBFP_SCTN @Autowired private TacPawpBstocmTsopbfpSctnDao tacPawpBstocmTsopbfpSctnDao; //建设管理基本情况表-建设监理制-TAC_PAWP_BSTOCM_CPSS @Autowired private TacPawpBstocmCpssDao tacPawpBstocmCpssDao; //建设监理单位与标段关系表-TAC_PAWP_BSTOCM_SCTN @Autowired private TacPawpBstocmSctnDao tacPawpBstocmSctnDao; //建设管理基本情况表-合同管理制-TAC_PAWP_BSTOCM_CMS @Autowired private TacPawpBstocmCmsDao tacPawpBstocmCmsDao; //建设管理基本情况表-合同管理制-合同列表-TAC_PAWP_BSTOCM_CMS_PACT_LIST @Autowired private TacPawpBstocmCmsPactListDao tacPawpBstocmCmsPactListDao; //计划下达与执行基本情况表-TAC_PAWP_RAIOBIS @Autowired private TacPawpRaiobisDao tacPawpRaiobisDao; //资金使用与管理基本情况表-TAC_PAWP_BIOFUAM @Autowired private TacPawpBiofuamDao tacPawpBiofuamDao; //工程质量基本情况表--质量管理体制-TAC_PAWP_BITOPQ_QMS @Autowired private TacPawpBitopqQmsDao tacPawpBitopqQmsDao; //工程质量基本情况表--质量管理体制--体制列表-TAC_PAWP_BITOPQ_QMS_LIST //工程质量基本情况表--工程实体质量与验收-TAC_PAWP_BITOPQ_PEQAA @Autowired private TacPawpBitopqPeqaaDao tacPawpBitopqPeqaaDao; //工程安全基本情况表--项目法人-TAC_PAWP_BIOES_PE @Autowired private TacPawpBioesPeDao tacPawpBioesPeDao; //工程安全基本情况表--施工单位-TAC_PAWP_BIOES_RWUNIT @Autowired private TacPawpBioesRwunitDao tacPawpBioesRwunitDao; //稽察问题信息表-TAC_PBLM_INFO @Autowired private TacPawpBstocmCpssInfoDao tacPawpBstocmCpssInfoDao; @Autowired private AttFscBaseDao attFscBaseDao; @Autowired private BisInspFscRgstrDao bisInspFscRgstrDao; @Autowired private AttOtherBaseDao attOtherBaseDao; @Autowired private AttSdBaseDao sdBaseDao; @Autowired private BisInspOtherRgstrDao bisInspOtherRgstrDao; @Autowired private BisInspSdRgstrDao bisInspSdRgstrDao; @Autowired private BisInspSwhsRgstrDao swhsRgstrDao; //安全保障达标落实情况 @Autowired private BisInspSwhsRgstrSafetyDao swhsRgstrSafetyDao; //保护措施监管情况 @Autowired private BisInspSwhsRgstrMeasuresDao swhsRgstrMeasuresDao; //地级行政区应急备用水源建设情况 @Autowired private BisInspSwhsRgstrWaterDao swhsRgstrWaterDao; @Autowired private AttSwhsBaseDao swhsBaseDao; //取水用户 @Autowired private BisInspWiuRgstrDao wiuRgstrDao; //取水单位取用水情况 @Autowired private BisInspWiuRgstrIntInfoDao wiuRgstrIntInfoDao; //取水许可审批监管情况 @Autowired private BisInspWiuRgstrApprInfoDao wiuRgstrApprInfoDao; @Autowired private AttWiuBaseDao wiuBaseDao; @Autowired private BisInspOrgDao bisInspOrgDao; //行政区划取水量 @Autowired private BisInspWintRgstrDao wintRgstrDao; //行政区填报表 @Autowired private BisInspWintRgstrIntInfoDao wintRgstrIntInfoDao; @Autowired private AttAdXBaseDao attAdXBaseDao; @Autowired private BisInspSvwtAreaRgstrDao svwtAreaRgstrDao; @Autowired private BisInspSvwtAreaRgstrWseDao svwtAreaWseDao; @Autowired private BisInspSvwtAreaRgstrWswmDao svwtAreaWswmDao; @Autowired private BisInspSvwtWuntRgstrDao svwtWuntRgstrDao; @Autowired private BisInspSvwtWuntRgstrWuuswDao svwtWuntWuuswDao; @Autowired private BisInspSvwtWuntRgstrWsuswDao svwtWuntWsuswDao; @Autowired private AttWuntBaseDao wuntBaseDao; @Autowired private BisInspAllRlationPersDao bisInspAllRlationPersDao; @Autowired private AttGrwBaseDao grwBaseDao; @Autowired private OlBisInspOrgService inspOrgService; @Autowired private AttPrdCstrProjBaseDao attPrdCstrProjBaseDao; @Autowired private BisInspOprdCstrProjRgstrDao oprdCstrProjRgstrDao; @Autowired private BisInspRsmlRgstrDao bisInspRsmlRgstrDao; @Autowired private BisInspRsmlRgstrPresDao bisInspRsmlRgstrPresDao; @Autowired private BisInspRsmlRgstrProjectDao bisInspRsmlRgstrProjectDao; @Autowired private BisInspRsmlRgstrRunManageDao bisInspRsmlRgstrRunManageDao; @Autowired private BisInspRsraqgRgstrService bisInspRsraqgRgstrService; @Autowired private BisInspRsraqgRgstrCityService bisInspRsraqgRgstrCityService; @Autowired private BisInspRsraqgRgstrCountyService bisInspRsraqgRgstrCountyService; @Autowired private BisInspStndRgstrService bisInspStndRgstrService; @Autowired private BisZhejiangJgRgstrDao bisZhejiangJgRgstrDao; @Autowired private BisZhejiangJgRgstrService bisZhejiangJgRgstrService; @Autowired private BisInspRsfcoRgstrService bisInspRsfcoRgstrService; @Autowired private BisInspMfdpRgstrService bisInspMfdpRgstrService; @Autowired private BisInspRsfcoRgstrBaseDao bisInspRsfcoRgstrBaseDao; @Autowired private BisInspRsfcoRgstrFlliDao bisInspRsfcoRgstrFlliDao; @Autowired private BisInspRsfcoRgstrAoeparoDao bisInspRsfcoRgstrAoeparoDao; @Autowired private AttZhejiangJgBaseDao attZhejiangJgBaseDao; */ /** * 根据用户信息与督查计划类型获取该用户可示可管理的单一机构的所有批次 * * @param persid * @param ptype * @return *//* @Override public List getNodeByPersid(String persid, String ptype, String orgId) { BisInspAllRlationPersDto bisInspAllRlationPersDto = this.supervisionPlanDao.getPersInfo(persid); String orgIdStr = AdCodeLabel.START_PARENT_ADCODE + ptype + bisInspAllRlationPersDto.getOrgId(); if (ptype.length() == 2) { orgIdStr = "0" + ptype + bisInspAllRlationPersDto.getOrgId(); } if (ptype.length() == 3) { orgIdStr = ptype + bisInspAllRlationPersDto.getOrgId(); } List listTemp = this.supervisionPlanDao.getNodeByOrgId(orgIdStr, orgId, inspOrgService.getProvince(orgId)); return listTemp; } */ /** * 获取督查组相关的对象、人员、区域信息(新) * * @param persid * @param inspYear * @param inspMnth * @param orgId * @return *//* @Override public List getAllInfoByPersidAndOrgId(String persid, String inspYear, String inspMnth, String orgId) { String orgIdStr = "___" + orgId; //获取所有组 List persAllInfoDtoList = this.supervisionPlanDao.getAllInfoByPersidAndOrgId(persid, inspYear, inspMnth, orgIdStr, orgId, inspOrgService.getProvince(orgId)); if (persAllInfoDtoList.size() > 0) { for (PersAllInfoDto p : persAllInfoDtoList) { String province = inspOrgService.getProvince(p.getOrgId()); p.setPtype(String.valueOf(Integer.valueOf(p.getPtype()))); //获取人员 List persAllDtoList = this.supervisionPlanDao.getPersAllDtoList(p.getId(), p.getOrgId(), province); //获取督查对象 List persAllObjDtoList = this.supervisionPlanDao.getPersAllObjDtoList(p.getId(), p.getOrgId(), province); //获取分工区域 List persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(p.getId(), p.getOrgId(), province); p.setPersAllDtoList(persAllDtoList); p.setPersAllObjDtoList(persAllObjDtoList); p.setPersAllAreaDtoList(persAllAreaDtoList); } } return persAllInfoDtoList; } */ /** * 查询不在该督查组下的水库 * * @param inGroupResParam * @return *//* @Override public PageInfo getSupResByGroup(InGroupResParam inGroupResParam) { if (StringUtils.isNotBlank(inGroupResParam.getAdcd())) { String adCode = this.getAdCodeLike("1", inGroupResParam.getAdcd()); inGroupResParam.setAdcd(adCode); } PageHelper.startPage(inGroupResParam.getPageNum(), inGroupResParam.getPageSize()); List attGrwBaseList = this.supervisionPlanDao.getSupResByGroup(inGroupResParam); PageInfo pageInfo = new PageInfo(attGrwBaseList); return pageInfo; } */ /** * 查询不在督查组督查范围内的督查对象(人饮、水毁、水利工程建设、地下水、水闸、水利工程运行、稽察项目) * * @param inspObjParam * @return *//* @Override public Object getSupObjListNotInspGroupId(InspObjParam inspObjParam) { //设置分页 PageHelper.startPage(inspObjParam.getPageNum(), inspObjParam.getPageSize()); String adCode = this.getAdCodeLike(inspObjParam.getObjType(), inspObjParam.getAdCode()); String province = inspObjParam.getProvince(); inspObjParam.setProvince(province); if ("1".equalsIgnoreCase(inspObjParam.getObjType()) || "36".equalsIgnoreCase(inspObjParam.getObjType())) { //小水库或者 36类型 或者 小水库标准化 InGroupResParam inGroupResParam = new InGroupResParam(); inGroupResParam.setAdcd(inspObjParam.getAdCode()); inGroupResParam.setAdnm(inspObjParam.getAdName()); inGroupResParam.setEngScal(inspObjParam.getEngScal()); inGroupResParam.setGroupId(inspObjParam.getInspGroupId()); inGroupResParam.setRsName(inspObjParam.getNm()); inGroupResParam.setOrderBy(inspObjParam.getOrderBy()); inGroupResParam.setState(inspObjParam.getState()); inGroupResParam.setPageSize(inspObjParam.getPageSize()); inGroupResParam.setPageNum(inspObjParam.getPageNum()); inGroupResParam.setAdcd(adCode); inGroupResParam.setProvince(province); inGroupResParam.setpType(inspObjParam.getObjType()); inGroupResParam.setHstInsp(inspObjParam.getHstInsp()); List attGrwBaseList = this.supervisionPlanDao.getSupResByGroup(inGroupResParam); PageInfo pageInfo = new PageInfo(attGrwBaseList); return pageInfo; } else if (BisInspEnum.RSML.getValue().equals(inspObjParam.getObjType())) { InGroupResParam inGroupResParam = new InGroupResParam(); inGroupResParam.setAdcd(inspObjParam.getAdCode()); inGroupResParam.setAdnm(inspObjParam.getAdName()); inGroupResParam.setEngScal(inspObjParam.getEngScal()); inGroupResParam.setGroupId(inspObjParam.getInspGroupId()); inGroupResParam.setRsName(inspObjParam.getNm()); inGroupResParam.setOrderBy(inspObjParam.getOrderBy()); inGroupResParam.setState(inspObjParam.getState()); inGroupResParam.setPageSize(inspObjParam.getPageSize()); inGroupResParam.setPageNum(inspObjParam.getPageNum()); inGroupResParam.setAdcd(adCode); inGroupResParam.setpType(inspObjParam.getObjType()); inGroupResParam.setProvince(province); List attGrwBaseList = this.supervisionPlanDao.getSupResRsmlByGroup(inGroupResParam); PageInfo pageInfo = new PageInfo(attGrwBaseList); return pageInfo; } else if (BisInspEnum.STND.getValue().equals(inspObjParam.getObjType())) { //小水库或者 36类型 或者 小水库标准化 InGroupResParam inGroupResParam = new InGroupResParam(); inGroupResParam.setAdcd(inspObjParam.getAdCode()); inGroupResParam.setAdnm(inspObjParam.getAdName()); inGroupResParam.setEngScal(inspObjParam.getEngScal()); inGroupResParam.setGroupId(inspObjParam.getInspGroupId()); inGroupResParam.setRsName(inspObjParam.getNm()); inGroupResParam.setOrderBy(inspObjParam.getOrderBy()); inGroupResParam.setState(inspObjParam.getState()); inGroupResParam.setPageSize(inspObjParam.getPageSize()); inGroupResParam.setPageNum(inspObjParam.getPageNum()); inGroupResParam.setAdcd(adCode); inGroupResParam.setProvince(province); inGroupResParam.setpType(inspObjParam.getObjType()); inGroupResParam.setHstInsp(inspObjParam.getHstInsp()); List attGrwBaseList = this.supervisionPlanDao.getSupResStndByGroup(inGroupResParam); PageInfo pageInfo = new PageInfo(attGrwBaseList); return pageInfo; } else if (BisInspEnum.VILL.getValue().equalsIgnoreCase(inspObjParam.getObjType()) ||BisInspEnum.VILLZHEJIANG.getValue().equals(inspObjParam.getObjType())|| BisInspEnum.VILL2020.getValue().equalsIgnoreCase(inspObjParam.getObjType()) || BisInspEnum.MFDP.getValue().equals(inspObjParam.getObjType()) || BisInspEnum.IRR.getValue().equals(inspObjParam.getObjType()) ) { if (StringUtils.isNotBlank(inspObjParam.getAdCode())) { adCode = inspObjParam.getAdCode().replace("00", ""); if (adCode.length() == 2) { adCode = adCode + "____000000"; } else if (adCode.length() == 4) { adCode = adCode + "__000000"; } else { adCode = adCode + "000000"; } } else { adCode = "______000000"; inspObjParam.setAdCode(adCode); } List result = supervisionPlanDao.getSupCwsListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getAdName() , adCode, inspObjParam.getNm(), inspObjParam.getOrderBy()); return new PageInfo(result); } else if (BisInspEnum.TRACK.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { List result = supervisionPlanDao.getSupWtdListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getWtdstType() , inspObjParam.getWtdstNm(), inspObjParam.getWtdstState(), adCode, inspObjParam.getNm(), inspObjParam.getOrderBy()); return new PageInfo(result); } else if (BisInspEnum.EMPWT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//172重点工程 List result = supervisionPlanDao.getSupEmpListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(), inspObjParam.getNm(), adCode, "2", inspObjParam.getOrderBy(), inspObjParam.getOrgId(), province); return new PageInfo(result); } else if (BisInspEnum.GRW.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//地下水 List result = supervisionPlanDao.getSupGrwListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(), inspObjParam.getNm(), adCode, inspObjParam.getOrderBy(), inspObjParam.getSttp(), inspObjParam.getGateType(), inspObjParam.getOrgId(), province); return new PageInfo(result); } else if (BisInspEnum.WAGA.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//水闸 inspObjParam.setAdCode(adCode); inspObjParam.setProvince(province); List result = supervisionPlanDao.getSupWagaListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.EMPWTRUN.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//172重点工程运行 List result = supervisionPlanDao.getSupEmpListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(), inspObjParam.getNm(), adCode, "1", inspObjParam.getOrderBy(), inspObjParam.getOrgId(), province); return new PageInfo(result); } else if (BisInspEnum.PAWP.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//稽察项目 inspObjParam.setAdCode(adCode); inspObjParam.setProvince(province); List result = supervisionPlanDao.getSupPawpListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.FSC.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSupFscListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.OTHER.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSupOtherListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.SD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSupSdListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.WIU.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSupWiuListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.SWHS.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSupSwhsListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.CITY.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getAdXBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.SVWT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getAdXBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getWuntListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.PRD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getPrdListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.JSFL.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getJSFLListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.JSWA.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getJSWAListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.ECOFRD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getEcofrdListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.RSFCO.getValue().equals(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getRsBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.RSRAQG.getValue().equalsIgnoreCase(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getAdBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); }else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equalsIgnoreCase(inspObjParam.getObjType())){ inspObjParam.setAdCode(adCode); //获取不在督查组中的对象 List result = supervisionPlanDao.getNotSuperviseGroupObj(inspObjParam); return new PageInfo(result); } else if (BisInspEnum.MFDP.getValue().equals(inspObjParam.getObjType())){ List result = supervisionPlanDao.getSupMfdpListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getAdName() , adCode, inspObjParam.getNm(), inspObjParam.getOrderBy()); return new PageInfo(result); } else if (BisInspEnum.RSFCO.getValue().equals(inspObjParam.getObjType())) { inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getRsBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); }else if(BisInspEnum.SAP.getValue().equalsIgnoreCase(inspObjParam.getObjType())){ inspObjParam.setAdCode(adCode); List result = supervisionPlanDao.getSapBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); } else if(BisInspEnum.EFP.getValue().equals(inspObjParam.getObjType())) { List result = supervisionPlanDao.getEfpBaseListNotInspGroupId(inspObjParam); return new PageInfo(result); } return null; } public String getAdCodeLike(String objType, String ad) { String adCode = ""; if (StringUtils.isNotBlank(ad)) { String eName = "AD_CODE"; if ("1".equals(objType) || "22".equals(objType) || "24".equals(objType) || BisInspEnum.RSFCO.getValue().equals(objType)) { eName = "ADM_DIV"; } else if ("3".equals(objType)) { eName = "LOC_AD"; } else if ("5".equals(objType)) { eName = "ADCD"; } else { eName = "AD_CODE"; } if (ad.contains(SplitValue.DOUHAO_SPLIT)) {//如果有多个行政区划编码,要根据逗号分隔截取 StringBuffer stringBuffer = new StringBuffer(); String[] split = ad.split(SplitValue.DOUHAO_SPLIT); for (String s : split) {//拼接sql,对多个截取后的行政区划进行模糊查询 String subAd = AdLevelUtil.SubAd(s).get("subAd").toString(); stringBuffer.append(subAd); stringBuffer.append("%"); stringBuffer.append("' OR " + eName + " LIKE '"); } //将最后的“ OR ADM_DIV LIKE ”截掉 String substring = stringBuffer.substring(0, stringBuffer.length() - 18); substring = "(" + eName + " LIKE '" + substring + ")"; adCode = substring; } else { String subAd = AdLevelUtil.SubAd(ad).get("subAd").toString(); subAd = eName + " LIKE '" + subAd + "%'"; adCode = subAd; } } return adCode; } @Override public SupInsertResult insertSupervisionObj(PersAllInfoDto persAllInfoDto) { SupInsertResult supInsertResult = new SupInsertResult(); String province = inspOrgService.getProvince(persAllInfoDto.getOrgId()); if (persAllInfoDto != null) { //修改督查组名称 if (StringUtils.isNotBlank(persAllInfoDto.getNm()) || StringUtils.isNotBlank(persAllInfoDto.getSttm()) || StringUtils.isNotBlank(persAllInfoDto.getEntm())) { BisInspAllDto bisInspAllDto = new BisInspAllDto(); bisInspAllDto.setId(persAllInfoDto.getId()); bisInspAllDto.setPid(persAllInfoDto.getPid()); bisInspAllDto.setPnm(persAllInfoDto.getNm()); bisInspAllDto.setPsn(persAllInfoDto.getPsn()); bisInspAllDto.setOrgId(persAllInfoDto.getOrgId()); bisInspAllDto.setInspTask(persAllInfoDto.getInspTask()); bisInspAllDto.setSttm(persAllInfoDto.getSttm()); bisInspAllDto.setEntm(persAllInfoDto.getEntm()); bisInspAllDto.setInspYear(persAllInfoDto.getInspYear()); bisInspAllDto.setInspMnth(persAllInfoDto.getInspMnth()); this.supervisionPlanDao.updateNode(bisInspAllDto); } //添加督查组人员 if (persAllInfoDto.getPersAllDtoList() != null && persAllInfoDto.getPersAllDtoList().size() > 0) { for (PersAllDto pers : persAllInfoDto.getPersAllDtoList()) { this.supervisionPlanDao.insertPers(persAllInfoDto.getId(), pers.getGuid(), pers.getPersType(), persAllInfoDto.getOrgId(), persAllInfoDto.getProvince()); } } //添加督查对象 if (persAllInfoDto.getPersAllObjDtoList() != null && persAllInfoDto.getPersAllObjDtoList().size() > 0) { OlBisInspOrg inspOrg = inspOrgService.get(persAllInfoDto.getOrgId()); String adCode = inspOrg.getRlcode(); for (PersAllObjDto persObj : persAllInfoDto.getPersAllObjDtoList()) { String type = persObj.getPtype(); if (type.length() == 1) { type = "00" + type; } if (type.length() == 2) { type = "0" + type; } //查询经纬度 LgtdAndLttd ld = this.supervisionPlanDao.getLgtdAndLttd(persObj.getCode(), type); String uuid = UuidUtil.uuid(); BisInspAllObj bisInspAllObj = new BisInspAllObj(); bisInspAllObj.setCode(persObj.getCode()); bisInspAllObj.setId(persAllInfoDto.getId()); bisInspAllObj.setNm(persObj.getName()); if (ld != null) { bisInspAllObj.setLgtd(ld.getLgtd()); bisInspAllObj.setLttd(ld.getLttd()); bisInspAllObj.setLgtdpc(ld.getLgtdPc()); bisInspAllObj.setLttdpc(ld.getLttdPc()); } bisInspAllObj.setObjId(uuid); bisInspAllObj.setPtype(persObj.getPtype()); if (!adCode.startsWith(AdCodeLabel.START_PARENT_ADCODE)) { bisInspAllObj.setAdCode(adCode); bisInspAllObj.setOrgId(persAllInfoDto.getOrgId()); } bisInspAllObj.setProvince(province); this.bisInspAllObjDao.insert(bisInspAllObj); //添加督查对象 //添加到登记表 //水库 if (BisInspEnum.REVER.getValue().equals(persObj.getPtype()) || BisInspEnum.BIGREVR.getValue().equals(persObj.getPtype())) { AttRsBaseParam baseParam = new AttRsBaseParam(); baseParam.setRsCode(bisInspAllObj.getCode()); AttRsBase attRsBase = attRsBaseDao.getBy(baseParam); BisInspRsvrRgstr b = new BisInspRsvrRgstr(); String registrId = UUID.randomUUID().toString().replace(SplitValue.HENG_SPLIT, ""); b.setRgstrId(registrId); b.setObjId(bisInspAllObj.getObjId()); b.setRsCode(attRsBase.getRsCode()); b.setRsvrNm(bisInspAllObj.getNm()); b.setAdCode(attRsBase.getAdmDiv()); b.setOrgId(bisInspAllObj.getOrgId()); b.setRsvrAdmName(attRsBase.getRsAdmName()); if (attRsBase.getDamSizeHig() == null) { b.setDamMaxHigh(null); } else { b.setDamMaxHigh(Double.toString(attRsBase.getDamSizeHig())); } b.setEngScal(attRsBase.getEngScal()); if (StringUtils.isNotBlank(attRsBase.getLocation())) { b.setHystSite(attRsBase.getLocation()); } else { b.setHystSite(attRsBase.getRsLoc()); } if (attRsBase.getCenterYGd() != null) { b.setRsvrLat(Double.parseDouble(attRsBase.getCenterYGd())); } if (attRsBase.getCenterXGd() != null) { b.setRsvrLong(Double.parseDouble(attRsBase.getCenterXGd())); } b.setResCreateTime(attRsBase.getCompDate()); b.setHystSite(attRsBase.getRsLoc()); b.setTotCap(attRsBase.getTotCap()); b.setLocation(attRsBase.getLocation()); b.setDamRegCode(attRsBase.getRegCode()); b.setDamType(attRsBase.getDamType()); b.setHasDamRegCode("1"); b.setState(StateEnum.NOWASTSTATE.getKey()); b.setCompDateStr(attRsBase.getCompDateStr()); b.setPresStat(StateEnum.NOWASTSTATE.getKey()); b.setBaseStat(StateEnum.NOWASTSTATE.getKey()); b.setResRunStat(StateEnum.NOWASTSTATE.getKey()); b.setViewStat(StateEnum.NOWASTSTATE.getKey()); b.setDataStat(StateEnum.NOWASTSTATE.getKey()); b.setRsClass(attRsBase.getRsClass()); b.setImpdDt(attRsBase.getImpdDt()); b.setRnfcImpdDt(attRsBase.getRnfcImpdDt()); b.setDesFlStag(attRsBase.getDesFlStag()); b.setFlConTopStag(attRsBase.getFlConTopStag()); b.setDamType(attRsBase.getDamType()); Date date = new Date(); b.setIntm(date); b.setUptm(date); bisInspRsvrRgstrService.insert(b); } //人饮 else if (BisInspEnum.VILL.getValue().equals(persObj.getPtype())) { BisInspVillRgstr bisInspVillRgstr = new BisInspVillRgstr(); String uuid1 = UuidUtil.uuid(); String now = DateUtils.getTodayYMDHMS(); bisInspVillRgstr.setIntm(now); bisInspVillRgstr.setRecPersId(persAllInfoDto.getPersid()); bisInspVillRgstr.setUptm(now); bisInspVillRgstr.setEngId(uuid1); bisInspVillRgstr.setOrgId(bisInspAllObj.getOrgId()); bisInspVillRgstr.setObjId(bisInspAllObj.getObjId()); bisInspVillRgstr.setRegsNm(bisInspAllObj.getNm()); bisInspVillRgstrService.insert(bisInspVillRgstr); } //水毁 else if (BisInspEnum.TRACK.getValue().equals(persObj.getPtype())) { BisInspWtdstDtoListParam bisInspWtdstDtoListParam = new BisInspWtdstDtoListParam(); bisInspWtdstDtoListParam.setObjId(bisInspAllObj.getObjId()); List list = bisInspWtdstDao.findDtoList(bisInspWtdstDtoListParam); if (list != null && list.size() > 0) { BisInspWtdstDetailDto wtdstDetailDto = list.get(0); BisInspWtdstTrack p = new BisInspWtdstTrack(); String uuid1 = UuidUtil.uuid(); String now = DateUtils.getTodayYMDHMS(); p.setIntm(now); p.setUptm(now); p.setTrackId(uuid1); p.setOrgId(bisInspAllObj.getOrgId()); p.setObjId(wtdstDetailDto.getObjId()); p.setObjNm(wtdstDetailDto.getWtdstNm()); p.setLoac(wtdstDetailDto.getLocNm()); p.setDisContent(wtdstDetailDto.getDisContent()); p.setPlanTm(wtdstDetailDto.getPlanTm()); p.setDataStat("0"); bisInspWtdstTrackServiceImpl.insert(p); } } //水利工程建设 else if (BisInspEnum.EMPWT.getValue().equals(persObj.getPtype())) { BisInspKeyRegister bisInspKeyRegister = new BisInspKeyRegister(); AttEmpwtprjBase attEmpwtprjBase = attEmpwtprjBaseDao.get(bisInspAllObj.getCode()); if (attEmpwtprjBase != null) { bisInspKeyRegister.setPtype(attEmpwtprjBase.getPtype()); bisInspKeyRegister.setAdCode(attEmpwtprjBase.getAdCode()); bisInspKeyRegister.setNm(attEmpwtprjBase.getNm()); bisInspKeyRegister.setStwktm(attEmpwtprjBase.getStwktm()); bisInspKeyRegister.setPlantm(attEmpwtprjBase.getPlantm()); bisInspKeyRegister.setEstapp(Double.parseDouble(attEmpwtprjBase.getEstapp())); bisInspKeyRegister.setLgtd(attEmpwtprjBase.getLgtd()); bisInspKeyRegister.setLttd(attEmpwtprjBase.getLttd()); bisInspKeyRegister.setLgtdPc(attEmpwtprjBase.getLgtdPc()); bisInspKeyRegister.setLttdPc(attEmpwtprjBase.getLttdPc()); bisInspKeyRegister.setOrgId(bisInspAllObj.getOrgId()); bisInspKeyRegister.setUnitId(attEmpwtprjBase.getUnitId()); bisInspKeyRegister.setUnitNm(attEmpwtprjBase.getUnitNm()); bisInspKeyRegister.setObjId(bisInspAllObj.getObjId()); bisInspKeyRegister.setId(UuidUtil.uuid()); bisInspKeyRegister.setIntm(new Date()); bisInspKeyRegister.setUptm(new Date()); bisInspKeyRegister.setRecPersId(persAllInfoDto.getPersid()); bisInspKeyRegister.setDataStat("1"); bisInspKeyRegister.setEngSta(attEmpwtprjBase.getEngSta()); bisInspKeyRegister.setBuidTimeYear(attEmpwtprjBase.getBuidTimeYear()); bisInspKeyRegister.setState(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setSecStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setOneUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setTwoUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setThreeUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegisterService.insert(bisInspKeyRegister); } } //地下水 else if (BisInspEnum.GRW.getValue().equals(persObj.getPtype())) { AttGrwBase attGrwBase = this.bisInspBaseDao.getGroundWaterByCode(bisInspAllObj.getCode()); BisInspGrw b = new BisInspGrw(); b.setId(UUID.randomUUID().toString().replace(SplitValue.HENG_SPLIT, "")); b.setObjId(bisInspAllObj.getObjId()); b.setStcd(bisInspAllObj.getCode()); b.setStnm(bisInspAllObj.getNm()); b.setSttp(attGrwBase.getSttp()); b.setStlc(attGrwBase.getStlc()); Date d = new Date(); SimpleDateFormat df = new SimpleDateFormat(SplitValue.TIME_SPLIT_SEC);//设置日期格式 String format = df.format(d); b.setInTm(format); b.setUpTm(format); b.setFlagValid("1"); b.setInspState(CommonLabel.INIT_DATA); bisInspGrwService.insert(b); } //水闸 else if (BisInspEnum.WAGA.getValue().equals(persObj.getPtype())) {//水闸 String state = StateEnum.NOWASTSTATE.getKey(); AttWagaRgstr wagaRgstr = new AttWagaRgstr(); AttWagaBase wagaBase = wagaBaseDao.get(bisInspAllObj.getCode()); wagaRgstr.setId(UuidUtil.uuid()); wagaRgstr.setSafeStat(state); wagaRgstr.setProenStat(state); wagaRgstr.setMrsCiStat(state); wagaRgstr.setDmamStat(state); wagaRgstr.setLocationXiang(wagaBase.getLocationXiang()); wagaRgstr.setAdCode(wagaBase.getAdCode()); wagaRgstr.setState(state); wagaRgstr.setCenterX(wagaBase.getCenterX()); wagaRgstr.setCenterY(wagaBase.getCenterY()); wagaRgstr.setDataStat(state); wagaRgstr.setEngScal(wagaBase.getEngScal()); wagaRgstr.setGateAdmName(wagaBase.getGateAdmName()); wagaRgstr.setGateFlow(wagaBase.getGateFlow()); wagaRgstr.setGateType(wagaBase.getGateType()); wagaRgstr.setGateName(wagaBase.getGateName()); wagaRgstr.setOrgId(bisInspAllObj.getOrgId()); wagaRgstr.setGdX(wagaBase.getGdX()); wagaRgstr.setGdY(wagaBase.getGdY()); wagaRgstr.setIntm(new Date()); wagaRgstr.setPersId(persAllInfoDto.getPersid()); wagaRgstr.setEngSta(wagaBase.getEngSta()); wagaRgstr.setLocation(wagaBase.getLocationCun()); wagaRgstr.setBuidTimeMon(wagaBase.getBuidTimeMon()); wagaRgstr.setBuidTimeYear(wagaBase.getBuidTimeYear()); wagaRgstr.setStaTimeMon(wagaBase.getStaTimeMon()); wagaRgstr.setStaTimeYear(wagaBase.getStaTimeYear()); wagaRgstr.setObjCode(bisInspAllObj.getCode()); wagaRgstr.setObjId(bisInspAllObj.getObjId()); wagaRgstr.setGateAdmOrg(wagaBase.getLocRvName()); wagaRgstr.setGroupId(persAllInfoDto.getId()); attWagaRgstrService.insert(wagaRgstr); } //水利工程运行 else if (BisInspEnum.EMPWTRUN.getValue().equals(persObj.getPtype())) { BisInspKeyRegister bisInspKeyRegister = new BisInspKeyRegister(); AttEmpwtprjBase attEmpwtprjBase = attEmpwtprjBaseDao.get(bisInspAllObj.getCode()); if (attEmpwtprjBase != null) { bisInspKeyRegister.setPtype(attEmpwtprjBase.getPtype()); bisInspKeyRegister.setAdCode(attEmpwtprjBase.getAdCode()); bisInspKeyRegister.setNm(attEmpwtprjBase.getNm()); bisInspKeyRegister.setId(UuidUtil.uuid()); bisInspKeyRegister.setEngSta(attEmpwtprjBase.getEngSta()); bisInspKeyRegister.setBuidTimeYear(attEmpwtprjBase.getBuidTimeYear()); bisInspKeyRegister.setStwktm(attEmpwtprjBase.getStwktm()); bisInspKeyRegister.setPlantm(attEmpwtprjBase.getPlantm()); bisInspKeyRegister.setEstapp(Double.parseDouble(attEmpwtprjBase.getEstapp())); bisInspKeyRegister.setLgtd(attEmpwtprjBase.getLgtd()); bisInspKeyRegister.setLttd(attEmpwtprjBase.getLttd()); bisInspKeyRegister.setOrgId(bisInspAllObj.getOrgId()); bisInspKeyRegister.setLgtdPc(attEmpwtprjBase.getLgtdPc()); bisInspKeyRegister.setLttdPc(attEmpwtprjBase.getLttdPc()); bisInspKeyRegister.setUnitId(attEmpwtprjBase.getUnitId()); bisInspKeyRegister.setUnitNm(attEmpwtprjBase.getUnitNm()); bisInspKeyRegister.setObjId(bisInspAllObj.getObjId()); bisInspKeyRegister.setIntm(new Date()); bisInspKeyRegister.setUptm(new Date()); bisInspKeyRegister.setDataStat("1");//有效 bisInspKeyRegister.setState(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setSecStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setRecPersId(persAllInfoDto.getPersid()); bisInspKeyRegister.setOneUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setTwoUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegister.setThreeUnitStat(StateEnum.NOWASTSTATE.getKey()); bisInspKeyRegisterService.insert(bisInspKeyRegister); } } //稽察项目 else if (BisInspEnum.PAWP.getValue().equals(persObj.getPtype())) { TacAttPawpBase tacAttPawpBase = tacAttPawpBaseDao.get(bisInspAllObj.getCode()); TacPawpRgstr tacPawpRgstr = new TacPawpRgstr(); String uuid1 = UuidUtil.uuid(); tacPawpRgstr.setId(uuid1); tacPawpRgstr.setObjId(bisInspAllObj.getObjId()); tacPawpRgstr.setName(tacAttPawpBase.getName()); tacPawpRgstr.setAdmOrg(tacAttPawpBase.getAdmOrg()); tacPawpRgstr.setAdCode(tacAttPawpBase.getAdCode()); tacPawpRgstr.setLocation(tacAttPawpBase.getLocation()); tacPawpRgstr.setType(tacAttPawpBase.getType()); tacPawpRgstr.setCenterX(tacAttPawpBase.getCenterX()); tacPawpRgstr.setCenterY(tacAttPawpBase.getCenterY()); tacPawpRgstr.setGdX(tacAttPawpBase.getGdX()); tacPawpRgstr.setGdY(tacAttPawpBase.getGdY()); tacPawpRgstr.setProvince(province); tacPawpRgstr.setOrgId(bisInspAllObj.getOrgId()); tacPawpRgstr.setGroupId(bisInspAllObj.getId()); tacPawpRgstr.setState("0"); tacPawpRgstr.setDataStat("0"); tacPawpRgstrDao.insert(tacPawpRgstr); } else if (BisInspEnum.FSC.getValue().equals(persObj.getPtype())) { AttFscBase attFscBase = attFscBaseDao.get(bisInspAllObj.getCode()); BisInspFscRgstr fscRgstr = new BisInspFscRgstr(attFscBase); fscRgstr.setId(UuidUtil.uuid()); fscRgstr.setObjId(bisInspAllObj.getObjId()); fscRgstr.setName(attFscBase.getName()); fscRgstr.setAdmOrg(attFscBase.getAdmOrg()); fscRgstr.setAdCode(attFscBase.getAdCode()); fscRgstr.setLocation(attFscBase.getLocation()); fscRgstr.setType(attFscBase.getType()); fscRgstr.setCenterX(attFscBase.getCenterX()); fscRgstr.setCenterY(attFscBase.getCenterY()); fscRgstr.setGdX(attFscBase.getGdX()); fscRgstr.setGdY(attFscBase.getGdY()); fscRgstr.setGroupId(bisInspAllObj.getId()); fscRgstr.setProvince(province); fscRgstr.setState("0"); fscRgstr.setDataStat("0"); fscRgstr.setInTm(new Date()); fscRgstr.setUpTm(new Date()); bisInspFscRgstrDao.insert(fscRgstr); } else if (BisInspEnum.OTHER.getValue().equals(persObj.getPtype())) { AttOtherBase attOtherBase = attOtherBaseDao.get(bisInspAllObj.getCode()); BisInspOtherRgstr otherRgstr = new BisInspOtherRgstr(attOtherBase); otherRgstr.setId(UuidUtil.uuid()); otherRgstr.setObjId(bisInspAllObj.getObjId()); otherRgstr.setName(attOtherBase.getName()); otherRgstr.setAdmOrg(attOtherBase.getAdmOrg()); otherRgstr.setAdCode(attOtherBase.getAdCode()); otherRgstr.setLocation(attOtherBase.getLocation()); otherRgstr.setType(attOtherBase.getType()); otherRgstr.setCenterX(attOtherBase.getCenterX()); otherRgstr.setCenterY(attOtherBase.getCenterY()); otherRgstr.setGdX(attOtherBase.getGdX()); otherRgstr.setProvince(province); otherRgstr.setGdY(attOtherBase.getGdY()); otherRgstr.setGroupId(bisInspAllObj.getId()); otherRgstr.setState("0"); otherRgstr.setDataStat("0"); otherRgstr.setInTm(new Date()); otherRgstr.setUpTm(new Date()); bisInspOtherRgstrDao.insert(otherRgstr); } else if (BisInspEnum.SD.getValue().equals(persObj.getPtype())) { AttSdBase base = sdBaseDao.get(bisInspAllObj.getCode()); BisInspSdRgstr rgstr = new BisInspSdRgstr(); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setSdCode(base.getSdCode()); rgstr.setSdName(base.getSdName()); rgstr.setSdType(base.getSdType()); rgstr.setSdTypeStr(base.getSdTypeStr()); rgstr.setConArea(base.getConArea()); rgstr.setTotCap(base.getTotCap()); rgstr.setSdrCap(base.getSdrCap()); rgstr.setFlcoYear(base.getFlcoYear()); rgstr.setWarpCap(base.getWarpCap()); rgstr.setDamSizeHig(base.getDamSizeHig()); rgstr.setDamTopLen(base.getDamTopLen()); rgstr.setProvince(province); rgstr.setAdCode(base.getAdCode()); rgstr.setSdLoc(base.getSdLoc()); rgstr.setCenterX(base.getCenterX()); rgstr.setCenterY(base.getCenterY()); rgstr.setGdX(base.getGdX()); rgstr.setGdY(base.getGdY()); rgstr.setAsinttds(base.getAsinttds()); rgstr.setNoSpway(base.getNoSpway()); rgstr.setDamTear(base.getDamTear()); rgstr.setDamLandSubSide(base.getDamLandSubSide()); rgstr.setDamRsog(base.getDamRsog()); rgstr.setDamLopc(base.getDamLopc()); rgstr.setDsLts(base.getDsLts()); rgstr.setDsCc(base.getDsCc()); rgstr.setDsOc(base.getDsOc()); rgstr.setFrsMar(base.getFrsMar()); rgstr.setFrsTbd(base.getFrsTbd()); rgstr.setFrsOth(base.getFrsOth()); rgstr.setNote(base.getNote()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); bisInspSdRgstrDao.insert(rgstr); } else if (BisInspEnum.WIU.getValue().equals(persObj.getPtype())) { AttWiuBase base = wiuBaseDao.get(bisInspAllObj.getCode()); BisInspWiuRgstr rgstr = new BisInspWiuRgstr(); BeanUtil.copyObject1(base, rgstr); rgstr.setWiuId(base.getId()); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setProvince(province); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); wiuRgstrDao.insert(rgstr); } else if (BisInspEnum.SWHS.getValue().equals(persObj.getPtype())) { AttSwhsBase base = swhsBaseDao.get(bisInspAllObj.getCode()); BisInspSwhsRgstr rgstr = new BisInspSwhsRgstr(); BeanUtil.copyObject1(base, rgstr); rgstr.setCenterX(base.getSwhsLong()); rgstr.setCenterY(base.getSwhsLat()); rgstr.setGdX(base.getSwhsLongGd()); rgstr.setGdY(base.getSwhsLatGd()); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setSwhsId(base.getId()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setProvince(province); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); swhsRgstrDao.insert(rgstr); } else if (BisInspEnum.CITY.getValue().equals(persObj.getPtype())) { AttAdXBase base = attAdXBaseDao.get(persObj.getCode()); BisInspWintRgstr rgstr = new BisInspWintRgstr(); BeanUtil.copyObject1(base, rgstr); rgstr.setGdX(base.getLgtd()); rgstr.setGdY(base.getLttd()); rgstr.setPcX(base.getLgtdpc()); rgstr.setPcY(base.getLttdpc()); rgstr.setLoc(base.getAdFullName()); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setProvince(province); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); wintRgstrDao.insert(rgstr); } else if (BisInspEnum.SVWT.getValue().equals(persObj.getPtype())) { AttAdXBase base = attAdXBaseDao.get(persObj.getCode()); BisInspSvwtAreaRgstr rgstr = new BisInspSvwtAreaRgstr(); BeanUtil.copyObject1(base, rgstr); rgstr.setGdX(base.getLgtd()); rgstr.setGdY(base.getLttd()); if (base.getLgtd() != null && base.getLttd() != null) { Map params = GeoUtil.gcj02towgs84(base.getLgtd(), base.getLttd()); rgstr.setPcX(params.get("lon")); rgstr.setPcY(params.get("lat")); } rgstr.setProvince(province); rgstr.setLoc(base.getAdFullName()); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); svwtAreaRgstrDao.insert(rgstr); } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(persObj.getPtype())) { AttWuntBase base = wuntBaseDao.get(persObj.getCode()); BisInspSvwtWuntRgstr rgstr = new BisInspSvwtWuntRgstr(); BeanUtil.copyObject1(base, rgstr); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setState("0"); rgstr.setDataStat("0"); rgstr.setGroupId(bisInspAllObj.getId()); rgstr.setPersId(persAllInfoDto.getPersid()); if (base.getGdX() != null && base.getGdY() != null) { Map params = GeoUtil.gcj02towgs84(base.getGdX(), base.getGdY()); rgstr.setPcX(params.get("lon")); rgstr.setPcY(params.get("lat")); } rgstr.setProvince(province); rgstr.setInTm(new Date()); rgstr.setUpTm(new Date()); svwtWuntRgstrDao.insert(rgstr); } else if (BisInspEnum.PRD.getValue().equalsIgnoreCase(persObj.getPtype())) { AttPrdCstrProjBase prdCstrProjBase = attPrdCstrProjBaseDao.get(bisInspAllObj.getCode()); BisInspOprdCstrProjRgstr oprdCstrProjRgstr = new BisInspOprdCstrProjRgstr(); oprdCstrProjRgstr.setAdCode(prdCstrProjBase.getAdCode()); oprdCstrProjRgstr.setAdName(prdCstrProjBase.getAdName()); oprdCstrProjRgstr.setPersId(persAllInfoDto.getPersid()); oprdCstrProjRgstr.setProvince(province); oprdCstrProjRgstr.setState("0"); oprdCstrProjRgstr.setId(UuidUtil.uuid()); oprdCstrProjRgstr.setInTm(new Date()); oprdCstrProjRgstr.setUpTm(new Date()); oprdCstrProjRgstr.setObjId(bisInspAllObj.getObjId()); oprdCstrProjRgstr.setGroupId(bisInspAllObj.getId()); oprdCstrProjRgstr.setLocation(prdCstrProjBase.getLocation()); oprdCstrProjRgstr.setName(prdCstrProjBase.getName()); oprdCstrProjRgstr.setType(prdCstrProjBase.getType()); if (prdCstrProjBase.getGdX() != null && prdCstrProjBase.getGdY() != null) { Map params = GeoUtil.gcj02towgs84(prdCstrProjBase.getGdX(), prdCstrProjBase.getGdY()); oprdCstrProjRgstr.setCenterX(params.get("lon")); oprdCstrProjRgstr.setCenterY(params.get("lat")); } oprdCstrProjRgstr.setGdX(prdCstrProjBase.getGdX()); oprdCstrProjRgstr.setGdY(prdCstrProjBase.getGdY()); oprdCstrProjRgstrDao.insert(oprdCstrProjRgstr); } else if (BisInspEnum.JSFL.getValue().equalsIgnoreCase(persObj.getPtype())) { AttJskejianFlkdisBase jskejianFlkdisBase = jskejianFlkdisBaseDao.get(bisInspAllObj.getCode()); AttJskejianFlkdisRgstr jskejianFlkdisRgstr = new AttJskejianFlkdisRgstr(); jskejianFlkdisRgstr.setId(UuidUtil.uuid()); jskejianFlkdisRgstr.setAdCode(jskejianFlkdisBase.getAdCode()); jskejianFlkdisRgstr.setAdName(jskejianFlkdisBase.getAdName()); if (jskejianFlkdisBase.getGdX() != null && jskejianFlkdisBase.getGdY() != null) { Map params = GeoUtil.gcj02towgs84(jskejianFlkdisBase.getGdX(), jskejianFlkdisBase.getGdY()); jskejianFlkdisRgstr.setCenterX(params.get("lon")); jskejianFlkdisRgstr.setCenterY(params.get("lat")); } jskejianFlkdisRgstr.setContRvonNameDuty(jskejianFlkdisBase.getContRvonNameDuty()); jskejianFlkdisRgstr.setGdX(jskejianFlkdisBase.getGdX()); jskejianFlkdisRgstr.setGdY(jskejianFlkdisBase.getGdY()); jskejianFlkdisRgstr.setProvince(province); jskejianFlkdisRgstr.setGroupId(bisInspAllObj.getId()); jskejianFlkdisRgstr.setObjId(bisInspAllObj.getObjId()); jskejianFlkdisRgstr.setIntm(new Date()); jskejianFlkdisRgstr.setUptm(new Date()); jskejianFlkdisRgstr.setLocation(jskejianFlkdisBase.getLocation()); jskejianFlkdisRgstr.setName(jskejianFlkdisBase.getName()); jskejianFlkdisRgstr.setPersId(persAllInfoDto.getPersid()); jskejianFlkdisRgstr.setState("0"); jskejianFlkdisRgstr.setTownRvonNameDuty(jskejianFlkdisBase.getTownRvonNameDuty()); jskejianFlkdisRgstr.setVilgRvonNameDuty(jskejianFlkdisBase.getVilgRvonNameDuty()); jskejianFlkdisRgstr.setPblmDesc(jskejianFlkdisBase.getPblmDesc()); jskejianFlkdisRgstr.setPblmType(jskejianFlkdisBase.getPblmType()); jskejianFlkdisRgstr.setRectConc(jskejianFlkdisBase.getRectConc()); jskejianFlkdisRgstrDao.insert(jskejianFlkdisRgstr); } else if (BisInspEnum.JSWA.getValue().equalsIgnoreCase(persObj.getPtype())) { AttJskejianWaterBase jskejianWaterBase = jskejianWaterBaseDao.get(bisInspAllObj.getCode()); AttJskejianWaterRgstr jskejianWaterRgstr = new AttJskejianWaterRgstr(); BeanUtil.copyObject1(jskejianWaterBase, jskejianWaterRgstr); jskejianWaterRgstr.setId(UuidUtil.uuid()); jskejianWaterRgstr.setObjId(bisInspAllObj.getObjId()); jskejianWaterRgstr.setProvince(province); jskejianWaterRgstr.setPersId(persAllInfoDto.getPersid()); jskejianWaterRgstr.setState("0"); if (jskejianWaterBase.getGdX() != null && jskejianWaterBase.getGdY() != null) { Map params = GeoUtil.gcj02towgs84(jskejianWaterBase.getGdX(), jskejianWaterBase.getGdY()); jskejianWaterRgstr.setCenterX(params.get("lon")); jskejianWaterRgstr.setCenterY(params.get("lat")); } jskejianWaterRgstr.setIntm(new Date()); jskejianWaterRgstr.setUptm(new Date()); jskejianWaterRgstrDao.insert(jskejianWaterRgstr); } else if (BisInspEnum.ECOFRD.getValue().equalsIgnoreCase(persObj.getPtype())) { AttJskejianEcofrdBase jskejianEcofrdBase = jskejianEcofrdBaseDao.get(bisInspAllObj.getCode()); AttJskejianEcofrdRgstr rgstr = new AttJskejianEcofrdRgstr(); BeanUtil.copyObject1(jskejianEcofrdBase, rgstr); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setProvince(province); rgstr.setPersId(persAllInfoDto.getPersid()); rgstr.setState("0"); if (jskejianEcofrdBase.getGdX() != null && jskejianEcofrdBase.getGdY() != null) { Map params = GeoUtil.gcj02towgs84(jskejianEcofrdBase.getGdX(), jskejianEcofrdBase.getGdY()); rgstr.setCenterX(params.get("lon")); rgstr.setCenterY(params.get("lat")); } rgstr.setIntm(new Date()); rgstr.setUptm(new Date()); jskejianEcofrdRgstrDao.insert(rgstr); } else if (BisInspEnum.RSML.getValue().equals(persObj.getPtype())) { AttRsBaseParam baseParam = new AttRsBaseParam(); baseParam.setRsCode(bisInspAllObj.getCode()); AttRsBase attRsBase = attRsBaseDao.getBy(baseParam); BisInspRsmlRgstr rgstr = new BisInspRsmlRgstr(); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setRsCode(attRsBase.getRsCode()); rgstr.setRsName(bisInspAllObj.getNm()); rgstr.setAdCode(attRsBase.getAdmDiv()); rgstr.setOrgId(bisInspAllObj.getOrgId()); rgstr.setRsAdmCode(attRsBase.getRsAdmCode()); rgstr.setRsAdmName(attRsBase.getRsAdmName()); rgstr.setDamSizeHig(attRsBase.getDamSizeHig()); rgstr.setEngScal(attRsBase.getEngScal()); rgstr.setLocation(attRsBase.getLocation()); rgstr.setDamType(attRsBase.getDamType()); rgstr.setTotCap(attRsBase.getTotCap()); rgstr.setDesFlStag(attRsBase.getDesFlStag()); rgstr.setImpdDt(attRsBase.getImpdDt()); rgstr.setRnfcImpdDt(attRsBase.getRnfcImpdDt()); rgstr.setResCreateTime(attRsBase.getCompDate()); rgstr.setPresState(StateEnum.NOWASTSTATE.getKey()); rgstr.setProjectState(StateEnum.NOWASTSTATE.getKey()); rgstr.setRunManageState(StateEnum.NOWASTSTATE.getKey()); rgstr.setHasDamRegCode("1"); rgstr.setDamRegCode(attRsBase.getRegCode()); rgstr.setHystSite(attRsBase.getRsLoc()); if (attRsBase.getCenterX() != null) { rgstr.setCenterX(Double.parseDouble(attRsBase.getCenterX())); } if (attRsBase.getCenterY() != null) { rgstr.setCenterY(Double.parseDouble(attRsBase.getCenterY())); } if (attRsBase.getCenterXGd() != null) { rgstr.setGdX(Double.parseDouble(attRsBase.getCenterXGd())); } if (attRsBase.getCenterYGd() != null) { rgstr.setGdY(Double.parseDouble(attRsBase.getCenterYGd())); } rgstr.setRsClass(attRsBase.getRsClass()); rgstr.setState(StateEnum.NOWASTSTATE.getKey()); Date date = new Date(); rgstr.setIntm(date); rgstr.setUptm(date); rgstr.setImpdDt(attRsBase.getImpdDt()); rgstr.setRnfcImpdDt(attRsBase.getRnfcImpdDt()); rgstr.setDesFlStag(attRsBase.getDesFlStag()); rgstr.setFlConTopStag(attRsBase.getFlConTopStag()); rgstr.setDamType(attRsBase.getDamType()); bisInspRsmlRgstrDao.insert(rgstr); } else if (BisInspEnum.RSRAQG.getValue().equals(persObj.getPtype())) { */ /** * 添加登记表 *//* String rsraqgRgstrId = UuidUtil.uuid(); BisInspRsraqgRgstr bisInspRsraqgRgstr = new BisInspRsraqgRgstr(); bisInspRsraqgRgstr.setId(rsraqgRgstrId); bisInspRsraqgRgstr.setIntm(new Date()); bisInspRsraqgRgstr.setUptm(new Date()); bisInspRsraqgRgstr.setObjId(bisInspAllObj.getObjId()); bisInspRsraqgRgstr.setOrgId(persAllInfoDto.getOrgId()); bisInspRsraqgRgstr.setAdName(bisInspAllObj.getNm()); bisInspRsraqgRgstr.setAdCode(bisInspAllObj.getCode()); bisInspRsraqgRgstr.setGroupId(persAllInfoDto.getId()); bisInspRsraqgRgstr.setGdX(bisInspAllObj.getLgtd()); bisInspRsraqgRgstr.setGdY(bisInspAllObj.getLttd()); bisInspRsraqgRgstr.setPcX(bisInspAllObj.getLgtdpc()); bisInspRsraqgRgstr.setPcY(bisInspAllObj.getLttdpc()); bisInspRsraqgRgstr.setPersId(persAllInfoDto.getPersid()); bisInspRsraqgRgstr.setState("0"); bisInspRsraqgRgstrService.insert(bisInspRsraqgRgstr); //添加登记表下的 市级登记表 BisInspRsraqgRgstrCity bisInspRsraqgRgstrCity = new BisInspRsraqgRgstrCity(); bisInspRsraqgRgstrCity.setRgstrId(rsraqgRgstrId); bisInspRsraqgRgstrCity.setStatus("0"); bisInspRsraqgRgstrCityService.insert(bisInspRsraqgRgstrCity); //取出行政区下的所有县 循环插入 AttAdXBaseParam baseParam = new AttAdXBaseParam(); baseParam.setAdFcode(bisInspAllObj.getCode()); List attAdXBases = attAdXBaseDao.findList(baseParam); for (AttAdXBase attAdXBase : attAdXBases ) { if (attAdXBase.getAdName().equals("市辖区")) { continue; } //增加市下所有县登记表 BisInspRsraqgRgstrCounty bisInspRsraqgRgstrCounty = new BisInspRsraqgRgstrCounty(); bisInspRsraqgRgstrCounty.setRgstrId(rsraqgRgstrId); bisInspRsraqgRgstrCounty.setStatus("0"); bisInspRsraqgRgstrCounty.setAdCode(attAdXBase.getAdCode()); bisInspRsraqgRgstrCounty.setAdName(attAdXBase.getAdName()); bisInspRsraqgRgstrCountyService.insert(bisInspRsraqgRgstrCounty); } } else if (BisInspEnum.STND.getValue().equals(persObj.getPtype())) { */ /** * 添加 小水库标准 登记表 *//* String rsraqgRgstrId = UuidUtil.uuid(); //获取小水库信息 AttRsBaseParam baseParam = new AttRsBaseParam(); baseParam.setRsCode(bisInspAllObj.getCode()); AttRsBase attRsBase = attRsBaseDao.getBy(baseParam); BisInspStndRgstr b = new BisInspStndRgstr(); b.setRgstrId(rsraqgRgstrId); b.setOrgId(bisInspAllObj.getOrgId()); b.setObjId(bisInspAllObj.getObjId()); b.setRsCode(attRsBase.getRsCode()); b.setRsvrNm(bisInspAllObj.getNm()); b.setAdCode(attRsBase.getAdmDiv()); b.setResCreateTime(attRsBase.getCompDate()); b.setEngScal(attRsBase.getEngScal()); b.setTotCap(attRsBase.getTotCap()); b.setHystSite(attRsBase.getRsLoc()); b.setDamRegCode(attRsBase.getRegCode()); b.setDamType(attRsBase.getDamType()); b.setHasDamRegCode(StringUtils.isNotBlank(attRsBase.getRegCode()) ? "1" : "2"); b.setResCreateTimeNote(attRsBase.getCompDateStr()); Date date = new Date(); b.setIntm(date); b.setUptm(date); b.setGroupId(persAllInfoDto.getId()); b.setPersId(persAllInfoDto.getPersid()); b.setState(StateEnum.NOWASTSTATE.getKey()); b.setDataStat(StateEnum.NOWASTSTATE.getKey()); b.setJxDuty(attRsBase.getJxDuty()); b.setJxDutyPhone(attRsBase.getJxDutyPhone()); b.setJxRsvrStndLev(attRsBase.getJxRsvrStndLev()); b.setJxRsvrType(attRsBase.getJxRsvrType()); b.setRsAdmCode(attRsBase.getRsAdmCode()); b.setRsAdmName(attRsBase.getRsAdmName()); b.setAdNm(attRsBase.getLocation()); b.setCenterX(attRsBase.getCenterX() == null ? null : Double.parseDouble(attRsBase.getCenterX())); b.setCenterY(attRsBase.getCenterY() == null ? null : Double.parseDouble(attRsBase.getCenterY())); b.setCenterXGd(attRsBase.getCenterXGd() == null ? null : Double.parseDouble(attRsBase.getCenterXGd())); b.setCenterYGd(attRsBase.getCenterYGd() == null ? null : Double.parseDouble(attRsBase.getCenterYGd())); b.setDamSizeHig(attRsBase.getDamSizeHig()); bisInspStndRgstrService.insert(b); } else if (BisInspEnum.RSFCO.getValue().equals(persObj.getPtype())) { AttRsBaseParam baseParam = new AttRsBaseParam(); baseParam.setRsCode(bisInspAllObj.getCode()); AttRsBase attRsBase = attRsBaseDao.getBy(baseParam); BisInspRsfcoRgstr rgstr = new BisInspRsfcoRgstr(); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setRsCode(attRsBase.getRsCode()); rgstr.setRsName(bisInspAllObj.getNm()); rgstr.setHasDamRegCode("1"); rgstr.setDamRegCode(attRsBase.getRegCode()); rgstr.setAdCode(attRsBase.getAdmDiv()); rgstr.setLocation(attRsBase.getLocation()); rgstr.setHystSite(attRsBase.getRsLoc()); rgstr.setCompDateStr(attRsBase.getCompDateStr()); if (attRsBase.getCenterYGd() != null) { rgstr.setGdY(Double.parseDouble(attRsBase.getCenterYGd())); } if (attRsBase.getCenterXGd() != null) { rgstr.setGdX(Double.parseDouble(attRsBase.getCenterXGd())); } if (attRsBase.getCenterX() != null) { rgstr.setCenterX(Double.parseDouble(attRsBase.getCenterX())); } if (attRsBase.getCenterY() != null) { rgstr.setCenterY(Double.parseDouble(attRsBase.getCenterY())); } rgstr.setRsAdmCode(attRsBase.getRsAdmCode()); rgstr.setRsAdmName(attRsBase.getRsAdmName()); rgstr.setEngScal(attRsBase.getEngScal()); rgstr.setDamType(attRsBase.getDamType()); rgstr.setTotCap(attRsBase.getTotCap()); rgstr.setDamSizeHig(attRsBase.getDamSizeHig()); rgstr.setResCreateTime(attRsBase.getCompDate()); rgstr.setPresState(StateEnum.NOWASTSTATE.getKey()); rgstr.setRunManageState(StateEnum.NOWASTSTATE.getKey()); rgstr.setProjectState(StateEnum.NOWASTSTATE.getKey()); rgstr.setState(StateEnum.NOWASTSTATE.getKey()); Date date = new Date(); rgstr.setIntm(date); rgstr.setUptm(date); bisInspRsfcoRgstrService.insert(rgstr); } else if (BisInspEnum.MFDP.getValue().equals(persObj.getPtype())) { AttAdXBase xBase = attAdXBaseDao.getByCode(bisInspAllObj.getCode()); BisInspMfdpRgstr rgstr = new BisInspMfdpRgstr(); rgstr.setId(UuidUtil.uuid()); rgstr.setObjId(bisInspAllObj.getObjId()); rgstr.setAdCode(bisInspAllObj.getCode()); rgstr.setAdName(bisInspAllObj.getNm()); rgstr.setPoorCountry(xBase.getIsPoveryt()); rgstr.setSitroMsNum(new Long(0)); rgstr.setSitroRxNum(new Long(0)); rgstr.setSitroTownNum(new Long(0)); rgstr.setSitroVlgNum(new Long(0)); rgstr.setState(StateEnum.NOWASTSTATE.getKey()); rgstr.setIntm(new Date()); rgstr.setUptm(new Date()); bisInspMfdpRgstrService.insert(rgstr); } else if (BisInspEnum.VILLZHEJIANG.getValue().equals(persObj.getPtype())) { AttAdXBase attAdXBase = attAdXBaseDao.get(bisInspAllObj.getCode()); BisZhejiangVillRgstr bisNewVillRgstr=new BisZhejiangVillRgstr(); bisNewVillRgstr.setId(UuidUtil.uuid()); bisNewVillRgstr.setPersId(persAllInfoDto.getPersid()); bisNewVillRgstr.setIsPkx(attAdXBase.getIsPoveryt()); bisNewVillRgstr.setObjId(bisInspAllObj.getObjId()); bisNewVillRgstr.setRegsNm(attAdXBase.getAdName()); bisNewVillRgstr.setState("0"); bisNewVillRgstr.setLttdpc(attAdXBase.getLttdpc()); bisNewVillRgstr.setLgtdpc(attAdXBase.getLgtdpc()); bisNewVillRgstr.setLgtd(attAdXBase.getLgtd()); bisNewVillRgstr.setLttd(attAdXBase.getLttd()); bisNewVillRgstr.setAdFullName(attAdXBase.getAdFullName()); bisNewVillRgstr.setAdCode(attAdXBase.getAdCode()); bisNewVillRgstr.setUptm(new Date()); bisNewVillRgstr.setIntm(new Date()); bisZhejiangVillRgstrService.insert(bisNewVillRgstr); } else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equals(persObj.getPtype())){ AttZhejiangJgBase attAdXBase = attZhejiangJgBaseDao.get(bisInspAllObj.getCode()); BisZhejiangJgRgstr bisZhejiangJgRgstr = new BisZhejiangJgRgstr(); bisZhejiangJgRgstr.setId(UuidUtil.uuid()); bisZhejiangJgRgstr.setAdCode(attAdXBase.getAdCode()); bisZhejiangJgRgstr.setAdFullName(attAdXBase.getAdFullName()); bisZhejiangJgRgstr.setLgtd(attAdXBase.getLgtd()); bisZhejiangJgRgstr.setLttd(attAdXBase.getLttd()); bisZhejiangJgRgstr.setLgtdpc(attAdXBase.getLgtdpc()); bisZhejiangJgRgstr.setDepartId(bisInspAllObj.getCode()); bisZhejiangJgRgstr.setLttdpc(attAdXBase.getLttdpc()); bisZhejiangJgRgstr.setState("0"); bisZhejiangJgRgstr.setIntm(new Date()); bisZhejiangJgRgstr.setUptm(new Date()); bisZhejiangJgRgstr.setPersId(persAllInfoDto.getPersid()); bisZhejiangJgRgstr.setObjId(bisInspAllObj.getObjId()); bisZhejiangJgRgstr.setRegsNm(attAdXBase.getDepartNm()); bisZhejiangJgRgstr.setJgState(StateEnum.NOWASTSTATE.getKey()); bisZhejiangJgRgstr.setNote(attAdXBase.getNote()); bisZhejiangJgRgstrService.insert(bisZhejiangJgRgstr); } } } //添加分工区域 if (persAllInfoDto.getPersAllAreaDtoList() != null && persAllInfoDto.getPersAllAreaDtoList().size() > 0) { for (PersAllAreaDto pad : persAllInfoDto.getPersAllAreaDtoList()) { String uuid = UuidUtil.uuid(); this.supervisionPlanDao.insertSupArea(uuid, persAllInfoDto.getId(), pad.getAdCode(), pad.getAdName(), persAllInfoDto.getOrgId(), province); } } } supInsertResult.setId(persAllInfoDto.getId()); supInsertResult.setNm(persAllInfoDto.getNm()); supInsertResult.setPersCount(persAllInfoDto.getPersAllDtoList(). size()); supInsertResult.setObjCount(persAllInfoDto.getPersAllObjDtoList(). size()); supInsertResult.setAreaCount(persAllInfoDto.getPersAllAreaDtoList(). size()); return supInsertResult; } */ /** * 督查组人员分配角色 * * @param objIdDto * @return *//* @Override public int assignmentRole(ObjIdDto objIdDto) { int i = 0; String province = inspOrgService.getProvince(objIdDto.getOrgId()); ObjIdDto persAllDto = this.supervisionPlanDao.getPers(objIdDto.getId(), objIdDto.getGuid()); if (persAllDto != null) {//组里存在该人员 if ("1".equals(objIdDto.getPersType())) {//如果添加组长,将组里其他组长设为组员 this.supervisionPlanDao.updateTeamLeader(objIdDto.getId()); } //已经在组里,修改人员类型 i += this.supervisionPlanDao.updatePersType(objIdDto.getId(), objIdDto.getGuid(), objIdDto.getPersType()); } else { if ("1".equals(objIdDto.getPersType())) { this.supervisionPlanDao.updateTeamLeader(objIdDto.getId()); } //不在组里 执行添加 this.supervisionPlanDao.insertPers(objIdDto.getId(), objIdDto.getGuid(), objIdDto.getPersType(), objIdDto.getOrgId(), province); } return i; } */ /** * 获取人员类型 * * @param persid * @return *//* @Override public List getPersType(String persid, String orgId) { // if(StringUtils.isBlank(inspOrgService.getProvince(orgId))) { // return this.supervisionPlanDao.getPersTypeByPersid(persid, orgId, inspOrgService.getProvince(orgId)); // } return this.supervisionPlanDao.getPersTypeByPersidOrg(persid, inspOrgService.getProvince(orgId)); } */ /** * 获取人员类型(根据接收单位) * * @param persid * @return *//* @Override public List getPersTypeByPersid(String persid, String orgId) { return this.supervisionPlanDao.getPersTypeByPersid(persid, orgId, inspOrgService.getProvince(orgId)); } */ /** * 清空督查对象 * * @param objType * @param id *//* @Override public void cleanObjData(String objType, String id) { if (StringUtils.isBlank(id) || StringUtils.isBlank(objType)) { return; } BisInspPblmParam bisInspPblmParam = new BisInspPblmParam(); bisInspPblmParam.setRegid(id); bisInspPblmParam.setObjType(objType); this.bisInspPblmDao.deleteBy(bisInspPblmParam);//删除问题 if ("1".equals(objType) || "36".equals(objType)) {//水库 BisInspBaseViewParam p = new BisInspBaseViewParam(); p.setRgstrId(id); //获取走访情况 BisInspBaseView bisInspBaseView = this.bisInspBaseViewDao.getBy(p); if (bisInspBaseView != null) { //删除走访人员情况 this.bisInspPreListDao.deleteByViewId(bisInspBaseView.getViewId()); } this.bisInspBaseViewDao.deleteBy(p);//删除水库走访情况 BisInspSafeExtManageParam bisInspSafeExtManageParam = new BisInspSafeExtManageParam(); bisInspSafeExtManageParam.setRgstrId(id); this.bisInspSafeExtManageDao.deleteBy(bisInspSafeExtManageParam);//删除水库安全运行管理情况 BisInspBaseExtParam bisInspBaseExtParam = new BisInspBaseExtParam(); bisInspBaseExtParam.setRgstrId(id); this.bisInspBaseExtDao.deleteBy(bisInspBaseExtParam);//删除水库“三项基本要求”落实情况 BisInspBasePresExtParam bisInspBasePresExt = new BisInspBasePresExtParam(); bisInspBasePresExt.setRgstrId(id); this.bisInspBasePresExtDao.deleteBy(bisInspBasePresExt);//删除水库“三个责任人”落实情况 BisInspRsvrProjectParam bisInspRsvrProjectParam = new BisInspRsvrProjectParam();//水库工程实体情况 bisInspRsvrProjectParam.setRgstrId(id); bisInspRsvrProjectDao.deleteBy(bisInspRsvrProjectParam); BisInspRsvrBenefitsParam bisInspRsvrBenefitsParam = new BisInspRsvrBenefitsParam();//水库效益发挥情况 bisInspRsvrBenefitsParam.setRgstrId(id); bisInspRsvrBenefitsDao.deleteBy(bisInspRsvrBenefitsParam); BisInspRsvrRgstr bisInspRsvrRgstr = this.bisInspRsvrRgstrDao.get(id); this.bisInspRsvrRgstrDao.delete(id);//删除水库登记表 if (bisInspRsvrRgstr != null) { bisInspAllObjDao.delete(bisInspRsvrRgstr.getObjId());//删除对象名录表 AttRsBaseCrrctParam attRsBaseCrrctParam = new AttRsBaseCrrctParam(); attRsBaseCrrctParam.setObjId(bisInspRsvrRgstr.getObjId()); attRsBaseCrrctDao.deleteBy(attRsBaseCrrctParam); } } else if (BisInspEnum.VILL.getValue().equals(objType)) {//人饮 BisInspVlgdrinkProjManageParam bisInspVlgdrinkProjManageParam = new BisInspVlgdrinkProjManageParam(); bisInspVlgdrinkProjManageParam.setEngId(id); this.bisInspVlgdrinkProjManageDao.deleteBy(bisInspVlgdrinkProjManageParam);//删除农村饮水工程运行管理情况表 BisInspProSourceProtectParam bisInspProSourceProtectParam = new BisInspProSourceProtectParam(); bisInspProSourceProtectParam.setEngId(id); this.bisInspProSourceProtectDao.deleteBy(bisInspProSourceProtectParam);//删除千人以上供水工程水源地保护登记表 BisInspSecsurveyVlgParam bisInspSecsurveyVlgParam = new BisInspSecsurveyVlgParam(); bisInspSecsurveyVlgParam.setEngId(id); this.bisInspSecsurveyVlgDao.deleteBy(bisInspSecsurveyVlgParam);//删除暗访调研行政村登记表 BisInspVlgdrinkFacOperParam bisInspVlgdrinkFacOperParam = new BisInspVlgdrinkFacOperParam(); bisInspVlgdrinkFacOperParam.setEngId(id); this.bisInspVlgdrinkFacOperDao.deleteBy(bisInspVlgdrinkFacOperParam);//删除村内农村饮水工程设施运行维护情况表 BisInspWateruserInfoParam bisInspWateruserInfoParam = new BisInspWateruserInfoParam(); bisInspWateruserInfoParam.setEngId(id); this.bisInspWateruserInfoDao.deleteBy(bisInspWateruserInfoParam);//删除农村饮水用水户登记表 BisInspManageResponsibilityParam bisInspManageResponsibilityParam = new BisInspManageResponsibilityParam(); bisInspManageResponsibilityParam.setEngId(id); this.bisInspManageResponsibilityDao.deleteBy(bisInspManageResponsibilityParam); BisInspVillRgstr bisInspVillRgstr = this.bisInspVillRgstrDao.get(id); this.bisInspVillRgstrDao.delete(id);//删除登记表 if (bisInspVillRgstr != null) { this.bisInspAllObjDao.delete(bisInspVillRgstr.getObjId());//删除督查对象 } } else if (BisInspEnum.TRACK.getValue().equals(objType)) {//水毁 BisInspWtdstTrack bisInspWtdstTrack = this.bisInspWtdstTrackDao.get(id); this.bisInspWtdstTrackDao.delete(id);//删除登记表 if (bisInspWtdstTrack != null) { this.bisInspAllObjDao.delete(bisInspWtdstTrack.getObjId());//删除督查对象 } } else if (BisInspEnum.EMPWT.getValue().equals(objType)) {//水利工程建设 BisInspKeyRegisterSectionParam bisInspKeyRegisterSectionParam = new BisInspKeyRegisterSectionParam(); bisInspKeyRegisterSectionParam.setRegId(id); //获取172重点水利项目登记表标段基本信息 List bisInspKeyRegisterSectionList = this.bisInspKeyRegisterSectionDao.findList(bisInspKeyRegisterSectionParam); if (bisInspKeyRegisterSectionList.size() > 0) { for (BisInspKeyRegisterSection b : bisInspKeyRegisterSectionList) { BisInspKeyRegSecUnitParam bisInspKeyRegSecUnitParam = new BisInspKeyRegSecUnitParam(); bisInspKeyRegSecUnitParam.setSecId(b.getId()); //删除172重点水利项目标段责任单位 this.bisInspKeyRegSecUnitDao.deleteBy(bisInspKeyRegSecUnitParam); } } //删除172重点水利项目登记表标段 this.bisInspKeyRegisterSectionDao.deleteBy(bisInspKeyRegisterSectionParam); this.attMampuInfoDao.deleteByRegId(id);//删除管理单位信息表 BisInspKeyRegister bisInspKeyRegister = this.bisInspKeyRegisterDao.get(id); this.bisInspKeyRegisterDao.delete(id);//删除登记表 if (bisInspKeyRegister != null) { this.bisInspAllObjDao.delete(bisInspKeyRegister.getObjId());//删除督查对象 } } else if (BisInspEnum.GRW.getValue().equals(objType)) {//地下水 BisInspGrwParam bisInspGrwParam = new BisInspGrwParam(); bisInspGrwParam.setId(id); BisInspGrw bisInspGrw = this.bisInspGrwDao.getBy(bisInspGrwParam); this.bisInspGrwDao.delete(id);//删除登记表 if (bisInspGrw != null) { //删除督查对象 this.bisInspAllObjDao.delete(bisInspGrw.getObjId()); } } else if (BisInspEnum.WAGA.getValue().equals(objType)) {//水闸 BisInspWagaMrsCiParam bisInspWagaMrsCi = new BisInspWagaMrsCiParam(); bisInspWagaMrsCi.setRgstrId(id); //删除水闸督查管理责任体系建设和落实情况 this.bisInspWagaMrsCiDao.deleteBy(bisInspWagaMrsCi); BisInspWagaSafeManageParam bisInspWagaSafeManage = new BisInspWagaSafeManageParam(); bisInspWagaSafeManage.setRgstrId(id); //删除水闸督查安全管理情况 this.bisInspWagaSafeManageDao.deleteBy(bisInspWagaSafeManage); BisInspWagaDmamInfoParam bisInspWagaDmamInfoParam = new BisInspWagaDmamInfoParam(); bisInspWagaDmamInfoParam.setRgstrId(id); //删除水闸督查日常管理和维修养护情况 this.bisInspWagaDmamInfoDao.deleteBy(bisInspWagaDmamInfoParam); BisInspWagaProenInfoParam bisInspWagaProenInfoParam = new BisInspWagaProenInfoParam(); bisInspWagaProenInfoParam.setRgstrId(id); //删除水闸督查工程实体情况 this.bisInspWagaProenInfoDao.deleteBy(bisInspWagaProenInfoParam); AttWagaRgstr attWagaRgstr = this.attWagaRgstrDao.get(id); //删除登记表 this.attWagaRgstrDao.delete(id); if (attWagaRgstr != null) { //删除督查对象 this.bisInspAllObjDao.delete(attWagaRgstr.getObjId()); } } else if (BisInspEnum.EMPWTRUN.getValue().equals(objType)) {//水利工程运行 BisInspKeyRegisterSectionParam bisInspKeyRegisterSectionParam = new BisInspKeyRegisterSectionParam(); bisInspKeyRegisterSectionParam.setRegId(id); //获取172重点水利项目登记表标段基本信息 List bisInspKeyRegisterSectionList = this.bisInspKeyRegisterSectionDao.findList(bisInspKeyRegisterSectionParam); if (bisInspKeyRegisterSectionList.size() > 0) { for (BisInspKeyRegisterSection b : bisInspKeyRegisterSectionList) { BisInspKeyRegSecUnitParam bisInspKeyRegSecUnitParam = new BisInspKeyRegSecUnitParam(); bisInspKeyRegSecUnitParam.setSecId(b.getId()); //删除172重点水利项目标段责任单位 this.bisInspKeyRegSecUnitDao.deleteBy(bisInspKeyRegSecUnitParam); } } //删除172重点水利项目登记表标段 this.bisInspKeyRegisterSectionDao.deleteBy(bisInspKeyRegisterSectionParam); this.attMampuInfoDao.deleteByRegId(id);//删除管理单位信息表 BisInspKeyRegister bisInspKeyRegister = this.bisInspKeyRegisterDao.get(id); this.bisInspKeyRegisterDao.delete(id);//删除登记表 if (bisInspKeyRegister != null) { this.bisInspAllObjDao.delete(bisInspKeyRegister.getObjId());//删除督查对象 } } else if (BisInspEnum.PAWP.getValue().equals(objType)) { //删除专业稽察工作底稿 TacPawpListParam listParam = new TacPawpListParam(); listParam.setRgstrId(id); List l = tacPawpListDao.findList(listParam); for (TacPawpList t : l) { //删除查阅的资料目录 TacPawpDrmParam drmParam = new TacPawpDrmParam(); drmParam.setListId(t.getId()); tacPawpDrmDao.deleteBy(drmParam); } tacPawpListDao.deleteBy(listParam); //删除前期与设计基本情况表 TacPawpPdbstParam pdbstParam = new TacPawpPdbstParam(); pdbstParam.setRgstrId(id); tacPawpPdbstDao.deleteBy(pdbstParam); //删除建设管理基本情况表-项目法人责任制-TAC_PAWP_BSTOCM_PLPRS TacPawpBstocmPlprsParam bstocmPlprsParam = new TacPawpBstocmPlprsParam(); bstocmPlprsParam.setRgstrId(id); tacPawpBstocmPlprsDao.deleteBy(bstocmPlprsParam); //删除建设管理基本情况表-招标投标制-TAC_PAWP_BSTOCM_TSOPBFP TacPawpBstocmTsopbfpParam bstocmTsopbfpParam = new TacPawpBstocmTsopbfpParam(); bstocmTsopbfpParam.setRgstrId(id); List bstocmTsopbfps = tacPawpBstocmTsopbfpDao.findList(bstocmTsopbfpParam); for (TacPawpBstocmTsopbfp t : bstocmTsopbfps ) { //删除建设管理基本情况表-招标投标制-标段-TAC_PAWP_BSTOCM_TSOPBFP_SCTN TacPawpBstocmTsopbfpSctnParam bstocmTsopbfpSctnParam = new TacPawpBstocmTsopbfpSctnParam(); bstocmTsopbfpSctnParam.setTsopbfpId(t.getId()); tacPawpBstocmTsopbfpSctnDao.deleteBy(bstocmTsopbfpSctnParam); //删除建设监理单位与标段关系表-TAC_PAWP_BSTOCM_SCTN TacPawpBstocmSctnParam bstocmSctnParam = new TacPawpBstocmSctnParam(); bstocmSctnParam.setSctnId(t.getId()); tacPawpBstocmSctnDao.deleteBy(bstocmSctnParam); } tacPawpBstocmTsopbfpDao.deleteBy(bstocmTsopbfpParam); //删除建设管理基本情况表-建设监理制-TAC_PAWP_BSTOCM_CPSS TacPawpBstocmCpssInfoParam tacPawpBstocmCpssInfoParam = new TacPawpBstocmCpssInfoParam(); tacPawpBstocmCpssInfoParam.setRgstrId(id); List pawpBstocmCpsses = tacPawpBstocmCpssInfoDao.findList(tacPawpBstocmCpssInfoParam); for (TacPawpBstocmCpssInfo pawpBstocmCpssInfo : pawpBstocmCpsses) { TacPawpBstocmCpssParam bstocmCpssParam = new TacPawpBstocmCpssParam(); bstocmCpssParam.setCpssId(pawpBstocmCpssInfo.getId()); tacPawpBstocmCpssDao.deleteBy(bstocmCpssParam); } tacPawpBstocmCpssInfoDao.deleteBy(tacPawpBstocmCpssInfoParam); //删除建设管理基本情况表-合同管理制-TAC_PAWP_BSTOCM_CMS TacPawpBstocmCmsParam bstocmCmsParam = new TacPawpBstocmCmsParam(); bstocmCmsParam.setRgstrId(id); List bstocmCms = tacPawpBstocmCmsDao.findList(bstocmCmsParam); for (TacPawpBstocmCms t : bstocmCms ) { //删除建设管理基本情况表-合同管理制-合同列表-TAC_PAWP_BSTOCM_CMS_PACT_LIST TacPawpBstocmCmsPactListParam bstocmCmsPactListParam = new TacPawpBstocmCmsPactListParam(); bstocmCmsPactListParam.setCmsId(t.getId()); tacPawpBstocmCmsPactListDao.deleteBy(bstocmCmsPactListParam); } tacPawpBstocmCmsDao.deleteBy(bstocmCmsParam); //删除计划下达与执行基本情况表-TAC_PAWP_RAIOBIS TacPawpRaiobisParam raiobisParam = new TacPawpRaiobisParam(); raiobisParam.setRgstrId(id); tacPawpRaiobisDao.deleteBy(raiobisParam); //删除资金使用与管理基本情况表-TAC_PAWP_BIOFUAM TacPawpBiofuamParam biofuamParam = new TacPawpBiofuamParam(); biofuamParam.setRgstrId(id); tacPawpBiofuamDao.deleteBy(biofuamParam); //删除工程质量基本情况表--质量管理体制-TAC_PAWP_BITOPQ_QMS TacPawpBitopqQmsParam bitopqQmsParam = new TacPawpBitopqQmsParam(); bitopqQmsParam.setRgstrId(id); tacPawpBitopqQmsDao.deleteBy(bitopqQmsParam); //删除工程质量基本情况表--工程实体质量与验收-TAC_PAWP_BITOPQ_PEQAA TacPawpBitopqPeqaaParam bitopqPeqaaParam = new TacPawpBitopqPeqaaParam(); bitopqPeqaaParam.setRgstrId(id); tacPawpBitopqPeqaaDao.deleteBy(bitopqPeqaaParam); //删除工程安全基本情况表--项目法人-TAC_PAWP_BIOES_PE TacPawpBioesPeParam bioesPeParam = new TacPawpBioesPeParam(); bioesPeParam.setRgstrId(id); tacPawpBioesPeDao.deleteBy(bioesPeParam); //删除工程安全基本情况表--施工单位-TAC_PAWP_BIOES_RWUNIT TacPawpBioesRwunitParam bioesRwunitParam = new TacPawpBioesRwunitParam(); bioesRwunitParam.setRgstrId(id); tacPawpBioesRwunitDao.deleteBy(bioesRwunitParam); //稽察项目登记表 TacPawpRgstr tacPawpRgstr = tacPawpRgstrDao.get(id); //删除稽察项目登记表 tacPawpRgstrDao.delete(id); if (tacPawpRgstr != null) { //删除稽察项目相关问题 //删除督查对象 this.bisInspAllObjDao.delete(tacPawpRgstr.getObjId()); } } else if (BisInspEnum.FSC.getValue().equals(objType)) { BisInspFscRgstr rgstr = bisInspFscRgstrDao.get(id); bisInspFscRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.OTHER.getValue().equals(objType)) { BisInspOtherRgstr rgstr = bisInspOtherRgstrDao.get(id); bisInspOtherRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.SD.getValue().equals(objType)) { BisInspSdRgstr rgstr = bisInspSdRgstrDao.get(id); bisInspSdRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.WIU.getValue().equals(objType)) { //删除取水单位取用水情况 BisInspWiuRgstrIntInfoParam param = new BisInspWiuRgstrIntInfoParam(); param.setRgstrId(id); wiuRgstrIntInfoDao.deleteBy(param); //删除取水许可审批监管情况 BisInspWiuRgstrApprInfoParam apprInfoParam = new BisInspWiuRgstrApprInfoParam(); apprInfoParam.setRgstrId(id); wiuRgstrApprInfoDao.deleteBy(apprInfoParam); BisInspWiuRgstr rgstr = wiuRgstrDao.get(id); wiuRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.SWHS.getValue().equals(objType)) { //删除安全保障达标落实情况表 BisInspSwhsRgstrSafetyParam safetyParam = new BisInspSwhsRgstrSafetyParam(); safetyParam.setRgstrId(id); swhsRgstrSafetyDao.deleteBy(safetyParam); //删除保护措施监管情况 BisInspSwhsRgstrMeasuresParam measuresParam = new BisInspSwhsRgstrMeasuresParam(); measuresParam.setId(id); swhsRgstrMeasuresDao.deleteBy(measuresParam); //删除地级行政区应急备用水源建设情况表 BisInspSwhsRgstrWaterParam waterParam = new BisInspSwhsRgstrWaterParam(); waterParam.setRgstrId(id); swhsRgstrWaterDao.deleteBy(waterParam); BisInspSwhsRgstr rgstr = swhsRgstrDao.get(id); swhsRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.CITY.getValue().equals(objType)) { BisInspWintRgstrIntInfoParam intInfoParam = new BisInspWintRgstrIntInfoParam(); intInfoParam.setRgstrId(id); wintRgstrIntInfoDao.deleteBy(intInfoParam); BisInspWintRgstr rgstr = wintRgstrDao.get(id); wintRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.SVWT.getValue().equals(objType)) { BisInspSvwtAreaRgstrWswmParam wswmParam = new BisInspSvwtAreaRgstrWswmParam(); wswmParam.setRgstrId(id); svwtAreaWswmDao.deleteBy(wswmParam); BisInspSvwtAreaRgstrWseParam wseParam = new BisInspSvwtAreaRgstrWseParam(); wseParam.setRgstrId(id); svwtAreaWseDao.deleteBy(wseParam); BisInspSvwtAreaRgstr rgstr = svwtAreaRgstrDao.get(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(objType)) { BisInspSvwtWuntRgstrWuuswParam wuuswParam = new BisInspSvwtWuntRgstrWuuswParam(); wuuswParam.setRgstrId(id); svwtWuntWuuswDao.deleteBy(wuuswParam); BisInspSvwtWuntRgstrWsuswParam wsuswParam = new BisInspSvwtWuntRgstrWsuswParam(); wsuswParam.setRgstrId(id); svwtWuntWsuswDao.deleteBy(wsuswParam); BisInspSvwtWuntRgstr rgstr = svwtWuntRgstrDao.get(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.PRD.getValue().equals(objType)) { BisInspOprdCstrProjRgstr rgstr = oprdCstrProjRgstrDao.get(id); oprdCstrProjRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.JSFL.getValue().equals(objType)) { AttJskejianFlkdisRgstr rgstr = jskejianFlkdisRgstrDao.get(id); jskejianFlkdisRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.JSWA.getValue().equals(objType)) { AttJskejianWaterRgstr rgstr = jskejianWaterRgstrDao.get(id); jskejianWaterRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.ECOFRD.getValue().equals(objType)) { AttJskejianEcofrdRgstr rgstr = jskejianEcofrdRgstrDao.get(id); jskejianEcofrdRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.RSML.getValue().equals(objType)) { //三个责任人 BisInspRsmlRgstrPresParam presParam = new BisInspRsmlRgstrPresParam(); presParam.setRgstrId(id); bisInspRsmlRgstrPresDao.deleteBy(presParam); //运行管理 BisInspRsmlRgstrRunManageParam runManageParam = new BisInspRsmlRgstrRunManageParam(); runManageParam.setRgstrId(id); bisInspRsmlRgstrRunManageDao.deleteBy(runManageParam); //实体责任 BisInspRsmlRgstrProjectParam projectParam = new BisInspRsmlRgstrProjectParam(); projectParam.setRgstrId(id); bisInspRsmlRgstrProjectDao.deleteBy(projectParam); BisInspRsmlRgstr rgstr = bisInspRsmlRgstrDao.get(id); bisInspRsmlRgstrDao.delete(id); if (rgstr != null) { this.bisInspAllObjDao.delete(rgstr.getObjId()); } } else if (BisInspEnum.RSFCO.getValue().equals(objType)) { BisInspRsfcoRgstrBaseParam baseParam = new BisInspRsfcoRgstrBaseParam(); baseParam.setRgstrId(id); bisInspRsfcoRgstrBaseDao.deleteBy(baseParam); BisInspRsfcoRgstrFlliParam flliParam = new BisInspRsfcoRgstrFlliParam(); flliParam.setRgstrId(id); bisInspRsfcoRgstrFlliDao.deleteBy(flliParam); BisInspRsfcoRgstrAoeparoParam aoeparoParam = new BisInspRsfcoRgstrAoeparoParam(); aoeparoParam.setRgstrId(id); bisInspRsfcoRgstrAoeparoDao.deleteBy(aoeparoParam); this.bisInspRsfcoRgstrService.delete(id);//删除水库登记表 } else if (BisInspEnum.MFDP.getValue().equals(objType)) { bisInspMfdpRgstrService.delete(id); } } */ /** * 获取督查组相关的对象、人员、区域信息 * * @param persid * @param ptype * @param id * @return *//* @Override public List getAllInfoByPersid(String persid, String ptype, String id, String orgId) { ptype = "00" + ptype; String province = inspOrgService.getProvince(orgId); List persAllInfoDtoList = this.supervisionPlanDao.getAllInfoByPersid(persid, ptype, id, orgId, province); if (persAllInfoDtoList.size() > 0) { for (PersAllInfoDto p : persAllInfoDtoList) { List persAllDtoList = this.supervisionPlanDao.getPersAllDtoList(p.getId(), orgId, province); List persAllObjDtoList = this.supervisionPlanDao.getPersAllObjDtoListByType(p.getId(), ptype, orgId, province); List persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(p.getId(), orgId, province); p.setPersAllDtoList(persAllDtoList); p.setPersAllObjDtoList(persAllObjDtoList); p.setPersAllAreaDtoList(persAllAreaDtoList); } } return persAllInfoDtoList; } */ /** * 添加督查小组,不存在批次时同时添加批次 * * @param groupInfoDto * @return *//* @Override public String insertGroupInfo(GroupInfoDto groupInfoDto) { if (groupInfoDto.getPtype().length() == 1) {//将类型拼成类似于001这种格式 groupInfoDto.setPtype("00" + groupInfoDto.getPtype()); } String province = inspOrgService.getProvince(groupInfoDto.getOrgId()); if (groupInfoDto.getPtype().length() == 2) {//将类型拼成类似于001这种格式 groupInfoDto.setPtype("0" + groupInfoDto.getPtype()); } AllNodeDto nameDto = this.supervisionPlanDao.getNodeById(groupInfoDto.getPtype() + groupInfoDto.getOrgId()); if (nameDto == null) { BisInspOrg bisInspOrg = bisInspOrgDao.get(groupInfoDto.getOrgId()); BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto(); String groupId = groupInfoDto.getPtype() + groupInfoDto.getOrgId(); bisInspAllNodeDto.setId(groupId); bisInspAllNodeDto.setPnm(bisInspOrg.getOrgNm()); String pid = groupInfoDto.getPtype(); bisInspAllNodeDto.setPid(pid); bisInspAllNodeDto.setSttm(groupInfoDto.getSttm()); bisInspAllNodeDto.setEntm(groupInfoDto.getEntm()); bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear()); bisInspAllNodeDto.setProvince(province); bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth()); String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date()); bisInspAllNodeDto.setIntm(intm); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次 } String id = groupInfoDto.getPtype() + groupInfoDto.getOrgId() + "___"; //查询是否存在批次insertGroupInfo ObjectNameDto objectNameDto = this.supervisionPlanDao.getNodeBy(id, groupInfoDto.getInspYear(), groupInfoDto.getInspMnth(), groupInfoDto.getOrgId(), province); if (objectNameDto == null) {//如果为空,新建批次 BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto(); String groupId = groupInfoDto.getPtype() + groupInfoDto.getOrgId() + "0" + groupInfoDto.getInspMnth(); bisInspAllNodeDto.setId(groupId); bisInspAllNodeDto.setPnm(groupInfoDto.getInspYear() + "年" + groupInfoDto.getInspMnth() + "月督查"); String pid = groupInfoDto.getPtype() + groupInfoDto.getOrgId(); bisInspAllNodeDto.setPid(pid); bisInspAllNodeDto.setSttm(groupInfoDto.getSttm()); bisInspAllNodeDto.setEntm(groupInfoDto.getEntm()); bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear()); bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth()); bisInspAllNodeDto.setOrgId(groupInfoDto.getOrgId()); bisInspAllNodeDto.setProvince(province); String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date()); bisInspAllNodeDto.setIntm(intm); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次 String gid = groupId + "001"; bisInspAllNodeDto.setId(gid); bisInspAllNodeDto.setPnm(groupInfoDto.getName()); bisInspAllNodeDto.setPid(groupId); bisInspAllNodeDto.setInspTask(groupInfoDto.getInspTask()); bisInspAllNodeDto.setProvince(province); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组 return gid; } else {//如果存在批次 String newGroupId = ""; ObjIdDto objIdDto = this.supervisionPlanDao.getMaxGroupId(objectNameDto.getId(), objectNameDto.getOrgId(), province);//获取最新组id if (objIdDto.getId() != null) {//如果该批次下有组,则组id加1 String rtId = objIdDto.getId().substring(objIdDto.getId().length() - 1, objIdDto.getId().length()); int i = Integer.parseInt(rtId) + 1; newGroupId = String.valueOf(i); if ("10".equals(newGroupId)) {//新建组id末尾为10的时候进行截取处理 String sid = objIdDto.getId().substring(objIdDto.getId().length() - 2, objIdDto.getId().length() - 1); int j = Integer.parseInt(sid) + 1; String ss = String.valueOf(j); newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 2) + ss + "0"; } else { newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 1) + newGroupId; } } else {//如果该批次下没有组,则组id后三位为001 newGroupId = objectNameDto.getId() + "001"; } BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto(); bisInspAllNodeDto.setId(newGroupId); bisInspAllNodeDto.setPnm(groupInfoDto.getName()); bisInspAllNodeDto.setPid(objectNameDto.getId()); bisInspAllNodeDto.setSttm(groupInfoDto.getSttm()); bisInspAllNodeDto.setEntm(groupInfoDto.getEntm()); bisInspAllNodeDto.setOrgId(groupInfoDto.getOrgId()); bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear()); bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth()); bisInspAllNodeDto.setProvince(province); String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date()); bisInspAllNodeDto.setIntm(intm); bisInspAllNodeDto.setInspTask(groupInfoDto.getInspTask()); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组 return newGroupId; } } */ /** * 根据id修改节点 * * @param bisInspAllDto *//* @Override public void updateNode(BisInspAllDto bisInspAllDto) { this.supervisionPlanDao.updateNode(bisInspAllDto); } */ /** * 清空督查对象(根据obj_id) * * @param objType * @param objId *//* @Override public void cleanObjDataByObjId(String objType, String objId) { String id = ""; if (BisInspEnum.REVER.getValue().equals(objType)) { BisInspRsvrRgstrParam bisInspRsvrRgstrParam = new BisInspRsvrRgstrParam(); bisInspRsvrRgstrParam.setObjId(objId); List list = this.bisInspRsvrRgstrDao.findList(bisInspRsvrRgstrParam); if (list.size() > 0) { id = list.get(0).getRgstrId(); } } else if (BisInspEnum.VILL.getValue().equals(objType)) { BisInspVillRgstrParam bisInspVillRgstrParam = new BisInspVillRgstrParam(); bisInspVillRgstrParam.setObjId(objId); List list = this.bisInspVillRgstrDao.findList(bisInspVillRgstrParam); if (list.size() > 0) { id = list.get(0).getEngId(); } } else if (BisInspEnum.TRACK.getValue().equals(objType)) { BisInspWtdstTrackParam bisInspWtdstTrackParam = new BisInspWtdstTrackParam(); bisInspWtdstTrackParam.setObjId(objId); List list = this.bisInspWtdstTrackDao.findList(bisInspWtdstTrackParam); if (list.size() > 0) { id = list.get(0).getTrackId(); } } else if (BisInspEnum.EMPWT.getValue().equals(objType)) { BisInspKeyRegisterParam bisInspKeyRegisterParam = new BisInspKeyRegisterParam(); bisInspKeyRegisterParam.setObjId(objId); List list = this.bisInspKeyRegisterDao.findList(bisInspKeyRegisterParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.GRW.getValue().equals(objType)) { BisInspGrwParam bisInspGrwParam = new BisInspGrwParam(); bisInspGrwParam.setObjId(objId); List list = this.bisInspGrwDao.findList(bisInspGrwParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.WAGA.getValue().equals(objType)) { AttWagaRgstrParam attWagaRgstrParam = new AttWagaRgstrParam(); attWagaRgstrParam.setObjId(objId); List list = this.attWagaRgstrDao.findList(attWagaRgstrParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.EMPWTRUN.getValue().equals(objType)) { BisInspKeyRegisterParam bisInspKeyRegisterParam = new BisInspKeyRegisterParam(); bisInspKeyRegisterParam.setObjId(objId); List list = this.bisInspKeyRegisterDao.findList(bisInspKeyRegisterParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.PAWP.getValue().equals(objType)) { TacPawpRgstrParam tacPawpRgstrParam = new TacPawpRgstrParam(); tacPawpRgstrParam.setObjId(objId); List list = tacPawpRgstrDao.findList(tacPawpRgstrParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.FSC.getValue().equals(objType)) { BisInspFscRgstrParam bisInspFscRgstrParam = new BisInspFscRgstrParam(); bisInspFscRgstrParam.setObjId(objId); List list = bisInspFscRgstrDao.findList(bisInspFscRgstrParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.OTHER.getValue().equals(objType)) { BisInspOtherRgstrParam bisInspOtherRgstrParam = new BisInspOtherRgstrParam(); bisInspOtherRgstrParam.setObjId(objId); List list = bisInspOtherRgstrDao.findList(bisInspOtherRgstrParam); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.SD.getValue().equals(objType)) { BisInspSdRgstrParam param = new BisInspSdRgstrParam(); param.setObjId(objId); List list = bisInspSdRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.WIU.getValue().equals(objType)) { BisInspWiuRgstrParam param = new BisInspWiuRgstrParam(); param.setObjId(objId); List list = wiuRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.SWHS.getValue().equals(objType)) { BisInspSwhsRgstrParam param = new BisInspSwhsRgstrParam(); param.setObjId(objId); List list = swhsRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.CITY.getValue().equals(objType)) { BisInspWintRgstrParam param = new BisInspWintRgstrParam(); param.setObjId(objId); List list = wintRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.SVWT.getValue().equals(objType)) { BisInspSvwtAreaRgstrParam param = new BisInspSvwtAreaRgstrParam(); param.setObjId(objId); List list = svwtAreaRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.WUNT.getValue().equals(objType)) { BisInspSvwtWuntRgstrParam param = new BisInspSvwtWuntRgstrParam(); param.setObjId(objId); List list = svwtWuntRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.PRD.getValue().equals(objType)) { BisInspOprdCstrProjRgstrParam param = new BisInspOprdCstrProjRgstrParam(); param.setObjId(objId); List list = oprdCstrProjRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.JSFL.getValue().equals(objType)) { AttJskejianFlkdisRgstrParam param = new AttJskejianFlkdisRgstrParam(); param.setObjId(objId); List list = jskejianFlkdisRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.JSWA.getValue().equals(objType)) { AttJskejianWaterRgstrParam param = new AttJskejianWaterRgstrParam(); param.setObjId(objId); List list = jskejianWaterRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.ECOFRD.getValue().equals(objType)) { AttJskejianEcofrdRgstrParam param = new AttJskejianEcofrdRgstrParam(); param.setObjId(objId); List list = jskejianEcofrdRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if (BisInspEnum.RSML.getValue().equals(objType)) { BisInspRsmlRgstrParam param = new BisInspRsmlRgstrParam(); param.setObjId(objId); List list = bisInspRsmlRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equals(objType)){ BisZhejiangJgRgstrParam param = new BisZhejiangJgRgstrParam(); param.setObjId(objId); List list = bisZhejiangJgRgstrDao.findList(param); if (list.size() > 0) { id = list.get(0).getId(); } } if (StringUtils.isNotBlank(id)) { cleanObjData(objType, id); } BisInspAllObjParam bisInspAllObjParam = new BisInspAllObjParam(); if (StringUtils.isNotBlank(objId)) { bisInspAllObjParam.setObjId(objId); this.bisInspAllObjDao.deleteBy(bisInspAllObjParam); } } */ /** * 清空督查组信息 * * @param groupId *//* @Override public void cleanGroupInfo(String groupId, String orgId) { BisInspAllObjParam bisInspObjParam = new BisInspAllObjParam(); bisInspObjParam.setId(groupId); //根据组id获取objid bisInspObjParam.setOrgId(orgId); List bisInspAllObjList = this.bisInspAllObjDao.findList(bisInspObjParam); if (bisInspAllObjList.size() > 0) { for (BisInspAllObj bisInspAllObj : bisInspAllObjList) { //根据objid删除登记表等数据 cleanObjDataByObjId(groupId.substring(2, 3), bisInspAllObj.getObjId()); } } BisInspSelAreaParam bisInspSelAreaParam = new BisInspSelAreaParam(); bisInspSelAreaParam.setId(groupId); //删除督查区域 this.bisInspSelAreaDao.deleteBy(bisInspSelAreaParam); BisInspAllRlationParam bisInspAllRlationParam = new BisInspAllRlationParam(); bisInspAllRlationParam.setId(groupId); //删除督查人员 this.bisInspAllRlationDao.deleteBy(bisInspAllRlationParam); //删除组 this.bisInspAllDao.delete(groupId); //删除上一级 BisInspAllParam bisInspAllParam = new BisInspAllParam(); bisInspAllParam.setPid(groupId.substring(0, groupId.length() - 3)); List bisInspAlls = this.bisInspAllDao.findList(bisInspAllParam); if (bisInspAlls == null || bisInspAlls.size() == 0) { this.bisInspAllDao.delete(groupId.substring(0, groupId.length() - 3)); } } */ /** * 复用督查组信息 * * @param allGroupInfoDto *//* @Override public void copyGroupInfo(AllGroupInfoDto allGroupInfoDto) { //督查类型 String province = inspOrgService.getProvince(allGroupInfoDto.getOrgId()); if (allGroupInfoDto.getPtype().length() == 1) { allGroupInfoDto.setPtype("00" + allGroupInfoDto.getPtype()); } if (allGroupInfoDto.getPtype().length() == 2) { allGroupInfoDto.setPtype("0" + allGroupInfoDto.getPtype()); } String id = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId() + "___"; //查询是否存在批次 ObjectNameDto objectNameDto = this.supervisionPlanDao.getNodeBy(id, allGroupInfoDto.getInspYear(), allGroupInfoDto.getInspMnth(), allGroupInfoDto.getOrgId(), province); if (objectNameDto == null) {//如果为空,新建批次 BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto(); String groupId = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId() + "0" + allGroupInfoDto.getInspMnth(); bisInspAllNodeDto.setId(groupId); bisInspAllNodeDto.setPnm(allGroupInfoDto.getInspYear() + "年" + allGroupInfoDto.getInspMnth() + "月督查"); String pid = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId(); bisInspAllNodeDto.setPid(pid); bisInspAllNodeDto.setInspYear(allGroupInfoDto.getInspYear()); bisInspAllNodeDto.setInspMnth(allGroupInfoDto.getInspMnth()); bisInspAllNodeDto.setSttm(allGroupInfoDto.getSttm()); bisInspAllNodeDto.setOrgId(allGroupInfoDto.getOrgId()); bisInspAllNodeDto.setEntm(allGroupInfoDto.getEntm()); bisInspAllNodeDto.setProvince(province); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次 String gid = groupId + "001"; bisInspAllNodeDto.setId(gid); bisInspAllNodeDto.setPnm("复用1组"); bisInspAllNodeDto.setPid(groupId); bisInspAllNodeDto.setProvince(province); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组 //将人员和区域关联到新建组里 if (allGroupInfoDto.getPersAllDtoList().size() > 0) { for (PersAllDto persAllDto : allGroupInfoDto.getPersAllDtoList()) { //添加人员 this.supervisionPlanDao.insertPers(gid, persAllDto.getGuid(), persAllDto.getPersType(), allGroupInfoDto.getOrgId(), province); } } if (allGroupInfoDto.getPersAllAreaDtoList().size() > 0) { for (PersAllAreaDto persAllAreaDto : allGroupInfoDto.getPersAllAreaDtoList()) { //添加区域 String uuid = UuidUtil.uuid(); this.supervisionPlanDao.insertSupArea(uuid, gid, persAllAreaDto.getAdCode(), persAllAreaDto.getAdName(), allGroupInfoDto.getOrgId(), province); } } } else {//如果存在批次 String newGroupId = ""; ObjIdDto objIdDto = this.supervisionPlanDao.getMaxGroupId(objectNameDto.getId(), objectNameDto.getOrgId(), province);//获取最新组id if (objIdDto.getId() != null) {//如果该批次下有组,则组id加1 String rtId = objIdDto.getId().substring(objIdDto.getId().length() - 1, objIdDto.getId().length()); int i = Integer.parseInt(rtId) + 1; newGroupId = String.valueOf(i); if ("10".equals(newGroupId)) {//新建组id末尾为10的时候进行截取处理 String sid = objIdDto.getId().substring(objIdDto.getId().length() - 2, objIdDto.getId().length() - 1); int j = Integer.parseInt(sid) + 1; String ss = String.valueOf(j); newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 2) + ss + "0"; } else { newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 1) + newGroupId; } } else {//如果该批次下没有组,则组id后三位为001 newGroupId = objectNameDto.getId() + "001"; } BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto(); bisInspAllNodeDto.setId(newGroupId); bisInspAllNodeDto.setPnm("复用" + newGroupId.substring(newGroupId.length() - 1, newGroupId.length()) + "组"); bisInspAllNodeDto.setPid(objectNameDto.getId()); bisInspAllNodeDto.setOrgId(objectNameDto.getOrgId()); bisInspAllNodeDto.setInspYear(allGroupInfoDto.getInspYear()); bisInspAllNodeDto.setInspMnth(allGroupInfoDto.getInspMnth()); bisInspAllNodeDto.setSttm(allGroupInfoDto.getSttm()); bisInspAllNodeDto.setEntm(allGroupInfoDto.getEntm()); this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组 if (allGroupInfoDto.getPersAllDtoList().size() > 0) { for (PersAllDto persAllDto : allGroupInfoDto.getPersAllDtoList()) { //添加人员 this.supervisionPlanDao.insertPers(newGroupId, persAllDto.getGuid(), persAllDto.getPersType(), allGroupInfoDto.getOrgId(), province); } } if (allGroupInfoDto.getPersAllAreaDtoList().size() > 0) { for (PersAllAreaDto persAllAreaDto : allGroupInfoDto.getPersAllAreaDtoList()) { //添加区域 String uuid = UuidUtil.uuid(); this.supervisionPlanDao.insertSupArea(uuid, newGroupId, persAllAreaDto.getAdCode(), persAllAreaDto.getAdName(), objectNameDto.getOrgId(), province); } } } } @Override public List getPersAllAreaDtoList(String id, String orgId) { String province = inspOrgService.getProvince(orgId); List persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(id, orgId, province); return persAllAreaDtoList; } @Override public Map importExcel(MultipartFile file, String persId, String orgId) { Map map = new HashedMap(); int success = 0; int fail = 0; Workbook wb = null; InputStream fis = null; List rowList = new ArrayList(); try { fis = file.getInputStream(); if (file.getOriginalFilename().endsWith(XLS)) { wb = new HSSFWorkbook(fis); } else { wb = new XSSFWorkbook(fis); } Sheet sheet = wb.getSheetAt(0); Row row = null; int lastRowNum = sheet.getPhysicalNumberOfRows(); for (int i = sheet.getFirstRowNum(); i < lastRowNum; i++) { row = sheet.getRow(i); if (row != null) { rowList.add(row); } } } catch (IOException e) { e.printStackTrace(); } finally { if (wb != null) { try { wb.close(); } catch (IOException e) { e.printStackTrace(); } } if (fis != null) { try { fis.close(); } catch (IOException e) { e.printStackTrace(); } } } List list = new ArrayList<>(); if (rowList.size() > 2) { Row row = null; for (int i = 2; i < rowList.size(); i++) { row = rowList.get(i); GroupInfoDto groupInfoDto = new GroupInfoDto(); for (int j = row.getFirstCellNum(); j < row.getPhysicalNumberOfCells(); j++) { Cell cell = row.getCell(j); if (cell == null) { continue; } if (j == 1) { groupInfoDto.setPtype(fomateType(cleanFomate(String.valueOf(cell)))); } if (j == 2) { groupInfoDto.setName(cleanFomate(String.valueOf(cell))); } if (j == 3) { Double db = cell.getNumericCellValue(); if (db != null) { groupInfoDto.setInspYear(String.valueOf(db.intValue())); } } if (j == 4) { Double db = cell.getNumericCellValue(); if (db != null) { groupInfoDto.setInspMnth(String.valueOf(db.intValue())); } } if (j == 5) { String areaNames = cleanFomate(String.valueOf(cell)); List persAllAreaDtoList = convertAreaNamesToDto(map, fail, areaNames); groupInfoDto.setPersAllAreaDtoList(persAllAreaDtoList); } if (j == 6) { String objNames = cleanFomate(String.valueOf(cell)); List persAllObjDtoLis = convertObjNamesToDto(map, fail, objNames, groupInfoDto.getPtype()); groupInfoDto.setPersAllObjDtoList(persAllObjDtoLis); } if (j == 7) { String persNames = cleanFomate(String.valueOf(cell)); List persList = convertPersIdsToDto(map, fail, persNames, "1"); groupInfoDto.setPersList(persList); } if (j == 8) { String persNames = cleanFomate(String.valueOf(cell)); List persList = convertPersIdsToDto(map, fail, persNames, "2"); groupInfoDto.setPersList(persList); } if (j == 9) { String persNames = cleanFomate(String.valueOf(cell)); List persList = convertPersIdsToDto(map, fail, persNames, "3"); groupInfoDto.setPersList(persList); } if (j == 10) { String persNames = cleanFomate(String.valueOf(cell)); List persList = convertPersIdsToDto(map, fail, persNames, "4"); groupInfoDto.setPersList(persList); } if (j == 11) { groupInfoDto.setSttm(cleanFomate(String.valueOf(cell)).replace("/", "-")); } if (j == 12) { groupInfoDto.setEntm(cleanFomate(String.valueOf(cell)).replace("/", "-")); } } if (StringUtils.isNotBlank(groupInfoDto.getPtype())) { list.add(groupInfoDto); } } } if (list.size() > 0) { for (GroupInfoDto groupInfoDto : list) { try { groupInfoDto.setOrgId(orgId); String groupId = insertGroupInfo(groupInfoDto); if (StringUtils.isBlank(groupId)) { fail++; if (map.get("false") == null) { List message = new ArrayList<>(); message.add(groupInfoDto.getName() + "添加失败"); map.put("false", message); } else { ((List) map.get("false")).add(groupInfoDto.getName() + "添加失败"); } } PersAllInfoDto persAllInfoDto = new PersAllInfoDto(); persAllInfoDto.setPersid(persId); persAllInfoDto.setId(groupId); persAllInfoDto.setPersAllAreaDtoList(groupInfoDto.getPersAllAreaDtoList() == null ? new ArrayList<>() : groupInfoDto.getPersAllAreaDtoList()); persAllInfoDto.setPersAllDtoList(groupInfoDto.getPersList() == null ? new ArrayList<>() : groupInfoDto.getPersList()); persAllInfoDto.setPersAllObjDtoList(groupInfoDto.getPersAllObjDtoList() == null ? new ArrayList<>() : groupInfoDto.getPersAllObjDtoList()); insertSupervisionObj(persAllInfoDto); success++; } catch (Exception e) { fail++; if (map.get("false") == null) { List message = new ArrayList<>(); message.add(groupInfoDto.getName() + "添加失败"); map.put("false", message); } else { ((List) map.get("false")).add(groupInfoDto.getName() + "添加失败"); } } } } map.put("success", success); map.put("fail", fail); return map; } private List convertObjNamesToDto(Map map, int fail, String objNames, String ptype) { List list = new ArrayList<>(); if (StringUtils.isBlank(objNames)) { return list; } if (objNames.contains(",")) { for (String objName : objNames.split(",")) { getObjDtoByName(objName, list, map, fail, ptype); } } else { getObjDtoByName(objNames, list, map, fail, ptype); } return list; } private void getObjDtoByName(String objName, List list, Map map, int fail, String ptype) { if (BisInspEnum.REVER.getValue().equals(ptype)) { AttRsBaseParam baseParam = new AttRsBaseParam(); baseParam.setRsName(objName); List baseList = attRsBaseDao.findList(baseParam); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setCode(baseList.get(0).getRsCode()); objDto.setName(baseList.get(0).getRsName()); objDto.setPtype(ptype); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "水库不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "水库名称重复"); } } else if (BisInspEnum.VILL.getValue().equals(ptype) || BisInspEnum.CITY.getValue().equals(ptype) || BisInspEnum.SVWT.getValue().equals(ptype)) { AttAdXBaseParam baseParam = new AttAdXBaseParam(); baseParam.setAdName(objName); baseParam.setAdGrad("3"); List baseList = attAdXBaseDao.findList(baseParam); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getAdCode()); objDto.setName(baseList.get(0).getAdName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "地区不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "地区重复"); } } else if (BisInspEnum.TRACK.getValue().equals(ptype)) { BisInspWtdstParam param = new BisInspWtdstParam(); param.setWtdstNm(objName); List baseList = bisInspWtdstDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setName(baseList.get(0).getWtdstNm()); objDto.setCode(baseList.get(0).getWtdstId()); objDto.setPtype(ptype); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "工程不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "工程重复"); } } else if (BisInspEnum.EMPWT.getValue().equals(ptype) || BisInspEnum.EMPWTRUN.getValue().equals(ptype)) { AttEmpwtprjBaseParam param = new AttEmpwtprjBaseParam(); param.setNm(objName); List baseList = attEmpwtprjBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getNm()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "工程不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "工程重复"); } } else if (BisInspEnum.GRW.getValue().equals(ptype)) { AttGrwBaseParam param = new AttGrwBaseParam(); param.setStnm(objName); List baseList = grwBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setName(baseList.get(0).getStnm()); objDto.setCode(baseList.get(0).getStcd()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "地下水不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "地下水重复"); } } else if (BisInspEnum.WAGA.getValue().equals(ptype)) { AttWagaBaseParam param = new AttWagaBaseParam(); param.setGateName(objName); List baseList = attWagaBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getAdCode()); objDto.setName(baseList.get(0).getGateName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "水闸不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "水闸重复"); } } else if (BisInspEnum.PAWP.getValue().equals(ptype)) { TacAttPawpBaseParam param = new TacAttPawpBaseParam(); param.setName(objName); List baseList = tacAttPawpBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "工程不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "工程重复"); } } else if (BisInspEnum.FSC.getValue().equals(ptype)) { AttFscBaseParam param = new AttFscBaseParam(); param.setName(objName); List baseList = attFscBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "工程不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "工程重复"); } } else if (BisInspEnum.OTHER.getValue().equals(ptype)) { AttOtherBaseParam param = new AttOtherBaseParam(); param.setName(objName); List baseList = attOtherBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "工程不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "工程重复"); } } else if (BisInspEnum.SD.getValue().equals(ptype)) { AttSdBaseParam param = new AttSdBaseParam(); param.setSdName(objName); List baseList = sdBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getSdName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "淤地坝不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "淤地坝重复"); } } else if (BisInspEnum.WIU.getValue().equals(ptype)) { AttWiuBaseParam param = new AttWiuBaseParam(); param.setName(objName); List baseList = wiuBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "取水单位不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "取水单位重复"); } } else if (BisInspEnum.SWHS.getValue().equals(ptype)) { AttSwhsBaseParam param = new AttSwhsBaseParam(); param.setSwhsName(objName); List baseList = swhsBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getSwhsName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "水源地不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "水源地重复"); } } else if (BisInspEnum.WUNT.getValue().equals(ptype)) { AttWuntBaseParam param = new AttWuntBaseParam(); param.setUtName(objName); List baseList = wuntBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getUtName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "用水单位不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "用水单位重复"); } } else if (BisInspEnum.PRD.getValue().equals(ptype)) { AttPrdCstrProjBaseParam param = new AttPrdCstrProjBaseParam(); param.setName(objName); List baseList = attPrdCstrProjBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "水保工作核查不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "水保工作核查重复"); } } else if (BisInspEnum.JSFL.getValue().equals(ptype)) { AttJskejianFlkdisBaseParam param = new AttJskejianFlkdisBaseParam(); param.setName(objName); List baseList = jskejianFlkdisBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "河湖四乱核查不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "河湖四乱核查重复"); } } else if (BisInspEnum.JSWA.getValue().equals(ptype)) { AttJskejianWaterBaseParam param = new AttJskejianWaterBaseParam(); param.setName(objName); List baseList = jskejianWaterBaseDao.findList(param); if (baseList.size() == 1) { PersAllObjDto objDto = new PersAllObjDto(); objDto.setPtype(ptype); objDto.setCode(baseList.get(0).getId()); objDto.setName(baseList.get(0).getName()); list.add(objDto); } else if (baseList.size() == 0) { setFailMessage(map, fail, objName, "非法采砂核查不存在"); } else if (baseList.size() > 1) { setFailMessage(map, fail, objName, "非法采砂核查重复"); } } } private void setFailMessage(Map map, int fail, String objName, String message) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(objName + message); map.put("false", failList); } else { ((List) map.get("false")).add(objName + message); } } private List convertAreaNamesToDto(Map map, int fail, String areaNames) { List list = new ArrayList<>(); if (StringUtils.isBlank(areaNames)) { return list; } if (areaNames.contains(SplitValue.DOUHAO_SPLIT)) { for (String areaName : areaNames.split(SplitValue.DOUHAO_SPLIT)) { AttAdXBaseParam param = new AttAdXBaseParam(); param.setAdName(areaName); param.setAdFcode("000000000000"); List adXBases = attAdXBaseDao.findList(param); if (adXBases.size() == 1) { PersAllAreaDto persAllAreaDto = new PersAllAreaDto(); persAllAreaDto.setAdCode(adXBases.get(0).getAdCode()); persAllAreaDto.setAdName(adXBases.get(0).getAdName()); list.add(persAllAreaDto); } else if (adXBases.size() == 0) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(areaName + "地区查找失败"); map.put("false", failList); } else { ((List) map.get("false")).add(areaName + "地区查找失败"); } } else if (adXBases.size() > 1) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(areaName + "地区重复"); map.put("false", failList); } else { ((List) map.get("false")).add(areaName + "地区重复"); } } } } else { AttAdXBaseParam param = new AttAdXBaseParam(); param.setAdName(areaNames); param.setAdFcode("000000000000"); List adXBases = attAdXBaseDao.findList(param); if (adXBases.size() == 1) { PersAllAreaDto persAllAreaDto = new PersAllAreaDto(); persAllAreaDto.setAdCode(adXBases.get(0).getAdCode()); persAllAreaDto.setAdName(adXBases.get(0).getAdName()); list.add(persAllAreaDto); } else if (adXBases.size() == 0) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(areaNames + "地区查找失败"); map.put("false", failList); } else { ((List) map.get("false")).add(areaNames + "地区查找失败"); } } else if (adXBases.size() > 1) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(areaNames + "地区重复"); map.put("false", failList); } else { ((List) map.get("false")).add(areaNames + "地区重复"); } } } return list; } private List convertPersIdsToDto(Map map, int fail, String persNames, String persType) { List list = new ArrayList<>(); if (StringUtils.isBlank(persNames)) { return list; } if (persNames.contains(SplitValue.DOUHAO_SPLIT)) { for (String persName : persNames.split(SplitValue.DOUHAO_SPLIT)) { BisInspAllRlationPersParam persParam = new BisInspAllRlationPersParam(); if (persName.contains(SplitValue.HENG_SPLIT)) { persParam.setPersName(persName.split(SplitValue.HENG_SPLIT)[0]); persParam.setMobilenumb(persName.split(SplitValue.HENG_SPLIT)[1]); } else { persParam.setPersName(persName); } List pers = bisInspAllRlationPersDao.findList(persParam); if (pers.size() == 1) { PersAllDto dto = new PersAllDto(); dto.setGuid(pers.get(0).getGuid()); dto.setPersName(pers.get(0).getPersName()); dto.setPersType(persType); list.add(dto); } else if (pers.size() == 0) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(persName + "人员查找失败"); map.put("false", failList); } else { ((List) map.get("false")).add(persName + "人员查找失败"); } } else if (pers.size() > 1) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(persName + "姓名重复,无法确定唯一"); map.put("false", failList); } else { ((List) map.get("false")).add(persName + "姓名重复,无法确定唯一"); } } } } else { BisInspAllRlationPersParam persParam = new BisInspAllRlationPersParam(); persParam.setPersName(persNames); List pers = bisInspAllRlationPersDao.findList(persParam); if (pers.size() == 1) { PersAllDto dto = new PersAllDto(); dto.setGuid(pers.get(0).getGuid()); dto.setPersName(pers.get(0).getPersName()); dto.setPersType(persType); list.add(dto); } else if (pers.size() == 0) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(persNames + "查找失败"); map.put("false", failList); } else { ((List) map.get("false")).add(persNames + "查找失败"); } } else if (pers.size() > 1) { fail++; if (map.get("false") == null) { List failList = new ArrayList<>(); failList.add(persNames + "姓名重复,无法确定唯一"); map.put("false", failList); } else { ((List) map.get("false")).add(persNames + "姓名重复,无法确定唯一"); } } } return list; } private String fomateType(String field) { if ("小水库".equals(field)) { return "1"; } if ("人饮".equals(field)) { return "2"; } if ("水毁".equals(field)) { return "3"; } if ("工程建设".equals(field)) { return "4"; } if ("地下水".equals(field)) { return "5"; } if ("水闸".equals(field)) { return "6"; } if ("工程运行".equals(field)) { return "7"; } if ("特定飞检".equals(field)) { return "9"; } if ("其他检查".equals(field)) { return "10"; } if ("淤地坝".equals(field)) { return "11"; } if ("取水口".equals(field)) { return "12"; } if ("水源地".equals(field)) { return "13"; } if ("分水及管控".equals(field)) { return "14"; } if ("节水管理".equals(field)) { return "15"; } if ("用水单位".equals(field)) { return "16"; } return ""; } private String cleanFomate(String field) { if (StringUtils.isBlank(field)) { return ""; } String result = field; result = result.replace(" ", ""); result = result.replace(",", ","); return result; } } */