RmsSupplierMapper.xml 48 KB

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