| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781 |
- <?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="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
- </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, deleted_sign
- </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, deleted_sign)
-
- 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}, #{deletedSign,jdbcType=INTEGER})
- </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="deletedSign != null">
- deleted_sign,
- </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="deletedSign != null">
- #{deletedSign,jdbcType=INTEGER}
- </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=VARCHAR},
- </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="deletedSign != null">
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- </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=VARCHAR},
- office = #{office,jdbcType=VARCHAR},
- principal = #{principal,jdbcType=VARCHAR},
- confirm_state = #{confirmState,jdbcType=INTEGER},
- deleted_sign = #{deletedSign,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectPatentInfoByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from patent_info
- where uid = #{uid,jdbcType=VARCHAR} and deleted_sign = 0
- </select>
-
- <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 patent_application_date 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>
- order by patent_application_date desc
- </select>
-
- <select id="findManagePatentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentCompositeBo" parameterType="String">
- select a.name as author,x.uid ,
- x.oid ,x.pid ,
- x.serialNumber,x.patentNumber,
- x.office , x.unitName ,
- x.patentCatagory , x.patentName ,
- x.patentState , x.createTime ,
- x.patentApplicationDate,x.authorizedDate ,
- x.orgCode , x.locationProvince ,
- x.locationCity , x.locationArea ,
- x.contacts , x.patentField ,
- x.patentDes ,x.firstInventorName,
- x.firstInventorNationality , x.firstInventorIdNumber ,
- x.secondInventorName, x.secondInventorNationality ,
- x.thirdInventorName , x.thirdInventorNationality ,
- x.patentProryStatementUrl, x.lastYearTaxReportUrl ,
- x.patentWritingUrl, x.authorizationNoticeUrl,
- x.patentCertificateUrl from
- (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 ,
- o.unit_name as unitName,
- p.patent_catagory as patentCatagory,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, p.author, o.org_code as orgCode, o.location_province as locationProvince,
- o.location_city as locationCity, o.location_area as locationArea,
- o.contacts, u.number, 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.second_inventor_name as secondInventorName ,
- p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
- p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl ,
- o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
- p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
- from user u
- LEFT JOIN organization_identity o
- on u.id = o.uid
- INNER JOIN patent_info p
- on u.id = p.uid
- where deleted_sign = 0
-
- <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="locationProvince != null">
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.create_time desc) x
- LEFT JOIN admin a on a.id = x.author
- <if test="page_sql!=null">
- ${page_sql}
- </if>
-
- </select>
-
- <select id="findManagePatentCount" resultType="java.lang.Integer" parameterType="String">
- select count(1) from (
-
- select a.name as author,x.uid ,
- x.oid ,x.pid ,
- x.serialNumber,x.patentNumber,
- x.office , x.unitName ,
- x.patentCatagory , x.patentName ,
- x.patentState , x.createTime ,
- x.patentApplicationDate,x.authorizedDate ,
- x.orgCode , x.locationProvince ,
- x.locationCity , x.locationArea ,
- x.contacts , x.patentField ,
- x.patentDes ,x.firstInventorName,
- x.firstInventorNationality , x.firstInventorIdNumber ,
- x.secondInventorName, x.secondInventorNationality ,
- x.thirdInventorName , x.thirdInventorNationality ,
- x.patentProryStatementUrl, x.lastYearTaxReportUrl ,
- x.patentWritingUrl, x.authorizationNoticeUrl,
- x.patentCertificateUrl from
- (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 ,
- o.unit_name as unitName,
- p.patent_catagory as patentCatagory,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, p.author, o.org_code as orgCode, o.location_province as locationProvince,
- o.location_city as locationCity, o.location_area as locationArea,
- o.contacts, u.number, 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.second_inventor_name as secondInventorName ,
- p.second_inventor_nationality as secondInventorNationality , p.third_inventor_name as thirdInventorName,
- p.third_inventor_nationality as thirdInventorNationality , p.patent_prory_statement_url as patentProryStatementUrl ,
- o.last_year_tax_report_url as lastYearTaxReportUrl, p.patent_writing_url as patentWritingUrl ,
- p.authorization_notice_url as authorizationNoticeUrl , p.patent_certificate_url as patentCertificateUrl
- from user u
- LEFT JOIN organization_identity o
- on u.id = o.uid
- INNER JOIN patent_info p
- on u.id = p.uid
- where deleted_sign = 0
-
- <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="locationProvince != null">
- and o.location_province=#{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.create_time desc) x
- LEFT JOIN admin a on a.id = x.author
- )
- as total
- </select>
-
- <select id="findManagePendingPaymentListByPage" resultType="com.goafanti.techservice.patent.bo.PatentPendingBo" parameterType="String">
- select n.*,c.id as cid ,c.annual_fee_state as annualFeeState
- from patent_cost c INNER JOIN
- (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
- o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
- p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
- from user u
- LEFT JOIN organization_identity o on o.uid = u.id
- INNER JOIN patent_info p on u.id =p.uid where p.deleted_sign = 0
- <if test="locationProvince != null">
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.authorized_date DESC
- ) n
- on n.pid= c.pid where c.annual_fee_state=0
-
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findManagePendingPaymentCount" resultType="java.lang.Integer" parameterType="String">
- select count(1) from (
- select n.*,c.id as cid ,c.annual_fee_state as annualFeeState
- from patent_cost c INNER JOIN
- (select u.id as uid , p.id as pid ,o.id as oid , p.serial_number as serialNumber ,p.patent_number as patentNumber ,
- o.location_province as locationProvince , o.unit_name as unitName , p.patent_name as patentName,
- p.patent_catagory as patentCatagory ,p.patent_state as patentState , p.authorized_date as authorizedDate
- from user u
- LEFT JOIN organization_identity o on o.uid = u.id
- INNER JOIN patent_info p on u.id = p.uid where p.deleted_sign = 0
- <if test="locationProvince != null">
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.authorized_date DESC
- ) n
- on n.pid= c.pid where c.annual_fee_state=0
- ) as total
- </select>
-
- <select id="findNoticeOfCorrectionListByPage" parameterType="String" resultType="com.goafanti.techservice.patent.bo.PatentNoticeOfCorrectionBo">
- select u.id 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 , p.author , p.authorized_date as authorizedDate
- FROM user u
- LEFT JOIN organization_identity o ON u.id = o.uid
- INNER JOIN patent_info p on u.id = p.uid
- where p.patent_state in (4,6) and p.deleted_sign = 0
- <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.location_province=#{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.authorized_date DESC
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findNoticeOfCorrectionCount" resultType="java.lang.Integer" parameterType="String">
- select count(1) from (
-
- select u.id 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 , p.author , p.authorized_date as authorizedDate
- FROM user u
- LEFT JOIN organization_identity o ON u.id = o.uid
- INNER JOIN patent_info p on u.id = p.uid
- where p.patent_state in (4,6) and p.delete_sign = 0
- <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.location_province=#{locationProvince,jdbcType=VARCHAR}
- </if>
- order by p.authorized_date DESC
-
- ) as n
- </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>
-
-
- </mapper>
|