RmsSupplierMapper.xml 50 KB

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