PatentInfoMapper.xml 30 KB

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