Commit b3485dfd by jianglong

新增INFCRD

parent 3d766977
......@@ -2,6 +2,10 @@ package com.brilliance.isc.mda.dao;
import com.brilliance.isc.bo.Crd;
import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.vo.funds.CrdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.funds.CrtselQueryVo;
import com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -35,4 +39,6 @@ public interface CrdMapper {
Crd selectByInr(@Param("inr") String inr);
Crd selectByOwnref(String ownref);
List<CrdWithPtsCbbResponseVo> queryCrdInfo(CrtselQueryVo crtselQueryVo);
}
\ No newline at end of file
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Crd;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class CrdWithPtsCbbResponseVo extends Crd {
/**
* 币种
*/
private String maxcur;
/**
* 折算币种
*/
private String opncur;
/**
* 开立金额
*/
private BigDecimal maxamt;
/**
* 折算开立金额
*/
private BigDecimal opnamt;
/**
* 客户号
*/
private String orcExtkey;
/**
* 客户名称
*/
private String orcName;
/**
* 客户号
*/
private String oriExtkey;
/**
* 客户名称
*/
private String oriName;
/**
* 客户号
*/
private String pybExtkey;
/**
* 客户名称
*/
private String pybName;
}
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.common.vo.CommonResult;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 进口信用证入口交易查询条件字段
*/
@Data
public class CrtselQueryVo extends CommonResult {
private String seaownref;
private String seanam;
private String opndatfrom;
private String opndatto;
/**
* 币种
*/
private String seacur;
/**
* 金额
*/
private BigDecimal seaamt;
/**
* 金额
*/
private BigDecimal seaamtfr;
/**
* 金额
*/
private BigDecimal seaamtto;
private String ownusr;
private String usr;
private String acc;
private String acc2;
private String searef;
private String ptyextkey;
private String ptynam;
private String seapty;
private String searol;
private String usrextkey;
private String seasta;
private String accmng;
private String clrtyp;
private String seapaytyp;
private String msgtyp;
private List<String> clrtypList;
/**
* 是否闭卷
*/
private String isClosed;
/**
* 排序字段
*/
private String column;
/**
* 正序倒序
*/
private String order;
}
......@@ -269,6 +269,84 @@
from crd
where ownref = #{ownref,jdbcType=VARCHAR}
</select>
<select id="queryCrdInfo" resultType="com.brilliance.isc.vo.funds.CrdWithPtsCbbResponseVo">
select
crd.*,
max1.cur maxcur,max1.amt maxamt,
opn1.cur nomcur,opn1.amt nomamt,
snd.extkey sndExtkey,snd.nam sndName ,
rcv.extkey rcvExtkey,rcv.nam rcvName ,
acc.extkey accExtkey,acc.nam accName
from crd
left join cbb max1 on max1.OBJINR = crd.inr and max1.OBJTYP = 'CRD' and max1.cbc = 'MAXSUM' and max1.extid =
'AMT1' and max1.enddat = '2299-12-31'
left join cbb opn1 on opn1.OBJINR = crd.inr and opn1.OBJTYP = 'CRD' and opn1.cbc = 'OPN' and opn1.extid =
'AMT1' and opn1.enddat = '2299-12-31'
left join pts snd on snd.OBJINR = crd.inr and snd.OBJTYP = 'CRD' and snd.rol = 'SND'
left join pts rcv on rcv.OBJINR = crd.inr and rcv.OBJTYP = 'CRD' and rcv.rol = 'RCV'
left join pts acc on acc.OBJINR = crd.inr and acc.OBJTYP = 'CRD' and acc.rol = 'ACC'
left join pty pty on pty.inr = snd.ptyinr
<!--开立状态-->
where 1 = 1
<!--业务编号-->
<if test="seaownref != null and seaownref != ''">
AND UPPER(crd.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
</if>
<!--日期-->
<!--日期-->
<if test="opndatfrom != null and opndatfrom != ''">
AND crd.opndat &gt;= #{opndatfrom}
</if>
<if test="opndatto != null and opndatto != ''">
AND crd.opndat &lt;= #{opndatto}
</if>
<!--客户号/名称 -->
<if test="searef != null and searef != ''">
and exists (
select 1 from PTS,PTY
where crd.INR = PTS.OBJINR
AND PTY.INR = PTS.PTYINR
AND PTS.OBJTYP = 'CRD'
AND PTS.ROL = 'SND'
AND (
PTS.EXTKEY LIKE concat(concat('%', #{searef}), '%')
or replace(PTS.NAM,'\n',' ') LIKE concat(concat('%', #{searef}), '%')
or PTS.CNNAM LIKE concat(concat('%', #{searef}), '%')
or PTS.ENNAM LIKE concat(concat('%', #{searef}), '%')
or PTY.NAM LIKE concat(concat('%', #{searef}), '%')
)
)
</if>
<!--是否闭卷 -->
<if test="isClosed != null and isClosed != ''">
<if test="isClosed == 'Y'.toString()">
and crd.clsdat is not null
</if>
<if test="isClosed == 'N'.toString()">
and crd.clsdat is null
</if>
</if>
<if test="seapaytyp != null and seapaytyp != ''">
AND crd.PAYTYP = #{seapaytyp}
</if>
<if test="msgtyp != null and msgtyp != ''">
AND crd.MSGTYP = #{msgtyp}
</if>
order by crd.opndat desc , crd.ownref desc
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment