a5134955ec7e82212c56a772446d4e9e85e44eb0.svn-base 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspVlgdrinkProjManageDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage" id="bisInspVlgdrinkProjManageResultMap">
  5. <result property="splPlbm" column="SPL_PLBM"/>
  6. <result property="equPlbm" column="EQU_PLBM"/>
  7. <result property="rptPlbm" column="RPT_PLBM"/>
  8. <result property="labPlbm" column="LAB_PLBM"/>
  9. <result property="insPlbm" column="INS_PLBM"/>
  10. <result property="sanPlbm" column="SAN_PLBM"/>
  11. <result property="sysPlbm" column="SYS_PLBM"/>
  12. <result property="vdoPlbm" column="VDO_PLBM"/>
  13. <result property="feePlbm" column="FEE_PLBM"/>
  14. <result property="pjnm" column="PJNM"/>
  15. <result property="runId" column="RUN_ID"/>
  16. <result property="engId" column="ENG_ID"/>
  17. <result property="cwsCode" column="CWS_CODE"/>
  18. <result property="villageNm" column="VILLAGE_NM"/>
  19. <result property="buildYear" column="BUILD_YEAR"/>
  20. <result property="planSupplyScale" column="PLAN_SUPPLY_SCALE"/>
  21. <result property="supplyScale" column="SUPPLY_SCALE"/>
  22. <result property="personNum" column="PERSON_NUM"/>
  23. <result property="pipeDamagePer" column="PIPE_DAMAGE_PER"/>
  24. <result property="projectType" column="PROJECT_TYPE"/>
  25. <result property="is24hSupply" column="IS_24H_SUPPLY"/>
  26. <result property="isHavecleanEqui" column="IS_HAVECLEAN_EQUI"/>
  27. <result property="isCleanequiG" column="IS_CLEANEQUI_G"/>
  28. <result property="isHavedisinfect" column="IS_HAVEDISINFECT"/>
  29. <result property="disinfectType" column="DISINFECT_TYPE"/>
  30. <result property="isDisinfectGood" column="IS_DISINFECT_GOOD"/>
  31. <result property="isHavereport" column="IS_HAVEREPORT"/>
  32. <result property="isQuailtyGood" column="IS_QUAILTY_GOOD"/>
  33. <result property="isHaveLab" column="IS_HAVE_LAB"/>
  34. <result property="isDailyCheck" column="IS_DAILY_CHECK"/>
  35. <result property="isDailycheckGood" column="IS_DAILYCHECK_GOOD"/>
  36. <result property="isInsLicence" column="IS_INS_LICENCE"/>
  37. <result property="isSanLicence" column="IS_SAN_LICENCE"/>
  38. <result property="isAutosystem" column="IS_AUTOSYSTEM"/>
  39. <result property="isAutosysGood" column="IS_AUTOSYS_GOOD"/>
  40. <result property="isVideoSystem" column="IS_VIDEO_SYSTEM"/>
  41. <result property="isVideosysGood" column="IS_VIDEOSYS_GOOD"/>
  42. <result property="waterFee" column="WATER_FEE"/>
  43. <result property="waterCost" column="WATER_COST"/>
  44. <result property="operCost" column="OPER_COST"/>
  45. <result property="feeRecyclePer" column="FEE_RECYCLE_PER"/>
  46. <result property="manager" column="MANAGER"/>
  47. <result property="isHaveHotline" column="IS_HAVE_HOTLINE"/>
  48. <result property="visitDate" column="VISIT_DATE"/>
  49. <result property="recPersId" column="REC_PERS_ID"/>
  50. <result property="recPers2" column="REC_PERS2"/>
  51. <result property="recPersTel" column="REC_PERS_TEL"/>
  52. <result property="createTime" column="CREATE_TIME"/>
  53. <result property="updateTime" column="UPDATE_TIME"/>
  54. <result property="status" column="STATUS"/>
  55. <result property="isHrSupply" column="IS_HR_SUPPLY"/>
  56. <result property="hrNote" column="HR_NOTE"/>
  57. <result property="disinfectNote" column="DISINFECT_NOTE"/>
  58. <result property="qualityNote" column="QUALITY_NOTE"/>
  59. </resultMap>
  60. <sql id="table_columns">
  61. SPL_PLBM ,
  62. EQU_PLBM ,
  63. RPT_PLBM ,
  64. LAB_PLBM ,
  65. INS_PLBM ,
  66. SAN_PLBM ,
  67. SYS_PLBM ,
  68. VDO_PLBM ,
  69. FEE_PLBM ,
  70. PJNM ,
  71. RUN_ID ,
  72. ENG_ID ,
  73. CWS_CODE ,
  74. VILLAGE_NM ,
  75. BUILD_YEAR ,
  76. PLAN_SUPPLY_SCALE ,
  77. SUPPLY_SCALE ,
  78. PERSON_NUM ,
  79. PIPE_DAMAGE_PER ,
  80. PROJECT_TYPE ,
  81. IS_24H_SUPPLY ,
  82. IS_HAVECLEAN_EQUI ,
  83. IS_CLEANEQUI_G ,
  84. IS_HAVEDISINFECT ,
  85. DISINFECT_TYPE ,
  86. IS_DISINFECT_GOOD ,
  87. IS_HAVEREPORT ,
  88. IS_QUAILTY_GOOD ,
  89. IS_HAVE_LAB ,
  90. IS_DAILY_CHECK ,
  91. IS_DAILYCHECK_GOOD ,
  92. IS_INS_LICENCE ,
  93. IS_SAN_LICENCE ,
  94. IS_AUTOSYSTEM ,
  95. IS_AUTOSYS_GOOD ,
  96. IS_VIDEO_SYSTEM ,
  97. IS_VIDEOSYS_GOOD ,
  98. WATER_FEE ,
  99. WATER_COST ,
  100. OPER_COST ,
  101. FEE_RECYCLE_PER ,
  102. MANAGER ,
  103. IS_HAVE_HOTLINE ,
  104. TO_CHAR(VISIT_DATE,'YYYY-MM-DD') VISIT_DATE,
  105. REC_PERS_ID ,
  106. REC_PERS2 ,
  107. REC_PERS_TEL ,
  108. TO_CHAR(CREATE_TIME,'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
  109. TO_CHAR(UPDATE_TIME,'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
  110. STATUS,
  111. IS_HR_SUPPLY,
  112. HR_NOTE,
  113. DISINFECT_NOTE,
  114. QUALITY_NOTE
  115. </sql>
  116. <sql id="table_columns2">
  117. SPL_PLBM ,
  118. EQU_PLBM ,
  119. RPT_PLBM ,
  120. LAB_PLBM ,
  121. INS_PLBM ,
  122. SAN_PLBM ,
  123. SYS_PLBM ,
  124. VDO_PLBM ,
  125. FEE_PLBM ,
  126. PJNM ,
  127. RUN_ID ,
  128. ENG_ID ,
  129. CWS_CODE ,
  130. VILLAGE_NM ,
  131. BUILD_YEAR ,
  132. PLAN_SUPPLY_SCALE ,
  133. SUPPLY_SCALE ,
  134. PERSON_NUM ,
  135. PIPE_DAMAGE_PER ,
  136. PROJECT_TYPE ,
  137. IS_24H_SUPPLY ,
  138. IS_HAVECLEAN_EQUI ,
  139. IS_CLEANEQUI_G ,
  140. IS_HAVEDISINFECT ,
  141. DISINFECT_TYPE ,
  142. IS_DISINFECT_GOOD ,
  143. IS_HAVEREPORT ,
  144. IS_QUAILTY_GOOD ,
  145. IS_HAVE_LAB ,
  146. IS_DAILY_CHECK ,
  147. IS_DAILYCHECK_GOOD ,
  148. IS_INS_LICENCE ,
  149. IS_SAN_LICENCE ,
  150. IS_AUTOSYSTEM ,
  151. IS_AUTOSYS_GOOD ,
  152. IS_VIDEO_SYSTEM ,
  153. IS_VIDEOSYS_GOOD ,
  154. WATER_FEE ,
  155. WATER_COST ,
  156. OPER_COST ,
  157. FEE_RECYCLE_PER ,
  158. MANAGER ,
  159. IS_HAVE_HOTLINE ,
  160. VISIT_DATE ,
  161. REC_PERS_ID ,
  162. REC_PERS2 ,
  163. REC_PERS_TEL ,
  164. CREATE_TIME ,
  165. UPDATE_TIME ,
  166. STATUS,
  167. IS_HR_SUPPLY,
  168. HR_NOTE,
  169. DISINFECT_NOTE,
  170. QUALITY_NOTE
  171. </sql>
  172. <sql id="entity_properties">
  173. #{splPlbm},
  174. #{equPlbm},
  175. #{rptPlbm},
  176. #{labPlbm},
  177. #{insPlbm},
  178. #{sanPlbm},
  179. #{sysPlbm},
  180. #{vdoPlbm},
  181. #{feePlbm},
  182. #{pjnm},
  183. #{runId},
  184. #{engId},
  185. #{cwsCode},
  186. #{villageNm},
  187. #{buildYear},
  188. #{planSupplyScale},
  189. #{supplyScale},
  190. #{personNum},
  191. #{pipeDamagePer},
  192. #{projectType},
  193. #{is24hSupply},
  194. #{isHavecleanEqui},
  195. #{isCleanequiG},
  196. #{isHavedisinfect},
  197. #{disinfectType},
  198. #{isDisinfectGood},
  199. #{isHavereport},
  200. #{isQuailtyGood},
  201. #{isHaveLab},
  202. #{isDailyCheck},
  203. #{isDailycheckGood},
  204. #{isInsLicence},
  205. #{isSanLicence},
  206. #{isAutosystem},
  207. #{isAutosysGood},
  208. #{isVideoSystem},
  209. #{isVideosysGood},
  210. #{waterFee},
  211. #{waterCost},
  212. #{operCost},
  213. #{feeRecyclePer},
  214. #{manager},
  215. #{isHaveHotline},
  216. TO_DATE(#{visitDate},'YYYY-MM-DD'),
  217. #{recPersId},
  218. #{recPers2},
  219. #{recPersTel},
  220. TO_DATE(#{createTime},'YYYY-MM-DD HH24:MI:SS') ,
  221. TO_DATE(#{updateTime},'YYYY-MM-DD HH24:MI:SS') ,
  222. #{status},
  223. #{isHrSupply},
  224. #{hrNote},
  225. #{disinfectNote},
  226. #{qualityNote}
  227. </sql>
  228. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  229. <sql id="page_where">
  230. <trim prefix="where" prefixOverrides="and | or ">
  231. <if test="splPlbm != null and splPlbm != ''">and SPL_PLBM = #{splPlbm}</if>
  232. <if test="equPlbm != null and equPlbm != ''">and EQU_PLBM = #{equPlbm}</if>
  233. <if test="rptPlbm != null and rptPlbm != ''">and RPT_PLBM = #{rptPlbm}</if>
  234. <if test="labPlbm != null and labPlbm != ''">and LAB_PLBM = #{labPlbm}</if>
  235. <if test="insPlbm != null and insPlbm != ''">and INS_PLBM = #{insPlbm}</if>
  236. <if test="sanPlbm != null and sanPlbm != ''">and SAN_PLBM = #{sanPlbm}</if>
  237. <if test="sysPlbm != null and sysPlbm != ''">and SYS_PLBM = #{sysPlbm}</if>
  238. <if test="vdoPlbm != null and vdoPlbm != ''">and VDO_PLBM = #{vdoPlbm}</if>
  239. <if test="feePlbm != null and feePlbm != ''">and FEE_PLBM = #{feePlbm}</if>
  240. <if test="pjnm != null and pjnm != ''">and PJNM LIKE '%'||#{pjnm}||'%'</if>
  241. <if test="runId != null and runId != ''">and RUN_ID = #{runId}</if>
  242. <if test="engId != null and engId != ''">and ENG_ID = #{engId}</if>
  243. <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
  244. <if test="villageNm != null and villageNm != ''">and VILLAGE_NM = #{villageNm}</if>
  245. <if test="buildYear != null and buildYear != ''">and BUILD_YEAR = #{buildYear}</if>
  246. <if test="planSupplyScale != null and planSupplyScale != ''">and PLAN_SUPPLY_SCALE = #{planSupplyScale}</if>
  247. <if test="supplyScale != null and supplyScale != ''">and SUPPLY_SCALE = #{supplyScale}</if>
  248. <if test="personNum != null and personNum != ''">and PERSON_NUM = #{personNum}</if>
  249. <if test="pipeDamagePer != null and pipeDamagePer != ''">and PIPE_DAMAGE_PER = #{pipeDamagePer}</if>
  250. <if test="projectType != null and projectType != ''">and PROJECT_TYPE = #{projectType}</if>
  251. <if test="is24hSupply != null and is24hSupply != ''">and IS_24H_SUPPLY = #{is24hSupply}</if>
  252. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">and IS_HAVECLEAN_EQUI = #{isHavecleanEqui}</if>
  253. <if test="isCleanequiG != null and isCleanequiG != ''">and IS_CLEANEQUI_G = #{isCleanequiG}</if>
  254. <if test="isHavedisinfect != null and isHavedisinfect != ''">and IS_HAVEDISINFECT = #{isHavedisinfect}</if>
  255. <if test="disinfectType != null and disinfectType != ''">and DISINFECT_TYPE = #{disinfectType}</if>
  256. <if test="isDisinfectGood != null and isDisinfectGood != ''">and IS_DISINFECT_GOOD = #{isDisinfectGood}</if>
  257. <if test="isHavereport != null and isHavereport != ''">and IS_HAVEREPORT = #{isHavereport}</if>
  258. <if test="isQuailtyGood != null and isQuailtyGood != ''">and IS_QUAILTY_GOOD = #{isQuailtyGood}</if>
  259. <if test="isHaveLab != null and isHaveLab != ''">and IS_HAVE_LAB = #{isHaveLab}</if>
  260. <if test="isDailyCheck != null and isDailyCheck != ''">and IS_DAILY_CHECK = #{isDailyCheck}</if>
  261. <if test="isDailycheckGood != null and isDailycheckGood != ''">and IS_DAILYCHECK_GOOD =
  262. #{isDailycheckGood}
  263. </if>
  264. <if test="isInsLicence != null and isInsLicence != ''">and IS_INS_LICENCE = #{isInsLicence}</if>
  265. <if test="isSanLicence != null and isSanLicence != ''">and IS_SAN_LICENCE = #{isSanLicence}</if>
  266. <if test="isAutosystem != null and isAutosystem != ''">and IS_AUTOSYSTEM = #{isAutosystem}</if>
  267. <if test="isAutosysGood != null and isAutosysGood != ''">and IS_AUTOSYS_GOOD = #{isAutosysGood}</if>
  268. <if test="isVideoSystem != null and isVideoSystem != ''">and IS_VIDEO_SYSTEM = #{isVideoSystem}</if>
  269. <if test="isVideosysGood != null and isVideosysGood != ''">and IS_VIDEOSYS_GOOD = #{isVideosysGood}</if>
  270. <if test="waterFee != null and waterFee != ''">and WATER_FEE = #{waterFee}</if>
  271. <if test="waterCost != null and waterCost != ''">and WATER_COST = #{waterCost}</if>
  272. <if test="operCost != null and operCost != ''">and OPER_COST = #{operCost}</if>
  273. <if test="feeRecyclePer != null">and FEE_RECYCLE_PER = #{feeRecyclePer}</if>
  274. <if test="manager != null and manager != ''">and MANAGER = #{manager}</if>
  275. <if test="isHaveHotline != null and isHaveHotline != ''">and IS_HAVE_HOTLINE = #{isHaveHotline}</if>
  276. <if test="visitDate != null and visitDate != ''">and VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD')</if>
  277. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  278. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  279. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  280. <if test="createTime != null and createTime != ''">and CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
  281. HH24:MI:SS')
  282. </if>
  283. <if test="updateTime != null and updateTime != ''">and UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
  284. HH24:MI:SS')
  285. </if>
  286. <if test="status != null and status != ''">and STATUS = #{status}</if>
  287. <if test="isHrSupply != null and isHrSupply != ''">and IS_HR_SUPPLY = #{isHrSupply}</if>
  288. <if test="hrNote != null and hrNote != ''">and HR_NOTE = #{hrNote}</if>
  289. <if test="disinfectNote != null and disinfectNote != ''">and DISINFECT_NOTE = #{disinfectNote}</if>
  290. <if test="qualityNote != null and qualityNote != ''">and QUALITY_NOTE = #{qualityNote}</if>
  291. </trim>
  292. </sql>
  293. <select id="get" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="String">
  294. select
  295. <include refid="table_columns"/>
  296. from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
  297. </select>
  298. <select id="getBy" resultMap="bisInspVlgdrinkProjManageResultMap">
  299. select
  300. <include refid="table_columns"/>
  301. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  302. <include refid="page_where"/>
  303. </select>
  304. <select id="findAll" resultMap="bisInspVlgdrinkProjManageResultMap">
  305. select
  306. <include refid="table_columns"/>
  307. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  308. </select>
  309. <select id="findList" resultMap="bisInspVlgdrinkProjManageResultMap">
  310. select
  311. <include refid="table_columns"/>
  312. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  313. <include refid="page_where"/>
  314. ORDER BY UPDATE_TIME DESC
  315. </select>
  316. <select id="selectCount" resultType="int">
  317. select count(RUN_ID) from BIS_INSP_VLGDRINK_PROJ_MANAGE
  318. <include refid="page_where"/>
  319. </select>
  320. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  321. insert into BIS_INSP_VLGDRINK_PROJ_MANAGE(
  322. <include refid="table_columns2"/>
  323. )
  324. values (
  325. <include refid="entity_properties"/>
  326. )
  327. </insert>
  328. <delete id="delete" parameterType="java.lang.String">
  329. delete from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
  330. </delete>
  331. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  332. delete from BIS_INSP_VLGDRINK_PROJ_MANAGE
  333. <include refid="page_where"/>
  334. </delete>
  335. <update id="deleteInFlag" parameterType="java.lang.String">
  336. update BIS_INSP_VLGDRINK_PROJ_MANAGE set flag_valid = 0 where RUN_ID = #{id}
  337. </update>
  338. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  339. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  340. <trim prefix="set" suffixOverrides=",">
  341. <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
  342. <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
  343. <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
  344. <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
  345. <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
  346. <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
  347. <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
  348. <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
  349. <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
  350. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  351. <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
  352. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  353. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  354. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  355. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  356. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  357. <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
  358. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  359. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  360. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  361. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  362. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  363. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  364. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  365. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  366. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  367. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  368. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  369. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  370. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  371. </if>
  372. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  373. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  374. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  375. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  376. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  377. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  378. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  379. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  380. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  381. <if test="feeRecyclePer != null">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  382. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  383. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  384. <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
  385. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  386. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  387. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  388. <if test="createTime != null and createTime != ''">CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
  389. HH24:MI:SS'),
  390. </if>
  391. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
  392. HH24:MI:SS'),
  393. </if>
  394. <if test="status != null and status != ''">STATUS = #{status},</if>
  395. <if test="isHrSupply != null and isHrSupply != ''">IS_HR_SUPPLY = #{isHrSupply},</if>
  396. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  397. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  398. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  399. </trim>
  400. <where>RUN_ID = #{runId}</where>
  401. </update>
  402. <update id="updateByCwsCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  403. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  404. <trim prefix="set" suffixOverrides=",">
  405. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  406. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  407. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  408. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  409. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  410. <if test="personNum != null">PERSON_NUM = #{personNum},</if>
  411. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  412. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  413. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  414. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  415. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  416. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  417. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  418. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  419. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  420. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  421. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  422. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  423. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  424. </if>
  425. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  426. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  427. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  428. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  429. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  430. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  431. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  432. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  433. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  434. <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  435. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  436. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  437. <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
  438. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  439. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  440. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  441. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
  442. HH24:MI:SS'),
  443. </if>
  444. <if test="status != null and status != ''">STATUS = #{status},</if>
  445. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  446. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  447. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  448. </trim>
  449. <where>CWS_CODE = #{cwsCode}</where>
  450. </update>
  451. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  452. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  453. <trim prefix="set" suffixOverrides=",">
  454. <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
  455. <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
  456. <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
  457. <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
  458. <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
  459. <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
  460. <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
  461. <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
  462. <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
  463. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  464. <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
  465. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  466. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  467. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  468. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  469. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  470. <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
  471. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  472. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  473. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  474. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  475. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  476. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  477. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  478. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  479. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  480. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  481. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  482. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  483. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  484. </if>
  485. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  486. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  487. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  488. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  489. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  490. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  491. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  492. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  493. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  494. <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  495. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  496. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  497. <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
  498. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  499. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  500. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  501. <if test="createTime != null and createTime != ''">CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
  502. HH24:MI:SS'),
  503. </if>
  504. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
  505. HH24:MI:SS'),
  506. </if>
  507. <if test="status != null and status != ''">STATUS = #{status},</if>
  508. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  509. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  510. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  511. </trim>
  512. <include refid="page_where"/>
  513. </update>
  514. <!-- 其他自定义SQL -->
  515. <select id="queryListByObjId" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="string">
  516. SELECT
  517. B.PJNM,
  518. B.RUN_ID,
  519. A.ENG_ID FROM
  520. BIS_INSP_VILL_RGSTR A
  521. RIGHT JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B ON A.ENG_ID=B.ENG_ID
  522. WHERE A.OBJ_ID=#{objId}
  523. <if test="name != null and name != ''">AND B.PJNM LIKE '%'||#{name}||'%'</if>
  524. </select>
  525. <select id="getListByCodeAndPerId" parameterType="cn.com.goldenwater.dcproj.dto.VillRgstrDto"
  526. resultType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  527. SELECT * FROM BIS_INSP_VLGDRINK_PROJ_MANAGE A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
  528. LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
  529. WHERE
  530. <!--
  531. REGEXP_LIKE(
  532. C.Id,(SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId})
  533. )
  534. -->
  535. REGEXP_LIKE(
  536. C.Id,'^('||
  537. ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persId})>0 then
  538. (SELECT LISTAGG(id, '|') as
  539. id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persId} group by persid)
  540. else (select 'non' from dual) end)
  541. ||')')
  542. AND C.CODE LIKE '${adCode}%' AND C.PTYPE = '2'
  543. <if test="adNm != null and adNm != ''">and A.PJNM LIKE '%${adNm}%'</if>
  544. </select>
  545. <select id="getPageByNodeId" parameterType="cn.com.goldenwater.dcproj.param.GetVillPageByNodeIdParam"
  546. resultType="cn.com.goldenwater.dcproj.dto.BisInspVlgdrinkProjManageDcdxDto">
  547. select A.SPL_PLBM ,
  548. A.EQU_PLBM ,
  549. A.RPT_PLBM ,
  550. A.LAB_PLBM ,
  551. A.INS_PLBM ,
  552. A.SAN_PLBM ,
  553. A.SYS_PLBM ,
  554. A.VDO_PLBM ,
  555. A.FEE_PLBM ,
  556. A.PJNM ,
  557. A.RUN_ID ,
  558. A.ENG_ID ,
  559. A.CWS_CODE ,
  560. A.VILLAGE_NM ,
  561. A.BUILD_YEAR ,
  562. A.PLAN_SUPPLY_SCALE ,
  563. A.SUPPLY_SCALE ,
  564. A.PERSON_NUM ,
  565. A.PIPE_DAMAGE_PER ,
  566. A.PROJECT_TYPE ,
  567. A.IS_24H_SUPPLY ,
  568. A.IS_HAVECLEAN_EQUI ,
  569. A.IS_CLEANEQUI_G ,
  570. A.IS_HAVEDISINFECT ,
  571. A.DISINFECT_TYPE ,
  572. A.IS_DISINFECT_GOOD ,
  573. A.IS_HAVEREPORT ,
  574. A.IS_QUAILTY_GOOD ,
  575. A.IS_HAVE_LAB ,
  576. A.IS_DAILY_CHECK ,
  577. A.IS_DAILYCHECK_GOOD ,
  578. A.IS_INS_LICENCE ,
  579. A.IS_SAN_LICENCE ,
  580. A.IS_AUTOSYSTEM ,
  581. A.IS_AUTOSYS_GOOD ,
  582. A.IS_VIDEO_SYSTEM ,
  583. A.IS_VIDEOSYS_GOOD ,
  584. A.WATER_FEE ,
  585. A.WATER_COST ,
  586. A.OPER_COST ,
  587. A.FEE_RECYCLE_PER ,
  588. A.MANAGER ,
  589. A.IS_HAVE_HOTLINE ,
  590. TO_CHAR(A.VISIT_DATE,'YYYY-MM-DD') VISIT_DATE,
  591. A.REC_PERS_ID ,
  592. A.REC_PERS2 ,
  593. A.REC_PERS_TEL ,
  594. TO_CHAR(A.CREATE_TIME,'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
  595. TO_CHAR(A.UPDATE_TIME,'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
  596. A.STATUS,
  597. A.IS_HR_SUPPLY,
  598. A.HR_NOTE,
  599. A.DISINFECT_NOTE,
  600. A.QUALITY_NOTE,D.PNM GROUP_NM,F.PNM CHKCOM,H.AD_NAME COUNTY,I.AD_NAME CITY,J.AD_NAME PROVINCE from
  601. BIS_INSP_VLGDRINK_PROJ_MANAGE A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID=B.ENG_ID LEFT JOIN bis_insp_all_obj
  602. C ON B.OBJ_ID=C.OBJ_ID
  603. LEFT JOIN BIS_INSP_ALL D ON C.ID=D.ID LEFT JOIN BIS_INSP_ALL E ON D.PID=E.ID LEFT JOIN BIS_INSP_ALL F ON
  604. E.PID=F.ID
  605. LEFT JOIN ATT_CWS_BASE ATT ON A.CWS_CODE=ATT.CWS_CODE
  606. LEFT JOIN ATT_AD_X_BASE H ON ATT.ADDVCD=H.AD_CODE
  607. LEFT JOIN ATT_AD_X_BASE I ON H.AD_FCODE=I.AD_CODE LEFT JOIN ATT_AD_X_BASE J ON I.AD_FCODE=J.AD_CODE WHERE 1=1
  608. <if test="nodeId != null and nodeId != ''">
  609. and C.ID like #{nodeId}||'%'
  610. </if>
  611. <if test="startDate != null and startDate != ''">
  612. AND A.VISIT_DATE &gt;=TO_DATE(#{startDate},'YYYY-MM-DD')
  613. </if>
  614. <if test="endDate != null and endDate != ''">
  615. AND A.VISIT_DATE &lt;TO_DATE(#{endDate},'YYYY-MM-DD')+1
  616. </if>
  617. <if test="chkComId != null and chkComId != ''">
  618. AND F.ID =#{chkComId}
  619. </if>
  620. <if test="groupId != null and groupId != ''">
  621. AND D.ID =#{groupId}
  622. </if>
  623. <if test="adNm != null and adNm != ''">
  624. AND( A.VILLAGE_NM LIKE '%'||#{adNm}||'%' OR H.AD_NAME LIKE '%'||#{adNm}||'%' OR I.AD_NAME LIKE
  625. '%'||#{adNm}||'%' OR J.AD_NAME LIKE '%'||#{adNm}||'%' )
  626. </if>
  627. ORDER BY A.UPDATE_TIME DESC,A.VISIT_DATE DESC
  628. </select>
  629. </mapper>