OrganizationIdentityMapper.xml 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358
  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.goafanti.common.dao.OrganizationIdentityMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationIdentity">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="uid" jdbcType="VARCHAR" property="uid" />
  7. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  8. <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
  9. <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
  10. <result column="qq" jdbcType="VARCHAR" property="qq" />
  11. <result column="postal_address" jdbcType="VARCHAR" property="postalAddress" />
  12. <result column="postcode" jdbcType="VARCHAR" property="postcode" />
  13. <result column="unit_name" jdbcType="VARCHAR" property="unitName" />
  14. <result column="registered_capital" jdbcType="DECIMAL" property="registeredCapital" />
  15. <result column="licence_number" jdbcType="VARCHAR" property="licenceNumber" />
  16. <result column="licence_province" jdbcType="INTEGER" property="licenceProvince" />
  17. <result column="licence_city" jdbcType="INTEGER" property="licenceCity" />
  18. <result column="licence_area" jdbcType="INTEGER" property="licenceArea" />
  19. <result column="licence_scanning_url" jdbcType="VARCHAR" property="licenceScanningUrl" />
  20. <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
  21. <result column="org_code_url" jdbcType="VARCHAR" property="orgCodeUrl" />
  22. <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
  23. <result column="banks" jdbcType="VARCHAR" property="banks" />
  24. <result column="bank_branch" jdbcType="VARCHAR" property="bankBranch" />
  25. <result column="bank_card_number" jdbcType="VARCHAR" property="bankCardNumber" />
  26. <result column="validation_amount" jdbcType="DECIMAL" property="validationAmount" />
  27. <result column="identity_type" jdbcType="INTEGER" property="identityType" />
  28. <result column="location_province" jdbcType="INTEGER" property="locationProvince" />
  29. <result column="location_city" jdbcType="INTEGER" property="locationCity" />
  30. <result column="location_area" jdbcType="INTEGER" property="locationArea" />
  31. <result column="legal_person" jdbcType="VARCHAR" property="legalPerson" />
  32. <result column="legal_person_id_card" jdbcType="VARCHAR" property="legalPersonIdCard" />
  33. <result column="last_year_tax_report_url" jdbcType="VARCHAR" property="lastYearTaxReportUrl" />
  34. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  35. <result column="process" jdbcType="INTEGER" property="process" />
  36. <result column="wrong_count" jdbcType="INTEGER" property="wrongCount" />
  37. <result column="payment_date" jdbcType="TIMESTAMP" property="paymentDate" />
  38. <result column="listed" jdbcType="INTEGER" property="listed" />
  39. <result column="listed_date" jdbcType="TIMESTAMP" property="listedDate" />
  40. <result column="listed_type" jdbcType="INTEGER" property="listedType" />
  41. <result column="stock_code" jdbcType="VARCHAR" property="stockCode" />
  42. <result column="certificate_number" jdbcType="VARCHAR" property="certificateNumber" />
  43. <result column="issuing_date" jdbcType="TIMESTAMP" property="issuingDate" />
  44. <result column="cog_contacts" jdbcType="INTEGER" property="cogContacts" />
  45. <result column="tech_principal" jdbcType="VARCHAR" property="techPrincipal" />
  46. <result column="contacts_fixed_tel" jdbcType="VARCHAR" property="contactsFixedTel" />
  47. <result column="contacts_fax" jdbcType="VARCHAR" property="contactsFax" />
  48. <result column="legal_person_tel" jdbcType="VARCHAR" property="legalPersonTel" />
  49. <result column="legal_person_fax" jdbcType="VARCHAR" property="legalPersonFax" />
  50. <result column="legal_person_email" jdbcType="VARCHAR" property="legalPersonEmail" />
  51. <result column="registration_time" jdbcType="TIMESTAMP" property="registrationTime" />
  52. <result column="ratepay_code" jdbcType="VARCHAR" property="ratepayCode" />
  53. <result column="industry" jdbcType="INTEGER" property="industry" />
  54. <result column="enterprise_scale" jdbcType="VARCHAR" property="enterpriseScale" />
  55. <result column="register_type" jdbcType="VARCHAR" property="registerType" />
  56. <result column="foreign_investment" jdbcType="VARCHAR" property="foreignInvestment" />
  57. <result column="field" jdbcType="VARCHAR" property="field" />
  58. <result column="tax_authority" jdbcType="INTEGER" property="taxAuthority" />
  59. <result column="ratepay_method" jdbcType="INTEGER" property="ratepayMethod" />
  60. <result column="high_tech_zone" jdbcType="INTEGER" property="highTechZone" />
  61. <result column="risk_investment" jdbcType="INTEGER" property="riskInvestment" />
  62. <result column="business_scope" jdbcType="VARCHAR" property="businessScope" />
  63. <result column="high_tech_name" jdbcType="VARCHAR" property="highTechName" />
  64. <result column="patent_prory_statement_url" jdbcType="VARCHAR" property="patentProryStatementUrl" />
  65. <result column="international" jdbcType="INTEGER" property="international" />
  66. <result column="review_instructions" jdbcType="VARCHAR" property="reviewInstructions" />
  67. <result column="investment" jdbcType="INTEGER" property="investment" />
  68. <result column="year_sales_amount" jdbcType="DECIMAL" property="yearSalesAmount" />
  69. <result column="last_year_research_amount" jdbcType="DECIMAL" property="lastYearResearchAmount" />
  70. <result column="assets" jdbcType="DECIMAL" property="assets" />
  71. <result column="qualification" jdbcType="VARCHAR" property="qualification" />
  72. <result column="cooperation_situation" jdbcType="VARCHAR" property="cooperationSituation" />
  73. <result column="honor_picture" jdbcType="VARCHAR" property="honorPicture" />
  74. <result column="sales_target" jdbcType="VARCHAR" property="salesTarget" />
  75. <result column="intended_project" jdbcType="VARCHAR" property="intendedProject" />
  76. <result column="contacts_dep" jdbcType="VARCHAR" property="contactsDep" />
  77. <result column="contacts_position" jdbcType="VARCHAR" property="contactsPosition" />
  78. </resultMap>
  79. <sql id="Base_Column_List">
  80. id, `uid`, contacts, contact_mobile, fixed_tel, qq, postal_address, postcode, unit_name,
  81. registered_capital, licence_number, licence_province, licence_city, licence_area,
  82. licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch, bank_card_number,
  83. validation_amount, identity_type, location_province, location_city, location_area,
  84. legal_person, legal_person_id_card, last_year_tax_report_url, audit_status, `process`,
  85. wrong_count, payment_date, listed, listed_date, listed_type, stock_code, certificate_number,
  86. issuing_date, cog_contacts, tech_principal, contacts_fixed_tel, contacts_fax, legal_person_tel,
  87. legal_person_fax, legal_person_email, registration_time, ratepay_code, industry,
  88. enterprise_scale, register_type, foreign_investment, field, tax_authority, ratepay_method,
  89. high_tech_zone, risk_investment, business_scope, high_tech_name, patent_prory_statement_url,
  90. international, review_instructions, investment, year_sales_amount, last_year_research_amount,
  91. assets, qualification, cooperation_situation, honor_picture, sales_target, intended_project,
  92. contacts_dep, contacts_position
  93. </sql>
  94. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  95. select
  96. <include refid="Base_Column_List" />
  97. from organization_identity
  98. where id = #{id,jdbcType=VARCHAR}
  99. </select>
  100. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  101. delete from organization_identity
  102. where id = #{id,jdbcType=VARCHAR}
  103. </delete>
  104. <insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
  105. insert into organization_identity (id, `uid`, contacts,
  106. contact_mobile, fixed_tel, qq,
  107. postal_address, postcode, unit_name,
  108. registered_capital, licence_number, licence_province,
  109. licence_city, licence_area, licence_scanning_url,
  110. org_code, org_code_url, bank_account,
  111. banks, bank_branch, bank_card_number,
  112. validation_amount, identity_type, location_province,
  113. location_city, location_area, legal_person,
  114. legal_person_id_card, last_year_tax_report_url,
  115. audit_status, `process`, wrong_count,
  116. payment_date, listed, listed_date,
  117. listed_type, stock_code, certificate_number,
  118. issuing_date, cog_contacts, tech_principal,
  119. contacts_fixed_tel, contacts_fax, legal_person_tel,
  120. legal_person_fax, legal_person_email, registration_time,
  121. ratepay_code, industry, enterprise_scale,
  122. register_type, foreign_investment, field,
  123. tax_authority, ratepay_method, high_tech_zone,
  124. risk_investment, business_scope, high_tech_name,
  125. patent_prory_statement_url, international,
  126. review_instructions, investment, year_sales_amount,
  127. last_year_research_amount, assets, qualification,
  128. cooperation_situation, honor_picture, sales_target,
  129. intended_project, contacts_dep, contacts_position
  130. )
  131. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
  132. #{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR},
  133. #{postalAddress,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR}, #{unitName,jdbcType=VARCHAR},
  134. #{registeredCapital,jdbcType=DECIMAL}, #{licenceNumber,jdbcType=VARCHAR}, #{licenceProvince,jdbcType=INTEGER},
  135. #{licenceCity,jdbcType=INTEGER}, #{licenceArea,jdbcType=INTEGER}, #{licenceScanningUrl,jdbcType=VARCHAR},
  136. #{orgCode,jdbcType=VARCHAR}, #{orgCodeUrl,jdbcType=VARCHAR}, #{bankAccount,jdbcType=VARCHAR},
  137. #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR},
  138. #{validationAmount,jdbcType=DECIMAL}, #{identityType,jdbcType=INTEGER}, #{locationProvince,jdbcType=INTEGER},
  139. #{locationCity,jdbcType=INTEGER}, #{locationArea,jdbcType=INTEGER}, #{legalPerson,jdbcType=VARCHAR},
  140. #{legalPersonIdCard,jdbcType=VARCHAR}, #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  141. #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER},
  142. #{paymentDate,jdbcType=TIMESTAMP}, #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP},
  143. #{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR}, #{certificateNumber,jdbcType=VARCHAR},
  144. #{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER}, #{techPrincipal,jdbcType=VARCHAR},
  145. #{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR},
  146. #{legalPersonFax,jdbcType=VARCHAR}, #{legalPersonEmail,jdbcType=VARCHAR}, #{registrationTime,jdbcType=TIMESTAMP},
  147. #{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER}, #{enterpriseScale,jdbcType=VARCHAR},
  148. #{registerType,jdbcType=VARCHAR}, #{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR},
  149. #{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER}, #{highTechZone,jdbcType=INTEGER},
  150. #{riskInvestment,jdbcType=INTEGER}, #{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR},
  151. #{patentProryStatementUrl,jdbcType=VARCHAR}, #{international,jdbcType=INTEGER},
  152. #{reviewInstructions,jdbcType=VARCHAR}, #{investment,jdbcType=INTEGER}, #{yearSalesAmount,jdbcType=DECIMAL},
  153. #{lastYearResearchAmount,jdbcType=DECIMAL}, #{assets,jdbcType=DECIMAL}, #{qualification,jdbcType=VARCHAR},
  154. #{cooperationSituation,jdbcType=VARCHAR}, #{honorPicture,jdbcType=VARCHAR}, #{salesTarget,jdbcType=VARCHAR},
  155. #{intendedProject,jdbcType=VARCHAR}, #{contactsDep,jdbcType=VARCHAR}, #{contactsPosition,jdbcType=VARCHAR}
  156. )
  157. </insert>
  158. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
  159. insert into organization_identity
  160. <trim prefix="(" suffix=")" suffixOverrides=",">
  161. <if test="id != null">
  162. id,
  163. </if>
  164. <if test="uid != null">
  165. `uid`,
  166. </if>
  167. <if test="contacts != null">
  168. contacts,
  169. </if>
  170. <if test="contactMobile != null">
  171. contact_mobile,
  172. </if>
  173. <if test="fixedTel != null">
  174. fixed_tel,
  175. </if>
  176. <if test="qq != null">
  177. qq,
  178. </if>
  179. <if test="postalAddress != null">
  180. postal_address,
  181. </if>
  182. <if test="postcode != null">
  183. postcode,
  184. </if>
  185. <if test="unitName != null">
  186. unit_name,
  187. </if>
  188. <if test="registeredCapital != null">
  189. registered_capital,
  190. </if>
  191. <if test="licenceNumber != null">
  192. licence_number,
  193. </if>
  194. <if test="licenceProvince != null">
  195. licence_province,
  196. </if>
  197. <if test="licenceCity != null">
  198. licence_city,
  199. </if>
  200. <if test="licenceArea != null">
  201. licence_area,
  202. </if>
  203. <if test="licenceScanningUrl != null">
  204. licence_scanning_url,
  205. </if>
  206. <if test="orgCode != null">
  207. org_code,
  208. </if>
  209. <if test="orgCodeUrl != null">
  210. org_code_url,
  211. </if>
  212. <if test="bankAccount != null">
  213. bank_account,
  214. </if>
  215. <if test="banks != null">
  216. banks,
  217. </if>
  218. <if test="bankBranch != null">
  219. bank_branch,
  220. </if>
  221. <if test="bankCardNumber != null">
  222. bank_card_number,
  223. </if>
  224. <if test="validationAmount != null">
  225. validation_amount,
  226. </if>
  227. <if test="identityType != null">
  228. identity_type,
  229. </if>
  230. <if test="locationProvince != null">
  231. location_province,
  232. </if>
  233. <if test="locationCity != null">
  234. location_city,
  235. </if>
  236. <if test="locationArea != null">
  237. location_area,
  238. </if>
  239. <if test="legalPerson != null">
  240. legal_person,
  241. </if>
  242. <if test="legalPersonIdCard != null">
  243. legal_person_id_card,
  244. </if>
  245. <if test="lastYearTaxReportUrl != null">
  246. last_year_tax_report_url,
  247. </if>
  248. <if test="auditStatus != null">
  249. audit_status,
  250. </if>
  251. <if test="process != null">
  252. `process`,
  253. </if>
  254. <if test="wrongCount != null">
  255. wrong_count,
  256. </if>
  257. <if test="paymentDate != null">
  258. payment_date,
  259. </if>
  260. <if test="listed != null">
  261. listed,
  262. </if>
  263. <if test="listedDate != null">
  264. listed_date,
  265. </if>
  266. <if test="listedType != null">
  267. listed_type,
  268. </if>
  269. <if test="stockCode != null">
  270. stock_code,
  271. </if>
  272. <if test="certificateNumber != null">
  273. certificate_number,
  274. </if>
  275. <if test="issuingDate != null">
  276. issuing_date,
  277. </if>
  278. <if test="cogContacts != null">
  279. cog_contacts,
  280. </if>
  281. <if test="techPrincipal != null">
  282. tech_principal,
  283. </if>
  284. <if test="contactsFixedTel != null">
  285. contacts_fixed_tel,
  286. </if>
  287. <if test="contactsFax != null">
  288. contacts_fax,
  289. </if>
  290. <if test="legalPersonTel != null">
  291. legal_person_tel,
  292. </if>
  293. <if test="legalPersonFax != null">
  294. legal_person_fax,
  295. </if>
  296. <if test="legalPersonEmail != null">
  297. legal_person_email,
  298. </if>
  299. <if test="registrationTime != null">
  300. registration_time,
  301. </if>
  302. <if test="ratepayCode != null">
  303. ratepay_code,
  304. </if>
  305. <if test="industry != null">
  306. industry,
  307. </if>
  308. <if test="enterpriseScale != null">
  309. enterprise_scale,
  310. </if>
  311. <if test="registerType != null">
  312. register_type,
  313. </if>
  314. <if test="foreignInvestment != null">
  315. foreign_investment,
  316. </if>
  317. <if test="field != null">
  318. field,
  319. </if>
  320. <if test="taxAuthority != null">
  321. tax_authority,
  322. </if>
  323. <if test="ratepayMethod != null">
  324. ratepay_method,
  325. </if>
  326. <if test="highTechZone != null">
  327. high_tech_zone,
  328. </if>
  329. <if test="riskInvestment != null">
  330. risk_investment,
  331. </if>
  332. <if test="businessScope != null">
  333. business_scope,
  334. </if>
  335. <if test="highTechName != null">
  336. high_tech_name,
  337. </if>
  338. <if test="patentProryStatementUrl != null">
  339. patent_prory_statement_url,
  340. </if>
  341. <if test="international != null">
  342. international,
  343. </if>
  344. <if test="reviewInstructions != null">
  345. review_instructions,
  346. </if>
  347. <if test="investment != null">
  348. investment,
  349. </if>
  350. <if test="yearSalesAmount != null">
  351. year_sales_amount,
  352. </if>
  353. <if test="lastYearResearchAmount != null">
  354. last_year_research_amount,
  355. </if>
  356. <if test="assets != null">
  357. assets,
  358. </if>
  359. <if test="qualification != null">
  360. qualification,
  361. </if>
  362. <if test="cooperationSituation != null">
  363. cooperation_situation,
  364. </if>
  365. <if test="honorPicture != null">
  366. honor_picture,
  367. </if>
  368. <if test="salesTarget != null">
  369. sales_target,
  370. </if>
  371. <if test="intendedProject != null">
  372. intended_project,
  373. </if>
  374. <if test="contactsDep != null">
  375. contacts_dep,
  376. </if>
  377. <if test="contactsPosition != null">
  378. contacts_position,
  379. </if>
  380. </trim>
  381. <trim prefix="values (" suffix=")" suffixOverrides=",">
  382. <if test="id != null">
  383. #{id,jdbcType=VARCHAR},
  384. </if>
  385. <if test="uid != null">
  386. #{uid,jdbcType=VARCHAR},
  387. </if>
  388. <if test="contacts != null">
  389. #{contacts,jdbcType=VARCHAR},
  390. </if>
  391. <if test="contactMobile != null">
  392. #{contactMobile,jdbcType=VARCHAR},
  393. </if>
  394. <if test="fixedTel != null">
  395. #{fixedTel,jdbcType=VARCHAR},
  396. </if>
  397. <if test="qq != null">
  398. #{qq,jdbcType=VARCHAR},
  399. </if>
  400. <if test="postalAddress != null">
  401. #{postalAddress,jdbcType=VARCHAR},
  402. </if>
  403. <if test="postcode != null">
  404. #{postcode,jdbcType=VARCHAR},
  405. </if>
  406. <if test="unitName != null">
  407. #{unitName,jdbcType=VARCHAR},
  408. </if>
  409. <if test="registeredCapital != null">
  410. #{registeredCapital,jdbcType=DECIMAL},
  411. </if>
  412. <if test="licenceNumber != null">
  413. #{licenceNumber,jdbcType=VARCHAR},
  414. </if>
  415. <if test="licenceProvince != null">
  416. #{licenceProvince,jdbcType=INTEGER},
  417. </if>
  418. <if test="licenceCity != null">
  419. #{licenceCity,jdbcType=INTEGER},
  420. </if>
  421. <if test="licenceArea != null">
  422. #{licenceArea,jdbcType=INTEGER},
  423. </if>
  424. <if test="licenceScanningUrl != null">
  425. #{licenceScanningUrl,jdbcType=VARCHAR},
  426. </if>
  427. <if test="orgCode != null">
  428. #{orgCode,jdbcType=VARCHAR},
  429. </if>
  430. <if test="orgCodeUrl != null">
  431. #{orgCodeUrl,jdbcType=VARCHAR},
  432. </if>
  433. <if test="bankAccount != null">
  434. #{bankAccount,jdbcType=VARCHAR},
  435. </if>
  436. <if test="banks != null">
  437. #{banks,jdbcType=VARCHAR},
  438. </if>
  439. <if test="bankBranch != null">
  440. #{bankBranch,jdbcType=VARCHAR},
  441. </if>
  442. <if test="bankCardNumber != null">
  443. #{bankCardNumber,jdbcType=VARCHAR},
  444. </if>
  445. <if test="validationAmount != null">
  446. #{validationAmount,jdbcType=DECIMAL},
  447. </if>
  448. <if test="identityType != null">
  449. #{identityType,jdbcType=INTEGER},
  450. </if>
  451. <if test="locationProvince != null">
  452. #{locationProvince,jdbcType=INTEGER},
  453. </if>
  454. <if test="locationCity != null">
  455. #{locationCity,jdbcType=INTEGER},
  456. </if>
  457. <if test="locationArea != null">
  458. #{locationArea,jdbcType=INTEGER},
  459. </if>
  460. <if test="legalPerson != null">
  461. #{legalPerson,jdbcType=VARCHAR},
  462. </if>
  463. <if test="legalPersonIdCard != null">
  464. #{legalPersonIdCard,jdbcType=VARCHAR},
  465. </if>
  466. <if test="lastYearTaxReportUrl != null">
  467. #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  468. </if>
  469. <if test="auditStatus != null">
  470. #{auditStatus,jdbcType=INTEGER},
  471. </if>
  472. <if test="process != null">
  473. #{process,jdbcType=INTEGER},
  474. </if>
  475. <if test="wrongCount != null">
  476. #{wrongCount,jdbcType=INTEGER},
  477. </if>
  478. <if test="paymentDate != null">
  479. #{paymentDate,jdbcType=TIMESTAMP},
  480. </if>
  481. <if test="listed != null">
  482. #{listed,jdbcType=INTEGER},
  483. </if>
  484. <if test="listedDate != null">
  485. #{listedDate,jdbcType=TIMESTAMP},
  486. </if>
  487. <if test="listedType != null">
  488. #{listedType,jdbcType=INTEGER},
  489. </if>
  490. <if test="stockCode != null">
  491. #{stockCode,jdbcType=VARCHAR},
  492. </if>
  493. <if test="certificateNumber != null">
  494. #{certificateNumber,jdbcType=VARCHAR},
  495. </if>
  496. <if test="issuingDate != null">
  497. #{issuingDate,jdbcType=TIMESTAMP},
  498. </if>
  499. <if test="cogContacts != null">
  500. #{cogContacts,jdbcType=INTEGER},
  501. </if>
  502. <if test="techPrincipal != null">
  503. #{techPrincipal,jdbcType=VARCHAR},
  504. </if>
  505. <if test="contactsFixedTel != null">
  506. #{contactsFixedTel,jdbcType=VARCHAR},
  507. </if>
  508. <if test="contactsFax != null">
  509. #{contactsFax,jdbcType=VARCHAR},
  510. </if>
  511. <if test="legalPersonTel != null">
  512. #{legalPersonTel,jdbcType=VARCHAR},
  513. </if>
  514. <if test="legalPersonFax != null">
  515. #{legalPersonFax,jdbcType=VARCHAR},
  516. </if>
  517. <if test="legalPersonEmail != null">
  518. #{legalPersonEmail,jdbcType=VARCHAR},
  519. </if>
  520. <if test="registrationTime != null">
  521. #{registrationTime,jdbcType=TIMESTAMP},
  522. </if>
  523. <if test="ratepayCode != null">
  524. #{ratepayCode,jdbcType=VARCHAR},
  525. </if>
  526. <if test="industry != null">
  527. #{industry,jdbcType=INTEGER},
  528. </if>
  529. <if test="enterpriseScale != null">
  530. #{enterpriseScale,jdbcType=VARCHAR},
  531. </if>
  532. <if test="registerType != null">
  533. #{registerType,jdbcType=VARCHAR},
  534. </if>
  535. <if test="foreignInvestment != null">
  536. #{foreignInvestment,jdbcType=VARCHAR},
  537. </if>
  538. <if test="field != null">
  539. #{field,jdbcType=VARCHAR},
  540. </if>
  541. <if test="taxAuthority != null">
  542. #{taxAuthority,jdbcType=INTEGER},
  543. </if>
  544. <if test="ratepayMethod != null">
  545. #{ratepayMethod,jdbcType=INTEGER},
  546. </if>
  547. <if test="highTechZone != null">
  548. #{highTechZone,jdbcType=INTEGER},
  549. </if>
  550. <if test="riskInvestment != null">
  551. #{riskInvestment,jdbcType=INTEGER},
  552. </if>
  553. <if test="businessScope != null">
  554. #{businessScope,jdbcType=VARCHAR},
  555. </if>
  556. <if test="highTechName != null">
  557. #{highTechName,jdbcType=VARCHAR},
  558. </if>
  559. <if test="patentProryStatementUrl != null">
  560. #{patentProryStatementUrl,jdbcType=VARCHAR},
  561. </if>
  562. <if test="international != null">
  563. #{international,jdbcType=INTEGER},
  564. </if>
  565. <if test="reviewInstructions != null">
  566. #{reviewInstructions,jdbcType=VARCHAR},
  567. </if>
  568. <if test="investment != null">
  569. #{investment,jdbcType=INTEGER},
  570. </if>
  571. <if test="yearSalesAmount != null">
  572. #{yearSalesAmount,jdbcType=DECIMAL},
  573. </if>
  574. <if test="lastYearResearchAmount != null">
  575. #{lastYearResearchAmount,jdbcType=DECIMAL},
  576. </if>
  577. <if test="assets != null">
  578. #{assets,jdbcType=DECIMAL},
  579. </if>
  580. <if test="qualification != null">
  581. #{qualification,jdbcType=VARCHAR},
  582. </if>
  583. <if test="cooperationSituation != null">
  584. #{cooperationSituation,jdbcType=VARCHAR},
  585. </if>
  586. <if test="honorPicture != null">
  587. #{honorPicture,jdbcType=VARCHAR},
  588. </if>
  589. <if test="salesTarget != null">
  590. #{salesTarget,jdbcType=VARCHAR},
  591. </if>
  592. <if test="intendedProject != null">
  593. #{intendedProject,jdbcType=VARCHAR},
  594. </if>
  595. <if test="contactsDep != null">
  596. #{contactsDep,jdbcType=VARCHAR},
  597. </if>
  598. <if test="contactsPosition != null">
  599. #{contactsPosition,jdbcType=VARCHAR},
  600. </if>
  601. </trim>
  602. </insert>
  603. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
  604. update organization_identity
  605. <set>
  606. <if test="uid != null">
  607. `uid` = #{uid,jdbcType=VARCHAR},
  608. </if>
  609. <if test="contacts != null">
  610. contacts = #{contacts,jdbcType=VARCHAR},
  611. </if>
  612. <if test="contactMobile != null">
  613. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  614. </if>
  615. <if test="fixedTel != null">
  616. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  617. </if>
  618. <if test="qq != null">
  619. qq = #{qq,jdbcType=VARCHAR},
  620. </if>
  621. <if test="postalAddress != null">
  622. postal_address = #{postalAddress,jdbcType=VARCHAR},
  623. </if>
  624. <if test="postcode != null">
  625. postcode = #{postcode,jdbcType=VARCHAR},
  626. </if>
  627. <if test="unitName != null">
  628. unit_name = #{unitName,jdbcType=VARCHAR},
  629. </if>
  630. <if test="registeredCapital != null">
  631. registered_capital = #{registeredCapital,jdbcType=DECIMAL},
  632. </if>
  633. <if test="licenceNumber != null">
  634. licence_number = #{licenceNumber,jdbcType=VARCHAR},
  635. </if>
  636. <if test="licenceProvince != null">
  637. licence_province = #{licenceProvince,jdbcType=INTEGER},
  638. </if>
  639. <if test="licenceCity != null">
  640. licence_city = #{licenceCity,jdbcType=INTEGER},
  641. </if>
  642. <if test="licenceArea != null">
  643. licence_area = #{licenceArea,jdbcType=INTEGER},
  644. </if>
  645. <if test="licenceScanningUrl != null">
  646. licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
  647. </if>
  648. <if test="orgCode != null">
  649. org_code = #{orgCode,jdbcType=VARCHAR},
  650. </if>
  651. <if test="orgCodeUrl != null">
  652. org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
  653. </if>
  654. <if test="bankAccount != null">
  655. bank_account = #{bankAccount,jdbcType=VARCHAR},
  656. </if>
  657. <if test="banks != null">
  658. banks = #{banks,jdbcType=VARCHAR},
  659. </if>
  660. <if test="bankBranch != null">
  661. bank_branch = #{bankBranch,jdbcType=VARCHAR},
  662. </if>
  663. <if test="bankCardNumber != null">
  664. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  665. </if>
  666. <if test="validationAmount != null">
  667. validation_amount = #{validationAmount,jdbcType=DECIMAL},
  668. </if>
  669. <if test="identityType != null">
  670. identity_type = #{identityType,jdbcType=INTEGER},
  671. </if>
  672. <if test="locationProvince != null">
  673. location_province = #{locationProvince,jdbcType=INTEGER},
  674. </if>
  675. <if test="locationCity != null">
  676. location_city = #{locationCity,jdbcType=INTEGER},
  677. </if>
  678. <if test="locationArea != null">
  679. location_area = #{locationArea,jdbcType=INTEGER},
  680. </if>
  681. <if test="legalPerson != null">
  682. legal_person = #{legalPerson,jdbcType=VARCHAR},
  683. </if>
  684. <if test="legalPersonIdCard != null">
  685. legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
  686. </if>
  687. <if test="lastYearTaxReportUrl != null">
  688. last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  689. </if>
  690. <if test="auditStatus != null">
  691. audit_status = #{auditStatus,jdbcType=INTEGER},
  692. </if>
  693. <if test="process != null">
  694. `process` = #{process,jdbcType=INTEGER},
  695. </if>
  696. <if test="wrongCount != null">
  697. wrong_count = #{wrongCount,jdbcType=INTEGER},
  698. </if>
  699. <if test="paymentDate != null">
  700. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  701. </if>
  702. <if test="listed != null">
  703. listed = #{listed,jdbcType=INTEGER},
  704. </if>
  705. <if test="listedDate != null">
  706. listed_date = #{listedDate,jdbcType=TIMESTAMP},
  707. </if>
  708. <if test="listedType != null">
  709. listed_type = #{listedType,jdbcType=INTEGER},
  710. </if>
  711. <if test="stockCode != null">
  712. stock_code = #{stockCode,jdbcType=VARCHAR},
  713. </if>
  714. <if test="certificateNumber != null">
  715. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  716. </if>
  717. <if test="issuingDate != null">
  718. issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
  719. </if>
  720. <if test="cogContacts != null">
  721. cog_contacts = #{cogContacts,jdbcType=INTEGER},
  722. </if>
  723. <if test="techPrincipal != null">
  724. tech_principal = #{techPrincipal,jdbcType=VARCHAR},
  725. </if>
  726. <if test="contactsFixedTel != null">
  727. contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
  728. </if>
  729. <if test="contactsFax != null">
  730. contacts_fax = #{contactsFax,jdbcType=VARCHAR},
  731. </if>
  732. <if test="legalPersonTel != null">
  733. legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
  734. </if>
  735. <if test="legalPersonFax != null">
  736. legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
  737. </if>
  738. <if test="legalPersonEmail != null">
  739. legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
  740. </if>
  741. <if test="registrationTime != null">
  742. registration_time = #{registrationTime,jdbcType=TIMESTAMP},
  743. </if>
  744. <if test="ratepayCode != null">
  745. ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
  746. </if>
  747. <if test="industry != null">
  748. industry = #{industry,jdbcType=INTEGER},
  749. </if>
  750. <if test="enterpriseScale != null">
  751. enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
  752. </if>
  753. <if test="registerType != null">
  754. register_type = #{registerType,jdbcType=VARCHAR},
  755. </if>
  756. <if test="foreignInvestment != null">
  757. foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
  758. </if>
  759. <if test="field != null">
  760. field = #{field,jdbcType=VARCHAR},
  761. </if>
  762. <if test="taxAuthority != null">
  763. tax_authority = #{taxAuthority,jdbcType=INTEGER},
  764. </if>
  765. <if test="ratepayMethod != null">
  766. ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
  767. </if>
  768. <if test="highTechZone != null">
  769. high_tech_zone = #{highTechZone,jdbcType=INTEGER},
  770. </if>
  771. <if test="riskInvestment != null">
  772. risk_investment = #{riskInvestment,jdbcType=INTEGER},
  773. </if>
  774. <if test="businessScope != null">
  775. business_scope = #{businessScope,jdbcType=VARCHAR},
  776. </if>
  777. <if test="highTechName != null">
  778. high_tech_name = #{highTechName,jdbcType=VARCHAR},
  779. </if>
  780. <if test="patentProryStatementUrl != null">
  781. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  782. </if>
  783. <if test="international != null">
  784. international = #{international,jdbcType=INTEGER},
  785. </if>
  786. <if test="reviewInstructions != null">
  787. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  788. </if>
  789. <if test="investment != null">
  790. investment = #{investment,jdbcType=INTEGER},
  791. </if>
  792. <if test="yearSalesAmount != null">
  793. year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
  794. </if>
  795. <if test="lastYearResearchAmount != null">
  796. last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
  797. </if>
  798. <if test="assets != null">
  799. assets = #{assets,jdbcType=DECIMAL},
  800. </if>
  801. <if test="qualification != null">
  802. qualification = #{qualification,jdbcType=VARCHAR},
  803. </if>
  804. <if test="cooperationSituation != null">
  805. cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
  806. </if>
  807. <if test="honorPicture != null">
  808. honor_picture = #{honorPicture,jdbcType=VARCHAR},
  809. </if>
  810. <if test="salesTarget != null">
  811. sales_target = #{salesTarget,jdbcType=VARCHAR},
  812. </if>
  813. <if test="intendedProject != null">
  814. intended_project = #{intendedProject,jdbcType=VARCHAR},
  815. </if>
  816. <if test="contactsDep != null">
  817. contacts_dep = #{contactsDep,jdbcType=VARCHAR},
  818. </if>
  819. <if test="contactsPosition != null">
  820. contacts_position = #{contactsPosition,jdbcType=VARCHAR},
  821. </if>
  822. </set>
  823. where id = #{id,jdbcType=VARCHAR}
  824. </update>
  825. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
  826. update organization_identity
  827. set `uid` = #{uid,jdbcType=VARCHAR},
  828. contacts = #{contacts,jdbcType=VARCHAR},
  829. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  830. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  831. qq = #{qq,jdbcType=VARCHAR},
  832. postal_address = #{postalAddress,jdbcType=VARCHAR},
  833. postcode = #{postcode,jdbcType=VARCHAR},
  834. unit_name = #{unitName,jdbcType=VARCHAR},
  835. registered_capital = #{registeredCapital,jdbcType=DECIMAL},
  836. licence_number = #{licenceNumber,jdbcType=VARCHAR},
  837. licence_province = #{licenceProvince,jdbcType=INTEGER},
  838. licence_city = #{licenceCity,jdbcType=INTEGER},
  839. licence_area = #{licenceArea,jdbcType=INTEGER},
  840. licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
  841. org_code = #{orgCode,jdbcType=VARCHAR},
  842. org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
  843. bank_account = #{bankAccount,jdbcType=VARCHAR},
  844. banks = #{banks,jdbcType=VARCHAR},
  845. bank_branch = #{bankBranch,jdbcType=VARCHAR},
  846. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  847. validation_amount = #{validationAmount,jdbcType=DECIMAL},
  848. identity_type = #{identityType,jdbcType=INTEGER},
  849. location_province = #{locationProvince,jdbcType=INTEGER},
  850. location_city = #{locationCity,jdbcType=INTEGER},
  851. location_area = #{locationArea,jdbcType=INTEGER},
  852. legal_person = #{legalPerson,jdbcType=VARCHAR},
  853. legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
  854. last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  855. audit_status = #{auditStatus,jdbcType=INTEGER},
  856. `process` = #{process,jdbcType=INTEGER},
  857. wrong_count = #{wrongCount,jdbcType=INTEGER},
  858. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  859. listed = #{listed,jdbcType=INTEGER},
  860. listed_date = #{listedDate,jdbcType=TIMESTAMP},
  861. listed_type = #{listedType,jdbcType=INTEGER},
  862. stock_code = #{stockCode,jdbcType=VARCHAR},
  863. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  864. issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
  865. cog_contacts = #{cogContacts,jdbcType=INTEGER},
  866. tech_principal = #{techPrincipal,jdbcType=VARCHAR},
  867. contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
  868. contacts_fax = #{contactsFax,jdbcType=VARCHAR},
  869. legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
  870. legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
  871. legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
  872. registration_time = #{registrationTime,jdbcType=TIMESTAMP},
  873. ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
  874. industry = #{industry,jdbcType=INTEGER},
  875. enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
  876. register_type = #{registerType,jdbcType=VARCHAR},
  877. foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
  878. field = #{field,jdbcType=VARCHAR},
  879. tax_authority = #{taxAuthority,jdbcType=INTEGER},
  880. ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
  881. high_tech_zone = #{highTechZone,jdbcType=INTEGER},
  882. risk_investment = #{riskInvestment,jdbcType=INTEGER},
  883. business_scope = #{businessScope,jdbcType=VARCHAR},
  884. high_tech_name = #{highTechName,jdbcType=VARCHAR},
  885. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  886. international = #{international,jdbcType=INTEGER},
  887. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  888. investment = #{investment,jdbcType=INTEGER},
  889. year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
  890. last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
  891. assets = #{assets,jdbcType=DECIMAL},
  892. qualification = #{qualification,jdbcType=VARCHAR},
  893. cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
  894. honor_picture = #{honorPicture,jdbcType=VARCHAR},
  895. sales_target = #{salesTarget,jdbcType=VARCHAR},
  896. intended_project = #{intendedProject,jdbcType=VARCHAR},
  897. contacts_dep = #{contactsDep,jdbcType=VARCHAR},
  898. contacts_position = #{contactsPosition,jdbcType=VARCHAR}
  899. where id = #{id,jdbcType=VARCHAR}
  900. </update>
  901. <select id="selectOrgIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  902. select
  903. <include refid="Base_Column_List" />
  904. from organization_identity
  905. where uid = #{uid,jdbcType=VARCHAR}
  906. </select>
  907. <select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityBo">
  908. select
  909. t.id,t.uid,t.contacts,t.fixed_tel as fixedTel,
  910. t.qq,t.postal_address
  911. as postalAddress ,t.postcode,
  912. u.email ,t.legal_person
  913. as legalPerson
  914. from user u LEFT JOIN organization_identity t
  915. on t.uid =
  916. u.id
  917. where t.uid=#{uid,jdbcType=VARCHAR}
  918. </select>
  919. <select id="selectAllOrgIndentity" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
  920. select u.id as uid, i.unit_name as unitName
  921. from user u INNER JOIN
  922. organization_identity i on u.id = i.uid
  923. where
  924. i.audit_status = 5
  925. and u.lvl &gt; 0
  926. <if test="_parameter != null">
  927. and u.aid = #{aid,jdbcType=VARCHAR}
  928. </if>
  929. </select>
  930. <select id="selectBasicInfo" resultType="com.goafanti.user.bo.OrgBasicInfoBo">
  931. select oi.id,
  932. oi.uid as
  933. uid, oi.unit_name as unitName, oi.licence_province as licenceProvince,
  934. oi.licence_city as licenceCity, oi.licence_area as licenceArea, oi.postal_address as
  935. postalAddress,
  936. oi.contacts_fixed_tel as
  937. contactsFixedTel, oi.contacts_fax as
  938. contactsFax,oi.legal_person_tel as
  939. legalPersonTel,
  940. oi.legal_person_fax as legalPersonFax,
  941. oi.legal_person_email as legalPersonEmail,
  942. oi.registered_capital as
  943. registeredCapital,
  944. oi.registration_time as registrationTime,
  945. oi.legal_person as legalPerson,
  946. oi.legal_person_id_card as
  947. legalPersonIdCard, oi.org_code as orgCode,
  948. oi.ratepay_code as
  949. ratepayCode, oi.industry, oi.enterprise_scale as
  950. enterpriseScale,
  951. oi.register_type as registerType,
  952. oi.foreign_investment as
  953. foreignInvestment, oi.field, oi.tax_authority
  954. as taxAuthority,
  955. oi.listed_date as listedDate,
  956. oi.ratepay_method as ratepayMethod,
  957. oi.listed, oi.high_tech_zone as highTechZone,
  958. oi.risk_investment as
  959. riskInvestment, oi.stock_code as stockCode,
  960. oi.business_scope as
  961. businessScope, oi.high_tech_name as highTechName,
  962. oi.listed_type as
  963. listedType,
  964. ohr.id as hid, ohr.firm_total as firmTotal, ohr.tech_total
  965. as techTotal
  966. from organization_identity oi
  967. LEFT JOIN org_human_resource
  968. ohr
  969. on oi.uid = ohr.uid and ohr.year = #{1}
  970. where oi.uid = #{0}
  971. </select>
  972. <select id="selectOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityDetailBo">
  973. select
  974. id, uid, unit_name as unitName, identity_type as identityType,
  975. legal_person as legalPerson, legal_person_id_card as legalPersonIdCard, registration_time as registrationTime,
  976. licence_number as licenceNumber, licence_province as licenceProvince, licence_city as licenceCity,
  977. licence_area as licenceArea, licence_scanning_url as licenceScanningUrl, org_code as orgCode,
  978. org_code_url as orgCodeUrl, banks, bank_branch as bankBranch, bank_card_number as bankCardNumber,
  979. location_province as locationProvince, location_city as locationCity, location_area as locationArea,
  980. validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus,
  981. last_year_tax_report_url as lastYearTaxReportUrl
  982. from organization_identity
  983. where uid = #{uid,jdbcType=VARCHAR}
  984. </select>
  985. <select id="selectAuditorOrgIdentityDetailByUserId" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
  986. select
  987. u.aid, u.mid, u.lvl,
  988. oi.id, oi.uid, oi.unit_name as unitName, oi.identity_type as identityType,
  989. oi.legal_person as legalPerson, oi.legal_person_id_card as legalPersonIdCard, oi.registration_time as registrationTime,
  990. oi.licence_number as licenceNumber, oi.licence_province as licenceProvince, oi.licence_city as licenceCity,
  991. oi.licence_area as licenceArea, oi.licence_scanning_url as licenceScanningUrl, oi.org_code as orgCode,
  992. oi.org_code_url as orgCodeUrl, oi.banks, bank_branch as bankBranch, oi.bank_card_number as bankCardNumber,
  993. oi.location_province as locationProvince, oi.location_city as locationCity, oi.location_area as locationArea,
  994. oi.validation_amount as validationAmount, oi.payment_date as paymentDate, oi.audit_status as auditStatus,
  995. oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field, oi.registered_capital as registeredCapital,
  996. ratepay.id as ratepayId
  997. from user u
  998. LEFT JOIN organization_identity oi on oi.uid = u.id
  999. LEFT JOIN org_ratepay ratepay on ratepay.uid = u.id and ratepay.year = #{year,jdbcType=INTEGER} and deleted_sign = 0
  1000. where u.id = #{uid,jdbcType=VARCHAR}
  1001. </select>
  1002. <select id="selectManagerUnitNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
  1003. select u.id as uid, i.unit_name as unitName
  1004. from user u INNER JOIN
  1005. organization_identity i on u.id = i.uid
  1006. where u.lvl = 1
  1007. <if test="_parameter != null">
  1008. and u.mid = #{aid,jdbcType=VARCHAR}
  1009. </if>
  1010. </select>
  1011. <select id="selectManagerAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames">
  1012. select u.id as uid, i.unit_name as unitName
  1013. from user u INNER JOIN
  1014. organization_identity i on u.id = i.uid
  1015. where u.lvl = 1 and i.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1016. <if test="aid != null">
  1017. and u.mid = #{aid,jdbcType=VARCHAR}
  1018. </if>
  1019. </select>
  1020. <select id="selectAchievementOrgOwner" resultType="com.goafanti.user.bo.OrgUnitNames">
  1021. select u.id as uid, i.unit_name as unitName
  1022. from user u INNER JOIN
  1023. organization_identity i on u.id = i.uid
  1024. where u.lvl = 1 and i.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1025. <if test="aid != null">
  1026. and u.aid = #{aid,jdbcType=VARCHAR}
  1027. </if>
  1028. </select>
  1029. <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.OrgSubscriberListBo">
  1030. SELECT
  1031. u.id as uid,
  1032. oi.unit_name as unitName,
  1033. u.number,
  1034. oi.id as identityId,
  1035. info.logo_url as logoUrl,
  1036. oi.licence_province as province,
  1037. adc.achievement_count as achievementNum,
  1038. adc.demand_count as demandNum
  1039. FROM
  1040. <![CDATA[ user ]]> u
  1041. LEFT JOIN organization_identity oi ON oi.uid = u.id
  1042. LEFT JOIN organization_info info on info.uid = u.id
  1043. LEFT JOIN organization_tech ot on ot.uid = u.id
  1044. LEFT JOIN achievement_demand_count adc on adc.uid = u.id
  1045. WHERE
  1046. u.type = 1
  1047. <if test="null != level and level==1 ">
  1048. AND u.lvl <![CDATA[ >= ]]> 1
  1049. </if>
  1050. <if test="null !=level and level==0">
  1051. AND u.lvl = 0
  1052. </if>
  1053. <if test="province != null">
  1054. AND oi.licence_province = #{province,jdbcType=INTEGER}
  1055. </if>
  1056. <if test="city != null">
  1057. AND oi.licence_city = #{city,jdbcType=INTEGER}
  1058. </if>
  1059. <if test="area != null">
  1060. AND oi.licence_area = #{area,jdbcType=INTEGER}
  1061. </if>
  1062. <if test="field != null">
  1063. AND ot.search_area_category like CONCAT(#{field,jdbcType=VARCHAR},'%')
  1064. </if>
  1065. <if test="name != null">
  1066. AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1067. </if>
  1068. ORDER BY u.number
  1069. <if test="page_sql!=null">
  1070. ${page_sql}
  1071. </if>
  1072. </select>
  1073. <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
  1074. SELECT
  1075. count(1)
  1076. FROM
  1077. <![CDATA[ user ]]> u
  1078. LEFT JOIN organization_identity oi ON oi.uid = u.id
  1079. LEFT JOIN organization_info info on info.uid = u.id
  1080. LEFT JOIN organization_tech ot on ot.uid = u.id
  1081. WHERE
  1082. u.type = 1
  1083. <if test="null != level and level==1 ">
  1084. AND u.lvl <![CDATA[ >= ]]> 1
  1085. </if>
  1086. <if test="null !=level and level==0">
  1087. AND u.lvl = 0
  1088. </if>
  1089. <if test="province != null">
  1090. AND oi.licence_province = #{province,jdbcType=INTEGER}
  1091. </if>
  1092. <if test="city != null">
  1093. AND oi.licence_city = #{city,jdbcType=INTEGER}
  1094. </if>
  1095. <if test="area != null">
  1096. AND oi.licence_area = #{area,jdbcType=INTEGER}
  1097. </if>
  1098. <if test="field != null">
  1099. AND ot.search_area_category like CONCAT(#{field,jdbcType=VARCHAR},'%')
  1100. </if>
  1101. <if test="name != null">
  1102. AND oi.unit_name like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
  1103. </if>
  1104. </select>
  1105. <update id="updateServiceByUid" parameterType="com.goafanti.common.model.OrganizationIdentity">
  1106. update organization_identity
  1107. <set>
  1108. <if test="contacts != null">
  1109. contacts = #{contacts,jdbcType=VARCHAR},
  1110. </if>
  1111. <if test="contactMobile != null">
  1112. contact_mobile = #{contactMobile,jdbcType=VARCHAR},
  1113. </if>
  1114. <if test="fixedTel != null">
  1115. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  1116. </if>
  1117. <if test="qq != null">
  1118. qq = #{qq,jdbcType=VARCHAR},
  1119. </if>
  1120. <if test="postalAddress != null">
  1121. postal_address = #{postalAddress,jdbcType=VARCHAR},
  1122. </if>
  1123. <if test="postcode != null">
  1124. postcode = #{postcode,jdbcType=VARCHAR},
  1125. </if>
  1126. <if test="unitName != null">
  1127. unit_name = #{unitName,jdbcType=VARCHAR},
  1128. </if>
  1129. <if test="registeredCapital != null">
  1130. registered_capital = #{registeredCapital,jdbcType=DECIMAL},
  1131. </if>
  1132. <if test="licenceNumber != null">
  1133. licence_number = #{licenceNumber,jdbcType=VARCHAR},
  1134. </if>
  1135. <if test="licenceProvince != null">
  1136. licence_province = #{licenceProvince,jdbcType=INTEGER},
  1137. </if>
  1138. <if test="licenceCity != null">
  1139. licence_city = #{licenceCity,jdbcType=INTEGER},
  1140. </if>
  1141. <if test="licenceArea != null">
  1142. licence_area = #{licenceArea,jdbcType=INTEGER},
  1143. </if>
  1144. <if test="licenceScanningUrl != null">
  1145. licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
  1146. </if>
  1147. <if test="orgCode != null">
  1148. org_code = #{orgCode,jdbcType=VARCHAR},
  1149. </if>
  1150. <if test="orgCodeUrl != null">
  1151. org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
  1152. </if>
  1153. <if test="bankAccount != null">
  1154. bank_account = #{bankAccount,jdbcType=VARCHAR},
  1155. </if>
  1156. <if test="banks != null">
  1157. banks = #{banks,jdbcType=VARCHAR},
  1158. </if>
  1159. <if test="bankBranch != null">
  1160. bank_branch = #{bankBranch,jdbcType=VARCHAR},
  1161. </if>
  1162. <if test="bankCardNumber != null">
  1163. bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
  1164. </if>
  1165. <if test="validationAmount != null">
  1166. validation_amount = #{validationAmount,jdbcType=DECIMAL},
  1167. </if>
  1168. <if test="identityType != null">
  1169. identity_type = #{identityType,jdbcType=INTEGER},
  1170. </if>
  1171. <if test="locationProvince != null">
  1172. location_province = #{locationProvince,jdbcType=INTEGER},
  1173. </if>
  1174. <if test="locationCity != null">
  1175. location_city = #{locationCity,jdbcType=INTEGER},
  1176. </if>
  1177. <if test="locationArea != null">
  1178. location_area = #{locationArea,jdbcType=INTEGER},
  1179. </if>
  1180. <if test="legalPerson != null">
  1181. legal_person = #{legalPerson,jdbcType=VARCHAR},
  1182. </if>
  1183. <if test="legalPersonIdCard != null">
  1184. legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
  1185. </if>
  1186. <if test="lastYearTaxReportUrl != null">
  1187. last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
  1188. </if>
  1189. <if test="auditStatus != null">
  1190. audit_status = #{auditStatus,jdbcType=INTEGER},
  1191. </if>
  1192. <if test="process != null">
  1193. `process` = #{process,jdbcType=INTEGER},
  1194. </if>
  1195. <if test="wrongCount != null">
  1196. wrong_count = #{wrongCount,jdbcType=INTEGER},
  1197. </if>
  1198. <if test="paymentDate != null">
  1199. payment_date = #{paymentDate,jdbcType=TIMESTAMP},
  1200. </if>
  1201. <if test="listed != null">
  1202. listed = #{listed,jdbcType=INTEGER},
  1203. </if>
  1204. <if test="listedDate != null">
  1205. listed_date = #{listedDate,jdbcType=TIMESTAMP},
  1206. </if>
  1207. <if test="listedType != null">
  1208. listed_type = #{listedType,jdbcType=INTEGER},
  1209. </if>
  1210. <if test="stockCode != null">
  1211. stock_code = #{stockCode,jdbcType=VARCHAR},
  1212. </if>
  1213. <if test="certificateNumber != null">
  1214. certificate_number = #{certificateNumber,jdbcType=VARCHAR},
  1215. </if>
  1216. <if test="issuingDate != null">
  1217. issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
  1218. </if>
  1219. <if test="cogContacts != null">
  1220. cog_contacts = #{cogContacts,jdbcType=INTEGER},
  1221. </if>
  1222. <if test="techPrincipal != null">
  1223. tech_principal = #{techPrincipal,jdbcType=VARCHAR},
  1224. </if>
  1225. <if test="contactsFixedTel != null">
  1226. contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
  1227. </if>
  1228. <if test="contactsFax != null">
  1229. contacts_fax = #{contactsFax,jdbcType=VARCHAR},
  1230. </if>
  1231. <if test="legalPersonTel != null">
  1232. legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
  1233. </if>
  1234. <if test="legalPersonFax != null">
  1235. legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
  1236. </if>
  1237. <if test="legalPersonEmail != null">
  1238. legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
  1239. </if>
  1240. <if test="registrationTime != null">
  1241. registration_time = #{registrationTime,jdbcType=TIMESTAMP},
  1242. </if>
  1243. <if test="ratepayCode != null">
  1244. ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
  1245. </if>
  1246. <if test="industry != null">
  1247. industry = #{industry,jdbcType=INTEGER},
  1248. </if>
  1249. <if test="enterpriseScale != null">
  1250. enterprise_scale = #{enterpriseScale,jdbcType=VARCHAR},
  1251. </if>
  1252. <if test="registerType != null">
  1253. register_type = #{registerType,jdbcType=VARCHAR},
  1254. </if>
  1255. <if test="foreignInvestment != null">
  1256. foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
  1257. </if>
  1258. <if test="field != null">
  1259. field = #{field,jdbcType=VARCHAR},
  1260. </if>
  1261. <if test="taxAuthority != null">
  1262. tax_authority = #{taxAuthority,jdbcType=INTEGER},
  1263. </if>
  1264. <if test="ratepayMethod != null">
  1265. ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
  1266. </if>
  1267. <if test="highTechZone != null">
  1268. high_tech_zone = #{highTechZone,jdbcType=INTEGER},
  1269. </if>
  1270. <if test="riskInvestment != null">
  1271. risk_investment = #{riskInvestment,jdbcType=INTEGER},
  1272. </if>
  1273. <if test="businessScope != null">
  1274. business_scope = #{businessScope,jdbcType=VARCHAR},
  1275. </if>
  1276. <if test="highTechName != null">
  1277. high_tech_name = #{highTechName,jdbcType=VARCHAR},
  1278. </if>
  1279. <if test="patentProryStatementUrl != null">
  1280. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  1281. </if>
  1282. <if test="international != null">
  1283. international = #{international,jdbcType=INTEGER},
  1284. </if>
  1285. <if test="reviewInstructions != null">
  1286. review_instructions = #{reviewInstructions,jdbcType=VARCHAR},
  1287. </if>
  1288. <if test="investment != null">
  1289. investment = #{investment,jdbcType=INTEGER},
  1290. </if>
  1291. <if test="yearSalesAmount != null">
  1292. year_sales_amount = #{yearSalesAmount,jdbcType=DECIMAL},
  1293. </if>
  1294. <if test="lastYearResearchAmount != null">
  1295. last_year_research_amount = #{lastYearResearchAmount,jdbcType=DECIMAL},
  1296. </if>
  1297. <if test="assets != null">
  1298. assets = #{assets,jdbcType=DECIMAL},
  1299. </if>
  1300. <if test="qualification != null">
  1301. qualification = #{qualification,jdbcType=VARCHAR},
  1302. </if>
  1303. <if test="cooperationSituation != null">
  1304. cooperation_situation = #{cooperationSituation,jdbcType=VARCHAR},
  1305. </if>
  1306. <if test="honorPicture != null">
  1307. honor_picture = #{honorPicture,jdbcType=VARCHAR},
  1308. </if>
  1309. <if test="salesTarget != null">
  1310. sales_target = #{salesTarget,jdbcType=VARCHAR},
  1311. </if>
  1312. <if test="intendedProject != null">
  1313. intended_project = #{intendedProject,jdbcType=VARCHAR},
  1314. </if>
  1315. <if test="contactsDep != null">
  1316. contacts_dep = #{contactsDep,jdbcType=VARCHAR},
  1317. </if>
  1318. <if test="contactsPosition != null">
  1319. contacts_position = #{contactsPosition,jdbcType=VARCHAR},
  1320. </if>
  1321. </set>
  1322. where uid = #{uid,jdbcType=VARCHAR}
  1323. </update>
  1324. <insert id="insertBatch" parameterType="com.goafanti.user.bo.InputUserChannel">
  1325. INSERT INTO organization_identity
  1326. (id, uid, contacts, contact_mobile,location_province,location_city)VALUES
  1327. <foreach item="item" index="index" collection="list" separator=",">
  1328. (UUID(), #{item.uid,jdbcType=VARCHAR}, #{item.contacts,jdbcType=VARCHAR},
  1329. #{item.contactMobile,jdbcType=VARCHAR}, #{item.province,jdbcType=TIMESTAMP}, #{item.city,jdbcType=TIMESTAMP})
  1330. </foreach>
  1331. </insert>
  1332. <select id="selectByOrgCode" parameterType="java.lang.String" resultMap="BaseResultMap">
  1333. select
  1334. <include refid="Base_Column_List" />
  1335. from organization_identity
  1336. where org_code = #{orgCode}
  1337. </select>
  1338. </mapper>