123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <?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.jeeplus.modules.sg.mapper.JkxlMapper">
- <select id="getValue" parameterType="String" resultType="com.jeeplus.modules.sg.entity.RuleRatio">
- select value from sg_rule_ratio
- <where>
- ratio_name = #{ratioName}
- </where>
- </select>
- <select id="getList" parameterType="String" resultType="com.jeeplus.modules.sg.entity.JkxlData">
- SELECT
- a.describe,
- a.short_id as wbsCode,
- a.parent_node as parentNode,
- a.state,
- b.id,
- b.original_total_cost as originalTotalCost,
- b.original_rg_cost as originalRgCost,
- b.original_cbr_cost as originalCbrCost,
- b.original_fbr_cost as originalFbrCost,
- b.original_jx_cost as originalJxCost,
- b.rg_cost as rgCost,
- b.cbr_cost as cbrCost,
- b.fbr_cost as fbrCost,
- b.jx_cost as jxCost,
- b.measures_fee1 as measuresFee1,
- b.measures_fee2 as measuresFee2,
- b.other_cost as otherCost,
- b.tex as tex,
- b.fees as fees,
- b.zjgc_fee as zjgcFee,
- b.total_fee as totalFee,
- b.original_rate as originalRate,
- b.bz_fee as bzFee,
- b.jk_fee as jkFee,
- b.rg_fee_ft as rgFtFee,
- b.cbr_fee_ft as cbrFtFee,
- b.fbr_fee_ft as fbrFtFee,
- b.jx_fee_ft as jxFtFee
- FROM sg_wbs_elements_data a LEFT JOIN sg_wbs_fee b on a.short_id = b.wbs_code
- and b.id = #{id}
- </select>
- <select id="getData" resultType="com.jeeplus.modules.sg.entity.JkxlData">
- SELECT
- a.describe,
- a.short_id as wbsCode,
- a.parent_node as parentNode,
- a.state,
- b.id,
- b.original_total_cost as originalTotalCost,
- b.original_rg_cost as originalRgCost,
- b.original_cbr_cost as originalCbrCost,
- b.original_fbr_cost as originalFbrCost,
- b.original_jx_cost as originalJxCost,
- b.rg_cost as rgCost,
- b.cbr_cost as cbrCost,
- b.fbr_cost as fbrCost,
- b.jx_cost as jxCost,
- b.measures_fee1 as measuresFee1,
- b.measures_fee2 as measuresFee2,
- b.measures_fee3 as measuresFee3,
- b.other_cost as otherCost,
- b.tex as tex,
- b.fees as fees,
- b.zjgc_fee as zjgcFee,
- b.total_fee as totalFee,
- b.original_rate as originalRate,
- b.bz_fee as bzFee,
- b.jk_fee as jkFee,
- b.rg_fee_ft as rgFtFee,
- b.cbr_fee_ft as cbrFtFee,
- b.fbr_fee_ft as fbrFtFee,
- b.jx_fee_ft as jxFtFee
- FROM sg_wbs_elements_data a LEFT JOIN sg_wbs_fee b on a.short_id = b.wbs_code
- <where>
- b.id = #{id} and a.short_id = #{wbsCode}
- </where>
- </select>
- <select id="findList" parameterType="String" resultType="com.jeeplus.modules.sg.entity.JkxlData">
- SELECT
- a.id as wbsId,
- a.project_id as projectId,
- a.describe,
- a.short_id as wbsCode,
- a.subject_allocate as subjectAllocate,
- a.mount_matter as mountMatter,
- a.mount_server as mountServer,
- b.total_fee as totalFee
- FROM sg_wbs_elements a LEFT JOIN sg_wbs_fee b on a.short_id = b.wbs_code
- and b.id = #{id}
- order by a.id
- </select>
- <insert id="save" parameterType="com.jeeplus.modules.sg.entity.JkxlData">
- insert into sg_wbs_fee
- (id,
- wbs_code,
- original_total_cost,
- original_rate,
- original_rg_cost,
- original_cbr_cost,
- original_fbr_cost,
- original_jx_cost,
- rg_cost,
- cbr_cost,
- fbr_cost,
- jx_cost,
- measures_fee1,
- measures_fee2,
- measures_fee3,
- other_cost,
- fees,
- tex,
- total_fee,
- bz_fee,
- jk_fee,
- zjgc_fee,
- rg_fee_ft,
- cbr_fee_ft,
- fbr_fee_ft,
- jx_fee_ft
- ) values (
- #{id},
- #{wbsCode},
- #{originalTotalCost},
- #{originalRate},
- #{originalRgCost},
- #{originalCbrCost},
- #{originalFbrCost},
- #{originalJxCost},
- #{rgCost},
- #{cbrCost},
- #{fbrCost},
- #{jxCost},
- #{measuresFee1},
- #{measuresFee2},
- #{measuresFee3},
- #{otherCost},
- #{fees},
- #{tex},
- #{totalFee},
- #{bzFee},
- #{jkFee},
- #{zjgcFee},
- #{rgFtFee},
- #{cbrFtFee},
- #{fbrFtFee},
- #{jxFtFee}
- )
- </insert>
- <update id="updateDate" parameterType="com.jeeplus.modules.sg.entity.WbsProject">
- update sg_wbs_fee set
- <if test="rgFtFee != null and rgFtFee != ''">
- rg_fee_ft = #{rgFtFee},
- </if>
- <if test="cbrFtFee != null and cbrFtFee != ''">
- cbr_fee_ft = #{cbrFtFee},
- </if>
- <if test="fbrFtFee != null and fbrFtFee != ''">
- fbr_fee_ft = #{fbrFtFee},
- </if>
- <if test="jxFtFee != null and jxFtFee != ''">
- jx_fee_ft = #{jxFtFee},
- </if>
- <if test="measuresFee1 != null and measuresFee1 != ''">
- measures_fee1 = #{measuresFee1},
- </if>
- <if test="measuresFee2 != null and measuresFee2 != ''">
- measures_fee2 = #{measuresFee2},
- </if>
- <if test="measuresFee3 != null and measuresFee3 != ''">
- measures_fee3 = #{measuresFee3},
- </if>
- <if test="otherCost != null and otherCost != ''">
- other_cost = #{otherCost},
- </if>
- <if test="fees != null and fees != ''">
- fees = #{fees},
- </if>
- <if test="tex != null and tex != ''">
- tex = #{tex},
- </if>
- <if test="totalFee != null and totalFee != ''">
- total_fee = #{totalFee},
- </if>
- id = #{id}
- <where>
- id = #{id} and wbs_code = #{wbsCode}
- </where>
- </update>
- <select id="getTzFee" parameterType="com.jeeplus.modules.sg.entity.TzData" resultType="com.jeeplus.modules.sg.entity.TzData">
- select id,type,fee from sg_wbs_fee_tz
- <where>
- <if test="type != null and type != ''">
- type = #{type} and
- </if>
- id = #{id}
- </where>
- order by type
- </select>
- <update id="updateTzFee" parameterType="com.jeeplus.modules.sg.entity.TzData">
- update sg_wbs_fee_tz set fee = #{fee}
- <where>
- <if test="type != null and type != ''">
- type = #{type} and
- </if>
- id = #{id}
- </where>
- </update>
- <insert id="saveTzFee" parameterType="com.jeeplus.modules.sg.entity.TzData">
- insert into sg_wbs_fee_tz
- (
- id,
- type,
- fee
- )values (
- #{id},
- #{type},
- #{fee}
- )
- </insert>
- <insert id="saveProject" parameterType="com.jeeplus.modules.sg.entity.WbsProject">
- insert into sg_wbs_project
- (id,
- project_name,
- create_date
- ) values (
- #{id},
- #{name},
- #{createDate}
- )
- </insert>
-
- </mapper>
|