12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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.cool.bang.modules.oracle.mapper.OracleMapper">
- <select id="selectFromBxm" resultType="java.util.Map">
- select t1.*, t2.qymc, t3.SPJSSJ from BXM t1
- left join BQY t2 on t1.qybh = t2.qybh
- left join (select t.* from (select t.XMBH, to_date(to_char(t2.SPJSSJ,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') as SPJSSJ, ROW_NUMBER() OVER (PARTITION BY t.XMBH ORDER BY t.XMBH DESC) rn from AREG t left join APPLY t2 on t2.AREGID = t.AREGID and t2.APPTYPE = 0 and T2.STATE = 1) t where t.rn = 1) t3 on t3.XMBH = t1.XMBH
- where t1.xmbh in (select XMBH from areg group by XMBH)
- </select>
- <select id="selectAregByXmbh" resultType="java.util.Map">
- select XMBH, JGSTATE from AREG where XMBH = #{xmbh}
- </select>
- <select id="selectFromAreg" resultType="java.util.Map">
- select t1.*,t3.name as BANKNAME,t3.code as BANKCODE
- from
- AREG t1
- LEFT JOIN
- ACCOUNT t2 on t1.aregid = t2.aregid
- left join
- BANK t3 on t2.bankcode = t3.code
- </select>
- <select id="selectFromAccount" resultType="java.util.Map">
- SELECT t1.ACCOUNTID,t4.QYBH,t1.ACCOUNTNAME,t1.ACCOUNTNO,t1.BANKCODE,t2.NAME as BANKNAME,t3.NAME as OPENADDRESS,t4.XMMC,t4.XMBH,
- t1.JGSTATE,t1.BALANCE as ACCOUNTBALANCE,t1.BALANCE as BOOKBALANCE ,t1.STATE,
- t1.ACCOUNTTYPE as TYPE,t1.FREEZE,to_date(to_char(t5.SPJSSJ,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') as KHRQ
- FROM ACCOUNT t1
- LEFT JOIN BANK t2 on t1.BANKCODE = t2.code
- LEFT JOIN BRANCH t3 on t1.BRANCHCODE = t3.code
- LEFT JOIN AREG t4 on t1.AREGID = t4.AREGID
- LEFT JOIN APPLY t5 on t1.APPID = t5.APPID AND t5.APPTYPE = 0
- WHERE ACCOUNTNAME IS NOT NULL
- </select>
- <!-- 查询账户(托管户/监管户)在途资金 -->
- <select id="selectAccountInTransitFund" resultType="java.math.BigDecimal">
- select sum(p.money) zhztzj from apply a,payitem p where a.appid =p.appid and p.state ='1' and a.state ='1'
- and p.paycode not in (select t.tradenum from trade t where t.tradestate ='1' and tradenum is not null) and p.accountid = #{accountid}
- </select>
- <!-- 查询工程进度申请信息 -->
- <resultMap id="GcjdsqMap" type="com.cool.bang.modules.oracle.domain.po.Gcjdsq">
- <result property="id" column="progressid" jdbcType="VARCHAR"/>
- <result property="xmbh" column="xmbh" jdbcType="VARCHAR"/>
- <result property="qybh" column="qybh" jdbcType="VARCHAR"/>
- <result property="jdmc" column="name" jdbcType="VARCHAR"/>
- <result property="lzbh" column="lzbh" jdbcType="VARCHAR"/>
- <result property="sqjd" column="percent" jdbcType="DECIMAL"/>
- <result property="aregid" column="regid" jdbcType="INTEGER"/>
- <result property="shzt" column="taskstate" jdbcType="INTEGER"/>
- <result property="bz" column="taskopinion" jdbcType="VARCHAR"/>
- <result property="sqr" column="sqr" jdbcType="VARCHAR"/>
- <result property="sqsj" column="sqsj" jdbcType="TIMESTAMP"/>
- <result property="shsj" column="shsj" jdbcType="TIMESTAMP"/>
- </resultMap>
- <select id="selectPromProgress" resultMap="GcjdsqMap">
- select * from progress where state = 1 and taskstate is not null
- </select>
- </mapper>
|