123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473 |
- <?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.liang.dao.PrjAnnualbudgetdetailDao">
- <resultMap type="com.liang.entity.PrjAnnualbudgetdetail" id="PrjAnnualbudgetdetailMap">
- <result property="id" column="ID" jdbcType="INTEGER"/>
- <result property="fymc" column="FYMC" jdbcType="VARCHAR"/>
- <result property="ysje" column="YSJE" jdbcType="NUMERIC"/>
- <result property="ysqje" column="YSQJE" jdbcType="NUMERIC"/>
- <result property="nys" column="NYS" jdbcType="INTEGER"/>
- <result property="bm" column="BM" jdbcType="VARCHAR"/>
- <result property="fj" column="FJ" jdbcType="VARCHAR"/>
- <result property="nf" column="NF" jdbcType="INTEGER"/>
- <result property="px" column="PX" jdbcType="VARCHAR"/>
- <result property="hjbm" column="HJBM" jdbcType="VARCHAR"/>
- <result property="bz" column="BZ" jdbcType="VARCHAR"/>
- <result property="dw1" column="DW1" jdbcType="NUMERIC"/>
- <result property="dw2" column="DW2" jdbcType="NUMERIC"/>
- <result property="dw3" column="DW3" jdbcType="NUMERIC"/>
- <result property="dw4" column="DW4" jdbcType="NUMERIC"/>
- <result property="dw5" column="DW5" jdbcType="NUMERIC"/>
- <result property="dw6" column="DW6" jdbcType="NUMERIC"/>
- <result property="dw7" column="DW7" jdbcType="NUMERIC"/>
- <result property="dw8" column="DW8" jdbcType="NUMERIC"/>
- <result property="dw9" column="DW9" jdbcType="NUMERIC"/>
- <result property="dw10" column="DW10" jdbcType="NUMERIC"/>
- <result property="sjys1" column="SJYS1" jdbcType="NUMERIC"/>
- <result property="sjys2" column="SJYS2" jdbcType="NUMERIC"/>
- <result property="sjys3" column="SJYS3" jdbcType="NUMERIC"/>
- <result property="sjys4" column="SJYS4" jdbcType="NUMERIC"/>
- <result property="sjys5" column="SJYS5" jdbcType="NUMERIC"/>
- <result property="sjys6" column="SJYS6" jdbcType="NUMERIC"/>
- <result property="sjys7" column="SJYS7" jdbcType="NUMERIC"/>
- <result property="sjys8" column="SJYS8" jdbcType="NUMERIC"/>
- <result property="sjys9" column="SJYS9" jdbcType="NUMERIC"/>
- <result property="sjys10" column="SJYS10" jdbcType="NUMERIC"/>
- <result property="xtjsyzx" column="XTJSYZX" jdbcType="NUMERIC"/>
- <result property="xmz" column="XMZ" jdbcType="NUMERIC"/>
- <result property="byj" column="BYJ" jdbcType="NUMERIC"/>
- <result property="zrje" column="ZRJE" jdbcType="NUMERIC"/>
- <result property="rwsys" column="RWSYS" jdbcType="NUMERIC"/>
- <result property="xmzys" column="XMZYS" jdbcType="NUMERIC"/>
- <result property="ybzje" column="YBZJE" jdbcType="NUMERIC"/>
- <result property="zcbyj" column="ZCBYJ" jdbcType="NUMERIC"/>
- <result property="kyys" column="KYYS" jdbcType="NUMERIC"/>
- <result property="zcje" column="ZCJE" jdbcType="NUMERIC"/>
- <result property="byjysq" column="BYJYSQ" jdbcType="NUMERIC"/>
- <result property="byqybz" column="BYQYBZ" jdbcType="NUMERIC"/>
- <result property="zrbyj" column="ZRBYJ" jdbcType="NUMERIC"/>
- <result property="sjyzx" column="SJYZX" jdbcType="NUMERIC"/>
- <result property="dnzyzf" column="DNZYZF" jdbcType="NUMERIC"/>
- </resultMap>
- <!--查询单个-->
- <select id="queryById" resultMap="PrjAnnualbudgetdetailMap">
- select *
- from prj_AnnualBudgetDetail
- where ID = #{id}
- </select>
- <!--查询指定行数据-->
- <select id="queryAllByLimit" resultMap="PrjAnnualbudgetdetailMap">
- select *
- from prj_AnnualBudgetDetail
- <where>
- <if test="id != null">
- and ID = #{id}
- </if>
- <if test="fymc != null and fymc != ''">
- and FYMC = #{fymc}
- </if>
- <if test="ysje != null">
- and YSJE = #{ysje}
- </if>
- <if test="ysqje != null">
- and YSQJE = #{ysqje}
- </if>
- <if test="nys != null">
- and NYS = #{nys}
- </if>
- <if test="bm != null and bm != ''">
- and BM = #{bm}
- </if>
- <if test="fj != null and fj != ''">
- and FJ = #{fj}
- </if>
- <if test="nf != null">
- and NF = #{nf}
- </if>
- <if test="px != null and px != ''">
- and PX = #{px}
- </if>
- <if test="hjbm != null and hjbm != ''">
- and HJBM = #{hjbm}
- </if>
- <if test="bz != null and bz != ''">
- and BZ = #{bz}
- </if>
- <if test="dw1 != null">
- and DW1 = #{dw1}
- </if>
- <if test="dw2 != null">
- and DW2 = #{dw2}
- </if>
- <if test="dw3 != null">
- and DW3 = #{dw3}
- </if>
- <if test="dw4 != null">
- and DW4 = #{dw4}
- </if>
- <if test="dw5 != null">
- and DW5 = #{dw5}
- </if>
- <if test="dw6 != null">
- and DW6 = #{dw6}
- </if>
- <if test="dw7 != null">
- and DW7 = #{dw7}
- </if>
- <if test="dw8 != null">
- and DW8 = #{dw8}
- </if>
- <if test="dw9 != null">
- and DW9 = #{dw9}
- </if>
- <if test="dw10 != null">
- and DW10 = #{dw10}
- </if>
- <if test="sjys1 != null">
- and SJYS1 = #{sjys1}
- </if>
- <if test="sjys2 != null">
- and SJYS2 = #{sjys2}
- </if>
- <if test="sjys3 != null">
- and SJYS3 = #{sjys3}
- </if>
- <if test="sjys4 != null">
- and SJYS4 = #{sjys4}
- </if>
- <if test="sjys5 != null">
- and SJYS5 = #{sjys5}
- </if>
- <if test="sjys6 != null">
- and SJYS6 = #{sjys6}
- </if>
- <if test="sjys7 != null">
- and SJYS7 = #{sjys7}
- </if>
- <if test="sjys8 != null">
- and SJYS8 = #{sjys8}
- </if>
- <if test="sjys9 != null">
- and SJYS9 = #{sjys9}
- </if>
- <if test="sjys10 != null">
- and SJYS10 = #{sjys10}
- </if>
- <if test="xtjsyzx != null">
- and XTJSYZX = #{xtjsyzx}
- </if>
- <if test="xmz != null">
- and XMZ = #{xmz}
- </if>
- <if test="byj != null">
- and BYJ = #{byj}
- </if>
- <if test="zrje != null">
- and ZRJE = #{zrje}
- </if>
- <if test="rwsys != null">
- and RWSYS = #{rwsys}
- </if>
- <if test="xmzys != null">
- and XMZYS = #{xmzys}
- </if>
- <if test="ybzje != null">
- and YBZJE = #{ybzje}
- </if>
- <if test="zcbyj != null">
- and ZCBYJ = #{zcbyj}
- </if>
- <if test="kyys != null">
- and KYYS = #{kyys}
- </if>
- <if test="zcje != null">
- and ZCJE = #{zcje}
- </if>
- <if test="byjysq != null">
- and BYJYSQ = #{byjysq}
- </if>
- <if test="byqybz != null">
- and BYQYBZ = #{byqybz}
- </if>
- <if test="zrbyj != null">
- and ZRBYJ = #{zrbyj}
- </if>
- <if test="sjyzx != null">
- and SJYZX = #{sjyzx}
- </if>
- <if test="dnzyzf != null">
- and DNZYZF = #{dnzyzf}
- </if>
- </where>
- limit #{pageable.offset}, #{pageable.pageSize}
- </select>
- <!--统计总行数-->
- <select id="count" resultType="java.lang.Long">
- select count(1)
- from prj_AnnualBudgetDetail
- <where>
- <if test="id != null">
- and ID = #{id}
- </if>
- <if test="fymc != null and fymc != ''">
- and FYMC = #{fymc}
- </if>
- <if test="ysje != null">
- and YSJE = #{ysje}
- </if>
- <if test="ysqje != null">
- and YSQJE = #{ysqje}
- </if>
- <if test="nys != null">
- and NYS = #{nys}
- </if>
- <if test="bm != null and bm != ''">
- and BM = #{bm}
- </if>
- <if test="fj != null and fj != ''">
- and FJ = #{fj}
- </if>
- <if test="nf != null">
- and NF = #{nf}
- </if>
- <if test="px != null and px != ''">
- and PX = #{px}
- </if>
- <if test="hjbm != null and hjbm != ''">
- and HJBM = #{hjbm}
- </if>
- <if test="bz != null and bz != ''">
- and BZ = #{bz}
- </if>
- <if test="dw1 != null">
- and DW1 = #{dw1}
- </if>
- <if test="dw2 != null">
- and DW2 = #{dw2}
- </if>
- <if test="dw3 != null">
- and DW3 = #{dw3}
- </if>
- <if test="dw4 != null">
- and DW4 = #{dw4}
- </if>
- <if test="dw5 != null">
- and DW5 = #{dw5}
- </if>
- <if test="dw6 != null">
- and DW6 = #{dw6}
- </if>
- <if test="dw7 != null">
- and DW7 = #{dw7}
- </if>
- <if test="dw8 != null">
- and DW8 = #{dw8}
- </if>
- <if test="dw9 != null">
- and DW9 = #{dw9}
- </if>
- <if test="dw10 != null">
- and DW10 = #{dw10}
- </if>
- <if test="sjys1 != null">
- and SJYS1 = #{sjys1}
- </if>
- <if test="sjys2 != null">
- and SJYS2 = #{sjys2}
- </if>
- <if test="sjys3 != null">
- and SJYS3 = #{sjys3}
- </if>
- <if test="sjys4 != null">
- and SJYS4 = #{sjys4}
- </if>
- <if test="sjys5 != null">
- and SJYS5 = #{sjys5}
- </if>
- <if test="sjys6 != null">
- and SJYS6 = #{sjys6}
- </if>
- <if test="sjys7 != null">
- and SJYS7 = #{sjys7}
- </if>
- <if test="sjys8 != null">
- and SJYS8 = #{sjys8}
- </if>
- <if test="sjys9 != null">
- and SJYS9 = #{sjys9}
- </if>
- <if test="sjys10 != null">
- and SJYS10 = #{sjys10}
- </if>
- <if test="xtjsyzx != null">
- and XTJSYZX = #{xtjsyzx}
- </if>
- <if test="xmz != null">
- and XMZ = #{xmz}
- </if>
- <if test="byj != null">
- and BYJ = #{byj}
- </if>
- <if test="zrje != null">
- and ZRJE = #{zrje}
- </if>
- <if test="rwsys != null">
- and RWSYS = #{rwsys}
- </if>
- <if test="xmzys != null">
- and XMZYS = #{xmzys}
- </if>
- <if test="ybzje != null">
- and YBZJE = #{ybzje}
- </if>
- <if test="zcbyj != null">
- and ZCBYJ = #{zcbyj}
- </if>
- <if test="kyys != null">
- and KYYS = #{kyys}
- </if>
- <if test="zcje != null">
- and ZCJE = #{zcje}
- </if>
- <if test="byjysq != null">
- and BYJYSQ = #{byjysq}
- </if>
- <if test="byqybz != null">
- and BYQYBZ = #{byqybz}
- </if>
- <if test="zrbyj != null">
- and ZRBYJ = #{zrbyj}
- </if>
- <if test="sjyzx != null">
- and SJYZX = #{sjyzx}
- </if>
- <if test="dnzyzf != null">
- and DNZYZF = #{dnzyzf}
- </if>
- </where>
- </select>
- <!--新增所有列-->
- <insert id="insert" keyProperty="id" useGeneratedKeys="true">
- insert into prj_AnnualBudgetDetail(FYMC, YSJE, YSQJE, NYS, BM, FJ, NF, PX, HJBM, BZ, DW1, DW2, DW3, DW4, DW5, DW6, DW7, DW8, DW9, DW10, SJYS1, SJYS2, SJYS3, SJYS4, SJYS5, SJYS6, SJYS7, SJYS8, SJYS9, SJYS10, XTJSYZX, XMZ, BYJ, ZRJE, RWSYS, XMZYS, YBZJE, ZCBYJ, KYYS, ZCJE, BYJYSQ, BYQYBZ, ZRBYJ, SJYZX, DNZYZF)
- values (#{fymc}, #{ysje}, #{ysqje}, #{nys}, #{bm}, #{fj}, #{nf}, #{px}, #{hjbm}, #{bz}, #{dw1}, #{dw2}, #{dw3}, #{dw4}, #{dw5}, #{dw6}, #{dw7}, #{dw8}, #{dw9}, #{dw10}, #{sjys1}, #{sjys2}, #{sjys3}, #{sjys4}, #{sjys5}, #{sjys6}, #{sjys7}, #{sjys8}, #{sjys9}, #{sjys10}, #{xtjsyzx}, #{xmz}, #{byj}, #{zrje}, #{rwsys}, #{xmzys}, #{ybzje}, #{zcbyj}, #{kyys}, #{zcje}, #{byjysq}, #{byqybz}, #{zrbyj}, #{sjyzx}, #{dnzyzf})
- </insert>
- <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
- insert into prj_AnnualBudgetDetail(FYMC, YSJE, YSQJE, NYS, BM, FJ, NF, PX, HJBM, BZ, DW1, DW2, DW3, DW4, DW5, DW6, DW7, DW8, DW9, DW10, SJYS1, SJYS2, SJYS3, SJYS4, SJYS5, SJYS6, SJYS7, SJYS8, SJYS9, SJYS10, XTJSYZX, XMZ, BYJ, ZRJE, RWSYS, XMZYS, YBZJE, ZCBYJ, KYYS, ZCJE, BYJYSQ, BYQYBZ, ZRBYJ, SJYZX, DNZYZF)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.fymc}, #{entity.ysje}, #{entity.ysqje}, #{entity.nys}, #{entity.bm}, #{entity.fj}, #{entity.nf}, #{entity.px}, #{entity.hjbm}, #{entity.bz}, #{entity.dw1}, #{entity.dw2}, #{entity.dw3}, #{entity.dw4}, #{entity.dw5}, #{entity.dw6}, #{entity.dw7}, #{entity.dw8}, #{entity.dw9}, #{entity.dw10}, #{entity.sjys1}, #{entity.sjys2}, #{entity.sjys3}, #{entity.sjys4}, #{entity.sjys5}, #{entity.sjys6}, #{entity.sjys7}, #{entity.sjys8}, #{entity.sjys9}, #{entity.sjys10}, #{entity.xtjsyzx}, #{entity.xmz}, #{entity.byj}, #{entity.zrje}, #{entity.rwsys}, #{entity.xmzys}, #{entity.ybzje}, #{entity.zcbyj}, #{entity.kyys}, #{entity.zcje}, #{entity.byjysq}, #{entity.byqybz}, #{entity.zrbyj}, #{entity.sjyzx}, #{entity.dnzyzf})
- </foreach>
- on duplicate key update
- FYMC = values(FYMC),
- YSJE = values(YSJE),
- YSQJE = values(YSQJE),
- NYS = values(NYS),
- BM = values(BM),
- FJ = values(FJ),
- NF = values(NF),
- PX = values(PX),
- HJBM = values(HJBM),
- BZ = values(BZ),
- DW1 = values(DW1),
- DW2 = values(DW2),
- DW3 = values(DW3),
- DW4 = values(DW4),
- DW5 = values(DW5),
- DW6 = values(DW6),
- DW7 = values(DW7),
- DW8 = values(DW8),
- DW9 = values(DW9),
- DW10 = values(DW10),
- SJYS1 = values(SJYS1),
- SJYS2 = values(SJYS2),
- SJYS3 = values(SJYS3),
- SJYS4 = values(SJYS4),
- SJYS5 = values(SJYS5),
- SJYS6 = values(SJYS6),
- SJYS7 = values(SJYS7),
- SJYS8 = values(SJYS8),
- SJYS9 = values(SJYS9),
- SJYS10 = values(SJYS10),
- XTJSYZX = values(XTJSYZX),
- XMZ = values(XMZ),
- BYJ = values(BYJ),
- ZRJE = values(ZRJE),
- RWSYS = values(RWSYS),
- XMZYS = values(XMZYS),
- YBZJE = values(YBZJE),
- ZCBYJ = values(ZCBYJ),
- KYYS = values(KYYS),
- ZCJE = values(ZCJE),
- BYJYSQ = values(BYJYSQ),
- BYQYBZ = values(BYQYBZ),
- ZRBYJ = values(ZRBYJ),
- SJYZX = values(SJYZX),
- DNZYZF = values(DNZYZF)
- </insert>
- <!--通过主键修改数据-->
- <update id="update">
- update prj_AnnualBudgetDetail
- set XMZYS = #{xmzys},
- XTJSYZX = #{xtjsyzx},
- SJYZX = #{sjyzx},
- YSJE = #{ysje},
- XMZ = #{xmz},
- BYJ = #{byj}
- where ID = #{id}
- </update>
- <!--通过主键删除-->
- <delete id="deleteById">
- delete from prj_AnnualBudgetDetail where ID = #{id}
- </delete>
- <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
- insert into prj_AnnualBudgetDetail(FYMC, NYS, BM, FJ, NF, PX, HJBM, BZ, DW1, DW2, DW3, DW4, DW5, DW6, DW7, DW8, DW9, DW10, RWSYS,XMZYS)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.mc}, #{entity.xm}, #{entity.bm}, #{entity.fj}, #{entity.nf}, #{entity.px}, #{entity.hjbm}, #{entity.bz}, #{entity.dw1}, #{entity.dw2},
- #{entity.dw3}, #{entity.dw4}, #{entity.dw5}, #{entity.dw6}, #{entity.dw7}, #{entity.dw8}, #{entity.dw9}, #{entity.dw10}, #{entity.ysje},#{entity.xmzys})
- </foreach>
- </insert>
- <!--获取年度预算-->
- <select id="getBudgetList" resultMap="PrjAnnualbudgetdetailMap">
- select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC, b.*
- from prj_AnnualBudgetDetail b
- where NYS = #{nys}
- </select>
- <!--获取费用申请年度预算-->
- <select id="getFysqBudgetList" resultMap="PrjAnnualbudgetdetailMap">
- select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC, b.*
- from prj_AnnualBudgetDetail b
- where NYS = #{nys}
- -- and ID not in (select FYLB from sta_BudgetApproval where FYLB = b.ID and SPZT != '作废')
- </select>
- <!--批量删除年度预算明细-->
- <delete id="batchDelete" parameterType="java.util.ArrayList">
- delete from prj_AnnualBudgetDetail
- where NYS in
- <foreach item="item" index="index" collection="nysList" open = "(" separator = "," close = ")">
- #{item}
- </foreach>
- </delete>
- <!--获取费用申请年度预算-->
- <select id="getSubNode" resultMap="PrjAnnualbudgetdetailMap">
- select (select FYMC from prj_AnnualBudgetDetail where BM = b.FJ and NYS = b.NYS) as FJMC, b.*
- from prj_AnnualBudgetDetail b
- where NYS = #{nys}
- and BM not in (select distinct FJ from prj_AnnualBudgetDetail where FJ != ''AND NYS=#{nys})
- </select>
- </mapper>
|