OyeOutboundResultMapper.xml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  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.dil.mapper.OyeOutboundResultMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OyeOutboundResult">
  5. <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
  6. <result column="INVENTORY_ID" jdbcType="DECIMAL" property="inventoryId" />
  7. <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
  8. <result column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
  9. <result column="CAPACITY_NUMBHER" jdbcType="VARCHAR" property="capacityNumbher" />
  10. <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
  11. <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
  12. <result column="METER" jdbcType="DECIMAL" property="meter" />
  13. <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
  14. <result column="THEORY_WEIGHT" jdbcType="DECIMAL" property="theoryWeight" />
  15. <result column="SINGLE_WEIGHT" jdbcType="DECIMAL" property="singleWeight" />
  16. <result column="SALE_AREA" jdbcType="VARCHAR" property="saleArea" />
  17. <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
  18. <result column="INBOUND_WAREHOUSE" jdbcType="VARCHAR" property="inboundWarehouse" />
  19. <result column="INBOUND_AREA" jdbcType="VARCHAR" property="inboundArea" />
  20. <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
  21. <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
  22. <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
  23. <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
  24. <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
  25. <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
  26. <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
  27. <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
  28. <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
  29. <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
  30. <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
  31. <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
  32. <result column="SALE_MATERIAL_ID" jdbcType="DECIMAL" property="saleMaterialId" />
  33. </resultMap>
  34. <sql id="columns">
  35. RESULT_ID, INVENTORY_ID, ORDER_ID, CONSIGNEE_ID, CAPACITY_NUMBHER, CAPACITY_ID, MATERIAL_ID,
  36. METER, MATERIAL_NUMBER, THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA, NET_WEIGHT, INBOUND_WAREHOUSE,
  37. INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, DELETED,
  38. ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6,
  39. ALTERNATE_FIELDS7, ALTERNATE_FIELDS8, SALE_MATERIAL_ID
  40. </sql>
  41. <sql id="columns_alias">
  42. t.RESULT_ID, t.INVENTORY_ID, t.ORDER_ID, t.CONSIGNEE_ID, t.CAPACITY_NUMBHER, t.CAPACITY_ID,
  43. t.MATERIAL_ID, t.METER, t.MATERIAL_NUMBER, t.THEORY_WEIGHT, t.SINGLE_WEIGHT, t.SALE_AREA,
  44. t.NET_WEIGHT, t.INBOUND_WAREHOUSE, t.INBOUND_AREA, t.INSERT_TIME, t.INSERT_USERNAME,
  45. t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.ALTERNATE_FIELDS2, t.ALTERNATE_FIELDS3,
  46. t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, t.ALTERNATE_FIELDS7,
  47. t.ALTERNATE_FIELDS8, t.SALE_MATERIAL_ID
  48. </sql>
  49. <sql id="select">
  50. SELECT <include refid="columns"/> FROM OYE_OUTBOUND_RESULT
  51. </sql>
  52. <sql id="select_alias">
  53. SELECT <include refid="columns_alias"/> FROM OYE_OUTBOUND_RESULT t
  54. </sql>
  55. <sql id="where">
  56. <where>
  57. <if test="resultId != null">
  58. and RESULT_ID = #{resultId}
  59. </if>
  60. <if test="inventoryId != null">
  61. and INVENTORY_ID = #{inventoryId}
  62. </if>
  63. <if test="orderId != null">
  64. and ORDER_ID = #{orderId}
  65. </if>
  66. <if test="consigneeId != null">
  67. and CONSIGNEE_ID = #{consigneeId}
  68. </if>
  69. <if test="capacityNumbher != null and capacityNumbher != ''">
  70. and CAPACITY_NUMBHER = #{capacityNumbher}
  71. </if>
  72. <if test="capacityId != null">
  73. and CAPACITY_ID = #{capacityId}
  74. </if>
  75. <if test="materialId != null">
  76. and MATERIAL_ID = #{materialId}
  77. </if>
  78. <if test="meter != null">
  79. and METER = #{meter}
  80. </if>
  81. <if test="materialNumber != null">
  82. and MATERIAL_NUMBER = #{materialNumber}
  83. </if>
  84. <if test="theoryWeight != null">
  85. and THEORY_WEIGHT = #{theoryWeight}
  86. </if>
  87. <if test="singleWeight != null">
  88. and SINGLE_WEIGHT = #{singleWeight}
  89. </if>
  90. <if test="saleArea != null and saleArea != ''">
  91. and SALE_AREA = #{saleArea}
  92. </if>
  93. <if test="netWeight != null">
  94. and NET_WEIGHT = #{netWeight}
  95. </if>
  96. <if test="inboundWarehouse != null and inboundWarehouse != ''">
  97. and INBOUND_WAREHOUSE = #{inboundWarehouse}
  98. </if>
  99. <if test="inboundArea != null and inboundArea != ''">
  100. and INBOUND_AREA = #{inboundArea}
  101. </if>
  102. <if test="insertTime != null">
  103. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  104. </if>
  105. <if test="insertUsername != null and insertUsername != ''">
  106. and INSERT_USERNAME = #{insertUsername}
  107. </if>
  108. <if test="updateTime != null">
  109. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  110. </if>
  111. <if test="updateUsername != null and updateUsername != ''">
  112. and UPDATE_USERNAME = #{updateUsername}
  113. </if>
  114. <if test="deleted != null and deleted != ''">
  115. and DELETED = #{deleted}
  116. </if>
  117. <if test="alternateFields2 != null and alternateFields2 != ''">
  118. and ALTERNATE_FIELDS2 = #{alternateFields2}
  119. </if>
  120. <if test="alternateFields3 != null and alternateFields3 != ''">
  121. and ALTERNATE_FIELDS3 = #{alternateFields3}
  122. </if>
  123. <if test="alternateFields4 != null and alternateFields4 != ''">
  124. and ALTERNATE_FIELDS4 = #{alternateFields4}
  125. </if>
  126. <if test="alternateFields5 != null and alternateFields5 != ''">
  127. and ALTERNATE_FIELDS5 = #{alternateFields5}
  128. </if>
  129. <if test="alternateFields6 != null and alternateFields6 != ''">
  130. and ALTERNATE_FIELDS6 = #{alternateFields6}
  131. </if>
  132. <if test="alternateFields7 != null and alternateFields7 != ''">
  133. and ALTERNATE_FIELDS7 = #{alternateFields7}
  134. </if>
  135. <if test="alternateFields8 != null and alternateFields8 != ''">
  136. and ALTERNATE_FIELDS8 = #{alternateFields8}
  137. </if>
  138. <if test="saleMaterialId != null">
  139. and SALE_MATERIAL_ID = #{saleMaterialId}
  140. </if>
  141. </where>
  142. </sql>
  143. <sql id="whereLike">
  144. <where>
  145. <if test="resultId != null">
  146. and RESULT_ID = #{resultId}
  147. </if>
  148. <if test="inventoryId != null">
  149. and INVENTORY_ID = #{inventoryId}
  150. </if>
  151. <if test="orderId != null">
  152. and ORDER_ID = #{orderId}
  153. </if>
  154. <if test="consigneeId != null">
  155. and CONSIGNEE_ID = #{consigneeId}
  156. </if>
  157. <if test="capacityNumbher != null and capacityNumbher != ''">
  158. and CAPACITY_NUMBHER LIKE '%${capacityNumbher}%'
  159. </if>
  160. <if test="capacityId != null">
  161. and CAPACITY_ID = #{capacityId}
  162. </if>
  163. <if test="materialId != null">
  164. and MATERIAL_ID = #{materialId}
  165. </if>
  166. <if test="meter != null">
  167. and METER = #{meter}
  168. </if>
  169. <if test="materialNumber != null">
  170. and MATERIAL_NUMBER = #{materialNumber}
  171. </if>
  172. <if test="theoryWeight != null">
  173. and THEORY_WEIGHT = #{theoryWeight}
  174. </if>
  175. <if test="singleWeight != null">
  176. and SINGLE_WEIGHT = #{singleWeight}
  177. </if>
  178. <if test="saleArea != null and saleArea != ''">
  179. and SALE_AREA LIKE '%${saleArea}%'
  180. </if>
  181. <if test="netWeight != null">
  182. and NET_WEIGHT = #{netWeight}
  183. </if>
  184. <if test="inboundWarehouse != null and inboundWarehouse != ''">
  185. and INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
  186. </if>
  187. <if test="inboundArea != null and inboundArea != ''">
  188. and INBOUND_AREA LIKE '%${inboundArea}%'
  189. </if>
  190. <if test="insertTime != null">
  191. and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
  192. </if>
  193. <if test="insertUsername != null and insertUsername != ''">
  194. and INSERT_USERNAME LIKE '%${insertUsername}%'
  195. </if>
  196. <if test="updateTime != null">
  197. and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
  198. </if>
  199. <if test="updateUsername != null and updateUsername != ''">
  200. and UPDATE_USERNAME LIKE '%${updateUsername}%'
  201. </if>
  202. <if test="deleted != null and deleted != ''">
  203. and DELETED LIKE '%${deleted}%'
  204. </if>
  205. <if test="alternateFields2 != null and alternateFields2 != ''">
  206. and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
  207. </if>
  208. <if test="alternateFields3 != null and alternateFields3 != ''">
  209. and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
  210. </if>
  211. <if test="alternateFields4 != null and alternateFields4 != ''">
  212. and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
  213. </if>
  214. <if test="alternateFields5 != null and alternateFields5 != ''">
  215. and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
  216. </if>
  217. <if test="alternateFields6 != null and alternateFields6 != ''">
  218. and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
  219. </if>
  220. <if test="alternateFields7 != null and alternateFields7 != ''">
  221. and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
  222. </if>
  223. <if test="alternateFields8 != null and alternateFields8 != ''">
  224. and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
  225. </if>
  226. <if test="saleMaterialId != null">
  227. and SALE_MATERIAL_ID = #{saleMaterialId}
  228. </if>
  229. </where>
  230. </sql>
  231. <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
  232. delete from OYE_OUTBOUND_RESULT
  233. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  234. </delete>
  235. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  236. delete from OYE_OUTBOUND_RESULT
  237. where 1!=1
  238. <if test="inventoryId != null">
  239. or INVENTORY_ID = #{inventoryId}
  240. </if>
  241. <if test="orderId != null">
  242. or ORDER_ID = #{orderId}
  243. </if>
  244. <if test="consigneeId != null">
  245. or CONSIGNEE_ID = #{consigneeId}
  246. </if>
  247. <if test="capacityNumbher != null and capacityNumbher != ''">
  248. or CAPACITY_NUMBHER = #{capacityNumbher}
  249. </if>
  250. <if test="capacityId != null">
  251. or CAPACITY_ID = #{capacityId}
  252. </if>
  253. <if test="materialId != null">
  254. or MATERIAL_ID = #{materialId}
  255. </if>
  256. <if test="meter != null">
  257. or METER = #{meter}
  258. </if>
  259. <if test="materialNumber != null">
  260. or MATERIAL_NUMBER = #{materialNumber}
  261. </if>
  262. <if test="theoryWeight != null">
  263. or THEORY_WEIGHT = #{theoryWeight}
  264. </if>
  265. <if test="singleWeight != null">
  266. or SINGLE_WEIGHT = #{singleWeight}
  267. </if>
  268. <if test="saleArea != null and saleArea != ''">
  269. or SALE_AREA = #{saleArea}
  270. </if>
  271. <if test="netWeight != null">
  272. or NET_WEIGHT = #{netWeight}
  273. </if>
  274. <if test="inboundWarehouse != null and inboundWarehouse != ''">
  275. or INBOUND_WAREHOUSE = #{inboundWarehouse}
  276. </if>
  277. <if test="inboundArea != null and inboundArea != ''">
  278. or INBOUND_AREA = #{inboundArea}
  279. </if>
  280. <if test="insertTime != null">
  281. or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
  282. </if>
  283. <if test="insertUsername != null and insertUsername != ''">
  284. or INSERT_USERNAME = #{insertUsername}
  285. </if>
  286. <if test="updateTime != null">
  287. or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
  288. </if>
  289. <if test="updateUsername != null and updateUsername != ''">
  290. or UPDATE_USERNAME = #{updateUsername}
  291. </if>
  292. <if test="deleted != null and deleted != ''">
  293. or DELETED = #{deleted}
  294. </if>
  295. <if test="alternateFields2 != null and alternateFields2 != ''">
  296. or ALTERNATE_FIELDS2 = #{alternateFields2}
  297. </if>
  298. <if test="alternateFields3 != null and alternateFields3 != ''">
  299. or ALTERNATE_FIELDS3 = #{alternateFields3}
  300. </if>
  301. <if test="alternateFields4 != null and alternateFields4 != ''">
  302. or ALTERNATE_FIELDS4 = #{alternateFields4}
  303. </if>
  304. <if test="alternateFields5 != null and alternateFields5 != ''">
  305. or ALTERNATE_FIELDS5 = #{alternateFields5}
  306. </if>
  307. <if test="alternateFields6 != null and alternateFields6 != ''">
  308. or ALTERNATE_FIELDS6 = #{alternateFields6}
  309. </if>
  310. <if test="alternateFields7 != null and alternateFields7 != ''">
  311. or ALTERNATE_FIELDS7 = #{alternateFields7}
  312. </if>
  313. <if test="alternateFields8 != null and alternateFields8 != ''">
  314. or ALTERNATE_FIELDS8 = #{alternateFields8}
  315. </if>
  316. <if test="saleMaterialId != null">
  317. or SALE_MATERIAL_ID = #{saleMaterialId}
  318. </if>
  319. </delete>
  320. <insert id="insert" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
  321. insert into OYE_OUTBOUND_RESULT (RESULT_ID, INVENTORY_ID, ORDER_ID,
  322. CONSIGNEE_ID, CAPACITY_NUMBHER, CAPACITY_ID,
  323. MATERIAL_ID, METER, MATERIAL_NUMBER,
  324. THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
  325. NET_WEIGHT, INBOUND_WAREHOUSE, INBOUND_AREA,
  326. INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
  327. UPDATE_USERNAME, DELETED, ALTERNATE_FIELDS2,
  328. ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
  329. ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8,
  330. SALE_MATERIAL_ID)
  331. values (#{resultId,jdbcType=DECIMAL}, #{inventoryId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL},
  332. #{consigneeId,jdbcType=DECIMAL}, #{capacityNumbher,jdbcType=VARCHAR}, #{capacityId,jdbcType=DECIMAL},
  333. #{materialId,jdbcType=DECIMAL}, #{meter,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL},
  334. #{theoryWeight,jdbcType=DECIMAL}, #{singleWeight,jdbcType=DECIMAL}, #{saleArea,jdbcType=VARCHAR},
  335. #{netWeight,jdbcType=DECIMAL}, #{inboundWarehouse,jdbcType=VARCHAR}, #{inboundArea,jdbcType=VARCHAR},
  336. #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
  337. #{updateUsername,jdbcType=VARCHAR}, #{deleted,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR},
  338. #{alternateFields3,jdbcType=VARCHAR}, #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR},
  339. #{alternateFields6,jdbcType=VARCHAR}, #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR},
  340. #{saleMaterialId,jdbcType=DECIMAL})
  341. </insert>
  342. <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
  343. insert into OYE_OUTBOUND_RESULT
  344. <trim prefix="(" suffix=")" suffixOverrides=",">
  345. <if test="resultId != null">
  346. RESULT_ID,
  347. </if>
  348. <if test="inventoryId != null">
  349. INVENTORY_ID,
  350. </if>
  351. <if test="orderId != null">
  352. ORDER_ID,
  353. </if>
  354. <if test="consigneeId != null">
  355. CONSIGNEE_ID,
  356. </if>
  357. <if test="capacityNumbher != null">
  358. CAPACITY_NUMBHER,
  359. </if>
  360. <if test="capacityId != null">
  361. CAPACITY_ID,
  362. </if>
  363. <if test="materialId != null">
  364. MATERIAL_ID,
  365. </if>
  366. <if test="meter != null">
  367. METER,
  368. </if>
  369. <if test="materialNumber != null">
  370. MATERIAL_NUMBER,
  371. </if>
  372. <if test="theoryWeight != null">
  373. THEORY_WEIGHT,
  374. </if>
  375. <if test="singleWeight != null">
  376. SINGLE_WEIGHT,
  377. </if>
  378. <if test="saleArea != null">
  379. SALE_AREA,
  380. </if>
  381. <if test="netWeight != null">
  382. NET_WEIGHT,
  383. </if>
  384. <if test="inboundWarehouse != null">
  385. INBOUND_WAREHOUSE,
  386. </if>
  387. <if test="inboundArea != null">
  388. INBOUND_AREA,
  389. </if>
  390. <if test="insertTime != null">
  391. INSERT_TIME,
  392. </if>
  393. <if test="insertUsername != null">
  394. INSERT_USERNAME,
  395. </if>
  396. <if test="updateTime != null">
  397. UPDATE_TIME,
  398. </if>
  399. <if test="updateUsername != null">
  400. UPDATE_USERNAME,
  401. </if>
  402. <if test="deleted != null">
  403. DELETED,
  404. </if>
  405. <if test="alternateFields2 != null">
  406. ALTERNATE_FIELDS2,
  407. </if>
  408. <if test="alternateFields3 != null">
  409. ALTERNATE_FIELDS3,
  410. </if>
  411. <if test="alternateFields4 != null">
  412. ALTERNATE_FIELDS4,
  413. </if>
  414. <if test="alternateFields5 != null">
  415. ALTERNATE_FIELDS5,
  416. </if>
  417. <if test="alternateFields6 != null">
  418. ALTERNATE_FIELDS6,
  419. </if>
  420. <if test="alternateFields7 != null">
  421. ALTERNATE_FIELDS7,
  422. </if>
  423. <if test="alternateFields8 != null">
  424. ALTERNATE_FIELDS8,
  425. </if>
  426. <if test="saleMaterialId != null">
  427. SALE_MATERIAL_ID,
  428. </if>
  429. </trim>
  430. <trim prefix="values (" suffix=")" suffixOverrides=",">
  431. <if test="resultId != null">
  432. #{resultId,jdbcType=DECIMAL},
  433. </if>
  434. <if test="inventoryId != null">
  435. #{inventoryId,jdbcType=DECIMAL},
  436. </if>
  437. <if test="orderId != null">
  438. #{orderId,jdbcType=DECIMAL},
  439. </if>
  440. <if test="consigneeId != null">
  441. #{consigneeId,jdbcType=DECIMAL},
  442. </if>
  443. <if test="capacityNumbher != null">
  444. #{capacityNumbher,jdbcType=VARCHAR},
  445. </if>
  446. <if test="capacityId != null">
  447. #{capacityId,jdbcType=DECIMAL},
  448. </if>
  449. <if test="materialId != null">
  450. #{materialId,jdbcType=DECIMAL},
  451. </if>
  452. <if test="meter != null">
  453. #{meter,jdbcType=DECIMAL},
  454. </if>
  455. <if test="materialNumber != null">
  456. #{materialNumber,jdbcType=DECIMAL},
  457. </if>
  458. <if test="theoryWeight != null">
  459. #{theoryWeight,jdbcType=DECIMAL},
  460. </if>
  461. <if test="singleWeight != null">
  462. #{singleWeight,jdbcType=DECIMAL},
  463. </if>
  464. <if test="saleArea != null">
  465. #{saleArea,jdbcType=VARCHAR},
  466. </if>
  467. <if test="netWeight != null">
  468. #{netWeight,jdbcType=DECIMAL},
  469. </if>
  470. <if test="inboundWarehouse != null">
  471. #{inboundWarehouse,jdbcType=VARCHAR},
  472. </if>
  473. <if test="inboundArea != null">
  474. #{inboundArea,jdbcType=VARCHAR},
  475. </if>
  476. <if test="insertTime != null">
  477. #{insertTime,jdbcType=TIMESTAMP},
  478. </if>
  479. <if test="insertUsername != null">
  480. #{insertUsername,jdbcType=VARCHAR},
  481. </if>
  482. <if test="updateTime != null">
  483. #{updateTime,jdbcType=TIMESTAMP},
  484. </if>
  485. <if test="updateUsername != null">
  486. #{updateUsername,jdbcType=VARCHAR},
  487. </if>
  488. <if test="deleted != null">
  489. #{deleted,jdbcType=VARCHAR},
  490. </if>
  491. <if test="alternateFields2 != null">
  492. #{alternateFields2,jdbcType=VARCHAR},
  493. </if>
  494. <if test="alternateFields3 != null">
  495. #{alternateFields3,jdbcType=VARCHAR},
  496. </if>
  497. <if test="alternateFields4 != null">
  498. #{alternateFields4,jdbcType=VARCHAR},
  499. </if>
  500. <if test="alternateFields5 != null">
  501. #{alternateFields5,jdbcType=VARCHAR},
  502. </if>
  503. <if test="alternateFields6 != null">
  504. #{alternateFields6,jdbcType=VARCHAR},
  505. </if>
  506. <if test="alternateFields7 != null">
  507. #{alternateFields7,jdbcType=VARCHAR},
  508. </if>
  509. <if test="alternateFields8 != null">
  510. #{alternateFields8,jdbcType=VARCHAR},
  511. </if>
  512. <if test="saleMaterialId != null">
  513. #{saleMaterialId,jdbcType=DECIMAL},
  514. </if>
  515. </trim>
  516. </insert>
  517. <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
  518. update OYE_OUTBOUND_RESULT
  519. set INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
  520. ORDER_ID = #{orderId,jdbcType=DECIMAL},
  521. CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
  522. CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
  523. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  524. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  525. METER = #{meter,jdbcType=DECIMAL},
  526. MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
  527. THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
  528. SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
  529. SALE_AREA = #{saleArea,jdbcType=VARCHAR},
  530. NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
  531. INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
  532. INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
  533. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  534. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  535. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  536. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  537. DELETED = #{deleted,jdbcType=VARCHAR},
  538. ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
  539. ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
  540. ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
  541. ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
  542. ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
  543. ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
  544. ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
  545. SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
  546. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  547. </update>
  548. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
  549. update OYE_OUTBOUND_RESULT
  550. <set>
  551. <if test="inventoryId != null">
  552. INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
  553. </if>
  554. <if test="orderId != null">
  555. ORDER_ID = #{orderId,jdbcType=DECIMAL},
  556. </if>
  557. <if test="consigneeId != null">
  558. CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
  559. </if>
  560. <if test="capacityNumbher != null">
  561. CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
  562. </if>
  563. <if test="capacityId != null">
  564. CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
  565. </if>
  566. <if test="materialId != null">
  567. MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
  568. </if>
  569. <if test="meter != null">
  570. METER = #{meter,jdbcType=DECIMAL},
  571. </if>
  572. <if test="materialNumber != null">
  573. MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
  574. </if>
  575. <if test="theoryWeight != null">
  576. THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
  577. </if>
  578. <if test="singleWeight != null">
  579. SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
  580. </if>
  581. <if test="saleArea != null">
  582. SALE_AREA = #{saleArea,jdbcType=VARCHAR},
  583. </if>
  584. <if test="netWeight != null">
  585. NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
  586. </if>
  587. <if test="inboundWarehouse != null">
  588. INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
  589. </if>
  590. <if test="inboundArea != null">
  591. INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
  592. </if>
  593. <if test="insertTime != null">
  594. INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
  595. </if>
  596. <if test="insertUsername != null">
  597. INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
  598. </if>
  599. <if test="updateTime != null">
  600. UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
  601. </if>
  602. <if test="updateUsername != null">
  603. UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
  604. </if>
  605. <if test="deleted != null">
  606. DELETED = #{deleted,jdbcType=VARCHAR},
  607. </if>
  608. <if test="alternateFields2 != null">
  609. ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
  610. </if>
  611. <if test="alternateFields3 != null">
  612. ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
  613. </if>
  614. <if test="alternateFields4 != null">
  615. ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
  616. </if>
  617. <if test="alternateFields5 != null">
  618. ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
  619. </if>
  620. <if test="alternateFields6 != null">
  621. ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
  622. </if>
  623. <if test="alternateFields7 != null">
  624. ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
  625. </if>
  626. <if test="alternateFields8 != null">
  627. ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
  628. </if>
  629. <if test="saleMaterialId != null">
  630. SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
  631. </if>
  632. </set>
  633. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  634. </update>
  635. <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
  636. <include refid="select"/>
  637. where RESULT_ID = #{resultId,jdbcType=DECIMAL}
  638. </select>
  639. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  640. <include refid="select"/>
  641. <include refid="where"/>
  642. </select>
  643. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  644. <include refid="select"/>
  645. <include refid="whereLike"/>
  646. </select>
  647. <insert id="batchInsert" parameterType="java.util.List">
  648. insert into OYE_OUTBOUND_RESULT
  649. (RESULT_ID,
  650. INVENTORY_ID, ORDER_ID, CONSIGNEE_ID,
  651. CAPACITY_NUMBHER, CAPACITY_ID,
  652. MATERIAL_ID, METER, MATERIAL_NUMBER,
  653. THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
  654. NET_WEIGHT, INBOUND_WAREHOUSE,
  655. INBOUND_AREA, INSERT_TIME, INSERT_USERNAME,
  656. UPDATE_TIME, UPDATE_USERNAME,
  657. DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
  658. ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
  659. ALTERNATE_FIELDS6, ALTERNATE_FIELDS7,
  660. ALTERNATE_FIELDS8, SALE_MATERIAL_ID
  661. )
  662. ( <foreach collection="list" item="item" separator="union all">
  663. select
  664. #{item.resultId,jdbcType=DECIMAL},
  665. #{item.inventoryId,jdbcType=DECIMAL}, #{item.orderId,jdbcType=DECIMAL}, #{item.consigneeId,jdbcType=DECIMAL},
  666. #{item.capacityNumbher,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
  667. #{item.materialId,jdbcType=DECIMAL}, #{item.meter,jdbcType=DECIMAL}, #{item.materialNumber,jdbcType=DECIMAL},
  668. #{item.theoryWeight,jdbcType=DECIMAL}, #{item.singleWeight,jdbcType=DECIMAL}, #{item.saleArea,jdbcType=VARCHAR},
  669. #{item.netWeight,jdbcType=DECIMAL}, #{item.inboundWarehouse,jdbcType=VARCHAR},
  670. #{item.inboundArea,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
  671. #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
  672. #{item.deleted,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, #{item.alternateFields3,jdbcType=VARCHAR},
  673. #{item.alternateFields4,jdbcType=VARCHAR}, #{item.alternateFields5,jdbcType=VARCHAR},
  674. #{item.alternateFields6,jdbcType=VARCHAR}, #{item.alternateFields7,jdbcType=VARCHAR},
  675. #{item.alternateFields8,jdbcType=VARCHAR}, #{item.saleMaterialId,jdbcType=DECIMAL}
  676. from dual
  677. </foreach> )
  678. </insert>
  679. <update id="batchUpdate" parameterType="java.util.List">
  680. update OYE_OUTBOUND_RESULT
  681. set
  682. RESULT_ID=
  683. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  684. when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
  685. </foreach>
  686. ,INVENTORY_ID=
  687. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  688. when #{item.resultId,jdbcType=DECIMAL} then #{item.inventoryId,jdbcType=DECIMAL}
  689. </foreach>
  690. ,ORDER_ID=
  691. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  692. when #{item.resultId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
  693. </foreach>
  694. ,CONSIGNEE_ID=
  695. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  696. when #{item.resultId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
  697. </foreach>
  698. ,CAPACITY_NUMBHER=
  699. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  700. when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityNumbher,jdbcType=VARCHAR}
  701. </foreach>
  702. ,CAPACITY_ID=
  703. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  704. when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
  705. </foreach>
  706. ,MATERIAL_ID=
  707. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  708. when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
  709. </foreach>
  710. ,METER=
  711. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  712. when #{item.resultId,jdbcType=DECIMAL} then #{item.meter,jdbcType=DECIMAL}
  713. </foreach>
  714. ,MATERIAL_NUMBER=
  715. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  716. when #{item.resultId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
  717. </foreach>
  718. ,THEORY_WEIGHT=
  719. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  720. when #{item.resultId,jdbcType=DECIMAL} then #{item.theoryWeight,jdbcType=DECIMAL}
  721. </foreach>
  722. ,SINGLE_WEIGHT=
  723. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  724. when #{item.resultId,jdbcType=DECIMAL} then #{item.singleWeight,jdbcType=DECIMAL}
  725. </foreach>
  726. ,SALE_AREA=
  727. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  728. when #{item.resultId,jdbcType=DECIMAL} then #{item.saleArea,jdbcType=VARCHAR}
  729. </foreach>
  730. ,NET_WEIGHT=
  731. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  732. when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=DECIMAL}
  733. </foreach>
  734. ,INBOUND_WAREHOUSE=
  735. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  736. when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundWarehouse,jdbcType=VARCHAR}
  737. </foreach>
  738. ,INBOUND_AREA=
  739. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  740. when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundArea,jdbcType=VARCHAR}
  741. </foreach>
  742. ,INSERT_TIME=
  743. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  744. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
  745. </foreach>
  746. ,INSERT_USERNAME=
  747. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  748. when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
  749. </foreach>
  750. ,UPDATE_TIME=
  751. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  752. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
  753. </foreach>
  754. ,UPDATE_USERNAME=
  755. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  756. when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
  757. </foreach>
  758. ,DELETED=
  759. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  760. when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
  761. </foreach>
  762. ,ALTERNATE_FIELDS2=
  763. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  764. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
  765. </foreach>
  766. ,ALTERNATE_FIELDS3=
  767. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  768. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
  769. </foreach>
  770. ,ALTERNATE_FIELDS4=
  771. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  772. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
  773. </foreach>
  774. ,ALTERNATE_FIELDS5=
  775. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  776. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
  777. </foreach>
  778. ,ALTERNATE_FIELDS6=
  779. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  780. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
  781. </foreach>
  782. ,ALTERNATE_FIELDS7=
  783. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  784. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
  785. </foreach>
  786. ,ALTERNATE_FIELDS8=
  787. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  788. when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
  789. </foreach>
  790. ,SALE_MATERIAL_ID=
  791. <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
  792. when #{item.resultId,jdbcType=DECIMAL} then #{item.saleMaterialId,jdbcType=DECIMAL}
  793. </foreach>
  794. where RESULT_ID in
  795. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  796. #{item.resultId,jdbcType=DECIMAL}
  797. </foreach>
  798. </update>
  799. <delete id="batchDelete" parameterType="java.util.List">
  800. delete from OYE_OUTBOUND_RESULT
  801. where RESULT_ID in
  802. <foreach collection="list" item="id" open="(" close=")" separator=",">
  803. #{id}
  804. </foreach>
  805. </delete>
  806. <!-- 友情提示!!!-->
  807. <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
  808. <select id="oyeOutboundResultMapper" resultType="java.util.Map">
  809. SELECT OOR.SINGLE_WEIGHT "singleWeight",
  810. OOR.METER "meter",
  811. OOR.MATERIAL_ID "materialId",
  812. OOR.CAPACITY_NUMBHER "capacityNumber",
  813. OOR.MATERIAL_NUMBER "materialNumber",
  814. OOR.THEORY_WEIGHT "theoryWeight",
  815. OOR.NET_WEIGHT "netWeight",
  816. OOR.SALE_AREA "saleArea",
  817. OOR.INVENTORY_ID "inventoryId",
  818. OOR.INBOUND_WAREHOUSE "outWarehouse",
  819. OOR.INBOUND_AREA "outboundArea",
  820. OOR.INSERT_TIME "insertTime",
  821. RC.CONSIGNEE_ID "consigneeId",
  822. RC.CONSIGNEE_COMPANY_NAME "consigneeName",
  823. RM.MATERIAL_NAME "materialName",
  824. RM.MATERIAL_SPECIFICATION "materialSpe",
  825. RM.MATERIAL_MODEL "materialModel",
  826. OO.ORDER_ID "orderId",
  827. OO.ORDER_NUMBER "orderNumber",
  828. OO.CAPACITY_ID "capacityId",
  829. OOR.SALE_MATERIAL_ID "saleMaterialId"
  830. FROM OYE_OUTBOUND_RESULT OOR
  831. LEFT JOIN RMS_MATERIAL RM on OOR.MATERIAL_ID = RM.MATERIAL_ID
  832. LEFT JOIN RMS_CONSIGNEE RC on OOR.CONSIGNEE_ID = RC.CONSIGNEE_ID
  833. LEFT JOIN OMSTRUCK_ORDER OO on OOR.ORDER_ID = OO.ORDER_ID
  834. <where>
  835. <!--
  836. <if test="1 == 1">
  837. and (OOR.SALE_MATERIAL_ID IS NOT NULL or OOR.ALTERNATE_FIELDS2 = '库存重量划拨')
  838. </if>
  839. -->
  840. <if test="inboundAreaSide != null and inboundAreaSide != ''">
  841. AND OOR.inbound_Area = #{inboundAreaSide}
  842. </if>
  843. <if test="startDate != null">
  844. and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= OOR.INSERT_TIME
  845. and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= OOR.INSERT_TIME
  846. </if>
  847. <if test="consigneeName != null and consigneeName != ''">
  848. AND RC.CONSIGNEE_COMPANY_NAME LIKE '%${consigneeName}%'
  849. </if>
  850. <if test="capacityNumber != null and capacityNumber != ''">
  851. AND OOR.CAPACITY_NUMBHER LIKE '%${capacityNumber}%'
  852. </if>
  853. <if test="saleArea != null and saleArea != ''">
  854. AND OOR.SALE_AREA LIKE '%${saleArea}%'
  855. </if>
  856. <if test="inboundWarehouse != null and inboundWarehouse != ''">
  857. AND OOR.INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
  858. </if>
  859. <if test="inboundArea != null and inboundArea != ''">
  860. AND OOR.inbound_Area LIKE '%${inboundArea}%'
  861. </if>
  862. <if test="materialName != null and materialName != ''">
  863. AND RM.material_Name LIKE '%${materialName}%'
  864. </if>
  865. <if test="materialSpe != null and materialSpe != ''">
  866. AND RM.MATERIAL_SPECIFICATION LIKE '%${materialSpe}%'
  867. </if>
  868. <if test="saleAreaRemark != null">
  869. and
  870. <foreach collection="saleAreaRemark" item="item" open="(" separator="or" close=")">
  871. OOR.SALE_AREA like '%${item}%'
  872. </foreach>
  873. </if>
  874. </where>
  875. ORDER BY OOR.INSERT_TIME DESC
  876. </select>
  877. <select id="selectSaleMaterialID" resultType="java.math.BigDecimal">
  878. SELECT OOR.SALE_MATERIAL_ID FROM OYE_OUTBOUND_RESULT OOR
  879. WHERE OOR.SALE_MATERIAL_ID = #{saleMaterialId}
  880. </select>
  881. <update id="updateSaleMakeDate" parameterType="java.util.Map">
  882. UPDATE AMS_SALE_MATERIAL ASM
  883. SET ASM.SALE_MAKE_DATE = SYSDATE,
  884. ASM.WEIGHT_BATCH_ID = #{weightBatchId},
  885. ASM.MATERIAL_NUMBER = #{materialNumber},
  886. ASM.MATERIAL_WEIGHT = #{materialWeight}
  887. WHERE ASM.SALE_MATERIAL_ID = #{saleMaterialId}
  888. </update>
  889. <update id="updateOrderStatus">
  890. UPDATE TMSTRUCK_TOTAL_RESULT
  891. SET ORDER_STATUS = '已出库'
  892. WHERE ORDER_ID = #{orderId}
  893. </update>
  894. <select id="getOldMes" resultType="java.util.Map">
  895. SELECT OOR.MATERIAL_NUMBER "materialNumber",
  896. OOR.THEORY_WEIGHT "theoryWeight",
  897. OOR.NET_WEIGHT "netWeight",
  898. OOR.INVENTORY_ID "inventoryId"
  899. FROM OYE_OUTBOUND_RESULT OOR
  900. WHERE OOR.RESULT_ID = #{resultId}
  901. </select>
  902. <update id="updateSaleMakeDate1">
  903. UPDATE AMS_SALE_MATERIAL ASM
  904. SET ASM.WEIGHT_BATCH_ID = #{weightBatchId},
  905. ASM.MATERIAL_NUMBER = #{materialNumber},
  906. ASM.MATERIAL_WEIGHT = #{materialWeight}
  907. WHERE ASM.SALE_MATERIAL_ID = #{saleMaterialId}
  908. </update>
  909. </mapper>