123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <?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.overheadline.mapper.OverheadLineMapper">
- <select id="getList" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- SELECT
- a.simple_describe as 'describe',
- a.short_id as wbsCode,
- a.parent_node as parentNode,
- a.fee_type as feeType,
- 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.rg_fee_ft as rgFtFee,
- b.cbr_fee_ft as cbrFtFee,
- b.fbr_fee_ft as fbrFtFee,
- b.jx_fee_ft as jxFtFee,
- b.gx_fee as gxFee
- FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
- and b.id = #{id}
- <where>
- a.state = '1' and project_type = #{type}
- </where>
- </select>
- <select id="getData" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- SELECT
- a.simple_describe as 'describe',
- a.short_id as wbsCode,
- a.parent_node as parentNode,
- a.fee_type as feeType,
- 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.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 a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
- <where>
- b.id = #{id} and a.short_id = #{wbsCode}
- </where>
- </select>
- <select id="findList" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- 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.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
- FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
- and b.id = #{id}
- <where>
- <if test="type != ''">
- project_type = #{type}
- </if>
- </where>
- order by a.id
- </select>
- <select id="getAdjust" parameterType="String" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- select
- a.simple_describe as 'describe',
- a.short_id as wbsCode
- FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
- <where>
- b.id = #{id} and b.original_total_cost is not null
- </where>
- </select>
- <insert id="save" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- insert into sg_fee_detail_jkxl
- (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,
- zjgc_fee,
- rg_fee_ft,
- cbr_fee_ft,
- fbr_fee_ft,
- jx_fee_ft,
- gx_fee
- ) values (
- #{id},
- #{wbsCode},
- #{originalTotalCost},
- #{originalRate},
- #{originalRgCost},
- #{originalCbrCost},
- #{originalFbrCost},
- #{originalJxCost},
- #{rgCost},
- #{cbrCost},
- #{fbrCost},
- #{jxCost},
- #{measuresFee1},
- #{measuresFee2},
- #{measuresFee3},
- #{otherCost},
- #{fees},
- #{tex},
- #{totalFee},
- #{zjgcFee},
- #{rgFtFee},
- #{cbrFtFee},
- #{fbrFtFee},
- #{jxFtFee},
- #{gxFee}
- )
- </insert>
- <update id="updateDate" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
- update sg_fee_detail_jkxl 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>
- <delete id="delete" parameterType="String">
- delete from sg_fee_detail_jkxl
- <where>
- id = #{id}
- </where>
- </delete>
-
- </mapper>
|