EmsProdplanRoundMapper.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  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="com.steerinfo.ems.emsprodplanround.mapper.EmsProdplanRoundMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
  5. <id column="ID" jdbcType="VARCHAR" property="id" />
  6. <result column="MAY" jdbcType="DATE" property="may" />
  7. <result column="SQNO" jdbcType="DECIMAL" property="sqno" />
  8. <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
  9. <result column="DESCRIBE" jdbcType="VARCHAR" property="describe" />
  10. <result column="STATE" jdbcType="VARCHAR" property="state" />
  11. <result column="GRADES" jdbcType="VARCHAR" property="grades" />
  12. <result column="PLAN_WEIGHT" jdbcType="DECIMAL" property="planWeight" />
  13. <result column="SPECIFICATIONS" jdbcType="VARCHAR" property="specifications" />
  14. <result column="LENGTHS" jdbcType="VARCHAR" property="lengths" />
  15. <result column="CHEMICAL_STANDARD" jdbcType="VARCHAR" property="chemicalStandard" />
  16. <result column="SURFACE_STANDARD" jdbcType="VARCHAR" property="surfaceStandard" />
  17. <result column="MEMO" jdbcType="VARCHAR" property="memo" />
  18. <result column="ISSUED_TIME" jdbcType="TIMESTAMP" property="issuedTime" />
  19. <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
  20. <result column="CREATETIME" jdbcType="TIMESTAMP" property="createtime" />
  21. <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
  22. <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
  23. <result column="TRANSPORT_TYPE" jdbcType="VARCHAR" property="transportType" />
  24. <result column="PURPOSE" jdbcType="VARCHAR" property="purpose" />
  25. <result column="WORKPROC_TYPE" jdbcType="VARCHAR" property="workprocType" />
  26. <result column="MSG_FLAG" jdbcType="VARCHAR" property="msgFlag" />
  27. <result column="READ_FLAG" jdbcType="VARCHAR" property="readFlag" />
  28. <result column="PARENTID" jdbcType="VARCHAR" property="parentid"/>
  29. </resultMap>
  30. <sql id="columns">
  31. ID, MAY, SQNO, UNITID, DESCRIBE, STATE, GRADES, PLAN_WEIGHT, SPECIFICATIONS, LENGTHS,
  32. CHEMICAL_STANDARD, SURFACE_STANDARD, MEMO, ISSUED_TIME, CREATEMAN, CREATETIME, UPDATEMAN,
  33. UPDATETIME, TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE, MSG_FLAG, READ_FLAG,PARENTID
  34. </sql>
  35. <sql id="columns_alias">
  36. t.ID, t.MAY, t.SQNO, t.UNITID, t.DESCRIBE, t.STATE, t.GRADES, t.PLAN_WEIGHT, t.SPECIFICATIONS,
  37. t.LENGTHS, t.CHEMICAL_STANDARD, t.SURFACE_STANDARD, t.MEMO, t.ISSUED_TIME, t.CREATEMAN,
  38. t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.TRANSPORT_TYPE, t.PURPOSE, t.WORKPROC_TYPE,
  39. t.MSG_FLAG, t.READ_FLAG,t.PARENTID
  40. </sql>
  41. <sql id="select">
  42. SELECT <include refid="columns"/> FROM EMS_PRODPLAN_ROUND
  43. </sql>
  44. <sql id="select_alias">
  45. SELECT <include refid="columns_alias"/> FROM EMS_PRODPLAN_ROUND t
  46. </sql>
  47. <sql id="where">
  48. <where>
  49. <if test="id != null and id != ''">
  50. and ID = #{id}
  51. </if>
  52. <if test="may != null">
  53. and trunc(MAY) = to_date(#{may},'yyyy-mm')
  54. </if>
  55. <if test="sqno != null and sqno != ''">
  56. and SQNO = #{sqno}
  57. </if>
  58. <if test="unitid != null and unitid != ''">
  59. and UNITID = #{unitid}
  60. </if>
  61. <if test="describe != null and describe != ''">
  62. and DESCRIBE = #{describe}
  63. </if>
  64. <if test="state != null and state != ''">
  65. and STATE = #{state}
  66. </if>
  67. <if test="grades != null and grades != ''">
  68. and GRADES = #{grades}
  69. </if>
  70. <if test="planWeight != null">
  71. and PLAN_WEIGHT = #{planWeight}
  72. </if>
  73. <if test="specifications != null and specifications != ''">
  74. and SPECIFICATIONS = #{specifications}
  75. </if>
  76. <if test="lengths != null and lengths != ''">
  77. and LENGTHS = #{lengths}
  78. </if>
  79. <if test="chemicalStandard != null and chemicalStandard != ''">
  80. and CHEMICAL_STANDARD = #{chemicalStandard}
  81. </if>
  82. <if test="surfaceStandard != null and surfaceStandard != ''">
  83. and SURFACE_STANDARD = #{surfaceStandard}
  84. </if>
  85. <if test="memo != null and memo != ''">
  86. and MEMO = #{memo}
  87. </if>
  88. <if test="issuedTime != null">
  89. and TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = #{issuedTime}
  90. </if>
  91. <if test="createman != null and createman != ''">
  92. and CREATEMAN = #{createman}
  93. </if>
  94. <if test="createtime != null">
  95. and TO_CHAR(CREATETIME,'yyyy-MM-dd') = #{createtime}
  96. </if>
  97. <if test="updateman != null and updateman != ''">
  98. and UPDATEMAN = #{updateman}
  99. </if>
  100. <if test="updatetime != null">
  101. and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
  102. </if>
  103. <if test="transportType != null and transportType != ''">
  104. and TRANSPORT_TYPE = #{transportType}
  105. </if>
  106. <if test="purpose != null and purpose != ''">
  107. and PURPOSE = #{purpose}
  108. </if>
  109. <if test="workprocType != null and workprocType != ''">
  110. and WORKPROC_TYPE = #{workprocType}
  111. </if>
  112. <if test="msgFlag != null and msgFlag != ''">
  113. and MSG_FLAG = #{msgFlag}
  114. </if>
  115. <if test="readFlag != null and readFlag != ''">
  116. and READ_FLAG = #{readFlag}
  117. </if>
  118. <if test="parentid != null and parentid != '' ">
  119. and PARENTID = #{parentid}
  120. </if>
  121. </where>
  122. </sql>
  123. <sql id="whereLike">
  124. <where>
  125. <if test="id != null and id != ''">
  126. and ID LIKE '%${id}%'
  127. </if>
  128. <if test="may != null">
  129. and TO_CHAR(MAY,'yyyy-MM-dd') = #{may}
  130. </if>
  131. <if test="sqno != null and sqno != ''">
  132. and SQNO LIKE '%${sqno}%'
  133. </if>
  134. <if test="unitid != null and unitid != ''">
  135. and UNITID LIKE '%${unitid}%'
  136. </if>
  137. <if test="describe != null and describe != ''">
  138. and DESCRIBE LIKE '%${describe}%'
  139. </if>
  140. <if test="state != null and state != ''">
  141. and STATE LIKE '%${state}%'
  142. </if>
  143. <if test="grades != null and grades != ''">
  144. and GRADES LIKE '%${grades}%'
  145. </if>
  146. <if test="planWeight != null">
  147. and PLAN_WEIGHT = #{planWeight}
  148. </if>
  149. <if test="specifications != null and specifications != ''">
  150. and SPECIFICATIONS LIKE '%${specifications}%'
  151. </if>
  152. <if test="lengths != null and lengths != ''">
  153. and LENGTHS LIKE '%${lengths}%'
  154. </if>
  155. <if test="chemicalStandard != null and chemicalStandard != ''">
  156. and CHEMICAL_STANDARD LIKE '%${chemicalStandard}%'
  157. </if>
  158. <if test="surfaceStandard != null and surfaceStandard != ''">
  159. and SURFACE_STANDARD LIKE '%${surfaceStandard}%'
  160. </if>
  161. <if test="memo != null and memo != ''">
  162. and MEMO LIKE '%${memo}%'
  163. </if>
  164. <if test="issuedTime != null">
  165. and TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = #{issuedTime}
  166. </if>
  167. <if test="createman != null and createman != ''">
  168. and CREATEMAN LIKE '%${createman}%'
  169. </if>
  170. <if test="createtime != null">
  171. and TO_CHAR(CREATETIME,'yyyy-MM-dd') = #{createtime}
  172. </if>
  173. <if test="updateman != null and updateman != ''">
  174. and UPDATEMAN LIKE '%${updateman}%'
  175. </if>
  176. <if test="updatetime != null">
  177. and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
  178. </if>
  179. <if test="transportType != null and transportType != ''">
  180. and TRANSPORT_TYPE LIKE '%${transportType}%'
  181. </if>
  182. <if test="purpose != null and purpose != ''">
  183. and PURPOSE LIKE '%${purpose}%'
  184. </if>
  185. <if test="workprocType != null and workprocType != ''">
  186. and WORKPROC_TYPE LIKE '%${workprocType}%'
  187. </if>
  188. <if test="msgFlag != null and msgFlag != ''">
  189. and MSG_FLAG LIKE '%${msgFlag}%'
  190. </if>
  191. <if test="readFlag != null and readFlag != ''">
  192. and READ_FLAG LIKE '%${readFlag}%'
  193. </if>
  194. </where>
  195. </sql>
  196. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  197. delete from EMS_PRODPLAN_ROUND
  198. where ID = #{id,jdbcType=VARCHAR}
  199. </delete>
  200. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  201. delete from EMS_PRODPLAN_ROUND
  202. where 1!=1
  203. <if test="may != null">
  204. or TO_CHAR(MAY,'yyyy-MM-dd') = '#{may}'
  205. </if>
  206. <if test="sqno != null and sqno != ''">
  207. or SQNO = #{sqno}
  208. </if>
  209. <if test="unitid != null and unitid != ''">
  210. or UNITID = #{unitid}
  211. </if>
  212. <if test="describe != null and describe != ''">
  213. or DESCRIBE = #{describe}
  214. </if>
  215. <if test="state != null and state != ''">
  216. or STATE = #{state}
  217. </if>
  218. <if test="grades != null and grades != ''">
  219. or GRADES = #{grades}
  220. </if>
  221. <if test="planWeight != null">
  222. or PLAN_WEIGHT = #{planWeight}
  223. </if>
  224. <if test="specifications != null and specifications != ''">
  225. or SPECIFICATIONS = #{specifications}
  226. </if>
  227. <if test="lengths != null and lengths != ''">
  228. or LENGTHS = #{lengths}
  229. </if>
  230. <if test="chemicalStandard != null and chemicalStandard != ''">
  231. or CHEMICAL_STANDARD = #{chemicalStandard}
  232. </if>
  233. <if test="surfaceStandard != null and surfaceStandard != ''">
  234. or SURFACE_STANDARD = #{surfaceStandard}
  235. </if>
  236. <if test="memo != null and memo != ''">
  237. or MEMO = #{memo}
  238. </if>
  239. <if test="issuedTime != null">
  240. or TO_CHAR(ISSUED_TIME,'yyyy-MM-dd') = '#{issuedTime}'
  241. </if>
  242. <if test="createman != null and createman != ''">
  243. or CREATEMAN = #{createman}
  244. </if>
  245. <if test="createtime != null">
  246. or TO_CHAR(CREATETIME,'yyyy-MM-dd') = '#{createtime}'
  247. </if>
  248. <if test="updateman != null and updateman != ''">
  249. or UPDATEMAN = #{updateman}
  250. </if>
  251. <if test="updatetime != null">
  252. or TO_CHAR(UPDATETIME,'yyyy-MM-dd') = '#{updatetime}'
  253. </if>
  254. <if test="transportType != null and transportType != ''">
  255. or TRANSPORT_TYPE = #{transportType}
  256. </if>
  257. <if test="purpose != null and purpose != ''">
  258. or PURPOSE = #{purpose}
  259. </if>
  260. <if test="workprocType != null and workprocType != ''">
  261. or WORKPROC_TYPE = #{workprocType}
  262. </if>
  263. <if test="msgFlag != null and msgFlag != ''">
  264. or MSG_FLAG = #{msgFlag}
  265. </if>
  266. <if test="readFlag != null and readFlag != ''">
  267. or READ_FLAG = #{readFlag}
  268. </if>
  269. </delete>
  270. <insert id="insert" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
  271. insert into EMS_PRODPLAN_ROUND (ID, MAY, SQNO,
  272. UNITID, DESCRIBE, STATE,
  273. GRADES, PLAN_WEIGHT, SPECIFICATIONS,
  274. LENGTHS, CHEMICAL_STANDARD, SURFACE_STANDARD,
  275. MEMO, ISSUED_TIME, CREATEMAN,
  276. CREATETIME, UPDATEMAN, UPDATETIME,
  277. TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
  278. MSG_FLAG, READ_FLAG,PARENTID)
  279. values (#{id,jdbcType=VARCHAR}, #{may,jdbcType=TIMESTAMP}, #{sqno,jdbcType=DECIMAL},
  280. #{unitid,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR},
  281. #{grades,jdbcType=VARCHAR}, #{planWeight,jdbcType=DECIMAL}, #{specifications,jdbcType=VARCHAR},
  282. #{lengths,jdbcType=VARCHAR}, #{chemicalStandard,jdbcType=VARCHAR}, #{surfaceStandard,jdbcType=VARCHAR},
  283. #{memo,jdbcType=VARCHAR}, #{issuedTime,jdbcType=TIMESTAMP}, #{createman,jdbcType=VARCHAR},
  284. #{createtime,jdbcType=TIMESTAMP}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
  285. #{transportType,jdbcType=VARCHAR}, #{purpose,jdbcType=VARCHAR}, #{workprocType,jdbcType=VARCHAR},
  286. #{msgFlag,jdbcType=VARCHAR}, #{readFlag,jdbcType=VARCHAR},#{parentid,jdbcType=VARCHAR})
  287. </insert>
  288. <insert id="insertSelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
  289. insert into EMS_PRODPLAN_ROUND
  290. <trim prefix="(" suffix=")" suffixOverrides=",">
  291. <if test="id != null">
  292. ID,
  293. </if>
  294. <if test="may != null">
  295. MAY,
  296. </if>
  297. <if test="sqno != null">
  298. SQNO,
  299. </if>
  300. <if test="unitid != null">
  301. UNITID,
  302. </if>
  303. <if test="describe != null">
  304. DESCRIBE,
  305. </if>
  306. <if test="state != null">
  307. STATE,
  308. </if>
  309. <if test="grades != null">
  310. GRADES,
  311. </if>
  312. <if test="planWeight != null">
  313. PLAN_WEIGHT,
  314. </if>
  315. <if test="specifications != null">
  316. SPECIFICATIONS,
  317. </if>
  318. <if test="lengths != null">
  319. LENGTHS,
  320. </if>
  321. <if test="chemicalStandard != null">
  322. CHEMICAL_STANDARD,
  323. </if>
  324. <if test="surfaceStandard != null">
  325. SURFACE_STANDARD,
  326. </if>
  327. <if test="memo != null">
  328. MEMO,
  329. </if>
  330. <if test="issuedTime != null">
  331. ISSUED_TIME,
  332. </if>
  333. <if test="createman != null">
  334. CREATEMAN,
  335. </if>
  336. <if test="createtime != null">
  337. CREATETIME,
  338. </if>
  339. <if test="updateman != null">
  340. UPDATEMAN,
  341. </if>
  342. <if test="updatetime != null">
  343. UPDATETIME,
  344. </if>
  345. <if test="transportType != null">
  346. TRANSPORT_TYPE,
  347. </if>
  348. <if test="purpose != null">
  349. PURPOSE,
  350. </if>
  351. <if test="workprocType != null">
  352. WORKPROC_TYPE,
  353. </if>
  354. <if test="msgFlag != null">
  355. MSG_FLAG,
  356. </if>
  357. <if test="readFlag != null">
  358. READ_FLAG,
  359. </if>
  360. </trim>
  361. <trim prefix="values (" suffix=")" suffixOverrides=",">
  362. <if test="id != null">
  363. #{id,jdbcType=VARCHAR},
  364. </if>
  365. <if test="may != null">
  366. #{may,jdbcType=TIMESTAMP},
  367. </if>
  368. <if test="sqno != null">
  369. #{sqno,jdbcType=DECIMAL},
  370. </if>
  371. <if test="unitid != null">
  372. #{unitid,jdbcType=VARCHAR},
  373. </if>
  374. <if test="describe != null">
  375. #{describe,jdbcType=VARCHAR},
  376. </if>
  377. <if test="state != null">
  378. #{state,jdbcType=VARCHAR},
  379. </if>
  380. <if test="grades != null">
  381. #{grades,jdbcType=VARCHAR},
  382. </if>
  383. <if test="planWeight != null">
  384. #{planWeight,jdbcType=DECIMAL},
  385. </if>
  386. <if test="specifications != null">
  387. #{specifications,jdbcType=VARCHAR},
  388. </if>
  389. <if test="lengths != null">
  390. #{lengths,jdbcType=VARCHAR},
  391. </if>
  392. <if test="chemicalStandard != null">
  393. #{chemicalStandard,jdbcType=VARCHAR},
  394. </if>
  395. <if test="surfaceStandard != null">
  396. #{surfaceStandard,jdbcType=VARCHAR},
  397. </if>
  398. <if test="memo != null">
  399. #{memo,jdbcType=VARCHAR},
  400. </if>
  401. <if test="issuedTime != null">
  402. #{issuedTime,jdbcType=TIMESTAMP},
  403. </if>
  404. <if test="createman != null">
  405. #{createman,jdbcType=VARCHAR},
  406. </if>
  407. <if test="createtime != null">
  408. #{createtime,jdbcType=TIMESTAMP},
  409. </if>
  410. <if test="updateman != null">
  411. #{updateman,jdbcType=VARCHAR},
  412. </if>
  413. <if test="updatetime != null">
  414. #{updatetime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="transportType != null">
  417. #{transportType,jdbcType=VARCHAR},
  418. </if>
  419. <if test="purpose != null">
  420. #{purpose,jdbcType=VARCHAR},
  421. </if>
  422. <if test="workprocType != null">
  423. #{workprocType,jdbcType=VARCHAR},
  424. </if>
  425. <if test="msgFlag != null">
  426. #{msgFlag,jdbcType=VARCHAR},
  427. </if>
  428. <if test="readFlag != null">
  429. #{readFlag,jdbcType=VARCHAR},
  430. </if>
  431. </trim>
  432. </insert>
  433. <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
  434. update EMS_PRODPLAN_ROUND
  435. set MAY = #{may,jdbcType=TIMESTAMP},
  436. SQNO = #{sqno,jdbcType=DECIMAL},
  437. UNITID = #{unitid,jdbcType=VARCHAR},
  438. DESCRIBE = #{describe,jdbcType=VARCHAR},
  439. STATE = #{state,jdbcType=VARCHAR},
  440. GRADES = #{grades,jdbcType=VARCHAR},
  441. PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
  442. SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
  443. LENGTHS = #{lengths,jdbcType=VARCHAR},
  444. CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
  445. SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
  446. MEMO = #{memo,jdbcType=VARCHAR},
  447. ISSUED_TIME = #{issuedTime,jdbcType=TIMESTAMP},
  448. CREATEMAN = #{createman,jdbcType=VARCHAR},
  449. CREATETIME = #{createtime,jdbcType=TIMESTAMP},
  450. UPDATEMAN = #{updateman,jdbcType=VARCHAR},
  451. UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
  452. TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
  453. PURPOSE = #{purpose,jdbcType=VARCHAR},
  454. WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR}
  455. where ID = #{id,jdbcType=VARCHAR}
  456. </update>
  457. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsprodplanround.model.EmsProdplanRound">
  458. update EMS_PRODPLAN_ROUND
  459. <set>
  460. <if test="may != null">
  461. MAY = #{may,jdbcType=TIMESTAMP},
  462. </if>
  463. <if test="sqno != null">
  464. SQNO = #{sqno,jdbcType=DECIMAL},
  465. </if>
  466. <if test="unitid != null">
  467. UNITID = #{unitid,jdbcType=VARCHAR},
  468. </if>
  469. <if test="describe != null">
  470. DESCRIBE = #{describe,jdbcType=VARCHAR},
  471. </if>
  472. <if test="state != null">
  473. STATE = #{state,jdbcType=VARCHAR},
  474. </if>
  475. <if test="grades != null">
  476. GRADES = #{grades,jdbcType=VARCHAR},
  477. </if>
  478. <if test="planWeight != null">
  479. PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
  480. </if>
  481. <if test="specifications != null">
  482. SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
  483. </if>
  484. <if test="lengths != null">
  485. LENGTHS = #{lengths,jdbcType=VARCHAR},
  486. </if>
  487. <if test="chemicalStandard != null">
  488. CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
  489. </if>
  490. <if test="surfaceStandard != null">
  491. SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
  492. </if>
  493. <if test="memo != null">
  494. MEMO = #{memo,jdbcType=VARCHAR},
  495. </if>
  496. <if test="issuedTime != null">
  497. ISSUED_TIME = #{issuedTime,jdbcType=TIMESTAMP},
  498. </if>
  499. <if test="createman != null">
  500. CREATEMAN = #{createman,jdbcType=VARCHAR},
  501. </if>
  502. <if test="createtime != null">
  503. CREATETIME = #{createtime,jdbcType=TIMESTAMP},
  504. </if>
  505. <if test="updateman != null">
  506. UPDATEMAN = #{updateman,jdbcType=VARCHAR},
  507. </if>
  508. <if test="updatetime != null">
  509. UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
  510. </if>
  511. <if test="transportType != null">
  512. TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
  513. </if>
  514. <if test="purpose != null">
  515. PURPOSE = #{purpose,jdbcType=VARCHAR},
  516. </if>
  517. <if test="workprocType != null">
  518. WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
  519. </if>
  520. <if test="msgFlag != null">
  521. MSG_FLAG = #{msgFlag,jdbcType=VARCHAR},
  522. </if>
  523. <if test="readFlag != null">
  524. READ_FLAG = #{readFlag,jdbcType=VARCHAR},
  525. </if>
  526. </set>
  527. where ID = #{id,jdbcType=VARCHAR}
  528. </update>
  529. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  530. <include refid="select"/>
  531. where ID = #{id,jdbcType=VARCHAR}
  532. </select>
  533. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  534. <include refid="select"/>
  535. <include refid="where"/>
  536. </select>
  537. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  538. <include refid="select"/>
  539. <include refid="whereLike"/>
  540. </select>
  541. <insert id="batchInsert" parameterType="java.util.List">
  542. insert into EMS_PRODPLAN_ROUND
  543. (ID,
  544. MAY, SQNO, UNITID,
  545. DESCRIBE, STATE, GRADES,
  546. PLAN_WEIGHT, SPECIFICATIONS, LENGTHS,
  547. CHEMICAL_STANDARD, SURFACE_STANDARD,
  548. MEMO, ISSUED_TIME, CREATEMAN,
  549. CREATETIME, UPDATEMAN, UPDATETIME,
  550. TRANSPORT_TYPE, PURPOSE, WORKPROC_TYPE,
  551. MSG_FLAG, READ_FLAG)
  552. ( <foreach collection="list" item="item" separator="union all">
  553. select
  554. #{item.id,jdbcType=VARCHAR},
  555. #{item.may,jdbcType=TIMESTAMP}, #{item.sqno,jdbcType=DECIMAL}, #{item.unitid,jdbcType=VARCHAR},
  556. #{item.describe,jdbcType=VARCHAR}, #{item.state,jdbcType=VARCHAR}, #{item.grades,jdbcType=VARCHAR},
  557. #{item.planWeight,jdbcType=DECIMAL}, #{item.specifications,jdbcType=VARCHAR}, #{item.lengths,jdbcType=VARCHAR},
  558. #{item.chemicalStandard,jdbcType=VARCHAR}, #{item.surfaceStandard,jdbcType=VARCHAR},
  559. #{item.memo,jdbcType=VARCHAR}, #{item.issuedTime,jdbcType=TIMESTAMP}, #{item.createman,jdbcType=VARCHAR},
  560. #{item.createtime,jdbcType=TIMESTAMP}, #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP},
  561. #{item.transportType,jdbcType=VARCHAR}, #{item.purpose,jdbcType=VARCHAR}, #{item.workprocType,jdbcType=VARCHAR},
  562. #{item.msgFlag,jdbcType=VARCHAR}, #{item.readFlag,jdbcType=VARCHAR} from dual
  563. </foreach> )
  564. </insert>
  565. <update id="batchUpdate" parameterType="java.util.List">
  566. update EMS_PRODPLAN_ROUND
  567. set
  568. ID=
  569. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  570. when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
  571. </foreach>
  572. ,MAY=
  573. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  574. when #{item.id,jdbcType=VARCHAR} then #{item.may,jdbcType=TIMESTAMP}
  575. </foreach>
  576. ,SQNO=
  577. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  578. when #{item.id,jdbcType=VARCHAR} then #{item.sqno,jdbcType=DECIMAL}
  579. </foreach>
  580. ,UNITID=
  581. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  582. when #{item.id,jdbcType=VARCHAR} then #{item.unitid,jdbcType=VARCHAR}
  583. </foreach>
  584. ,DESCRIBE=
  585. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  586. when #{item.id,jdbcType=VARCHAR} then #{item.describe,jdbcType=VARCHAR}
  587. </foreach>
  588. ,STATE=
  589. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  590. when #{item.id,jdbcType=VARCHAR} then #{item.state,jdbcType=VARCHAR}
  591. </foreach>
  592. ,GRADES=
  593. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  594. when #{item.id,jdbcType=VARCHAR} then #{item.grades,jdbcType=VARCHAR}
  595. </foreach>
  596. ,PLAN_WEIGHT=
  597. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  598. when #{item.id,jdbcType=VARCHAR} then #{item.planWeight,jdbcType=DECIMAL}
  599. </foreach>
  600. ,SPECIFICATIONS=
  601. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  602. when #{item.id,jdbcType=VARCHAR} then #{item.specifications,jdbcType=VARCHAR}
  603. </foreach>
  604. ,LENGTHS=
  605. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  606. when #{item.id,jdbcType=VARCHAR} then #{item.lengths,jdbcType=VARCHAR}
  607. </foreach>
  608. ,CHEMICAL_STANDARD=
  609. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  610. when #{item.id,jdbcType=VARCHAR} then #{item.chemicalStandard,jdbcType=VARCHAR}
  611. </foreach>
  612. ,SURFACE_STANDARD=
  613. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  614. when #{item.id,jdbcType=VARCHAR} then #{item.surfaceStandard,jdbcType=VARCHAR}
  615. </foreach>
  616. ,MEMO=
  617. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  618. when #{item.id,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
  619. </foreach>
  620. ,ISSUED_TIME=
  621. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  622. when #{item.id,jdbcType=VARCHAR} then #{item.issuedTime,jdbcType=TIMESTAMP}
  623. </foreach>
  624. ,CREATEMAN=
  625. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  626. when #{item.id,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
  627. </foreach>
  628. ,CREATETIME=
  629. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  630. when #{item.id,jdbcType=VARCHAR} then #{item.createtime,jdbcType=TIMESTAMP}
  631. </foreach>
  632. ,UPDATEMAN=
  633. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  634. when #{item.id,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
  635. </foreach>
  636. ,UPDATETIME=
  637. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  638. when #{item.id,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=TIMESTAMP}
  639. </foreach>
  640. ,TRANSPORT_TYPE=
  641. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  642. when #{item.id,jdbcType=VARCHAR} then #{item.transportType,jdbcType=VARCHAR}
  643. </foreach>
  644. ,PURPOSE=
  645. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  646. when #{item.id,jdbcType=VARCHAR} then #{item.purpose,jdbcType=VARCHAR}
  647. </foreach>
  648. ,WORKPROC_TYPE=
  649. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  650. when #{item.id,jdbcType=VARCHAR} then #{item.workprocType,jdbcType=VARCHAR}
  651. </foreach>
  652. ,MSG_FLAG=
  653. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  654. when #{item.id,jdbcType=VARCHAR} then #{item.msgFlag,jdbcType=VARCHAR}
  655. </foreach>
  656. ,READ_FLAG=
  657. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  658. when #{item.id,jdbcType=VARCHAR} then #{item.readFlag,jdbcType=VARCHAR}
  659. </foreach>
  660. where ID in
  661. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  662. #{item.id,jdbcType=VARCHAR}
  663. </foreach>
  664. </update>
  665. <delete id="batchDelete" parameterType="java.util.List">
  666. delete from EMS_PRODPLAN_ROUND
  667. where ID in
  668. <foreach collection="list" item="id" open="(" close=")" separator=",">
  669. #{id}
  670. </foreach>
  671. </delete>
  672. <!-- 友情提示!!!-->
  673. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  674. <!--获取超出重量-->
  675. <!--获取超出重量-->
  676. <select id="getbeyondWeight" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  677. select nvl(sum(t.plan_weight),0) plan_weight from EMS_PRODPLAN_ROUND t
  678. <where>
  679. <if test="parentid != null and parentid !='' ">
  680. and t.parentid = #{parentid}
  681. </if>
  682. <if test="may != null ">
  683. and trunc(t.may) = to_date(#{may},'yyyy-mm')
  684. </if>
  685. </where>
  686. </select>
  687. <select id="getSumPlanWeight" parameterType="java.util.List" resultMap="BaseResultMap">
  688. select nvl(sum(t.plan_weight),0) plan_weight from EMS_PRODPLAN_ROUND t where t.id in
  689. <foreach collection="list" item="id" open="(" close=")" separator=",">
  690. #{id}
  691. </foreach>
  692. </select>
  693. </mapper>