ImpPblmDao.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  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.ImpPblmDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspPblm" id="bisInspPblmResultMap">
  5. <result property="defectTypeId" column="DEFECT_TYPE_ID"/>
  6. <result property="fdbkId" column="FDBK_ID"/>
  7. <result property="itemId" column="ITEM_ID"/>
  8. <result property="waterUserId" column="WATER_USER_ID"/>
  9. <result property="pblmId" column="PBLM_ID"/>
  10. <result property="objId" column="OBJ_ID"/>
  11. <result property="objType" column="OBJ_TYPE"/>
  12. <result property="inspGroupId" column="INSP_GROUP_ID"/>
  13. <result property="pguid" column="PGUID"/>
  14. <result property="inspPblmType" column="INSP_PBLM_TYPE"/>
  15. <result property="inspPblmCode" column="INSP_PBLM_CODE"/>
  16. <result property="inspPblmName" column="INSP_PBLM_NAME"/>
  17. <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
  18. <result property="inspAddDesc" column="INSP_ADD_DESC"/>
  19. <result property="pblmLong" column="PBLM_LONG"/>
  20. <result property="pblmLat" column="PBLM_LAT"/>
  21. <result property="ifCasePblm" column="IF_CASE_PBLM"/>
  22. <result property="inspPblmOrgName" column="INSP_PBLM_ORG_NAME"/>
  23. <result property="pblmPersName" column="PBLM_PERS_NAME"/>
  24. <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
  25. <result property="pblmStat" column="PBLM_STAT"/>
  26. <result property="reviOpin" column="REVI_OPIN"/>
  27. <result property="reviConc" column="REVI_CONC"/>
  28. <result property="reviOrgGuid" column="REVI_ORG_GUID"/>
  29. <result property="dataStat" column="DATA_STAT"/>
  30. <result property="collTime" column="COLL_TIME"/>
  31. <result property="recPers" column="REC_PERS"/>
  32. <result property="note" column="NOTE"/>
  33. <result property="regid" column="REGID"/>
  34. <result property="commonFileIds" column="COMMON_FILE_IDS"/>
  35. <result property="fileNo" column="FILE_NO"/>
  36. <result property="fileNoNumber" column="FILE_NO_NUMBER"/>
  37. <result property="pblmsId" column="PBLMS_ID"/>
  38. <result property="pblmsTypeId" column="PBLMS_TYPE_ID"/>
  39. <result property="villType" column="VILL_TYPE"/>
  40. <result property="cwsCode" column="CWS_CODE"/>
  41. <result property="villageCode" column="VILLAGE_CODE"/>
  42. <result property="hasVedio" column="HAS_VEDIO"/>
  43. <result property="problemType" column="PROBLEM_TYPE"/>
  44. <result property="qualityTypeId" column="QUALITY_TYPE_ID"/>
  45. <result property="quote" column="QUOTE"/>
  46. <result property="gongdiBzId" column="GONGDI_BZ_ID"/>
  47. </resultMap>
  48. <sql id="table_columns">
  49. DEFECT_TYPE_ID,GONGDI_BZ_ID,
  50. FDBK_ID,
  51. ITEM_ID,
  52. WATER_USER_ID,
  53. PBLM_ID,
  54. OBJ_ID,
  55. OBJ_TYPE,
  56. INSP_GROUP_ID,
  57. PGUID,
  58. INSP_PBLM_TYPE,
  59. INSP_PBLM_CODE,
  60. INSP_PBLM_NAME,
  61. INSP_PBLM_DESC,
  62. INSP_ADD_DESC,
  63. PBLM_LONG,
  64. PBLM_LAT,
  65. IF_CASE_PBLM,
  66. INSP_PBLM_ORG_NAME,
  67. PBLM_PERS_NAME,
  68. INSP_PBLM_CATE,
  69. PBLM_STAT,
  70. REVI_OPIN,
  71. REVI_CONC,
  72. REVI_ORG_GUID,
  73. DATA_STAT,
  74. COLL_TIME,
  75. REC_PERS,
  76. NOTE,
  77. REGID,
  78. COMMON_FILE_IDS,
  79. FILE_NO,
  80. FILE_NO_NUMBER,
  81. PBLMS_ID,
  82. PBLMS_TYPE_ID,
  83. VILL_TYPE,
  84. CWS_CODE,
  85. VILLAGE_CODE,
  86. HAS_VEDIO,
  87. PROBLEM_TYPE,
  88. QUALITY_TYPE_ID,
  89. QUOTE
  90. </sql>
  91. <sql id="entity_properties">
  92. #{defectTypeId},#{gongdiBzId},
  93. #{fdbkId},
  94. #{itemId},
  95. #{waterUserId},
  96. #{pblmId},
  97. #{objId},
  98. #{objType},
  99. #{inspGroupId},
  100. #{pguid},
  101. #{inspPblmType},
  102. #{inspPblmCode},
  103. #{inspPblmName},
  104. #{inspPblmDesc},
  105. #{inspAddDesc},
  106. #{pblmLong},
  107. #{pblmLat},
  108. #{ifCasePblm},
  109. #{inspPblmOrgName},
  110. #{pblmPersName},
  111. #{inspPblmCate},
  112. #{pblmStat},
  113. #{reviOpin},
  114. #{reviConc},
  115. #{reviOrgGuid},
  116. #{dataStat},
  117. #{collTime},
  118. #{recPers},
  119. #{note},
  120. #{regid},
  121. #{commonFileIds},
  122. #{fileNo},
  123. #{fileNoNumber},
  124. #{pblmsId},
  125. #{pblmsTypeId},
  126. #{villType},
  127. #{cwsCode},
  128. #{villageCode},
  129. #{hasVedio},
  130. #{problemType},
  131. #{qualityTypeId}
  132. </sql>
  133. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  134. <sql id="page_where">
  135. <trim prefix="where" prefixOverrides="and | or ">
  136. <if test="fdbkId != null and fdbkId != ''">and FDBK_ID = #{fdbkId}</if>
  137. <if test="gongdiBzId != null and gongdiBzId != ''">and gongdi_Bz_Id = #{gongdiBzId}</if>
  138. <if test="itemId != null and itemId != ''">and ITEM_ID = #{itemId}</if>
  139. <if test="waterUserId != null and waterUserId != ''">and WATER_USER_ID = #{waterUserId}</if>
  140. <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
  141. <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
  142. <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
  143. <if test="inspGroupId != null and inspGroupId != ''">and INSP_GROUP_ID = #{inspGroupId}</if>
  144. <if test="pguid != null and pguid != ''">and PGUID = #{pguid}</if>
  145. <if test="inspPblmType != null and inspPblmType != ''">and INSP_PBLM_TYPE = #{inspPblmType}</if>
  146. <if test="inspPblmCode != null and inspPblmCode != ''">and INSP_PBLM_CODE = #{inspPblmCode}</if>
  147. <if test="inspPblmName != null and inspPblmName != ''">and INSP_PBLM_NAME = #{inspPblmName}</if>
  148. <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC = #{inspPblmDesc}</if>
  149. <if test="inspAddDesc != null and inspAddDesc != ''">and INSP_ADD_DESC = #{inspAddDesc}</if>
  150. <if test="pblmLong != null and pblmLong != ''">and PBLM_LONG = #{pblmLong}</if>
  151. <if test="pblmLat != null and pblmLat != ''">and PBLM_LAT = #{pblmLat}</if>
  152. <if test="ifCasePblm != null and ifCasePblm != ''">and IF_CASE_PBLM = #{ifCasePblm}</if>
  153. <if test="inspPblmOrgName != null and inspPblmOrgName != ''">and INSP_PBLM_ORG_NAME = #{inspPblmOrgName}</if>
  154. <if test="pblmPersName != null and pblmPersName != ''">and PBLM_PERS_NAME = #{pblmPersName}</if>
  155. <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
  156. <if test="pblmStat != null and pblmStat != ''">and PBLM_STAT = #{pblmStat}</if>
  157. <if test="reviOpin != null and reviOpin != ''">and REVI_OPIN = #{reviOpin}</if>
  158. <if test="reviConc != null and reviConc != ''">and REVI_CONC = #{reviConc}</if>
  159. <if test="reviOrgGuid != null and reviOrgGuid != ''">and REVI_ORG_GUID = #{reviOrgGuid}</if>
  160. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  161. <if test="collTime != null">and COLL_TIME = #{collTime}</if>
  162. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  163. <if test="note != null and note != ''">and NOTE = #{note}</if>
  164. <if test="regid != null and regid != ''">and REGID = #{regid}</if>
  165. <if test="commonFileIds != null and commonFileIds != ''">and COMMON_FILE_IDS = #{commonFileIds}</if>
  166. <if test="fileNo != null and fileNo != ''">and FILE_NO = #{fileNo}</if>
  167. <if test="fileNoNumber != null and fileNoNumber != ''">and FILE_NO_NUMBER = #{fileNoNumber}</if>
  168. <if test="pblmsId != null and pblmsId != ''">and PBLMS_ID = #{pblmsId}</if>
  169. <if test="pblmsTypeId != null and pblmsTypeId != ''">and PBLMS_TYPE_ID = #{pblmsTypeId}</if>
  170. <if test="villType != null and villType != ''">and VILL_TYPE = #{villType}</if>
  171. <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
  172. <if test="villageCode != null and villageCode != ''">and VILLAGE_CODE = #{villageCode}</if>
  173. <if test="hasVedio != null and hasVedio != ''">and HAS_VEDIO = #{hasVedio}</if>
  174. <if test="problemType != null and problemType != ''">and PROBLEM_TYPE = #{problemType}</if>
  175. <if test="qualityTypeId != null and qualityTypeId != ''">and QUALITY_TYPE_ID = #{qualityTypeId}</if>
  176. </trim>
  177. </sql>
  178. <select id="get" resultMap="bisInspPblmResultMap" parameterType="String" >
  179. select <include refid="table_columns" /> from BIS_INSP_PBLM where ID = #{id}
  180. </select>
  181. <select id="getBy" resultMap="bisInspPblmResultMap">
  182. select <include refid="table_columns" /> from BIS_INSP_PBLM <include refid="page_where" />
  183. </select>
  184. <select id="findAll" resultMap="bisInspPblmResultMap">
  185. select <include refid="table_columns" /> from BIS_INSP_PBLM
  186. </select>
  187. <select id="findList" resultMap="bisInspPblmResultMap">
  188. select <include refid="table_columns" /> from BIS_INSP_PBLM <include refid="page_where" />
  189. </select>
  190. <select id="selectCount" resultType="int" >
  191. select count(ID) from BIS_INSP_PBLM <include refid="page_where" />
  192. </select>
  193. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
  194. insert into BIS_INSP_PBLM( <include refid="table_columns" /> )
  195. values ( <include refid="entity_properties" /> )
  196. </insert>
  197. <delete id="delete" parameterType="java.lang.String">
  198. delete from BIS_INSP_PBLM where ID = #{id}
  199. </delete>
  200. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
  201. delete from BIS_INSP_PBLM <include refid="page_where" />
  202. </delete>
  203. <update id="deleteInFlag" parameterType="java.lang.String">
  204. update BIS_INSP_PBLM set flag_valid = 0 where ID = #{id}
  205. </update>
  206. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
  207. update BIS_INSP_PBLM
  208. <trim prefix="set" suffixOverrides=",">
  209. <if test="fdbkId != null and fdbkId != ''">FDBK_ID = #{fdbkId},</if>
  210. <if test="itemId != null and itemId != ''">ITEM_ID = #{itemId},</if>
  211. <if test="gongdiBzId != null and gongdiBzId != ''"> gongdi_Bz_Id = #{gongdiBzId},</if>
  212. <if test="waterUserId != null and waterUserId != ''">WATER_USER_ID = #{waterUserId},</if>
  213. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  214. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  215. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  216. <if test="inspGroupId != null and inspGroupId != ''">INSP_GROUP_ID = #{inspGroupId},</if>
  217. <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
  218. <if test="inspPblmType != null and inspPblmType != ''">INSP_PBLM_TYPE = #{inspPblmType},</if>
  219. <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
  220. <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
  221. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  222. <if test="inspAddDesc != null and inspAddDesc != ''">INSP_ADD_DESC = #{inspAddDesc},</if>
  223. <if test="pblmLong != null and pblmLong != ''">PBLM_LONG = #{pblmLong},</if>
  224. <if test="pblmLat != null and pblmLat != ''">PBLM_LAT = #{pblmLat},</if>
  225. <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
  226. <if test="inspPblmOrgName != null and inspPblmOrgName != ''">INSP_PBLM_ORG_NAME = #{inspPblmOrgName},</if>
  227. <if test="pblmPersName != null and pblmPersName != ''">PBLM_PERS_NAME = #{pblmPersName},</if>
  228. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  229. <if test="pblmStat != null and pblmStat != ''">PBLM_STAT = #{pblmStat},</if>
  230. <if test="reviOpin != null and reviOpin != ''">REVI_OPIN = #{reviOpin},</if>
  231. <if test="reviConc != null and reviConc != ''">REVI_CONC = #{reviConc},</if>
  232. <if test="reviOrgGuid != null and reviOrgGuid != ''">REVI_ORG_GUID = #{reviOrgGuid},</if>
  233. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  234. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  235. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  236. <if test="note != null and note != ''">NOTE = #{note},</if>
  237. <if test="regid != null and regid != ''">REGID = #{regid},</if>
  238. <if test="commonFileIds != null and commonFileIds != ''">COMMON_FILE_IDS = #{commonFileIds},</if>
  239. <if test="fileNo != null and fileNo != ''">FILE_NO = #{fileNo},</if>
  240. <if test="fileNoNumber != null and fileNoNumber != ''">FILE_NO_NUMBER = #{fileNoNumber},</if>
  241. <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
  242. <if test="pblmsTypeId != null and pblmsTypeId != ''">PBLMS_TYPE_ID = #{pblmsTypeId},</if>
  243. <if test="villType != null and villType != ''">VILL_TYPE = #{villType},</if>
  244. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  245. <if test="villageCode != null and villageCode != ''">VILLAGE_CODE = #{villageCode},</if>
  246. <if test="hasVedio != null and hasVedio != ''">HAS_VEDIO = #{hasVedio},</if>
  247. <if test="problemType != null and problemType != ''">PROBLEM_TYPE = #{problemType},</if>
  248. <if test="qualityTypeId != null and qualityTypeId != ''">QUALITY_TYPE_ID = #{qualityTypeId},</if>
  249. </trim>
  250. <where>ID = #{id}</where>
  251. </update>
  252. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
  253. update BIS_INSP_PBLM
  254. <trim prefix="set" suffixOverrides=",">
  255. <if test="fdbkId != null and fdbkId != ''">FDBK_ID = #{fdbkId},</if>
  256. <if test="gongdiBzId != null and gongdiBzId != ''"> gongdi_Bz_Id = #{gongdiBzId},</if>
  257. <if test="itemId != null and itemId != ''">ITEM_ID = #{itemId},</if>
  258. <if test="waterUserId != null and waterUserId != ''">WATER_USER_ID = #{waterUserId},</if>
  259. <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
  260. <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
  261. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  262. <if test="inspGroupId != null and inspGroupId != ''">INSP_GROUP_ID = #{inspGroupId},</if>
  263. <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
  264. <if test="inspPblmType != null and inspPblmType != ''">INSP_PBLM_TYPE = #{inspPblmType},</if>
  265. <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
  266. <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
  267. <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
  268. <if test="inspAddDesc != null and inspAddDesc != ''">INSP_ADD_DESC = #{inspAddDesc},</if>
  269. <if test="pblmLong != null and pblmLong != ''">PBLM_LONG = #{pblmLong},</if>
  270. <if test="pblmLat != null and pblmLat != ''">PBLM_LAT = #{pblmLat},</if>
  271. <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
  272. <if test="inspPblmOrgName != null and inspPblmOrgName != ''">INSP_PBLM_ORG_NAME = #{inspPblmOrgName},</if>
  273. <if test="pblmPersName != null and pblmPersName != ''">PBLM_PERS_NAME = #{pblmPersName},</if>
  274. <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
  275. <if test="pblmStat != null and pblmStat != ''">PBLM_STAT = #{pblmStat},</if>
  276. <if test="reviOpin != null and reviOpin != ''">REVI_OPIN = #{reviOpin},</if>
  277. <if test="reviConc != null and reviConc != ''">REVI_CONC = #{reviConc},</if>
  278. <if test="reviOrgGuid != null and reviOrgGuid != ''">REVI_ORG_GUID = #{reviOrgGuid},</if>
  279. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  280. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  281. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  282. <if test="note != null and note != ''">NOTE = #{note},</if>
  283. <if test="regid != null and regid != ''">REGID = #{regid},</if>
  284. <if test="commonFileIds != null and commonFileIds != ''">COMMON_FILE_IDS = #{commonFileIds},</if>
  285. <if test="fileNo != null and fileNo != ''">FILE_NO = #{fileNo},</if>
  286. <if test="fileNoNumber != null and fileNoNumber != ''">FILE_NO_NUMBER = #{fileNoNumber},</if>
  287. <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
  288. <if test="pblmsTypeId != null and pblmsTypeId != ''">PBLMS_TYPE_ID = #{pblmsTypeId},</if>
  289. <if test="villType != null and villType != ''">VILL_TYPE = #{villType},</if>
  290. <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
  291. <if test="villageCode != null and villageCode != ''">VILLAGE_CODE = #{villageCode},</if>
  292. <if test="hasVedio != null and hasVedio != ''">HAS_VEDIO = #{hasVedio},</if>
  293. <if test="problemType != null and problemType != ''">PROBLEM_TYPE = #{problemType},</if>
  294. <if test="qualityTypeId != null and qualityTypeId != ''">QUALITY_TYPE_ID = #{qualityTypeId},</if>
  295. </trim>
  296. <include refid="page_where" />
  297. </update>
  298. <!-- 其他自定义SQL -->
  299. <sql id="entity_properties_item">
  300. #{item.defectTypeId} as DEFECT_TYPE_ID,
  301. #{item.fdbkId} as FDBK_ID,
  302. #{item.itemId} as ITEM_ID,
  303. #{item.waterUserId} as WATER_USER_ID,
  304. #{item.pblmId} as PBLM_ID,
  305. #{item.objId} as OBJ_ID,
  306. #{item.objType} as OBJ_TYPE,
  307. #{item.inspGroupId} as INSP_GROUP_ID,
  308. #{item.pguid} as PGUID,
  309. #{item.inspPblmType} as INSP_PBLM_TYPE,
  310. #{item.inspPblmCode} as INSP_PBLM_CODE,
  311. #{item.inspPblmName} as INSP_PBLM_NAME,
  312. #{item.inspPblmDesc} as INSP_PBLM_DESC,
  313. #{item.inspAddDesc} as INSP_ADD_DESC,
  314. #{item.pblmLong} as PBLM_LONG,
  315. #{item.pblmLat} as PBLM_LAT,
  316. #{item.ifCasePblm} as IF_CASE_PBLM,
  317. #{item.inspPblmOrgName} as INSP_PBLM_ORG_NAME,
  318. #{item.pblmPersName} as PBLM_PERS_NAME,
  319. #{item.inspPblmCate} as INSP_PBLM_CATE,
  320. #{item.pblmStat} as PBLM_STAT,
  321. #{item.reviOpin} as REVI_OPIN,
  322. #{item.reviConc} as REVI_CONC,
  323. #{item.reviOrgGuid} as REVI_ORG_GUID,
  324. #{item.dataStat} as DATA_STAT,
  325. #{item.collTime} as COLL_TIME,
  326. #{item.recPers} as REC_PERS,
  327. #{item.note} as NOTE,
  328. #{item.regid} as REGID,
  329. #{item.commonFileIds} as COMMON_FILE_IDS,
  330. #{item.fileNo} as FILE_NO,
  331. #{item.fileNoNumber} as FILE_NO_NUMBER,
  332. #{item.pblmsId} as PBLMS_ID,
  333. #{item.pblmsTypeId} as PBLMS_TYPE_ID,
  334. #{item.villType} as VILL_TYPE,
  335. #{item.cwsCode} as CWS_CODE,
  336. #{item.villageCode} as VILLAGE_CODE,
  337. #{item.hasVedio} as HAS_VEDIO,
  338. #{item.problemType} as PROBLEM_TYPE,
  339. #{item.qualityTypeId} as QUALITY_TYPE_I,
  340. #{item.quote} as QUOTE
  341. </sql>
  342. <sql id="table_columns_gw">
  343. ID,
  344. FILE_TITLE,
  345. KEY_WORD,
  346. FILE_TYPE,
  347. ABS,
  348. FILE_NAME,
  349. FILE_SIZE,
  350. FILE_EXT,
  351. FILE_PATH,
  352. THUMBNAIL_URL,
  353. BIZ_TYPE,
  354. BIZ_ID,
  355. LONGITUDE,
  356. LATITUDE,
  357. CREATE_BY,
  358. CREATE_DATE,
  359. UPDATE_BY,
  360. UPDATE_DATE
  361. </sql>
  362. <sql id="entity_properties_item_tw">
  363. #{item.id},
  364. #{item.fileTitle},
  365. #{item.keyWord},
  366. #{item.fileType},
  367. #{item.abs},
  368. #{item.fileName},
  369. #{item.fileSize},
  370. #{item.fileExt},
  371. #{item.filePath},
  372. #{item.thumbnailUrl},
  373. #{item.bizType},
  374. #{item.bizId},
  375. #{item.longitude},
  376. #{item.latitude},
  377. #{item.createBy},
  378. #{item.createDate},
  379. #{item.updateBy},
  380. #{item.updateDate}
  381. </sql>
  382. <sql id="table_columns_update">
  383. DEFECT_TYPE_ID,
  384. FDBK_ID,
  385. ITEM_ID,
  386. WATER_USER_ID,
  387. INSP_GROUP_ID,
  388. PGUID,
  389. INSP_PBLM_TYPE,
  390. INSP_PBLM_CODE,
  391. INSP_PBLM_NAME,
  392. INSP_PBLM_DESC,
  393. INSP_ADD_DESC,
  394. PBLM_LONG,
  395. PBLM_LAT,
  396. IF_CASE_PBLM,
  397. INSP_PBLM_ORG_NAME,
  398. PBLM_PERS_NAME,
  399. INSP_PBLM_CATE,
  400. PBLM_STAT,
  401. REVI_OPIN,
  402. REVI_CONC,
  403. REVI_ORG_GUID,
  404. DATA_STAT,
  405. COLL_TIME,
  406. REC_PERS,
  407. NOTE,
  408. REGID,
  409. COMMON_FILE_IDS,
  410. FILE_NO,
  411. FILE_NO_NUMBER,
  412. PBLMS_ID,
  413. PBLMS_TYPE_ID,
  414. VILL_TYPE,
  415. CWS_CODE,
  416. VILLAGE_CODE,
  417. HAS_VEDIO,
  418. PROBLEM_TYPE,
  419. QUALITY_TYPE_ID
  420. </sql>
  421. <!--批量导入-->
  422. <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="false">
  423. insert into bis_insp_pblm( <include refid="table_columns" /> )
  424. select t.* from (
  425. <foreach collection="list" item="item" index="index" separator="union all">
  426. select <include refid="entity_properties_item"/> from dual
  427. </foreach>
  428. ) t
  429. </insert>
  430. <insert id="batchInsertGwFile" parameterType="java.util.List" useGeneratedKeys="false">
  431. insert into gw_com_file( <include refid="table_columns_gw" /> )
  432. select t.* from (
  433. <foreach collection="list" item="item" index="index" separator="union all">
  434. select <include refid="entity_properties_item_tw"/> from dual
  435. </foreach>
  436. ) t
  437. </insert>
  438. <select id="getGroupList" resultType="cn.com.goldenwater.dcproj.model.BisInspAll">
  439. select id,pid,concat((select pnm from BIS_INSP_ALL where id = t.pid), pnm ) pnm,sttm,entm from
  440. BIS_INSP_ALL t where
  441. id in (${inIdsSql})
  442. AND length(id) = 12
  443. <if test="orgType !=null and orgType != ''">
  444. and ID LIKE concat(#{orgType},'%')
  445. </if>
  446. order by id
  447. </select>
  448. <!--获取regid-->
  449. <select id="getRegId" resultType="java.lang.String">
  450. select id from BIS_INSP_KEY_REG_SEC_UNIT where sec_id = (
  451. select id from BIS_INSP_KEY_REGISTER_SECTION where obj_id = #{objId} and nm = #{bdNm}
  452. )
  453. </select>
  454. <select id="getRegIdByNm" resultType="java.lang.String">
  455. select id from
  456. <choose>
  457. <when test="orgType == '004' ">
  458. BIS_INSP_KEY_REG_SEC_UNIT
  459. </when>
  460. <otherwise>
  461. ATT_MAMPU_INFO
  462. </otherwise>
  463. </choose>
  464. where nm = #{dwNm}
  465. </select>
  466. <select id="getNmByRegId" resultType="java.lang.String">
  467. select nm from
  468. <choose>
  469. <when test="orgType == '004' ">
  470. BIS_INSP_KEY_REG_SEC_UNIT
  471. </when>
  472. <otherwise>
  473. ATT_MAMPU_INFO
  474. </otherwise>
  475. </choose>
  476. where id = #{regId}
  477. </select>
  478. <select id="getImpKeyRegList2" resultType="cn.com.goldenwater.dcproj.model.ImpPblmKeyReg">
  479. select distinct p.OBJ_ID,mo.ID as regid,j.nm as gcnm,mo.nm as glnm from
  480. (select * from BIS_INSP_PBLM pb where pb.obj_type = #{objType}) p
  481. join
  482. (select * from BIS_INSP_ALL_OBJ bj where bj.pType = #{objType}) j on p.obj_id = j.obj_id
  483. <if test="objType == '7'.toString() ">
  484. left join ATT_MAMPU_INFO mo on p.regid = mo.id where j.nm = #{gcNm} and mo.nm = #{dwNm}
  485. </if>
  486. <if test="objType == '4'.toString() ">
  487. left join BIS_INSP_KEY_REG_SEC_UNIT mo on p.regid = mo.id where j.nm = #{gcNm} and mo.nm = #{dwNm}
  488. and sec_id in (select id from BIS_INSP_KEY_REGISTER_SECTION where nm = #{bdNm})
  489. </if>
  490. </select>
  491. <select id="getImpKeyRegList" resultType="cn.com.goldenwater.dcproj.model.ImpPblmKeyReg">
  492. select distinct p.OBJ_ID, mo.id as REG_ID, p.nm as gcnm, mo.nm as glnm
  493. from BIS_INSP_KEY_REGISTER p INNER JOIN BIS_INSP_ALL_OBJ A ON A.OBJ_ID= p.OBJ_ID
  494. <if test="objType == '7'.toString() ">
  495. left join ATT_MAMPU_INFO mo on p.id = mo.reg_id where p.nm = #{gcNm} and mo.nm = #{dwNm}
  496. </if>
  497. <if test="objType == '4'.toString() ">
  498. , BIS_INSP_KEY_REG_SEC_UNIT mo
  499. where p.nm = #{gcNm}
  500. and mo.nm = #{dwNm}
  501. and mo.sec_id in (select id from BIS_INSP_KEY_REGISTER_SECTION where nm = #{bdNm})
  502. </if>
  503. <if test="groupId != null and groupId != '' ">
  504. AND A.id like concat(#{groupId},'%')
  505. </if>
  506. </select>
  507. <!--批量更新-->
  508. </mapper>