RingScanInformationMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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. sub.sort,
  231. rsif.start_time desc
  232. </select>
  233. <select id="selectRingScanInformationLog2" resultType="com.zkqy.amichi.domain.vo.RingScanInformationLogVo">
  234. SELECT
  235. count(sub.count) as `count`,
  236. sub.process_name,
  237. sub.order_number,
  238. sub.scanning_time,
  239. sub.production_order_number,
  240. sub.sort,
  241. rsif.`status`,
  242. rsif.start_time,
  243. rsif.end_time,
  244. rsif.total_quantity,
  245. rsif.production_order_total_quantity,
  246. ptd.model_number as modelNumber,
  247. ptd.specification as specification
  248. FROM
  249. (
  250. SELECT
  251. rsi.process_name,
  252. rsi.native_numbering,
  253. rsi.order_number,
  254. COUNT( rsi.process_name ) AS count,
  255. rsi.production_order_number,
  256. MAX( rsi.scanning_time ) AS scanning_time,
  257. pl.sort
  258. FROM
  259. fjqydb.ring_scan_information AS rsi
  260. LEFT JOIN fjqydb.procedure_list AS pl ON pl.procedur_name = rsi.process_name
  261. WHERE
  262. rsi.execution_mark = '1'
  263. GROUP BY
  264. rsi.production_order_number,rsi.process_name,rsi.native_numbering
  265. ) AS sub
  266. LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON ( sub.production_order_number = rsif.production_order_number )
  267. left join fjqydb.plan_task_details as ptd on ptd.demand_document=sub.production_order_number
  268. <where>
  269. <if test="list != null and list.size()>0">
  270. sub.production_order_number IN
  271. <foreach item="id" collection="list" open="(" separator="," close=")">
  272. #{id}
  273. </foreach>
  274. </if>
  275. <if test="list == null or list.size() == 0">
  276. rsi.production_order_number = 'X'
  277. </if>
  278. </where>
  279. GROUP BY
  280. sub.production_order_number,
  281. sub.process_name
  282. ORDER BY
  283. rsif.start_time desc,sub.sort
  284. </select>
  285. <select id="selectScanStatistics" resultType="com.zkqy.amichi.domain.vo.ScanStatistics" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  286. SELECT
  287. CONCAT(c.order_number, '/', c.model_number) AS dOrder,
  288. c.dCount,
  289. SUM( CASE WHEN c.execution_mark = 1 THEN 1 ELSE 0 END ) AS dsCount,
  290. SUM( CASE WHEN c.execution_mark = 2 THEN 1 ELSE 0 END ) As dfCount
  291. FROM
  292. (
  293. SELECT
  294. rsi.order_number,
  295. rsi.native_numbering,
  296. rsif.total_quantity AS dCount,
  297. rsi.execution_mark,
  298. ptd.model_number
  299. FROM
  300. fjqydb.ring_scan_information rsi
  301. LEFT JOIN fjqydb.ring_scan_information_first rsif ON rsi.production_order_number = rsif.production_order_number
  302. LEFT JOIN fjqydb.plan_task_details AS ptd ON rsi.production_order_number = ptd.demand_document
  303. <where>
  304. <if test="processName!=null and processName!='' and processName.equals('焊接D')">
  305. rsi.content_information LIKE concat('%','D', '%' ) and rsi.process_name='焊接'
  306. </if>
  307. <if test="processName!=null and processName!='' and processName.equals('焊接Z')">
  308. rsi.content_information LIKE concat('%','Z', '%' ) and rsi.process_name='焊接'
  309. </if>
  310. <if test="productionOrderNumber!=null and productionOrderNumber!=''">
  311. and rsi.production_order_number=#{productionOrderNumber}
  312. </if>
  313. <if test="processName!=null and processName!='' and processName!='焊接D' and processName!='焊接Z'">
  314. and rsi.process_name like concat('%', #{processName}, '%')
  315. </if>
  316. and execution_mark='1'
  317. </where>
  318. GROUP BY native_numbering
  319. ) AS c
  320. GROUP BY
  321. order_number
  322. </select>
  323. <select id="selectRingScanInformationListLike" resultType="java.lang.String" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  324. SELECT
  325. COUNT(1)
  326. FROM
  327. fjqydb.ring_scan_information
  328. <where>
  329. <if test="processName!=null and processName!='' and processName.equals('焊接D')">
  330. content_information LIKE concat('%','D', '%' ) and process_name='焊接'
  331. </if>
  332. <if test="processName!=null and processName!='' and processName.equals('焊接Z')">
  333. content_information LIKE concat('%','Z', '%' ) and process_name='焊接'
  334. </if>
  335. <if test="orderNumber!=null and orderNumber!=''">
  336. and order_number=#{orderNumber}
  337. </if>
  338. <if test="processName!=null and processName!='' and processName!='焊接D' and processName!='焊接Z'">
  339. and process_name like concat('%', #{processName}, '%')
  340. </if>
  341. and execution_mark='1'
  342. </where>
  343. </select>
  344. <select id="handHeldJournal" resultType="map" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  345. SELECT
  346. rsif.total_quantity as Dcount,
  347. concat(rsi.order_number,'/' ,ptd.model_number) as Dorder,
  348. rsi.order_number as DorderName,
  349. rsi.production_order_number ,
  350. rsi.personnel_name as Uname,
  351. rsi.station_name as Ugw,
  352. rsi.process_name as processName,
  353. SUM( CASE WHEN rsi.execution_mark = 1 THEN 1 ELSE 0 END ) AS dsCount,
  354. SUM( CASE WHEN rsi.execution_mark = 2 THEN 1 ELSE 0 END ) As dfCount
  355. FROM
  356. fjqydb.ring_scan_information AS rsi
  357. LEFT JOIN fjqydb.ring_scan_information_first AS rsif ON rsi.production_order_number = rsif.production_order_number
  358. left join fjqydb.plan_task_details as ptd on rsi.production_order_number=ptd.demand_document
  359. where DATE(rsi.scanning_time) = CURDATE()
  360. GROUP BY
  361. rsi.order_number,
  362. rsi.personnel_name,
  363. rsi.station_name
  364. </select>
  365. <select id="selectRingScanInformationListisNotNull"
  366. resultType="com.zkqy.amichi.domain.RingScanInformation">
  367. <include refid="selectRingScanInformationVo"/>
  368. <where>
  369. <if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
  370. <if test="processName != null and processName != ''"> and process_name = #{processName}</if>
  371. <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
  372. <if test="contentInformation != null and contentInformation != ''"> and content_information = #{contentInformation}</if>
  373. <if test="nativeNumbering != null and nativeNumbering != ''"> and native_numbering = #{nativeNumbering}</if>
  374. <if test="productionOrderNumber != null and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
  375. <if test="executionMark!=null and executionMark!=''">and execution_mark = #{executionMark}</if>
  376. <if test="productionOrderNumber!=null and productionOrderNumber!=''">and production_order_number = #{productionOrderNumber}</if>
  377. <if test="orderNumber!=null and orderNumber!=''">and order_number = #{orderNumber}</if>
  378. <if test="scanningTimes!=null and scanningTimes[0] != null and scanningTimes[0] != ''">
  379. <![CDATA[ and scanning_time >= #{scanningTimes[0]}]]>
  380. </if>
  381. <if test="scanningTimes!=null and scanningTimes[1] != null and scanningTimes[0] != ''">
  382. <![CDATA[ and scanning_time <= #{scanningTimes[0]}]]>
  383. </if>
  384. and order_number is not null
  385. </where>
  386. order by scanning_time,process_name
  387. </select>
  388. <select id="selectRingScanInfoByUserNameAndOrderNumber" resultType="java.lang.String">
  389. SELECT
  390. COUNT(DISTINCT rsi.native_numbering) AS completedMachines
  391. FROM
  392. fjqydb.ring_scan_information AS rsi
  393. WHERE
  394. rsi.process_name = #{gw}
  395. AND rsi.personnel_name = #{uname}
  396. AND rsi.order_number =#{dorder}
  397. AND rsi.execution_mark = '1'
  398. GROUP BY
  399. rsi.personnel_name,
  400. rsi.order_number;
  401. </select>
  402. <select id="scanCodeLogOrderInfo" resultType="java.util.Map">
  403. SELECT
  404. rsif.order_number AS order_number,
  405. rsif.total_quantity,
  406. rsif.start_time,
  407. COUNT(CASE WHEN rsi.process_name = '入库' THEN rsif.order_number END) AS over_number
  408. FROM
  409. fjqydb.`ring_scan_information_first` AS rsif
  410. LEFT JOIN fjqydb.ring_scan_information AS rsi ON rsif.order_number = rsi.order_number
  411. WHERE
  412. rsi.execution_mark =1
  413. GROUP BY
  414. rsif.order_number
  415. ORDER BY rsif.start_time desc
  416. </select>
  417. <insert id="insertRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation" useGeneratedKeys="true" keyProperty="id">
  418. insert into fjqydb.ring_scan_information
  419. <trim prefix="(" suffix=")" suffixOverrides=",">
  420. <if test="deviceNumber != null">device_number,</if>
  421. <if test="deviceName != null">device_name,</if>
  422. <if test="scanningTime != null">scanning_time,</if>
  423. <if test="contentInformation != null">content_information,</if>
  424. <if test="nativeNumbering != null">native_numbering,</if>
  425. <if test="personnelName != null">personnel_name,</if>
  426. <if test="process != null">process,</if>
  427. <if test="processName != null">process_name,</if>
  428. <if test="orderNumber != null">order_number,</if>
  429. <if test="productionOrderNumber != null">production_order_number,</if>
  430. <if test="stationId != null">station_id,</if>
  431. <if test="stationName != null">station_name,</if>
  432. <if test="executionMark != null">execution_mark,</if>
  433. <if test="executionMessage != null">execution_message,</if>
  434. <if test="overNumber != null">over_number,</if>
  435. </trim>
  436. <trim prefix="values (" suffix=")" suffixOverrides=",">
  437. <if test="deviceNumber != null">#{deviceNumber},</if>
  438. <if test="deviceName != null">#{deviceName},</if>
  439. <if test="scanningTime != null">#{scanningTime},</if>
  440. <if test="contentInformation != null">#{contentInformation},</if>
  441. <if test="nativeNumbering != null">#{nativeNumbering},</if>
  442. <if test="personnelName != null">#{personnelName},</if>
  443. <if test="process != null">#{process},</if>
  444. <if test="processName != null">#{processName},</if>
  445. <if test="orderNumber != null">#{orderNumber},</if>
  446. <if test="productionOrderNumber != null">#{productionOrderNumber},</if>
  447. <if test="stationId != null">#{stationId},</if>
  448. <if test="stationName != null">#{stationName},</if>
  449. <if test="executionMark != null">#{executionMark},</if>
  450. <if test="executionMessage != null">#{executionMessage},</if>
  451. <if test="overNumber != null">#{overNumber},</if>
  452. </trim>
  453. </insert>
  454. <update id="updateRingScanInformation" parameterType="com.zkqy.amichi.domain.RingScanInformation">
  455. update fjqydb.ring_scan_information
  456. <trim prefix="SET" suffixOverrides=",">
  457. <if test="deviceNumber != null">device_number = #{deviceNumber},</if>
  458. <if test="deviceName != null">device_name = #{deviceName},</if>
  459. <if test="scanningTime != null">scanning_time = #{scanningTime},</if>
  460. <if test="contentInformation != null">content_information = #{contentInformation},</if>
  461. <if test="stationId != null">station_id=#{stationId},</if>
  462. <if test="stationName != null">station_name=#{stationName},</if>
  463. </trim>
  464. where id = #{id}
  465. </update>
  466. <delete id="deleteRingScanInformationById" parameterType="Long">
  467. delete from fjqydb.ring_scan_information where id = #{id}
  468. </delete>
  469. <delete id="deleteRingScanInformationByIds" parameterType="String">
  470. delete from fjqydb.ring_scan_information where id in
  471. <foreach item="id" collection="array" open="(" separator="," close=")">
  472. #{id}
  473. </foreach>
  474. </delete>
  475. </mapper>