TwinFormulaInfoMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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.biz.mapper.TwinFormulaInfoMapper">
  6. <resultMap type="TwinFormulaInfo" id="TwinFormulaInfoResult">
  7. <result property="specInfoId" column="SPEC_INFO_ID" />
  8. <result property="deviceId" column="DEVICE_ID" />
  9. <result property="fd1" column="FD1" />
  10. <result property="fd2" column="FD2" />
  11. <result property="fd3" column="FD3" />
  12. <result property="fd4" column="FD4" />
  13. <result property="fd5" column="FD5" />
  14. <result property="fd6" column="FD6" />
  15. <result property="fd7" column="FD7" />
  16. <result property="fd8" column="FD8" />
  17. <result property="fd9" column="FD9" />
  18. <result property="fd10" column="FD10" />
  19. <result property="fd11" column="FD11" />
  20. <result property="fd12" column="FD12" />
  21. <result property="fd13" column="FD13" />
  22. <result property="fd14" column="FD14" />
  23. <result property="fd15" column="FD15" />
  24. <result property="fd16" column="FD16" />
  25. <result property="fd17" column="FD17" />
  26. <result property="fd18" column="FD18" />
  27. <result property="fd19" column="FD19" />
  28. <result property="fd20" column="FD20" />
  29. <result property="fd21" column="FD21" />
  30. <result property="fd22" column="FD22" />
  31. <result property="fd23" column="FD23" />
  32. <result property="fd24" column="FD24" />
  33. <result property="fd25" column="FD25" />
  34. <result property="cd10" column="CD10" />
  35. <result property="cd11" column="CD11" />
  36. <result property="cd12" column="CD12" />
  37. <result property="cd13" column="CD13" />
  38. <result property="cd14" column="CD14" />
  39. <result property="cd15" column="CD15" />
  40. <result property="cd16" column="CD16" />
  41. <result property="cd17" column="CD17" />
  42. <result property="cd18" column="CD18" />
  43. <result property="cd19" column="CD19" />
  44. <result property="remark" column="REMARK" />
  45. </resultMap>
  46. <sql id="selectTwinFormulaInfoVo">
  47. select SPEC_INFO_ID, DEVICE_ID, FD1, FD2, FD3, FD4, FD5, FD6, FD7, FD8, FD9, FD10, FD11, FD12, FD13, FD14, FD15, FD16, FD17, FD18, FD19, FD20, FD21, FD22, FD23, FD24, FD25, CD10, CD11, CD12, CD13, CD14, CD15, CD16, CD17, CD18, CD19, REMARK from twin_formula_info
  48. </sql>
  49. <select id="selectTwinFormulaInfoList" parameterType="TwinFormulaInfo" resultMap="TwinFormulaInfoResult">
  50. <include refid="selectTwinFormulaInfoVo"/>
  51. <where>
  52. <if test="deviceId != null "> and DEVICE_ID = #{deviceId}</if>
  53. <if test="fd1 != null "> and FD1 = #{fd1}</if>
  54. <if test="fd2 != null "> and FD2 = #{fd2}</if>
  55. <if test="fd3 != null "> and FD3 = #{fd3}</if>
  56. <if test="fd4 != null "> and FD4 = #{fd4}</if>
  57. <if test="fd5 != null "> and FD5 = #{fd5}</if>
  58. <if test="fd6 != null "> and FD6 = #{fd6}</if>
  59. <if test="fd7 != null "> and FD7 = #{fd7}</if>
  60. <if test="fd8 != null "> and FD8 = #{fd8}</if>
  61. <if test="fd9 != null "> and FD9 = #{fd9}</if>
  62. <if test="fd10 != null "> and FD10 = #{fd10}</if>
  63. <if test="fd11 != null "> and FD11 = #{fd11}</if>
  64. <if test="fd12 != null "> and FD12 = #{fd12}</if>
  65. <if test="fd13 != null "> and FD13 = #{fd13}</if>
  66. <if test="fd14 != null "> and FD14 = #{fd14}</if>
  67. <if test="fd15 != null "> and FD15 = #{fd15}</if>
  68. <if test="fd16 != null "> and FD16 = #{fd16}</if>
  69. <if test="fd17 != null "> and FD17 = #{fd17}</if>
  70. <if test="fd18 != null "> and FD18 = #{fd18}</if>
  71. <if test="fd19 != null "> and FD19 = #{fd19}</if>
  72. <if test="fd20 != null "> and FD20 = #{fd20}</if>
  73. <if test="fd21 != null "> and FD21 = #{fd21}</if>
  74. <if test="fd22 != null "> and FD22 = #{fd22}</if>
  75. <if test="fd23 != null "> and FD23 = #{fd23}</if>
  76. <if test="fd24 != null "> and FD24 = #{fd24}</if>
  77. <if test="fd25 != null "> and FD25 = #{fd25}</if>
  78. <if test="cd10 != null "> and CD10 = #{cd10}</if>
  79. <if test="cd11 != null "> and CD11 = #{cd11}</if>
  80. <if test="cd12 != null "> and CD12 = #{cd12}</if>
  81. <if test="cd13 != null "> and CD13 = #{cd13}</if>
  82. <if test="cd14 != null "> and CD14 = #{cd14}</if>
  83. <if test="cd15 != null "> and CD15 = #{cd15}</if>
  84. <if test="cd16 != null "> and CD16 = #{cd16}</if>
  85. <if test="cd17 != null "> and CD17 = #{cd17}</if>
  86. <if test="cd18 != null "> and CD18 = #{cd18}</if>
  87. <if test="cd19 != null "> and CD19 = #{cd19}</if>
  88. <if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
  89. </where>
  90. </select>
  91. <select id="selectTwinFormulaInfoBySpecInfoId" parameterType="Long" resultMap="TwinFormulaInfoResult">
  92. <include refid="selectTwinFormulaInfoVo"/>
  93. where SPEC_INFO_ID = #{specInfoId}
  94. </select>
  95. <insert id="insertTwinFormulaInfo" parameterType="TwinFormulaInfo" useGeneratedKeys="true" keyProperty="specInfoId">
  96. insert into twin_formula_info
  97. <trim prefix="(" suffix=")" suffixOverrides=",">
  98. <if test="specInfoId != null">SPEC_INFO_ID,</if>
  99. <if test="deviceId != null">DEVICE_ID,</if>
  100. <if test="fd1 != null">FD1,</if>
  101. <if test="fd2 != null">FD2,</if>
  102. <if test="fd3 != null">FD3,</if>
  103. <if test="fd4 != null">FD4,</if>
  104. <if test="fd5 != null">FD5,</if>
  105. <if test="fd6 != null">FD6,</if>
  106. <if test="fd7 != null">FD7,</if>
  107. <if test="fd8 != null">FD8,</if>
  108. <if test="fd9 != null">FD9,</if>
  109. <if test="fd10 != null">FD10,</if>
  110. <if test="fd11 != null">FD11,</if>
  111. <if test="fd12 != null">FD12,</if>
  112. <if test="fd13 != null">FD13,</if>
  113. <if test="fd14 != null">FD14,</if>
  114. <if test="fd15 != null">FD15,</if>
  115. <if test="fd16 != null">FD16,</if>
  116. <if test="fd17 != null">FD17,</if>
  117. <if test="fd18 != null">FD18,</if>
  118. <if test="fd19 != null">FD19,</if>
  119. <if test="fd20 != null">FD20,</if>
  120. <if test="fd21 != null">FD21,</if>
  121. <if test="fd22 != null">FD22,</if>
  122. <if test="fd23 != null">FD23,</if>
  123. <if test="fd24 != null">FD24,</if>
  124. <if test="fd25 != null">FD25,</if>
  125. <if test="cd10 != null">CD10,</if>
  126. <if test="cd11 != null">CD11,</if>
  127. <if test="cd12 != null">CD12,</if>
  128. <if test="cd13 != null">CD13,</if>
  129. <if test="cd14 != null">CD14,</if>
  130. <if test="cd15 != null">CD15,</if>
  131. <if test="cd16 != null">CD16,</if>
  132. <if test="cd17 != null">CD17,</if>
  133. <if test="cd18 != null">CD18,</if>
  134. <if test="cd19 != null">CD19,</if>
  135. <if test="remark != null">REMARK,</if>
  136. </trim>
  137. <trim prefix="values (" suffix=")" suffixOverrides=",">
  138. <if test="specInfoId != null">#{specInfoId},</if>
  139. <if test="deviceId != null">#{deviceId},</if>
  140. <if test="fd1 != null">#{fd1},</if>
  141. <if test="fd2 != null">#{fd2},</if>
  142. <if test="fd3 != null">#{fd3},</if>
  143. <if test="fd4 != null">#{fd4},</if>
  144. <if test="fd5 != null">#{fd5},</if>
  145. <if test="fd6 != null">#{fd6},</if>
  146. <if test="fd7 != null">#{fd7},</if>
  147. <if test="fd8 != null">#{fd8},</if>
  148. <if test="fd9 != null">#{fd9},</if>
  149. <if test="fd10 != null">#{fd10},</if>
  150. <if test="fd11 != null">#{fd11},</if>
  151. <if test="fd12 != null">#{fd12},</if>
  152. <if test="fd13 != null">#{fd13},</if>
  153. <if test="fd14 != null">#{fd14},</if>
  154. <if test="fd15 != null">#{fd15},</if>
  155. <if test="fd16 != null">#{fd16},</if>
  156. <if test="fd17 != null">#{fd17},</if>
  157. <if test="fd18 != null">#{fd18},</if>
  158. <if test="fd19 != null">#{fd19},</if>
  159. <if test="fd20 != null">#{fd20},</if>
  160. <if test="fd21 != null">#{fd21},</if>
  161. <if test="fd22 != null">#{fd22},</if>
  162. <if test="fd23 != null">#{fd23},</if>
  163. <if test="fd24 != null">#{fd24},</if>
  164. <if test="fd25 != null">#{fd25},</if>
  165. <if test="cd10 != null">#{cd10},</if>
  166. <if test="cd11 != null">#{cd11},</if>
  167. <if test="cd12 != null">#{cd12},</if>
  168. <if test="cd13 != null">#{cd13},</if>
  169. <if test="cd14 != null">#{cd14},</if>
  170. <if test="cd15 != null">#{cd15},</if>
  171. <if test="cd16 != null">#{cd16},</if>
  172. <if test="cd17 != null">#{cd17},</if>
  173. <if test="cd18 != null">#{cd18},</if>
  174. <if test="cd19 != null">#{cd19},</if>
  175. <if test="remark != null">#{remark},</if>
  176. </trim>
  177. </insert>
  178. <update id="updateTwinFormulaInfo" parameterType="TwinFormulaInfo">
  179. update twin_formula_info
  180. <trim prefix="SET" suffixOverrides=",">
  181. <if test="deviceId != null">DEVICE_ID = #{deviceId},</if>
  182. <if test="fd1 != null">FD1 = #{fd1},</if>
  183. <if test="fd2 != null">FD2 = #{fd2},</if>
  184. <if test="fd3 != null">FD3 = #{fd3},</if>
  185. <if test="fd4 != null">FD4 = #{fd4},</if>
  186. <if test="fd5 != null">FD5 = #{fd5},</if>
  187. <if test="fd6 != null">FD6 = #{fd6},</if>
  188. <if test="fd7 != null">FD7 = #{fd7},</if>
  189. <if test="fd8 != null">FD8 = #{fd8},</if>
  190. <if test="fd9 != null">FD9 = #{fd9},</if>
  191. <if test="fd10 != null">FD10 = #{fd10},</if>
  192. <if test="fd11 != null">FD11 = #{fd11},</if>
  193. <if test="fd12 != null">FD12 = #{fd12},</if>
  194. <if test="fd13 != null">FD13 = #{fd13},</if>
  195. <if test="fd14 != null">FD14 = #{fd14},</if>
  196. <if test="fd15 != null">FD15 = #{fd15},</if>
  197. <if test="fd16 != null">FD16 = #{fd16},</if>
  198. <if test="fd17 != null">FD17 = #{fd17},</if>
  199. <if test="fd18 != null">FD18 = #{fd18},</if>
  200. <if test="fd19 != null">FD19 = #{fd19},</if>
  201. <if test="fd20 != null">FD20 = #{fd20},</if>
  202. <if test="fd21 != null">FD21 = #{fd21},</if>
  203. <if test="fd22 != null">FD22 = #{fd22},</if>
  204. <if test="fd23 != null">FD23 = #{fd23},</if>
  205. <if test="fd24 != null">FD24 = #{fd24},</if>
  206. <if test="fd25 != null">FD25 = #{fd25},</if>
  207. <if test="cd10 != null">CD10 = #{cd10},</if>
  208. <if test="cd11 != null">CD11 = #{cd11},</if>
  209. <if test="cd12 != null">CD12 = #{cd12},</if>
  210. <if test="cd13 != null">CD13 = #{cd13},</if>
  211. <if test="cd14 != null">CD14 = #{cd14},</if>
  212. <if test="cd15 != null">CD15 = #{cd15},</if>
  213. <if test="cd16 != null">CD16 = #{cd16},</if>
  214. <if test="cd17 != null">CD17 = #{cd17},</if>
  215. <if test="cd18 != null">CD18 = #{cd18},</if>
  216. <if test="cd19 != null">CD19 = #{cd19},</if>
  217. <if test="remark != null">REMARK = #{remark},</if>
  218. </trim>
  219. where SPEC_INFO_ID = #{specInfoId}
  220. </update>
  221. <delete id="deleteTwinFormulaInfoBySpecInfoId" parameterType="Long">
  222. delete from twin_formula_info where SPEC_INFO_ID = #{specInfoId}
  223. </delete>
  224. <delete id="deleteTwinFormulaInfoBySpecInfoIds" parameterType="String">
  225. delete from twin_formula_info where SPEC_INFO_ID in
  226. <foreach item="specInfoId" collection="array" open="(" separator="," close=")">
  227. #{specInfoId}
  228. </foreach>
  229. </delete>
  230. </mapper>