EmsGmPcJhMapper.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  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.emsgmpcjh.mapper.EmsGmPcJhMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  5. <id column="ID" jdbcType="VARCHAR" property="id" />
  6. <result column="JH_TIME" jdbcType="DATE" property="jhTime" />
  7. <result column="STATE" jdbcType="VARCHAR" property="state" />
  8. <result column="GRADES" jdbcType="VARCHAR" property="grades" />
  9. <result column="SPECIFICATIONS" jdbcType="VARCHAR" property="specifications" />
  10. <result column="LENGTHS" jdbcType="DECIMAL" property="lengths" />
  11. <result column="CHEMICAL_STANDARD" jdbcType="VARCHAR" property="chemicalStandard" />
  12. <result column="SURFACE_STANDARD" jdbcType="VARCHAR" property="surfaceStandard" />
  13. <result column="WORKPROC_TYPE" jdbcType="VARCHAR" property="workprocType" />
  14. <result column="IATERAL_AREA" jdbcType="VARCHAR" property="iateralArea" />
  15. <result column="LENGTH_TIMES_WIDTH" jdbcType="VARCHAR" property="lengthTimesWidth" />
  16. <result column="TRANSPORT_TYPE" jdbcType="VARCHAR" property="transportType" />
  17. <result column="RECEIVE_TIME" jdbcType="TIMESTAMP" property="receiveTime" />
  18. <result column="CREATE_MAN" jdbcType="VARCHAR" property="createMan" />
  19. <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
  20. <result column="GM_REVIEWER" jdbcType="VARCHAR" property="gmReviewer"/>
  21. <result column="GM_REVIEWER_TIME" jdbcType="TIMESTAMP" property="gmReviewerTime"/>
  22. <result column="UPDATE_MAN" jdbcType="VARCHAR" property="updateMan" />
  23. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  24. <result column="MEMO" jdbcType="VARCHAR" property="memo" />
  25. <result column="PURPOSE" jdbcType="VARCHAR" property="purpose" />
  26. <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
  27. <result column="DIMENSION" jdbcType="VARCHAR" property="dimension" />
  28. <result column="KXF_WEIGHT" jdbcType="DECIMAL" property="kxfWeight" />
  29. <result column="YXF_WEIGHT" jdbcType="DECIMAL" property="yxfWeight" />
  30. <result column="DELIVERY_DATE" jdbcType="TIMESTAMP" property="deliveryDate"/>
  31. <result column="PLAN_WEIGHT" jdbcType="DECIMAL" property="planWeight" />
  32. </resultMap>
  33. <sql id="columns">
  34. ID, JH_TIME, STATE, GRADES, SPECIFICATIONS, LENGTHS, CHEMICAL_STANDARD, SURFACE_STANDARD,
  35. WORKPROC_TYPE, IATERAL_AREA, LENGTH_TIMES_WIDTH, TRANSPORT_TYPE, RECEIVE_TIME, CREATE_MAN,
  36. CREATE_TIME, UPDATE_MAN, UPDATE_TIME, MEMO, PURPOSE, UNITID, DIMENSION, KXF_WEIGHT, DELIVERY_DATE,
  37. YXF_WEIGHT, PLAN_WEIGHT,GM_REVIEWER,GM_REVIEWER_TIME
  38. </sql>
  39. <sql id="columns_alias">
  40. t.ID, t.JH_TIME, t.STATE, t.GRADES, t.SPECIFICATIONS, t.LENGTHS, t.CHEMICAL_STANDARD,
  41. t.SURFACE_STANDARD, t.WORKPROC_TYPE, t.IATERAL_AREA, t.LENGTH_TIMES_WIDTH, t.TRANSPORT_TYPE,
  42. t.RECEIVE_TIME, t.CREATE_MAN, t.CREATE_TIME, t.UPDATE_MAN, t.UPDATE_TIME, t.MEMO,
  43. t.PURPOSE, t.UNITID, t.DIMENSION, t.KXF_WEIGHT, t.YXF_WEIGHT, t.PLAN_WEIGHT
  44. </sql>
  45. <sql id="select">
  46. SELECT <include refid="columns"/> FROM EMS_GM_PC_JH
  47. </sql>
  48. <sql id="select_alias">
  49. SELECT <include refid="columns_alias"/> FROM EMS_GM_PC_JH t
  50. </sql>
  51. <sql id="where">
  52. <where>
  53. <if test="state != null and state != ''">
  54. and STATE = #{state}
  55. </if>
  56. <if test="grades != null and grades != ''">
  57. and GRADES in (${grades})
  58. </if>
  59. <if test="specifications != null and specifications != ''">
  60. and SPECIFICATIONS in (${specifications})
  61. </if>
  62. <if test="lengths != null">
  63. and LENGTHS = #{lengths}
  64. </if>
  65. <if test="chemicalStandard != null and chemicalStandard != ''">
  66. and CHEMICAL_STANDARD = #{chemicalStandard}
  67. </if>
  68. <if test="surfaceStandard != null and surfaceStandard != ''">
  69. and SURFACE_STANDARD = #{surfaceStandard}
  70. </if>
  71. <if test="workprocType != null and workprocType != ''">
  72. and WORKPROC_TYPE = #{workprocType}
  73. </if>
  74. <if test="iateralArea != null and iateralArea != ''">
  75. and IATERAL_AREA = #{iateralArea}
  76. </if>
  77. <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
  78. and LENGTH_TIMES_WIDTH in (${lengthTimesWidth})
  79. </if>
  80. <if test="transportType != null and transportType != ''">
  81. and TRANSPORT_TYPE = #{transportType}
  82. </if>
  83. <if test="receiveTime != null">
  84. and TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = #{receiveTime}
  85. </if>
  86. <if test="createMan != null and createMan != ''">
  87. and CREATE_MAN = #{createMan}
  88. </if>
  89. <if test="createTime != null">
  90. and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
  91. </if>
  92. <if test="updateMan != null and updateMan != ''">
  93. and UPDATE_MAN = #{updateMan}
  94. </if>
  95. <if test="updateTime != null">
  96. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  97. </if>
  98. <if test="memo != null and memo != ''">
  99. and MEMO = #{memo}
  100. </if>
  101. <if test="purpose != null and purpose != ''">
  102. and PURPOSE = #{purpose}
  103. </if>
  104. <if test="unitid != null and unitid != ''">
  105. and UNITID = #{unitid}
  106. </if>
  107. <if test="dimension != null and dimension != ''">
  108. and DIMENSION = #{dimension}
  109. </if>
  110. <if test="kxfWeight != null">
  111. and KXF_WEIGHT = #{kxfWeight}
  112. </if>
  113. <if test="yxfWeight != null">
  114. and YXF_WEIGHT = #{yxfWeight}
  115. </if>
  116. <if test="planWeight != null">
  117. and PLAN_WEIGHT = #{planWeight}
  118. </if>
  119. <if test="startTime != null and startTime !='' and endTime != null and endTime != ''">
  120. and JH_TIME BETWEEN TO_DATE(#{startTime},'yyyy-mm-dd') AND TO_DATE(#{endTime},'yyyy-mm-dd')
  121. </if>
  122. AND ID like '%G-%'
  123. order by JH_TIME desc, ID asc
  124. </where>
  125. </sql>
  126. <sql id="whereLike">
  127. <where>
  128. <if test="id != null and id != ''">
  129. and ID LIKE '%${id}%'
  130. </if>
  131. <if test="jhTime != null">
  132. and TO_CHAR(JH_TIME,'yyyy-MM-dd') = #{jhTime}
  133. </if>
  134. <if test="state != null and state != ''">
  135. and STATE LIKE '%${state}%'
  136. </if>
  137. <if test="grades != null and grades != ''">
  138. and GRADES LIKE '%${grades}%'
  139. </if>
  140. <if test="specifications != null and specifications != ''">
  141. and SPECIFICATIONS LIKE '%${specifications}%'
  142. </if>
  143. <if test="lengths != null">
  144. and LENGTHS = #{lengths}
  145. </if>
  146. <if test="chemicalStandard != null and chemicalStandard != ''">
  147. and CHEMICAL_STANDARD LIKE '%${chemicalStandard}%'
  148. </if>
  149. <if test="surfaceStandard != null and surfaceStandard != ''">
  150. and SURFACE_STANDARD LIKE '%${surfaceStandard}%'
  151. </if>
  152. <if test="workprocType != null and workprocType != ''">
  153. and WORKPROC_TYPE LIKE '%${workprocType}%'
  154. </if>
  155. <if test="iateralArea != null and iateralArea != ''">
  156. and IATERAL_AREA LIKE '%${iateralArea}%'
  157. </if>
  158. <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
  159. and LENGTH_TIMES_WIDTH LIKE '%${lengthTimesWidth}%'
  160. </if>
  161. <if test="transportType != null and transportType != ''">
  162. and TRANSPORT_TYPE LIKE '%${transportType}%'
  163. </if>
  164. <if test="receiveTime != null">
  165. and TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = #{receiveTime}
  166. </if>
  167. <if test="createMan != null and createMan != ''">
  168. and CREATE_MAN LIKE '%${createMan}%'
  169. </if>
  170. <if test="createTime != null">
  171. and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
  172. </if>
  173. <if test="updateMan != null and updateMan != ''">
  174. and UPDATE_MAN LIKE '%${updateMan}%'
  175. </if>
  176. <if test="updateTime != null">
  177. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  178. </if>
  179. <if test="memo != null and memo != ''">
  180. and MEMO LIKE '%${memo}%'
  181. </if>
  182. <if test="purpose != null and purpose != ''">
  183. and PURPOSE LIKE '%${purpose}%'
  184. </if>
  185. <if test="unitid != null and unitid != ''">
  186. and UNITID LIKE '%${unitid}%'
  187. </if>
  188. <if test="dimension != null and dimension != ''">
  189. and DIMENSION LIKE '%${dimension}%'
  190. </if>
  191. <if test="kxfWeight != null">
  192. and KXF_WEIGHT = #{kxfWeight}
  193. </if>
  194. <if test="yxfWeight != null">
  195. and YXF_WEIGHT = #{yxfWeight}
  196. </if>
  197. <if test="planWeight != null">
  198. and PLAN_WEIGHT = #{planWeight}
  199. </if>
  200. </where>
  201. </sql>
  202. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  203. delete from EMS_GM_PC_JH
  204. where ID = #{id,jdbcType=VARCHAR}
  205. </delete>
  206. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  207. delete from EMS_GM_PC_JH
  208. where 1!=1
  209. <if test="jhTime != null">
  210. or TO_CHAR(JH_TIME,'yyyy-MM-dd') = '#{jhTime}'
  211. </if>
  212. <if test="state != null and state != ''">
  213. or STATE = #{state}
  214. </if>
  215. <if test="grades != null and grades != ''">
  216. or GRADES = #{grades}
  217. </if>
  218. <if test="specifications != null and specifications != ''">
  219. or SPECIFICATIONS = #{specifications}
  220. </if>
  221. <if test="lengths != null">
  222. or LENGTHS = #{lengths}
  223. </if>
  224. <if test="chemicalStandard != null and chemicalStandard != ''">
  225. or CHEMICAL_STANDARD = #{chemicalStandard}
  226. </if>
  227. <if test="surfaceStandard != null and surfaceStandard != ''">
  228. or SURFACE_STANDARD = #{surfaceStandard}
  229. </if>
  230. <if test="workprocType != null and workprocType != ''">
  231. or WORKPROC_TYPE = #{workprocType}
  232. </if>
  233. <if test="iateralArea != null and iateralArea != ''">
  234. or IATERAL_AREA = #{iateralArea}
  235. </if>
  236. <if test="lengthTimesWidth != null and lengthTimesWidth != ''">
  237. or LENGTH_TIMES_WIDTH = #{lengthTimesWidth}
  238. </if>
  239. <if test="transportType != null and transportType != ''">
  240. or TRANSPORT_TYPE = #{transportType}
  241. </if>
  242. <if test="receiveTime != null">
  243. or TO_CHAR(RECEIVE_TIME,'yyyy-MM-dd') = '#{receiveTime}'
  244. </if>
  245. <if test="createMan != null and createMan != ''">
  246. or CREATE_MAN = #{createMan}
  247. </if>
  248. <if test="createTime != null">
  249. or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
  250. </if>
  251. <if test="updateMan != null and updateMan != ''">
  252. or UPDATE_MAN = #{updateMan}
  253. </if>
  254. <if test="updateTime != null">
  255. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  256. </if>
  257. <if test="memo != null and memo != ''">
  258. or MEMO = #{memo}
  259. </if>
  260. <if test="purpose != null and purpose != ''">
  261. or PURPOSE = #{purpose}
  262. </if>
  263. <if test="unitid != null and unitid != ''">
  264. or UNITID = #{unitid}
  265. </if>
  266. <if test="dimension != null and dimension != ''">
  267. or DIMENSION = #{dimension}
  268. </if>
  269. <if test="kxfWeight != null">
  270. or KXF_WEIGHT = #{kxfWeight}
  271. </if>
  272. <if test="yxfWeight != null">
  273. or YXF_WEIGHT = #{yxfWeight}
  274. </if>
  275. <if test="planWeight != null">
  276. or PLAN_WEIGHT = #{planWeight}
  277. </if>
  278. </delete>
  279. <insert id="insert" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  280. insert into EMS_GM_PC_JH (ID, JH_TIME, STATE,
  281. GRADES, SPECIFICATIONS, LENGTHS,
  282. CHEMICAL_STANDARD, SURFACE_STANDARD, WORKPROC_TYPE,
  283. IATERAL_AREA, LENGTH_TIMES_WIDTH, TRANSPORT_TYPE,
  284. RECEIVE_TIME, CREATE_MAN, CREATE_TIME,
  285. UPDATE_MAN, UPDATE_TIME, MEMO,
  286. PURPOSE, UNITID, DIMENSION,
  287. KXF_WEIGHT, YXF_WEIGHT, PLAN_WEIGHT,DELIVERY_DATE,GM_REVIEWER,GM_REVIEWER_TIME
  288. )
  289. values (#{id,jdbcType=VARCHAR}, #{jhTime,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR},
  290. #{grades,jdbcType=VARCHAR}, #{specifications,jdbcType=VARCHAR}, #{lengths,jdbcType=DECIMAL},
  291. #{chemicalStandard,jdbcType=VARCHAR}, #{surfaceStandard,jdbcType=VARCHAR}, #{workprocType,jdbcType=VARCHAR},
  292. #{iateralArea,jdbcType=VARCHAR}, #{lengthTimesWidth,jdbcType=VARCHAR}, #{transportType,jdbcType=VARCHAR},
  293. #{receiveTime,jdbcType=TIMESTAMP}, #{createMan,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  294. #{updateMan,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{memo,jdbcType=VARCHAR},
  295. #{purpose,jdbcType=VARCHAR}, #{unitid,jdbcType=VARCHAR}, #{dimension,jdbcType=VARCHAR},
  296. #{kxfWeight,jdbcType=DECIMAL}, #{yxfWeight,jdbcType=DECIMAL}, #{planWeight,jdbcType=DECIMAL},
  297. #{deliveryDate,jdbcType=TIMESTAMP},#{gmReviewer,jdbcType=VARCHAR},#{gmReviewerTime,jdbcType=TIMESTAMP}
  298. )
  299. </insert>
  300. <insert id="insertSelective" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  301. insert into EMS_GM_PC_JH
  302. <trim prefix="(" suffix=")" suffixOverrides=",">
  303. <if test="id != null">
  304. ID,
  305. </if>
  306. <if test="jhTime != null">
  307. JH_TIME,
  308. </if>
  309. <if test="state != null">
  310. STATE,
  311. </if>
  312. <if test="grades != null">
  313. GRADES,
  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="workprocType != null">
  328. WORKPROC_TYPE,
  329. </if>
  330. <if test="iateralArea != null">
  331. IATERAL_AREA,
  332. </if>
  333. <if test="lengthTimesWidth != null">
  334. LENGTH_TIMES_WIDTH,
  335. </if>
  336. <if test="transportType != null">
  337. TRANSPORT_TYPE,
  338. </if>
  339. <if test="receiveTime != null">
  340. RECEIVE_TIME,
  341. </if>
  342. <if test="createMan != null">
  343. CREATE_MAN,
  344. </if>
  345. <if test="createTime != null">
  346. CREATE_TIME,
  347. </if>
  348. <if test="updateMan != null">
  349. UPDATE_MAN,
  350. </if>
  351. <if test="updateTime != null">
  352. UPDATE_TIME,
  353. </if>
  354. <if test="memo != null">
  355. MEMO,
  356. </if>
  357. <if test="purpose != null">
  358. PURPOSE,
  359. </if>
  360. <if test="unitid != null">
  361. UNITID,
  362. </if>
  363. <if test="dimension != null">
  364. DIMENSION,
  365. </if>
  366. <if test="kxfWeight != null">
  367. KXF_WEIGHT,
  368. </if>
  369. <if test="yxfWeight != null">
  370. YXF_WEIGHT,
  371. </if>
  372. <if test="planWeight != null">
  373. PLAN_WEIGHT,
  374. </if>
  375. </trim>
  376. <trim prefix="values (" suffix=")" suffixOverrides=",">
  377. <if test="id != null">
  378. #{id,jdbcType=VARCHAR},
  379. </if>
  380. <if test="jhTime != null">
  381. #{jhTime,jdbcType=TIMESTAMP},
  382. </if>
  383. <if test="state != null">
  384. #{state,jdbcType=VARCHAR},
  385. </if>
  386. <if test="grades != null">
  387. #{grades,jdbcType=VARCHAR},
  388. </if>
  389. <if test="specifications != null">
  390. #{specifications,jdbcType=VARCHAR},
  391. </if>
  392. <if test="lengths != null">
  393. #{lengths,jdbcType=DECIMAL},
  394. </if>
  395. <if test="chemicalStandard != null">
  396. #{chemicalStandard,jdbcType=VARCHAR},
  397. </if>
  398. <if test="surfaceStandard != null">
  399. #{surfaceStandard,jdbcType=VARCHAR},
  400. </if>
  401. <if test="workprocType != null">
  402. #{workprocType,jdbcType=VARCHAR},
  403. </if>
  404. <if test="iateralArea != null">
  405. #{iateralArea,jdbcType=VARCHAR},
  406. </if>
  407. <if test="lengthTimesWidth != null">
  408. #{lengthTimesWidth,jdbcType=VARCHAR},
  409. </if>
  410. <if test="transportType != null">
  411. #{transportType,jdbcType=VARCHAR},
  412. </if>
  413. <if test="receiveTime != null">
  414. #{receiveTime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="createMan != null">
  417. #{createMan,jdbcType=VARCHAR},
  418. </if>
  419. <if test="createTime != null">
  420. #{createTime,jdbcType=TIMESTAMP},
  421. </if>
  422. <if test="updateMan != null">
  423. #{updateMan,jdbcType=VARCHAR},
  424. </if>
  425. <if test="updateTime != null">
  426. #{updateTime,jdbcType=TIMESTAMP},
  427. </if>
  428. <if test="memo != null">
  429. #{memo,jdbcType=VARCHAR},
  430. </if>
  431. <if test="purpose != null">
  432. #{purpose,jdbcType=VARCHAR},
  433. </if>
  434. <if test="unitid != null">
  435. #{unitid,jdbcType=VARCHAR},
  436. </if>
  437. <if test="dimension != null">
  438. #{dimension,jdbcType=VARCHAR},
  439. </if>
  440. <if test="kxfWeight != null">
  441. #{kxfWeight,jdbcType=DECIMAL},
  442. </if>
  443. <if test="yxfWeight != null">
  444. #{yxfWeight,jdbcType=DECIMAL},
  445. </if>
  446. <if test="planWeight != null">
  447. #{planWeight,jdbcType=DECIMAL},
  448. </if>
  449. </trim>
  450. </insert>
  451. <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  452. update EMS_GM_PC_JH
  453. set JH_TIME = #{jhTime,jdbcType=TIMESTAMP},
  454. STATE = #{state,jdbcType=VARCHAR},
  455. GRADES = #{grades,jdbcType=VARCHAR},
  456. SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
  457. LENGTHS = #{lengths,jdbcType=DECIMAL},
  458. CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
  459. SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
  460. WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
  461. IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
  462. LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
  463. TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
  464. RECEIVE_TIME = #{receiveTime,jdbcType=TIMESTAMP},
  465. CREATE_MAN = #{createMan,jdbcType=VARCHAR},
  466. CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
  467. UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
  468. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  469. MEMO = #{memo,jdbcType=VARCHAR},
  470. PURPOSE = #{purpose,jdbcType=VARCHAR},
  471. UNITID = #{unitid,jdbcType=VARCHAR},
  472. DIMENSION = #{dimension,jdbcType=VARCHAR},
  473. KXF_WEIGHT = #{kxfWeight,jdbcType=DECIMAL},
  474. YXF_WEIGHT = #{yxfWeight,jdbcType=DECIMAL},
  475. PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
  476. DELIVERY_DATE = #{deliveryDate,jdbcType=TIMESTAMP},
  477. GM_REVIEWER = #{gmReviewer,jdbcType=TIMESTAMP},
  478. GM_REVIEWER_TIME = #{gmReviewerTime,jdbcType=TIMESTAMP}
  479. where ID = #{id,jdbcType=VARCHAR}
  480. </update>
  481. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  482. update EMS_GM_PC_JH
  483. <set>
  484. <if test="jhTime != null">
  485. JH_TIME = #{jhTime,jdbcType=TIMESTAMP},
  486. </if>
  487. <if test="state != null">
  488. STATE = #{state,jdbcType=VARCHAR},
  489. </if>
  490. <if test="grades != null">
  491. GRADES = #{grades,jdbcType=VARCHAR},
  492. </if>
  493. <if test="specifications != null">
  494. SPECIFICATIONS = #{specifications,jdbcType=VARCHAR},
  495. </if>
  496. <if test="lengths != null">
  497. LENGTHS = #{lengths,jdbcType=DECIMAL},
  498. </if>
  499. <if test="chemicalStandard != null">
  500. CHEMICAL_STANDARD = #{chemicalStandard,jdbcType=VARCHAR},
  501. </if>
  502. <if test="surfaceStandard != null">
  503. SURFACE_STANDARD = #{surfaceStandard,jdbcType=VARCHAR},
  504. </if>
  505. <if test="workprocType != null">
  506. WORKPROC_TYPE = #{workprocType,jdbcType=VARCHAR},
  507. </if>
  508. <if test="iateralArea != null">
  509. IATERAL_AREA = #{iateralArea,jdbcType=VARCHAR},
  510. </if>
  511. <if test="lengthTimesWidth != null">
  512. LENGTH_TIMES_WIDTH = #{lengthTimesWidth,jdbcType=VARCHAR},
  513. </if>
  514. <if test="transportType != null">
  515. TRANSPORT_TYPE = #{transportType,jdbcType=VARCHAR},
  516. </if>
  517. <if test="receiveTime != null">
  518. RECEIVE_TIME = #{receiveTime,jdbcType=TIMESTAMP},
  519. </if>
  520. <if test="createMan != null">
  521. CREATE_MAN = #{createMan,jdbcType=VARCHAR},
  522. </if>
  523. <if test="createTime != null">
  524. CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
  525. </if>
  526. <if test="updateMan != null">
  527. UPDATE_MAN = #{updateMan,jdbcType=VARCHAR},
  528. </if>
  529. <if test="updateTime != null">
  530. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  531. </if>
  532. <if test="memo != null">
  533. MEMO = #{memo,jdbcType=VARCHAR},
  534. </if>
  535. <if test="purpose != null">
  536. PURPOSE = #{purpose,jdbcType=VARCHAR},
  537. </if>
  538. <if test="unitid != null">
  539. UNITID = #{unitid,jdbcType=VARCHAR},
  540. </if>
  541. <if test="dimension != null">
  542. DIMENSION = #{dimension,jdbcType=VARCHAR},
  543. </if>
  544. <if test="kxfWeight != null">
  545. KXF_WEIGHT = #{kxfWeight,jdbcType=DECIMAL},
  546. </if>
  547. <if test="yxfWeight != null">
  548. YXF_WEIGHT = #{yxfWeight,jdbcType=DECIMAL},
  549. </if>
  550. <if test="planWeight != null">
  551. PLAN_WEIGHT = #{planWeight,jdbcType=DECIMAL},
  552. </if>
  553. </set>
  554. where ID = #{id,jdbcType=VARCHAR}
  555. </update>
  556. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  557. <include refid="select"/>
  558. where ID = #{id,jdbcType=VARCHAR}
  559. </select>
  560. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  561. <include refid="select"/>
  562. <include refid="where"/>
  563. </select>
  564. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  565. <include refid="select"/>
  566. <include refid="whereLike"/>
  567. </select>
  568. <insert id="batchInsert" parameterType="java.util.List">
  569. insert into EMS_GM_PC_JH
  570. (ID,
  571. JH_TIME, STATE, GRADES,
  572. SPECIFICATIONS, LENGTHS, CHEMICAL_STANDARD,
  573. SURFACE_STANDARD, WORKPROC_TYPE,
  574. IATERAL_AREA, LENGTH_TIMES_WIDTH,
  575. TRANSPORT_TYPE, RECEIVE_TIME,
  576. CREATE_MAN, CREATE_TIME, UPDATE_MAN,
  577. UPDATE_TIME, MEMO, PURPOSE,
  578. UNITID, DIMENSION, KXF_WEIGHT,
  579. YXF_WEIGHT, PLAN_WEIGHT,DELIVERY_DATE)
  580. ( <foreach collection="list" item="item" separator="union all">
  581. select
  582. #{item.id,jdbcType=VARCHAR},
  583. #{item.jhTime,jdbcType=TIMESTAMP}, #{item.state,jdbcType=VARCHAR}, #{item.grades,jdbcType=VARCHAR},
  584. #{item.specifications,jdbcType=VARCHAR}, #{item.lengths,jdbcType=DECIMAL}, #{item.chemicalStandard,jdbcType=VARCHAR},
  585. #{item.surfaceStandard,jdbcType=VARCHAR}, #{item.workprocType,jdbcType=VARCHAR},
  586. #{item.iateralArea,jdbcType=VARCHAR}, #{item.lengthTimesWidth,jdbcType=VARCHAR},
  587. #{item.transportType,jdbcType=VARCHAR}, #{item.receiveTime,jdbcType=TIMESTAMP},
  588. #{item.createMan,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateMan,jdbcType=VARCHAR},
  589. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.memo,jdbcType=VARCHAR}, #{item.purpose,jdbcType=VARCHAR},
  590. #{item.unitid,jdbcType=VARCHAR}, #{item.dimension,jdbcType=VARCHAR}, #{item.kxfWeight,jdbcType=DECIMAL},
  591. #{item.yxfWeight,jdbcType=DECIMAL}, #{item.planWeight,jdbcType=DECIMAL}, #{item.deliveryDate,jdbcType=DECIMAL} from dual
  592. </foreach> )
  593. </insert>
  594. <update id="batchUpdate" parameterType="java.util.List">
  595. update EMS_GM_PC_JH
  596. set
  597. ID=
  598. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  599. when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
  600. </foreach>
  601. ,JH_TIME=
  602. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  603. when #{item.id,jdbcType=VARCHAR} then #{item.jhTime,jdbcType=TIMESTAMP}
  604. </foreach>
  605. ,STATE=
  606. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  607. when #{item.id,jdbcType=VARCHAR} then #{item.state,jdbcType=VARCHAR}
  608. </foreach>
  609. ,GRADES=
  610. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  611. when #{item.id,jdbcType=VARCHAR} then #{item.grades,jdbcType=VARCHAR}
  612. </foreach>
  613. ,SPECIFICATIONS=
  614. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  615. when #{item.id,jdbcType=VARCHAR} then #{item.specifications,jdbcType=VARCHAR}
  616. </foreach>
  617. ,LENGTHS=
  618. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  619. when #{item.id,jdbcType=VARCHAR} then #{item.lengths,jdbcType=DECIMAL}
  620. </foreach>
  621. ,CHEMICAL_STANDARD=
  622. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  623. when #{item.id,jdbcType=VARCHAR} then #{item.chemicalStandard,jdbcType=VARCHAR}
  624. </foreach>
  625. ,SURFACE_STANDARD=
  626. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  627. when #{item.id,jdbcType=VARCHAR} then #{item.surfaceStandard,jdbcType=VARCHAR}
  628. </foreach>
  629. ,WORKPROC_TYPE=
  630. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  631. when #{item.id,jdbcType=VARCHAR} then #{item.workprocType,jdbcType=VARCHAR}
  632. </foreach>
  633. ,IATERAL_AREA=
  634. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  635. when #{item.id,jdbcType=VARCHAR} then #{item.iateralArea,jdbcType=VARCHAR}
  636. </foreach>
  637. ,LENGTH_TIMES_WIDTH=
  638. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  639. when #{item.id,jdbcType=VARCHAR} then #{item.lengthTimesWidth,jdbcType=VARCHAR}
  640. </foreach>
  641. ,TRANSPORT_TYPE=
  642. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  643. when #{item.id,jdbcType=VARCHAR} then #{item.transportType,jdbcType=VARCHAR}
  644. </foreach>
  645. ,RECEIVE_TIME=
  646. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  647. when #{item.id,jdbcType=VARCHAR} then #{item.receiveTime,jdbcType=TIMESTAMP}
  648. </foreach>
  649. ,CREATE_MAN=
  650. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  651. when #{item.id,jdbcType=VARCHAR} then #{item.createMan,jdbcType=VARCHAR}
  652. </foreach>
  653. ,CREATE_TIME=
  654. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  655. when #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
  656. </foreach>
  657. ,UPDATE_MAN=
  658. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  659. when #{item.id,jdbcType=VARCHAR} then #{item.updateMan,jdbcType=VARCHAR}
  660. </foreach>
  661. ,UPDATE_TIME=
  662. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  663. when #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
  664. </foreach>
  665. ,MEMO=
  666. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  667. when #{item.id,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
  668. </foreach>
  669. ,PURPOSE=
  670. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  671. when #{item.id,jdbcType=VARCHAR} then #{item.purpose,jdbcType=VARCHAR}
  672. </foreach>
  673. ,UNITID=
  674. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  675. when #{item.id,jdbcType=VARCHAR} then #{item.unitid,jdbcType=VARCHAR}
  676. </foreach>
  677. ,DIMENSION=
  678. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  679. when #{item.id,jdbcType=VARCHAR} then #{item.dimension,jdbcType=VARCHAR}
  680. </foreach>
  681. ,KXF_WEIGHT=
  682. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  683. when #{item.id,jdbcType=VARCHAR} then #{item.kxfWeight,jdbcType=DECIMAL}
  684. </foreach>
  685. ,YXF_WEIGHT=
  686. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  687. when #{item.id,jdbcType=VARCHAR} then #{item.yxfWeight,jdbcType=DECIMAL}
  688. </foreach>
  689. ,PLAN_WEIGHT=
  690. <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
  691. when #{item.id,jdbcType=VARCHAR} then #{item.planWeight,jdbcType=DECIMAL}
  692. </foreach>
  693. where ID in
  694. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  695. #{item.id,jdbcType=VARCHAR}
  696. </foreach>
  697. </update>
  698. <delete id="batchDelete" parameterType="java.util.List">
  699. delete from EMS_GM_PC_JH
  700. where ID in
  701. <foreach collection="list" item="id" open="(" close=")" separator=",">
  702. #{id}
  703. </foreach>
  704. </delete>
  705. <!-- 友情提示!!!-->
  706. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  707. <select id="getMaxid" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh" resultType="java.lang.String">
  708. select #{type} || #{startTime} || '-' ||
  709. to_char(nvl(max(substr(ID, 15, 2) + 1), 1), 'fm00') as ID
  710. from ems_gm_pc_jh
  711. where WORKPROC_TYPE = #{workprocType}
  712. and ID like '%' || #{type} || '%'
  713. and JH_TIME = #{jhTime}
  714. </select>
  715. <update id="updateState" parameterType="com.steerinfo.ems.emsgmpcjh.model.EmsGmPcJh">
  716. update ems_gm_pc_jh
  717. <set>
  718. <if test="state != null and state != ''">
  719. STATE = #{state},
  720. </if>
  721. <!-- <if test="grades != null and grades!= ''">-->
  722. <!-- GRADES = #{grades},-->
  723. <!-- </if>-->
  724. <!-- <if test="specifications != null and specifications != '' ">-->
  725. <!-- SPECIFICATIONS = #{specifications},-->
  726. <!-- </if>-->
  727. <!-- <if test="lengths != null and lengths != '' ">-->
  728. <!-- LENGTHS = #{lengths},-->
  729. <!-- </if>-->
  730. <if test="gmReviewer != null and gmReviewer != '' ">
  731. GM_REVIEWER = #{gmReviewer},
  732. </if>
  733. <if test="gmReviewerTime != null ">
  734. GM_REVIEWER_TIME = #{gmReviewerTime}
  735. </if>
  736. </set>
  737. <where>
  738. <if test="workprocType != null and workprocType!= ''">
  739. and WORKPROC_TYPE = #{workprocType}
  740. </if>
  741. <if test="id != null and id !=''">
  742. and ID = #{id}
  743. </if>
  744. </where>
  745. </update>
  746. <!--轮次计划页面查询-->
  747. <select id="getGmPcJhData" parameterType="java.util.HashMap" resultType="Map">
  748. select ID as id , to_char(JH_TIME,'yyyy-mm-dd') as jhTime, STATE as state, GRADES as grades, SPECIFICATIONS as specifications, LENGTHS as lengths, CHEMICAL_STANDARD as chemicalstandard, SURFACE_STANDARD as surfacestandard,
  749. WORKPROC_TYPE as workprocType, IATERAL_AREA as iateralArea, LENGTH_TIMES_WIDTH as lengthtimeswidth, TRANSPORT_TYPE as transportType , RECEIVE_TIME as receivetime, CREATE_MAN as createman,
  750. CREATE_TIME as createtime, UPDATE_MAN as updateman, UPDATE_TIME as updatime , MEMO as memo , PURPOSE as purpose, UNITID as unitid, DIMENSION as dimension, PLAN_WEIGHT as planweight,KXF_WEIGHT,YXF_WEIGHT,TO_CHAR(DELIVERY_DATE,'yyyy-mm-dd') as deliveryDate
  751. from (select *
  752. from ems_gm_pc_jh t
  753. <where>
  754. <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
  755. and JH_TIME between to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
  756. </if>
  757. </where>
  758. union
  759. select *
  760. from ems_gm_pc_jh
  761. <where>
  762. <if test="startTime != null and startTime != '' and endTime !=null and endTime!='' ">
  763. and JH_TIME between to_date(substr(#{startTime}, 0, 7) || '-01','yyyy-mm-dd') and to_date(substr(#{endTime}, 0, 7) || '-01','yyyy-mm-dd')
  764. </if>
  765. and ID like 'N%'
  766. </where>) t1
  767. <where>
  768. <if test="workprocType != null and workprocType!= ''">
  769. and WORKPROC_TYPE in (${workprocType})
  770. </if>
  771. <if test="id != null and id != ''">
  772. and id = #{id}
  773. </if>
  774. and state in ('2','3')
  775. </where>
  776. order by t1.id desc
  777. </select>
  778. <!--国贸计划查询-->
  779. <select id="getXsDdDate" parameterType="java.util.HashMap" resultType="Map">
  780. select t.id,
  781. to_char(t.jh_time,'yyyy-mm-dd') jh_time,
  782. t.WORKPROC_TYPE,
  783. to_char(t.DELIVERY_DATE,'yyyy-mm-dd') DELIVERY_DATE,
  784. t.state,
  785. t.grades,
  786. t.specifications,
  787. t.lengths,
  788. t2.plan_weight,
  789. t2.plan_weight_old,
  790. t2.submitter,
  791. t2.submit_time,
  792. t2.reviewer,
  793. t2.reviewer_time,
  794. t2.AUDIT_STATUS,
  795. t2.GM_REVIEWER,
  796. t2.GM_REVIEWER_TIME,
  797. t2.PLAN_WEIGHT - t2.PLAN_WEIGHT_OLD TZL
  798. from ems_gm_pc_jh t
  799. left join ems_prodplan_weight_adjustment t2
  800. on t.id = t2.id
  801. <where>
  802. <if test="id != null and id != '' ">
  803. and t.id = #{id}
  804. </if>
  805. <if test="startTime != null and startTime != '' and endTime != null and endTime != '' ">
  806. and t.jh_time between to_date(#{startTime}, 'yyyy-mm-dd') and to_date(#{endTime}, 'yyyy-mm-dd')
  807. </if>
  808. <if test="auditStatus != null and auditStatus != '' ">
  809. and t2.AUDIT_STATUS in (${auditStatus})
  810. </if>
  811. <if test="workprocType != null and workprocType!= '' ">
  812. and WORKPROC_TYPE in (${workprocType})
  813. </if>
  814. and t.id like '%G-%'
  815. and t.state = '3'
  816. </where>
  817. order by t.jh_time desc,t.id asc
  818. </select>
  819. <!--审核页面查询-->
  820. <select id="getShData" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  821. select t.id,
  822. t.jh_time,
  823. t.state,
  824. t.workproc_type,
  825. t.Delivery_Date,
  826. t.grades,
  827. t.specifications,
  828. t.lengths,
  829. t.length_times_width,
  830. t.plan_weight,
  831. t.transport_type,
  832. t.purpose,
  833. t.create_man,
  834. t.create_time,
  835. t.GM_REVIEWER,
  836. t.GM_REVIEWER_TIME
  837. from ems_gm_pc_jh t
  838. <where>
  839. <if test="startTime != null and startTime != '' and endTime != null and endTime != '' ">
  840. and t.jh_time between to_date(#{startTime},'yyyy-mm-dd') and to_date(#{endTime},'yyyy-mm-dd')
  841. </if>
  842. <if test="workprocType != null and workprocType != ''">
  843. and t.workproc_type in (${workprocType})
  844. </if>
  845. <if test="id != null and id != '' ">
  846. and t.id = #{id}
  847. </if>
  848. <if test="state != null and state != ''">
  849. and t.state in (${state})
  850. </if>
  851. and t.id like '%G-%'
  852. </where>
  853. order by t.jh_time desc,t.id asc
  854. </select>
  855. </mapper>