RingScanInformationMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  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.zkqy.amichi.mapper.RingScanInformationMapper">
  6. <resultMap type="com.zkqy.amichi.domain.RingScanInformation" id="RingScanInformationResult">
  7. <result property="id" column="id" />
  8. <result property="deviceNumber" column="device_number" />
  9. <result property="deviceName" column="device_name" />
  10. <result property="scanningTime" column="scanning_time" />
  11. <result property="contentInformation" column="content_information" />
  12. <result property="stationName" column="station_name" />
  13. <result property="personnelName" column="personnel_name" />
  14. <result property="processName" column="process_name" />
  15. <result property="executionMessage" column="execution_message"/>
  16. <result property="executionMark" column="execution_mark"/>
  17. <result property="orderNumber" column="order_number" />
  18. <result property="productionOrderNumber" column="production_order_number" />
  19. <result property="processName" column="process_name" />
  20. <result property="overNumber" column="over_number" />
  21. </resultMap>
  22. <select id="selectRingScanInformationListScfy" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResult">
  23. select id, device_number, station_name, personnel_name,
  24. process_name,scanning_time, content_information,execution_message,execution_mark,over_number,production_order_number
  25. from
  26. fjqydb.ring_scan_information
  27. <where>
  28. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  29. and DATE(scanning_time) = CURDATE() order by scanning_time desc limit #{offset},#{pageSize}
  30. </where>
  31. </select>
  32. <select id="selectRingScanInformationListScfyCount" resultType="java.lang.Integer" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  33. select count(id) from fjqydb.ring_scan_information
  34. <where>
  35. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  36. and DATE(scanning_time) = CURDATE()
  37. </where>
  38. </select>
  39. <sql id="selectRingScanInformationVo">
  40. select id, device_number, device_name, scanning_time,process_name,station_name, content_information,personnel_name,order_number,production_order_number,execution_message,over_number from fjqydb.ring_scan_information
  41. </sql>
  42. <select id="selectRingScanInformationList" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResult">
  43. <include refid="selectRingScanInformationVo"/>
  44. <where>
  45. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  46. <if test="processName != null and processName != ''"> and process_name = #{processName}</if>
  47. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  48. <if test="contentInformation != null and contentInformation != ''"> and content_information = #{contentInformation}</if>
  49. <if test="nativeNumbering != null and nativeNumbering != ''"> and native_numbering = #{nativeNumbering}</if>
  50. <if test="productionOrderNumber != null and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
  51. <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
  52. <if test="productionOrderNumber!=null and productionOrderNumber!=''">and production_order_number = #{productionOrderNumber}</if>
  53. <if test="orderNumber!=null and orderNumber!=''">and order_number = #{orderNumber}</if>
  54. <if test="scanningTimes!=null and scanningTimes[0] != null and scanningTimes[0] != ''">
  55. <![CDATA[ and scanning_time >= #{scanningTimes[0]}]]>
  56. </if>
  57. <if test="scanningTimes!=null and scanningTimes[1] != null and scanningTimes[0] != ''">
  58. <![CDATA[ and scanning_time <= #{scanningTimes[0]}]]>
  59. </if>
  60. </where>
  61. order by scanning_time,process_name
  62. </select>
  63. <select id="selectRingScanInformationDownload" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResultNR">
  64. SELECT
  65. rsi.id,
  66. rsi.device_number,
  67. rsi.device_name,
  68. rsi.scanning_time,
  69. rsi.content_information,
  70. rsi.native_numbering,
  71. rsi.personnel_name,
  72. rsi.process_name,
  73. rsi.station_name,
  74. rsi.execution_mark,
  75. rsi.execution_message,
  76. ptd.material_id,
  77. ptd.material_name,
  78. ptd.model_number AS model,
  79. ptd.demand_document,
  80. rsi.production_order_number,
  81. rsi.order_number
  82. FROM
  83. fjqydb.ring_scan_information as rsi
  84. LEFT JOIN fjqydb.plan_task_details AS ptd ON ptd.demand_document = rsi.production_order_number
  85. <where>
  86. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  87. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  88. <if test="scanningTime != null "> and scanning_time = #{scanningTime}</if>
  89. <if test="personnelName != null "> and personnel_name = #{personnelName}</if>
  90. <if test="process != null "> and process = #{process}</if>
  91. <if test="contentInformation != null and contentInformation != ''"> and content_information = #{contentInformation}</if>
  92. <if test="nativeNumbering != null and nativeNumbering != ''"> and native_numbering = #{nativeNumbering}</if>
  93. <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
  94. <if test="productionOrderNumber!=null and productionOrderNumber!=''">and rsi.production_order_number = #{productionOrderNumber}</if>
  95. <if test="orderNumber!=null and orderNumber!=''">and rsi.order_number = #{orderNumber}</if>
  96. <if test="scanningTimes!=null and scanningTimes[0] != null and scanningTimes[0] != ''">
  97. <![CDATA[ and scanning_time >= #{scanningTimes[0]}]]>
  98. </if>
  99. <if test="scanningTimes!=null and scanningTimes[1] != null and scanningTimes[0] != ''">
  100. <![CDATA[ and scanning_time <= #{scanningTimes[0]}]]>
  101. </if>
  102. </where>
  103. order by personnel_name,process_name asc,scanning_time desc
  104. </select>
  105. <resultMap type="com.zkqy.amichi.domain.vo.RingScanInformationVo" id="RingScanInformationResultNR">
  106. <result property="id" column="id" />
  107. <result property="deviceNumber" column="device_number" />
  108. <result property="deviceName" column="device_name" />
  109. <result property="scanningTime" column="scanning_time" />
  110. <result property="contentInformation" column="content_information" />
  111. <result property="nativeNumbering" column="native_numbering" />
  112. <result property="orderNumber" column="production_order_number" />
  113. <result property="serialNumber" column="serial_number" />
  114. <result property="materialCode" column="material_id" />
  115. <result property="materialName" column="material_name" />
  116. <result property="model" column="model" />
  117. <result property="demandDocument" column="order_number" />
  118. <result property="personnelName" column="personnel_name" />
  119. <result property="processName" column="process_name" />
  120. <result property="stationName" column="station_name" />
  121. <result property="executionMessage" column="execution_message"/>
  122. <result property="executionMark" column="execution_mark"/>
  123. </resultMap>
  124. <select id="selectRingScanInformationListVo" parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResultNR">
  125. SELECT
  126. rsi.id,
  127. rsi.device_number,
  128. rsi.device_name,
  129. rsi.scanning_time,
  130. rsi.content_information,
  131. rsi.native_numbering,
  132. rsi.personnel_name,
  133. rsi.process_name,
  134. rsi.station_name,
  135. rsi.execution_mark,
  136. rsi.execution_message,
  137. ptd.material_id,
  138. ptd.material_name,
  139. ptd.model_number AS model,
  140. ptd.demand_document,
  141. rsi.production_order_number,
  142. rsi.order_number
  143. FROM
  144. fjqydb.ring_scan_information as rsi
  145. LEFT JOIN fjqydb.plan_task_details AS ptd ON ptd.demand_document = rsi.production_order_number
  146. left join fjqydb.production_planning_management as ppm on ptd.plan_id=ppm.id
  147. <where>
  148. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  149. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  150. <if test="scanningTime != null "> and scanning_time = #{scanningTime}</if>
  151. <if test="personnelName != null "> and personnel_name like concat('%', #{personnelName}, '%') </if>
  152. <if test="process != null "> and process like concat('%', #{process}, '%')</if>
  153. <if test="contentInformation != null and contentInformation != ''"> and content_information like concat('%', #{contentInformation}, '%')</if>
  154. <if test="nativeNumbering != null and nativeNumbering != ''"> and native_numbering like concat('%', #{nativeNumbering}, '%')</if>
  155. <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
  156. <if test="productionOrderNumber!=null and productionOrderNumber!=''">and rsi.production_order_number like concat('%', #{productionOrderNumber}, '%')</if>
  157. <if test="orderNumber!=null and orderNumber!=''">and rsi.order_number like concat('%', #{orderNumber}, '%')</if>
  158. <if test="scanningTimes!=null and scanningTimes[0] != null and scanningTimes[0] != ''">
  159. <![CDATA[ and scanning_time >= #{scanningTimes[0]}]]>
  160. </if>
  161. <if test="scanningTimes!=null and scanningTimes[1] != null and scanningTimes[0] != ''">
  162. <![CDATA[ and scanning_time <= #{scanningTimes[0]}]]>
  163. </if>
  164. </where>
  165. order by scanning_time desc
  166. </select>
  167. <select id="selectRingScanInformationById" parameterType="Long" resultMap="RingScanInformationResult">
  168. <include refid="selectRingScanInformationVo"/>
  169. where id = #{id}
  170. </select>
  171. <select id="selectRingScanInformationListDateTimeMax"
  172. parameterType="com.zkqy.amichi.domain.RingScanInformation" resultMap="RingScanInformationResult">
  173. <include refid="selectRingScanInformationVo"/>
  174. <where>
  175. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  176. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  177. <if test="scanningTime != null "> and scanning_time = #{scanningTime}</if>
  178. <if test="contentInformation != null and contentInformation != ''"> and content_information = #{contentInformation}</if>
  179. </where>
  180. order by scanning_time DESC
  181. LIMIT 1
  182. </select>
  183. <select id="selectRingScanInformationLog" resultType="com.zkqy.amichi.domain.vo.RingScanInformationLogVo">
  184. SELECT
  185. count(sub.count) as `count`,
  186. sub.process_name,
  187. sub.order_number,
  188. sub.scanning_time,
  189. sub.production_order_number,
  190. sub.sort,
  191. rsif.`status`,
  192. rsif.start_time,
  193. rsif.end_time,
  194. rsif.total_quantity,
  195. rsif.production_order_total_quantity
  196. FROM
  197. (
  198. SELECT
  199. rsi.process_name,
  200. rsi.native_numbering,
  201. rsi.order_number,
  202. COUNT( rsi.process_name ) AS count,
  203. rsi.production_order_number,
  204. MAX( rsi.scanning_time ) AS scanning_time,
  205. pl.sort
  206. FROM
  207. fjqydb.ring_scan_information AS rsi
  208. LEFT JOIN fjqydb.procedure_list AS pl ON pl.procedur_name = rsi.process_name
  209. WHERE
  210. rsi.execution_mark = '1'
  211. GROUP BY
  212. rsi.order_number,rsi.process_name,rsi.native_numbering
  213. ) AS sub
  214. LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON ( sub.production_order_number = rsif.production_order_number )
  215. <where>
  216. <if test="list != null and list.size()>0">
  217. sub.order_number IN
  218. <foreach item="id" collection="list" open="(" separator="," close=")">
  219. #{id}
  220. </foreach>
  221. </if>
  222. <if test="list == null or list.size() == 0">
  223. rsi.order_number = 'X'
  224. </if>
  225. </where>
  226. GROUP BY
  227. sub.order_number,
  228. sub.process_name
  229. ORDER BY
  230. rsif.start_time desc,sub.sort
  231. </select>
  232. <select id="selectRingScanInformationLog2" resultType="com.zkqy.amichi.domain.vo.RingScanInformationLogVo">
  233. SELECT
  234. count(sub.count) as `count`,
  235. sub.process_name,
  236. sub.order_number,
  237. sub.scanning_time,
  238. sub.production_order_number,
  239. sub.sort,
  240. rsif.`status`,
  241. rsif.start_time,
  242. rsif.end_time,
  243. rsif.total_quantity,
  244. rsif.production_order_total_quantity,
  245. ptd.model_number as modelNumber,
  246. ptd.specification as specification
  247. FROM
  248. (
  249. SELECT
  250. rsi.process_name,
  251. rsi.native_numbering,
  252. rsi.order_number,
  253. COUNT( rsi.process_name ) AS count,
  254. rsi.production_order_number,
  255. MAX( rsi.scanning_time ) AS scanning_time,
  256. pl.sort
  257. FROM
  258. fjqydb.ring_scan_information AS rsi
  259. LEFT JOIN fjqydb.procedure_list AS pl ON pl.procedur_name = rsi.process_name
  260. WHERE
  261. rsi.execution_mark = '1'
  262. GROUP BY
  263. rsi.production_order_number,rsi.process_name,rsi.native_numbering
  264. ) AS sub
  265. LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON ( sub.production_order_number = rsif.production_order_number )
  266. left join fjqydb.plan_task_details as ptd on ptd.demand_document=sub.production_order_number
  267. <where>
  268. <if test="list != null and list.size()>0">
  269. sub.production_order_number IN
  270. <foreach item="id" collection="list" open="(" separator="," close=")">
  271. #{id}
  272. </foreach>
  273. </if>
  274. <if test="list == null or list.size() == 0">
  275. rsi.production_order_number = 'X'
  276. </if>
  277. </where>
  278. GROUP BY
  279. sub.production_order_number,
  280. sub.process_name
  281. ORDER BY
  282. rsif.start_time desc,sub.sort
  283. </select>
  284. <select id="selectScanStatistics" resultType="com.zkqy.amichi.domain.vo.ScanStatistics" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  285. SELECT
  286. CONCAT(c.order_number, '/', c.model_number) AS dOrder,
  287. c.dCount,
  288. SUM( CASE WHEN c.execution_mark = 1 THEN 1 ELSE 0 END ) AS dsCount,
  289. SUM( CASE WHEN c.execution_mark = 2 THEN 1 ELSE 0 END ) As dfCount
  290. FROM
  291. (
  292. SELECT
  293. rsi.order_number,
  294. rsi.native_numbering,
  295. rsif.total_quantity AS dCount,
  296. rsi.execution_mark,
  297. ptd.model_number
  298. FROM
  299. fjqydb.ring_scan_information rsi
  300. LEFT JOIN fjqydb.ring_scan_information_first rsif ON rsi.production_order_number = rsif.production_order_number
  301. LEFT JOIN fjqydb.plan_task_details AS ptd ON rsi.production_order_number = ptd.demand_document
  302. <where>
  303. <if test="processName!=null and processName!='' and processName.equals('焊接D')">
  304. rsi.content_information LIKE concat('%','D', '%' ) and rsi.process_name='焊接'
  305. </if>
  306. <if test="processName!=null and processName!='' and processName.equals('焊接Z')">
  307. rsi.content_information LIKE concat('%','Z', '%' ) and rsi.process_name='焊接'
  308. </if>
  309. <if test="productionOrderNumber!=null and productionOrderNumber!=''">
  310. and rsi.production_order_number=#{productionOrderNumber}
  311. </if>
  312. <if test="processName!=null and processName!='' and processName!='焊接D' and processName!='焊接Z'">
  313. and rsi.process_name like concat('%', #{processName}, '%')
  314. </if>
  315. and execution_mark='1'
  316. </where>
  317. GROUP BY native_numbering
  318. ) AS c
  319. GROUP BY
  320. order_number
  321. </select>
  322. <select id="selectRingScanInformationListLike" resultType="java.lang.String" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  323. SELECT
  324. COUNT(1)
  325. FROM
  326. fjqydb.ring_scan_information
  327. <where>
  328. <if test="processName!=null and processName!='' and processName.equals('焊接D')">
  329. content_information LIKE concat('%','D', '%' ) and process_name='焊接'
  330. </if>
  331. <if test="processName!=null and processName!='' and processName.equals('焊接Z')">
  332. content_information LIKE concat('%','Z', '%' ) and process_name='焊接'
  333. </if>
  334. <if test="orderNumber!=null and orderNumber!=''">
  335. and order_number=#{orderNumber}
  336. </if>
  337. <if test="processName!=null and processName!='' and processName!='焊接D' and processName!='焊接Z'">
  338. and process_name like concat('%', #{processName}, '%')
  339. </if>
  340. and execution_mark='1'
  341. </where>
  342. </select>
  343. <select id="handHeldJournal" resultType="map" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  344. SELECT
  345. rsif.total_quantity as Dcount,
  346. concat(rsi.order_number,'/' ,ptd.model_number) as Dorder,
  347. rsi.order_number as DorderName,
  348. rsi.production_order_number ,
  349. rsi.personnel_name as Uname,
  350. rsi.station_name as Ugw,
  351. rsi.process_name as processName,
  352. SUM( CASE WHEN rsi.execution_mark = 1 THEN 1 ELSE 0 END ) AS dsCount,
  353. SUM( CASE WHEN rsi.execution_mark = 2 THEN 1 ELSE 0 END ) As dfCount
  354. FROM
  355. fjqydb.ring_scan_information AS rsi
  356. LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON rsi.production_order_number = rsif.production_order_number
  357. left join fjqydb.plan_task_details as ptd on rsi.production_order_number=ptd.demand_document
  358. where DATE(rsi.scanning_time) = CURDATE()
  359. GROUP BY
  360. rsi.order_number,
  361. rsi.personnel_name,
  362. rsi.station_name
  363. </select>
  364. <select id="selectRingScanInformationListisNotNull"
  365. resultType="com.zkqy.amichi.domain.RingScanInformation">
  366. <include refid="selectRingScanInformationVo"/>
  367. <where>
  368. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  369. <if test="processName != null and processName != ''"> and process_name = #{processName}</if>
  370. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  371. <if test="contentInformation != null and contentInformation != ''"> and content_information = #{contentInformation}</if>
  372. <if test="nativeNumbering != null and nativeNumbering != ''"> and native_numbering = #{nativeNumbering}</if>
  373. <if test="productionOrderNumber != null and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
  374. <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
  375. <if test="productionOrderNumber!=null and productionOrderNumber!=''">and production_order_number = #{productionOrderNumber}</if>
  376. <if test="orderNumber!=null and orderNumber!=''">and order_number = #{orderNumber}</if>
  377. <if test="scanningTimes!=null and scanningTimes[0] != null and scanningTimes[0] != ''">
  378. <![CDATA[ and scanning_time >= #{scanningTimes[0]}]]>
  379. </if>
  380. <if test="scanningTimes!=null and scanningTimes[1] != null and scanningTimes[0] != ''">
  381. <![CDATA[ and scanning_time <= #{scanningTimes[0]}]]>
  382. </if>
  383. and order_number is not null
  384. </where>
  385. order by scanning_time,process_name
  386. </select>
  387. <select id="selectRingScanInfoByUserNameAndOrderNumber" resultType="java.lang.String">
  388. SELECT
  389. COUNT(DISTINCT rsi.native_numbering) AS completedMachines
  390. FROM
  391. fjqydb.ring_scan_information AS rsi
  392. WHERE
  393. rsi.process_name = #{gw}
  394. AND rsi.personnel_name = #{uname}
  395. AND rsi.order_number =#{dorder}
  396. AND rsi.execution_mark = '1'
  397. GROUP BY
  398. rsi.personnel_name,
  399. rsi.order_number;
  400. </select>
  401. <select id="scanCodeLogOrderInfo" resultType="java.util.Map">
  402. SELECT
  403. rsif.order_number AS order_number,
  404. rsif.total_quantity,
  405. rsif.start_time,
  406. COUNT(CASE WHEN rsi.process_name = '入库' THEN rsif.order_number END) AS over_number
  407. FROM
  408. fjqydb.`ring_scan_information_first` AS rsif
  409. LEFT JOIN fjqydb.ring_scan_information AS rsi ON rsif.order_number = rsi.order_number
  410. WHERE
  411. rsi.execution_mark =1
  412. GROUP BY
  413. rsif.order_number
  414. ORDER BY rsif.start_time desc
  415. </select>
  416. <insert id="insertRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation" useGeneratedKeys="true" keyProperty="id">
  417. insert into fjqydb.ring_scan_information
  418. <trim prefix="(" suffix=")" suffixOverrides=",">
  419. <if test="deviceNumber != null">device_number,</if>
  420. <if test="deviceName != null">device_name,</if>
  421. <if test="scanningTime != null">scanning_time,</if>
  422. <if test="contentInformation != null">content_information,</if>
  423. <if test="nativeNumbering != null">native_numbering,</if>
  424. <if test="personnelName != null">personnel_name,</if>
  425. <if test="process != null">process,</if>
  426. <if test="processName != null">process_name,</if>
  427. <if test="orderNumber != null">order_number,</if>
  428. <if test="productionOrderNumber != null">production_order_number,</if>
  429. <if test="stationId != null">station_id,</if>
  430. <if test="stationName != null">station_name,</if>
  431. <if test="executionMark != null">execution_mark,</if>
  432. <if test="executionMessage != null">execution_message,</if>
  433. <if test="overNumber != null">over_number,</if>
  434. </trim>
  435. <trim prefix="values (" suffix=")" suffixOverrides=",">
  436. <if test="deviceNumber != null">#{deviceNumber},</if>
  437. <if test="deviceName != null">#{deviceName},</if>
  438. <if test="scanningTime != null">#{scanningTime},</if>
  439. <if test="contentInformation != null">#{contentInformation},</if>
  440. <if test="nativeNumbering != null">#{nativeNumbering},</if>
  441. <if test="personnelName != null">#{personnelName},</if>
  442. <if test="process != null">#{process},</if>
  443. <if test="processName != null">#{processName},</if>
  444. <if test="orderNumber != null">#{orderNumber},</if>
  445. <if test="productionOrderNumber != null">#{productionOrderNumber},</if>
  446. <if test="stationId != null">#{stationId},</if>
  447. <if test="stationName != null">#{stationName},</if>
  448. <if test="executionMark != null">#{executionMark},</if>
  449. <if test="executionMessage != null">#{executionMessage},</if>
  450. <if test="overNumber != null">#{overNumber},</if>
  451. </trim>
  452. </insert>
  453. <update id="updateRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  454. update fjqydb.ring_scan_information
  455. <trim prefix="SET" suffixOverrides=",">
  456. <if test="deviceNumber != null">device_number = #{deviceNumber},</if>
  457. <if test="deviceName != null">device_name = #{deviceName},</if>
  458. <if test="scanningTime != null">scanning_time = #{scanningTime},</if>
  459. <if test="contentInformation != null">content_information = #{contentInformation},</if>
  460. <if test="stationId != null">station_id=#{stationId},</if>
  461. <if test="stationName != null">station_name=#{stationName},</if>
  462. </trim>
  463. where id = #{id}
  464. </update>
  465. <delete id="deleteRingScanInformationById" parameterType="Long">
  466. delete from fjqydb.ring_scan_information where id = #{id}
  467. </delete>
  468. <delete id="deleteRingScanInformationByIds" parameterType="String">
  469. delete from fjqydb.ring_scan_information where id in
  470. <foreach item="id" collection="array" open="(" separator="," close=")">
  471. #{id}
  472. </foreach>
  473. </delete>
  474. </mapper>