|
|
@@ -1,207 +1,210 @@
|
|
|
<?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="funds" property="funds" jdbcType="INTEGER" />
|
|
|
- <result column="reimbursement" property="reimbursement" 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,
|
|
|
- funds, 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, funds, 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}, #{funds,jdbcType=INTEGER}, #{reimbursement,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="funds != null" >
|
|
|
- funds,
|
|
|
- </if>
|
|
|
- <if test="reimbursement != null" >
|
|
|
- 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="funds != null" >
|
|
|
- #{funds,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="reimbursement != null" >
|
|
|
- #{reimbursement,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="funds != null" >
|
|
|
- funds = #{funds,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="reimbursement != null" >
|
|
|
- reimbursement = #{reimbursement,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},
|
|
|
- funds = #{funds,jdbcType=INTEGER},
|
|
|
- reimbursement = #{reimbursement,jdbcType=INTEGER},
|
|
|
- payment_state = #{paymentState,jdbcType=INTEGER}
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
-
|
|
|
- <select id="findApplicationFeeListByPage" parameterType="String" resultType="com.goafanti.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.patentApplicationDate ,
|
|
|
- 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.funds as funds , c.reimbursement as reimbursement
|
|
|
- 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.patent_application_date as patentApplicationDate
|
|
|
- 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
|
|
|
+<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="funds" property="funds" jdbcType="INTEGER" />
|
|
|
+ <result column="reimbursement" property="reimbursement"
|
|
|
+ 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,
|
|
|
+ funds, 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, funds, 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}, #{funds,jdbcType=INTEGER},
|
|
|
+ #{reimbursement,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="funds != null">
|
|
|
+ funds,
|
|
|
+ </if>
|
|
|
+ <if test="reimbursement != null">
|
|
|
+ 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="funds != null">
|
|
|
+ #{funds,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="reimbursement != null">
|
|
|
+ #{reimbursement,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="funds != null">
|
|
|
+ funds = #{funds,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="reimbursement != null">
|
|
|
+ reimbursement = #{reimbursement,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},
|
|
|
+ funds = #{funds,jdbcType=INTEGER},
|
|
|
+ reimbursement = #{reimbursement,jdbcType=INTEGER},
|
|
|
+ payment_state = #{paymentState,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="findApplicationFeeListByPage" parameterType="String"
|
|
|
+ resultType="com.goafanti.patent.bo.PatentApplicationFeeBo">
|
|
|
+ select p.uid as uid , p.id as pid ,o.id as oid, c.id as cid,
|
|
|
+ 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_application_date as
|
|
|
+ patentApplicationDate,
|
|
|
+ c.payment_state as paymentState,c.application_fee as applicationFee ,
|
|
|
+ c.trial_fee as trialFee , c.printing_fee as printingFee ,
|
|
|
+ c.funds as funds , c.reimbursement as reimbursement
|
|
|
+ from patent_info p
|
|
|
+ LEFT JOIN organization_identity o on o.uid = p.uid
|
|
|
+ LEFT JOIN patent_cost c on p.id = c.pid WHERE p.deleted_sign = 0
|
|
|
<if test="locationProvince != null">
|
|
|
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
|
|
|
+ and o.location_province = #{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="pStart != null">
|
|
|
- and p.patent_application_date <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
+ and p.patent_application_date <![CDATA[ > ]]>
|
|
|
+ #{pStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="pEnd">
|
|
|
- and p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
+ and p.patent_application_date <![CDATA[ < ]]>
|
|
|
+ #{pEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
- ) m
|
|
|
- on c.pid = m.pid order by m.serialNumber DESC
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findApplicationFeeCount" resultType="java.lang.Integer" parameterType="String">
|
|
|
- select count(1) from patent_cost c RIGHT JOIN
|
|
|
- (select p.id as pid
|
|
|
- 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
|
|
|
+ order by p.serial_number DESC
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findApplicationFeeCount" resultType="java.lang.Integer"
|
|
|
+ parameterType="java.lang.String">
|
|
|
+ select count(1)
|
|
|
+ from patent_info p
|
|
|
+ LEFT JOIN organization_identity o on o.uid = p.uid
|
|
|
+ LEFT JOIN patent_cost c on p.id = c.pid WHERE p.deleted_sign = 0
|
|
|
<if test="locationProvince != null">
|
|
|
- and o.location_province = #{locationProvince,jdbcType=VARCHAR}
|
|
|
+ and o.location_province = #{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="pStart != null">
|
|
|
- and p.patent_application_date <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
+ and p.patent_application_date <![CDATA[ > ]]>
|
|
|
+ #{pStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="pEnd">
|
|
|
- and p.patent_application_date <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
+ and p.patent_application_date <![CDATA[ < ]]>
|
|
|
+ #{pEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
- ) m
|
|
|
- on c.pid = m.pid
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
</mapper>
|