PatentInfoMapper.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  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.PatentInfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentInfo" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="serial_number" property="serialNumber" jdbcType="INTEGER" />
  8. <result column="patent_number" property="patentNumber" jdbcType="VARCHAR" />
  9. <result column="patent_name" property="patentName" jdbcType="VARCHAR" />
  10. <result column="patent_catagory" property="patentCatagory" jdbcType="INTEGER" />
  11. <result column="patent_state" property="patentState" jdbcType="INTEGER" />
  12. <result column="patent_field" property="patentField" jdbcType="INTEGER" />
  13. <result column="patent_des" property="patentDes" jdbcType="VARCHAR" />
  14. <result column="patent_prory_statement_url" property="patentProryStatementUrl" jdbcType="VARCHAR" />
  15. <result column="patent_writing_url" property="patentWritingUrl" jdbcType="VARCHAR" />
  16. <result column="authorization_notice_url" property="authorizationNoticeUrl" jdbcType="VARCHAR" />
  17. <result column="patent_certificate_url" property="patentCertificateUrl" jdbcType="VARCHAR" />
  18. <result column="patent_application_date" property="patentApplicationDate" jdbcType="TIMESTAMP" />
  19. <result column="first_inventor_name" property="firstInventorName" jdbcType="VARCHAR" />
  20. <result column="first_inventor_nationality" property="firstInventorNationality" jdbcType="VARCHAR" />
  21. <result column="first_inventor_id_number" property="firstInventorIdNumber" jdbcType="VARCHAR" />
  22. <result column="first_inventor_is_publish" property="firstInventorIsPublish" jdbcType="INTEGER" />
  23. <result column="second_inventor_name" property="secondInventorName" jdbcType="VARCHAR" />
  24. <result column="second_inventor_nationality" property="secondInventorNationality" jdbcType="VARCHAR" />
  25. <result column="second_inventor_is_publish" property="secondInventorIsPublish" jdbcType="INTEGER" />
  26. <result column="third_inventor_name" property="thirdInventorName" jdbcType="VARCHAR" />
  27. <result column="third_inventor_nationality" property="thirdInventorNationality" jdbcType="VARCHAR" />
  28. <result column="third_inventor_is_publish" property="thirdInventorIsPublish" jdbcType="INTEGER" />
  29. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  30. <result column="author" property="author" jdbcType="VARCHAR" />
  31. <result column="authorized_date" property="authorizedDate" jdbcType="TIMESTAMP" />
  32. <result column="office" property="office" jdbcType="VARCHAR" />
  33. <result column="principal" property="principal" jdbcType="VARCHAR" />
  34. <result column="confirm_state" property="confirmState" jdbcType="INTEGER" />
  35. </resultMap>
  36. <sql id="Base_Column_List" >
  37. id, uid, serial_number, patent_number, patent_name, patent_catagory, patent_state,
  38. patent_field, patent_des, patent_prory_statement_url, patent_writing_url, authorization_notice_url,
  39. patent_certificate_url, patent_application_date, first_inventor_name, first_inventor_nationality,
  40. first_inventor_id_number, first_inventor_is_publish, second_inventor_name, second_inventor_nationality,
  41. second_inventor_is_publish, third_inventor_name, third_inventor_nationality, third_inventor_is_publish,
  42. create_time, author, authorized_date,office, principal ,confirm_state
  43. </sql>
  44. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  45. select
  46. <include refid="Base_Column_List" />
  47. from patent_info
  48. where id = #{id,jdbcType=VARCHAR}
  49. </select>
  50. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  51. delete from patent_info
  52. where id = #{id,jdbcType=VARCHAR}
  53. </delete>
  54. <insert id="insert" parameterType="com.goafanti.common.model.PatentInfo" >
  55. insert into patent_info (id, uid, serial_number,
  56. patent_number, patent_name, patent_catagory,
  57. patent_state, patent_field, patent_des,
  58. patent_prory_statement_url, patent_writing_url,
  59. authorization_notice_url, patent_certificate_url,
  60. patent_application_date, first_inventor_name,
  61. first_inventor_nationality, first_inventor_id_number,
  62. first_inventor_is_publish, second_inventor_name,
  63. second_inventor_nationality, second_inventor_is_publish,
  64. third_inventor_name, third_inventor_nationality,
  65. third_inventor_is_publish, create_time, author, authorized_date,
  66. office, principal, confirm_state)
  67. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER},
  68. #{patentNumber,jdbcType=VARCHAR}, #{patentName,jdbcType=VARCHAR}, #{patentCatagory,jdbcType=INTEGER},
  69. #{patentState,jdbcType=INTEGER}, #{patentField,jdbcType=INTEGER}, #{patentDes,jdbcType=VARCHAR},
  70. #{patentProryStatementUrl,jdbcType=VARCHAR}, #{patentWritingUrl,jdbcType=VARCHAR},
  71. #{authorizationNoticeUrl,jdbcType=VARCHAR}, #{patentCertificateUrl,jdbcType=VARCHAR},
  72. #{patentApplicationDate,jdbcType=TIMESTAMP}, #{firstInventorName,jdbcType=VARCHAR},
  73. #{firstInventorNationality,jdbcType=VARCHAR}, #{firstInventorIdNumber,jdbcType=VARCHAR},
  74. #{firstInventorIsPublish,jdbcType=INTEGER}, #{secondInventorName,jdbcType=VARCHAR},
  75. #{secondInventorNationality,jdbcType=VARCHAR}, #{secondInventorIsPublish,jdbcType=INTEGER},
  76. #{thirdInventorName,jdbcType=VARCHAR}, #{thirdInventorNationality,jdbcType=VARCHAR},
  77. #{thirdInventorIsPublish,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{author,jdbcType=VARCHAR},
  78. #{authorizedDate,jdbcType=TIMESTAMP},
  79. #{office,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{confirmState,jdbcType=INTEGER})
  80. </insert>
  81. <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentInfo" >
  82. insert into patent_info
  83. <trim prefix="(" suffix=")" suffixOverrides="," >
  84. <if test="id != null" >
  85. id,
  86. </if>
  87. <if test="uid != null" >
  88. uid,
  89. </if>
  90. <if test="serialNumber != null" >
  91. serial_number,
  92. </if>
  93. <if test="patentNumber != null" >
  94. patent_number,
  95. </if>
  96. <if test="patentName != null" >
  97. patent_name,
  98. </if>
  99. <if test="patentCatagory != null" >
  100. patent_catagory,
  101. </if>
  102. <if test="patentState != null" >
  103. patent_state,
  104. </if>
  105. <if test="patentField != null" >
  106. patent_field,
  107. </if>
  108. <if test="patentDes != null" >
  109. patent_des,
  110. </if>
  111. <if test="patentProryStatementUrl != null" >
  112. patent_prory_statement_url,
  113. </if>
  114. <if test="patentWritingUrl != null" >
  115. patent_writing_url,
  116. </if>
  117. <if test="authorizationNoticeUrl != null" >
  118. authorization_notice_url,
  119. </if>
  120. <if test="patentCertificateUrl != null" >
  121. patent_certificate_url,
  122. </if>
  123. <if test="patentApplicationDate != null" >
  124. patent_application_date,
  125. </if>
  126. <if test="firstInventorName != null" >
  127. first_inventor_name,
  128. </if>
  129. <if test="firstInventorNationality != null" >
  130. first_inventor_nationality,
  131. </if>
  132. <if test="firstInventorIdNumber != null" >
  133. first_inventor_id_number,
  134. </if>
  135. <if test="firstInventorIsPublish != null" >
  136. first_inventor_is_publish,
  137. </if>
  138. <if test="secondInventorName != null" >
  139. second_inventor_name,
  140. </if>
  141. <if test="secondInventorNationality != null" >
  142. second_inventor_nationality,
  143. </if>
  144. <if test="secondInventorIsPublish != null" >
  145. second_inventor_is_publish,
  146. </if>
  147. <if test="thirdInventorName != null" >
  148. third_inventor_name,
  149. </if>
  150. <if test="thirdInventorNationality != null" >
  151. third_inventor_nationality,
  152. </if>
  153. <if test="thirdInventorIsPublish != null" >
  154. third_inventor_is_publish,
  155. </if>
  156. <if test="createTime != null" >
  157. create_time,
  158. </if>
  159. <if test="author != null" >
  160. author,
  161. </if>
  162. <if test="authorizedDate != null" >
  163. authorized_date,
  164. </if>
  165. <if test="office != null" >
  166. office,
  167. </if>
  168. <if test="principal != null" >
  169. principal,
  170. </if>
  171. <if test="confirmState != null">
  172. confirm_state,
  173. </if>
  174. </trim>
  175. <trim prefix="values (" suffix=")" suffixOverrides="," >
  176. <if test="id != null" >
  177. #{id,jdbcType=VARCHAR},
  178. </if>
  179. <if test="uid != null" >
  180. #{uid,jdbcType=VARCHAR},
  181. </if>
  182. <if test="serialNumber != null" >
  183. #{serialNumber,jdbcType=INTEGER},
  184. </if>
  185. <if test="patentNumber != null" >
  186. #{patentNumber,jdbcType=VARCHAR},
  187. </if>
  188. <if test="patentName != null" >
  189. #{patentName,jdbcType=VARCHAR},
  190. </if>
  191. <if test="patentCatagory != null" >
  192. #{patentCatagory,jdbcType=INTEGER},
  193. </if>
  194. <if test="patentState != null" >
  195. #{patentState,jdbcType=INTEGER},
  196. </if>
  197. <if test="patentField != null" >
  198. #{patentField,jdbcType=INTEGER},
  199. </if>
  200. <if test="patentDes != null" >
  201. #{patentDes,jdbcType=VARCHAR},
  202. </if>
  203. <if test="patentProryStatementUrl != null" >
  204. #{patentProryStatementUrl,jdbcType=VARCHAR},
  205. </if>
  206. <if test="patentWritingUrl != null" >
  207. #{patentWritingUrl,jdbcType=VARCHAR},
  208. </if>
  209. <if test="authorizationNoticeUrl != null" >
  210. #{authorizationNoticeUrl,jdbcType=VARCHAR},
  211. </if>
  212. <if test="patentCertificateUrl != null" >
  213. #{patentCertificateUrl,jdbcType=VARCHAR},
  214. </if>
  215. <if test="patentApplicationDate != null" >
  216. #{patentApplicationDate,jdbcType=TIMESTAMP},
  217. </if>
  218. <if test="firstInventorName != null" >
  219. #{firstInventorName,jdbcType=VARCHAR},
  220. </if>
  221. <if test="firstInventorNationality != null" >
  222. #{firstInventorNationality,jdbcType=VARCHAR},
  223. </if>
  224. <if test="firstInventorIdNumber != null" >
  225. #{firstInventorIdNumber,jdbcType=VARCHAR},
  226. </if>
  227. <if test="firstInventorIsPublish != null" >
  228. #{firstInventorIsPublish,jdbcType=INTEGER},
  229. </if>
  230. <if test="secondInventorName != null" >
  231. #{secondInventorName,jdbcType=VARCHAR},
  232. </if>
  233. <if test="secondInventorNationality != null" >
  234. #{secondInventorNationality,jdbcType=VARCHAR},
  235. </if>
  236. <if test="secondInventorIsPublish != null" >
  237. #{secondInventorIsPublish,jdbcType=INTEGER},
  238. </if>
  239. <if test="thirdInventorName != null" >
  240. #{thirdInventorName,jdbcType=VARCHAR},
  241. </if>
  242. <if test="thirdInventorNationality != null" >
  243. #{thirdInventorNationality,jdbcType=VARCHAR},
  244. </if>
  245. <if test="thirdInventorIsPublish != null" >
  246. #{thirdInventorIsPublish,jdbcType=INTEGER},
  247. </if>
  248. <if test="createTime != null" >
  249. #{createTime,jdbcType=TIMESTAMP},
  250. </if>
  251. <if test="author != null" >
  252. #{author,jdbcType=VARCHAR},
  253. </if>
  254. <if test="authorizedDate != null" >
  255. #{authorizedDate,jdbcType=TIMESTAMP},
  256. </if>
  257. <if test="office != null" >
  258. #{office,jdbcType=VARCHAR},
  259. </if>
  260. <if test="principal != null" >
  261. #{principal,jdbcType=VARCHAR},
  262. </if>
  263. <if test="confirmState != null">
  264. #{confirmState,jdbcType=INTEGER}
  265. </if>
  266. </trim>
  267. </insert>
  268. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentInfo" >
  269. update patent_info
  270. <set >
  271. <if test="uid != null" >
  272. uid = #{uid,jdbcType=VARCHAR},
  273. </if>
  274. <if test="serialNumber != null" >
  275. serial_number = #{serialNumber,jdbcType=INTEGER},
  276. </if>
  277. <if test="patentNumber != null" >
  278. patent_number = #{patentNumber,jdbcType=VARCHAR},
  279. </if>
  280. <if test="patentName != null" >
  281. patent_name = #{patentName,jdbcType=VARCHAR},
  282. </if>
  283. <if test="patentCatagory != null" >
  284. patent_catagory = #{patentCatagory,jdbcType=INTEGER},
  285. </if>
  286. <if test="patentState != null" >
  287. patent_state = #{patentState,jdbcType=INTEGER},
  288. </if>
  289. <if test="patentField != null" >
  290. patent_field = #{patentField,jdbcType=INTEGER},
  291. </if>
  292. <if test="patentDes != null" >
  293. patent_des = #{patentDes,jdbcType=VARCHAR},
  294. </if>
  295. <if test="patentProryStatementUrl != null" >
  296. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  297. </if>
  298. <if test="patentWritingUrl != null" >
  299. patent_writing_url = #{patentWritingUrl,jdbcType=VARCHAR},
  300. </if>
  301. <if test="authorizationNoticeUrl != null" >
  302. authorization_notice_url = #{authorizationNoticeUrl,jdbcType=VARCHAR},
  303. </if>
  304. <if test="patentCertificateUrl != null" >
  305. patent_certificate_url = #{patentCertificateUrl,jdbcType=VARCHAR},
  306. </if>
  307. <if test="patentApplicationDate != null" >
  308. patent_application_date = #{patentApplicationDate,jdbcType=TIMESTAMP},
  309. </if>
  310. <if test="firstInventorName != null" >
  311. first_inventor_name = #{firstInventorName,jdbcType=VARCHAR},
  312. </if>
  313. <if test="firstInventorNationality != null" >
  314. first_inventor_nationality = #{firstInventorNationality,jdbcType=VARCHAR},
  315. </if>
  316. <if test="firstInventorIdNumber != null" >
  317. first_inventor_id_number = #{firstInventorIdNumber,jdbcType=VARCHAR},
  318. </if>
  319. <if test="firstInventorIsPublish != null" >
  320. first_inventor_is_publish = #{firstInventorIsPublish,jdbcType=INTEGER},
  321. </if>
  322. <if test="secondInventorName != null" >
  323. second_inventor_name = #{secondInventorName,jdbcType=VARCHAR},
  324. </if>
  325. <if test="secondInventorNationality != null" >
  326. second_inventor_nationality = #{secondInventorNationality,jdbcType=VARCHAR},
  327. </if>
  328. <if test="secondInventorIsPublish != null" >
  329. second_inventor_is_publish = #{secondInventorIsPublish,jdbcType=INTEGER},
  330. </if>
  331. <if test="thirdInventorName != null" >
  332. third_inventor_name = #{thirdInventorName,jdbcType=VARCHAR},
  333. </if>
  334. <if test="thirdInventorNationality != null" >
  335. third_inventor_nationality = #{thirdInventorNationality,jdbcType=VARCHAR},
  336. </if>
  337. <if test="thirdInventorIsPublish != null" >
  338. third_inventor_is_publish = #{thirdInventorIsPublish,jdbcType=INTEGER},
  339. </if>
  340. <if test="createTime != null" >
  341. create_time = #{createTime,jdbcType=TIMESTAMP},
  342. </if>
  343. <if test="author != null" >
  344. author = #{author,jdbcType=VARCHAR},
  345. </if>
  346. <if test="authorizedDate != null" >
  347. authorized_date = #{authorizedDate,jdbcType=VARCHAR},
  348. </if>
  349. <if test="office != null" >
  350. office = #{office,jdbcType=VARCHAR},
  351. </if>
  352. <if test="principal != null" >
  353. principal = #{principal,jdbcType=VARCHAR},
  354. </if>
  355. <if test="confirmState != null">
  356. confirm_state = #{confirmState,jdbcType=INTEGER},
  357. </if>
  358. </set>
  359. where id = #{id,jdbcType=VARCHAR}
  360. </update>
  361. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentInfo" >
  362. update patent_info
  363. set uid = #{uid,jdbcType=VARCHAR},
  364. serial_number = #{serialNumber,jdbcType=INTEGER},
  365. patent_number = #{patentNumber,jdbcType=VARCHAR},
  366. patent_name = #{patentName,jdbcType=VARCHAR},
  367. patent_catagory = #{patentCatagory,jdbcType=INTEGER},
  368. patent_state = #{patentState,jdbcType=INTEGER},
  369. patent_field = #{patentField,jdbcType=INTEGER},
  370. patent_des = #{patentDes,jdbcType=VARCHAR},
  371. patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
  372. patent_writing_url = #{patentWritingUrl,jdbcType=VARCHAR},
  373. authorization_notice_url = #{authorizationNoticeUrl,jdbcType=VARCHAR},
  374. patent_certificate_url = #{patentCertificateUrl,jdbcType=VARCHAR},
  375. patent_application_date = #{patentApplicationDate,jdbcType=TIMESTAMP},
  376. first_inventor_name = #{firstInventorName,jdbcType=VARCHAR},
  377. first_inventor_nationality = #{firstInventorNationality,jdbcType=VARCHAR},
  378. first_inventor_id_number = #{firstInventorIdNumber,jdbcType=VARCHAR},
  379. first_inventor_is_publish = #{firstInventorIsPublish,jdbcType=INTEGER},
  380. second_inventor_name = #{secondInventorName,jdbcType=VARCHAR},
  381. second_inventor_nationality = #{secondInventorNationality,jdbcType=VARCHAR},
  382. second_inventor_is_publish = #{secondInventorIsPublish,jdbcType=INTEGER},
  383. third_inventor_name = #{thirdInventorName,jdbcType=VARCHAR},
  384. third_inventor_nationality = #{thirdInventorNationality,jdbcType=VARCHAR},
  385. third_inventor_is_publish = #{thirdInventorIsPublish,jdbcType=INTEGER},
  386. create_time = #{createTime,jdbcType=TIMESTAMP},
  387. author = #{author,jdbcType=VARCHAR},
  388. authorized_date = #{authorizedDate,jdbcType=VARCHAR},
  389. office = #{office,jdbcType=VARCHAR},
  390. principal = #{principal,jdbcType=VARCHAR},
  391. confirmState = #{confirmState,jdbcType=INTEGER}
  392. where id = #{id,jdbcType=VARCHAR}
  393. </update>
  394. <select id="selectPatentInfoByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  395. select
  396. <include refid="Base_Column_List" />
  397. from patent_info
  398. where uid = #{uid,jdbcType=VARCHAR}
  399. </select>
  400. <select id="findClientApplyListByPage" resultMap="BaseResultMap" parameterType="String">
  401. select
  402. <include refid="Base_Column_List" />
  403. from patent_info
  404. where 1=1
  405. <if test ="uid != null">
  406. and uid = #{uid,jdbcType=VARCHAR}
  407. </if>
  408. <if test = "patentNumber != null" >
  409. and patent_number = #{patentNumber,jdbcType=VARCHAR}
  410. </if>
  411. <if test = "patentName != null">
  412. and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
  413. </if>
  414. <if test = "patentCatagory != null">
  415. and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
  416. </if>
  417. <if test = "patentState != nulll">
  418. and patent_state = #{patentState,jdbcType=INTEGER}
  419. </if>
  420. order by patent_application_date desc
  421. <if test="page_sql!=null">
  422. ${page_sql}
  423. </if>
  424. </select>
  425. <select id="findClentApplyCount" resultType="java.lang.Integer">
  426. select count(1)
  427. from patent_info
  428. </select>
  429. <select id="findManagePatentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentCompositeBo" parameterType="String">
  430. select a.name as author,x.uid ,
  431. x.oid ,x.pid ,
  432. x.serialNumber,x.patentNumber,
  433. x.office , x.unitName ,
  434. x.patentCatagory , x.patentName ,
  435. x.patentState , x.createTime ,
  436. x.patentApplicationDate,x.authorizedDate ,
  437. x.orgCode , x.locationProvince ,
  438. x.locationCity , x.locationArea ,
  439. x.contacts , x.patentField ,
  440. x.patentDes ,x.firstInventorName,
  441. x.firstInventorNationality , x.firstInventorIdNumber ,
  442. x.secondInventorName, x.secondInventorNationality ,
  443. x.thirdInventorName , x.thirdInventorNationality ,
  444. x.patentProryStatementUrl, x.lastYearTaxReportUrl ,
  445. x.patentWritingUrl, x.authorizationNoticeUrl,
  446. x.patentCertificateUrl from
  447. (select u.id as uid ,o.id as oid , p.id as pid , p.serial_number as serialNumber , p.patent_number as patentNumber , p.office ,
  448. o.unit_name as unitName,
  449. p.patent_catagory as patentCatagory,p.patent_name as patentName,p.patent_state as patentState,p.create_time as createTime,
  450. p.patent_application_date as patentApplicationDate,
  451. p.authorized_date as authorizedDate, p.author, o.org_code as orgCode, o.location_province as locationProvince,
  452. o.location_city as locationCity, o.location_area as locationArea,
  453. o.contacts, u.number, p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as firstInventorName,
  454. p.first_inventor_nationality as firstInventorNationality,
  455. p.first_inventor_id_number as firstInventorIdNumber, p.second_inventor_name as secondInventorName ,
  456. p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
  457. p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl ,
  458. o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
  459. p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
  460. from user u
  461. INNER JOIN organization_identity o
  462. on u.id = o.uid
  463. INNER JOIN patent_info p
  464. on u.id = p.uid
  465. where 1=1
  466. <if test="serialNumber != null">
  467. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  468. </if>
  469. <if test="patentNumber != null">
  470. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  471. </if>
  472. <if test="office != null">
  473. and p.office = #{office,jdbcType=VARCHAR}
  474. </if>
  475. <if test="unitName != null">
  476. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  477. </if>
  478. <if test="patentCatagory != null">
  479. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  480. </if>
  481. <if test="patentName != null">
  482. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  483. </if>
  484. <if test="patentState != null">
  485. and p.patent_state= #{patentState,jdbcType=INTEGER}
  486. </if>
  487. <if test="cStart != null">
  488. and
  489. p.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
  490. </if>
  491. <if test="cEnd != null">
  492. and
  493. p.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  494. </if>
  495. <if test="pStart != null">
  496. and
  497. p.patent_application_date <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
  498. </if>
  499. <if test="pEnd != null">
  500. and
  501. p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  502. </if>
  503. <if test="author != null">
  504. and p.author = #{author,jdbcType=VARCHAR}
  505. </if>
  506. <if test="locationProvince != null">
  507. and o.location_province = #{locationProvince,jdbcType=VARCHAR}
  508. </if>
  509. order by p.create_time desc) x
  510. LEFT JOIN admin a on a.id = x.author
  511. <if test="page_sql!=null">
  512. ${page_sql}
  513. </if>
  514. </select>
  515. <select id="findManagePatentCount" resultType="java.lang.Integer" parameterType="String">
  516. select count(1) from (
  517. select a.name as author,x.uid ,
  518. x.oid ,x.pid ,
  519. x.serialNumber,x.patentNumber,
  520. x.office , x.unitName ,
  521. x.patentCatagory , x.patentName ,
  522. x.patentState , x.createTime ,
  523. x.patentApplicationDate,x.authorizedDate ,
  524. x.orgCode , x.locationProvince ,
  525. x.locationCity , x.locationArea ,
  526. x.contacts , x.patentField ,
  527. x.patentDes ,x.firstInventorName,
  528. x.firstInventorNationality , x.firstInventorIdNumber ,
  529. x.secondInventorName, x.secondInventorNationality ,
  530. x.thirdInventorName , x.thirdInventorNationality ,
  531. x.patentProryStatementUrl, x.lastYearTaxReportUrl ,
  532. x.patentWritingUrl, x.authorizationNoticeUrl,
  533. x.patentCertificateUrl from
  534. (select u.id as uid ,o.id as oid , p.id as pid , p.serial_number as serialNumber , p.patent_number as patentNumber , p.office ,
  535. o.unit_name as unitName,
  536. p.patent_catagory as patentCatagory,p.patent_name as patentName,p.patent_state as patentState,p.create_time as createTime,
  537. p.patent_application_date as patentApplicationDate,
  538. p.authorized_date as authorizedDate, p.author, o.org_code as orgCode, o.location_province as locationProvince,
  539. o.location_city as locationCity, o.location_area as locationArea,
  540. o.contacts, u.number, p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as firstInventorName,
  541. p.first_inventor_nationality as firstInventorNationality,
  542. p.first_inventor_id_number as firstInventorIdNumber, p.second_inventor_name as secondInventorName ,
  543. p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
  544. p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl ,
  545. o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
  546. p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
  547. from user u
  548. INNER JOIN organization_identity o
  549. on u.id = o.uid
  550. INNER JOIN patent_info p
  551. on u.id = p.uid
  552. where 1=1
  553. <if test="serialNumber != null">
  554. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  555. </if>
  556. <if test="patentNumber != null">
  557. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  558. </if>
  559. <if test="office != null">
  560. and p.office = #{office,jdbcType=VARCHAR}
  561. </if>
  562. <if test="unitName != null">
  563. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  564. </if>
  565. <if test="patentCatagory != null">
  566. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  567. </if>
  568. <if test="patentName != null">
  569. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  570. </if>
  571. <if test="patentState != null">
  572. and p.patent_state= #{patentState,jdbcType=INTEGER}
  573. </if>
  574. <if test="cStart != null">
  575. and
  576. p.create_time <![CDATA[ > ]]> #{cStart,jdbcType=TIMESTAMP}
  577. </if>
  578. <if test="cEnd != null">
  579. and
  580. p.create_time <![CDATA[ < ]]> #{cEnd,jdbcType=TIMESTAMP}
  581. </if>
  582. <if test="pStart != null">
  583. and
  584. p.patent_application_date <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
  585. </if>
  586. <if test="pEnd != null">
  587. and
  588. p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
  589. </if>
  590. <if test="author != null">
  591. and p.author = #{author,jdbcType=VARCHAR}
  592. </if>
  593. <if test="locationProvince != null">
  594. and o.location_province=#{locationProvince,jdbcType=VARCHAR}
  595. </if>
  596. order by p.create_time desc) x
  597. LEFT JOIN admin a on a.id = x.author
  598. <if test="page_sql!=null">
  599. ${page_sql}
  600. </if>
  601. )
  602. as total
  603. </select>
  604. <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentPendingBo" parameterType="String">
  605. select n.*,c.id as cid ,c.annual_fee_state as annualFeeState
  606. from patent_cost c INNER JOIN
  607. (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
  608. o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
  609. p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
  610. from user u
  611. INNER JOIN patent_info p on u.id =p.uid
  612. INNER JOIN organization_identity o on o.uid = u.id
  613. <if test="locationProvince != null">
  614. and o.location_province = #{locationProvince,jdbcType=VARCHAR}
  615. </if>
  616. order by p.authorized_date DESC
  617. ) n
  618. on n.pid= c.pid where c.annual_fee_state=0
  619. <if test="page_sql!=null">
  620. ${page_sql}
  621. </if>
  622. </select>
  623. <select id="findManagePendingPaymentCount" resultType="java.lang.Integer" parameterType="String">
  624. select count(1) from (
  625. select n.*,c.id as cid ,c.annual_fee_state as annualFeeState
  626. from patent_cost c INNER JOIN
  627. (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
  628. o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
  629. p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
  630. from user u
  631. INNER JOIN patent_info p on u.id =p.uid
  632. INNER JOIN organization_identity o on o.uid = u.id where p.patent_state=8
  633. <if test="locationProvince != null">
  634. and o.location_province = #{locationProvince,jdbcType=VARCHAR}
  635. </if>
  636. order by p.authorized_date DESC
  637. ) n
  638. on n.pid= c.pid where c.annual_fee_state=0
  639. <if test="page_sql!=null">
  640. ${page_sql}
  641. </if>
  642. ) as total
  643. </select>
  644. <select id="findNoticeOfCorrectionListByPage" parameterType="String" resultType="com.goafanti.techservice.patent.bo.PatentNoticeOfCorrectionBo">
  645. select u.id as uid ,p.id as pid , o.id as oid , p.serial_number as serialNumber , p.patent_number as patentNumber ,
  646. p.patent_name as patentName , p.office ,
  647. o.location_province as locationProvince ,o.unit_name as unitName , p.patent_catagory as patentCatagory ,
  648. p.patent_state as patentState , p.author , p.authorized_date as authorizedDate
  649. FROM user u
  650. INNER JOIN patent_info p on u.id = p.uid
  651. INNER JOIN organization_identity o ON u.id = o.uid
  652. where p.patent_state in (4,6)
  653. <if test="serialNumber != null">
  654. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  655. </if>
  656. <if test="patentNumber != null">
  657. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  658. </if>
  659. <if test="office != null">
  660. and p.office = #{office,jdbcType=VARCHAR}
  661. </if>
  662. <if test="unitName != null">
  663. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  664. </if>
  665. <if test="patentCatagory != null">
  666. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  667. </if>
  668. <if test="patentName != null">
  669. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  670. </if>
  671. <if test="patentState != null">
  672. and p.patent_state= #{patentState,jdbcType=INTEGER}
  673. </if>
  674. <if test="authorizedDate != null">
  675. and p.authorized_date = #{authorizedDate,jdbcType=TIMESTAMP}
  676. </if>
  677. <if test="author != null">
  678. and p.author = #{author,jdbcType=VARCHAR}
  679. </if>
  680. <if test="locationProvince != null">
  681. and o.location_province=#{locationProvince,jdbcType=VARCHAR}
  682. </if>
  683. order by p.authorized_date DESC
  684. <if test="page_sql!=null">
  685. ${page_sql}
  686. </if>
  687. </select>
  688. <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer" parameterType="String">
  689. select count(1) from (
  690. select u.id as uid ,p.id as pid , o.id as oid , p.serial_number as serialNumber , p.patent_number as patentNumber ,
  691. p.patent_name as patentName , p.office ,
  692. o.location_province as locationProvince ,o.unit_name as unitName , p.patent_catagory as patentCatagory ,
  693. p.patent_state as patentState , p.author , p.authorized_date as authorizedDate
  694. FROM user u
  695. INNER JOIN patent_info p on u.id = p.uid
  696. INNER JOIN organization_identity o ON u.id = o.uid
  697. where p.patent_state in (4,6)
  698. <if test="serialNumber != null">
  699. and p.serial_number = #{serialNumber,jdbcType=INTEGER}
  700. </if>
  701. <if test="patentNumber != null">
  702. and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
  703. </if>
  704. <if test="office != null">
  705. and p.office = #{office,jdbcType=VARCHAR}
  706. </if>
  707. <if test="unitName != null">
  708. and o.unit_name= #{unitName,jdbcType=VARCHAR}
  709. </if>
  710. <if test="patentCatagory != null">
  711. and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
  712. </if>
  713. <if test="patentName != null">
  714. and p.patent_name= #{patentName,jdbcType=VARCHAR}
  715. </if>
  716. <if test="patentState != null">
  717. and p.patent_state= #{patentState,jdbcType=INTEGER}
  718. </if>
  719. <if test="authorizedDate != null">
  720. and p.authorized_date = #{authorizedDate,jdbcType=TIMESTAMP}
  721. </if>
  722. <if test="author != null">
  723. and p.author = #{author,jdbcType=VARCHAR}
  724. </if>
  725. <if test="locationProvince != null">
  726. and o.location_province=#{locationProvince,jdbcType=VARCHAR}
  727. </if>
  728. order by p.authorized_date DESC
  729. <if test="page_sql!=null">
  730. ${page_sql}
  731. </if>
  732. ) as n
  733. </select>
  734. </mapper>