TIntactGjMapper.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.project.intact.mapper.TIntactGjMapper">
  6. <resultMap type="TIntactGj" id="TIntactGjResult">
  7. <result property="id" column="id" />
  8. <result property="plantCode" column="plant_code" />
  9. <result property="unit" column="unit" />
  10. <result property="devname" column="devname" />
  11. <result property="devno" column="devno" />
  12. <result property="submitdate" column="submitdate" />
  13. <result property="status" column="status" />
  14. <result property="delFlag" column="del_flag" />
  15. <result property="createrCode" column="creater_code" />
  16. <result property="createdate" column="createdate" />
  17. <result property="updaterCode" column="updater_code" />
  18. <result property="updatedate" column="updatedate" />
  19. <result property="deptId" column="dept_id" />
  20. <result property="remarks" column="remarks" />
  21. <result property="approveStatus" column="approve_status" />
  22. <result property="regno" column="regno" />
  23. <result property="useno" column="useno" />
  24. <result property="warnDate" column="warn_date" />
  25. <result property="warnCycle" column="warn_cycle" />
  26. <result property="nextWarnDate" column="next_warn_date" />
  27. <result property="warnFlag" column="warn_flag" />
  28. <result property="grade" column="grade" />
  29. <result property="designer" column="designer" />
  30. <result property="installer" column="installer" />
  31. <result property="material" column="material" />
  32. <result property="dia" column="dia" />
  33. <result property="scheduleNo" column="schedule_no" />
  34. <result property="length" column="length" />
  35. <result property="starting" column="starting" />
  36. <result property="ending" column="ending" />
  37. <result property="desPressure" column="des_pressure" />
  38. <result property="desTemp" column="des_temp" />
  39. <result property="optPressure" column="opt_pressure" />
  40. <result property="optTemp" column="opt_temp" />
  41. <result property="medium" column="medium" />
  42. <result property="checkConclusion" column="check_conclusion" />
  43. <result property="checkUnit" column="check_unit" />
  44. <result property="safeClass" column="safe_class" />
  45. <result property="reportNo" column="report_no" />
  46. <result property="approveTime" column="approve_time" />
  47. <result property="changeTime" column="change_time" />
  48. <result property="plantMaint" column="plant_maint" />
  49. <result property="engineer" column="engineer" />
  50. <result property="weldNumber" column="weld_number" />
  51. <result property="layingMethod" column="laying_method" />
  52. <result property="adiabatic" column="adiabatic" />
  53. <result property="antiCorrosion" column="anti_corrosion" />
  54. <result property="adiabaticThickness" column="adiabatic_thickness" />
  55. <result property="isDanger" column="is_danger" />
  56. <result property="installDate" column="install_date" />
  57. <result property="yearWarnDate" column="year_warn_date" />
  58. <result property="yearNextWarnDate" column="year_next_warn_date" />
  59. <result property="yearReportNo" column="year_report_no" />
  60. <result property="isRepeat" column="is_repeat" />
  61. <result property="type" column="type" />
  62. <result property="position" column="position" />
  63. <result property="deviceSize" column="device_size" />
  64. <result property="leakageMode" column="leakage_mode" />
  65. <result property="archives" column="archives" />
  66. <result property="deptName" column="dept_name" />
  67. </resultMap>
  68. <sql id="selectTIntactGjVo">
  69. select d.id, d.plant_code, d.unit, d.devname, d.devno, d.submitdate, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status, d.regno, d.useno, d.warn_date, d.warn_cycle, d.next_warn_date, d.warn_flag, d.grade, d.designer, d.installer, d.material, d.dia, d.schedule_no, d.length, d.starting, d.ending, d.des_pressure, d.des_temp, d.opt_pressure, d.opt_temp, d.medium, d.check_conclusion, d.check_unit, d.safe_class, d.report_no, d.approve_time, d.change_time, d.plant_maint, d.engineer, d.weld_number, d.laying_method, d.adiabatic, d.anti_corrosion, d.adiabatic_thickness, d.is_danger, d.install_date, d.year_warn_date, d.year_next_warn_date, d.year_report_no, d.is_repeat, d.type, d.position, d.device_size, d.leakage_mode, d.archives ,s.dept_name from t_intact_gj d
  70. left join sys_dept s on s.dept_id = d.dept_id
  71. </sql>
  72. <select id="selectTIntactGjList" parameterType="TIntactGj" resultMap="TIntactGjResult">
  73. <include refid="selectTIntactGjVo"/>
  74. <where>
  75. <if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if>
  76. <if test="unit != null and unit != ''"> and unit = #{unit}</if>
  77. <if test="devname != null and devname != ''"> and devname like concat(concat('%', #{devname}), '%')</if>
  78. <if test="devno != null and devno != ''"> and devno = #{devno}</if>
  79. <if test="submitdate != null "> and submitdate = #{submitdate}</if>
  80. <if test="status != null "> and d.status = #{status}</if>
  81. <if test="createrCode != null "> and creater_code = #{createrCode}</if>
  82. <if test="createdate != null "> and createdate = #{createdate}</if>
  83. <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
  84. <if test="updatedate != null "> and updatedate = #{updatedate}</if>
  85. <if test="deptId != null "> and dept_id = #{deptId}</if>
  86. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  87. <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
  88. <if test="regno != null and regno != ''"> and regno = #{regno}</if>
  89. <if test="useno != null and useno != ''"> and useno = #{useno}</if>
  90. <if test="warnDate != null "> and warn_date = #{warnDate}</if>
  91. <if test="warnCycle != null "> and warn_cycle = #{warnCycle}</if>
  92. <if test="nextWarnDate != null "> and next_warn_date = #{nextWarnDate}</if>
  93. <if test="warnFlag != null "> and warn_flag = #{warnFlag}</if>
  94. <if test="grade != null and grade != ''"> and grade = #{grade}</if>
  95. <if test="designer != null and designer != ''"> and designer = #{designer}</if>
  96. <if test="installer != null and installer != ''"> and installer = #{installer}</if>
  97. <if test="material != null and material != ''"> and material = #{material}</if>
  98. <if test="dia != null and dia != ''"> and dia = #{dia}</if>
  99. <if test="scheduleNo != null and scheduleNo != ''"> and schedule_no = #{scheduleNo}</if>
  100. <if test="length != null and length != ''"> and length = #{length}</if>
  101. <if test="starting != null and starting != ''"> and starting = #{starting}</if>
  102. <if test="ending != null and ending != ''"> and ending = #{ending}</if>
  103. <if test="desPressure != null and desPressure != ''"> and des_pressure = #{desPressure}</if>
  104. <if test="desTemp != null and desTemp != ''"> and des_temp = #{desTemp}</if>
  105. <if test="optPressure != null and optPressure != ''"> and opt_pressure = #{optPressure}</if>
  106. <if test="optTemp != null and optTemp != ''"> and opt_temp = #{optTemp}</if>
  107. <if test="medium != null and medium != ''"> and medium = #{medium}</if>
  108. <if test="checkConclusion != null and checkConclusion != ''"> and check_conclusion = #{checkConclusion}</if>
  109. <if test="checkUnit != null and checkUnit != ''"> and check_unit = #{checkUnit}</if>
  110. <if test="safeClass != null and safeClass != ''"> and safe_class = #{safeClass}</if>
  111. <if test="reportNo != null and reportNo != ''"> and report_no = #{reportNo}</if>
  112. <if test="approveTime != null "> and approve_time = #{approveTime}</if>
  113. <if test="changeTime != null "> and change_time = #{changeTime}</if>
  114. <if test="plantMaint != null and plantMaint != ''"> and plant_maint = #{plantMaint}</if>
  115. <if test="engineer != null and engineer != ''"> and engineer = #{engineer}</if>
  116. <if test="weldNumber != null and weldNumber != ''"> and weld_number = #{weldNumber}</if>
  117. <if test="layingMethod != null and layingMethod != ''"> and laying_method = #{layingMethod}</if>
  118. <if test="adiabatic != null and adiabatic != ''"> and adiabatic = #{adiabatic}</if>
  119. <if test="antiCorrosion != null and antiCorrosion != ''"> and anti_corrosion = #{antiCorrosion}</if>
  120. <if test="adiabaticThickness != null and adiabaticThickness != ''"> and adiabatic_thickness = #{adiabaticThickness}</if>
  121. <if test="isDanger != null and isDanger != ''"> and is_danger = #{isDanger}</if>
  122. <if test="installDate != null "> and install_date = #{installDate}</if>
  123. <if test="yearWarnDate != null "> and year_warn_date = #{yearWarnDate}</if>
  124. <if test="yearNextWarnDate != null "> and year_next_warn_date = #{yearNextWarnDate}</if>
  125. <if test="yearReportNo != null and yearReportNo != ''"> and year_report_no = #{yearReportNo}</if>
  126. <if test="isRepeat != null "> and is_repeat = #{isRepeat}</if>
  127. <if test="type != null "> and type = #{type}</if>
  128. <if test="position != null and position != ''"> and position = #{position}</if>
  129. <if test="deviceSize != null "> and device_size = #{deviceSize}</if>
  130. <if test="leakageMode != null and leakageMode != ''"> and leakage_mode = #{leakageMode}</if>
  131. <if test="archives != null and archives != ''"> and archives = #{archives}</if>
  132. and d.del_flag = 0
  133. </where>
  134. <!-- 数据范围过滤 -->
  135. ${params.dataScope}
  136. </select>
  137. <select id="selectTIntactGjById" parameterType="Long" resultMap="TIntactGjResult">
  138. <include refid="selectTIntactGjVo"/>
  139. where id = #{id}
  140. </select>
  141. <insert id="insertTIntactGj" parameterType="TIntactGj">
  142. <selectKey keyProperty="id" resultType="long" order="BEFORE">
  143. SELECT seq_t_intact_gj.NEXTVAL as id FROM DUAL
  144. </selectKey>
  145. insert into t_intact_gj
  146. <trim prefix="(" suffix=")" suffixOverrides=",">
  147. <if test="id != null">id,</if>
  148. <if test="plantCode != null">plant_code,</if>
  149. <if test="unit != null">unit,</if>
  150. <if test="devname != null">devname,</if>
  151. <if test="devno != null">devno,</if>
  152. <if test="submitdate != null">submitdate,</if>
  153. <if test="status != null">status,</if>
  154. <if test="delFlag != null">del_flag,</if>
  155. <if test="createrCode != null">creater_code,</if>
  156. <if test="createdate != null">createdate,</if>
  157. <if test="updaterCode != null">updater_code,</if>
  158. <if test="updatedate != null">updatedate,</if>
  159. <if test="deptId != null">dept_id,</if>
  160. <if test="remarks != null">remarks,</if>
  161. <if test="approveStatus != null">approve_status,</if>
  162. <if test="regno != null">regno,</if>
  163. <if test="useno != null">useno,</if>
  164. <if test="warnDate != null">warn_date,</if>
  165. <if test="warnCycle != null">warn_cycle,</if>
  166. <if test="nextWarnDate != null">next_warn_date,</if>
  167. <if test="warnFlag != null">warn_flag,</if>
  168. <if test="grade != null">grade,</if>
  169. <if test="designer != null">designer,</if>
  170. <if test="installer != null">installer,</if>
  171. <if test="material != null">material,</if>
  172. <if test="dia != null">dia,</if>
  173. <if test="scheduleNo != null">schedule_no,</if>
  174. <if test="length != null">length,</if>
  175. <if test="starting != null">starting,</if>
  176. <if test="ending != null">ending,</if>
  177. <if test="desPressure != null">des_pressure,</if>
  178. <if test="desTemp != null">des_temp,</if>
  179. <if test="optPressure != null">opt_pressure,</if>
  180. <if test="optTemp != null">opt_temp,</if>
  181. <if test="medium != null">medium,</if>
  182. <if test="checkConclusion != null">check_conclusion,</if>
  183. <if test="checkUnit != null">check_unit,</if>
  184. <if test="safeClass != null">safe_class,</if>
  185. <if test="reportNo != null">report_no,</if>
  186. <if test="approveTime != null">approve_time,</if>
  187. <if test="changeTime != null">change_time,</if>
  188. <if test="plantMaint != null">plant_maint,</if>
  189. <if test="engineer != null">engineer,</if>
  190. <if test="weldNumber != null">weld_number,</if>
  191. <if test="layingMethod != null">laying_method,</if>
  192. <if test="adiabatic != null">adiabatic,</if>
  193. <if test="antiCorrosion != null">anti_corrosion,</if>
  194. <if test="adiabaticThickness != null">adiabatic_thickness,</if>
  195. <if test="isDanger != null">is_danger,</if>
  196. <if test="installDate != null">install_date,</if>
  197. <if test="yearWarnDate != null">year_warn_date,</if>
  198. <if test="yearNextWarnDate != null">year_next_warn_date,</if>
  199. <if test="yearReportNo != null">year_report_no,</if>
  200. <if test="isRepeat != null">is_repeat,</if>
  201. <if test="type != null">type,</if>
  202. <if test="position != null">position,</if>
  203. <if test="deviceSize != null">device_size,</if>
  204. <if test="leakageMode != null">leakage_mode,</if>
  205. <if test="archives != null">archives,</if>
  206. </trim>
  207. <trim prefix="values (" suffix=")" suffixOverrides=",">
  208. <if test="id != null">#{id},</if>
  209. <if test="plantCode != null">#{plantCode},</if>
  210. <if test="unit != null">#{unit},</if>
  211. <if test="devname != null">#{devname},</if>
  212. <if test="devno != null">#{devno},</if>
  213. <if test="submitdate != null">#{submitdate},</if>
  214. <if test="status != null">#{status},</if>
  215. <if test="delFlag != null">#{delFlag},</if>
  216. <if test="createrCode != null">#{createrCode},</if>
  217. <if test="createdate != null">#{createdate},</if>
  218. <if test="updaterCode != null">#{updaterCode},</if>
  219. <if test="updatedate != null">#{updatedate},</if>
  220. <if test="deptId != null">#{deptId},</if>
  221. <if test="remarks != null">#{remarks},</if>
  222. <if test="approveStatus != null">#{approveStatus},</if>
  223. <if test="regno != null">#{regno},</if>
  224. <if test="useno != null">#{useno},</if>
  225. <if test="warnDate != null">#{warnDate},</if>
  226. <if test="warnCycle != null">#{warnCycle},</if>
  227. <if test="nextWarnDate != null">#{nextWarnDate},</if>
  228. <if test="warnFlag != null">#{warnFlag},</if>
  229. <if test="grade != null">#{grade},</if>
  230. <if test="designer != null">#{designer},</if>
  231. <if test="installer != null">#{installer},</if>
  232. <if test="material != null">#{material},</if>
  233. <if test="dia != null">#{dia},</if>
  234. <if test="scheduleNo != null">#{scheduleNo},</if>
  235. <if test="length != null">#{length},</if>
  236. <if test="starting != null">#{starting},</if>
  237. <if test="ending != null">#{ending},</if>
  238. <if test="desPressure != null">#{desPressure},</if>
  239. <if test="desTemp != null">#{desTemp},</if>
  240. <if test="optPressure != null">#{optPressure},</if>
  241. <if test="optTemp != null">#{optTemp},</if>
  242. <if test="medium != null">#{medium},</if>
  243. <if test="checkConclusion != null">#{checkConclusion},</if>
  244. <if test="checkUnit != null">#{checkUnit},</if>
  245. <if test="safeClass != null">#{safeClass},</if>
  246. <if test="reportNo != null">#{reportNo},</if>
  247. <if test="approveTime != null">#{approveTime},</if>
  248. <if test="changeTime != null">#{changeTime},</if>
  249. <if test="plantMaint != null">#{plantMaint},</if>
  250. <if test="engineer != null">#{engineer},</if>
  251. <if test="weldNumber != null">#{weldNumber},</if>
  252. <if test="layingMethod != null">#{layingMethod},</if>
  253. <if test="adiabatic != null">#{adiabatic},</if>
  254. <if test="antiCorrosion != null">#{antiCorrosion},</if>
  255. <if test="adiabaticThickness != null">#{adiabaticThickness},</if>
  256. <if test="isDanger != null">#{isDanger},</if>
  257. <if test="installDate != null">#{installDate},</if>
  258. <if test="yearWarnDate != null">#{yearWarnDate},</if>
  259. <if test="yearNextWarnDate != null">#{yearNextWarnDate},</if>
  260. <if test="yearReportNo != null">#{yearReportNo},</if>
  261. <if test="isRepeat != null">#{isRepeat},</if>
  262. <if test="type != null">#{type},</if>
  263. <if test="position != null">#{position},</if>
  264. <if test="deviceSize != null">#{deviceSize},</if>
  265. <if test="leakageMode != null">#{leakageMode},</if>
  266. <if test="archives != null">#{archives},</if>
  267. </trim>
  268. </insert>
  269. <update id="updateTIntactGj" parameterType="TIntactGj">
  270. update t_intact_gj
  271. <trim prefix="SET" suffixOverrides=",">
  272. <if test="plantCode != null">plant_code = #{plantCode},</if>
  273. <if test="unit != null">unit = #{unit},</if>
  274. <if test="devname != null">devname = #{devname},</if>
  275. <if test="devno != null">devno = #{devno},</if>
  276. <if test="submitdate != null">submitdate = #{submitdate},</if>
  277. <if test="status != null">status = #{status},</if>
  278. <if test="delFlag != null">del_flag = #{delFlag},</if>
  279. <if test="createrCode != null">creater_code = #{createrCode},</if>
  280. <if test="createdate != null">createdate = #{createdate},</if>
  281. <if test="updaterCode != null">updater_code = #{updaterCode},</if>
  282. <if test="updatedate != null">updatedate = #{updatedate},</if>
  283. <if test="deptId != null">dept_id = #{deptId},</if>
  284. <if test="remarks != null">remarks = #{remarks},</if>
  285. <if test="approveStatus != null">approve_status = #{approveStatus},</if>
  286. <if test="regno != null">regno = #{regno},</if>
  287. <if test="useno != null">useno = #{useno},</if>
  288. <if test="warnDate != null">warn_date = #{warnDate},</if>
  289. <if test="warnCycle != null">warn_cycle = #{warnCycle},</if>
  290. <if test="nextWarnDate != null">next_warn_date = #{nextWarnDate},</if>
  291. <if test="warnFlag != null">warn_flag = #{warnFlag},</if>
  292. <if test="grade != null">grade = #{grade},</if>
  293. <if test="designer != null">designer = #{designer},</if>
  294. <if test="installer != null">installer = #{installer},</if>
  295. <if test="material != null">material = #{material},</if>
  296. <if test="dia != null">dia = #{dia},</if>
  297. <if test="scheduleNo != null">schedule_no = #{scheduleNo},</if>
  298. <if test="length != null">length = #{length},</if>
  299. <if test="starting != null">starting = #{starting},</if>
  300. <if test="ending != null">ending = #{ending},</if>
  301. <if test="desPressure != null">des_pressure = #{desPressure},</if>
  302. <if test="desTemp != null">des_temp = #{desTemp},</if>
  303. <if test="optPressure != null">opt_pressure = #{optPressure},</if>
  304. <if test="optTemp != null">opt_temp = #{optTemp},</if>
  305. <if test="medium != null">medium = #{medium},</if>
  306. <if test="checkConclusion != null">check_conclusion = #{checkConclusion},</if>
  307. <if test="checkUnit != null">check_unit = #{checkUnit},</if>
  308. <if test="safeClass != null">safe_class = #{safeClass},</if>
  309. <if test="reportNo != null">report_no = #{reportNo},</if>
  310. <if test="approveTime != null">approve_time = #{approveTime},</if>
  311. <if test="changeTime != null">change_time = #{changeTime},</if>
  312. <if test="plantMaint != null">plant_maint = #{plantMaint},</if>
  313. <if test="engineer != null">engineer = #{engineer},</if>
  314. <if test="weldNumber != null">weld_number = #{weldNumber},</if>
  315. <if test="layingMethod != null">laying_method = #{layingMethod},</if>
  316. <if test="adiabatic != null">adiabatic = #{adiabatic},</if>
  317. <if test="antiCorrosion != null">anti_corrosion = #{antiCorrosion},</if>
  318. <if test="adiabaticThickness != null">adiabatic_thickness = #{adiabaticThickness},</if>
  319. <if test="isDanger != null">is_danger = #{isDanger},</if>
  320. <if test="installDate != null">install_date = #{installDate},</if>
  321. <if test="yearWarnDate != null">year_warn_date = #{yearWarnDate},</if>
  322. <if test="yearNextWarnDate != null">year_next_warn_date = #{yearNextWarnDate},</if>
  323. <if test="yearReportNo != null">year_report_no = #{yearReportNo},</if>
  324. <if test="isRepeat != null">is_repeat = #{isRepeat},</if>
  325. <if test="type != null">type = #{type},</if>
  326. <if test="position != null">position = #{position},</if>
  327. <if test="deviceSize != null">device_size = #{deviceSize},</if>
  328. <if test="leakageMode != null">leakage_mode = #{leakageMode},</if>
  329. <if test="archives != null">archives = #{archives},</if>
  330. </trim>
  331. where id = #{id}
  332. </update>
  333. <update id="deleteTIntactGjById" parameterType="Long">
  334. update t_intact_gj set del_flag = 2 where id = #{id}
  335. </update>
  336. <update id="deleteTIntactGjByIds" parameterType="String">
  337. update t_intact_gj set del_flag = 2 where id in
  338. <foreach item="id" collection="array" open="(" separator="," close=")">
  339. #{id}
  340. </foreach>
  341. </update>
  342. </mapper>