| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.goafanti.common.dao.PatentInfoMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentInfo">
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="serial_number" property="serialNumber"
- jdbcType="INTEGER" />
- <result column="patent_number" property="patentNumber"
- jdbcType="VARCHAR" />
- <result column="patent_name" property="patentName" jdbcType="VARCHAR" />
- <result column="patent_catagory" property="patentCatagory"
- jdbcType="INTEGER" />
- <result column="patent_state" property="patentState" jdbcType="INTEGER" />
- <result column="patent_field" property="patentField" jdbcType="INTEGER" />
- <result column="patent_des" property="patentDes" jdbcType="VARCHAR" />
- <result column="patent_prory_statement_url" property="patentProryStatementUrl"
- jdbcType="VARCHAR" />
- <result column="patent_writing_url" property="patentWritingUrl"
- jdbcType="VARCHAR" />
- <result column="authorization_notice_url" property="authorizationNoticeUrl"
- jdbcType="VARCHAR" />
- <result column="patent_certificate_url" property="patentCertificateUrl"
- jdbcType="VARCHAR" />
- <result column="patent_application_date" property="patentApplicationDate"
- jdbcType="TIMESTAMP" />
- <result column="first_inventor_name" property="firstInventorName"
- jdbcType="VARCHAR" />
- <result column="first_inventor_nationality" property="firstInventorNationality"
- jdbcType="VARCHAR" />
- <result column="first_inventor_id_number" property="firstInventorIdNumber"
- jdbcType="VARCHAR" />
- <result column="first_inventor_is_publish" property="firstInventorIsPublish"
- jdbcType="INTEGER" />
- <result column="second_inventor_name" property="secondInventorName"
- jdbcType="VARCHAR" />
- <result column="second_inventor_nationality" property="secondInventorNationality"
- jdbcType="VARCHAR" />
- <result column="second_inventor_is_publish" property="secondInventorIsPublish"
- jdbcType="INTEGER" />
- <result column="third_inventor_name" property="thirdInventorName"
- jdbcType="VARCHAR" />
- <result column="third_inventor_nationality" property="thirdInventorNationality"
- jdbcType="VARCHAR" />
- <result column="third_inventor_is_publish" property="thirdInventorIsPublish"
- jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="author" property="author" jdbcType="VARCHAR" />
- <result column="authorized_date" property="authorizedDate"
- jdbcType="TIMESTAMP" />
- <result column="office" property="office" jdbcType="VARCHAR" />
- <result column="principal" property="principal" jdbcType="VARCHAR" />
- <result column="confirm_state" property="confirmState"
- jdbcType="INTEGER" />
- <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
- <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
- <result column="contacts" property="contacts" jdbcType="INTEGER" />
- <result column="founder" property="founder" jdbcType="VARCHAR" />
- <result column="contract_id" property="contractId" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List">
- id, uid, serial_number, patent_number, patent_name,
- patent_catagory,
- patent_state,
- patent_field, patent_des,
- patent_prory_statement_url, patent_writing_url,
- authorization_notice_url,
- patent_certificate_url,
- patent_application_date, first_inventor_name,
- first_inventor_nationality,
- first_inventor_id_number,
- first_inventor_is_publish, second_inventor_name,
- second_inventor_nationality,
- second_inventor_is_publish,
- third_inventor_name, third_inventor_nationality,
- third_inventor_is_publish,
- create_time, author, authorized_date,office,
- principal ,confirm_state,
- record_time, deleted_sign, contacts, founder,
- contract_id
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap"
- parameterType="java.lang.String">
- select
- <include refid="Base_Column_List" />
- from patent_info
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from
- patent_info
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.PatentInfo">
- insert into patent_info (id,
- uid, serial_number,
- patent_number, patent_name, patent_catagory,
- patent_state, patent_field, patent_des,
- patent_prory_statement_url,
- patent_writing_url,
- authorization_notice_url, patent_certificate_url,
- patent_application_date, first_inventor_name,
- first_inventor_nationality, first_inventor_id_number,
- first_inventor_is_publish, second_inventor_name,
- second_inventor_nationality, second_inventor_is_publish,
- third_inventor_name, third_inventor_nationality,
- third_inventor_is_publish, create_time, author, authorized_date,
- office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
- contract_id)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
- #{serialNumber,jdbcType=INTEGER},
- #{patentNumber,jdbcType=VARCHAR},
- #{patentName,jdbcType=VARCHAR}, #{patentCatagory,jdbcType=INTEGER},
- #{patentState,jdbcType=INTEGER}, #{patentField,jdbcType=INTEGER},
- #{patentDes,jdbcType=VARCHAR},
- #{patentProryStatementUrl,jdbcType=VARCHAR},
- #{patentWritingUrl,jdbcType=VARCHAR},
- #{authorizationNoticeUrl,jdbcType=VARCHAR},
- #{patentCertificateUrl,jdbcType=VARCHAR},
- #{patentApplicationDate,jdbcType=TIMESTAMP},
- #{firstInventorName,jdbcType=VARCHAR},
- #{firstInventorNationality,jdbcType=VARCHAR},
- #{firstInventorIdNumber,jdbcType=VARCHAR},
- #{firstInventorIsPublish,jdbcType=INTEGER},
- #{secondInventorName,jdbcType=VARCHAR},
- #{secondInventorNationality,jdbcType=VARCHAR},
- #{secondInventorIsPublish,jdbcType=INTEGER},
- #{thirdInventorName,jdbcType=VARCHAR},
- #{thirdInventorNationality,jdbcType=VARCHAR},
- #{thirdInventorIsPublish,jdbcType=INTEGER},
- #{createTime,jdbcType=TIMESTAMP}, #{author,jdbcType=VARCHAR},
- #{authorizedDate,jdbcType=TIMESTAMP},
- #{office,jdbcType=VARCHAR},
- #{principal,jdbcType=VARCHAR}, #{confirmState,jdbcType=INTEGER},
- #{recordTime,jdbcType=TIMESTAMP},
- #{deletedSign,jdbcType=INTEGER},
- #{contacts,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
- #{contractId,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentInfo">
- insert into patent_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="uid != null">
- uid,
- </if>
- <if test="serialNumber != null">
- serial_number,
- </if>
- <if test="patentNumber != null">
- patent_number,
- </if>
- <if test="patentName != null">
- patent_name,
- </if>
- <if test="patentCatagory != null">
- patent_catagory,
- </if>
- <if test="patentState != null">
- patent_state,
- </if>
- <if test="patentField != null">
- patent_field,
- </if>
- <if test="patentDes != null">
- patent_des,
- </if>
- <if test="patentProryStatementUrl != null">
- patent_prory_statement_url,
- </if>
- <if test="patentWritingUrl != null">
- patent_writing_url,
- </if>
- <if test="authorizationNoticeUrl != null">
- authorization_notice_url,
- </if>
- <if test="patentCertificateUrl != null">
- patent_certificate_url,
- </if>
- <if test="patentApplicationDate != null">
- patent_application_date,
- </if>
- <if test="firstInventorName != null">
- first_inventor_name,
- </if>
- <if test="firstInventorNationality != null">
- first_inventor_nationality,
- </if>
- <if test="firstInventorIdNumber != null">
- first_inventor_id_number,
- </if>
- <if test="firstInventorIsPublish != null">
- first_inventor_is_publish,
- </if>
- <if test="secondInventorName != null">
- second_inventor_name,
- </if>
- <if test="secondInventorNationality != null">
- second_inventor_nationality,
- </if>
- <if test="secondInventorIsPublish != null">
- second_inventor_is_publish,
- </if>
- <if test="thirdInventorName != null">
- third_inventor_name,
- </if>
- <if test="thirdInventorNationality != null">
- third_inventor_nationality,
- </if>
- <if test="thirdInventorIsPublish != null">
- third_inventor_is_publish,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="author != null">
- author,
- </if>
- <if test="authorizedDate != null">
- authorized_date,
- </if>
- <if test="office != null">
- office,
- </if>
- <if test="principal != null">
- principal,
- </if>
- <if test="confirmState != null">
- confirm_state,
- </if>
- <if test="recordTime != null">
- record_time,
- </if>
- <if test="deletedSign != null">
- deleted_sign,
- </if>
- <if test="contacts != null">
- contacts,
- </if>
- <if test="founder != null">
- founder,
- </if>
- <if test="contractId != null">
- contract_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="uid != null">
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null">
- #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="patentNumber != null">
- #{patentNumber,jdbcType=VARCHAR},
- </if>
- <if test="patentName != null">
- #{patentName,jdbcType=VARCHAR},
- </if>
- <if test="patentCatagory != null">
- #{patentCatagory,jdbcType=INTEGER},
- </if>
- <if test="patentState != null">
- #{patentState,jdbcType=INTEGER},
- </if>
- <if test="patentField != null">
- #{patentField,jdbcType=INTEGER},
- </if>
- <if test="patentDes != null">
- #{patentDes,jdbcType=VARCHAR},
- </if>
- <if test="patentProryStatementUrl != null">
- #{patentProryStatementUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentWritingUrl != null">
- #{patentWritingUrl,jdbcType=VARCHAR},
- </if>
- <if test="authorizationNoticeUrl != null">
- #{authorizationNoticeUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentCertificateUrl != null">
- #{patentCertificateUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentApplicationDate != null">
- #{patentApplicationDate,jdbcType=TIMESTAMP},
- </if>
- <if test="firstInventorName != null">
- #{firstInventorName,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorNationality != null">
- #{firstInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorIdNumber != null">
- #{firstInventorIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorIsPublish != null">
- #{firstInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="secondInventorName != null">
- #{secondInventorName,jdbcType=VARCHAR},
- </if>
- <if test="secondInventorNationality != null">
- #{secondInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="secondInventorIsPublish != null">
- #{secondInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="thirdInventorName != null">
- #{thirdInventorName,jdbcType=VARCHAR},
- </if>
- <if test="thirdInventorNationality != null">
- #{thirdInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="thirdInventorIsPublish != null">
- #{thirdInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="author != null">
- #{author,jdbcType=VARCHAR},
- </if>
- <if test="authorizedDate != null">
- #{authorizedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="office != null">
- #{office,jdbcType=VARCHAR},
- </if>
- <if test="principal != null">
- #{principal,jdbcType=VARCHAR},
- </if>
- <if test="confirmState != null">
- #{confirmState,jdbcType=INTEGER},
- </if>
- <if test="recordTime != null">
- #{recordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- #{contacts,jdbcType=INTEGER},
- </if>
- <if test="founder != null">
- #{founder,jdbcType=VARCHAR},
- </if>
- <if test="contractId != null">
- #{contractId,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentInfo">
- update patent_info
- <set>
- <if test="uid != null">
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null">
- serial_number = #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="patentNumber != null">
- patent_number = #{patentNumber,jdbcType=VARCHAR},
- </if>
- <if test="patentName != null">
- patent_name = #{patentName,jdbcType=VARCHAR},
- </if>
- <if test="patentCatagory != null">
- patent_catagory = #{patentCatagory,jdbcType=INTEGER},
- </if>
- <if test="patentState != null">
- patent_state = #{patentState,jdbcType=INTEGER},
- </if>
- <if test="patentField != null">
- patent_field = #{patentField,jdbcType=INTEGER},
- </if>
- <if test="patentDes != null">
- patent_des = #{patentDes,jdbcType=VARCHAR},
- </if>
- <if test="patentProryStatementUrl != null">
- patent_prory_statement_url =
- #{patentProryStatementUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentWritingUrl != null">
- patent_writing_url =
- #{patentWritingUrl,jdbcType=VARCHAR},
- </if>
- <if test="authorizationNoticeUrl != null">
- authorization_notice_url =
- #{authorizationNoticeUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentCertificateUrl != null">
- patent_certificate_url =
- #{patentCertificateUrl,jdbcType=VARCHAR},
- </if>
- <if test="patentApplicationDate != null">
- patent_application_date =
- #{patentApplicationDate,jdbcType=TIMESTAMP},
- </if>
- <if test="firstInventorName != null">
- first_inventor_name =
- #{firstInventorName,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorNationality != null">
- first_inventor_nationality =
- #{firstInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorIdNumber != null">
- first_inventor_id_number =
- #{firstInventorIdNumber,jdbcType=VARCHAR},
- </if>
- <if test="firstInventorIsPublish != null">
- first_inventor_is_publish =
- #{firstInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="secondInventorName != null">
- second_inventor_name =
- #{secondInventorName,jdbcType=VARCHAR},
- </if>
- <if test="secondInventorNationality != null">
- second_inventor_nationality =
- #{secondInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="secondInventorIsPublish != null">
- second_inventor_is_publish =
- #{secondInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="thirdInventorName != null">
- third_inventor_name =
- #{thirdInventorName,jdbcType=VARCHAR},
- </if>
- <if test="thirdInventorNationality != null">
- third_inventor_nationality =
- #{thirdInventorNationality,jdbcType=VARCHAR},
- </if>
- <if test="thirdInventorIsPublish != null">
- third_inventor_is_publish =
- #{thirdInventorIsPublish,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="author != null">
- author = #{author,jdbcType=VARCHAR},
- </if>
- <if test="authorizedDate != null">
- authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="office != null">
- office = #{office,jdbcType=VARCHAR},
- </if>
- <if test="principal != null">
- principal = #{principal,jdbcType=VARCHAR},
- </if>
- <if test="confirmState != null">
- confirm_state = #{confirmState,jdbcType=INTEGER},
- </if>
- <if test="recordTime != null">
- record_time = #{recordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- contacts = #{contacts,jdbcType=INTEGER},
- </if>
- <if test="founder != null">
- founder = #{founder,jdbcType=VARCHAR},
- </if>
- <if test="contractId != null">
- contract_id = #{contractId,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentInfo">
- update patent_info
- set uid = #{uid,jdbcType=VARCHAR},
- serial_number =
- #{serialNumber,jdbcType=INTEGER},
- patent_number =
- #{patentNumber,jdbcType=VARCHAR},
- patent_name =
- #{patentName,jdbcType=VARCHAR},
- patent_catagory =
- #{patentCatagory,jdbcType=INTEGER},
- patent_state =
- #{patentState,jdbcType=INTEGER},
- patent_field =
- #{patentField,jdbcType=INTEGER},
- patent_des =
- #{patentDes,jdbcType=VARCHAR},
- patent_prory_statement_url =
- #{patentProryStatementUrl,jdbcType=VARCHAR},
- patent_writing_url =
- #{patentWritingUrl,jdbcType=VARCHAR},
- authorization_notice_url =
- #{authorizationNoticeUrl,jdbcType=VARCHAR},
- patent_certificate_url =
- #{patentCertificateUrl,jdbcType=VARCHAR},
- patent_application_date =
- #{patentApplicationDate,jdbcType=TIMESTAMP},
- first_inventor_name =
- #{firstInventorName,jdbcType=VARCHAR},
- first_inventor_nationality =
- #{firstInventorNationality,jdbcType=VARCHAR},
- first_inventor_id_number
- = #{firstInventorIdNumber,jdbcType=VARCHAR},
- first_inventor_is_publish
- =
- #{firstInventorIsPublish,jdbcType=INTEGER},
- second_inventor_name =
- #{secondInventorName,jdbcType=VARCHAR},
- second_inventor_nationality =
- #{secondInventorNationality,jdbcType=VARCHAR},
- second_inventor_is_publish =
- #{secondInventorIsPublish,jdbcType=INTEGER},
- third_inventor_name =
- #{thirdInventorName,jdbcType=VARCHAR},
- third_inventor_nationality =
- #{thirdInventorNationality,jdbcType=VARCHAR},
- third_inventor_is_publish =
- #{thirdInventorIsPublish,jdbcType=INTEGER},
- create_time =
- #{createTime,jdbcType=TIMESTAMP},
- author = #{author,jdbcType=VARCHAR},
- authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
- office =
- #{office,jdbcType=VARCHAR},
- principal = #{principal,jdbcType=VARCHAR},
- confirm_state = #{confirmState,jdbcType=INTEGER},
- record_time =
- #{recordTime,jdbcType=TIMESTAMP},
- deleted_sign =
- #{deletedSign,jdbcType=INTEGER},
- contacts =
- #{contacts,jdbcType=INTEGER},
- founder = #{founder,jdbcType=VARCHAR},
- contract_id = #{contractId,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="findClientApplyListByPage" resultMap="BaseResultMap"
- parameterType="String">
- select
- <include refid="Base_Column_List" />
- from patent_info
- where deleted_sign = 0
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="patentNumber != null">
- and patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="patentName != null">
- and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
- </if>
- <if test="patentCatagory != null">
- and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentState != nulll">
- and patent_state = #{patentState,jdbcType=INTEGER}
- </if>
- order by serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findClentApplyCount" resultType="java.lang.Integer"
- parameterType="String">
- select count(1)
- from patent_info
- where deleted_sign = 0
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="patentNumber != null">
- and patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="patentName != null">
- and patent_name like "%"#{patentName,jdbcType=VARCHAR}"%"
- </if>
- <if test="patentCatagory != null">
- and patent_catagory = #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentState != nulll">
- and patent_state = #{patentState,jdbcType=INTEGER}
- </if>
- </select>
- <select id="findManagePatentListByPage" resultType="com.goafanti.patent.bo.PatentManageListBo"
- parameterType="String">
- select p.id, p.uid, p.serial_number as serialNumber, p.patent_number
- as patentNumber, p.office, p.patent_catagory as patentCatagory,
- o.licence_province as locationProvince,
- o.unit_name as unitName,
- p.patent_name as patentName, p.patent_state as
- patentState, p.create_time as
- createTime,
- p.patent_application_date as
- patentApplicationDate, p.authorized_date as authorizedDate,
- a.name as
- author, ad.name as founder, c.serial_number as contractNumber
- from patent_info p
- LEFT JOIN organization_identity o on p.uid =
- o.uid
- LEFT JOIN admin a on a.id = p.author
- LEFT JOIN admin ad on ad.id = p.founder
- LEFT JOIN contract c on c.id = p.contract_id
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="contractId != null">
- and p.contract_id = #{contractId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and p.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="patentNumber != null">
- and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="office != null">
- and p.office = #{office,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null">
- and o.unit_name= #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="patentCatagory != null">
- and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentName != null">
- and p.patent_name= #{patentName,jdbcType=VARCHAR}
- </if>
- <if test="patentState != null">
- and p.patent_state= #{patentState,jdbcType=INTEGER}
- </if>
- <if test="cStart != null">
- and
- p.create_time <![CDATA[ > ]]>
- #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and
- p.create_time <![CDATA[ < ]]>
- #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="pStart != null">
- and
- p.patent_application_date <![CDATA[ > ]]>
- #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and
- p.patent_application_date <![CDATA[ < ]]>
- #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="author != null">
- and p.author = #{author,jdbcType=VARCHAR}
- </if>
- <if test="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="locationProvince != null">
- and o.licence_province =
- #{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- ORDER BY p.serial_number DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findManagePatentCount" resultType="java.lang.Integer"
- parameterType="String">
- select count(1)
- from patent_info p
- LEFT JOIN organization_identity o on
- p.uid = o.uid
- LEFT JOIN admin a on a.id = p.author
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="contractId != null">
- and p.contract_id = #{contractId,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null">
- and p.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="patentNumber != null">
- and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="office != null">
- and p.office = #{office,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null">
- and o.unit_name= #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="patentCatagory != null">
- and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentName != null">
- and p.patent_name= #{patentName,jdbcType=VARCHAR}
- </if>
- <if test="patentState != null">
- and p.patent_state= #{patentState,jdbcType=INTEGER}
- </if>
- <if test="cStart != null">
- and
- p.create_time <![CDATA[ > ]]>
- #{cStart,jdbcType=TIMESTAMP}
- </if>
- <if test="cEnd != null">
- and
- p.create_time <![CDATA[ < ]]>
- #{cEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="pStart != null">
- and
- p.patent_application_date <![CDATA[ > ]]>
- #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd != null">
- and
- p.patent_application_date <![CDATA[ < ]]>
- #{pEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="author != null">
- and p.author = #{author,jdbcType=VARCHAR}
- </if>
- <if test="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="locationProvince != null">
- and
- o.licence_province=#{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- </select>
- <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
- parameterType="String">
- select p.id as pid, p.uid as uid, o.id as oid, c.id as cid,
- p.serial_number as serialNumber,
- p.patent_number as patentNumber, o.licence_province as locationProvince, o.unit_name
- as unitName,
- p.patent_catagory as patentCatagory, p.patent_name as patentName, p.patent_state as
- patentState,
- c.annual_fee_state as annualFeeState, p.authorized_date as authorizedDate
- from patent_info p
- LEFT JOIN patent_cost c on p.id = c.pid and c.annual_fee_state = 0
- LEFT JOIN organization_identity o on p.uid = o.uid
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0 and c.annual_fee_state = 0
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
-
- <if test="locationProvince != null">
- and o.licence_province =
- #{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- ORDER BY p.serial_number DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findManagePendingPaymentCount" resultType="java.lang.Integer"
- parameterType="String">
- select count(1)
- from patent_info p
- INNER JOIN patent_cost c on p.id = c.pid
- LEFT JOIN organization_identity o on p.uid = o.id
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0 and c.annual_fee_state = 0
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="locationProvince != null">
- and o.licence_province =
- #{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- </select>
- <select id="findNoticeOfCorrectionListByPage" parameterType="String"
- resultType="com.goafanti.patent.bo.PatentNoticeOfCorrectionBo">
- select p.uid as uid ,p.id as pid , o.id as oid , p.serial_number as
- serialNumber , p.patent_number as patentNumber ,
- p.patent_name as patentName , p.office ,
- o.location_province as locationProvince,
- o.unit_name as unitName , p.patent_catagory as
- patentCatagory ,
- p.patent_state as patentState , a.name as author , p.record_time as
- recordTime
- FROM patent_info p
- LEFT JOIN organization_identity o ON o.uid = p.uid
- LEFT JOIN admin a on a.id = p.author
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.patent_state in
- (6,8) and p.deleted_sign = 0
-
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
-
- <if test="serialNumber != null">
- and p.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="patentNumber != null">
- and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="office != null">
- and p.office = #{office,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null">
- and o.unit_name= #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="patentCatagory != null">
- and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentName != null">
- and p.patent_name= #{patentName,jdbcType=VARCHAR}
- </if>
- <if test="patentState != null">
- and p.patent_state= #{patentState,jdbcType=INTEGER}
- </if>
- <if test="authorizedDate != null">
- and p.authorized_date =
- #{authorizedDate,jdbcType=TIMESTAMP}
- </if>
- <if test="author != null">
- and p.author = #{author,jdbcType=VARCHAR}
- </if>
- <if test="locationProvince != null">
- and
- o.licence_province=#{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- order by p.serial_number DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
- <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer"
- parameterType="String">
- select count(1)
- FROM patent_info p
- LEFT JOIN organization_identity o ON o.uid = p.uid
- LEFT JOIN admin a on a.id = p.author
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.patent_state in
- (6,8) and p.deleted_sign = 0
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
-
- <if test="serialNumber != null">
- and p.serial_number = #{serialNumber,jdbcType=INTEGER}
- </if>
- <if test="patentNumber != null">
- and p.patent_number = #{patentNumber,jdbcType=VARCHAR}
- </if>
- <if test="office != null">
- and p.office = #{office,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null">
- and o.unit_name= #{unitName,jdbcType=VARCHAR}
- </if>
- <if test="patentCatagory != null">
- and p.patent_catagory= #{patentCatagory,jdbcType=INTEGER}
- </if>
- <if test="patentName != null">
- and p.patent_name= #{patentName,jdbcType=VARCHAR}
- </if>
- <if test="patentState != null">
- and p.patent_state= #{patentState,jdbcType=INTEGER}
- </if>
- <if test="authorizedDate != null">
- and p.authorized_date =
- #{authorizedDate,jdbcType=TIMESTAMP}
- </if>
- <if test="author != null">
- and p.author = #{author,jdbcType=VARCHAR}
- </if>
- <if test="locationProvince != null">
- and
- o.licence_province=#{locationProvince,jdbcType=INTEGER}
- </if>
- <if test="principal != null">
- group by p.id
- </if>
- </select>
- <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
- update patent_info set deleted_sign = 1
- where id in
- <foreach item="item" index="index" collection="list" open="("
- separator="," close=")">
- #{item}
- </foreach>
- </update>
- <select id="selectPatentInfoDetail" resultType="com.goafanti.patent.bo.PatentInfoDetailBo"
- parameterType="java.lang.String">
- select p.id, p.uid, o.unit_name as unitName,o.org_code as orgCode,
- o.licence_province as locationProvince,
- o.licence_city as locationCity, o.licence_area as locationArea, o.postal_address as postalAddress,
- p.contacts, p.author,
- p.serial_number as serialNumber , p.patent_number as patentNumber ,
- p.patent_name as patentName, p.office,
- p.patent_catagory as patentCatagory,p.patent_state as patentState,
- p.patent_field as patentField, p.patent_des as patentDes , p.first_inventor_name as
- firstInventorName,
- p.first_inventor_nationality as firstInventorNationality,
- p.first_inventor_id_number as firstInventorIdNumber, p.first_inventor_is_publish as
- firstInventorIsPublish,
- p.second_inventor_name as secondInventorName , p.second_inventor_nationality as
- secondInventorNationality ,
- p.second_inventor_is_publish as secondInventorIsPublish, p.third_inventor_name as
- thirdInventorName,
- p.third_inventor_nationality as thirdInventorNationality, p.third_inventor_is_publish as
- thirdInventorIsPublish,
- p.patent_prory_statement_url as patentProryStatementUrl ,
- p.patent_writing_url as patentWritingUrl ,
- p.authorization_notice_url as authorizationNoticeUrl ,
- p.patent_certificate_url as patentCertificateUrl
- from patent_info p LEFT JOIN organization_identity o on p.uid = o.uid
- where p.deleted_sign =0 and p.id = #{id,jdbcType=VARCHAR}
- </select>
-
- <select id="selectByPrimaryKeys" parameterType="java.util.List" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from patent_info where id in
- <foreach item="item" index="index" collection="list" open="("
- separator="," close=")">
- #{item}
- </foreach>
- </select>
-
- <select id="countPatentDone" parameterType="java.lang.String" resultType="java.lang.Integer">
- select count(1) from patent_info
- where uid = #{uid,jdbcType=VARCHAR}
- and deleted_sign = 0 and patent_state in (12,13)
- </select>
-
- <select id="countPatentUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
- select count(1) from patent_info
- where uid = #{uid,jdbcType=VARCHAR}
- and deleted_sign = 0 and patent_state <![CDATA[ < ]]> 12
- </select>
-
- <select id="selectExpireRecord" resultType="com.goafanti.patent.bo.PatentExpireBo">
- select
- p.id, p.uid, p.patent_name as patentName,
- p.patent_application_date as patentApplicationDate, u.mobile,
- p.serial_number as serialNumber, p.patent_number as patentNumber
- from patent_info p
- LEFT JOIN patent_cost pc on p.id = pc.pid
- LEFT JOIN user u on u.id = p.uid
- where
- p.deleted_sign = 0 and p.patent_state in (12, 13)
- and pc.annual_fee_state = 0
- </select>
-
- <select id="listContractPatentByContractId" parameterType="java.lang.String" resultType="com.goafanti.patent.bo.PatentContractListBo">
- select
- pi.id, pi.uid, pi.contract_id as contractId, pi.serial_number as serialNumber,
- pi.patent_name as patentName, patent_number as patentNumber, a.name as principal,
- pi.patent_state as patentState, pi.patent_catagory as patentCatagory
- from patent_info pi
- left join admin a on a.id = pi.principal
- where contract_id = #{contractId,jdbcType=VARCHAR}
- </select>
-
- <insert id="batchInsert" parameterType="com.goafanti.common.model.PatentInfo">
- insert into patent_info (id,
- uid, serial_number,
- patent_number, patent_name, patent_catagory,
- patent_state, patent_field, patent_des,
- patent_prory_statement_url,
- patent_writing_url,
- authorization_notice_url, patent_certificate_url,
- patent_application_date, first_inventor_name,
- first_inventor_nationality, first_inventor_id_number,
- first_inventor_is_publish, second_inventor_name,
- second_inventor_nationality, second_inventor_is_publish,
- third_inventor_name, third_inventor_nationality,
- third_inventor_is_publish, create_time, author, authorized_date,
- office, principal, confirm_state, record_time, deleted_sign, contacts, founder,
- contract_id)
- values
- <foreach item="item" index="index" collection="list" separator=",">
- (
- #{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR},
- #{item.serialNumber,jdbcType=INTEGER},
- #{item.patentNumber,jdbcType=VARCHAR},
- #{item.patentName,jdbcType=VARCHAR},
- #{item.patentCatagory,jdbcType=INTEGER},
- #{item.patentState,jdbcType=INTEGER},
- #{item.patentField,jdbcType=INTEGER},
- #{item.patentDes,jdbcType=VARCHAR},
- #{item.patentProryStatementUrl,jdbcType=VARCHAR},
- #{item.patentWritingUrl,jdbcType=VARCHAR},
- #{item.authorizationNoticeUrl,jdbcType=VARCHAR},
- #{item.patentCertificateUrl,jdbcType=VARCHAR},
- #{item.patentApplicationDate,jdbcType=TIMESTAMP},
- #{item.firstInventorName,jdbcType=VARCHAR},
- #{item.firstInventorNationality,jdbcType=VARCHAR},
- #{item.firstInventorIdNumber,jdbcType=VARCHAR},
- #{item.firstInventorIsPublish,jdbcType=INTEGER},
- #{item.secondInventorName,jdbcType=VARCHAR},
- #{item.secondInventorNationality,jdbcType=VARCHAR},
- #{item.secondInventorIsPublish,jdbcType=INTEGER},
- #{item.thirdInventorName,jdbcType=VARCHAR},
- #{item.thirdInventorNationality,jdbcType=VARCHAR},
- #{item.thirdInventorIsPublish,jdbcType=INTEGER},
- #{item.createTime,jdbcType=TIMESTAMP},
- #{item.author,jdbcType=VARCHAR},
- #{item.authorizedDate,jdbcType=TIMESTAMP},
- #{item.office,jdbcType=VARCHAR},
- #{item.principal,jdbcType=VARCHAR},
- #{item.confirmState,jdbcType=INTEGER},
- #{item.recordTime,jdbcType=TIMESTAMP},
- #{item.deletedSign,jdbcType=INTEGER},
- #{item.contacts,jdbcType=INTEGER},
- #{item.founder,jdbcType=VARCHAR},
- #{item.contractId,jdbcType=VARCHAR}
- )
- </foreach>
- </insert>
-
- <update id="batchDeleteByContractId" parameterType="java.util.List">
- update patent_info set deleted_sign = 1
- where contract_id in
- <foreach item="item" index="index" collection="list" open="("
- separator="," close=")">
- #{item}
- </foreach>
- </update>
-
- <select id="findPatentInfoNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(1)
- from patent_info
- where
- deleted_sign = 0
- and uid = #{uid,jdbcType=VARCHAR}
- </select>
-
- <select id="findAnnualFeeTaskBo" resultType="com.goafanti.patent.bo.PatentAnnualFeeTaskBo">
- select
- p.patent_application_date as patentApplicationDate,
- pc.id as id
- from
- patent_info p
- left join
- patent_cost pc on p.id = pc.pid
- where pc.annual_fee_state = 1
- </select>
- </mapper>
|