| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?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.OrgActivityMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgActivity" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="activity_number" property="activityNumber" jdbcType="VARCHAR" />
- <result column="activity_name" property="activityName" jdbcType="VARCHAR" />
- <result column="start_date" property="startDate" jdbcType="TIMESTAMP" />
- <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
- <result column="technical_field1" property="technicalField1" jdbcType="VARCHAR" />
- <result column="technical_field2" property="technicalField2" jdbcType="VARCHAR" />
- <result column="technical_field3" property="technicalField3" jdbcType="VARCHAR" />
- <result column="technical_source" property="technicalSource" jdbcType="INTEGER" />
- <result column="intellectual_property_number" property="intellectualPropertyNumber" jdbcType="VARCHAR" />
- <result column="budget" property="budget" jdbcType="INTEGER" />
- <result column="first_year_expenditure" property="firstYearExpenditure" jdbcType="INTEGER" />
- <result column="second_year_expenditure" property="secondYearExpenditure" jdbcType="INTEGER" />
- <result column="third_year_expenditure" property="thirdYearExpenditure" jdbcType="INTEGER" />
- <result column="implement" property="implement" jdbcType="VARCHAR" />
- <result column="technology_innovation" property="technologyInnovation" jdbcType="VARCHAR" />
- <result column="achievement" property="achievement" jdbcType="VARCHAR" />
- <result column="internal_labor_cost" property="internalLaborCost" jdbcType="INTEGER" />
- <result column="internal_direct_cost" property="internalDirectCost" jdbcType="INTEGER" />
- <result column="internal_depreciation_cost" property="internalDepreciationCost" jdbcType="INTEGER" />
- <result column="internal_amortization_cost" property="internalAmortizationCost" jdbcType="INTEGER" />
- <result column="internal_design_cost" property="internalDesignCost" jdbcType="INTEGER" />
- <result column="internal_equipment_cost" property="internalEquipmentCost" jdbcType="INTEGER" />
- <result column="internal_other_cost" property="internalOtherCost" jdbcType="INTEGER" />
- <result column="external_total_cost" property="externalTotalCost" jdbcType="INTEGER" />
- <result column="external_abroad_cost" property="externalAbroadCost" jdbcType="INTEGER" />
- <result column="enterprise_filler" property="enterpriseFiller" jdbcType="VARCHAR" />
- <result column="sign_date" property="signDate" jdbcType="TIMESTAMP" />
- <result column="sort_number" property="sortNumber" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, activity_number, activity_name, start_date, end_date, technical_field1,
- technical_field2, technical_field3, technical_source, intellectual_property_number,
- budget, first_year_expenditure, second_year_expenditure, third_year_expenditure,
- implement, technology_innovation, achievement, internal_labor_cost, internal_direct_cost,
- internal_depreciation_cost, internal_amortization_cost, internal_design_cost, internal_equipment_cost,
- internal_other_cost, external_total_cost, external_abroad_cost, enterprise_filler,
- sign_date, sort_number
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from org_activity
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from org_activity
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.OrgActivity" >
- insert into org_activity (id, uid, activity_number,
- activity_name, start_date, end_date,
- technical_field1, technical_field2, technical_field3,
- technical_source, intellectual_property_number,
- budget, first_year_expenditure, second_year_expenditure,
- third_year_expenditure, implement, technology_innovation,
- achievement, internal_labor_cost, internal_direct_cost,
- internal_depreciation_cost, internal_amortization_cost,
- internal_design_cost, internal_equipment_cost,
- internal_other_cost, external_total_cost, external_abroad_cost,
- enterprise_filler, sign_date, sort_number
- )
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{activityNumber,jdbcType=VARCHAR},
- #{activityName,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP},
- #{technicalField1,jdbcType=VARCHAR}, #{technicalField2,jdbcType=VARCHAR}, #{technicalField3,jdbcType=VARCHAR},
- #{technicalSource,jdbcType=INTEGER}, #{intellectualPropertyNumber,jdbcType=VARCHAR},
- #{budget,jdbcType=INTEGER}, #{firstYearExpenditure,jdbcType=INTEGER}, #{secondYearExpenditure,jdbcType=INTEGER},
- #{thirdYearExpenditure,jdbcType=INTEGER}, #{implement,jdbcType=VARCHAR}, #{technologyInnovation,jdbcType=VARCHAR},
- #{achievement,jdbcType=VARCHAR}, #{internalLaborCost,jdbcType=INTEGER}, #{internalDirectCost,jdbcType=INTEGER},
- #{internalDepreciationCost,jdbcType=INTEGER}, #{internalAmortizationCost,jdbcType=INTEGER},
- #{internalDesignCost,jdbcType=INTEGER}, #{internalEquipmentCost,jdbcType=INTEGER},
- #{internalOtherCost,jdbcType=INTEGER}, #{externalTotalCost,jdbcType=INTEGER}, #{externalAbroadCost,jdbcType=INTEGER},
- #{enterpriseFiller,jdbcType=VARCHAR}, #{signDate,jdbcType=TIMESTAMP}, #{sortNumber,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgActivity" >
- insert into org_activity
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="activityNumber != null" >
- activity_number,
- </if>
- <if test="activityName != null" >
- activity_name,
- </if>
- <if test="startDate != null" >
- start_date,
- </if>
- <if test="endDate != null" >
- end_date,
- </if>
- <if test="technicalField1 != null" >
- technical_field1,
- </if>
- <if test="technicalField2 != null" >
- technical_field2,
- </if>
- <if test="technicalField3 != null" >
- technical_field3,
- </if>
- <if test="technicalSource != null" >
- technical_source,
- </if>
- <if test="intellectualPropertyNumber != null" >
- intellectual_property_number,
- </if>
- <if test="budget != null" >
- budget,
- </if>
- <if test="firstYearExpenditure != null" >
- first_year_expenditure,
- </if>
- <if test="secondYearExpenditure != null" >
- second_year_expenditure,
- </if>
- <if test="thirdYearExpenditure != null" >
- third_year_expenditure,
- </if>
- <if test="implement != null" >
- implement,
- </if>
- <if test="technologyInnovation != null" >
- technology_innovation,
- </if>
- <if test="achievement != null" >
- achievement,
- </if>
- <if test="internalLaborCost != null" >
- internal_labor_cost,
- </if>
- <if test="internalDirectCost != null" >
- internal_direct_cost,
- </if>
- <if test="internalDepreciationCost != null" >
- internal_depreciation_cost,
- </if>
- <if test="internalAmortizationCost != null" >
- internal_amortization_cost,
- </if>
- <if test="internalDesignCost != null" >
- internal_design_cost,
- </if>
- <if test="internalEquipmentCost != null" >
- internal_equipment_cost,
- </if>
- <if test="internalOtherCost != null" >
- internal_other_cost,
- </if>
- <if test="externalTotalCost != null" >
- external_total_cost,
- </if>
- <if test="externalAbroadCost != null" >
- external_abroad_cost,
- </if>
- <if test="enterpriseFiller != null" >
- enterprise_filler,
- </if>
- <if test="signDate != null" >
- sign_date,
- </if>
- <if test="sortNumber != null" >
- sort_number,
- </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="activityNumber != null" >
- #{activityNumber,jdbcType=VARCHAR},
- </if>
- <if test="activityName != null" >
- #{activityName,jdbcType=VARCHAR},
- </if>
- <if test="startDate != null" >
- #{startDate,jdbcType=TIMESTAMP},
- </if>
- <if test="endDate != null" >
- #{endDate,jdbcType=TIMESTAMP},
- </if>
- <if test="technicalField1 != null" >
- #{technicalField1,jdbcType=VARCHAR},
- </if>
- <if test="technicalField2 != null" >
- #{technicalField2,jdbcType=VARCHAR},
- </if>
- <if test="technicalField3 != null" >
- #{technicalField3,jdbcType=VARCHAR},
- </if>
- <if test="technicalSource != null" >
- #{technicalSource,jdbcType=INTEGER},
- </if>
- <if test="intellectualPropertyNumber != null" >
- #{intellectualPropertyNumber,jdbcType=VARCHAR},
- </if>
- <if test="budget != null" >
- #{budget,jdbcType=INTEGER},
- </if>
- <if test="firstYearExpenditure != null" >
- #{firstYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="secondYearExpenditure != null" >
- #{secondYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="thirdYearExpenditure != null" >
- #{thirdYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="implement != null" >
- #{implement,jdbcType=VARCHAR},
- </if>
- <if test="technologyInnovation != null" >
- #{technologyInnovation,jdbcType=VARCHAR},
- </if>
- <if test="achievement != null" >
- #{achievement,jdbcType=VARCHAR},
- </if>
- <if test="internalLaborCost != null" >
- #{internalLaborCost,jdbcType=INTEGER},
- </if>
- <if test="internalDirectCost != null" >
- #{internalDirectCost,jdbcType=INTEGER},
- </if>
- <if test="internalDepreciationCost != null" >
- #{internalDepreciationCost,jdbcType=INTEGER},
- </if>
- <if test="internalAmortizationCost != null" >
- #{internalAmortizationCost,jdbcType=INTEGER},
- </if>
- <if test="internalDesignCost != null" >
- #{internalDesignCost,jdbcType=INTEGER},
- </if>
- <if test="internalEquipmentCost != null" >
- #{internalEquipmentCost,jdbcType=INTEGER},
- </if>
- <if test="internalOtherCost != null" >
- #{internalOtherCost,jdbcType=INTEGER},
- </if>
- <if test="externalTotalCost != null" >
- #{externalTotalCost,jdbcType=INTEGER},
- </if>
- <if test="externalAbroadCost != null" >
- #{externalAbroadCost,jdbcType=INTEGER},
- </if>
- <if test="enterpriseFiller != null" >
- #{enterpriseFiller,jdbcType=VARCHAR},
- </if>
- <if test="signDate != null" >
- #{signDate,jdbcType=TIMESTAMP},
- </if>
- <if test="sortNumber != null" >
- #{sortNumber,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgActivity" >
- update org_activity
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="activityNumber != null" >
- activity_number = #{activityNumber,jdbcType=VARCHAR},
- </if>
- <if test="activityName != null" >
- activity_name = #{activityName,jdbcType=VARCHAR},
- </if>
- <if test="startDate != null" >
- start_date = #{startDate,jdbcType=TIMESTAMP},
- </if>
- <if test="endDate != null" >
- end_date = #{endDate,jdbcType=TIMESTAMP},
- </if>
- <if test="technicalField1 != null" >
- technical_field1 = #{technicalField1,jdbcType=VARCHAR},
- </if>
- <if test="technicalField2 != null" >
- technical_field2 = #{technicalField2,jdbcType=VARCHAR},
- </if>
- <if test="technicalField3 != null" >
- technical_field3 = #{technicalField3,jdbcType=VARCHAR},
- </if>
- <if test="technicalSource != null" >
- technical_source = #{technicalSource,jdbcType=INTEGER},
- </if>
- <if test="intellectualPropertyNumber != null" >
- intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
- </if>
- <if test="budget != null" >
- budget = #{budget,jdbcType=INTEGER},
- </if>
- <if test="firstYearExpenditure != null" >
- first_year_expenditure = #{firstYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="secondYearExpenditure != null" >
- second_year_expenditure = #{secondYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="thirdYearExpenditure != null" >
- third_year_expenditure = #{thirdYearExpenditure,jdbcType=INTEGER},
- </if>
- <if test="implement != null" >
- implement = #{implement,jdbcType=VARCHAR},
- </if>
- <if test="technologyInnovation != null" >
- technology_innovation = #{technologyInnovation,jdbcType=VARCHAR},
- </if>
- <if test="achievement != null" >
- achievement = #{achievement,jdbcType=VARCHAR},
- </if>
- <if test="internalLaborCost != null" >
- internal_labor_cost = #{internalLaborCost,jdbcType=INTEGER},
- </if>
- <if test="internalDirectCost != null" >
- internal_direct_cost = #{internalDirectCost,jdbcType=INTEGER},
- </if>
- <if test="internalDepreciationCost != null" >
- internal_depreciation_cost = #{internalDepreciationCost,jdbcType=INTEGER},
- </if>
- <if test="internalAmortizationCost != null" >
- internal_amortization_cost = #{internalAmortizationCost,jdbcType=INTEGER},
- </if>
- <if test="internalDesignCost != null" >
- internal_design_cost = #{internalDesignCost,jdbcType=INTEGER},
- </if>
- <if test="internalEquipmentCost != null" >
- internal_equipment_cost = #{internalEquipmentCost,jdbcType=INTEGER},
- </if>
- <if test="internalOtherCost != null" >
- internal_other_cost = #{internalOtherCost,jdbcType=INTEGER},
- </if>
- <if test="externalTotalCost != null" >
- external_total_cost = #{externalTotalCost,jdbcType=INTEGER},
- </if>
- <if test="externalAbroadCost != null" >
- external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
- </if>
- <if test="enterpriseFiller != null" >
- enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
- </if>
- <if test="signDate != null" >
- sign_date = #{signDate,jdbcType=TIMESTAMP},
- </if>
- <if test="sortNumber != null" >
- sort_number = #{sortNumber,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgActivity" >
- update org_activity
- set uid = #{uid,jdbcType=VARCHAR},
- activity_number = #{activityNumber,jdbcType=VARCHAR},
- activity_name = #{activityName,jdbcType=VARCHAR},
- start_date = #{startDate,jdbcType=TIMESTAMP},
- end_date = #{endDate,jdbcType=TIMESTAMP},
- technical_field1 = #{technicalField1,jdbcType=VARCHAR},
- technical_field2 = #{technicalField2,jdbcType=VARCHAR},
- technical_field3 = #{technicalField3,jdbcType=VARCHAR},
- technical_source = #{technicalSource,jdbcType=INTEGER},
- intellectual_property_number = #{intellectualPropertyNumber,jdbcType=VARCHAR},
- budget = #{budget,jdbcType=INTEGER},
- first_year_expenditure = #{firstYearExpenditure,jdbcType=INTEGER},
- second_year_expenditure = #{secondYearExpenditure,jdbcType=INTEGER},
- third_year_expenditure = #{thirdYearExpenditure,jdbcType=INTEGER},
- implement = #{implement,jdbcType=VARCHAR},
- technology_innovation = #{technologyInnovation,jdbcType=VARCHAR},
- achievement = #{achievement,jdbcType=VARCHAR},
- internal_labor_cost = #{internalLaborCost,jdbcType=INTEGER},
- internal_direct_cost = #{internalDirectCost,jdbcType=INTEGER},
- internal_depreciation_cost = #{internalDepreciationCost,jdbcType=INTEGER},
- internal_amortization_cost = #{internalAmortizationCost,jdbcType=INTEGER},
- internal_design_cost = #{internalDesignCost,jdbcType=INTEGER},
- internal_equipment_cost = #{internalEquipmentCost,jdbcType=INTEGER},
- internal_other_cost = #{internalOtherCost,jdbcType=INTEGER},
- external_total_cost = #{externalTotalCost,jdbcType=INTEGER},
- external_abroad_cost = #{externalAbroadCost,jdbcType=INTEGER},
- enterprise_filler = #{enterpriseFiller,jdbcType=VARCHAR},
- sign_date = #{signDate,jdbcType=TIMESTAMP},
- sort_number = #{sortNumber,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="findOrgActivityListByPage" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from org_activity
- where 1=1
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="activityNumber != null">
- and activity_number = #{activityNumber,jdbcType=VARCHAR}
- </if>
- <if test="activityName != null">
- and activity_name= #{activityName,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and start_date <![CDATA[ > ]]> #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findOrgActivityCount" resultType="java.lang.Integer" parameterType="String">
- select count(1) from (
- select
- <include refid="Base_Column_List" />
- from org_activity
- where 1=1
- <if test="uid != null">
- and uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="activityNumber != null">
- and activity_number = #{activityNumber,jdbcType=VARCHAR}
- </if>
- <if test="activityName != null">
- and activity_name= #{activityName,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and start_date <![CDATA[ > ]]> #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="page_sql != null">
- ${page_sql}
- </if>
- ) as total
- </select>
- </mapper>
|