RmsSupplierMapper.xml 45 KB

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