e2e77767f42e2e79fa1fc00afd2aebd4586aadef.svn-base 160 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059
  1. /*
  2. package cn.com.goldenwater.dcproj.service.impl.system;
  3. import cn.com.goldenwater.dcproj.constValue.*;
  4. import cn.com.goldenwater.dcproj.dao.*;
  5. import cn.com.goldenwater.dcproj.dto.*;
  6. import cn.com.goldenwater.dcproj.model.*;
  7. import cn.com.goldenwater.dcproj.param.*;
  8. import cn.com.goldenwater.dcproj.service.*;
  9. import cn.com.goldenwater.dcproj.service.impl.wdtst.BisInspWtdstTrackServiceImpl;
  10. import cn.com.goldenwater.dcproj.utils.AdLevelUtil;
  11. import cn.com.goldenwater.dcproj.utils.BeanUtil;
  12. import cn.com.goldenwater.dcproj.utils.DateUtils;
  13. import cn.com.goldenwater.dcproj.utils.GeoUtil;
  14. import cn.com.goldenwater.id.util.UuidUtil;
  15. import com.github.pagehelper.PageHelper;
  16. import com.github.pagehelper.PageInfo;
  17. import org.apache.commons.collections.map.HashedMap;
  18. import org.apache.commons.lang3.StringUtils;
  19. import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  20. import org.apache.poi.ss.usermodel.Cell;
  21. import org.apache.poi.ss.usermodel.Row;
  22. import org.apache.poi.ss.usermodel.Sheet;
  23. import org.apache.poi.ss.usermodel.Workbook;
  24. import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  25. import org.springframework.beans.factory.annotation.Autowired;
  26. import org.springframework.stereotype.Service;
  27. import org.springframework.transaction.annotation.Transactional;
  28. import org.springframework.web.multipart.MultipartFile;
  29. import java.io.IOException;
  30. import java.io.InputStream;
  31. import java.text.SimpleDateFormat;
  32. import java.util.*;
  33. import static cn.com.goldenwater.dcproj.utils.impexcel.ImpUtil.XLS;
  34. */
  35. /**
  36. * Created by 61618 on 2019/4/17.
  37. *//*
  38. @Service
  39. @Transactional(rollbackFor = Exception.class)
  40. public class SupervisionPlanServiceImpl implements SupervisionPlanService {
  41. @Autowired
  42. private BisZhejiangVillRgstrService bisZhejiangVillRgstrService;
  43. @Autowired
  44. private AttJskejianFlkdisBaseDao jskejianFlkdisBaseDao;
  45. @Autowired
  46. private AttJskejianFlkdisRgstrDao jskejianFlkdisRgstrDao;
  47. @Autowired
  48. private AttJskejianWaterRgstrDao jskejianWaterRgstrDao;
  49. @Autowired
  50. private AttJskejianWaterBaseDao jskejianWaterBaseDao;
  51. @Autowired
  52. private AttJskejianEcofrdBaseDao jskejianEcofrdBaseDao;
  53. @Autowired
  54. private AttJskejianEcofrdRgstrDao jskejianEcofrdRgstrDao;
  55. @Autowired
  56. private AttWagaBaseDao attWagaBaseDao;
  57. @Autowired
  58. private SupervisionPlanDao supervisionPlanDao;
  59. @Autowired
  60. private BisInspAllObjDao bisInspAllObjDao;
  61. @Autowired
  62. private AttRsBaseDao attRsBaseDao;
  63. @Autowired
  64. private BisInspRsvrRgstrDao bisInspRsvrRgstrDao;
  65. @Autowired
  66. private BisInspVillRgstrDao bisInspVillRgstrDao;
  67. @Autowired
  68. private BisInspWtdstTrackDao bisInspWtdstTrackDao;
  69. @Autowired
  70. private AttEmpwtprjBaseDao attEmpwtprjBaseDao;
  71. @Autowired
  72. private BisInspKeyRegisterDao bisInspKeyRegisterDao;
  73. @Autowired
  74. private BisInspBaseDao bisInspBaseDao;
  75. @Autowired
  76. private BisInspGrwDao bisInspGrwDao;
  77. @Autowired
  78. private AttWagaRgstrDao attWagaRgstrDao;
  79. @Autowired
  80. private AttWagaBaseDao wagaBaseDao;
  81. @Autowired
  82. private BisInspBaseExtDao bisInspBaseExtDao;
  83. @Autowired
  84. private BisInspSafeExtManageDao bisInspSafeExtManageDao;
  85. @Autowired
  86. private BisInspPreListDao bisInspPreListDao;
  87. @Autowired
  88. private BisInspBaseViewDao bisInspBaseViewDao;
  89. @Autowired
  90. private BisInspBasePresExtDao bisInspBasePresExtDao;
  91. @Autowired
  92. BisInspRsvrProjectDao bisInspRsvrProjectDao;
  93. @Autowired
  94. BisInspRsvrBenefitsDao bisInspRsvrBenefitsDao;//水库效益发挥情况
  95. @Autowired
  96. private BisInspPblmDao bisInspPblmDao;
  97. @Autowired
  98. private BisInspVlgdrinkProjManageDao bisInspVlgdrinkProjManageDao;
  99. @Autowired
  100. private BisInspProSourceProtectDao bisInspProSourceProtectDao;
  101. @Autowired
  102. private BisInspSecsurveyVlgDao bisInspSecsurveyVlgDao;
  103. @Autowired
  104. private BisInspVlgdrinkFacOperDao bisInspVlgdrinkFacOperDao;
  105. @Autowired
  106. private BisInspWateruserInfoDao bisInspWateruserInfoDao;
  107. @Autowired
  108. private BisInspManageResponsibilityDao bisInspManageResponsibilityDao;
  109. @Autowired
  110. private BisInspKeyRegisterSectionDao bisInspKeyRegisterSectionDao;
  111. @Autowired
  112. private BisInspKeyRegSecUnitDao bisInspKeyRegSecUnitDao;
  113. @Autowired
  114. private AttMampuInfoDao attMampuInfoDao;
  115. @Autowired
  116. private BisInspWagaMrsCiDao bisInspWagaMrsCiDao;
  117. @Autowired
  118. private BisInspWagaSafeManageDao bisInspWagaSafeManageDao;
  119. @Autowired
  120. private BisInspWagaDmamInfoDao bisInspWagaDmamInfoDao;
  121. @Autowired
  122. private BisInspWagaProenInfoDao bisInspWagaProenInfoDao;
  123. @Autowired
  124. private BisInspRsvrRgstrService bisInspRsvrRgstrService;
  125. @Autowired
  126. private AttWagaRgstrService attWagaRgstrService;
  127. @Autowired
  128. private BisInspGrwService bisInspGrwService;
  129. @Autowired
  130. private BisInspKeyRegisterService bisInspKeyRegisterService;
  131. @Autowired
  132. private BisInspVillRgstrService bisInspVillRgstrService;
  133. @Autowired
  134. private BisInspWtdstDao bisInspWtdstDao;
  135. @Autowired
  136. private BisInspWtdstTrackServiceImpl bisInspWtdstTrackServiceImpl;
  137. @Autowired
  138. private BisInspSelAreaDao bisInspSelAreaDao;
  139. @Autowired
  140. private BisInspAllRlationDao bisInspAllRlationDao;
  141. @Autowired
  142. private BisInspAllDao bisInspAllDao;
  143. @Autowired
  144. private AttRsBaseCrrctDao attRsBaseCrrctDao;
  145. //稽察项目基本信息表
  146. @Autowired
  147. private TacAttPawpBaseDao tacAttPawpBaseDao;
  148. //稽察项目登记表
  149. @Autowired
  150. private TacPawpRgstrDao tacPawpRgstrDao;
  151. //专业稽察工作底稿
  152. @Autowired
  153. private TacPawpListDao tacPawpListDao;
  154. //查阅的资料目录
  155. @Autowired
  156. private TacPawpDrmDao tacPawpDrmDao;
  157. //前期与设计基本情况表
  158. @Autowired
  159. private TacPawpPdbstDao tacPawpPdbstDao;
  160. //建设管理基本情况表-项目法人责任制-TAC_PAWP_BSTOCM_PLPRS
  161. @Autowired
  162. private TacPawpBstocmPlprsDao tacPawpBstocmPlprsDao;
  163. //建设管理基本情况表-招标投标制-TAC_PAWP_BSTOCM_TSOPBFP
  164. @Autowired
  165. private TacPawpBstocmTsopbfpDao tacPawpBstocmTsopbfpDao;
  166. //建设管理基本情况表-招标投标制-标段-TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  167. @Autowired
  168. private TacPawpBstocmTsopbfpSctnDao tacPawpBstocmTsopbfpSctnDao;
  169. //建设管理基本情况表-建设监理制-TAC_PAWP_BSTOCM_CPSS
  170. @Autowired
  171. private TacPawpBstocmCpssDao tacPawpBstocmCpssDao;
  172. //建设监理单位与标段关系表-TAC_PAWP_BSTOCM_SCTN
  173. @Autowired
  174. private TacPawpBstocmSctnDao tacPawpBstocmSctnDao;
  175. //建设管理基本情况表-合同管理制-TAC_PAWP_BSTOCM_CMS
  176. @Autowired
  177. private TacPawpBstocmCmsDao tacPawpBstocmCmsDao;
  178. //建设管理基本情况表-合同管理制-合同列表-TAC_PAWP_BSTOCM_CMS_PACT_LIST
  179. @Autowired
  180. private TacPawpBstocmCmsPactListDao tacPawpBstocmCmsPactListDao;
  181. //计划下达与执行基本情况表-TAC_PAWP_RAIOBIS
  182. @Autowired
  183. private TacPawpRaiobisDao tacPawpRaiobisDao;
  184. //资金使用与管理基本情况表-TAC_PAWP_BIOFUAM
  185. @Autowired
  186. private TacPawpBiofuamDao tacPawpBiofuamDao;
  187. //工程质量基本情况表--质量管理体制-TAC_PAWP_BITOPQ_QMS
  188. @Autowired
  189. private TacPawpBitopqQmsDao tacPawpBitopqQmsDao;
  190. //工程质量基本情况表--质量管理体制--体制列表-TAC_PAWP_BITOPQ_QMS_LIST
  191. //工程质量基本情况表--工程实体质量与验收-TAC_PAWP_BITOPQ_PEQAA
  192. @Autowired
  193. private TacPawpBitopqPeqaaDao tacPawpBitopqPeqaaDao;
  194. //工程安全基本情况表--项目法人-TAC_PAWP_BIOES_PE
  195. @Autowired
  196. private TacPawpBioesPeDao tacPawpBioesPeDao;
  197. //工程安全基本情况表--施工单位-TAC_PAWP_BIOES_RWUNIT
  198. @Autowired
  199. private TacPawpBioesRwunitDao tacPawpBioesRwunitDao;
  200. //稽察问题信息表-TAC_PBLM_INFO
  201. @Autowired
  202. private TacPawpBstocmCpssInfoDao tacPawpBstocmCpssInfoDao;
  203. @Autowired
  204. private AttFscBaseDao attFscBaseDao;
  205. @Autowired
  206. private BisInspFscRgstrDao bisInspFscRgstrDao;
  207. @Autowired
  208. private AttOtherBaseDao attOtherBaseDao;
  209. @Autowired
  210. private AttSdBaseDao sdBaseDao;
  211. @Autowired
  212. private BisInspOtherRgstrDao bisInspOtherRgstrDao;
  213. @Autowired
  214. private BisInspSdRgstrDao bisInspSdRgstrDao;
  215. @Autowired
  216. private BisInspSwhsRgstrDao swhsRgstrDao;
  217. //安全保障达标落实情况
  218. @Autowired
  219. private BisInspSwhsRgstrSafetyDao swhsRgstrSafetyDao;
  220. //保护措施监管情况
  221. @Autowired
  222. private BisInspSwhsRgstrMeasuresDao swhsRgstrMeasuresDao;
  223. //地级行政区应急备用水源建设情况
  224. @Autowired
  225. private BisInspSwhsRgstrWaterDao swhsRgstrWaterDao;
  226. @Autowired
  227. private AttSwhsBaseDao swhsBaseDao;
  228. //取水用户
  229. @Autowired
  230. private BisInspWiuRgstrDao wiuRgstrDao;
  231. //取水单位取用水情况
  232. @Autowired
  233. private BisInspWiuRgstrIntInfoDao wiuRgstrIntInfoDao;
  234. //取水许可审批监管情况
  235. @Autowired
  236. private BisInspWiuRgstrApprInfoDao wiuRgstrApprInfoDao;
  237. @Autowired
  238. private AttWiuBaseDao wiuBaseDao;
  239. @Autowired
  240. private BisInspOrgDao bisInspOrgDao;
  241. //行政区划取水量
  242. @Autowired
  243. private BisInspWintRgstrDao wintRgstrDao;
  244. //行政区填报表
  245. @Autowired
  246. private BisInspWintRgstrIntInfoDao wintRgstrIntInfoDao;
  247. @Autowired
  248. private AttAdXBaseDao attAdXBaseDao;
  249. @Autowired
  250. private BisInspSvwtAreaRgstrDao svwtAreaRgstrDao;
  251. @Autowired
  252. private BisInspSvwtAreaRgstrWseDao svwtAreaWseDao;
  253. @Autowired
  254. private BisInspSvwtAreaRgstrWswmDao svwtAreaWswmDao;
  255. @Autowired
  256. private BisInspSvwtWuntRgstrDao svwtWuntRgstrDao;
  257. @Autowired
  258. private BisInspSvwtWuntRgstrWuuswDao svwtWuntWuuswDao;
  259. @Autowired
  260. private BisInspSvwtWuntRgstrWsuswDao svwtWuntWsuswDao;
  261. @Autowired
  262. private AttWuntBaseDao wuntBaseDao;
  263. @Autowired
  264. private BisInspAllRlationPersDao bisInspAllRlationPersDao;
  265. @Autowired
  266. private AttGrwBaseDao grwBaseDao;
  267. @Autowired
  268. private OlBisInspOrgService inspOrgService;
  269. @Autowired
  270. private AttPrdCstrProjBaseDao attPrdCstrProjBaseDao;
  271. @Autowired
  272. private BisInspOprdCstrProjRgstrDao oprdCstrProjRgstrDao;
  273. @Autowired
  274. private BisInspRsmlRgstrDao bisInspRsmlRgstrDao;
  275. @Autowired
  276. private BisInspRsmlRgstrPresDao bisInspRsmlRgstrPresDao;
  277. @Autowired
  278. private BisInspRsmlRgstrProjectDao bisInspRsmlRgstrProjectDao;
  279. @Autowired
  280. private BisInspRsmlRgstrRunManageDao bisInspRsmlRgstrRunManageDao;
  281. @Autowired
  282. private BisInspRsraqgRgstrService bisInspRsraqgRgstrService;
  283. @Autowired
  284. private BisInspRsraqgRgstrCityService bisInspRsraqgRgstrCityService;
  285. @Autowired
  286. private BisInspRsraqgRgstrCountyService bisInspRsraqgRgstrCountyService;
  287. @Autowired
  288. private BisInspStndRgstrService bisInspStndRgstrService;
  289. @Autowired
  290. private BisZhejiangJgRgstrDao bisZhejiangJgRgstrDao;
  291. @Autowired
  292. private BisZhejiangJgRgstrService bisZhejiangJgRgstrService;
  293. @Autowired
  294. private BisInspRsfcoRgstrService bisInspRsfcoRgstrService;
  295. @Autowired
  296. private BisInspMfdpRgstrService bisInspMfdpRgstrService;
  297. @Autowired
  298. private BisInspRsfcoRgstrBaseDao bisInspRsfcoRgstrBaseDao;
  299. @Autowired
  300. private BisInspRsfcoRgstrFlliDao bisInspRsfcoRgstrFlliDao;
  301. @Autowired
  302. private BisInspRsfcoRgstrAoeparoDao bisInspRsfcoRgstrAoeparoDao;
  303. @Autowired
  304. private AttZhejiangJgBaseDao attZhejiangJgBaseDao;
  305. */
  306. /**
  307. * 根据用户信息与督查计划类型获取该用户可示可管理的单一机构的所有批次
  308. *
  309. * @param persid
  310. * @param ptype
  311. * @return
  312. *//*
  313. @Override
  314. public List<AllNodeDto> getNodeByPersid(String persid, String ptype, String orgId) {
  315. BisInspAllRlationPersDto bisInspAllRlationPersDto = this.supervisionPlanDao.getPersInfo(persid);
  316. String orgIdStr = AdCodeLabel.START_PARENT_ADCODE + ptype + bisInspAllRlationPersDto.getOrgId();
  317. if (ptype.length() == 2) {
  318. orgIdStr = "0" + ptype + bisInspAllRlationPersDto.getOrgId();
  319. }
  320. if (ptype.length() == 3) {
  321. orgIdStr = ptype + bisInspAllRlationPersDto.getOrgId();
  322. }
  323. List<AllNodeDto> listTemp = this.supervisionPlanDao.getNodeByOrgId(orgIdStr, orgId, inspOrgService.getProvince(orgId));
  324. return listTemp;
  325. }
  326. */
  327. /**
  328. * 获取督查组相关的对象、人员、区域信息(新)
  329. *
  330. * @param persid
  331. * @param inspYear
  332. * @param inspMnth
  333. * @param orgId
  334. * @return
  335. *//*
  336. @Override
  337. public List<PersAllInfoDto> getAllInfoByPersidAndOrgId(String persid, String inspYear, String inspMnth, String orgId) {
  338. String orgIdStr = "___" + orgId;
  339. //获取所有组
  340. List<PersAllInfoDto> persAllInfoDtoList = this.supervisionPlanDao.getAllInfoByPersidAndOrgId(persid, inspYear, inspMnth, orgIdStr, orgId, inspOrgService.getProvince(orgId));
  341. if (persAllInfoDtoList.size() > 0) {
  342. for (PersAllInfoDto p : persAllInfoDtoList) {
  343. String province = inspOrgService.getProvince(p.getOrgId());
  344. p.setPtype(String.valueOf(Integer.valueOf(p.getPtype())));
  345. //获取人员
  346. List<PersAllDto> persAllDtoList = this.supervisionPlanDao.getPersAllDtoList(p.getId(), p.getOrgId(), province);
  347. //获取督查对象
  348. List<PersAllObjDto> persAllObjDtoList = this.supervisionPlanDao.getPersAllObjDtoList(p.getId(), p.getOrgId(), province);
  349. //获取分工区域
  350. List<PersAllAreaDto> persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(p.getId(), p.getOrgId(), province);
  351. p.setPersAllDtoList(persAllDtoList);
  352. p.setPersAllObjDtoList(persAllObjDtoList);
  353. p.setPersAllAreaDtoList(persAllAreaDtoList);
  354. }
  355. }
  356. return persAllInfoDtoList;
  357. }
  358. */
  359. /**
  360. * 查询不在该督查组下的水库
  361. *
  362. * @param inGroupResParam
  363. * @return
  364. *//*
  365. @Override
  366. public PageInfo<AttSupResBase> getSupResByGroup(InGroupResParam inGroupResParam) {
  367. if (StringUtils.isNotBlank(inGroupResParam.getAdcd())) {
  368. String adCode = this.getAdCodeLike("1", inGroupResParam.getAdcd());
  369. inGroupResParam.setAdcd(adCode);
  370. }
  371. PageHelper.startPage(inGroupResParam.getPageNum(), inGroupResParam.getPageSize());
  372. List<AttSupResBase> attGrwBaseList = this.supervisionPlanDao.getSupResByGroup(inGroupResParam);
  373. PageInfo<AttSupResBase> pageInfo = new PageInfo(attGrwBaseList);
  374. return pageInfo;
  375. }
  376. */
  377. /**
  378. * 查询不在督查组督查范围内的督查对象(人饮、水毁、水利工程建设、地下水、水闸、水利工程运行、稽察项目)
  379. *
  380. * @param inspObjParam
  381. * @return
  382. *//*
  383. @Override
  384. public Object getSupObjListNotInspGroupId(InspObjParam inspObjParam) {
  385. //设置分页
  386. PageHelper.startPage(inspObjParam.getPageNum(), inspObjParam.getPageSize());
  387. String adCode = this.getAdCodeLike(inspObjParam.getObjType(), inspObjParam.getAdCode());
  388. String province = inspObjParam.getProvince();
  389. inspObjParam.setProvince(province);
  390. if ("1".equalsIgnoreCase(inspObjParam.getObjType()) || "36".equalsIgnoreCase(inspObjParam.getObjType())) {
  391. //小水库或者 36类型 或者 小水库标准化
  392. InGroupResParam inGroupResParam = new InGroupResParam();
  393. inGroupResParam.setAdcd(inspObjParam.getAdCode());
  394. inGroupResParam.setAdnm(inspObjParam.getAdName());
  395. inGroupResParam.setEngScal(inspObjParam.getEngScal());
  396. inGroupResParam.setGroupId(inspObjParam.getInspGroupId());
  397. inGroupResParam.setRsName(inspObjParam.getNm());
  398. inGroupResParam.setOrderBy(inspObjParam.getOrderBy());
  399. inGroupResParam.setState(inspObjParam.getState());
  400. inGroupResParam.setPageSize(inspObjParam.getPageSize());
  401. inGroupResParam.setPageNum(inspObjParam.getPageNum());
  402. inGroupResParam.setAdcd(adCode);
  403. inGroupResParam.setProvince(province);
  404. inGroupResParam.setpType(inspObjParam.getObjType());
  405. inGroupResParam.setHstInsp(inspObjParam.getHstInsp());
  406. List<AttSupResBase> attGrwBaseList = this.supervisionPlanDao.getSupResByGroup(inGroupResParam);
  407. PageInfo<AttSupResBase> pageInfo = new PageInfo(attGrwBaseList);
  408. return pageInfo;
  409. } else if (BisInspEnum.RSML.getValue().equals(inspObjParam.getObjType())) {
  410. InGroupResParam inGroupResParam = new InGroupResParam();
  411. inGroupResParam.setAdcd(inspObjParam.getAdCode());
  412. inGroupResParam.setAdnm(inspObjParam.getAdName());
  413. inGroupResParam.setEngScal(inspObjParam.getEngScal());
  414. inGroupResParam.setGroupId(inspObjParam.getInspGroupId());
  415. inGroupResParam.setRsName(inspObjParam.getNm());
  416. inGroupResParam.setOrderBy(inspObjParam.getOrderBy());
  417. inGroupResParam.setState(inspObjParam.getState());
  418. inGroupResParam.setPageSize(inspObjParam.getPageSize());
  419. inGroupResParam.setPageNum(inspObjParam.getPageNum());
  420. inGroupResParam.setAdcd(adCode);
  421. inGroupResParam.setpType(inspObjParam.getObjType());
  422. inGroupResParam.setProvince(province);
  423. List<AttSupResBase> attGrwBaseList = this.supervisionPlanDao.getSupResRsmlByGroup(inGroupResParam);
  424. PageInfo<AttSupResBase> pageInfo = new PageInfo(attGrwBaseList);
  425. return pageInfo;
  426. } else if (BisInspEnum.STND.getValue().equals(inspObjParam.getObjType())) {
  427. //小水库或者 36类型 或者 小水库标准化
  428. InGroupResParam inGroupResParam = new InGroupResParam();
  429. inGroupResParam.setAdcd(inspObjParam.getAdCode());
  430. inGroupResParam.setAdnm(inspObjParam.getAdName());
  431. inGroupResParam.setEngScal(inspObjParam.getEngScal());
  432. inGroupResParam.setGroupId(inspObjParam.getInspGroupId());
  433. inGroupResParam.setRsName(inspObjParam.getNm());
  434. inGroupResParam.setOrderBy(inspObjParam.getOrderBy());
  435. inGroupResParam.setState(inspObjParam.getState());
  436. inGroupResParam.setPageSize(inspObjParam.getPageSize());
  437. inGroupResParam.setPageNum(inspObjParam.getPageNum());
  438. inGroupResParam.setAdcd(adCode);
  439. inGroupResParam.setProvince(province);
  440. inGroupResParam.setpType(inspObjParam.getObjType());
  441. inGroupResParam.setHstInsp(inspObjParam.getHstInsp());
  442. List<AttSupResBase> attGrwBaseList = this.supervisionPlanDao.getSupResStndByGroup(inGroupResParam);
  443. PageInfo<AttSupResBase> pageInfo = new PageInfo(attGrwBaseList);
  444. return pageInfo;
  445. } else if (BisInspEnum.VILL.getValue().equalsIgnoreCase(inspObjParam.getObjType())
  446. ||BisInspEnum.VILLZHEJIANG.getValue().equals(inspObjParam.getObjType())||
  447. BisInspEnum.VILL2020.getValue().equalsIgnoreCase(inspObjParam.getObjType()) || BisInspEnum.MFDP.getValue().equals(inspObjParam.getObjType())
  448. || BisInspEnum.IRR.getValue().equals(inspObjParam.getObjType())
  449. ) {
  450. if (StringUtils.isNotBlank(inspObjParam.getAdCode())) {
  451. adCode = inspObjParam.getAdCode().replace("00", "");
  452. if (adCode.length() == 2) {
  453. adCode = adCode + "____000000";
  454. } else if (adCode.length() == 4) {
  455. adCode = adCode + "__000000";
  456. } else {
  457. adCode = adCode + "000000";
  458. }
  459. } else {
  460. adCode = "______000000";
  461. inspObjParam.setAdCode(adCode);
  462. }
  463. List<AttSupAdBase> result = supervisionPlanDao.getSupCwsListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getAdName()
  464. , adCode, inspObjParam.getNm(), inspObjParam.getOrderBy());
  465. return new PageInfo<AttSupAdBase>(result);
  466. } else if (BisInspEnum.TRACK.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  467. List<BisInspSupWtdst> result = supervisionPlanDao.getSupWtdListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getWtdstType()
  468. , inspObjParam.getWtdstNm(), inspObjParam.getWtdstState(), adCode, inspObjParam.getNm(), inspObjParam.getOrderBy());
  469. return new PageInfo<BisInspSupWtdst>(result);
  470. } else if (BisInspEnum.EMPWT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//172重点工程
  471. List<EmpwtprjDto> result = supervisionPlanDao.getSupEmpListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(),
  472. inspObjParam.getNm(), adCode, "2", inspObjParam.getOrderBy(), inspObjParam.getOrgId(), province);
  473. return new PageInfo<EmpwtprjDto>(result);
  474. } else if (BisInspEnum.GRW.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//地下水
  475. List<GrwDto> result = supervisionPlanDao.getSupGrwListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(), inspObjParam.getNm(),
  476. adCode, inspObjParam.getOrderBy(), inspObjParam.getSttp(), inspObjParam.getGateType(), inspObjParam.getOrgId(), province);
  477. return new PageInfo<GrwDto>(result);
  478. } else if (BisInspEnum.WAGA.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//水闸
  479. inspObjParam.setAdCode(adCode);
  480. inspObjParam.setProvince(province);
  481. List<WagaDto> result = supervisionPlanDao.getSupWagaListNotInspGroupId(inspObjParam);
  482. return new PageInfo<WagaDto>(result);
  483. } else if (BisInspEnum.EMPWTRUN.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//172重点工程运行
  484. List<EmpwtprjDto> result = supervisionPlanDao.getSupEmpListNotInspGroupId(inspObjParam.getInspGroupId(), inspObjParam.getObjType(), inspObjParam.getNm(), adCode, "1", inspObjParam.getOrderBy(), inspObjParam.getOrgId(), province);
  485. return new PageInfo<EmpwtprjDto>(result);
  486. } else if (BisInspEnum.PAWP.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {//稽察项目
  487. inspObjParam.setAdCode(adCode);
  488. inspObjParam.setProvince(province);
  489. List<TacAttPawpBase> result = supervisionPlanDao.getSupPawpListNotInspGroupId(inspObjParam);
  490. return new PageInfo<TacAttPawpBase>(result);
  491. } else if (BisInspEnum.FSC.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  492. inspObjParam.setAdCode(adCode);
  493. List<AttFscBaseDto> result = supervisionPlanDao.getSupFscListNotInspGroupId(inspObjParam);
  494. return new PageInfo<AttFscBaseDto>(result);
  495. } else if (BisInspEnum.OTHER.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  496. inspObjParam.setAdCode(adCode);
  497. List<AttOtherBaseDto> result = supervisionPlanDao.getSupOtherListNotInspGroupId(inspObjParam);
  498. return new PageInfo<AttOtherBaseDto>(result);
  499. } else if (BisInspEnum.SD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  500. inspObjParam.setAdCode(adCode);
  501. List<AttSdBase> result = supervisionPlanDao.getSupSdListNotInspGroupId(inspObjParam);
  502. return new PageInfo<AttSdBase>(result);
  503. } else if (BisInspEnum.WIU.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  504. inspObjParam.setAdCode(adCode);
  505. List<AttWiuBase> result = supervisionPlanDao.getSupWiuListNotInspGroupId(inspObjParam);
  506. return new PageInfo<AttWiuBase>(result);
  507. } else if (BisInspEnum.SWHS.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  508. inspObjParam.setAdCode(adCode);
  509. List<AttSwhsBase> result = supervisionPlanDao.getSupSwhsListNotInspGroupId(inspObjParam);
  510. return new PageInfo<AttSwhsBase>(result);
  511. } else if (BisInspEnum.CITY.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  512. inspObjParam.setAdCode(adCode);
  513. List<SupervisionPlanDto> result = supervisionPlanDao.getAdXBaseListNotInspGroupId(inspObjParam);
  514. return new PageInfo<SupervisionPlanDto>(result);
  515. } else if (BisInspEnum.SVWT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  516. inspObjParam.setAdCode(adCode);
  517. List<SupervisionPlanDto> result = supervisionPlanDao.getAdXBaseListNotInspGroupId(inspObjParam);
  518. return new PageInfo<SupervisionPlanDto>(result);
  519. } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  520. inspObjParam.setAdCode(adCode);
  521. List<SupervisionPlanDto> result = supervisionPlanDao.getWuntListNotInspGroupId(inspObjParam);
  522. return new PageInfo<SupervisionPlanDto>(result);
  523. } else if (BisInspEnum.PRD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  524. inspObjParam.setAdCode(adCode);
  525. List<SupervisionPlanDto> result = supervisionPlanDao.getPrdListNotInspGroupId(inspObjParam);
  526. return new PageInfo<SupervisionPlanDto>(result);
  527. } else if (BisInspEnum.JSFL.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  528. inspObjParam.setAdCode(adCode);
  529. List<SupervisionPlanDto> result = supervisionPlanDao.getJSFLListNotInspGroupId(inspObjParam);
  530. return new PageInfo<SupervisionPlanDto>(result);
  531. } else if (BisInspEnum.JSWA.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  532. inspObjParam.setAdCode(adCode);
  533. List<SupervisionPlanDto> result = supervisionPlanDao.getJSWAListNotInspGroupId(inspObjParam);
  534. return new PageInfo<SupervisionPlanDto>(result);
  535. } else if (BisInspEnum.ECOFRD.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  536. inspObjParam.setAdCode(adCode);
  537. List<SupervisionPlanDto> result = supervisionPlanDao.getEcofrdListNotInspGroupId(inspObjParam);
  538. return new PageInfo<SupervisionPlanDto>(result);
  539. } else if (BisInspEnum.RSFCO.getValue().equals(inspObjParam.getObjType())) {
  540. inspObjParam.setAdCode(adCode);
  541. List<AttRsBase> result = supervisionPlanDao.getRsBaseListNotInspGroupId(inspObjParam);
  542. return new PageInfo<AttRsBase>(result);
  543. } else if (BisInspEnum.RSRAQG.getValue().equalsIgnoreCase(inspObjParam.getObjType())) {
  544. inspObjParam.setAdCode(adCode);
  545. List<SupervisionPlanDto> result = supervisionPlanDao.getAdBaseListNotInspGroupId(inspObjParam);
  546. return new PageInfo<SupervisionPlanDto>(result);
  547. }else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equalsIgnoreCase(inspObjParam.getObjType())){
  548. inspObjParam.setAdCode(adCode);
  549. //获取不在督查组中的对象
  550. List<SupervisionPlanDto> result = supervisionPlanDao.getNotSuperviseGroupObj(inspObjParam);
  551. return new PageInfo<SupervisionPlanDto>(result);
  552. } else if (BisInspEnum.MFDP.getValue().equals(inspObjParam.getObjType())){
  553. List<AttSupAdBase> result = supervisionPlanDao.getSupMfdpListNotInspGroupId(inspObjParam.getInspGroupId(), province, inspObjParam.getObjType(), inspObjParam.getAdName()
  554. , adCode, inspObjParam.getNm(), inspObjParam.getOrderBy());
  555. return new PageInfo<AttSupAdBase>(result);
  556. } else if (BisInspEnum.RSFCO.getValue().equals(inspObjParam.getObjType())) {
  557. inspObjParam.setAdCode(adCode);
  558. List<AttRsBase> result = supervisionPlanDao.getRsBaseListNotInspGroupId(inspObjParam);
  559. return new PageInfo<AttRsBase>(result);
  560. }else if(BisInspEnum.SAP.getValue().equalsIgnoreCase(inspObjParam.getObjType())){
  561. inspObjParam.setAdCode(adCode);
  562. List<BisInspWagaSapRgstr> result = supervisionPlanDao.getSapBaseListNotInspGroupId(inspObjParam);
  563. return new PageInfo<BisInspWagaSapRgstr>(result);
  564. } else if(BisInspEnum.EFP.getValue().equals(inspObjParam.getObjType())) {
  565. List<SupervisionPlanDto> result = supervisionPlanDao.getEfpBaseListNotInspGroupId(inspObjParam);
  566. return new PageInfo<SupervisionPlanDto>(result);
  567. }
  568. return null;
  569. }
  570. public String getAdCodeLike(String objType, String ad) {
  571. String adCode = "";
  572. if (StringUtils.isNotBlank(ad)) {
  573. String eName = "AD_CODE";
  574. if ("1".equals(objType) || "22".equals(objType) || "24".equals(objType) || BisInspEnum.RSFCO.getValue().equals(objType)) {
  575. eName = "ADM_DIV";
  576. } else if ("3".equals(objType)) {
  577. eName = "LOC_AD";
  578. } else if ("5".equals(objType)) {
  579. eName = "ADCD";
  580. } else {
  581. eName = "AD_CODE";
  582. }
  583. if (ad.contains(SplitValue.DOUHAO_SPLIT)) {//如果有多个行政区划编码,要根据逗号分隔截取
  584. StringBuffer stringBuffer = new StringBuffer();
  585. String[] split = ad.split(SplitValue.DOUHAO_SPLIT);
  586. for (String s : split) {//拼接sql,对多个截取后的行政区划进行模糊查询
  587. String subAd = AdLevelUtil.SubAd(s).get("subAd").toString();
  588. stringBuffer.append(subAd);
  589. stringBuffer.append("%");
  590. stringBuffer.append("' OR " + eName + " LIKE '");
  591. }
  592. //将最后的“ OR ADM_DIV LIKE ”截掉
  593. String substring = stringBuffer.substring(0, stringBuffer.length() - 18);
  594. substring = "(" + eName + " LIKE '" + substring + ")";
  595. adCode = substring;
  596. } else {
  597. String subAd = AdLevelUtil.SubAd(ad).get("subAd").toString();
  598. subAd = eName + " LIKE '" + subAd + "%'";
  599. adCode = subAd;
  600. }
  601. }
  602. return adCode;
  603. }
  604. @Override
  605. public SupInsertResult insertSupervisionObj(PersAllInfoDto persAllInfoDto) {
  606. SupInsertResult supInsertResult = new SupInsertResult();
  607. String province = inspOrgService.getProvince(persAllInfoDto.getOrgId());
  608. if (persAllInfoDto != null) {
  609. //修改督查组名称
  610. if (StringUtils.isNotBlank(persAllInfoDto.getNm()) || StringUtils.isNotBlank(persAllInfoDto.getSttm()) || StringUtils.isNotBlank(persAllInfoDto.getEntm())) {
  611. BisInspAllDto bisInspAllDto = new BisInspAllDto();
  612. bisInspAllDto.setId(persAllInfoDto.getId());
  613. bisInspAllDto.setPid(persAllInfoDto.getPid());
  614. bisInspAllDto.setPnm(persAllInfoDto.getNm());
  615. bisInspAllDto.setPsn(persAllInfoDto.getPsn());
  616. bisInspAllDto.setOrgId(persAllInfoDto.getOrgId());
  617. bisInspAllDto.setInspTask(persAllInfoDto.getInspTask());
  618. bisInspAllDto.setSttm(persAllInfoDto.getSttm());
  619. bisInspAllDto.setEntm(persAllInfoDto.getEntm());
  620. bisInspAllDto.setInspYear(persAllInfoDto.getInspYear());
  621. bisInspAllDto.setInspMnth(persAllInfoDto.getInspMnth());
  622. this.supervisionPlanDao.updateNode(bisInspAllDto);
  623. }
  624. //添加督查组人员
  625. if (persAllInfoDto.getPersAllDtoList() != null && persAllInfoDto.getPersAllDtoList().size() > 0) {
  626. for (PersAllDto pers : persAllInfoDto.getPersAllDtoList()) {
  627. this.supervisionPlanDao.insertPers(persAllInfoDto.getId(), pers.getGuid(), pers.getPersType(), persAllInfoDto.getOrgId(), persAllInfoDto.getProvince());
  628. }
  629. }
  630. //添加督查对象
  631. if (persAllInfoDto.getPersAllObjDtoList() != null && persAllInfoDto.getPersAllObjDtoList().size() > 0) {
  632. OlBisInspOrg inspOrg = inspOrgService.get(persAllInfoDto.getOrgId());
  633. String adCode = inspOrg.getRlcode();
  634. for (PersAllObjDto persObj : persAllInfoDto.getPersAllObjDtoList()) {
  635. String type = persObj.getPtype();
  636. if (type.length() == 1) {
  637. type = "00" + type;
  638. }
  639. if (type.length() == 2) {
  640. type = "0" + type;
  641. }
  642. //查询经纬度
  643. LgtdAndLttd ld = this.supervisionPlanDao.getLgtdAndLttd(persObj.getCode(), type);
  644. String uuid = UuidUtil.uuid();
  645. BisInspAllObj bisInspAllObj = new BisInspAllObj();
  646. bisInspAllObj.setCode(persObj.getCode());
  647. bisInspAllObj.setId(persAllInfoDto.getId());
  648. bisInspAllObj.setNm(persObj.getName());
  649. if (ld != null) {
  650. bisInspAllObj.setLgtd(ld.getLgtd());
  651. bisInspAllObj.setLttd(ld.getLttd());
  652. bisInspAllObj.setLgtdpc(ld.getLgtdPc());
  653. bisInspAllObj.setLttdpc(ld.getLttdPc());
  654. }
  655. bisInspAllObj.setObjId(uuid);
  656. bisInspAllObj.setPtype(persObj.getPtype());
  657. if (!adCode.startsWith(AdCodeLabel.START_PARENT_ADCODE)) {
  658. bisInspAllObj.setAdCode(adCode);
  659. bisInspAllObj.setOrgId(persAllInfoDto.getOrgId());
  660. }
  661. bisInspAllObj.setProvince(province);
  662. this.bisInspAllObjDao.insert(bisInspAllObj);
  663. //添加督查对象
  664. //添加到登记表
  665. //水库
  666. if (BisInspEnum.REVER.getValue().equals(persObj.getPtype()) || BisInspEnum.BIGREVR.getValue().equals(persObj.getPtype())) {
  667. AttRsBaseParam baseParam = new AttRsBaseParam();
  668. baseParam.setRsCode(bisInspAllObj.getCode());
  669. AttRsBase attRsBase = attRsBaseDao.getBy(baseParam);
  670. BisInspRsvrRgstr b = new BisInspRsvrRgstr();
  671. String registrId = UUID.randomUUID().toString().replace(SplitValue.HENG_SPLIT, "");
  672. b.setRgstrId(registrId);
  673. b.setObjId(bisInspAllObj.getObjId());
  674. b.setRsCode(attRsBase.getRsCode());
  675. b.setRsvrNm(bisInspAllObj.getNm());
  676. b.setAdCode(attRsBase.getAdmDiv());
  677. b.setOrgId(bisInspAllObj.getOrgId());
  678. b.setRsvrAdmName(attRsBase.getRsAdmName());
  679. if (attRsBase.getDamSizeHig() == null) {
  680. b.setDamMaxHigh(null);
  681. } else {
  682. b.setDamMaxHigh(Double.toString(attRsBase.getDamSizeHig()));
  683. }
  684. b.setEngScal(attRsBase.getEngScal());
  685. if (StringUtils.isNotBlank(attRsBase.getLocation())) {
  686. b.setHystSite(attRsBase.getLocation());
  687. } else {
  688. b.setHystSite(attRsBase.getRsLoc());
  689. }
  690. if (attRsBase.getCenterYGd() != null) {
  691. b.setRsvrLat(Double.parseDouble(attRsBase.getCenterYGd()));
  692. }
  693. if (attRsBase.getCenterXGd() != null) {
  694. b.setRsvrLong(Double.parseDouble(attRsBase.getCenterXGd()));
  695. }
  696. b.setResCreateTime(attRsBase.getCompDate());
  697. b.setHystSite(attRsBase.getRsLoc());
  698. b.setTotCap(attRsBase.getTotCap());
  699. b.setLocation(attRsBase.getLocation());
  700. b.setDamRegCode(attRsBase.getRegCode());
  701. b.setDamType(attRsBase.getDamType());
  702. b.setHasDamRegCode("1");
  703. b.setState(StateEnum.NOWASTSTATE.getKey());
  704. b.setCompDateStr(attRsBase.getCompDateStr());
  705. b.setPresStat(StateEnum.NOWASTSTATE.getKey());
  706. b.setBaseStat(StateEnum.NOWASTSTATE.getKey());
  707. b.setResRunStat(StateEnum.NOWASTSTATE.getKey());
  708. b.setViewStat(StateEnum.NOWASTSTATE.getKey());
  709. b.setDataStat(StateEnum.NOWASTSTATE.getKey());
  710. b.setRsClass(attRsBase.getRsClass());
  711. b.setImpdDt(attRsBase.getImpdDt());
  712. b.setRnfcImpdDt(attRsBase.getRnfcImpdDt());
  713. b.setDesFlStag(attRsBase.getDesFlStag());
  714. b.setFlConTopStag(attRsBase.getFlConTopStag());
  715. b.setDamType(attRsBase.getDamType());
  716. Date date = new Date();
  717. b.setIntm(date);
  718. b.setUptm(date);
  719. bisInspRsvrRgstrService.insert(b);
  720. }
  721. //人饮
  722. else if (BisInspEnum.VILL.getValue().equals(persObj.getPtype())) {
  723. BisInspVillRgstr bisInspVillRgstr = new BisInspVillRgstr();
  724. String uuid1 = UuidUtil.uuid();
  725. String now = DateUtils.getTodayYMDHMS();
  726. bisInspVillRgstr.setIntm(now);
  727. bisInspVillRgstr.setRecPersId(persAllInfoDto.getPersid());
  728. bisInspVillRgstr.setUptm(now);
  729. bisInspVillRgstr.setEngId(uuid1);
  730. bisInspVillRgstr.setOrgId(bisInspAllObj.getOrgId());
  731. bisInspVillRgstr.setObjId(bisInspAllObj.getObjId());
  732. bisInspVillRgstr.setRegsNm(bisInspAllObj.getNm());
  733. bisInspVillRgstrService.insert(bisInspVillRgstr);
  734. }
  735. //水毁
  736. else if (BisInspEnum.TRACK.getValue().equals(persObj.getPtype())) {
  737. BisInspWtdstDtoListParam bisInspWtdstDtoListParam = new BisInspWtdstDtoListParam();
  738. bisInspWtdstDtoListParam.setObjId(bisInspAllObj.getObjId());
  739. List<BisInspWtdstDetailDto> list = bisInspWtdstDao.findDtoList(bisInspWtdstDtoListParam);
  740. if (list != null && list.size() > 0) {
  741. BisInspWtdstDetailDto wtdstDetailDto = list.get(0);
  742. BisInspWtdstTrack p = new BisInspWtdstTrack();
  743. String uuid1 = UuidUtil.uuid();
  744. String now = DateUtils.getTodayYMDHMS();
  745. p.setIntm(now);
  746. p.setUptm(now);
  747. p.setTrackId(uuid1);
  748. p.setOrgId(bisInspAllObj.getOrgId());
  749. p.setObjId(wtdstDetailDto.getObjId());
  750. p.setObjNm(wtdstDetailDto.getWtdstNm());
  751. p.setLoac(wtdstDetailDto.getLocNm());
  752. p.setDisContent(wtdstDetailDto.getDisContent());
  753. p.setPlanTm(wtdstDetailDto.getPlanTm());
  754. p.setDataStat("0");
  755. bisInspWtdstTrackServiceImpl.insert(p);
  756. }
  757. }
  758. //水利工程建设
  759. else if (BisInspEnum.EMPWT.getValue().equals(persObj.getPtype())) {
  760. BisInspKeyRegister bisInspKeyRegister = new BisInspKeyRegister();
  761. AttEmpwtprjBase attEmpwtprjBase = attEmpwtprjBaseDao.get(bisInspAllObj.getCode());
  762. if (attEmpwtprjBase != null) {
  763. bisInspKeyRegister.setPtype(attEmpwtprjBase.getPtype());
  764. bisInspKeyRegister.setAdCode(attEmpwtprjBase.getAdCode());
  765. bisInspKeyRegister.setNm(attEmpwtprjBase.getNm());
  766. bisInspKeyRegister.setStwktm(attEmpwtprjBase.getStwktm());
  767. bisInspKeyRegister.setPlantm(attEmpwtprjBase.getPlantm());
  768. bisInspKeyRegister.setEstapp(Double.parseDouble(attEmpwtprjBase.getEstapp()));
  769. bisInspKeyRegister.setLgtd(attEmpwtprjBase.getLgtd());
  770. bisInspKeyRegister.setLttd(attEmpwtprjBase.getLttd());
  771. bisInspKeyRegister.setLgtdPc(attEmpwtprjBase.getLgtdPc());
  772. bisInspKeyRegister.setLttdPc(attEmpwtprjBase.getLttdPc());
  773. bisInspKeyRegister.setOrgId(bisInspAllObj.getOrgId());
  774. bisInspKeyRegister.setUnitId(attEmpwtprjBase.getUnitId());
  775. bisInspKeyRegister.setUnitNm(attEmpwtprjBase.getUnitNm());
  776. bisInspKeyRegister.setObjId(bisInspAllObj.getObjId());
  777. bisInspKeyRegister.setId(UuidUtil.uuid());
  778. bisInspKeyRegister.setIntm(new Date());
  779. bisInspKeyRegister.setUptm(new Date());
  780. bisInspKeyRegister.setRecPersId(persAllInfoDto.getPersid());
  781. bisInspKeyRegister.setDataStat("1");
  782. bisInspKeyRegister.setEngSta(attEmpwtprjBase.getEngSta());
  783. bisInspKeyRegister.setBuidTimeYear(attEmpwtprjBase.getBuidTimeYear());
  784. bisInspKeyRegister.setState(StateEnum.NOWASTSTATE.getKey());
  785. bisInspKeyRegister.setSecStat(StateEnum.NOWASTSTATE.getKey());
  786. bisInspKeyRegister.setOneUnitStat(StateEnum.NOWASTSTATE.getKey());
  787. bisInspKeyRegister.setTwoUnitStat(StateEnum.NOWASTSTATE.getKey());
  788. bisInspKeyRegister.setThreeUnitStat(StateEnum.NOWASTSTATE.getKey());
  789. bisInspKeyRegisterService.insert(bisInspKeyRegister);
  790. }
  791. }
  792. //地下水
  793. else if (BisInspEnum.GRW.getValue().equals(persObj.getPtype())) {
  794. AttGrwBase attGrwBase = this.bisInspBaseDao.getGroundWaterByCode(bisInspAllObj.getCode());
  795. BisInspGrw b = new BisInspGrw();
  796. b.setId(UUID.randomUUID().toString().replace(SplitValue.HENG_SPLIT, ""));
  797. b.setObjId(bisInspAllObj.getObjId());
  798. b.setStcd(bisInspAllObj.getCode());
  799. b.setStnm(bisInspAllObj.getNm());
  800. b.setSttp(attGrwBase.getSttp());
  801. b.setStlc(attGrwBase.getStlc());
  802. Date d = new Date();
  803. SimpleDateFormat df = new SimpleDateFormat(SplitValue.TIME_SPLIT_SEC);//设置日期格式
  804. String format = df.format(d);
  805. b.setInTm(format);
  806. b.setUpTm(format);
  807. b.setFlagValid("1");
  808. b.setInspState(CommonLabel.INIT_DATA);
  809. bisInspGrwService.insert(b);
  810. }
  811. //水闸
  812. else if (BisInspEnum.WAGA.getValue().equals(persObj.getPtype())) {//水闸
  813. String state = StateEnum.NOWASTSTATE.getKey();
  814. AttWagaRgstr wagaRgstr = new AttWagaRgstr();
  815. AttWagaBase wagaBase = wagaBaseDao.get(bisInspAllObj.getCode());
  816. wagaRgstr.setId(UuidUtil.uuid());
  817. wagaRgstr.setSafeStat(state);
  818. wagaRgstr.setProenStat(state);
  819. wagaRgstr.setMrsCiStat(state);
  820. wagaRgstr.setDmamStat(state);
  821. wagaRgstr.setLocationXiang(wagaBase.getLocationXiang());
  822. wagaRgstr.setAdCode(wagaBase.getAdCode());
  823. wagaRgstr.setState(state);
  824. wagaRgstr.setCenterX(wagaBase.getCenterX());
  825. wagaRgstr.setCenterY(wagaBase.getCenterY());
  826. wagaRgstr.setDataStat(state);
  827. wagaRgstr.setEngScal(wagaBase.getEngScal());
  828. wagaRgstr.setGateAdmName(wagaBase.getGateAdmName());
  829. wagaRgstr.setGateFlow(wagaBase.getGateFlow());
  830. wagaRgstr.setGateType(wagaBase.getGateType());
  831. wagaRgstr.setGateName(wagaBase.getGateName());
  832. wagaRgstr.setOrgId(bisInspAllObj.getOrgId());
  833. wagaRgstr.setGdX(wagaBase.getGdX());
  834. wagaRgstr.setGdY(wagaBase.getGdY());
  835. wagaRgstr.setIntm(new Date());
  836. wagaRgstr.setPersId(persAllInfoDto.getPersid());
  837. wagaRgstr.setEngSta(wagaBase.getEngSta());
  838. wagaRgstr.setLocation(wagaBase.getLocationCun());
  839. wagaRgstr.setBuidTimeMon(wagaBase.getBuidTimeMon());
  840. wagaRgstr.setBuidTimeYear(wagaBase.getBuidTimeYear());
  841. wagaRgstr.setStaTimeMon(wagaBase.getStaTimeMon());
  842. wagaRgstr.setStaTimeYear(wagaBase.getStaTimeYear());
  843. wagaRgstr.setObjCode(bisInspAllObj.getCode());
  844. wagaRgstr.setObjId(bisInspAllObj.getObjId());
  845. wagaRgstr.setGateAdmOrg(wagaBase.getLocRvName());
  846. wagaRgstr.setGroupId(persAllInfoDto.getId());
  847. attWagaRgstrService.insert(wagaRgstr);
  848. }
  849. //水利工程运行
  850. else if (BisInspEnum.EMPWTRUN.getValue().equals(persObj.getPtype())) {
  851. BisInspKeyRegister bisInspKeyRegister = new BisInspKeyRegister();
  852. AttEmpwtprjBase attEmpwtprjBase = attEmpwtprjBaseDao.get(bisInspAllObj.getCode());
  853. if (attEmpwtprjBase != null) {
  854. bisInspKeyRegister.setPtype(attEmpwtprjBase.getPtype());
  855. bisInspKeyRegister.setAdCode(attEmpwtprjBase.getAdCode());
  856. bisInspKeyRegister.setNm(attEmpwtprjBase.getNm());
  857. bisInspKeyRegister.setId(UuidUtil.uuid());
  858. bisInspKeyRegister.setEngSta(attEmpwtprjBase.getEngSta());
  859. bisInspKeyRegister.setBuidTimeYear(attEmpwtprjBase.getBuidTimeYear());
  860. bisInspKeyRegister.setStwktm(attEmpwtprjBase.getStwktm());
  861. bisInspKeyRegister.setPlantm(attEmpwtprjBase.getPlantm());
  862. bisInspKeyRegister.setEstapp(Double.parseDouble(attEmpwtprjBase.getEstapp()));
  863. bisInspKeyRegister.setLgtd(attEmpwtprjBase.getLgtd());
  864. bisInspKeyRegister.setLttd(attEmpwtprjBase.getLttd());
  865. bisInspKeyRegister.setOrgId(bisInspAllObj.getOrgId());
  866. bisInspKeyRegister.setLgtdPc(attEmpwtprjBase.getLgtdPc());
  867. bisInspKeyRegister.setLttdPc(attEmpwtprjBase.getLttdPc());
  868. bisInspKeyRegister.setUnitId(attEmpwtprjBase.getUnitId());
  869. bisInspKeyRegister.setUnitNm(attEmpwtprjBase.getUnitNm());
  870. bisInspKeyRegister.setObjId(bisInspAllObj.getObjId());
  871. bisInspKeyRegister.setIntm(new Date());
  872. bisInspKeyRegister.setUptm(new Date());
  873. bisInspKeyRegister.setDataStat("1");//有效
  874. bisInspKeyRegister.setState(StateEnum.NOWASTSTATE.getKey());
  875. bisInspKeyRegister.setSecStat(StateEnum.NOWASTSTATE.getKey());
  876. bisInspKeyRegister.setRecPersId(persAllInfoDto.getPersid());
  877. bisInspKeyRegister.setOneUnitStat(StateEnum.NOWASTSTATE.getKey());
  878. bisInspKeyRegister.setTwoUnitStat(StateEnum.NOWASTSTATE.getKey());
  879. bisInspKeyRegister.setThreeUnitStat(StateEnum.NOWASTSTATE.getKey());
  880. bisInspKeyRegisterService.insert(bisInspKeyRegister);
  881. }
  882. }
  883. //稽察项目
  884. else if (BisInspEnum.PAWP.getValue().equals(persObj.getPtype())) {
  885. TacAttPawpBase tacAttPawpBase = tacAttPawpBaseDao.get(bisInspAllObj.getCode());
  886. TacPawpRgstr tacPawpRgstr = new TacPawpRgstr();
  887. String uuid1 = UuidUtil.uuid();
  888. tacPawpRgstr.setId(uuid1);
  889. tacPawpRgstr.setObjId(bisInspAllObj.getObjId());
  890. tacPawpRgstr.setName(tacAttPawpBase.getName());
  891. tacPawpRgstr.setAdmOrg(tacAttPawpBase.getAdmOrg());
  892. tacPawpRgstr.setAdCode(tacAttPawpBase.getAdCode());
  893. tacPawpRgstr.setLocation(tacAttPawpBase.getLocation());
  894. tacPawpRgstr.setType(tacAttPawpBase.getType());
  895. tacPawpRgstr.setCenterX(tacAttPawpBase.getCenterX());
  896. tacPawpRgstr.setCenterY(tacAttPawpBase.getCenterY());
  897. tacPawpRgstr.setGdX(tacAttPawpBase.getGdX());
  898. tacPawpRgstr.setGdY(tacAttPawpBase.getGdY());
  899. tacPawpRgstr.setProvince(province);
  900. tacPawpRgstr.setOrgId(bisInspAllObj.getOrgId());
  901. tacPawpRgstr.setGroupId(bisInspAllObj.getId());
  902. tacPawpRgstr.setState("0");
  903. tacPawpRgstr.setDataStat("0");
  904. tacPawpRgstrDao.insert(tacPawpRgstr);
  905. } else if (BisInspEnum.FSC.getValue().equals(persObj.getPtype())) {
  906. AttFscBase attFscBase = attFscBaseDao.get(bisInspAllObj.getCode());
  907. BisInspFscRgstr fscRgstr = new BisInspFscRgstr(attFscBase);
  908. fscRgstr.setId(UuidUtil.uuid());
  909. fscRgstr.setObjId(bisInspAllObj.getObjId());
  910. fscRgstr.setName(attFscBase.getName());
  911. fscRgstr.setAdmOrg(attFscBase.getAdmOrg());
  912. fscRgstr.setAdCode(attFscBase.getAdCode());
  913. fscRgstr.setLocation(attFscBase.getLocation());
  914. fscRgstr.setType(attFscBase.getType());
  915. fscRgstr.setCenterX(attFscBase.getCenterX());
  916. fscRgstr.setCenterY(attFscBase.getCenterY());
  917. fscRgstr.setGdX(attFscBase.getGdX());
  918. fscRgstr.setGdY(attFscBase.getGdY());
  919. fscRgstr.setGroupId(bisInspAllObj.getId());
  920. fscRgstr.setProvince(province);
  921. fscRgstr.setState("0");
  922. fscRgstr.setDataStat("0");
  923. fscRgstr.setInTm(new Date());
  924. fscRgstr.setUpTm(new Date());
  925. bisInspFscRgstrDao.insert(fscRgstr);
  926. } else if (BisInspEnum.OTHER.getValue().equals(persObj.getPtype())) {
  927. AttOtherBase attOtherBase = attOtherBaseDao.get(bisInspAllObj.getCode());
  928. BisInspOtherRgstr otherRgstr = new BisInspOtherRgstr(attOtherBase);
  929. otherRgstr.setId(UuidUtil.uuid());
  930. otherRgstr.setObjId(bisInspAllObj.getObjId());
  931. otherRgstr.setName(attOtherBase.getName());
  932. otherRgstr.setAdmOrg(attOtherBase.getAdmOrg());
  933. otherRgstr.setAdCode(attOtherBase.getAdCode());
  934. otherRgstr.setLocation(attOtherBase.getLocation());
  935. otherRgstr.setType(attOtherBase.getType());
  936. otherRgstr.setCenterX(attOtherBase.getCenterX());
  937. otherRgstr.setCenterY(attOtherBase.getCenterY());
  938. otherRgstr.setGdX(attOtherBase.getGdX());
  939. otherRgstr.setProvince(province);
  940. otherRgstr.setGdY(attOtherBase.getGdY());
  941. otherRgstr.setGroupId(bisInspAllObj.getId());
  942. otherRgstr.setState("0");
  943. otherRgstr.setDataStat("0");
  944. otherRgstr.setInTm(new Date());
  945. otherRgstr.setUpTm(new Date());
  946. bisInspOtherRgstrDao.insert(otherRgstr);
  947. } else if (BisInspEnum.SD.getValue().equals(persObj.getPtype())) {
  948. AttSdBase base = sdBaseDao.get(bisInspAllObj.getCode());
  949. BisInspSdRgstr rgstr = new BisInspSdRgstr();
  950. rgstr.setId(UuidUtil.uuid());
  951. rgstr.setObjId(bisInspAllObj.getObjId());
  952. rgstr.setSdCode(base.getSdCode());
  953. rgstr.setSdName(base.getSdName());
  954. rgstr.setSdType(base.getSdType());
  955. rgstr.setSdTypeStr(base.getSdTypeStr());
  956. rgstr.setConArea(base.getConArea());
  957. rgstr.setTotCap(base.getTotCap());
  958. rgstr.setSdrCap(base.getSdrCap());
  959. rgstr.setFlcoYear(base.getFlcoYear());
  960. rgstr.setWarpCap(base.getWarpCap());
  961. rgstr.setDamSizeHig(base.getDamSizeHig());
  962. rgstr.setDamTopLen(base.getDamTopLen());
  963. rgstr.setProvince(province);
  964. rgstr.setAdCode(base.getAdCode());
  965. rgstr.setSdLoc(base.getSdLoc());
  966. rgstr.setCenterX(base.getCenterX());
  967. rgstr.setCenterY(base.getCenterY());
  968. rgstr.setGdX(base.getGdX());
  969. rgstr.setGdY(base.getGdY());
  970. rgstr.setAsinttds(base.getAsinttds());
  971. rgstr.setNoSpway(base.getNoSpway());
  972. rgstr.setDamTear(base.getDamTear());
  973. rgstr.setDamLandSubSide(base.getDamLandSubSide());
  974. rgstr.setDamRsog(base.getDamRsog());
  975. rgstr.setDamLopc(base.getDamLopc());
  976. rgstr.setDsLts(base.getDsLts());
  977. rgstr.setDsCc(base.getDsCc());
  978. rgstr.setDsOc(base.getDsOc());
  979. rgstr.setFrsMar(base.getFrsMar());
  980. rgstr.setFrsTbd(base.getFrsTbd());
  981. rgstr.setFrsOth(base.getFrsOth());
  982. rgstr.setNote(base.getNote());
  983. rgstr.setState("0");
  984. rgstr.setDataStat("0");
  985. rgstr.setGroupId(bisInspAllObj.getId());
  986. rgstr.setPersId(persAllInfoDto.getPersid());
  987. rgstr.setInTm(new Date());
  988. rgstr.setUpTm(new Date());
  989. bisInspSdRgstrDao.insert(rgstr);
  990. } else if (BisInspEnum.WIU.getValue().equals(persObj.getPtype())) {
  991. AttWiuBase base = wiuBaseDao.get(bisInspAllObj.getCode());
  992. BisInspWiuRgstr rgstr = new BisInspWiuRgstr();
  993. BeanUtil.copyObject1(base, rgstr);
  994. rgstr.setWiuId(base.getId());
  995. rgstr.setId(UuidUtil.uuid());
  996. rgstr.setObjId(bisInspAllObj.getObjId());
  997. rgstr.setState("0");
  998. rgstr.setDataStat("0");
  999. rgstr.setGroupId(bisInspAllObj.getId());
  1000. rgstr.setProvince(province);
  1001. rgstr.setPersId(persAllInfoDto.getPersid());
  1002. rgstr.setInTm(new Date());
  1003. rgstr.setUpTm(new Date());
  1004. wiuRgstrDao.insert(rgstr);
  1005. } else if (BisInspEnum.SWHS.getValue().equals(persObj.getPtype())) {
  1006. AttSwhsBase base = swhsBaseDao.get(bisInspAllObj.getCode());
  1007. BisInspSwhsRgstr rgstr = new BisInspSwhsRgstr();
  1008. BeanUtil.copyObject1(base, rgstr);
  1009. rgstr.setCenterX(base.getSwhsLong());
  1010. rgstr.setCenterY(base.getSwhsLat());
  1011. rgstr.setGdX(base.getSwhsLongGd());
  1012. rgstr.setGdY(base.getSwhsLatGd());
  1013. rgstr.setId(UuidUtil.uuid());
  1014. rgstr.setObjId(bisInspAllObj.getObjId());
  1015. rgstr.setSwhsId(base.getId());
  1016. rgstr.setState("0");
  1017. rgstr.setDataStat("0");
  1018. rgstr.setProvince(province);
  1019. rgstr.setGroupId(bisInspAllObj.getId());
  1020. rgstr.setPersId(persAllInfoDto.getPersid());
  1021. rgstr.setInTm(new Date());
  1022. rgstr.setUpTm(new Date());
  1023. swhsRgstrDao.insert(rgstr);
  1024. } else if (BisInspEnum.CITY.getValue().equals(persObj.getPtype())) {
  1025. AttAdXBase base = attAdXBaseDao.get(persObj.getCode());
  1026. BisInspWintRgstr rgstr = new BisInspWintRgstr();
  1027. BeanUtil.copyObject1(base, rgstr);
  1028. rgstr.setGdX(base.getLgtd());
  1029. rgstr.setGdY(base.getLttd());
  1030. rgstr.setPcX(base.getLgtdpc());
  1031. rgstr.setPcY(base.getLttdpc());
  1032. rgstr.setLoc(base.getAdFullName());
  1033. rgstr.setId(UuidUtil.uuid());
  1034. rgstr.setObjId(bisInspAllObj.getObjId());
  1035. rgstr.setState("0");
  1036. rgstr.setDataStat("0");
  1037. rgstr.setProvince(province);
  1038. rgstr.setGroupId(bisInspAllObj.getId());
  1039. rgstr.setPersId(persAllInfoDto.getPersid());
  1040. rgstr.setInTm(new Date());
  1041. rgstr.setUpTm(new Date());
  1042. wintRgstrDao.insert(rgstr);
  1043. } else if (BisInspEnum.SVWT.getValue().equals(persObj.getPtype())) {
  1044. AttAdXBase base = attAdXBaseDao.get(persObj.getCode());
  1045. BisInspSvwtAreaRgstr rgstr = new BisInspSvwtAreaRgstr();
  1046. BeanUtil.copyObject1(base, rgstr);
  1047. rgstr.setGdX(base.getLgtd());
  1048. rgstr.setGdY(base.getLttd());
  1049. if (base.getLgtd() != null && base.getLttd() != null) {
  1050. Map<String, Double> params = GeoUtil.gcj02towgs84(base.getLgtd(), base.getLttd());
  1051. rgstr.setPcX(params.get("lon"));
  1052. rgstr.setPcY(params.get("lat"));
  1053. }
  1054. rgstr.setProvince(province);
  1055. rgstr.setLoc(base.getAdFullName());
  1056. rgstr.setId(UuidUtil.uuid());
  1057. rgstr.setObjId(bisInspAllObj.getObjId());
  1058. rgstr.setState("0");
  1059. rgstr.setDataStat("0");
  1060. rgstr.setGroupId(bisInspAllObj.getId());
  1061. rgstr.setPersId(persAllInfoDto.getPersid());
  1062. rgstr.setInTm(new Date());
  1063. rgstr.setUpTm(new Date());
  1064. svwtAreaRgstrDao.insert(rgstr);
  1065. } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(persObj.getPtype())) {
  1066. AttWuntBase base = wuntBaseDao.get(persObj.getCode());
  1067. BisInspSvwtWuntRgstr rgstr = new BisInspSvwtWuntRgstr();
  1068. BeanUtil.copyObject1(base, rgstr);
  1069. rgstr.setId(UuidUtil.uuid());
  1070. rgstr.setObjId(bisInspAllObj.getObjId());
  1071. rgstr.setState("0");
  1072. rgstr.setDataStat("0");
  1073. rgstr.setGroupId(bisInspAllObj.getId());
  1074. rgstr.setPersId(persAllInfoDto.getPersid());
  1075. if (base.getGdX() != null && base.getGdY() != null) {
  1076. Map<String, Double> params = GeoUtil.gcj02towgs84(base.getGdX(), base.getGdY());
  1077. rgstr.setPcX(params.get("lon"));
  1078. rgstr.setPcY(params.get("lat"));
  1079. }
  1080. rgstr.setProvince(province);
  1081. rgstr.setInTm(new Date());
  1082. rgstr.setUpTm(new Date());
  1083. svwtWuntRgstrDao.insert(rgstr);
  1084. } else if (BisInspEnum.PRD.getValue().equalsIgnoreCase(persObj.getPtype())) {
  1085. AttPrdCstrProjBase prdCstrProjBase = attPrdCstrProjBaseDao.get(bisInspAllObj.getCode());
  1086. BisInspOprdCstrProjRgstr oprdCstrProjRgstr = new BisInspOprdCstrProjRgstr();
  1087. oprdCstrProjRgstr.setAdCode(prdCstrProjBase.getAdCode());
  1088. oprdCstrProjRgstr.setAdName(prdCstrProjBase.getAdName());
  1089. oprdCstrProjRgstr.setPersId(persAllInfoDto.getPersid());
  1090. oprdCstrProjRgstr.setProvince(province);
  1091. oprdCstrProjRgstr.setState("0");
  1092. oprdCstrProjRgstr.setId(UuidUtil.uuid());
  1093. oprdCstrProjRgstr.setInTm(new Date());
  1094. oprdCstrProjRgstr.setUpTm(new Date());
  1095. oprdCstrProjRgstr.setObjId(bisInspAllObj.getObjId());
  1096. oprdCstrProjRgstr.setGroupId(bisInspAllObj.getId());
  1097. oprdCstrProjRgstr.setLocation(prdCstrProjBase.getLocation());
  1098. oprdCstrProjRgstr.setName(prdCstrProjBase.getName());
  1099. oprdCstrProjRgstr.setType(prdCstrProjBase.getType());
  1100. if (prdCstrProjBase.getGdX() != null && prdCstrProjBase.getGdY() != null) {
  1101. Map<String, Double> params = GeoUtil.gcj02towgs84(prdCstrProjBase.getGdX(), prdCstrProjBase.getGdY());
  1102. oprdCstrProjRgstr.setCenterX(params.get("lon"));
  1103. oprdCstrProjRgstr.setCenterY(params.get("lat"));
  1104. }
  1105. oprdCstrProjRgstr.setGdX(prdCstrProjBase.getGdX());
  1106. oprdCstrProjRgstr.setGdY(prdCstrProjBase.getGdY());
  1107. oprdCstrProjRgstrDao.insert(oprdCstrProjRgstr);
  1108. } else if (BisInspEnum.JSFL.getValue().equalsIgnoreCase(persObj.getPtype())) {
  1109. AttJskejianFlkdisBase jskejianFlkdisBase = jskejianFlkdisBaseDao.get(bisInspAllObj.getCode());
  1110. AttJskejianFlkdisRgstr jskejianFlkdisRgstr = new AttJskejianFlkdisRgstr();
  1111. jskejianFlkdisRgstr.setId(UuidUtil.uuid());
  1112. jskejianFlkdisRgstr.setAdCode(jskejianFlkdisBase.getAdCode());
  1113. jskejianFlkdisRgstr.setAdName(jskejianFlkdisBase.getAdName());
  1114. if (jskejianFlkdisBase.getGdX() != null && jskejianFlkdisBase.getGdY() != null) {
  1115. Map<String, Double> params = GeoUtil.gcj02towgs84(jskejianFlkdisBase.getGdX(), jskejianFlkdisBase.getGdY());
  1116. jskejianFlkdisRgstr.setCenterX(params.get("lon"));
  1117. jskejianFlkdisRgstr.setCenterY(params.get("lat"));
  1118. }
  1119. jskejianFlkdisRgstr.setContRvonNameDuty(jskejianFlkdisBase.getContRvonNameDuty());
  1120. jskejianFlkdisRgstr.setGdX(jskejianFlkdisBase.getGdX());
  1121. jskejianFlkdisRgstr.setGdY(jskejianFlkdisBase.getGdY());
  1122. jskejianFlkdisRgstr.setProvince(province);
  1123. jskejianFlkdisRgstr.setGroupId(bisInspAllObj.getId());
  1124. jskejianFlkdisRgstr.setObjId(bisInspAllObj.getObjId());
  1125. jskejianFlkdisRgstr.setIntm(new Date());
  1126. jskejianFlkdisRgstr.setUptm(new Date());
  1127. jskejianFlkdisRgstr.setLocation(jskejianFlkdisBase.getLocation());
  1128. jskejianFlkdisRgstr.setName(jskejianFlkdisBase.getName());
  1129. jskejianFlkdisRgstr.setPersId(persAllInfoDto.getPersid());
  1130. jskejianFlkdisRgstr.setState("0");
  1131. jskejianFlkdisRgstr.setTownRvonNameDuty(jskejianFlkdisBase.getTownRvonNameDuty());
  1132. jskejianFlkdisRgstr.setVilgRvonNameDuty(jskejianFlkdisBase.getVilgRvonNameDuty());
  1133. jskejianFlkdisRgstr.setPblmDesc(jskejianFlkdisBase.getPblmDesc());
  1134. jskejianFlkdisRgstr.setPblmType(jskejianFlkdisBase.getPblmType());
  1135. jskejianFlkdisRgstr.setRectConc(jskejianFlkdisBase.getRectConc());
  1136. jskejianFlkdisRgstrDao.insert(jskejianFlkdisRgstr);
  1137. } else if (BisInspEnum.JSWA.getValue().equalsIgnoreCase(persObj.getPtype())) {
  1138. AttJskejianWaterBase jskejianWaterBase = jskejianWaterBaseDao.get(bisInspAllObj.getCode());
  1139. AttJskejianWaterRgstr jskejianWaterRgstr = new AttJskejianWaterRgstr();
  1140. BeanUtil.copyObject1(jskejianWaterBase, jskejianWaterRgstr);
  1141. jskejianWaterRgstr.setId(UuidUtil.uuid());
  1142. jskejianWaterRgstr.setObjId(bisInspAllObj.getObjId());
  1143. jskejianWaterRgstr.setProvince(province);
  1144. jskejianWaterRgstr.setPersId(persAllInfoDto.getPersid());
  1145. jskejianWaterRgstr.setState("0");
  1146. if (jskejianWaterBase.getGdX() != null && jskejianWaterBase.getGdY() != null) {
  1147. Map<String, Double> params = GeoUtil.gcj02towgs84(jskejianWaterBase.getGdX(), jskejianWaterBase.getGdY());
  1148. jskejianWaterRgstr.setCenterX(params.get("lon"));
  1149. jskejianWaterRgstr.setCenterY(params.get("lat"));
  1150. }
  1151. jskejianWaterRgstr.setIntm(new Date());
  1152. jskejianWaterRgstr.setUptm(new Date());
  1153. jskejianWaterRgstrDao.insert(jskejianWaterRgstr);
  1154. } else if (BisInspEnum.ECOFRD.getValue().equalsIgnoreCase(persObj.getPtype())) {
  1155. AttJskejianEcofrdBase jskejianEcofrdBase = jskejianEcofrdBaseDao.get(bisInspAllObj.getCode());
  1156. AttJskejianEcofrdRgstr rgstr = new AttJskejianEcofrdRgstr();
  1157. BeanUtil.copyObject1(jskejianEcofrdBase, rgstr);
  1158. rgstr.setId(UuidUtil.uuid());
  1159. rgstr.setObjId(bisInspAllObj.getObjId());
  1160. rgstr.setProvince(province);
  1161. rgstr.setPersId(persAllInfoDto.getPersid());
  1162. rgstr.setState("0");
  1163. if (jskejianEcofrdBase.getGdX() != null && jskejianEcofrdBase.getGdY() != null) {
  1164. Map<String, Double> params = GeoUtil.gcj02towgs84(jskejianEcofrdBase.getGdX(), jskejianEcofrdBase.getGdY());
  1165. rgstr.setCenterX(params.get("lon"));
  1166. rgstr.setCenterY(params.get("lat"));
  1167. }
  1168. rgstr.setIntm(new Date());
  1169. rgstr.setUptm(new Date());
  1170. jskejianEcofrdRgstrDao.insert(rgstr);
  1171. } else if (BisInspEnum.RSML.getValue().equals(persObj.getPtype())) {
  1172. AttRsBaseParam baseParam = new AttRsBaseParam();
  1173. baseParam.setRsCode(bisInspAllObj.getCode());
  1174. AttRsBase attRsBase = attRsBaseDao.getBy(baseParam);
  1175. BisInspRsmlRgstr rgstr = new BisInspRsmlRgstr();
  1176. rgstr.setId(UuidUtil.uuid());
  1177. rgstr.setObjId(bisInspAllObj.getObjId());
  1178. rgstr.setRsCode(attRsBase.getRsCode());
  1179. rgstr.setRsName(bisInspAllObj.getNm());
  1180. rgstr.setAdCode(attRsBase.getAdmDiv());
  1181. rgstr.setOrgId(bisInspAllObj.getOrgId());
  1182. rgstr.setRsAdmCode(attRsBase.getRsAdmCode());
  1183. rgstr.setRsAdmName(attRsBase.getRsAdmName());
  1184. rgstr.setDamSizeHig(attRsBase.getDamSizeHig());
  1185. rgstr.setEngScal(attRsBase.getEngScal());
  1186. rgstr.setLocation(attRsBase.getLocation());
  1187. rgstr.setDamType(attRsBase.getDamType());
  1188. rgstr.setTotCap(attRsBase.getTotCap());
  1189. rgstr.setDesFlStag(attRsBase.getDesFlStag());
  1190. rgstr.setImpdDt(attRsBase.getImpdDt());
  1191. rgstr.setRnfcImpdDt(attRsBase.getRnfcImpdDt());
  1192. rgstr.setResCreateTime(attRsBase.getCompDate());
  1193. rgstr.setPresState(StateEnum.NOWASTSTATE.getKey());
  1194. rgstr.setProjectState(StateEnum.NOWASTSTATE.getKey());
  1195. rgstr.setRunManageState(StateEnum.NOWASTSTATE.getKey());
  1196. rgstr.setHasDamRegCode("1");
  1197. rgstr.setDamRegCode(attRsBase.getRegCode());
  1198. rgstr.setHystSite(attRsBase.getRsLoc());
  1199. if (attRsBase.getCenterX() != null) {
  1200. rgstr.setCenterX(Double.parseDouble(attRsBase.getCenterX()));
  1201. }
  1202. if (attRsBase.getCenterY() != null) {
  1203. rgstr.setCenterY(Double.parseDouble(attRsBase.getCenterY()));
  1204. }
  1205. if (attRsBase.getCenterXGd() != null) {
  1206. rgstr.setGdX(Double.parseDouble(attRsBase.getCenterXGd()));
  1207. }
  1208. if (attRsBase.getCenterYGd() != null) {
  1209. rgstr.setGdY(Double.parseDouble(attRsBase.getCenterYGd()));
  1210. }
  1211. rgstr.setRsClass(attRsBase.getRsClass());
  1212. rgstr.setState(StateEnum.NOWASTSTATE.getKey());
  1213. Date date = new Date();
  1214. rgstr.setIntm(date);
  1215. rgstr.setUptm(date);
  1216. rgstr.setImpdDt(attRsBase.getImpdDt());
  1217. rgstr.setRnfcImpdDt(attRsBase.getRnfcImpdDt());
  1218. rgstr.setDesFlStag(attRsBase.getDesFlStag());
  1219. rgstr.setFlConTopStag(attRsBase.getFlConTopStag());
  1220. rgstr.setDamType(attRsBase.getDamType());
  1221. bisInspRsmlRgstrDao.insert(rgstr);
  1222. } else if (BisInspEnum.RSRAQG.getValue().equals(persObj.getPtype())) {
  1223. */
  1224. /**
  1225. * 添加登记表
  1226. *//*
  1227. String rsraqgRgstrId = UuidUtil.uuid();
  1228. BisInspRsraqgRgstr bisInspRsraqgRgstr = new BisInspRsraqgRgstr();
  1229. bisInspRsraqgRgstr.setId(rsraqgRgstrId);
  1230. bisInspRsraqgRgstr.setIntm(new Date());
  1231. bisInspRsraqgRgstr.setUptm(new Date());
  1232. bisInspRsraqgRgstr.setObjId(bisInspAllObj.getObjId());
  1233. bisInspRsraqgRgstr.setOrgId(persAllInfoDto.getOrgId());
  1234. bisInspRsraqgRgstr.setAdName(bisInspAllObj.getNm());
  1235. bisInspRsraqgRgstr.setAdCode(bisInspAllObj.getCode());
  1236. bisInspRsraqgRgstr.setGroupId(persAllInfoDto.getId());
  1237. bisInspRsraqgRgstr.setGdX(bisInspAllObj.getLgtd());
  1238. bisInspRsraqgRgstr.setGdY(bisInspAllObj.getLttd());
  1239. bisInspRsraqgRgstr.setPcX(bisInspAllObj.getLgtdpc());
  1240. bisInspRsraqgRgstr.setPcY(bisInspAllObj.getLttdpc());
  1241. bisInspRsraqgRgstr.setPersId(persAllInfoDto.getPersid());
  1242. bisInspRsraqgRgstr.setState("0");
  1243. bisInspRsraqgRgstrService.insert(bisInspRsraqgRgstr);
  1244. //添加登记表下的 市级登记表
  1245. BisInspRsraqgRgstrCity bisInspRsraqgRgstrCity = new BisInspRsraqgRgstrCity();
  1246. bisInspRsraqgRgstrCity.setRgstrId(rsraqgRgstrId);
  1247. bisInspRsraqgRgstrCity.setStatus("0");
  1248. bisInspRsraqgRgstrCityService.insert(bisInspRsraqgRgstrCity);
  1249. //取出行政区下的所有县 循环插入
  1250. AttAdXBaseParam baseParam = new AttAdXBaseParam();
  1251. baseParam.setAdFcode(bisInspAllObj.getCode());
  1252. List<AttAdXBase> attAdXBases = attAdXBaseDao.findList(baseParam);
  1253. for (AttAdXBase attAdXBase : attAdXBases
  1254. ) {
  1255. if (attAdXBase.getAdName().equals("市辖区")) {
  1256. continue;
  1257. }
  1258. //增加市下所有县登记表
  1259. BisInspRsraqgRgstrCounty bisInspRsraqgRgstrCounty = new BisInspRsraqgRgstrCounty();
  1260. bisInspRsraqgRgstrCounty.setRgstrId(rsraqgRgstrId);
  1261. bisInspRsraqgRgstrCounty.setStatus("0");
  1262. bisInspRsraqgRgstrCounty.setAdCode(attAdXBase.getAdCode());
  1263. bisInspRsraqgRgstrCounty.setAdName(attAdXBase.getAdName());
  1264. bisInspRsraqgRgstrCountyService.insert(bisInspRsraqgRgstrCounty);
  1265. }
  1266. } else if (BisInspEnum.STND.getValue().equals(persObj.getPtype())) {
  1267. */
  1268. /**
  1269. * 添加 小水库标准 登记表
  1270. *//*
  1271. String rsraqgRgstrId = UuidUtil.uuid();
  1272. //获取小水库信息
  1273. AttRsBaseParam baseParam = new AttRsBaseParam();
  1274. baseParam.setRsCode(bisInspAllObj.getCode());
  1275. AttRsBase attRsBase = attRsBaseDao.getBy(baseParam);
  1276. BisInspStndRgstr b = new BisInspStndRgstr();
  1277. b.setRgstrId(rsraqgRgstrId);
  1278. b.setOrgId(bisInspAllObj.getOrgId());
  1279. b.setObjId(bisInspAllObj.getObjId());
  1280. b.setRsCode(attRsBase.getRsCode());
  1281. b.setRsvrNm(bisInspAllObj.getNm());
  1282. b.setAdCode(attRsBase.getAdmDiv());
  1283. b.setResCreateTime(attRsBase.getCompDate());
  1284. b.setEngScal(attRsBase.getEngScal());
  1285. b.setTotCap(attRsBase.getTotCap());
  1286. b.setHystSite(attRsBase.getRsLoc());
  1287. b.setDamRegCode(attRsBase.getRegCode());
  1288. b.setDamType(attRsBase.getDamType());
  1289. b.setHasDamRegCode(StringUtils.isNotBlank(attRsBase.getRegCode()) ? "1" : "2");
  1290. b.setResCreateTimeNote(attRsBase.getCompDateStr());
  1291. Date date = new Date();
  1292. b.setIntm(date);
  1293. b.setUptm(date);
  1294. b.setGroupId(persAllInfoDto.getId());
  1295. b.setPersId(persAllInfoDto.getPersid());
  1296. b.setState(StateEnum.NOWASTSTATE.getKey());
  1297. b.setDataStat(StateEnum.NOWASTSTATE.getKey());
  1298. b.setJxDuty(attRsBase.getJxDuty());
  1299. b.setJxDutyPhone(attRsBase.getJxDutyPhone());
  1300. b.setJxRsvrStndLev(attRsBase.getJxRsvrStndLev());
  1301. b.setJxRsvrType(attRsBase.getJxRsvrType());
  1302. b.setRsAdmCode(attRsBase.getRsAdmCode());
  1303. b.setRsAdmName(attRsBase.getRsAdmName());
  1304. b.setAdNm(attRsBase.getLocation());
  1305. b.setCenterX(attRsBase.getCenterX() == null ? null : Double.parseDouble(attRsBase.getCenterX()));
  1306. b.setCenterY(attRsBase.getCenterY() == null ? null : Double.parseDouble(attRsBase.getCenterY()));
  1307. b.setCenterXGd(attRsBase.getCenterXGd() == null ? null : Double.parseDouble(attRsBase.getCenterXGd()));
  1308. b.setCenterYGd(attRsBase.getCenterYGd() == null ? null : Double.parseDouble(attRsBase.getCenterYGd()));
  1309. b.setDamSizeHig(attRsBase.getDamSizeHig());
  1310. bisInspStndRgstrService.insert(b);
  1311. } else if (BisInspEnum.RSFCO.getValue().equals(persObj.getPtype())) {
  1312. AttRsBaseParam baseParam = new AttRsBaseParam();
  1313. baseParam.setRsCode(bisInspAllObj.getCode());
  1314. AttRsBase attRsBase = attRsBaseDao.getBy(baseParam);
  1315. BisInspRsfcoRgstr rgstr = new BisInspRsfcoRgstr();
  1316. rgstr.setId(UuidUtil.uuid());
  1317. rgstr.setObjId(bisInspAllObj.getObjId());
  1318. rgstr.setRsCode(attRsBase.getRsCode());
  1319. rgstr.setRsName(bisInspAllObj.getNm());
  1320. rgstr.setHasDamRegCode("1");
  1321. rgstr.setDamRegCode(attRsBase.getRegCode());
  1322. rgstr.setAdCode(attRsBase.getAdmDiv());
  1323. rgstr.setLocation(attRsBase.getLocation());
  1324. rgstr.setHystSite(attRsBase.getRsLoc());
  1325. rgstr.setCompDateStr(attRsBase.getCompDateStr());
  1326. if (attRsBase.getCenterYGd() != null) {
  1327. rgstr.setGdY(Double.parseDouble(attRsBase.getCenterYGd()));
  1328. }
  1329. if (attRsBase.getCenterXGd() != null) {
  1330. rgstr.setGdX(Double.parseDouble(attRsBase.getCenterXGd()));
  1331. }
  1332. if (attRsBase.getCenterX() != null) {
  1333. rgstr.setCenterX(Double.parseDouble(attRsBase.getCenterX()));
  1334. }
  1335. if (attRsBase.getCenterY() != null) {
  1336. rgstr.setCenterY(Double.parseDouble(attRsBase.getCenterY()));
  1337. }
  1338. rgstr.setRsAdmCode(attRsBase.getRsAdmCode());
  1339. rgstr.setRsAdmName(attRsBase.getRsAdmName());
  1340. rgstr.setEngScal(attRsBase.getEngScal());
  1341. rgstr.setDamType(attRsBase.getDamType());
  1342. rgstr.setTotCap(attRsBase.getTotCap());
  1343. rgstr.setDamSizeHig(attRsBase.getDamSizeHig());
  1344. rgstr.setResCreateTime(attRsBase.getCompDate());
  1345. rgstr.setPresState(StateEnum.NOWASTSTATE.getKey());
  1346. rgstr.setRunManageState(StateEnum.NOWASTSTATE.getKey());
  1347. rgstr.setProjectState(StateEnum.NOWASTSTATE.getKey());
  1348. rgstr.setState(StateEnum.NOWASTSTATE.getKey());
  1349. Date date = new Date();
  1350. rgstr.setIntm(date);
  1351. rgstr.setUptm(date);
  1352. bisInspRsfcoRgstrService.insert(rgstr);
  1353. } else if (BisInspEnum.MFDP.getValue().equals(persObj.getPtype())) {
  1354. AttAdXBase xBase = attAdXBaseDao.getByCode(bisInspAllObj.getCode());
  1355. BisInspMfdpRgstr rgstr = new BisInspMfdpRgstr();
  1356. rgstr.setId(UuidUtil.uuid());
  1357. rgstr.setObjId(bisInspAllObj.getObjId());
  1358. rgstr.setAdCode(bisInspAllObj.getCode());
  1359. rgstr.setAdName(bisInspAllObj.getNm());
  1360. rgstr.setPoorCountry(xBase.getIsPoveryt());
  1361. rgstr.setSitroMsNum(new Long(0));
  1362. rgstr.setSitroRxNum(new Long(0));
  1363. rgstr.setSitroTownNum(new Long(0));
  1364. rgstr.setSitroVlgNum(new Long(0));
  1365. rgstr.setState(StateEnum.NOWASTSTATE.getKey());
  1366. rgstr.setIntm(new Date());
  1367. rgstr.setUptm(new Date());
  1368. bisInspMfdpRgstrService.insert(rgstr);
  1369. } else if (BisInspEnum.VILLZHEJIANG.getValue().equals(persObj.getPtype())) {
  1370. AttAdXBase attAdXBase = attAdXBaseDao.get(bisInspAllObj.getCode());
  1371. BisZhejiangVillRgstr bisNewVillRgstr=new BisZhejiangVillRgstr();
  1372. bisNewVillRgstr.setId(UuidUtil.uuid());
  1373. bisNewVillRgstr.setPersId(persAllInfoDto.getPersid());
  1374. bisNewVillRgstr.setIsPkx(attAdXBase.getIsPoveryt());
  1375. bisNewVillRgstr.setObjId(bisInspAllObj.getObjId());
  1376. bisNewVillRgstr.setRegsNm(attAdXBase.getAdName());
  1377. bisNewVillRgstr.setState("0");
  1378. bisNewVillRgstr.setLttdpc(attAdXBase.getLttdpc());
  1379. bisNewVillRgstr.setLgtdpc(attAdXBase.getLgtdpc());
  1380. bisNewVillRgstr.setLgtd(attAdXBase.getLgtd());
  1381. bisNewVillRgstr.setLttd(attAdXBase.getLttd());
  1382. bisNewVillRgstr.setAdFullName(attAdXBase.getAdFullName());
  1383. bisNewVillRgstr.setAdCode(attAdXBase.getAdCode());
  1384. bisNewVillRgstr.setUptm(new Date());
  1385. bisNewVillRgstr.setIntm(new Date());
  1386. bisZhejiangVillRgstrService.insert(bisNewVillRgstr);
  1387. } else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equals(persObj.getPtype())){
  1388. AttZhejiangJgBase attAdXBase = attZhejiangJgBaseDao.get(bisInspAllObj.getCode());
  1389. BisZhejiangJgRgstr bisZhejiangJgRgstr = new BisZhejiangJgRgstr();
  1390. bisZhejiangJgRgstr.setId(UuidUtil.uuid());
  1391. bisZhejiangJgRgstr.setAdCode(attAdXBase.getAdCode());
  1392. bisZhejiangJgRgstr.setAdFullName(attAdXBase.getAdFullName());
  1393. bisZhejiangJgRgstr.setLgtd(attAdXBase.getLgtd());
  1394. bisZhejiangJgRgstr.setLttd(attAdXBase.getLttd());
  1395. bisZhejiangJgRgstr.setLgtdpc(attAdXBase.getLgtdpc());
  1396. bisZhejiangJgRgstr.setDepartId(bisInspAllObj.getCode());
  1397. bisZhejiangJgRgstr.setLttdpc(attAdXBase.getLttdpc());
  1398. bisZhejiangJgRgstr.setState("0");
  1399. bisZhejiangJgRgstr.setIntm(new Date());
  1400. bisZhejiangJgRgstr.setUptm(new Date());
  1401. bisZhejiangJgRgstr.setPersId(persAllInfoDto.getPersid());
  1402. bisZhejiangJgRgstr.setObjId(bisInspAllObj.getObjId());
  1403. bisZhejiangJgRgstr.setRegsNm(attAdXBase.getDepartNm());
  1404. bisZhejiangJgRgstr.setJgState(StateEnum.NOWASTSTATE.getKey());
  1405. bisZhejiangJgRgstr.setNote(attAdXBase.getNote());
  1406. bisZhejiangJgRgstrService.insert(bisZhejiangJgRgstr);
  1407. }
  1408. }
  1409. }
  1410. //添加分工区域
  1411. if (persAllInfoDto.getPersAllAreaDtoList() != null && persAllInfoDto.getPersAllAreaDtoList().size() > 0) {
  1412. for (PersAllAreaDto pad : persAllInfoDto.getPersAllAreaDtoList()) {
  1413. String uuid = UuidUtil.uuid();
  1414. this.supervisionPlanDao.insertSupArea(uuid, persAllInfoDto.getId(), pad.getAdCode(), pad.getAdName(), persAllInfoDto.getOrgId(), province);
  1415. }
  1416. }
  1417. }
  1418. supInsertResult.setId(persAllInfoDto.getId());
  1419. supInsertResult.setNm(persAllInfoDto.getNm());
  1420. supInsertResult.setPersCount(persAllInfoDto.getPersAllDtoList().
  1421. size());
  1422. supInsertResult.setObjCount(persAllInfoDto.getPersAllObjDtoList().
  1423. size());
  1424. supInsertResult.setAreaCount(persAllInfoDto.getPersAllAreaDtoList().
  1425. size());
  1426. return supInsertResult;
  1427. }
  1428. */
  1429. /**
  1430. * 督查组人员分配角色
  1431. *
  1432. * @param objIdDto
  1433. * @return
  1434. *//*
  1435. @Override
  1436. public int assignmentRole(ObjIdDto objIdDto) {
  1437. int i = 0;
  1438. String province = inspOrgService.getProvince(objIdDto.getOrgId());
  1439. ObjIdDto persAllDto = this.supervisionPlanDao.getPers(objIdDto.getId(), objIdDto.getGuid());
  1440. if (persAllDto != null) {//组里存在该人员
  1441. if ("1".equals(objIdDto.getPersType())) {//如果添加组长,将组里其他组长设为组员
  1442. this.supervisionPlanDao.updateTeamLeader(objIdDto.getId());
  1443. }
  1444. //已经在组里,修改人员类型
  1445. i += this.supervisionPlanDao.updatePersType(objIdDto.getId(), objIdDto.getGuid(), objIdDto.getPersType());
  1446. } else {
  1447. if ("1".equals(objIdDto.getPersType())) {
  1448. this.supervisionPlanDao.updateTeamLeader(objIdDto.getId());
  1449. }
  1450. //不在组里 执行添加
  1451. this.supervisionPlanDao.insertPers(objIdDto.getId(), objIdDto.getGuid(), objIdDto.getPersType(), objIdDto.getOrgId(), province);
  1452. }
  1453. return i;
  1454. }
  1455. */
  1456. /**
  1457. * 获取人员类型
  1458. *
  1459. * @param persid
  1460. * @return
  1461. *//*
  1462. @Override
  1463. public List<PersTypeDto> getPersType(String persid, String orgId) {
  1464. // if(StringUtils.isBlank(inspOrgService.getProvince(orgId))) {
  1465. // return this.supervisionPlanDao.getPersTypeByPersid(persid, orgId, inspOrgService.getProvince(orgId));
  1466. // }
  1467. return this.supervisionPlanDao.getPersTypeByPersidOrg(persid, inspOrgService.getProvince(orgId));
  1468. }
  1469. */
  1470. /**
  1471. * 获取人员类型(根据接收单位)
  1472. *
  1473. * @param persid
  1474. * @return
  1475. *//*
  1476. @Override
  1477. public List<PersTypeDto> getPersTypeByPersid(String persid, String orgId) {
  1478. return this.supervisionPlanDao.getPersTypeByPersid(persid, orgId, inspOrgService.getProvince(orgId));
  1479. }
  1480. */
  1481. /**
  1482. * 清空督查对象
  1483. *
  1484. * @param objType
  1485. * @param id
  1486. *//*
  1487. @Override
  1488. public void cleanObjData(String objType, String id) {
  1489. if (StringUtils.isBlank(id) || StringUtils.isBlank(objType)) {
  1490. return;
  1491. }
  1492. BisInspPblmParam bisInspPblmParam = new BisInspPblmParam();
  1493. bisInspPblmParam.setRegid(id);
  1494. bisInspPblmParam.setObjType(objType);
  1495. this.bisInspPblmDao.deleteBy(bisInspPblmParam);//删除问题
  1496. if ("1".equals(objType) || "36".equals(objType)) {//水库
  1497. BisInspBaseViewParam p = new BisInspBaseViewParam();
  1498. p.setRgstrId(id);
  1499. //获取走访情况
  1500. BisInspBaseView bisInspBaseView = this.bisInspBaseViewDao.getBy(p);
  1501. if (bisInspBaseView != null) {
  1502. //删除走访人员情况
  1503. this.bisInspPreListDao.deleteByViewId(bisInspBaseView.getViewId());
  1504. }
  1505. this.bisInspBaseViewDao.deleteBy(p);//删除水库走访情况
  1506. BisInspSafeExtManageParam bisInspSafeExtManageParam = new BisInspSafeExtManageParam();
  1507. bisInspSafeExtManageParam.setRgstrId(id);
  1508. this.bisInspSafeExtManageDao.deleteBy(bisInspSafeExtManageParam);//删除水库安全运行管理情况
  1509. BisInspBaseExtParam bisInspBaseExtParam = new BisInspBaseExtParam();
  1510. bisInspBaseExtParam.setRgstrId(id);
  1511. this.bisInspBaseExtDao.deleteBy(bisInspBaseExtParam);//删除水库“三项基本要求”落实情况
  1512. BisInspBasePresExtParam bisInspBasePresExt = new BisInspBasePresExtParam();
  1513. bisInspBasePresExt.setRgstrId(id);
  1514. this.bisInspBasePresExtDao.deleteBy(bisInspBasePresExt);//删除水库“三个责任人”落实情况
  1515. BisInspRsvrProjectParam bisInspRsvrProjectParam = new BisInspRsvrProjectParam();//水库工程实体情况
  1516. bisInspRsvrProjectParam.setRgstrId(id);
  1517. bisInspRsvrProjectDao.deleteBy(bisInspRsvrProjectParam);
  1518. BisInspRsvrBenefitsParam bisInspRsvrBenefitsParam = new BisInspRsvrBenefitsParam();//水库效益发挥情况
  1519. bisInspRsvrBenefitsParam.setRgstrId(id);
  1520. bisInspRsvrBenefitsDao.deleteBy(bisInspRsvrBenefitsParam);
  1521. BisInspRsvrRgstr bisInspRsvrRgstr = this.bisInspRsvrRgstrDao.get(id);
  1522. this.bisInspRsvrRgstrDao.delete(id);//删除水库登记表
  1523. if (bisInspRsvrRgstr != null) {
  1524. bisInspAllObjDao.delete(bisInspRsvrRgstr.getObjId());//删除对象名录表
  1525. AttRsBaseCrrctParam attRsBaseCrrctParam = new AttRsBaseCrrctParam();
  1526. attRsBaseCrrctParam.setObjId(bisInspRsvrRgstr.getObjId());
  1527. attRsBaseCrrctDao.deleteBy(attRsBaseCrrctParam);
  1528. }
  1529. } else if (BisInspEnum.VILL.getValue().equals(objType)) {//人饮
  1530. BisInspVlgdrinkProjManageParam bisInspVlgdrinkProjManageParam = new BisInspVlgdrinkProjManageParam();
  1531. bisInspVlgdrinkProjManageParam.setEngId(id);
  1532. this.bisInspVlgdrinkProjManageDao.deleteBy(bisInspVlgdrinkProjManageParam);//删除农村饮水工程运行管理情况表
  1533. BisInspProSourceProtectParam bisInspProSourceProtectParam = new BisInspProSourceProtectParam();
  1534. bisInspProSourceProtectParam.setEngId(id);
  1535. this.bisInspProSourceProtectDao.deleteBy(bisInspProSourceProtectParam);//删除千人以上供水工程水源地保护登记表
  1536. BisInspSecsurveyVlgParam bisInspSecsurveyVlgParam = new BisInspSecsurveyVlgParam();
  1537. bisInspSecsurveyVlgParam.setEngId(id);
  1538. this.bisInspSecsurveyVlgDao.deleteBy(bisInspSecsurveyVlgParam);//删除暗访调研行政村登记表
  1539. BisInspVlgdrinkFacOperParam bisInspVlgdrinkFacOperParam = new BisInspVlgdrinkFacOperParam();
  1540. bisInspVlgdrinkFacOperParam.setEngId(id);
  1541. this.bisInspVlgdrinkFacOperDao.deleteBy(bisInspVlgdrinkFacOperParam);//删除村内农村饮水工程设施运行维护情况表
  1542. BisInspWateruserInfoParam bisInspWateruserInfoParam = new BisInspWateruserInfoParam();
  1543. bisInspWateruserInfoParam.setEngId(id);
  1544. this.bisInspWateruserInfoDao.deleteBy(bisInspWateruserInfoParam);//删除农村饮水用水户登记表
  1545. BisInspManageResponsibilityParam bisInspManageResponsibilityParam = new BisInspManageResponsibilityParam();
  1546. bisInspManageResponsibilityParam.setEngId(id);
  1547. this.bisInspManageResponsibilityDao.deleteBy(bisInspManageResponsibilityParam);
  1548. BisInspVillRgstr bisInspVillRgstr = this.bisInspVillRgstrDao.get(id);
  1549. this.bisInspVillRgstrDao.delete(id);//删除登记表
  1550. if (bisInspVillRgstr != null) {
  1551. this.bisInspAllObjDao.delete(bisInspVillRgstr.getObjId());//删除督查对象
  1552. }
  1553. } else if (BisInspEnum.TRACK.getValue().equals(objType)) {//水毁
  1554. BisInspWtdstTrack bisInspWtdstTrack = this.bisInspWtdstTrackDao.get(id);
  1555. this.bisInspWtdstTrackDao.delete(id);//删除登记表
  1556. if (bisInspWtdstTrack != null) {
  1557. this.bisInspAllObjDao.delete(bisInspWtdstTrack.getObjId());//删除督查对象
  1558. }
  1559. } else if (BisInspEnum.EMPWT.getValue().equals(objType)) {//水利工程建设
  1560. BisInspKeyRegisterSectionParam bisInspKeyRegisterSectionParam = new BisInspKeyRegisterSectionParam();
  1561. bisInspKeyRegisterSectionParam.setRegId(id);
  1562. //获取172重点水利项目登记表标段基本信息
  1563. List<BisInspKeyRegisterSection> bisInspKeyRegisterSectionList = this.bisInspKeyRegisterSectionDao.findList(bisInspKeyRegisterSectionParam);
  1564. if (bisInspKeyRegisterSectionList.size() > 0) {
  1565. for (BisInspKeyRegisterSection b : bisInspKeyRegisterSectionList) {
  1566. BisInspKeyRegSecUnitParam bisInspKeyRegSecUnitParam = new BisInspKeyRegSecUnitParam();
  1567. bisInspKeyRegSecUnitParam.setSecId(b.getId());
  1568. //删除172重点水利项目标段责任单位
  1569. this.bisInspKeyRegSecUnitDao.deleteBy(bisInspKeyRegSecUnitParam);
  1570. }
  1571. }
  1572. //删除172重点水利项目登记表标段
  1573. this.bisInspKeyRegisterSectionDao.deleteBy(bisInspKeyRegisterSectionParam);
  1574. this.attMampuInfoDao.deleteByRegId(id);//删除管理单位信息表
  1575. BisInspKeyRegister bisInspKeyRegister = this.bisInspKeyRegisterDao.get(id);
  1576. this.bisInspKeyRegisterDao.delete(id);//删除登记表
  1577. if (bisInspKeyRegister != null) {
  1578. this.bisInspAllObjDao.delete(bisInspKeyRegister.getObjId());//删除督查对象
  1579. }
  1580. } else if (BisInspEnum.GRW.getValue().equals(objType)) {//地下水
  1581. BisInspGrwParam bisInspGrwParam = new BisInspGrwParam();
  1582. bisInspGrwParam.setId(id);
  1583. BisInspGrw bisInspGrw = this.bisInspGrwDao.getBy(bisInspGrwParam);
  1584. this.bisInspGrwDao.delete(id);//删除登记表
  1585. if (bisInspGrw != null) {
  1586. //删除督查对象
  1587. this.bisInspAllObjDao.delete(bisInspGrw.getObjId());
  1588. }
  1589. } else if (BisInspEnum.WAGA.getValue().equals(objType)) {//水闸
  1590. BisInspWagaMrsCiParam bisInspWagaMrsCi = new BisInspWagaMrsCiParam();
  1591. bisInspWagaMrsCi.setRgstrId(id);
  1592. //删除水闸督查管理责任体系建设和落实情况
  1593. this.bisInspWagaMrsCiDao.deleteBy(bisInspWagaMrsCi);
  1594. BisInspWagaSafeManageParam bisInspWagaSafeManage = new BisInspWagaSafeManageParam();
  1595. bisInspWagaSafeManage.setRgstrId(id);
  1596. //删除水闸督查安全管理情况
  1597. this.bisInspWagaSafeManageDao.deleteBy(bisInspWagaSafeManage);
  1598. BisInspWagaDmamInfoParam bisInspWagaDmamInfoParam = new BisInspWagaDmamInfoParam();
  1599. bisInspWagaDmamInfoParam.setRgstrId(id);
  1600. //删除水闸督查日常管理和维修养护情况
  1601. this.bisInspWagaDmamInfoDao.deleteBy(bisInspWagaDmamInfoParam);
  1602. BisInspWagaProenInfoParam bisInspWagaProenInfoParam = new BisInspWagaProenInfoParam();
  1603. bisInspWagaProenInfoParam.setRgstrId(id);
  1604. //删除水闸督查工程实体情况
  1605. this.bisInspWagaProenInfoDao.deleteBy(bisInspWagaProenInfoParam);
  1606. AttWagaRgstr attWagaRgstr = this.attWagaRgstrDao.get(id);
  1607. //删除登记表
  1608. this.attWagaRgstrDao.delete(id);
  1609. if (attWagaRgstr != null) {
  1610. //删除督查对象
  1611. this.bisInspAllObjDao.delete(attWagaRgstr.getObjId());
  1612. }
  1613. } else if (BisInspEnum.EMPWTRUN.getValue().equals(objType)) {//水利工程运行
  1614. BisInspKeyRegisterSectionParam bisInspKeyRegisterSectionParam = new BisInspKeyRegisterSectionParam();
  1615. bisInspKeyRegisterSectionParam.setRegId(id);
  1616. //获取172重点水利项目登记表标段基本信息
  1617. List<BisInspKeyRegisterSection> bisInspKeyRegisterSectionList = this.bisInspKeyRegisterSectionDao.findList(bisInspKeyRegisterSectionParam);
  1618. if (bisInspKeyRegisterSectionList.size() > 0) {
  1619. for (BisInspKeyRegisterSection b : bisInspKeyRegisterSectionList) {
  1620. BisInspKeyRegSecUnitParam bisInspKeyRegSecUnitParam = new BisInspKeyRegSecUnitParam();
  1621. bisInspKeyRegSecUnitParam.setSecId(b.getId());
  1622. //删除172重点水利项目标段责任单位
  1623. this.bisInspKeyRegSecUnitDao.deleteBy(bisInspKeyRegSecUnitParam);
  1624. }
  1625. }
  1626. //删除172重点水利项目登记表标段
  1627. this.bisInspKeyRegisterSectionDao.deleteBy(bisInspKeyRegisterSectionParam);
  1628. this.attMampuInfoDao.deleteByRegId(id);//删除管理单位信息表
  1629. BisInspKeyRegister bisInspKeyRegister = this.bisInspKeyRegisterDao.get(id);
  1630. this.bisInspKeyRegisterDao.delete(id);//删除登记表
  1631. if (bisInspKeyRegister != null) {
  1632. this.bisInspAllObjDao.delete(bisInspKeyRegister.getObjId());//删除督查对象
  1633. }
  1634. } else if (BisInspEnum.PAWP.getValue().equals(objType)) {
  1635. //删除专业稽察工作底稿
  1636. TacPawpListParam listParam = new TacPawpListParam();
  1637. listParam.setRgstrId(id);
  1638. List<TacPawpList> l = tacPawpListDao.findList(listParam);
  1639. for (TacPawpList t : l) {
  1640. //删除查阅的资料目录
  1641. TacPawpDrmParam drmParam = new TacPawpDrmParam();
  1642. drmParam.setListId(t.getId());
  1643. tacPawpDrmDao.deleteBy(drmParam);
  1644. }
  1645. tacPawpListDao.deleteBy(listParam);
  1646. //删除前期与设计基本情况表
  1647. TacPawpPdbstParam pdbstParam = new TacPawpPdbstParam();
  1648. pdbstParam.setRgstrId(id);
  1649. tacPawpPdbstDao.deleteBy(pdbstParam);
  1650. //删除建设管理基本情况表-项目法人责任制-TAC_PAWP_BSTOCM_PLPRS
  1651. TacPawpBstocmPlprsParam bstocmPlprsParam = new TacPawpBstocmPlprsParam();
  1652. bstocmPlprsParam.setRgstrId(id);
  1653. tacPawpBstocmPlprsDao.deleteBy(bstocmPlprsParam);
  1654. //删除建设管理基本情况表-招标投标制-TAC_PAWP_BSTOCM_TSOPBFP
  1655. TacPawpBstocmTsopbfpParam bstocmTsopbfpParam = new TacPawpBstocmTsopbfpParam();
  1656. bstocmTsopbfpParam.setRgstrId(id);
  1657. List<TacPawpBstocmTsopbfp> bstocmTsopbfps = tacPawpBstocmTsopbfpDao.findList(bstocmTsopbfpParam);
  1658. for (TacPawpBstocmTsopbfp t : bstocmTsopbfps
  1659. ) {
  1660. //删除建设管理基本情况表-招标投标制-标段-TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  1661. TacPawpBstocmTsopbfpSctnParam bstocmTsopbfpSctnParam = new TacPawpBstocmTsopbfpSctnParam();
  1662. bstocmTsopbfpSctnParam.setTsopbfpId(t.getId());
  1663. tacPawpBstocmTsopbfpSctnDao.deleteBy(bstocmTsopbfpSctnParam);
  1664. //删除建设监理单位与标段关系表-TAC_PAWP_BSTOCM_SCTN
  1665. TacPawpBstocmSctnParam bstocmSctnParam = new TacPawpBstocmSctnParam();
  1666. bstocmSctnParam.setSctnId(t.getId());
  1667. tacPawpBstocmSctnDao.deleteBy(bstocmSctnParam);
  1668. }
  1669. tacPawpBstocmTsopbfpDao.deleteBy(bstocmTsopbfpParam);
  1670. //删除建设管理基本情况表-建设监理制-TAC_PAWP_BSTOCM_CPSS
  1671. TacPawpBstocmCpssInfoParam tacPawpBstocmCpssInfoParam = new TacPawpBstocmCpssInfoParam();
  1672. tacPawpBstocmCpssInfoParam.setRgstrId(id);
  1673. List<TacPawpBstocmCpssInfo> pawpBstocmCpsses = tacPawpBstocmCpssInfoDao.findList(tacPawpBstocmCpssInfoParam);
  1674. for (TacPawpBstocmCpssInfo pawpBstocmCpssInfo : pawpBstocmCpsses) {
  1675. TacPawpBstocmCpssParam bstocmCpssParam = new TacPawpBstocmCpssParam();
  1676. bstocmCpssParam.setCpssId(pawpBstocmCpssInfo.getId());
  1677. tacPawpBstocmCpssDao.deleteBy(bstocmCpssParam);
  1678. }
  1679. tacPawpBstocmCpssInfoDao.deleteBy(tacPawpBstocmCpssInfoParam);
  1680. //删除建设管理基本情况表-合同管理制-TAC_PAWP_BSTOCM_CMS
  1681. TacPawpBstocmCmsParam bstocmCmsParam = new TacPawpBstocmCmsParam();
  1682. bstocmCmsParam.setRgstrId(id);
  1683. List<TacPawpBstocmCms> bstocmCms = tacPawpBstocmCmsDao.findList(bstocmCmsParam);
  1684. for (TacPawpBstocmCms t : bstocmCms
  1685. ) {
  1686. //删除建设管理基本情况表-合同管理制-合同列表-TAC_PAWP_BSTOCM_CMS_PACT_LIST
  1687. TacPawpBstocmCmsPactListParam bstocmCmsPactListParam = new TacPawpBstocmCmsPactListParam();
  1688. bstocmCmsPactListParam.setCmsId(t.getId());
  1689. tacPawpBstocmCmsPactListDao.deleteBy(bstocmCmsPactListParam);
  1690. }
  1691. tacPawpBstocmCmsDao.deleteBy(bstocmCmsParam);
  1692. //删除计划下达与执行基本情况表-TAC_PAWP_RAIOBIS
  1693. TacPawpRaiobisParam raiobisParam = new TacPawpRaiobisParam();
  1694. raiobisParam.setRgstrId(id);
  1695. tacPawpRaiobisDao.deleteBy(raiobisParam);
  1696. //删除资金使用与管理基本情况表-TAC_PAWP_BIOFUAM
  1697. TacPawpBiofuamParam biofuamParam = new TacPawpBiofuamParam();
  1698. biofuamParam.setRgstrId(id);
  1699. tacPawpBiofuamDao.deleteBy(biofuamParam);
  1700. //删除工程质量基本情况表--质量管理体制-TAC_PAWP_BITOPQ_QMS
  1701. TacPawpBitopqQmsParam bitopqQmsParam = new TacPawpBitopqQmsParam();
  1702. bitopqQmsParam.setRgstrId(id);
  1703. tacPawpBitopqQmsDao.deleteBy(bitopqQmsParam);
  1704. //删除工程质量基本情况表--工程实体质量与验收-TAC_PAWP_BITOPQ_PEQAA
  1705. TacPawpBitopqPeqaaParam bitopqPeqaaParam = new TacPawpBitopqPeqaaParam();
  1706. bitopqPeqaaParam.setRgstrId(id);
  1707. tacPawpBitopqPeqaaDao.deleteBy(bitopqPeqaaParam);
  1708. //删除工程安全基本情况表--项目法人-TAC_PAWP_BIOES_PE
  1709. TacPawpBioesPeParam bioesPeParam = new TacPawpBioesPeParam();
  1710. bioesPeParam.setRgstrId(id);
  1711. tacPawpBioesPeDao.deleteBy(bioesPeParam);
  1712. //删除工程安全基本情况表--施工单位-TAC_PAWP_BIOES_RWUNIT
  1713. TacPawpBioesRwunitParam bioesRwunitParam = new TacPawpBioesRwunitParam();
  1714. bioesRwunitParam.setRgstrId(id);
  1715. tacPawpBioesRwunitDao.deleteBy(bioesRwunitParam);
  1716. //稽察项目登记表
  1717. TacPawpRgstr tacPawpRgstr = tacPawpRgstrDao.get(id);
  1718. //删除稽察项目登记表
  1719. tacPawpRgstrDao.delete(id);
  1720. if (tacPawpRgstr != null) {
  1721. //删除稽察项目相关问题
  1722. //删除督查对象
  1723. this.bisInspAllObjDao.delete(tacPawpRgstr.getObjId());
  1724. }
  1725. } else if (BisInspEnum.FSC.getValue().equals(objType)) {
  1726. BisInspFscRgstr rgstr = bisInspFscRgstrDao.get(id);
  1727. bisInspFscRgstrDao.delete(id);
  1728. if (rgstr != null) {
  1729. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1730. }
  1731. } else if (BisInspEnum.OTHER.getValue().equals(objType)) {
  1732. BisInspOtherRgstr rgstr = bisInspOtherRgstrDao.get(id);
  1733. bisInspOtherRgstrDao.delete(id);
  1734. if (rgstr != null) {
  1735. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1736. }
  1737. } else if (BisInspEnum.SD.getValue().equals(objType)) {
  1738. BisInspSdRgstr rgstr = bisInspSdRgstrDao.get(id);
  1739. bisInspSdRgstrDao.delete(id);
  1740. if (rgstr != null) {
  1741. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1742. }
  1743. } else if (BisInspEnum.WIU.getValue().equals(objType)) {
  1744. //删除取水单位取用水情况
  1745. BisInspWiuRgstrIntInfoParam param = new BisInspWiuRgstrIntInfoParam();
  1746. param.setRgstrId(id);
  1747. wiuRgstrIntInfoDao.deleteBy(param);
  1748. //删除取水许可审批监管情况
  1749. BisInspWiuRgstrApprInfoParam apprInfoParam = new BisInspWiuRgstrApprInfoParam();
  1750. apprInfoParam.setRgstrId(id);
  1751. wiuRgstrApprInfoDao.deleteBy(apprInfoParam);
  1752. BisInspWiuRgstr rgstr = wiuRgstrDao.get(id);
  1753. wiuRgstrDao.delete(id);
  1754. if (rgstr != null) {
  1755. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1756. }
  1757. } else if (BisInspEnum.SWHS.getValue().equals(objType)) {
  1758. //删除安全保障达标落实情况表
  1759. BisInspSwhsRgstrSafetyParam safetyParam = new BisInspSwhsRgstrSafetyParam();
  1760. safetyParam.setRgstrId(id);
  1761. swhsRgstrSafetyDao.deleteBy(safetyParam);
  1762. //删除保护措施监管情况
  1763. BisInspSwhsRgstrMeasuresParam measuresParam = new BisInspSwhsRgstrMeasuresParam();
  1764. measuresParam.setId(id);
  1765. swhsRgstrMeasuresDao.deleteBy(measuresParam);
  1766. //删除地级行政区应急备用水源建设情况表
  1767. BisInspSwhsRgstrWaterParam waterParam = new BisInspSwhsRgstrWaterParam();
  1768. waterParam.setRgstrId(id);
  1769. swhsRgstrWaterDao.deleteBy(waterParam);
  1770. BisInspSwhsRgstr rgstr = swhsRgstrDao.get(id);
  1771. swhsRgstrDao.delete(id);
  1772. if (rgstr != null) {
  1773. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1774. }
  1775. } else if (BisInspEnum.CITY.getValue().equals(objType)) {
  1776. BisInspWintRgstrIntInfoParam intInfoParam = new BisInspWintRgstrIntInfoParam();
  1777. intInfoParam.setRgstrId(id);
  1778. wintRgstrIntInfoDao.deleteBy(intInfoParam);
  1779. BisInspWintRgstr rgstr = wintRgstrDao.get(id);
  1780. wintRgstrDao.delete(id);
  1781. if (rgstr != null) {
  1782. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1783. }
  1784. } else if (BisInspEnum.SVWT.getValue().equals(objType)) {
  1785. BisInspSvwtAreaRgstrWswmParam wswmParam = new BisInspSvwtAreaRgstrWswmParam();
  1786. wswmParam.setRgstrId(id);
  1787. svwtAreaWswmDao.deleteBy(wswmParam);
  1788. BisInspSvwtAreaRgstrWseParam wseParam = new BisInspSvwtAreaRgstrWseParam();
  1789. wseParam.setRgstrId(id);
  1790. svwtAreaWseDao.deleteBy(wseParam);
  1791. BisInspSvwtAreaRgstr rgstr = svwtAreaRgstrDao.get(id);
  1792. if (rgstr != null) {
  1793. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1794. }
  1795. } else if (BisInspEnum.WUNT.getValue().equalsIgnoreCase(objType)) {
  1796. BisInspSvwtWuntRgstrWuuswParam wuuswParam = new BisInspSvwtWuntRgstrWuuswParam();
  1797. wuuswParam.setRgstrId(id);
  1798. svwtWuntWuuswDao.deleteBy(wuuswParam);
  1799. BisInspSvwtWuntRgstrWsuswParam wsuswParam = new BisInspSvwtWuntRgstrWsuswParam();
  1800. wsuswParam.setRgstrId(id);
  1801. svwtWuntWsuswDao.deleteBy(wsuswParam);
  1802. BisInspSvwtWuntRgstr rgstr = svwtWuntRgstrDao.get(id);
  1803. if (rgstr != null) {
  1804. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1805. }
  1806. } else if (BisInspEnum.PRD.getValue().equals(objType)) {
  1807. BisInspOprdCstrProjRgstr rgstr = oprdCstrProjRgstrDao.get(id);
  1808. oprdCstrProjRgstrDao.delete(id);
  1809. if (rgstr != null) {
  1810. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1811. }
  1812. } else if (BisInspEnum.JSFL.getValue().equals(objType)) {
  1813. AttJskejianFlkdisRgstr rgstr = jskejianFlkdisRgstrDao.get(id);
  1814. jskejianFlkdisRgstrDao.delete(id);
  1815. if (rgstr != null) {
  1816. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1817. }
  1818. } else if (BisInspEnum.JSWA.getValue().equals(objType)) {
  1819. AttJskejianWaterRgstr rgstr = jskejianWaterRgstrDao.get(id);
  1820. jskejianWaterRgstrDao.delete(id);
  1821. if (rgstr != null) {
  1822. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1823. }
  1824. } else if (BisInspEnum.ECOFRD.getValue().equals(objType)) {
  1825. AttJskejianEcofrdRgstr rgstr = jskejianEcofrdRgstrDao.get(id);
  1826. jskejianEcofrdRgstrDao.delete(id);
  1827. if (rgstr != null) {
  1828. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1829. }
  1830. } else if (BisInspEnum.RSML.getValue().equals(objType)) {
  1831. //三个责任人
  1832. BisInspRsmlRgstrPresParam presParam = new BisInspRsmlRgstrPresParam();
  1833. presParam.setRgstrId(id);
  1834. bisInspRsmlRgstrPresDao.deleteBy(presParam);
  1835. //运行管理
  1836. BisInspRsmlRgstrRunManageParam runManageParam = new BisInspRsmlRgstrRunManageParam();
  1837. runManageParam.setRgstrId(id);
  1838. bisInspRsmlRgstrRunManageDao.deleteBy(runManageParam);
  1839. //实体责任
  1840. BisInspRsmlRgstrProjectParam projectParam = new BisInspRsmlRgstrProjectParam();
  1841. projectParam.setRgstrId(id);
  1842. bisInspRsmlRgstrProjectDao.deleteBy(projectParam);
  1843. BisInspRsmlRgstr rgstr = bisInspRsmlRgstrDao.get(id);
  1844. bisInspRsmlRgstrDao.delete(id);
  1845. if (rgstr != null) {
  1846. this.bisInspAllObjDao.delete(rgstr.getObjId());
  1847. }
  1848. } else if (BisInspEnum.RSFCO.getValue().equals(objType)) {
  1849. BisInspRsfcoRgstrBaseParam baseParam = new BisInspRsfcoRgstrBaseParam();
  1850. baseParam.setRgstrId(id);
  1851. bisInspRsfcoRgstrBaseDao.deleteBy(baseParam);
  1852. BisInspRsfcoRgstrFlliParam flliParam = new BisInspRsfcoRgstrFlliParam();
  1853. flliParam.setRgstrId(id);
  1854. bisInspRsfcoRgstrFlliDao.deleteBy(flliParam);
  1855. BisInspRsfcoRgstrAoeparoParam aoeparoParam = new BisInspRsfcoRgstrAoeparoParam();
  1856. aoeparoParam.setRgstrId(id);
  1857. bisInspRsfcoRgstrAoeparoDao.deleteBy(aoeparoParam);
  1858. this.bisInspRsfcoRgstrService.delete(id);//删除水库登记表
  1859. } else if (BisInspEnum.MFDP.getValue().equals(objType)) {
  1860. bisInspMfdpRgstrService.delete(id);
  1861. }
  1862. }
  1863. */
  1864. /**
  1865. * 获取督查组相关的对象、人员、区域信息
  1866. *
  1867. * @param persid
  1868. * @param ptype
  1869. * @param id
  1870. * @return
  1871. *//*
  1872. @Override
  1873. public List<PersAllInfoDto> getAllInfoByPersid(String persid, String ptype, String id, String orgId) {
  1874. ptype = "00" + ptype;
  1875. String province = inspOrgService.getProvince(orgId);
  1876. List<PersAllInfoDto> persAllInfoDtoList = this.supervisionPlanDao.getAllInfoByPersid(persid, ptype, id, orgId, province);
  1877. if (persAllInfoDtoList.size() > 0) {
  1878. for (PersAllInfoDto p : persAllInfoDtoList) {
  1879. List<PersAllDto> persAllDtoList = this.supervisionPlanDao.getPersAllDtoList(p.getId(), orgId, province);
  1880. List<PersAllObjDto> persAllObjDtoList = this.supervisionPlanDao.getPersAllObjDtoListByType(p.getId(), ptype, orgId, province);
  1881. List<PersAllAreaDto> persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(p.getId(), orgId, province);
  1882. p.setPersAllDtoList(persAllDtoList);
  1883. p.setPersAllObjDtoList(persAllObjDtoList);
  1884. p.setPersAllAreaDtoList(persAllAreaDtoList);
  1885. }
  1886. }
  1887. return persAllInfoDtoList;
  1888. }
  1889. */
  1890. /**
  1891. * 添加督查小组,不存在批次时同时添加批次
  1892. *
  1893. * @param groupInfoDto
  1894. * @return
  1895. *//*
  1896. @Override
  1897. public String insertGroupInfo(GroupInfoDto groupInfoDto) {
  1898. if (groupInfoDto.getPtype().length() == 1) {//将类型拼成类似于001这种格式
  1899. groupInfoDto.setPtype("00" + groupInfoDto.getPtype());
  1900. }
  1901. String province = inspOrgService.getProvince(groupInfoDto.getOrgId());
  1902. if (groupInfoDto.getPtype().length() == 2) {//将类型拼成类似于001这种格式
  1903. groupInfoDto.setPtype("0" + groupInfoDto.getPtype());
  1904. }
  1905. AllNodeDto nameDto = this.supervisionPlanDao.getNodeById(groupInfoDto.getPtype() + groupInfoDto.getOrgId());
  1906. if (nameDto == null) {
  1907. BisInspOrg bisInspOrg = bisInspOrgDao.get(groupInfoDto.getOrgId());
  1908. BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto();
  1909. String groupId = groupInfoDto.getPtype() + groupInfoDto.getOrgId();
  1910. bisInspAllNodeDto.setId(groupId);
  1911. bisInspAllNodeDto.setPnm(bisInspOrg.getOrgNm());
  1912. String pid = groupInfoDto.getPtype();
  1913. bisInspAllNodeDto.setPid(pid);
  1914. bisInspAllNodeDto.setSttm(groupInfoDto.getSttm());
  1915. bisInspAllNodeDto.setEntm(groupInfoDto.getEntm());
  1916. bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear());
  1917. bisInspAllNodeDto.setProvince(province);
  1918. bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth());
  1919. String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date());
  1920. bisInspAllNodeDto.setIntm(intm);
  1921. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次
  1922. }
  1923. String id = groupInfoDto.getPtype() + groupInfoDto.getOrgId() + "___";
  1924. //查询是否存在批次insertGroupInfo
  1925. ObjectNameDto objectNameDto = this.supervisionPlanDao.getNodeBy(id, groupInfoDto.getInspYear(), groupInfoDto.getInspMnth(), groupInfoDto.getOrgId(), province);
  1926. if (objectNameDto == null) {//如果为空,新建批次
  1927. BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto();
  1928. String groupId = groupInfoDto.getPtype() + groupInfoDto.getOrgId() + "0" + groupInfoDto.getInspMnth();
  1929. bisInspAllNodeDto.setId(groupId);
  1930. bisInspAllNodeDto.setPnm(groupInfoDto.getInspYear() + "年" + groupInfoDto.getInspMnth() + "月督查");
  1931. String pid = groupInfoDto.getPtype() + groupInfoDto.getOrgId();
  1932. bisInspAllNodeDto.setPid(pid);
  1933. bisInspAllNodeDto.setSttm(groupInfoDto.getSttm());
  1934. bisInspAllNodeDto.setEntm(groupInfoDto.getEntm());
  1935. bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear());
  1936. bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth());
  1937. bisInspAllNodeDto.setOrgId(groupInfoDto.getOrgId());
  1938. bisInspAllNodeDto.setProvince(province);
  1939. String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date());
  1940. bisInspAllNodeDto.setIntm(intm);
  1941. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次
  1942. String gid = groupId + "001";
  1943. bisInspAllNodeDto.setId(gid);
  1944. bisInspAllNodeDto.setPnm(groupInfoDto.getName());
  1945. bisInspAllNodeDto.setPid(groupId);
  1946. bisInspAllNodeDto.setInspTask(groupInfoDto.getInspTask());
  1947. bisInspAllNodeDto.setProvince(province);
  1948. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组
  1949. return gid;
  1950. } else {//如果存在批次
  1951. String newGroupId = "";
  1952. ObjIdDto objIdDto = this.supervisionPlanDao.getMaxGroupId(objectNameDto.getId(), objectNameDto.getOrgId(), province);//获取最新组id
  1953. if (objIdDto.getId() != null) {//如果该批次下有组,则组id加1
  1954. String rtId = objIdDto.getId().substring(objIdDto.getId().length() - 1, objIdDto.getId().length());
  1955. int i = Integer.parseInt(rtId) + 1;
  1956. newGroupId = String.valueOf(i);
  1957. if ("10".equals(newGroupId)) {//新建组id末尾为10的时候进行截取处理
  1958. String sid = objIdDto.getId().substring(objIdDto.getId().length() - 2, objIdDto.getId().length() - 1);
  1959. int j = Integer.parseInt(sid) + 1;
  1960. String ss = String.valueOf(j);
  1961. newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 2) + ss + "0";
  1962. } else {
  1963. newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 1) + newGroupId;
  1964. }
  1965. } else {//如果该批次下没有组,则组id后三位为001
  1966. newGroupId = objectNameDto.getId() + "001";
  1967. }
  1968. BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto();
  1969. bisInspAllNodeDto.setId(newGroupId);
  1970. bisInspAllNodeDto.setPnm(groupInfoDto.getName());
  1971. bisInspAllNodeDto.setPid(objectNameDto.getId());
  1972. bisInspAllNodeDto.setSttm(groupInfoDto.getSttm());
  1973. bisInspAllNodeDto.setEntm(groupInfoDto.getEntm());
  1974. bisInspAllNodeDto.setOrgId(groupInfoDto.getOrgId());
  1975. bisInspAllNodeDto.setInspYear(groupInfoDto.getInspYear());
  1976. bisInspAllNodeDto.setInspMnth(groupInfoDto.getInspMnth());
  1977. bisInspAllNodeDto.setProvince(province);
  1978. String intm=new SimpleDateFormat("yyyy-MM-dd").format(new Date());
  1979. bisInspAllNodeDto.setIntm(intm);
  1980. bisInspAllNodeDto.setInspTask(groupInfoDto.getInspTask());
  1981. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组
  1982. return newGroupId;
  1983. }
  1984. }
  1985. */
  1986. /**
  1987. * 根据id修改节点
  1988. *
  1989. * @param bisInspAllDto
  1990. *//*
  1991. @Override
  1992. public void updateNode(BisInspAllDto bisInspAllDto) {
  1993. this.supervisionPlanDao.updateNode(bisInspAllDto);
  1994. }
  1995. */
  1996. /**
  1997. * 清空督查对象(根据obj_id)
  1998. *
  1999. * @param objType
  2000. * @param objId
  2001. *//*
  2002. @Override
  2003. public void cleanObjDataByObjId(String objType, String objId) {
  2004. String id = "";
  2005. if (BisInspEnum.REVER.getValue().equals(objType)) {
  2006. BisInspRsvrRgstrParam bisInspRsvrRgstrParam = new BisInspRsvrRgstrParam();
  2007. bisInspRsvrRgstrParam.setObjId(objId);
  2008. List<BisInspRsvrRgstr> list = this.bisInspRsvrRgstrDao.findList(bisInspRsvrRgstrParam);
  2009. if (list.size() > 0) {
  2010. id = list.get(0).getRgstrId();
  2011. }
  2012. } else if (BisInspEnum.VILL.getValue().equals(objType)) {
  2013. BisInspVillRgstrParam bisInspVillRgstrParam = new BisInspVillRgstrParam();
  2014. bisInspVillRgstrParam.setObjId(objId);
  2015. List<BisInspVillRgstr> list = this.bisInspVillRgstrDao.findList(bisInspVillRgstrParam);
  2016. if (list.size() > 0) {
  2017. id = list.get(0).getEngId();
  2018. }
  2019. } else if (BisInspEnum.TRACK.getValue().equals(objType)) {
  2020. BisInspWtdstTrackParam bisInspWtdstTrackParam = new BisInspWtdstTrackParam();
  2021. bisInspWtdstTrackParam.setObjId(objId);
  2022. List<BisInspWtdstTrack> list = this.bisInspWtdstTrackDao.findList(bisInspWtdstTrackParam);
  2023. if (list.size() > 0) {
  2024. id = list.get(0).getTrackId();
  2025. }
  2026. } else if (BisInspEnum.EMPWT.getValue().equals(objType)) {
  2027. BisInspKeyRegisterParam bisInspKeyRegisterParam = new BisInspKeyRegisterParam();
  2028. bisInspKeyRegisterParam.setObjId(objId);
  2029. List<BisInspKeyRegister> list = this.bisInspKeyRegisterDao.findList(bisInspKeyRegisterParam);
  2030. if (list.size() > 0) {
  2031. id = list.get(0).getId();
  2032. }
  2033. } else if (BisInspEnum.GRW.getValue().equals(objType)) {
  2034. BisInspGrwParam bisInspGrwParam = new BisInspGrwParam();
  2035. bisInspGrwParam.setObjId(objId);
  2036. List<BisInspGrw> list = this.bisInspGrwDao.findList(bisInspGrwParam);
  2037. if (list.size() > 0) {
  2038. id = list.get(0).getId();
  2039. }
  2040. } else if (BisInspEnum.WAGA.getValue().equals(objType)) {
  2041. AttWagaRgstrParam attWagaRgstrParam = new AttWagaRgstrParam();
  2042. attWagaRgstrParam.setObjId(objId);
  2043. List<AttWagaRgstr> list = this.attWagaRgstrDao.findList(attWagaRgstrParam);
  2044. if (list.size() > 0) {
  2045. id = list.get(0).getId();
  2046. }
  2047. } else if (BisInspEnum.EMPWTRUN.getValue().equals(objType)) {
  2048. BisInspKeyRegisterParam bisInspKeyRegisterParam = new BisInspKeyRegisterParam();
  2049. bisInspKeyRegisterParam.setObjId(objId);
  2050. List<BisInspKeyRegister> list = this.bisInspKeyRegisterDao.findList(bisInspKeyRegisterParam);
  2051. if (list.size() > 0) {
  2052. id = list.get(0).getId();
  2053. }
  2054. } else if (BisInspEnum.PAWP.getValue().equals(objType)) {
  2055. TacPawpRgstrParam tacPawpRgstrParam = new TacPawpRgstrParam();
  2056. tacPawpRgstrParam.setObjId(objId);
  2057. List<TacPawpRgstr> list = tacPawpRgstrDao.findList(tacPawpRgstrParam);
  2058. if (list.size() > 0) {
  2059. id = list.get(0).getId();
  2060. }
  2061. } else if (BisInspEnum.FSC.getValue().equals(objType)) {
  2062. BisInspFscRgstrParam bisInspFscRgstrParam = new BisInspFscRgstrParam();
  2063. bisInspFscRgstrParam.setObjId(objId);
  2064. List<BisInspFscRgstr> list = bisInspFscRgstrDao.findList(bisInspFscRgstrParam);
  2065. if (list.size() > 0) {
  2066. id = list.get(0).getId();
  2067. }
  2068. } else if (BisInspEnum.OTHER.getValue().equals(objType)) {
  2069. BisInspOtherRgstrParam bisInspOtherRgstrParam = new BisInspOtherRgstrParam();
  2070. bisInspOtherRgstrParam.setObjId(objId);
  2071. List<BisInspOtherRgstr> list = bisInspOtherRgstrDao.findList(bisInspOtherRgstrParam);
  2072. if (list.size() > 0) {
  2073. id = list.get(0).getId();
  2074. }
  2075. } else if (BisInspEnum.SD.getValue().equals(objType)) {
  2076. BisInspSdRgstrParam param = new BisInspSdRgstrParam();
  2077. param.setObjId(objId);
  2078. List<BisInspSdRgstr> list = bisInspSdRgstrDao.findList(param);
  2079. if (list.size() > 0) {
  2080. id = list.get(0).getId();
  2081. }
  2082. } else if (BisInspEnum.WIU.getValue().equals(objType)) {
  2083. BisInspWiuRgstrParam param = new BisInspWiuRgstrParam();
  2084. param.setObjId(objId);
  2085. List<BisInspWiuRgstr> list = wiuRgstrDao.findList(param);
  2086. if (list.size() > 0) {
  2087. id = list.get(0).getId();
  2088. }
  2089. } else if (BisInspEnum.SWHS.getValue().equals(objType)) {
  2090. BisInspSwhsRgstrParam param = new BisInspSwhsRgstrParam();
  2091. param.setObjId(objId);
  2092. List<BisInspSwhsRgstr> list = swhsRgstrDao.findList(param);
  2093. if (list.size() > 0) {
  2094. id = list.get(0).getId();
  2095. }
  2096. } else if (BisInspEnum.CITY.getValue().equals(objType)) {
  2097. BisInspWintRgstrParam param = new BisInspWintRgstrParam();
  2098. param.setObjId(objId);
  2099. List<BisInspWintRgstr> list = wintRgstrDao.findList(param);
  2100. if (list.size() > 0) {
  2101. id = list.get(0).getId();
  2102. }
  2103. } else if (BisInspEnum.SVWT.getValue().equals(objType)) {
  2104. BisInspSvwtAreaRgstrParam param = new BisInspSvwtAreaRgstrParam();
  2105. param.setObjId(objId);
  2106. List<BisInspSvwtAreaRgstr> list = svwtAreaRgstrDao.findList(param);
  2107. if (list.size() > 0) {
  2108. id = list.get(0).getId();
  2109. }
  2110. } else if (BisInspEnum.WUNT.getValue().equals(objType)) {
  2111. BisInspSvwtWuntRgstrParam param = new BisInspSvwtWuntRgstrParam();
  2112. param.setObjId(objId);
  2113. List<BisInspSvwtWuntRgstr> list = svwtWuntRgstrDao.findList(param);
  2114. if (list.size() > 0) {
  2115. id = list.get(0).getId();
  2116. }
  2117. } else if (BisInspEnum.PRD.getValue().equals(objType)) {
  2118. BisInspOprdCstrProjRgstrParam param = new BisInspOprdCstrProjRgstrParam();
  2119. param.setObjId(objId);
  2120. List<BisInspOprdCstrProjRgstr> list = oprdCstrProjRgstrDao.findList(param);
  2121. if (list.size() > 0) {
  2122. id = list.get(0).getId();
  2123. }
  2124. } else if (BisInspEnum.JSFL.getValue().equals(objType)) {
  2125. AttJskejianFlkdisRgstrParam param = new AttJskejianFlkdisRgstrParam();
  2126. param.setObjId(objId);
  2127. List<AttJskejianFlkdisRgstr> list = jskejianFlkdisRgstrDao.findList(param);
  2128. if (list.size() > 0) {
  2129. id = list.get(0).getId();
  2130. }
  2131. } else if (BisInspEnum.JSWA.getValue().equals(objType)) {
  2132. AttJskejianWaterRgstrParam param = new AttJskejianWaterRgstrParam();
  2133. param.setObjId(objId);
  2134. List<AttJskejianWaterRgstr> list = jskejianWaterRgstrDao.findList(param);
  2135. if (list.size() > 0) {
  2136. id = list.get(0).getId();
  2137. }
  2138. } else if (BisInspEnum.ECOFRD.getValue().equals(objType)) {
  2139. AttJskejianEcofrdRgstrParam param = new AttJskejianEcofrdRgstrParam();
  2140. param.setObjId(objId);
  2141. List<AttJskejianEcofrdRgstr> list = jskejianEcofrdRgstrDao.findList(param);
  2142. if (list.size() > 0) {
  2143. id = list.get(0).getId();
  2144. }
  2145. } else if (BisInspEnum.RSML.getValue().equals(objType)) {
  2146. BisInspRsmlRgstrParam param = new BisInspRsmlRgstrParam();
  2147. param.setObjId(objId);
  2148. List<BisInspRsmlRgstr> list = bisInspRsmlRgstrDao.findList(param);
  2149. if (list.size() > 0) {
  2150. id = list.get(0).getId();
  2151. }
  2152. } else if(BisInspEnum.BIS_ZHEJIANG_JG_RGSTR.getValue().equals(objType)){
  2153. BisZhejiangJgRgstrParam param = new BisZhejiangJgRgstrParam();
  2154. param.setObjId(objId);
  2155. List<BisZhejiangJgRgstr> list = bisZhejiangJgRgstrDao.findList(param);
  2156. if (list.size() > 0) {
  2157. id = list.get(0).getId();
  2158. }
  2159. }
  2160. if (StringUtils.isNotBlank(id)) {
  2161. cleanObjData(objType, id);
  2162. }
  2163. BisInspAllObjParam bisInspAllObjParam = new BisInspAllObjParam();
  2164. if (StringUtils.isNotBlank(objId)) {
  2165. bisInspAllObjParam.setObjId(objId);
  2166. this.bisInspAllObjDao.deleteBy(bisInspAllObjParam);
  2167. }
  2168. }
  2169. */
  2170. /**
  2171. * 清空督查组信息
  2172. *
  2173. * @param groupId
  2174. *//*
  2175. @Override
  2176. public void cleanGroupInfo(String groupId, String orgId) {
  2177. BisInspAllObjParam bisInspObjParam = new BisInspAllObjParam();
  2178. bisInspObjParam.setId(groupId);
  2179. //根据组id获取objid
  2180. bisInspObjParam.setOrgId(orgId);
  2181. List<BisInspAllObj> bisInspAllObjList = this.bisInspAllObjDao.findList(bisInspObjParam);
  2182. if (bisInspAllObjList.size() > 0) {
  2183. for (BisInspAllObj bisInspAllObj : bisInspAllObjList) {
  2184. //根据objid删除登记表等数据
  2185. cleanObjDataByObjId(groupId.substring(2, 3), bisInspAllObj.getObjId());
  2186. }
  2187. }
  2188. BisInspSelAreaParam bisInspSelAreaParam = new BisInspSelAreaParam();
  2189. bisInspSelAreaParam.setId(groupId);
  2190. //删除督查区域
  2191. this.bisInspSelAreaDao.deleteBy(bisInspSelAreaParam);
  2192. BisInspAllRlationParam bisInspAllRlationParam = new BisInspAllRlationParam();
  2193. bisInspAllRlationParam.setId(groupId);
  2194. //删除督查人员
  2195. this.bisInspAllRlationDao.deleteBy(bisInspAllRlationParam);
  2196. //删除组
  2197. this.bisInspAllDao.delete(groupId);
  2198. //删除上一级
  2199. BisInspAllParam bisInspAllParam = new BisInspAllParam();
  2200. bisInspAllParam.setPid(groupId.substring(0, groupId.length() - 3));
  2201. List<BisInspAll> bisInspAlls = this.bisInspAllDao.findList(bisInspAllParam);
  2202. if (bisInspAlls == null || bisInspAlls.size() == 0) {
  2203. this.bisInspAllDao.delete(groupId.substring(0, groupId.length() - 3));
  2204. }
  2205. }
  2206. */
  2207. /**
  2208. * 复用督查组信息
  2209. *
  2210. * @param allGroupInfoDto
  2211. *//*
  2212. @Override
  2213. public void copyGroupInfo(AllGroupInfoDto allGroupInfoDto) {
  2214. //督查类型
  2215. String province = inspOrgService.getProvince(allGroupInfoDto.getOrgId());
  2216. if (allGroupInfoDto.getPtype().length() == 1) {
  2217. allGroupInfoDto.setPtype("00" + allGroupInfoDto.getPtype());
  2218. }
  2219. if (allGroupInfoDto.getPtype().length() == 2) {
  2220. allGroupInfoDto.setPtype("0" + allGroupInfoDto.getPtype());
  2221. }
  2222. String id = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId() + "___";
  2223. //查询是否存在批次
  2224. ObjectNameDto objectNameDto = this.supervisionPlanDao.getNodeBy(id, allGroupInfoDto.getInspYear(), allGroupInfoDto.getInspMnth(), allGroupInfoDto.getOrgId(), province);
  2225. if (objectNameDto == null) {//如果为空,新建批次
  2226. BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto();
  2227. String groupId = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId() + "0" + allGroupInfoDto.getInspMnth();
  2228. bisInspAllNodeDto.setId(groupId);
  2229. bisInspAllNodeDto.setPnm(allGroupInfoDto.getInspYear() + "年" + allGroupInfoDto.getInspMnth() + "月督查");
  2230. String pid = allGroupInfoDto.getPtype() + allGroupInfoDto.getOrgId();
  2231. bisInspAllNodeDto.setPid(pid);
  2232. bisInspAllNodeDto.setInspYear(allGroupInfoDto.getInspYear());
  2233. bisInspAllNodeDto.setInspMnth(allGroupInfoDto.getInspMnth());
  2234. bisInspAllNodeDto.setSttm(allGroupInfoDto.getSttm());
  2235. bisInspAllNodeDto.setOrgId(allGroupInfoDto.getOrgId());
  2236. bisInspAllNodeDto.setEntm(allGroupInfoDto.getEntm());
  2237. bisInspAllNodeDto.setProvince(province);
  2238. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建批次
  2239. String gid = groupId + "001";
  2240. bisInspAllNodeDto.setId(gid);
  2241. bisInspAllNodeDto.setPnm("复用1组");
  2242. bisInspAllNodeDto.setPid(groupId);
  2243. bisInspAllNodeDto.setProvince(province);
  2244. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组
  2245. //将人员和区域关联到新建组里
  2246. if (allGroupInfoDto.getPersAllDtoList().size() > 0) {
  2247. for (PersAllDto persAllDto : allGroupInfoDto.getPersAllDtoList()) {
  2248. //添加人员
  2249. this.supervisionPlanDao.insertPers(gid, persAllDto.getGuid(), persAllDto.getPersType(), allGroupInfoDto.getOrgId(), province);
  2250. }
  2251. }
  2252. if (allGroupInfoDto.getPersAllAreaDtoList().size() > 0) {
  2253. for (PersAllAreaDto persAllAreaDto : allGroupInfoDto.getPersAllAreaDtoList()) {
  2254. //添加区域
  2255. String uuid = UuidUtil.uuid();
  2256. this.supervisionPlanDao.insertSupArea(uuid, gid, persAllAreaDto.getAdCode(), persAllAreaDto.getAdName(), allGroupInfoDto.getOrgId(), province);
  2257. }
  2258. }
  2259. } else {//如果存在批次
  2260. String newGroupId = "";
  2261. ObjIdDto objIdDto = this.supervisionPlanDao.getMaxGroupId(objectNameDto.getId(), objectNameDto.getOrgId(), province);//获取最新组id
  2262. if (objIdDto.getId() != null) {//如果该批次下有组,则组id加1
  2263. String rtId = objIdDto.getId().substring(objIdDto.getId().length() - 1, objIdDto.getId().length());
  2264. int i = Integer.parseInt(rtId) + 1;
  2265. newGroupId = String.valueOf(i);
  2266. if ("10".equals(newGroupId)) {//新建组id末尾为10的时候进行截取处理
  2267. String sid = objIdDto.getId().substring(objIdDto.getId().length() - 2, objIdDto.getId().length() - 1);
  2268. int j = Integer.parseInt(sid) + 1;
  2269. String ss = String.valueOf(j);
  2270. newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 2) + ss + "0";
  2271. } else {
  2272. newGroupId = objIdDto.getId().substring(0, objIdDto.getId().length() - 1) + newGroupId;
  2273. }
  2274. } else {//如果该批次下没有组,则组id后三位为001
  2275. newGroupId = objectNameDto.getId() + "001";
  2276. }
  2277. BisInspAllNodeDto bisInspAllNodeDto = new BisInspAllNodeDto();
  2278. bisInspAllNodeDto.setId(newGroupId);
  2279. bisInspAllNodeDto.setPnm("复用" + newGroupId.substring(newGroupId.length() - 1, newGroupId.length()) + "组");
  2280. bisInspAllNodeDto.setPid(objectNameDto.getId());
  2281. bisInspAllNodeDto.setOrgId(objectNameDto.getOrgId());
  2282. bisInspAllNodeDto.setInspYear(allGroupInfoDto.getInspYear());
  2283. bisInspAllNodeDto.setInspMnth(allGroupInfoDto.getInspMnth());
  2284. bisInspAllNodeDto.setSttm(allGroupInfoDto.getSttm());
  2285. bisInspAllNodeDto.setEntm(allGroupInfoDto.getEntm());
  2286. this.supervisionPlanDao.insertNode(bisInspAllNodeDto);//新建组
  2287. if (allGroupInfoDto.getPersAllDtoList().size() > 0) {
  2288. for (PersAllDto persAllDto : allGroupInfoDto.getPersAllDtoList()) {
  2289. //添加人员
  2290. this.supervisionPlanDao.insertPers(newGroupId, persAllDto.getGuid(), persAllDto.getPersType(), allGroupInfoDto.getOrgId(), province);
  2291. }
  2292. }
  2293. if (allGroupInfoDto.getPersAllAreaDtoList().size() > 0) {
  2294. for (PersAllAreaDto persAllAreaDto : allGroupInfoDto.getPersAllAreaDtoList()) {
  2295. //添加区域
  2296. String uuid = UuidUtil.uuid();
  2297. this.supervisionPlanDao.insertSupArea(uuid, newGroupId, persAllAreaDto.getAdCode(), persAllAreaDto.getAdName(), objectNameDto.getOrgId(), province);
  2298. }
  2299. }
  2300. }
  2301. }
  2302. @Override
  2303. public List<PersAllAreaDto> getPersAllAreaDtoList(String id, String orgId) {
  2304. String province = inspOrgService.getProvince(orgId);
  2305. List<PersAllAreaDto> persAllAreaDtoList = this.supervisionPlanDao.getPersAllAreaDtoList(id, orgId, province);
  2306. return persAllAreaDtoList;
  2307. }
  2308. @Override
  2309. public Map<String, Object> importExcel(MultipartFile file, String persId, String orgId) {
  2310. Map<String, Object> map = new HashedMap();
  2311. int success = 0;
  2312. int fail = 0;
  2313. Workbook wb = null;
  2314. InputStream fis = null;
  2315. List<Row> rowList = new ArrayList<Row>();
  2316. try {
  2317. fis = file.getInputStream();
  2318. if (file.getOriginalFilename().endsWith(XLS)) {
  2319. wb = new HSSFWorkbook(fis);
  2320. } else {
  2321. wb = new XSSFWorkbook(fis);
  2322. }
  2323. Sheet sheet = wb.getSheetAt(0);
  2324. Row row = null;
  2325. int lastRowNum = sheet.getPhysicalNumberOfRows();
  2326. for (int i = sheet.getFirstRowNum(); i < lastRowNum; i++) {
  2327. row = sheet.getRow(i);
  2328. if (row != null) {
  2329. rowList.add(row);
  2330. }
  2331. }
  2332. } catch (IOException e) {
  2333. e.printStackTrace();
  2334. } finally {
  2335. if (wb != null) {
  2336. try {
  2337. wb.close();
  2338. } catch (IOException e) {
  2339. e.printStackTrace();
  2340. }
  2341. }
  2342. if (fis != null) {
  2343. try {
  2344. fis.close();
  2345. } catch (IOException e) {
  2346. e.printStackTrace();
  2347. }
  2348. }
  2349. }
  2350. List<GroupInfoDto> list = new ArrayList<>();
  2351. if (rowList.size() > 2) {
  2352. Row row = null;
  2353. for (int i = 2; i < rowList.size(); i++) {
  2354. row = rowList.get(i);
  2355. GroupInfoDto groupInfoDto = new GroupInfoDto();
  2356. for (int j = row.getFirstCellNum(); j < row.getPhysicalNumberOfCells(); j++) {
  2357. Cell cell = row.getCell(j);
  2358. if (cell == null) {
  2359. continue;
  2360. }
  2361. if (j == 1) {
  2362. groupInfoDto.setPtype(fomateType(cleanFomate(String.valueOf(cell))));
  2363. }
  2364. if (j == 2) {
  2365. groupInfoDto.setName(cleanFomate(String.valueOf(cell)));
  2366. }
  2367. if (j == 3) {
  2368. Double db = cell.getNumericCellValue();
  2369. if (db != null) {
  2370. groupInfoDto.setInspYear(String.valueOf(db.intValue()));
  2371. }
  2372. }
  2373. if (j == 4) {
  2374. Double db = cell.getNumericCellValue();
  2375. if (db != null) {
  2376. groupInfoDto.setInspMnth(String.valueOf(db.intValue()));
  2377. }
  2378. }
  2379. if (j == 5) {
  2380. String areaNames = cleanFomate(String.valueOf(cell));
  2381. List<PersAllAreaDto> persAllAreaDtoList = convertAreaNamesToDto(map, fail, areaNames);
  2382. groupInfoDto.setPersAllAreaDtoList(persAllAreaDtoList);
  2383. }
  2384. if (j == 6) {
  2385. String objNames = cleanFomate(String.valueOf(cell));
  2386. List<PersAllObjDto> persAllObjDtoLis = convertObjNamesToDto(map, fail, objNames, groupInfoDto.getPtype());
  2387. groupInfoDto.setPersAllObjDtoList(persAllObjDtoLis);
  2388. }
  2389. if (j == 7) {
  2390. String persNames = cleanFomate(String.valueOf(cell));
  2391. List<PersAllDto> persList = convertPersIdsToDto(map, fail, persNames, "1");
  2392. groupInfoDto.setPersList(persList);
  2393. }
  2394. if (j == 8) {
  2395. String persNames = cleanFomate(String.valueOf(cell));
  2396. List<PersAllDto> persList = convertPersIdsToDto(map, fail, persNames, "2");
  2397. groupInfoDto.setPersList(persList);
  2398. }
  2399. if (j == 9) {
  2400. String persNames = cleanFomate(String.valueOf(cell));
  2401. List<PersAllDto> persList = convertPersIdsToDto(map, fail, persNames, "3");
  2402. groupInfoDto.setPersList(persList);
  2403. }
  2404. if (j == 10) {
  2405. String persNames = cleanFomate(String.valueOf(cell));
  2406. List<PersAllDto> persList = convertPersIdsToDto(map, fail, persNames, "4");
  2407. groupInfoDto.setPersList(persList);
  2408. }
  2409. if (j == 11) {
  2410. groupInfoDto.setSttm(cleanFomate(String.valueOf(cell)).replace("/", "-"));
  2411. }
  2412. if (j == 12) {
  2413. groupInfoDto.setEntm(cleanFomate(String.valueOf(cell)).replace("/", "-"));
  2414. }
  2415. }
  2416. if (StringUtils.isNotBlank(groupInfoDto.getPtype())) {
  2417. list.add(groupInfoDto);
  2418. }
  2419. }
  2420. }
  2421. if (list.size() > 0) {
  2422. for (GroupInfoDto groupInfoDto : list) {
  2423. try {
  2424. groupInfoDto.setOrgId(orgId);
  2425. String groupId = insertGroupInfo(groupInfoDto);
  2426. if (StringUtils.isBlank(groupId)) {
  2427. fail++;
  2428. if (map.get("false") == null) {
  2429. List<String> message = new ArrayList<>();
  2430. message.add(groupInfoDto.getName() + "添加失败");
  2431. map.put("false", message);
  2432. } else {
  2433. ((List) map.get("false")).add(groupInfoDto.getName() + "添加失败");
  2434. }
  2435. }
  2436. PersAllInfoDto persAllInfoDto = new PersAllInfoDto();
  2437. persAllInfoDto.setPersid(persId);
  2438. persAllInfoDto.setId(groupId);
  2439. persAllInfoDto.setPersAllAreaDtoList(groupInfoDto.getPersAllAreaDtoList() == null ? new ArrayList<>() : groupInfoDto.getPersAllAreaDtoList());
  2440. persAllInfoDto.setPersAllDtoList(groupInfoDto.getPersList() == null ? new ArrayList<>() : groupInfoDto.getPersList());
  2441. persAllInfoDto.setPersAllObjDtoList(groupInfoDto.getPersAllObjDtoList() == null ? new ArrayList<>() : groupInfoDto.getPersAllObjDtoList());
  2442. insertSupervisionObj(persAllInfoDto);
  2443. success++;
  2444. } catch (Exception e) {
  2445. fail++;
  2446. if (map.get("false") == null) {
  2447. List<String> message = new ArrayList<>();
  2448. message.add(groupInfoDto.getName() + "添加失败");
  2449. map.put("false", message);
  2450. } else {
  2451. ((List) map.get("false")).add(groupInfoDto.getName() + "添加失败");
  2452. }
  2453. }
  2454. }
  2455. }
  2456. map.put("success", success);
  2457. map.put("fail", fail);
  2458. return map;
  2459. }
  2460. private List<PersAllObjDto> convertObjNamesToDto(Map<String, Object> map, int fail, String objNames, String ptype) {
  2461. List<PersAllObjDto> list = new ArrayList<>();
  2462. if (StringUtils.isBlank(objNames)) {
  2463. return list;
  2464. }
  2465. if (objNames.contains(",")) {
  2466. for (String objName : objNames.split(",")) {
  2467. getObjDtoByName(objName, list, map, fail, ptype);
  2468. }
  2469. } else {
  2470. getObjDtoByName(objNames, list, map, fail, ptype);
  2471. }
  2472. return list;
  2473. }
  2474. private void getObjDtoByName(String objName, List<PersAllObjDto> list, Map<String, Object> map, int fail, String ptype) {
  2475. if (BisInspEnum.REVER.getValue().equals(ptype)) {
  2476. AttRsBaseParam baseParam = new AttRsBaseParam();
  2477. baseParam.setRsName(objName);
  2478. List<AttRsBase> baseList = attRsBaseDao.findList(baseParam);
  2479. if (baseList.size() == 1) {
  2480. PersAllObjDto objDto = new PersAllObjDto();
  2481. objDto.setCode(baseList.get(0).getRsCode());
  2482. objDto.setName(baseList.get(0).getRsName());
  2483. objDto.setPtype(ptype);
  2484. list.add(objDto);
  2485. } else if (baseList.size() == 0) {
  2486. setFailMessage(map, fail, objName, "水库不存在");
  2487. } else if (baseList.size() > 1) {
  2488. setFailMessage(map, fail, objName, "水库名称重复");
  2489. }
  2490. } else if (BisInspEnum.VILL.getValue().equals(ptype) || BisInspEnum.CITY.getValue().equals(ptype) || BisInspEnum.SVWT.getValue().equals(ptype)) {
  2491. AttAdXBaseParam baseParam = new AttAdXBaseParam();
  2492. baseParam.setAdName(objName);
  2493. baseParam.setAdGrad("3");
  2494. List<AttAdXBase> baseList = attAdXBaseDao.findList(baseParam);
  2495. if (baseList.size() == 1) {
  2496. PersAllObjDto objDto = new PersAllObjDto();
  2497. objDto.setPtype(ptype);
  2498. objDto.setCode(baseList.get(0).getAdCode());
  2499. objDto.setName(baseList.get(0).getAdName());
  2500. list.add(objDto);
  2501. } else if (baseList.size() == 0) {
  2502. setFailMessage(map, fail, objName, "地区不存在");
  2503. } else if (baseList.size() > 1) {
  2504. setFailMessage(map, fail, objName, "地区重复");
  2505. }
  2506. } else if (BisInspEnum.TRACK.getValue().equals(ptype)) {
  2507. BisInspWtdstParam param = new BisInspWtdstParam();
  2508. param.setWtdstNm(objName);
  2509. List<BisInspWtdst> baseList = bisInspWtdstDao.findList(param);
  2510. if (baseList.size() == 1) {
  2511. PersAllObjDto objDto = new PersAllObjDto();
  2512. objDto.setName(baseList.get(0).getWtdstNm());
  2513. objDto.setCode(baseList.get(0).getWtdstId());
  2514. objDto.setPtype(ptype);
  2515. list.add(objDto);
  2516. } else if (baseList.size() == 0) {
  2517. setFailMessage(map, fail, objName, "工程不存在");
  2518. } else if (baseList.size() > 1) {
  2519. setFailMessage(map, fail, objName, "工程重复");
  2520. }
  2521. } else if (BisInspEnum.EMPWT.getValue().equals(ptype) || BisInspEnum.EMPWTRUN.getValue().equals(ptype)) {
  2522. AttEmpwtprjBaseParam param = new AttEmpwtprjBaseParam();
  2523. param.setNm(objName);
  2524. List<AttEmpwtprjBase> baseList = attEmpwtprjBaseDao.findList(param);
  2525. if (baseList.size() == 1) {
  2526. PersAllObjDto objDto = new PersAllObjDto();
  2527. objDto.setPtype(ptype);
  2528. objDto.setCode(baseList.get(0).getId());
  2529. objDto.setName(baseList.get(0).getNm());
  2530. list.add(objDto);
  2531. } else if (baseList.size() == 0) {
  2532. setFailMessage(map, fail, objName, "工程不存在");
  2533. } else if (baseList.size() > 1) {
  2534. setFailMessage(map, fail, objName, "工程重复");
  2535. }
  2536. } else if (BisInspEnum.GRW.getValue().equals(ptype)) {
  2537. AttGrwBaseParam param = new AttGrwBaseParam();
  2538. param.setStnm(objName);
  2539. List<AttGrwBase> baseList = grwBaseDao.findList(param);
  2540. if (baseList.size() == 1) {
  2541. PersAllObjDto objDto = new PersAllObjDto();
  2542. objDto.setPtype(ptype);
  2543. objDto.setName(baseList.get(0).getStnm());
  2544. objDto.setCode(baseList.get(0).getStcd());
  2545. list.add(objDto);
  2546. } else if (baseList.size() == 0) {
  2547. setFailMessage(map, fail, objName, "地下水不存在");
  2548. } else if (baseList.size() > 1) {
  2549. setFailMessage(map, fail, objName, "地下水重复");
  2550. }
  2551. } else if (BisInspEnum.WAGA.getValue().equals(ptype)) {
  2552. AttWagaBaseParam param = new AttWagaBaseParam();
  2553. param.setGateName(objName);
  2554. List<AttWagaBase> baseList = attWagaBaseDao.findList(param);
  2555. if (baseList.size() == 1) {
  2556. PersAllObjDto objDto = new PersAllObjDto();
  2557. objDto.setPtype(ptype);
  2558. objDto.setCode(baseList.get(0).getAdCode());
  2559. objDto.setName(baseList.get(0).getGateName());
  2560. list.add(objDto);
  2561. } else if (baseList.size() == 0) {
  2562. setFailMessage(map, fail, objName, "水闸不存在");
  2563. } else if (baseList.size() > 1) {
  2564. setFailMessage(map, fail, objName, "水闸重复");
  2565. }
  2566. } else if (BisInspEnum.PAWP.getValue().equals(ptype)) {
  2567. TacAttPawpBaseParam param = new TacAttPawpBaseParam();
  2568. param.setName(objName);
  2569. List<TacAttPawpBase> baseList = tacAttPawpBaseDao.findList(param);
  2570. if (baseList.size() == 1) {
  2571. PersAllObjDto objDto = new PersAllObjDto();
  2572. objDto.setPtype(ptype);
  2573. objDto.setCode(baseList.get(0).getId());
  2574. objDto.setName(baseList.get(0).getName());
  2575. list.add(objDto);
  2576. } else if (baseList.size() == 0) {
  2577. setFailMessage(map, fail, objName, "工程不存在");
  2578. } else if (baseList.size() > 1) {
  2579. setFailMessage(map, fail, objName, "工程重复");
  2580. }
  2581. } else if (BisInspEnum.FSC.getValue().equals(ptype)) {
  2582. AttFscBaseParam param = new AttFscBaseParam();
  2583. param.setName(objName);
  2584. List<AttFscBase> baseList = attFscBaseDao.findList(param);
  2585. if (baseList.size() == 1) {
  2586. PersAllObjDto objDto = new PersAllObjDto();
  2587. objDto.setPtype(ptype);
  2588. objDto.setCode(baseList.get(0).getId());
  2589. objDto.setName(baseList.get(0).getName());
  2590. list.add(objDto);
  2591. } else if (baseList.size() == 0) {
  2592. setFailMessage(map, fail, objName, "工程不存在");
  2593. } else if (baseList.size() > 1) {
  2594. setFailMessage(map, fail, objName, "工程重复");
  2595. }
  2596. } else if (BisInspEnum.OTHER.getValue().equals(ptype)) {
  2597. AttOtherBaseParam param = new AttOtherBaseParam();
  2598. param.setName(objName);
  2599. List<AttOtherBase> baseList = attOtherBaseDao.findList(param);
  2600. if (baseList.size() == 1) {
  2601. PersAllObjDto objDto = new PersAllObjDto();
  2602. objDto.setPtype(ptype);
  2603. objDto.setCode(baseList.get(0).getId());
  2604. objDto.setName(baseList.get(0).getName());
  2605. list.add(objDto);
  2606. } else if (baseList.size() == 0) {
  2607. setFailMessage(map, fail, objName, "工程不存在");
  2608. } else if (baseList.size() > 1) {
  2609. setFailMessage(map, fail, objName, "工程重复");
  2610. }
  2611. } else if (BisInspEnum.SD.getValue().equals(ptype)) {
  2612. AttSdBaseParam param = new AttSdBaseParam();
  2613. param.setSdName(objName);
  2614. List<AttSdBase> baseList = sdBaseDao.findList(param);
  2615. if (baseList.size() == 1) {
  2616. PersAllObjDto objDto = new PersAllObjDto();
  2617. objDto.setPtype(ptype);
  2618. objDto.setCode(baseList.get(0).getId());
  2619. objDto.setName(baseList.get(0).getSdName());
  2620. list.add(objDto);
  2621. } else if (baseList.size() == 0) {
  2622. setFailMessage(map, fail, objName, "淤地坝不存在");
  2623. } else if (baseList.size() > 1) {
  2624. setFailMessage(map, fail, objName, "淤地坝重复");
  2625. }
  2626. } else if (BisInspEnum.WIU.getValue().equals(ptype)) {
  2627. AttWiuBaseParam param = new AttWiuBaseParam();
  2628. param.setName(objName);
  2629. List<AttWiuBase> baseList = wiuBaseDao.findList(param);
  2630. if (baseList.size() == 1) {
  2631. PersAllObjDto objDto = new PersAllObjDto();
  2632. objDto.setPtype(ptype);
  2633. objDto.setCode(baseList.get(0).getId());
  2634. objDto.setName(baseList.get(0).getName());
  2635. list.add(objDto);
  2636. } else if (baseList.size() == 0) {
  2637. setFailMessage(map, fail, objName, "取水单位不存在");
  2638. } else if (baseList.size() > 1) {
  2639. setFailMessage(map, fail, objName, "取水单位重复");
  2640. }
  2641. } else if (BisInspEnum.SWHS.getValue().equals(ptype)) {
  2642. AttSwhsBaseParam param = new AttSwhsBaseParam();
  2643. param.setSwhsName(objName);
  2644. List<AttSwhsBase> baseList = swhsBaseDao.findList(param);
  2645. if (baseList.size() == 1) {
  2646. PersAllObjDto objDto = new PersAllObjDto();
  2647. objDto.setPtype(ptype);
  2648. objDto.setCode(baseList.get(0).getId());
  2649. objDto.setName(baseList.get(0).getSwhsName());
  2650. list.add(objDto);
  2651. } else if (baseList.size() == 0) {
  2652. setFailMessage(map, fail, objName, "水源地不存在");
  2653. } else if (baseList.size() > 1) {
  2654. setFailMessage(map, fail, objName, "水源地重复");
  2655. }
  2656. } else if (BisInspEnum.WUNT.getValue().equals(ptype)) {
  2657. AttWuntBaseParam param = new AttWuntBaseParam();
  2658. param.setUtName(objName);
  2659. List<AttWuntBase> baseList = wuntBaseDao.findList(param);
  2660. if (baseList.size() == 1) {
  2661. PersAllObjDto objDto = new PersAllObjDto();
  2662. objDto.setPtype(ptype);
  2663. objDto.setCode(baseList.get(0).getId());
  2664. objDto.setName(baseList.get(0).getUtName());
  2665. list.add(objDto);
  2666. } else if (baseList.size() == 0) {
  2667. setFailMessage(map, fail, objName, "用水单位不存在");
  2668. } else if (baseList.size() > 1) {
  2669. setFailMessage(map, fail, objName, "用水单位重复");
  2670. }
  2671. } else if (BisInspEnum.PRD.getValue().equals(ptype)) {
  2672. AttPrdCstrProjBaseParam param = new AttPrdCstrProjBaseParam();
  2673. param.setName(objName);
  2674. List<AttPrdCstrProjBase> baseList = attPrdCstrProjBaseDao.findList(param);
  2675. if (baseList.size() == 1) {
  2676. PersAllObjDto objDto = new PersAllObjDto();
  2677. objDto.setPtype(ptype);
  2678. objDto.setCode(baseList.get(0).getId());
  2679. objDto.setName(baseList.get(0).getName());
  2680. list.add(objDto);
  2681. } else if (baseList.size() == 0) {
  2682. setFailMessage(map, fail, objName, "水保工作核查不存在");
  2683. } else if (baseList.size() > 1) {
  2684. setFailMessage(map, fail, objName, "水保工作核查重复");
  2685. }
  2686. } else if (BisInspEnum.JSFL.getValue().equals(ptype)) {
  2687. AttJskejianFlkdisBaseParam param = new AttJskejianFlkdisBaseParam();
  2688. param.setName(objName);
  2689. List<AttJskejianFlkdisBase> baseList = jskejianFlkdisBaseDao.findList(param);
  2690. if (baseList.size() == 1) {
  2691. PersAllObjDto objDto = new PersAllObjDto();
  2692. objDto.setPtype(ptype);
  2693. objDto.setCode(baseList.get(0).getId());
  2694. objDto.setName(baseList.get(0).getName());
  2695. list.add(objDto);
  2696. } else if (baseList.size() == 0) {
  2697. setFailMessage(map, fail, objName, "河湖四乱核查不存在");
  2698. } else if (baseList.size() > 1) {
  2699. setFailMessage(map, fail, objName, "河湖四乱核查重复");
  2700. }
  2701. } else if (BisInspEnum.JSWA.getValue().equals(ptype)) {
  2702. AttJskejianWaterBaseParam param = new AttJskejianWaterBaseParam();
  2703. param.setName(objName);
  2704. List<AttJskejianWaterBase> baseList = jskejianWaterBaseDao.findList(param);
  2705. if (baseList.size() == 1) {
  2706. PersAllObjDto objDto = new PersAllObjDto();
  2707. objDto.setPtype(ptype);
  2708. objDto.setCode(baseList.get(0).getId());
  2709. objDto.setName(baseList.get(0).getName());
  2710. list.add(objDto);
  2711. } else if (baseList.size() == 0) {
  2712. setFailMessage(map, fail, objName, "非法采砂核查不存在");
  2713. } else if (baseList.size() > 1) {
  2714. setFailMessage(map, fail, objName, "非法采砂核查重复");
  2715. }
  2716. }
  2717. }
  2718. private void setFailMessage(Map<String, Object> map, int fail, String objName, String message) {
  2719. fail++;
  2720. if (map.get("false") == null) {
  2721. List<String> failList = new ArrayList<>();
  2722. failList.add(objName + message);
  2723. map.put("false", failList);
  2724. } else {
  2725. ((List) map.get("false")).add(objName + message);
  2726. }
  2727. }
  2728. private List<PersAllAreaDto> convertAreaNamesToDto(Map<String, Object> map, int fail, String areaNames) {
  2729. List<PersAllAreaDto> list = new ArrayList<>();
  2730. if (StringUtils.isBlank(areaNames)) {
  2731. return list;
  2732. }
  2733. if (areaNames.contains(SplitValue.DOUHAO_SPLIT)) {
  2734. for (String areaName : areaNames.split(SplitValue.DOUHAO_SPLIT)) {
  2735. AttAdXBaseParam param = new AttAdXBaseParam();
  2736. param.setAdName(areaName);
  2737. param.setAdFcode("000000000000");
  2738. List<AttAdXBase> adXBases = attAdXBaseDao.findList(param);
  2739. if (adXBases.size() == 1) {
  2740. PersAllAreaDto persAllAreaDto = new PersAllAreaDto();
  2741. persAllAreaDto.setAdCode(adXBases.get(0).getAdCode());
  2742. persAllAreaDto.setAdName(adXBases.get(0).getAdName());
  2743. list.add(persAllAreaDto);
  2744. } else if (adXBases.size() == 0) {
  2745. fail++;
  2746. if (map.get("false") == null) {
  2747. List<String> failList = new ArrayList<>();
  2748. failList.add(areaName + "地区查找失败");
  2749. map.put("false", failList);
  2750. } else {
  2751. ((List) map.get("false")).add(areaName + "地区查找失败");
  2752. }
  2753. } else if (adXBases.size() > 1) {
  2754. fail++;
  2755. if (map.get("false") == null) {
  2756. List<String> failList = new ArrayList<>();
  2757. failList.add(areaName + "地区重复");
  2758. map.put("false", failList);
  2759. } else {
  2760. ((List) map.get("false")).add(areaName + "地区重复");
  2761. }
  2762. }
  2763. }
  2764. } else {
  2765. AttAdXBaseParam param = new AttAdXBaseParam();
  2766. param.setAdName(areaNames);
  2767. param.setAdFcode("000000000000");
  2768. List<AttAdXBase> adXBases = attAdXBaseDao.findList(param);
  2769. if (adXBases.size() == 1) {
  2770. PersAllAreaDto persAllAreaDto = new PersAllAreaDto();
  2771. persAllAreaDto.setAdCode(adXBases.get(0).getAdCode());
  2772. persAllAreaDto.setAdName(adXBases.get(0).getAdName());
  2773. list.add(persAllAreaDto);
  2774. } else if (adXBases.size() == 0) {
  2775. fail++;
  2776. if (map.get("false") == null) {
  2777. List<String> failList = new ArrayList<>();
  2778. failList.add(areaNames + "地区查找失败");
  2779. map.put("false", failList);
  2780. } else {
  2781. ((List) map.get("false")).add(areaNames + "地区查找失败");
  2782. }
  2783. } else if (adXBases.size() > 1) {
  2784. fail++;
  2785. if (map.get("false") == null) {
  2786. List<String> failList = new ArrayList<>();
  2787. failList.add(areaNames + "地区重复");
  2788. map.put("false", failList);
  2789. } else {
  2790. ((List) map.get("false")).add(areaNames + "地区重复");
  2791. }
  2792. }
  2793. }
  2794. return list;
  2795. }
  2796. private List<PersAllDto> convertPersIdsToDto(Map<String, Object> map, int fail, String persNames, String persType) {
  2797. List<PersAllDto> list = new ArrayList<>();
  2798. if (StringUtils.isBlank(persNames)) {
  2799. return list;
  2800. }
  2801. if (persNames.contains(SplitValue.DOUHAO_SPLIT)) {
  2802. for (String persName : persNames.split(SplitValue.DOUHAO_SPLIT)) {
  2803. BisInspAllRlationPersParam persParam = new BisInspAllRlationPersParam();
  2804. if (persName.contains(SplitValue.HENG_SPLIT)) {
  2805. persParam.setPersName(persName.split(SplitValue.HENG_SPLIT)[0]);
  2806. persParam.setMobilenumb(persName.split(SplitValue.HENG_SPLIT)[1]);
  2807. } else {
  2808. persParam.setPersName(persName);
  2809. }
  2810. List<BisInspAllRlationPers> pers = bisInspAllRlationPersDao.findList(persParam);
  2811. if (pers.size() == 1) {
  2812. PersAllDto dto = new PersAllDto();
  2813. dto.setGuid(pers.get(0).getGuid());
  2814. dto.setPersName(pers.get(0).getPersName());
  2815. dto.setPersType(persType);
  2816. list.add(dto);
  2817. } else if (pers.size() == 0) {
  2818. fail++;
  2819. if (map.get("false") == null) {
  2820. List<String> failList = new ArrayList<>();
  2821. failList.add(persName + "人员查找失败");
  2822. map.put("false", failList);
  2823. } else {
  2824. ((List) map.get("false")).add(persName + "人员查找失败");
  2825. }
  2826. } else if (pers.size() > 1) {
  2827. fail++;
  2828. if (map.get("false") == null) {
  2829. List<String> failList = new ArrayList<>();
  2830. failList.add(persName + "姓名重复,无法确定唯一");
  2831. map.put("false", failList);
  2832. } else {
  2833. ((List) map.get("false")).add(persName + "姓名重复,无法确定唯一");
  2834. }
  2835. }
  2836. }
  2837. } else {
  2838. BisInspAllRlationPersParam persParam = new BisInspAllRlationPersParam();
  2839. persParam.setPersName(persNames);
  2840. List<BisInspAllRlationPers> pers = bisInspAllRlationPersDao.findList(persParam);
  2841. if (pers.size() == 1) {
  2842. PersAllDto dto = new PersAllDto();
  2843. dto.setGuid(pers.get(0).getGuid());
  2844. dto.setPersName(pers.get(0).getPersName());
  2845. dto.setPersType(persType);
  2846. list.add(dto);
  2847. } else if (pers.size() == 0) {
  2848. fail++;
  2849. if (map.get("false") == null) {
  2850. List<String> failList = new ArrayList<>();
  2851. failList.add(persNames + "查找失败");
  2852. map.put("false", failList);
  2853. } else {
  2854. ((List) map.get("false")).add(persNames + "查找失败");
  2855. }
  2856. } else if (pers.size() > 1) {
  2857. fail++;
  2858. if (map.get("false") == null) {
  2859. List<String> failList = new ArrayList<>();
  2860. failList.add(persNames + "姓名重复,无法确定唯一");
  2861. map.put("false", failList);
  2862. } else {
  2863. ((List) map.get("false")).add(persNames + "姓名重复,无法确定唯一");
  2864. }
  2865. }
  2866. }
  2867. return list;
  2868. }
  2869. private String fomateType(String field) {
  2870. if ("小水库".equals(field)) {
  2871. return "1";
  2872. }
  2873. if ("人饮".equals(field)) {
  2874. return "2";
  2875. }
  2876. if ("水毁".equals(field)) {
  2877. return "3";
  2878. }
  2879. if ("工程建设".equals(field)) {
  2880. return "4";
  2881. }
  2882. if ("地下水".equals(field)) {
  2883. return "5";
  2884. }
  2885. if ("水闸".equals(field)) {
  2886. return "6";
  2887. }
  2888. if ("工程运行".equals(field)) {
  2889. return "7";
  2890. }
  2891. if ("特定飞检".equals(field)) {
  2892. return "9";
  2893. }
  2894. if ("其他检查".equals(field)) {
  2895. return "10";
  2896. }
  2897. if ("淤地坝".equals(field)) {
  2898. return "11";
  2899. }
  2900. if ("取水口".equals(field)) {
  2901. return "12";
  2902. }
  2903. if ("水源地".equals(field)) {
  2904. return "13";
  2905. }
  2906. if ("分水及管控".equals(field)) {
  2907. return "14";
  2908. }
  2909. if ("节水管理".equals(field)) {
  2910. return "15";
  2911. }
  2912. if ("用水单位".equals(field)) {
  2913. return "16";
  2914. }
  2915. return "";
  2916. }
  2917. private String cleanFomate(String field) {
  2918. if (StringUtils.isBlank(field)) {
  2919. return "";
  2920. }
  2921. String result = field;
  2922. result = result.replace(" ", "");
  2923. result = result.replace(",", ",");
  2924. return result;
  2925. }
  2926. }
  2927. */