123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636 |
- <?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.unis.transaction.server.dao.TradeMarkDao">
-
- <sql id="traderuleColumns">
- bd.bdbm as bdbm,
- bd.bdh as bdh,
- bd.apbm as apbm
- </sql>
- <sql id="siteColumns">
- wt.wtbh as wtbh,
- wt.wtbm as wtbm,
- wt.jyrq as jyrq,
- wt.pzmc as pz,
- cc.ccbm as ccbm,
- cc.wczt as wczt,
- cc.sl as sl,
- cc.jyxz as jyxz,
- cc.apcc as apcc,
- cc.jybzj as jybzj,
- cc.lybzj as lybzj,
- cc.cczt as cczt,
- wt.wtfmc,
- wt.jyfs,
- wt.jyfsmc,
- wt.jyfx,
- wt.jyfxmc,
- wt.fbzt,
- wt.fbztmc,
- wt.apzt,
- wt.apztmc,
- cc.jysj
- </sql>
-
- <sql id="markColumns">
- ap.wtbm as wtbm,
- ap.ztmc as ztmc,
- ap.apbm as apbm,
- ap.jylx as jylx,
- ap.dwmc as dwmc,
- ap.ccdd as ccdd,
- ap.pzmc as pzmc,
- ap.lssl as lssl,
- ap.scnd as scnd,
- bd.bdh as bdh,
- bd.bdbm as bdbm,
- bd.status as status
- </sql>
- <sql id="wtColumns">
- wt.wtbh as wtbh,
- wt.wtbm as wtbm
- </sql>
-
- <sql id="traderuleJoins">
-
- </sql>
-
- <sql id="jyht_colums">
- htbm, htbh, shbh, bdh, bdbm, cmmc, sgmc, qddd, status,
- dj, je, jylx, lssl, cdkmc, cckmc, fddbr, pzmc, mtel, sgtel,
- wtdlr, khyh, khzh, zh, yzbm, sgbm, cjrq, creator,
- creator_code, refresher, refresher_code, refresh_time,
- remark, create_date, sgdw, pdfs, lsdj, cmdw, adress,
- njhck, nmfcck, nch, nnf, nsflt, nqydj, nzcjl, nckjzrq,
- ncfbm, nmfbm, nbz, nqpj, fsdw
- </sql>
-
- <update id="updateBytrade">
- UPDATE ty_jybd
- <set>
- <if test="status != null and status != ''">
- status = #{status},
- </if>
- <if test="refresher != null and refresher != ''">
- refresher = #{refresher},
- </if>
- <if test="refresherCode != null and refresherCode != ''">
- refresher_code = #{refresherCode},
- </if>
- <if test="refreshTime != null">
- refresh_time = #{refreshTime},
- </if>
- <if test="apbm != null and apbm != ''">
- apbm = #{apbm},
- </if>
- <if test="wtbm != null and wtbm != ''">
- wtbm = #{wtbm},
- </if>
- <if test="bdh != null and bdh != ''">
- bdh = #{bdh},
- </if>
- <if test="sl != null and sl != ''">
- sl = #{sl},
- </if>
- <if test="qbj != null">
- qbj = #{qbj},
- </if>
- <if test="sgkdbm != null and sgkdbm != ''">
- sgkdbm = #{sgkdbm},
- </if>
- <if test="sgkdmc != null and sgkdmc != ''">
- sgkdmc = #{sgkdmc},
- </if>
- <if test="cckdbm != null and cckdbm != ''">
- cckdbm = #{cckdbm},
- </if>
- <if test="cckdmc != null and cckdmc != ''">
- cckdmc = #{cckdmc},
- </if>
- <if test="qydj != null and qydj != ''">
- qydj = #{qydj}
- </if>
- </set>
- where bdbm = #{bdbm}
- </update>
- <delete id="deleteTradeMarkSite" parameterType="java.lang.String">
- delete from ty_jybd where wtbm=#{wtbm} and ccbm is null
- </delete>
-
- <select id="findByBdh" resultType="com.unis.transaction.common.vo.tradeplan.TradeMarkVO"
- parameterType="java.lang.String">
- SELECT
- <include refid="traderuleColumns" />
- FROM ty_jybd bd <include refid="traderuleJoins" />
- <where>
- and bd.bdh like '%' || #{value} || '%'
- </where>
- </select>
-
- <select id="findByApbm" resultType="com.unis.transaction.common.vo.tradeplan.TradeMarkVO" parameterType="java.lang.String">
- SELECT
- <include refid="traderuleColumns" />
- FROM ty_jybd bd <include refid="traderuleJoins" />
- <where>
- and bd.apbm =#{value}
- </where>
- </select>
-
- <select id="selectPageList" resultType="com.unis.transaction.common.vo.tradeplan.SiteVO" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- SELECT
- <include refid="siteColumns" />
- FROM ty_jycc cc
- left join ty_jycrkwt wt on cc.wtbm = wt.wtbm
- <trim prefix="where" prefixOverrides = "and|or">
- <if test="apcc != null and apcc != ''">
- and instr(cc.apcc, #{apcc}) > 0
- </if>
- <if test="cczt != null and cczt != ''">
- and cc.cczt = #{cczt}
- </if>
- <if test="jylx != null and jylx != ''">
- and wt.jylx = #{jylx}
- </if>
- <if test="wtbh != null and wtbh != ''">
- and instr(cc.wtbh, #{wtbh}) > 0
- </if>
- <if test="jyfx != null and jyfx != ''">
- and cc.jyfx = #{jyfx}
- </if>
- <if test="jyfs != null and jyfs != ''">
- and cc.jyfs = #{jyfs}
- </if>
- <if test="wtfmc != null and wtfmc != ''">
- and instr(cc.wtfmc, #{wtfmc}) > 0
- </if>
- <if test="jyrq != null">
- and cc.jyrq = to_date(#{jyrq}, 'yyyy-mm-dd')
- </if>
- <if test="fbzt != null">
- and wt.fbzt = #{fbzt}
- </if>
- <if test="wtfbm != null and wtfbm != 'LS001020'">
- and wt.wtfbm = #{wtfbm}
- </if>
- <if test="apzt != null and apzt != ''">
- and wt.apzt = #{apzt}
- </if>
- <choose>
- <when test="pageType != null and pageType == 1">
-
- </when>
- <when test="pageType != null and pageType == 2">
- <if test="wtfbm != null and wtfbm == 'LS001020'">
- and wt.apzt = '91000600'
- </if>
- </when>
- <when test="pageType != null and pageType == 3">
- and cc.cczt = '已发布'
- </when>
- </choose>
- </trim>
- order by cc.ccbm desc
- </select>
-
- <select id="selectCode" resultType="java.lang.Integer">
- select max(cccode) from ty_jycc
- </select>
- <select id="valiCode" resultType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select * from ty_jycc<include refid="traderuleJoins" />
- <where>
- <if test="cccode!=null and cccode != ''">
- and cccode = #{cccode}
- </if>
- <if test="ccbm!=null and ccbm != ''">
- and ccbm <> #{ccbm}
- </if>
- </where>
- </select>
-
- <select id="selectListBySite" resultType="com.unis.transaction.server.entity.tradeplan.EntryAndExitOrderDO">
- select <include refid="wtColumns" />
- FROM ty_jycrkwt wt where zt = '91000600'
- and wt.wtbm not in (select wtbm from ty_jycc where cczt = '已发布')
- order by wt.wtbh desc
- </select>
-
- <select id="selectPage" resultType="com.unis.transaction.common.vo.tradeplan.WarehousingArrangementVO">
- SELECT
- <include refid="markColumns" />
- FROM ty_jybd bd,ty_jycrkap ap<include refid="traderuleJoins" />
- <where>
- and bd.apbm = ap.apbm
- <if test="dwmc != null and dwmc != ''">
- and ap.dwmc like '%' || #{dwmc} || '%'
- </if>
- <if test="pzbm != null and pzbm != ''">
- and ap.pzbm = #{pzbm}
- </if>
- <if test="jylx != null">
- and ap.jylx = #{jylx}
- </if>
- <if test="wtfbm != null and wtfbm != ''">
- and ap.wtfbm = #{wtfbm}
- </if>
- <!-- <if test="wtfbm != null and wtfbm != ''">
- and ap.wtfbm like '%' || #{wtfbm} || '%'
- </if>-->
- <if test="status != null">
- and bd.status = #{status}
- </if>
- <if test="zt != null and zt != ''">
- and ap.zt = #{zt}
- </if>
- </where>
- order by bd.bdbm desc
- </select>
-
- <select id="selectContractPage" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select ht.*,
- decode(ht.jyfx, '0', '采购', '1', '销售', '0,1', '采购,销售', '') jyfxmc,
- decode(ht.jyfs, '0', '竞价', '1', '挂牌', '2', '购销双向', '') jyfsmc
- from ty_jyht ht
- <where>
- <if test="pzList">
- and ht.pzmc in
- <foreach collection="pzList" item="item" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="startDate != null">
- and ht.cjrq >= #{startDate}
- </if>
- <if test="endDate != null">
- and ht.cjrq <= #{endDate}
- </if>
- <if test="cmmc != null and cmmc != ''">
- and instr(decode(ht.jylx, 0, ht.sgmc, 1, ht.cmmc), #{cmmc}) > 0
- </if>
- <if test="sgmc != null and sgmc != ''">
- and instr(decode(ht.jylx, 0, ht.cmmc, 1, ht.sgmc), #{sgmc}) > 0
- </if>
- <if test="pzmc != null and pzmc != ''">
- and instr(ht.pzmc, #{pzmc}) > 0
- </if>
- <if test="htbh != null and htbh != ''">
- and ht.htbh like '%' || #{htbh} || '%'
- </if>
- <if test="apcc != null and apcc != ''">
- and instr(ht.apcc, #{apcc}) > 0
- </if>
- <if test="fsdw != null and fsdw != ''">
- and fsdw = #{fsdw, jdbcType=VARCHAR}
- </if>
- </where>
- order by ht.create_date desc
- </select>
-
- <select id="selectTradeMarkAll" resultType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select cc.apcc, cc.ccbm, cc.wtbm, cc.wtfmc, cc.wtfbm, cc.jyfx, cc.jyfs,cc.jybzj,cc.lybzj,cc.sxfl,
- cc.jyrq,
- decode(t1.lsxzbm, '1','121', '3', '121', '2', '122') lsxz
- from ty_jycc cc
- left join ty_jycrkwt t1 on t1.wtbm = cc.wtbm
- where cc.cczt = '已发布'
- -- and (select count(1) from ty_jybm bm where cc.ccbm = bm.ccbm and bm.shzt in ('91000003', '91000060')) > 0
- -- and cc.jyrq > ADD_MONTHS(today, -1)
- order by cc.jyrq desc, to_date(cc.jysj, 'hh24:mi') desc
- </select>
-
- <select id="selectContractList" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO" parameterType="java.lang.String">
- select ht.htbm,ht.htbh,ht.bdbm,ht.lssl from ty_jyht ht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and ht.bdbm in (select bd.bdbm from ty_jybd bd where bd.ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and ht.sgdw = #{dwbm}
- </if>
- </where>
- </select>
- <select id="selectwarehousingArrangementByWtbm" resultType="com.unis.transaction.common.vo.tradeplan.WarehousingArrangementVO">
- select dwbm from ty_jycrkap where wtbm=#{value} and zt is not null
- </select>
- <select id="selectTradeMarkByBdh" resultType="com.unis.transaction.server.entity.tradeplan.TradeMarkDO">
- select bd.bdbm,bd.bdh from ty_jybd bd where bd.wtbm in (select tk.wtbm from ty_jybzjtk tk where tk.tkfl is
- null) and bd.bdh not in (select bdh from ty_jyht) and bd.bdh = #{value}
- </select>
- <select id="selectPrimaryByBdh" resultType="com.unis.transaction.server.entity.tradeplan.TradeMarkDO">
- select * from ty_jybd bd where bd.bdh = #{value}
- </select>
-
- <select id="selectByBdh" resultType="com.unis.transaction.common.vo.tradeplan.TradeMarkVO">
- select bd.bdbm,bd.bdh,bd.apbm from ty_jybd bd where bd.bdh = #{value}
- </select>
-
- <select id="selectSiteByBdbm" resultType="com.unis.transaction.server.entity.tradeplan.SiteDO">
- select * from ty_jycc where ccbm =(select ccbm from ty_jybd where bdbm =#{value})
- </select>
-
- <select id="selectDwbmList" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select cmmc,cmdw from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
-
- <select id="selectDwbmLists" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select sgmc,sgdw from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
-
- <select id="selectContractByDwbm" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select ht.*,
- nvl(ht.shcnf, ht.nnf) shcnf,
- nvl(ht.nch, ap.ccdd) as nch,
- nvl(ht.ncfbm, ap.cfbm) as ncfbm
- from ty_jyht ht
- left join ty_jybd bd on bd.bdbm = ht.bdbm
- left join ty_jycrkap ap on bd.apbm = ap.apbm
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and ht.bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and ht.cmdw = #{dwbm}
- </if>
- <if test="jylx!=null and jylx!=''">
- and ht.jylx = #{jylx}
- </if>
- <if test="htList!=null">
- and ht.htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
- <select id="selectContractByDwbms" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select * from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and sgdw = #{dwbm}
- </if>
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
- <select id="selectContracts" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select htbm,htbh from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and sgdw = #{dwbm}
- </if>
- <if test="zt!=null ">
- and htbm not in (select htbm from ty_jytkwth where zt <> #{zt})
- </if>
- </where>
- union
- select htbm,htbh from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and cmdw = #{dwbm}
- </if>
- <if test="zt!=null ">
- and htbm not in (select htbm from ty_jytkwth where zt <> #{zt})
- </if>
- </where>
- </select>
- <select id="selectContractNotice" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select htbm,htbh from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="zt!=null ">
- and htbm not in (select htbm from ty_jytkwth where zt <> #{zt})
- </if>
- </where>
- </select>
- <select id="selectListByCcbm" resultType="com.unis.transaction.server.entity.tradeplan.TradeMarkDO">
- select ap.bdh, ap.bdbm
- from ty_jycrkap ap
- left join ty_jycc cc on cc.wtbm = ap.wtbm
- where cc.cczt = '已发布' and cc.ccbm = #{value}
- </select>
- <select id="selectByEntity" resultType="com.unis.transaction.server.entity.tradeplan.WarehousingArrangementDO" parameterType="com.unis.transaction.server.entity.tradeplan.WarehousingArrangementDO">
- select dwbm,dwmc,pzbm,pzmc,scnd from ty_jycrkap
- <where>
- <if test="wtbm!=null and wtbm!=''">
- and wtbm = #{wtbm}
- </if>
- <if test="sjlx!=null ">
- and sjlx = #{sjlx}
- </if>
- </where>
- </select>
- <select id="getDj" resultType="java.lang.Double">
- select min(qbj) from ty_jybd where ccbm = #{ccbm}
- </select>
- <select id="getCjsl" resultType="java.lang.String" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select sum(ht.lssl) from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="getZdcjj" resultType="java.lang.String" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select min(ht.dj) from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="getZgcjj" resultType="java.lang.String" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select max(ht.dj) from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="getCjje" resultType="java.lang.String" parameterType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select sum(ht.je) from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectContractByBdh" resultType="com.unis.transaction.server.entity.tradeplan.ContractDO">
- select * from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectContractByCmmc" resultType="com.unis.transaction.server.entity.tradeplan.ContractDO">
- select * from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- order by cmmc
- </select>
- <select id="selectContractBySgmc" resultType="com.unis.transaction.server.entity.tradeplan.ContractDO">
- select * from ty_jyht ht where
- <if test="htList!=null">
- ht.bdbm in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- order by sgmc
- </select>
- <select id="selectContractByZt" resultType="com.unis.transaction.common.vo.tradeplan.SiteVO">
- select * from ty_jycc cc where cc.wczt = #{value}
- </select>
- <select id="selectContractLists" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
-
- select ht.htbm,ht.htbh,ht.bdbm,ht.lssl from ty_jyht ht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and ht.bdbm in (select bd.bdbm from ty_jybd bd where bd.ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and ht.cmdw = #{dwbm}
- </if>
- </where>
- </select>
- <select id="getTotalSum" resultType="java.lang.String">
- select sum(ht.lssl) from ty_jyht ht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and ht.bdbm in (select bd.bdbm from ty_jybd bd where bd.ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- ht.cmdw = #{dwbm}
- </if>
- </where>
- </select>
- <select id="getTotalSums" resultType="java.lang.String">
- select sum(ht.lssl) from ty_jyht ht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and ht.bdbm in (select bd.bdbm from ty_jybd bd where bd.ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and ht.sgdw = #{dwbm}
- </if>
- </where>
- </select>
- <select id="selectTkdwList" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select * from ty_jyht where bdbm in (select bdbm from ty_jybd where wtbm in (select wtbm from ty_jycrkwt
- where wtfbm = #{dwbm}))
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectTkdwHtList" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select htbm,htbh from (select * from ty_jyht where sgdw= #{wtbm} or cmdw = #{wtbm}) ht where bdbm in
- (select bdbm from ty_jybd where wtbm in (select wtbm from ty_jycrkwt where wtfbm = #{dwbm}))
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="selectOrgCode" resultType="java.lang.String">
- select qyjgdm from base:tz_slqy where zzjgdm =#{value}
- </select>
- <select id="selectContractHtByDwbm" resultType="com.unis.transaction.common.vo.tradeplan.ContractVO">
- select * from ty_jyht
- <where>
- <if test="ccbm!=null and ccbm!=''">
- and bdh in (select bdh from ty_jybd where ccbm = #{ccbm})
- </if>
- <if test="dwbm!=null and dwbm!=''">
- and (cckdm = #{dwbm} or fsdw = #{dwbm})
- </if>
- <if test="jylx!=null and jylx!=''">
- and jylx = #{jylx}
- </if>
- <if test="htList!=null">
- and htbm not in
- <foreach collection="htList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="dwList!=null">
- and (
- cckdm in
- <foreach collection="dwList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- or fsdw in
- <foreach collection="dwList" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- )
- </if>
- </where>
- </select>
- <select id="selectGxgsList" resultType="java.lang.String">
- select org_code FROM usercenter:sys_orgainze where state_code='1'
- start with org_code = #{value}
- connect by prior org_code = parent_Code
- order by org_code
- </select>
- <select id="getKqdmByQyjgdm" resultType="java.lang.String">
- select
- kd.kqdm
- from base:d_kdxxsjy kd
- where kd.tyshxydm=
- (select
- qy.tyshxydm
- from base:tz_slqy qy
- where qyjgdm=#{cckdm})
- </select>
-
- </mapper>
|