Commit 8dbfb7a1 by jianglong

修改FTD交易

parent 0a1c9258
......@@ -104,32 +104,6 @@ public class Ftd extends AbstractCommonVo{
// @TDSetter(max=16)
private String gzno = NULLSTR;
private String cur = NULLSTR;
private BigDecimal amt = Decimals.ZERO_SCALE0;
}
\ No newline at end of file
......@@ -29,6 +29,8 @@ public class Fttp extends AbstractCommonVo {
//BANKTYP flag (max=1)
private String bnaktypflg = NULLSTR;
private Mt32m mt32m;
@Override
public void reset() {
super.reset();
......
package com.brilliance.isc.bo.model;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.util.Date;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Mt32m extends AbstractCommonVo {
private static Logger log = LoggerFactory.getLogger(Mt32m.class);
//Status E-nable, D-isable, I-nvisible
private String pansta = null;
//MT300 22A - 报文功能
private String amecur = null;
//Broker's Commission Amount
private BigDecimal ameamt = Decimals.ZERO_SCALE3;
private String newcur = null;
//Broker's Commission Amount
private BigDecimal newamt = Decimals.ZERO_SCALE3;
private String s22a = null;
//MT300 94A - 业务范�'
private String s94a = null;
private String s17r = null;
private String s22b = null;
private String s30x = null;
private String oldref = null;
private String conref = null;
private String conno = null;
private String a53act = null;
private String iniact = null;
private String rbcact = null;
private String a58act = null;
private String b53act = null;
private String b56act = null;
private String owcact = null;
private String b58act = null;
private String str300 = null;
private PtsptaVo b58;
private PtsptaVo b53;
private PtsptaVo owc;
private PtsptaVo b56;
private PtsptaVo rbc;
private PtsptaVo ini;
private PtsptaVo a53;
private PtsptaVo a58;
@Override
public void reset() {
super.reset();
}
}
package com.brilliance.isc.mda.dao;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.vo.funds.FtdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.funds.FttselQueryVo;
import org.apache.ibatis.annotations.Mapper;
import com.brilliance.isc.bo.Ftd;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.Map;
import java.util.List;
@Mapper
public interface FtdMapper {
int insert(Ftd record);
int insertSelective(Ftd record);
int updateByPrimaryKeySelective(Ftd record);
int updateByPrimaryKey(Ftd record);
int deleteByPrimaryKey(Ftd record);
int deleteByIds(Collection<Object> collection);
Ftd selectByPrimaryKey(Ftd record);
int dyncDelete(Map<String,Object> dyncMap);
List<Ftd> dyncRead(Map<String,Object> dyncMap);
List<FtdWithPtsCbbResponseVo> queryFtd(FttselQueryVo fttselQueryVo);
List<FtdWithPtsCbbResponseVo> queryFtdInfo(FttselQueryVo fttselQueryVo);
Ftd selectByInr(@Param("inr") String inr);
Ftd selectByOwnref(String ownref);
}
\ No newline at end of file
package com.brilliance.isc.mda.dao;
import org.apache.ibatis.annotations.Mapper;
import com.brilliance.isc.bo.Ftt;
import java.util.Collection;
import java.util.Map;
import java.util.List;
@Mapper
public interface FttMapper {
int insert(Ftt record);
int insertSelective(Ftt record);
int updateByPrimaryKeySelective(Ftt record);
int updateByPrimaryKey(Ftt record);
int deleteByPrimaryKey(Ftt record);
int deleteByIds(Collection<Object> collection);
Ftt selectByPrimaryKey(Ftt record);
int dyncDelete(Map<String,Object> dyncMap);
List<Ftt> dyncRead(Map<String,Object> dyncMap);
}
\ No newline at end of file
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.Decimals;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
@Data
......@@ -22,9 +25,11 @@ public class FtdBizInfoVo extends BizInfoVo{
private String etyextkey = NULLSTR;
private String swtflg = NULLSTR;
private String msgtyp = NULLSTR;
private BigDecimal canamt = BigDecimal.ZERO;
private Date valdat =null;
}
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 FttselQueryVo 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 fxtyp;
private List<String> fxtypList;
/**
* 是否闭卷
*/
private String isClosed;
/**
* 排序字段
*/
private String column;
/**
* 正序倒序
*/
private String order;
}
<?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.brilliance.isc.mda.dao.FtdMapper">
<resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Ftd">
<result property="inr" column="inr" jdbcType="VARCHAR"/>
<result property="ownref" column="ownref" jdbcType="VARCHAR"/>
<result property="nam" column="nam" jdbcType="VARCHAR"/>
<result property="opndat" column="opndat" jdbcType="DATE"/>
<result property="valdat" column="valdat" jdbcType="DATE"/>
<result property="cnfdat" column="cnfdat" jdbcType="DATE"/>
<result property="matdat" column="matdat" jdbcType="DATE"/>
<result property="clsdat" column="clsdat" jdbcType="DATE"/>
<result property="ownusr" column="ownusr" jdbcType="VARCHAR"/>
<result property="ver" column="ver" jdbcType="VARCHAR"/>
<result property="branchinr" column="branchinr" jdbcType="VARCHAR"/>
<result property="bchkeyinr" column="bchkeyinr" jdbcType="VARCHAR"/>
<result property="fttyp" column="fttyp" jdbcType="VARCHAR"/>
<result property="rat" column="rat" jdbcType="DECIMAL"/>
<result property="cntfra" column="cntfra" jdbcType="VARCHAR"/>
<result property="usr" column="usr" jdbcType="VARCHAR"/>
<result property="bnktyp" column="bnktyp" jdbcType="VARCHAR"/>
<result property="etyextkey" column="etyextkey" jdbcType="VARCHAR"/>
<result property="gzno" column="gzno" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
inr,ownref,nam,opndat,valdat,cnfdat,matdat,clsdat,ownusr,ver,branchinr,bchkeyinr,fttyp,rat,cntfra,usr,bnktyp,etyextkey,gzno
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ftd
where inr = #{inr,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey">
delete from ftd
where inr = #{inr,jdbcType=VARCHAR}
</delete>
<insert id="insert">
insert into ftd (<include refid="Base_Column_List" />)
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{inr,jdbcType=VARCHAR},
#{ownref,jdbcType=VARCHAR},
#{nam,jdbcType=VARCHAR},
#{opndat,jdbcType=DATE},
#{valdat,jdbcType=DATE},
#{cnfdat,jdbcType=DATE},
#{matdat,jdbcType=DATE},
#{clsdat,jdbcType=DATE},
#{ownusr,jdbcType=VARCHAR},
#{ver,jdbcType=VARCHAR},
#{branchinr,jdbcType=VARCHAR},
#{bchkeyinr,jdbcType=VARCHAR},
#{fttyp,jdbcType=VARCHAR},
#{rat,jdbcType=DECIMAL},
#{cntfra,jdbcType=VARCHAR},
#{usr,jdbcType=VARCHAR},
#{bnktyp,jdbcType=VARCHAR},
#{etyextkey,jdbcType=VARCHAR},
#{gzno,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertSelective">
insert into ftd
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inr != null">inr,</if>
<if test="ownref != null">ownref,</if>
<if test="nam != null">nam,</if>
<if test="opndat != null">opndat,</if>
<if test="valdat != null">valdat,</if>
<if test="cnfdat != null">cnfdat,</if>
<if test="matdat != null">matdat,</if>
<if test="clsdat != null">clsdat,</if>
<if test="ownusr != null">ownusr,</if>
<if test="ver != null">ver,</if>
<if test="branchinr != null">branchinr,</if>
<if test="bchkeyinr != null">bchkeyinr,</if>
<if test="fttyp != null">fttyp,</if>
<if test="rat != null">rat,</if>
<if test="cntfra != null">cntfra,</if>
<if test="usr != null">usr,</if>
<if test="bnktyp != null">bnktyp,</if>
<if test="etyextkey != null">etyextkey,</if>
<if test="gzno != null">gzno,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
<if test="ownref != null">#{ownref,jdbcType=VARCHAR}, </if>
<if test="nam != null">#{nam,jdbcType=VARCHAR}, </if>
<if test="opndat != null">#{opndat,jdbcType=DATE}, </if>
<if test="valdat != null">#{valdat,jdbcType=DATE}, </if>
<if test="cnfdat != null">#{cnfdat,jdbcType=DATE}, </if>
<if test="matdat != null">#{matdat,jdbcType=DATE}, </if>
<if test="clsdat != null">#{clsdat,jdbcType=DATE}, </if>
<if test="ownusr != null">#{ownusr,jdbcType=VARCHAR}, </if>
<if test="ver != null">#{ver,jdbcType=VARCHAR}, </if>
<if test="branchinr != null">#{branchinr,jdbcType=VARCHAR}, </if>
<if test="bchkeyinr != null">#{bchkeyinr,jdbcType=VARCHAR}, </if>
<if test="fttyp != null">#{fttyp,jdbcType=VARCHAR}, </if>
<if test="rat != null">#{rat,jdbcType=DECIMAL}, </if>
<if test="cntfra != null">#{cntfra,jdbcType=VARCHAR}, </if>
<if test="usr != null">#{usr,jdbcType=VARCHAR}, </if>
<if test="bnktyp != null">#{bnktyp,jdbcType=VARCHAR}, </if>
<if test="etyextkey != null">#{etyextkey,jdbcType=VARCHAR}, </if>
<if test="gzno != null">#{gzno,jdbcType=VARCHAR}, </if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update ftd
<set>
<if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
<if test="nam != null">nam = #{nam,jdbcType=VARCHAR},</if>
<if test="opndat != null">opndat = #{opndat,jdbcType=DATE},</if>
<if test="valdat != null">valdat = #{valdat,jdbcType=DATE},</if>
<if test="cnfdat != null">cnfdat = #{cnfdat,jdbcType=DATE},</if>
<if test="matdat != null">matdat = #{matdat,jdbcType=DATE},</if>
<if test="clsdat != null">clsdat = #{clsdat,jdbcType=DATE},</if>
<if test="ownusr != null">ownusr = #{ownusr,jdbcType=VARCHAR},</if>
<if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
<if test="branchinr != null">branchinr = #{branchinr,jdbcType=VARCHAR},</if>
<if test="bchkeyinr != null">bchkeyinr = #{bchkeyinr,jdbcType=VARCHAR},</if>
<if test="fttyp != null">fttyp = #{fttyp,jdbcType=VARCHAR},</if>
<if test="rat != null">rat = #{rat,jdbcType=DECIMAL},</if>
<if test="cntfra != null">cntfra = #{cntfra,jdbcType=VARCHAR},</if>
<if test="usr != null">usr = #{usr,jdbcType=VARCHAR},</if>
<if test="bnktyp != null">bnktyp = #{bnktyp,jdbcType=VARCHAR},</if>
<if test="etyextkey != null">etyextkey = #{etyextkey,jdbcType=VARCHAR},</if>
<if test="gzno != null">gzno = #{gzno,jdbcType=VARCHAR},</if>
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey">
update ftd
<set>
ownref = #{ownref,jdbcType=VARCHAR},
nam = #{nam,jdbcType=VARCHAR},
opndat = #{opndat,jdbcType=DATE},
valdat = #{valdat,jdbcType=DATE},
cnfdat = #{cnfdat,jdbcType=DATE},
matdat = #{matdat,jdbcType=DATE},
clsdat = #{clsdat,jdbcType=DATE},
ownusr = #{ownusr,jdbcType=VARCHAR},
ver = #{ver,jdbcType=VARCHAR},
branchinr = #{branchinr,jdbcType=VARCHAR},
bchkeyinr = #{bchkeyinr,jdbcType=VARCHAR},
fttyp = #{fttyp,jdbcType=VARCHAR},
rat = #{rat,jdbcType=DECIMAL},
cntfra = #{cntfra,jdbcType=VARCHAR},
usr = #{usr,jdbcType=VARCHAR},
bnktyp = #{bnktyp,jdbcType=VARCHAR},
etyextkey = #{etyextkey,jdbcType=VARCHAR},
gzno = #{gzno,jdbcType=VARCHAR},
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<delete id="deleteByIds">
delete from act where inr in
<foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<update id="dyncUpdate">
update ftd
<set>
<if test="module.ownref != null">ownref = #{module.ownref,jdbcType=VARCHAR},</if>
<if test="module.nam != null">nam = #{module.nam,jdbcType=VARCHAR},</if>
<if test="module.opndat != null">opndat = #{module.opndat,jdbcType=DATE},</if>
<if test="module.valdat != null">valdat = #{module.valdat,jdbcType=DATE},</if>
<if test="module.cnfdat != null">cnfdat = #{module.cnfdat,jdbcType=DATE},</if>
<if test="module.matdat != null">matdat = #{module.matdat,jdbcType=DATE},</if>
<if test="module.clsdat != null">clsdat = #{module.clsdat,jdbcType=DATE},</if>
<if test="module.ownusr != null">ownusr = #{module.ownusr,jdbcType=VARCHAR},</if>
<if test="module.ver != null">ver = #{module.ver,jdbcType=VARCHAR},</if>
<if test="module.branchinr != null">branchinr = #{module.branchinr,jdbcType=VARCHAR},</if>
<if test="module.bchkeyinr != null">bchkeyinr = #{module.bchkeyinr,jdbcType=VARCHAR},</if>
<if test="module.fttyp != null">fttyp = #{module.fttyp,jdbcType=VARCHAR},</if>
<if test="module.rat != null">rat = #{module.rat,jdbcType=DECIMAL},</if>
<if test="module.cntfra != null">cntfra = #{module.cntfra,jdbcType=VARCHAR},</if>
<if test="module.usr != null">usr = #{module.usr,jdbcType=VARCHAR},</if>
<if test="module.bnktyp != null">bnktyp = #{module.bnktyp,jdbcType=VARCHAR},</if>
<if test="module.etyextkey != null">etyextkey = #{module.etyextkey,jdbcType=VARCHAR},</if>
<if test="module.gzno != null">gzno = #{module.gzno,jdbcType=VARCHAR},</if>
</set>
${conditions}
</update>
<delete id="dyncDelete">
${sql}
</delete>
<select id="dyncRead" resultMap="BaseResultMap">
${sql}
</select>
<select id="queryFtd" resultType="com.brilliance.isc.vo.funds.FtdWithPtsCbbResponseVo">
select
ftd.*,
max1.cur maxcur,max1.amt maxamt,
nom1.cur nomcur,nom1.amt nomamt,
pty.extkey aplExtkey,pty.nam1 aplName
from ftd
left join cbb max1 on max1.OBJINR = ftd.inr and max1.OBJTYP = 'FTD' and max1.cbc = 'MAXSUM' and max1.extid =
'AMT1' and max1.enddat = '2299-12-31'
left join cbb nom1 on nom1.OBJINR = ftd.inr and nom1.OBJTYP = 'FTD' and nom1.cbc = 'NOMSUM' and nom1.extid =
'AMT1' and nom1.enddat = '2299-12-31'
left join pts on pts.OBJINR = ftd.inr and pts.OBJTYP = 'FTD' and pts.rol = 'APL'
left join pty pty on pty.inr = pts.ptyinr
<!--开立状态-->
where 1 = 1
<!--业务品种-->
<if test="fttypList != null and fttypList.size() > 0">
and ftd.fttyp in
<foreach item="item" collection="fttypList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--业务编号-->
<if test="seaownref != null and seaownref != ''">
AND UPPER(ftd.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
</if>
<!--日期-->
<!--日期-->
<if test="opndatfrom != null and opndatfrom != ''">
AND ftd.opndat &gt;= #{opndatfrom}
</if>
<if test="opndatto != null and opndatto != ''">
AND ftd.opndat &lt;= #{opndatto}
</if>
<!--客户号/名称 -->
<if test="searef != null and searef != ''">
and exists (
select 1 from PTS,PTY
where ftd.INR = PTS.OBJINR
AND PTY.INR = PTS.PTYINR
AND PTS.OBJTYP = 'FTD'
AND PTS.ROL = 'APL'
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 ftd.clsdat is not null
</if>
<if test="isClosed == 'N'.toString()">
and ftd.clsdat is null
</if>
</if>
order by ftd.opndat desc , ftd.ownref desc
</select>
<select id="selectByInr" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from ftd
where inr = #{inr,jdbcType=VARCHAR}
</select>
<select id="selectByOwnref" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from ftd
where ownref = #{ownref}
</select>
<select id="queryFtdInfo" resultType="com.brilliance.isc.vo.funds.FtdWithPtsCbbResponseVo"
parameterType="com.brilliance.isc.vo.funds.FttselQueryVo"></select>
</mapper>
<?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.brilliance.isc.mda.dao.FttMapper">
<resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Ftt">
<result property="inr" column="inr" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="contag72" column="contag72" jdbcType="VARCHAR"/>
<result property="contag79" column="contag79" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
inr,remark,contag72,contag79
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ftt
where inr = #{inr,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey">
delete from ftt
where inr = #{inr,jdbcType=VARCHAR}
</delete>
<insert id="insert">
insert into ftt (<include refid="Base_Column_List" />)
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{inr,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{contag72,jdbcType=VARCHAR},
#{contag79,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertSelective">
insert into ftt
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inr != null">inr,</if>
<if test="remark != null">remark,</if>
<if test="contag72 != null">contag72,</if>
<if test="contag79 != null">contag79,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
<if test="remark != null">#{remark,jdbcType=VARCHAR}, </if>
<if test="contag72 != null">#{contag72,jdbcType=VARCHAR}, </if>
<if test="contag79 != null">#{contag79,jdbcType=VARCHAR}, </if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update ftt
<set>
<if test="remark != null">remark = #{remark,jdbcType=VARCHAR},</if>
<if test="contag72 != null">contag72 = #{contag72,jdbcType=VARCHAR},</if>
<if test="contag79 != null">contag79 = #{contag79,jdbcType=VARCHAR},</if>
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey">
update ftt
<set>
remark = #{remark,jdbcType=VARCHAR},
contag72 = #{contag72,jdbcType=VARCHAR},
contag79 = #{contag79,jdbcType=VARCHAR},
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<delete id="deleteByIds">
delete from act where inr in
<foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<update id="dyncUpdate">
update ftt
<set>
<if test="module.remark != null">remark = #{module.remark,jdbcType=VARCHAR},</if>
<if test="module.contag72 != null">contag72 = #{module.contag72,jdbcType=VARCHAR},</if>
<if test="module.contag79 != null">contag79 = #{module.contag79,jdbcType=VARCHAR},</if>
</set>
${conditions}
</update>
<delete id="dyncDelete">
${sql}
</delete>
<select id="dyncRead" resultMap="BaseResultMap">
${sql}
</select>
</mapper>
......@@ -623,6 +623,9 @@ public class SettleContext {
case "FX":
role = "APL";
break;
case "FT":
role = "TRO";
break;
case "LE":
case "BE":
role = "BEN";
......
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