| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <?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.PatentCostMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentCost" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="pid" property="pid" jdbcType="VARCHAR" />
- <result column="annual_fee" property="annualFee" jdbcType="INTEGER" />
- <result column="annual_fee_state" property="annualFeeState" jdbcType="INTEGER" />
- <result column="application_fee" property="applicationFee" jdbcType="INTEGER" />
- <result column="trial_fee" property="trialFee" jdbcType="INTEGER" />
- <result column="printing_fee" property="printingFee" jdbcType="INTEGER" />
- <result column="is_request_funds" property="isRequestFunds" jdbcType="INTEGER" />
- <result column="is_reimbursement" property="isReimbursement" jdbcType="INTEGER" />
- <result column="payment_state" property="paymentState" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, pid, annual_fee, annual_fee_state, application_fee, trial_fee, printing_fee,
- is_request_funds, is_reimbursement, payment_state
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from patent_cost
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from patent_cost
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.PatentCost" >
- insert into patent_cost (id, pid, annual_fee,
- annual_fee_state, application_fee, trial_fee,
- printing_fee, is_request_funds, is_reimbursement,
- payment_state)
- values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{annualFee,jdbcType=INTEGER},
- #{annualFeeState,jdbcType=INTEGER}, #{applicationFee,jdbcType=INTEGER}, #{trialFee,jdbcType=INTEGER},
- #{printingFee,jdbcType=INTEGER}, #{isRequestFunds,jdbcType=INTEGER}, #{isReimbursement,jdbcType=INTEGER},
- #{paymentState,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentCost" >
- insert into patent_cost
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="pid != null" >
- pid,
- </if>
- <if test="annualFee != null" >
- annual_fee,
- </if>
- <if test="annualFeeState != null" >
- annual_fee_state,
- </if>
- <if test="applicationFee != null" >
- application_fee,
- </if>
- <if test="trialFee != null" >
- trial_fee,
- </if>
- <if test="printingFee != null" >
- printing_fee,
- </if>
- <if test="isRequestFunds != null" >
- is_request_funds,
- </if>
- <if test="isReimbursement != null" >
- is_reimbursement,
- </if>
- <if test="paymentState != null" >
- payment_state,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="pid != null" >
- #{pid,jdbcType=VARCHAR},
- </if>
- <if test="annualFee != null" >
- #{annualFee,jdbcType=INTEGER},
- </if>
- <if test="annualFeeState != null" >
- #{annualFeeState,jdbcType=INTEGER},
- </if>
- <if test="applicationFee != null" >
- #{applicationFee,jdbcType=INTEGER},
- </if>
- <if test="trialFee != null" >
- #{trialFee,jdbcType=INTEGER},
- </if>
- <if test="printingFee != null" >
- #{printingFee,jdbcType=INTEGER},
- </if>
- <if test="isRequestFunds != null" >
- #{isRequestFunds,jdbcType=INTEGER},
- </if>
- <if test="isReimbursement != null" >
- #{isReimbursement,jdbcType=INTEGER},
- </if>
- <if test="paymentState != null" >
- #{paymentState,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentCost" >
- update patent_cost
- <set >
- <if test="pid != null" >
- pid = #{pid,jdbcType=VARCHAR},
- </if>
- <if test="annualFee != null" >
- annual_fee = #{annualFee,jdbcType=INTEGER},
- </if>
- <if test="annualFeeState != null" >
- annual_fee_state = #{annualFeeState,jdbcType=INTEGER},
- </if>
- <if test="applicationFee != null" >
- application_fee = #{applicationFee,jdbcType=INTEGER},
- </if>
- <if test="trialFee != null" >
- trial_fee = #{trialFee,jdbcType=INTEGER},
- </if>
- <if test="printingFee != null" >
- printing_fee = #{printingFee,jdbcType=INTEGER},
- </if>
- <if test="is_request_funds != null" >
- is_request_funds = #{isRequestFunds,jdbcType=INTEGER},
- </if>
- <if test="is_reimbursement != null" >
- is_reimbursement = #{isReimbursement,jdbcType=INTEGER},
- </if>
- <if test="paymentState != null" >
- payment_state = #{paymentState,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentCost" >
- update patent_cost
- set pid = #{pid,jdbcType=VARCHAR},
- annual_fee = #{annualFee,jdbcType=INTEGER},
- annual_fee_state = #{annualFeeState,jdbcType=INTEGER},
- application_fee = #{applicationFee,jdbcType=INTEGER},
- trial_fee = #{trialFee,jdbcType=INTEGER},
- printing_fee = #{printingFee,jdbcType=INTEGER},
- is_request_funds = #{isRequestFunds,jdbcType=INTEGER},
- is_reimbursement = #{isReimbursement,jdbcType=INTEGER},
- payment_state = #{paymentState,jdbcType=INTEGER}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findApplicationFeeListByPage" parameterType="String" resultType="com.goafanti.techservice.patent.bo.PatentApplicationFeeBo">
- select m.uid as uid , m.pid as pid , m.oid ,
- m.serialNumber ,m.patentNumber ,
- m.locationProvince , m.unitName ,
- m.patentName , m.authorizedDate ,
- c.id as cid ,
- c.payment_state as paymentState,c.application_fee as applicationFee ,
- c.trial_fee as trialFee , c.printing_fee as printingFee ,
- c.is_request_funds as isRequestFunds , c.is_reimbursement as isReimbursement
- from patent_cost c RIGHT 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.authorized_date as authorizedDate
- from user u
- INNER JOIN patent_info p on u.id =p.uid
- INNER JOIN organization_identity o on o.uid = u.id
- where 1=1
- <if test="locationProvince != null">
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
- </if>
- <if test="pStart != null">
- and p.authorized_date <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
- </if>
- <if test="pEnd">
- and p.authorized_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
- </if>
- order by p.authorized_date DESC) m
- on c.pid = m.pid
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findApplicationFeeCount" resultType="java.lang.Integer">
- select count(1) from (select m.uid as uid , m.pid as pid , m.oid ,
- m.serialNumber ,m.patentNumber ,
- m.locationProvince , m.unitName ,
- m.patentName , m.authorizedDate ,
- c.id as cid ,
- c.payment_state as paymentState,c.application_fee as applicationFee ,
- c.trial_fee as trialFee , c.printing_fee as printingFee ,
- c.is_request_funds as isRequestFunds , c.is_reimbursement as isReimbursement
- from patent_cost c RIGHT 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.authorized_date as authorizedDate
- from user u
- INNER JOIN patent_info p on u.id =p.uid
- INNER JOIN organization_identity o on o.uid = u.id
- order by p.authorized_date DESC) m
- on c.pid = m.pid) n
- </select>
- </mapper>
|