PatentInfoMapper.xml 33 KB

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