AmstruckInwardRequirementMapper.xml 33 KB

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