BisInspVlgdrinkProjManageDao.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  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. DATE_FORMAT(VISIT_DATE,'%Y-%m-%d') VISIT_DATE,
  105. REC_PERS_ID ,
  106. REC_PERS2 ,
  107. REC_PERS_TEL ,
  108. DATE_FORMAT(CREATE_TIME,'%Y-%m-%d %T') CREATE_TIME,
  109. DATE_FORMAT(UPDATE_TIME,'%Y-%m-%d %T') 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. STR_TO_DATE(#{visitDate},'%Y-%m-%d'),
  217. #{recPersId},
  218. #{recPers2},
  219. #{recPersTel},
  220. STR_TO_DATE(#{createTime},'%Y-%m-%d %T') ,
  221. STR_TO_DATE(#{updateTime},'%Y-%m-%d %T') ,
  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 CONCAT('%', #{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 = STR_TO_DATE(#{visitDate},'%Y-%m-%d')</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 = STR_TO_DATE(#{createTime},'%Y-%m-%d %T')
  281. </if>
  282. <if test="updateTime != null and updateTime != ''">and UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T')
  283. </if>
  284. <if test="status != null and status != ''">and STATUS = #{status}</if>
  285. <if test="isHrSupply != null and isHrSupply != ''">and IS_HR_SUPPLY = #{isHrSupply}</if>
  286. <if test="hrNote != null and hrNote != ''">and HR_NOTE = #{hrNote}</if>
  287. <if test="disinfectNote != null and disinfectNote != ''">and DISINFECT_NOTE = #{disinfectNote}</if>
  288. <if test="qualityNote != null and qualityNote != ''">and QUALITY_NOTE = #{qualityNote}</if>
  289. </trim>
  290. </sql>
  291. <select id="get" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="String">
  292. select
  293. <include refid="table_columns"/>
  294. from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
  295. </select>
  296. <select id="getBy" resultMap="bisInspVlgdrinkProjManageResultMap">
  297. select
  298. <include refid="table_columns"/>
  299. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  300. <include refid="page_where"/>
  301. </select>
  302. <select id="findAll" resultMap="bisInspVlgdrinkProjManageResultMap">
  303. select
  304. <include refid="table_columns"/>
  305. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  306. </select>
  307. <select id="findList" resultMap="bisInspVlgdrinkProjManageResultMap">
  308. select
  309. <include refid="table_columns"/>
  310. from BIS_INSP_VLGDRINK_PROJ_MANAGE
  311. <include refid="page_where"/>
  312. ORDER BY UPDATE_TIME DESC
  313. </select>
  314. <select id="selectCount" resultType="int">
  315. select count(RUN_ID) from BIS_INSP_VLGDRINK_PROJ_MANAGE
  316. <include refid="page_where"/>
  317. </select>
  318. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  319. insert into BIS_INSP_VLGDRINK_PROJ_MANAGE(
  320. <include refid="table_columns2"/>
  321. )
  322. values (
  323. <include refid="entity_properties"/>
  324. )
  325. </insert>
  326. <delete id="delete" parameterType="java.lang.String">
  327. delete from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
  328. </delete>
  329. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  330. delete from BIS_INSP_VLGDRINK_PROJ_MANAGE
  331. <include refid="page_where"/>
  332. </delete>
  333. <update id="deleteInFlag" parameterType="java.lang.String">
  334. update BIS_INSP_VLGDRINK_PROJ_MANAGE set flag_valid = 0 where RUN_ID = #{id}
  335. </update>
  336. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  337. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  338. <trim prefix="set" suffixOverrides=",">
  339. <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
  340. <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
  341. <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
  342. <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
  343. <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
  344. <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
  345. <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
  346. <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
  347. <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
  348. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  349. <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
  350. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  351. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  352. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  353. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  354. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  355. <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
  356. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  357. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  358. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  359. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  360. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  361. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  362. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  363. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  364. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  365. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  366. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  367. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  368. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  369. </if>
  370. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  371. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  372. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  373. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  374. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  375. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  376. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  377. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  378. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  379. <if test="feeRecyclePer != null">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  380. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  381. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  382. <if test="visitDate != null and visitDate != ''">VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d'),</if>
  383. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  384. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  385. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  386. <if test="createTime != null and createTime != ''">CREATE_TIME = STR_TO_DATE(#{createTime},'%Y-%m-%d %T'),
  387. </if>
  388. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T'),
  389. </if>
  390. <if test="status != null and status != ''">STATUS = #{status},</if>
  391. <if test="isHrSupply != null and isHrSupply != ''">IS_HR_SUPPLY = #{isHrSupply},</if>
  392. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  393. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  394. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  395. </trim>
  396. <where>RUN_ID = #{runId}</where>
  397. </update>
  398. <update id="updateByCwsCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  399. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  400. <trim prefix="set" suffixOverrides=",">
  401. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  402. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  403. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  404. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  405. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  406. <if test="personNum != null">PERSON_NUM = #{personNum},</if>
  407. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  408. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  409. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  410. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  411. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  412. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  413. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  414. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  415. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  416. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  417. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  418. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  419. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  420. </if>
  421. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  422. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  423. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  424. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  425. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  426. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  427. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  428. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  429. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  430. <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  431. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  432. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  433. <if test="visitDate != null and visitDate != ''">VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d'),</if>
  434. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  435. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  436. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  437. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T'),
  438. </if>
  439. <if test="status != null and status != ''">STATUS = #{status},</if>
  440. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  441. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  442. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  443. </trim>
  444. <where>CWS_CODE = #{cwsCode}</where>
  445. </update>
  446. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  447. update BIS_INSP_VLGDRINK_PROJ_MANAGE
  448. <trim prefix="set" suffixOverrides=",">
  449. <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
  450. <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
  451. <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
  452. <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
  453. <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
  454. <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
  455. <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
  456. <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
  457. <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
  458. <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
  459. <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
  460. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  461. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  462. <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
  463. <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
  464. <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
  465. <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
  466. <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
  467. <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
  468. <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
  469. <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
  470. <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
  471. <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
  472. <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
  473. <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
  474. <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
  475. <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
  476. <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
  477. <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
  478. <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
  479. </if>
  480. <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
  481. <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
  482. <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
  483. <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
  484. <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
  485. <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
  486. <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
  487. <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
  488. <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
  489. <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
  490. <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
  491. <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
  492. <if test="visitDate != null and visitDate != ''">VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d'),</if>
  493. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  494. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  495. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  496. <if test="createTime != null and createTime != ''">CREATE_TIME = STR_TO_DATE(#{createTime},'%Y-%m-%d %T'),
  497. </if>
  498. <if test="updateTime != null and updateTime != ''">UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T'),
  499. </if>
  500. <if test="status != null and status != ''">STATUS = #{status},</if>
  501. <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
  502. <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
  503. <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
  504. </trim>
  505. <include refid="page_where"/>
  506. </update>
  507. <!-- 其他自定义SQL -->
  508. <select id="queryListByObjId" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="string">
  509. SELECT
  510. B.PJNM,
  511. B.RUN_ID,
  512. A.ENG_ID FROM
  513. BIS_INSP_VILL_RGSTR A
  514. RIGHT JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B ON A.ENG_ID=B.ENG_ID
  515. WHERE A.OBJ_ID=#{objId}
  516. <if test="name != null and name != ''">AND B.PJNM LIKE CONCAT('%', #{name}, '%')</if>
  517. </select>
  518. <select id="getListByCodeAndPerId" parameterType="cn.com.goldenwater.dcproj.dto.VillRgstrDto"
  519. resultType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
  520. SELECT * FROM BIS_INSP_VLGDRINK_PROJ_MANAGE A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
  521. LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
  522. WHERE
  523. C.id in (${inIdsSql})
  524. AND C.CODE LIKE '${adCode}%' AND C.PTYPE = '2'
  525. <if test="adNm != null and adNm != ''">and A.PJNM LIKE '%${adNm}%'</if>
  526. </select>
  527. <select id="getPageByNodeId" parameterType="cn.com.goldenwater.dcproj.param.GetVillPageByNodeIdParam"
  528. resultType="cn.com.goldenwater.dcproj.dto.BisInspVlgdrinkProjManageDcdxDto">
  529. select A.SPL_PLBM ,
  530. A.EQU_PLBM ,
  531. A.RPT_PLBM ,
  532. A.LAB_PLBM ,
  533. A.INS_PLBM ,
  534. A.SAN_PLBM ,
  535. A.SYS_PLBM ,
  536. A.VDO_PLBM ,
  537. A.FEE_PLBM ,
  538. A.PJNM ,
  539. A.RUN_ID ,
  540. A.ENG_ID ,
  541. A.CWS_CODE ,
  542. A.VILLAGE_NM ,
  543. A.BUILD_YEAR ,
  544. A.PLAN_SUPPLY_SCALE ,
  545. A.SUPPLY_SCALE ,
  546. A.PERSON_NUM ,
  547. A.PIPE_DAMAGE_PER ,
  548. A.PROJECT_TYPE ,
  549. A.IS_24H_SUPPLY ,
  550. A.IS_HAVECLEAN_EQUI ,
  551. A.IS_CLEANEQUI_G ,
  552. A.IS_HAVEDISINFECT ,
  553. A.DISINFECT_TYPE ,
  554. A.IS_DISINFECT_GOOD ,
  555. A.IS_HAVEREPORT ,
  556. A.IS_QUAILTY_GOOD ,
  557. A.IS_HAVE_LAB ,
  558. A.IS_DAILY_CHECK ,
  559. A.IS_DAILYCHECK_GOOD ,
  560. A.IS_INS_LICENCE ,
  561. A.IS_SAN_LICENCE ,
  562. A.IS_AUTOSYSTEM ,
  563. A.IS_AUTOSYS_GOOD ,
  564. A.IS_VIDEO_SYSTEM ,
  565. A.IS_VIDEOSYS_GOOD ,
  566. A.WATER_FEE ,
  567. A.WATER_COST ,
  568. A.OPER_COST ,
  569. A.FEE_RECYCLE_PER ,
  570. A.MANAGER ,
  571. A.IS_HAVE_HOTLINE ,
  572. DATE_FORMAT(A.VISIT_DATE,'%Y-%m-%d') VISIT_DATE,
  573. A.REC_PERS_ID ,
  574. A.REC_PERS2 ,
  575. A.REC_PERS_TEL ,
  576. DATE_FORMAT(A.CREATE_TIME,'%Y-%m-%d %T') CREATE_TIME,
  577. DATE_FORMAT(A.UPDATE_TIME,'%Y-%m-%d %T') UPDATE_TIME,
  578. A.STATUS,
  579. A.IS_HR_SUPPLY,
  580. A.HR_NOTE,
  581. A.DISINFECT_NOTE,
  582. A.QUALITY_NOTE,D.PNM GROUP_NM,F.PNM CHKCOM,H.AD_NAME COUNTY,I.AD_NAME CITY,J.AD_NAME PROVINCE from
  583. 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
  584. C ON B.OBJ_ID=C.OBJ_ID
  585. 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
  586. E.PID=F.ID
  587. LEFT JOIN ATT_CWS_BASE ATT ON A.CWS_CODE=ATT.CWS_CODE
  588. LEFT JOIN ATT_AD_X_BASE H ON ATT.ADDVCD=H.AD_CODE
  589. 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
  590. <if test="nodeId != null and nodeId != ''">
  591. and C.ID like CONCAT(#{nodeId}, '%')
  592. </if>
  593. <if test="startDate != null and startDate != ''">
  594. AND A.VISIT_DATE &gt;=STR_TO_DATE(#{startDate},'%Y-%m-%d')
  595. </if>
  596. <if test="endDate != null and endDate != ''">
  597. AND A.VISIT_DATE &lt;STR_TO_DATE(#{endDate},'%Y-%m-%d')
  598. </if>
  599. <if test="chkComId != null and chkComId != ''">
  600. AND F.ID =#{chkComId}
  601. </if>
  602. <if test="groupId != null and groupId != ''">
  603. AND D.ID =#{groupId}
  604. </if>
  605. <if test="adNm != null and adNm != ''">
  606. AND(
  607. A.VILLAGE_NM LIKE CONCAT('%', #{adNm}, '%')
  608. OR H.AD_NAME LIKE CONCAT('%', #{adNm}, '%')
  609. OR I.AD_NAME LIKE CONCAT('%', #{adNm}, '%')
  610. OR J.AD_NAME LIKE CONCAT('%', #{adNm}, '%')
  611. )
  612. </if>
  613. ORDER BY A.UPDATE_TIME DESC,A.VISIT_DATE DESC
  614. </select>
  615. </mapper>