RmsSupplierMapper.xml 48 KB

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