Commit 9e973b3c by zhoujunpeng

资金定存拆借入口交易

资金定存拆借入口交易
parent 815e97af
package com.brilliance.isc.bo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Getter;
import lombok.Setter;
import java.math.BigDecimal;
import java.util.Date;
import static com.brilliance.mda.runtime.mda.Constants.NULLDATE;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
/**
* TABLE:ftd:FTD - Funds Transfer Data
*
*
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
public class Ftd{
//@TDSetter(max=8)
private String inr = NULLSTR;
//Reference
//@TDSetter(max=16)
private String ownref = NULLSTR;
//Externally Displayed Name to Identify the Contract
//@TDSetter(max=40)
private String nam = NULLSTR;
//Date Funds Transfer Opened/Issued
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
// @TDSetter
private Date opndat = NULLDATE;
//Value Date
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
//@TDSetter
private Date valdat = NULLDATE;
//Confirmed on
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
//@TDSetter
private Date cnfdat = NULLDATE;
//Maturity Date
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
//@TDSetter
private Date matdat = NULLDATE;
//Date Closed
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
//@TDSetter
private Date clsdat = NULLDATE;
//Responsible User
// @TDSetter(max=8)
private String ownusr = NULLSTR;
//Version Counter
// @TDSetter(max=4)
private String ver = NULLSTR;
//Branch INR
// @TDSetter(max=8)
private String branchinr = NULLSTR;
//Branch INR
//@TDSetter(max=8)
private String bchkeyinr = NULLSTR;
//Funds Transfer Type
// @TDSetter(max=2)
private String fttyp = NULLSTR;
//Rate per year
// @TDSetter(scale=6)
private BigDecimal rat = Decimals.ZERO_SCALE6;
//Day count Fraction
// @TDSetter(max=7)
private String cntfra = NULLSTR;
//User
//@TDSetter(max=8)
private String usr = NULLSTR;
//Bank Type
// @TDSetter(max=1)
private String bnktyp = NULLSTR;
//entity extkey
// @TDSetter(max=8)
private String etyextkey = NULLSTR;
//挂�'�编号
// @TDSetter(max=16)
private String gzno = NULLSTR;
private String cur = NULLSTR;
private BigDecimal amt = Decimals.ZERO_SCALE0;
}
\ No newline at end of file
package com.brilliance.isc.bo;
import com.brilliance.isc.common.vo.PageVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class FtdVo extends PageVo {
/**
* 汇款业务编号
*/
private String seaownref;
/**
* 名称
*/
private String nam;
/**
* 客户名称
* */
private String ownusr;
/**
*资金部经办人
**/
private String usr;
/**
* 银行类型
* */
private String bnktyp;
/**
* 挂起编号
* */
private String gzno;
/**
* 汇款开始日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date opndatfrom;
/**
* 汇款截止日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date opndatto;
/**
*状态
* */
private String seasta;
/**
* 资金转账类型
* */
private String fttyp;
/**
* //币种
*/
private String cur;
// /**
// * //金额
// */
private BigDecimal amtmax;
// /**
// * //金额
// */
private BigDecimal amtmin;
// /**
// *参与方参考号
// */
// private String searef;
// /**
// * 参与方名称
// * */
// private String seapty;
// /**
// * 角色 User
// * */
// private String searol;
// /**
// * user ID
// * */
//
// private String usrextkey;
// Getter method
// public String getFttyp() {
// return fttyp;
// }
//
// // Setter method
// public void setFttyp(String fttyp) {
// this.fttyp = fttyp;
// }
}
package com.brilliance.isc.bo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import static com.brilliance.mda.runtime.mda.Constants.NULLDATE;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
/**
* TABLE:Setsta
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Setsta {
//Internal Unique ID of Application Transaction
private String inr = NULLSTR;
//Object Type
private String objtyp = NULLSTR;
//Object INR
private String objinr = NULLSTR;
//Amount
private BigDecimal amt = Decimals.ZERO_SCALE2;
//Currency
private String cur = NULLSTR;
//Last Amount
private BigDecimal lstamt = Decimals.ZERO_SCALE2;
//Object Reference
private String objref = NULLSTR;
//Party INR
private String ptyinr = NULLSTR;
//Release Date
private Date reldat = NULLDATE;
}
\ No newline at end of file
package com.brilliance.isc.bo.model;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Ftdgrp extends AbstractCommonVo {
private Ftd rec;
private Cbb cbb;
@Override
public void reset() {
if (rec == null) {
rec = new Ftd();
}
if (cbb == null) {
cbb = new Cbb();
}
cbb.reset();
}
}
package com.brilliance.isc.bo.model;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Fxacbs extends AbstractCommonVo {
private Cbb max;
private Cbb nom1;
private Cbb opn1;
private Cbb opn2;
@Override
public void reset() {
super.reset();
if (max == null) {
max = new Cbb();
}
if (nom1 == null) {
nom1 = new Cbb();
}
if (opn1 == null) {
opn1 = new Cbb();
}
if (opn2 == null) {
opn2 = new Cbb();
}
}
}
package com.brilliance.isc.bo.model;
import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.bo.Fxt;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
/**
* @program: isc-core
* @ClassName: Fxdgrp
* @description: fxdgrp bo
* @author: huangshunlin
* @create: 2024-10-09 11:23
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Fxdgrp extends AbstractCommonVo {
private Fxd rec;
private Fxt blk;
private Fxacbs cbs;
private PtsptaVo apl;
private PtsptaVo act;
private PtsptaVo age;
private PtsptaVo acc;
@Override
public void reset() {
super.reset();
if (rec == null) {
rec = new Fxd();
}
if (blk == null) {
blk = new Fxt();
}
if (cbs == null) {
cbs = new Fxacbs();
}
cbs.reset();
if (apl == null) {
apl = new PtsptaVo();
}
apl.reset();
if (act == null) {
act = new PtsptaVo();
}
act.reset();
if (age == null) {
age = new PtsptaVo();
}
age.reset();
if (acc == null) {
acc = new PtsptaVo();
}
acc.reset();
}
}
package com.brilliance.isc.bo.model;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
/**
*
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Fxtp extends AbstractCommonVo {
private static Logger log = LoggerFactory.getLogger(Fxtp.class);
//Amount Label (max=30)
private String amtlab = NULLSTR;
//Amount LabelCNY (max=30)
private String cnylab = NULLSTR;
//Quote Flag (max=1)
private String quoflg = NULLSTR;
//钞汇标志 (max=1)
private String cshflg = NULLSTR;
//Calculate (max=1)
private String calflg = NULLSTR;
//外币 (max=1)
private String frgchk = NULLSTR;
//人民币 (max=1)
private String cnychk = NULLSTR;
@Override
public void reset() {
super.reset();
}
}
\ No newline at end of file
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.omg.CORBA.PRIVATE_MEMBER;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.util.Date;
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Mt30m extends AbstractCommonVo {
private static Logger log = LoggerFactory.getLogger(Mt30m.class);
//Status E-nable, D-isable, I-nvisible
private String pansta = null;
//MT300 22A - 报文功能
private String s22a = null;
//MT300 94A - 业务范�'
private String s94a = null;
//MT300 22C - 共同参号
private String conref = null;
//MT300 17T - 打包交易指示
private String s17t = null;
//MT300 17U - 分笔结算指示
private String s17u = null;
//Delivery Agent Account
private String a53act = null;
//Intermediary Account
private String iniact = null;
//Receiving Agent Account
private String rbcact = null;
//Delivery Agent Account
private String b53act = null;
//Intermediary Account
private String b56act = null;
//Receiving Agent Account
private String owcact = null;
//Beneficiary Institution Account
private String b58act = null;
//Contact Information
private String coninf = null;
//Dealing Method
private String deamet = null;
//Dealing Method Text
private String deamettxt = null;
//Dealing MethodMT300 24D
private String s24d = null;
//Broker's Commission Cur.
private String comcur = null;
//Broker's Commission Amount
private BigDecimal comamt = Decimals.ZERO_SCALE3;
//Counterparty's Reference
private String ctpref = null;
//Broker's Reference
private String c88ref = null;
//Sender to Receiver Information
private String str300 = null;
//Event Type
private String enttyp = null;
//Reference
private String sndref = null;
//Underlying Liability Reference
private String unlref = null;
//Profit and Loss Srttlement Date
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
private Date plsdat;
//Profit and Loss Settlement Amount CUR
private String plscur = null;
//Profit and Loss Settlement Amount
private BigDecimal plsamt = Decimals.ZERO_SCALE3;
//Outstanding Settlement Amount CUR
private String ouscur = null;
//Outstanding Settlement Amount
private BigDecimal ousamt = Decimals.ZERO_SCALE3;
// private Ptsp b58p;
//
// private Ptsp b53p;
//
// private Ptsp owcp;
//
// private Ptsp b56p;
//
// private Ptsp rbcp;
//
// private Ptsp inip;
//
// private Ptsp a53p;
private PtsptaVo b58;
private PtsptaVo b53;
private PtsptaVo owc;
private PtsptaVo b56;
private PtsptaVo rbc;
private PtsptaVo ini;
private PtsptaVo a53;
private PtsptaVo c84;
private PtsptaVo c85;
private PtsptaVo c88;
//private Ptsp c84p;
//private Ptsp c85p;
//private Ptsp c88p;
@Override
public void reset() {
super.reset();
}
}
package com.brilliance.isc.mda.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.bo.FtdVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface FtdselMapper extends BaseMapper<FtdVo> {
List<FtdVo> query(FtdVo vo);
Ftd selectByPrimaryKey(Ftd ftd);
//String findInrByRcvbic(String cod);
}
package com.brilliance.isc.mda.dao; package com.brilliance.isc.mda.dao;
import com.brilliance.isc.bo.Fxd; import com.brilliance.isc.bo.Fxd;
import com.brilliance.isc.bo.Lid;
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.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -31,4 +35,12 @@ public interface FxdMapper { ...@@ -31,4 +35,12 @@ public interface FxdMapper {
List<Fxd> dyncRead(Map<String, Object> dyncMap); List<Fxd> dyncRead(Map<String, Object> dyncMap);
List<FxdWithPtsCbbResponseVo> queryFxd(FxtselQueryVo fxtselQueryVo);
List<FxdWithPtsCbbResponseVo> queryFxdInfo(FxtselQueryVo fxtselQueryVo);
Fxd selectByInr(@Param("inr") String inr);
Fxd selectByOwnref(String ownref);
} }
\ No newline at end of file
package com.brilliance.isc.mda.dao;
import com.brilliance.isc.bo.Setsta;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@Mapper
public interface SetstaMapper {
int insert(Setsta record);
int insertSelective(Setsta record);
int updateByPrimaryKeySelective(Setsta record);
int updateByPrimaryKey(Setsta record);
int deleteByPrimaryKey(Setsta record);
int deleteByIds(Collection<Object> collection);
Setsta selectByPrimaryKey(Setsta record);
int dyncDelete(Map<String, Object> dyncMap);
int dyncUpdate(Map<String, Object> dyncMap);
List<Setsta> dyncRead(Map<String, Object> dyncMap);
BigDecimal getSumAmtByPtyinrAndCur(@Param("ptyinr") String ptyinr, @Param("cur") String cur);
BigDecimal getSumLstamtByPtyinrAndCur(@Param("ptyinr") String ptyinr, @Param("cur") String cur);
}
\ No newline at end of file
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import lombok.Data;
/**
* @program: isc-core
* @ClassName: FxdBizAmdInfoVo
* @description: fxd 修改业务数据
* @author: huangshunlin
* @create: 2024-10-09 17:40
*/
@Data
public class FxdBizAmdInfoVo extends BizAmdInfoVo {
}
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.mda.runtime.mda.util.Decimals;
import lombok.Data;
import java.math.BigDecimal;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
/**
* @program: isc-core
* @ClassName: FxdBizInfoVo
* @description: fxd业务数据
* @author: huangshunlin
* @create: 2024-10-09 17:40
*/
@Data
public class FxdBizInfoVo extends BizInfoVo {
//结售汇类型 fxdgrp.rec.fxtyp
private String fxtyp = NULLSTR;
/**
* fxdgrp.rec.dsp 结售汇业务的外币的记账账号类型
* LO客户往来账户以及SP国际结算过渡账户2个选项
*/
private String dsp = NULLSTR;
// 结售汇业务的外币的记账账号 fxdgrp.rec.acc
private String acc = NULLSTR;
//fxdgrp.rec.dsp2
private String dsp2 = NULLSTR;
;
//结售汇业务的本币的记账账号 fxdgrp.rec.acc2
private String acc2 = NULLSTR;
//Rate
private BigDecimal rat = Decimals.ZERO_SCALE6;
//交易主体
private String trnman = NULLSTR;
//TRADE IN
private String trdint = NULLSTR;
//TRADE OUT
private String trdout = NULLSTR;
private String swtflg = NULLSTR;
}
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Fxd;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class FxdWithPtsCbbResponseVo extends Fxd {
/**
* 币种
*/
private String maxcur;
/**
* 折算币种
*/
private String nomcur;
/**
* 开立金额
*/
private BigDecimal maxamt;
/**
* 折算开立金额
*/
private BigDecimal nomamt;
/**
* 客户号
*/
private String aplExtkey;
/**
* 客户名称
*/
private String aplName;
}
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.common.vo.CommonResult;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 进口信用证入口交易查询条件字段
*/
@Data
public class FxtselQueryVo 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;
}
...@@ -37,7 +37,7 @@ srvnam0=account ...@@ -37,7 +37,7 @@ srvnam0=account
mode0=s mode0=s
code0=7759 code0=7759
fgf0=| fgf0=|
open0=Y open0=S
[RBACCOUNT] [RBACCOUNT]
srvnam0=account srvnam0=account
...@@ -63,7 +63,7 @@ srvnam0=account ...@@ -63,7 +63,7 @@ srvnam0=account
mode0=s mode0=s
code0=8760 code0=8760
fgf0=| fgf0=|
open0=Y open0=S
[RBQIN] [RBQIN]
srvnam0=account srvnam0=account
......
<?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.FtdselMapper">
<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"/>
<!-- <result property="cur" column="cur" jdbcType="VARCHAR"/>-->
<!-- <result property="amt" column="amt" jdbcType="DECIMAL"/>-->
</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>
<!--在gzno后加,cbb.cur,cbb.amt-->
<select id="query" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from ftd
where
<if test=" opndatfrom != null ">
ftd.OPNDAT>=#{opndatfrom,jdbcType=DATE}
</if>
<if test=" opndatto != null ">
AND ftd.OPNDAT&lt;=#{opndatto,jdbcType=DATE}
</if>
<if test=" seaownref != null and seaownref != ''">
AND ftd.OWNREF=#{ seaownref,jdbcType=VARCHAR}
</if>
<if test=" nam != null and nam != ''">
AND ftd.NAM=#{ nam,jdbcType=VARCHAR}
</if>
<if test=" ownusr != null and ownusr != ''">
AND ftd.ownusr=#{ ownusr,jdbcType=VARCHAR}
</if>
<if test=" usr != null and usr != ''">
AND ftd.usr=#{ usr,jdbcType=VARCHAR}
</if>
<if test=" fttyp != null and fttyp != ''">
AND ftd.FTTYP=#{ fttyp,jdbcType=VARCHAR}
</if>
<if test=" gzno != null and gzno != ''">
AND ftd.gzno=#{ gzno,jdbcType=VARCHAR}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from ftd
where inr = #{inr,jdbcType=VARCHAR}
</select>
<!--资金调拨_连接cbb表查询-->
<!-- <select id="query" resultMap="BaseResultMap" parameterType="java.util.Map">-->
<!-- select <include refid="Base_Column_List" />-->
<!-- from ftd-->
<!-- join cbb on cbb.objinr = ftd.inr-->
<!-- where-->
<!-- <if test=" opndatfrom != null ">-->
<!-- ftd.OPNDAT>=#{opndatfrom,jdbcType=DATE}-->
<!-- </if>-->
<!-- <if test=" opndatto != null ">-->
<!-- AND ftd.OPNDAT&lt;=#{opndatto,jdbcType=DATE}-->
<!-- </if>-->
<!-- <if test=" seaownref != null and seaownref != ''">-->
<!-- AND ftd.OWNREF=#{ seaownref,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" nam != null and nam != ''">-->
<!-- AND ftd.NAM=#{ nam,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" ownusr != null and ownusr != ''">-->
<!-- AND ftd.ownusr=#{ ownusr,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" usr != null and usr != ''">-->
<!-- AND ftd.usr=#{ usr,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" fttyp != null and fttyp != ''">-->
<!-- AND ftd.FTTYP=#{ fttyp,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" gzno != null and gzno != ''">-->
<!-- AND ftd.gzno=#{ gzno,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test="cur != null and cur != ''">-->
<!-- AND cbb.cur = #{cur,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" amtmin != null and amtmin != ''">-->
<!-- AND cbb.amt &gt;=#{amtmin,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" amtmax != null and amtmax != ''">-->
<!-- AND cbb.amt &lt;=#{amtmax,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test="amtfr != null and amtto != null">-->
<!-- AND cbb.amt BETWEEN #{amtfr,jdbcType=DECIMAL} AND #{amtto,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test="seacur != null and seacur != ''">-->
<!-- AND ftd.SEACUR=#{seacur,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" seaamtfr != null and seaamtfr != ''">-->
<!-- AND ftd.SEAAMT>=#{seaamtfr,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" seaamtto != null and seaamtto != ''">-->
<!-- AND ftd.SEAAMT&lt;=#{seaamtto,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" seaamtto != null and seaamtto != ''">-->
<!-- AND ftd.SEAAMT<=#{seaamtto,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" chnipt != null and chnipt != ''">-->
<!-- <choose>-->
<!-- <when test=" chnipt == 'BLK'">-->
<!-- AND M1.nxtchncod=-->
<!-- </when>-->
<!-- <when test=" chnipt == 'wu'">-->
<!-- AND M1.tgtchncod IS NULL-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- AND M1.tgtchncod=-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </if>-->
<!-- <if test=" msgtyp != null and msgtyp != ''">-->
<!-- AND M2.msgtyp=#{ msgtyp,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" subtyp != null and subtyp != ''">-->
<!-- AND M2.subtyp=#{ subtyp,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" gpi != null and gpi != ''">-->
<!-- AND M2.gpi=#{ gpi,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" sndbak != null and sndbak != ''">-->
<!-- AND M2.sndbic like '%' || #{sndbak,jdbcType=VARCHAR} || '%'-->
<!-- </if>-->
<!-- <if test=" revbak != null and revbak != ''">-->
<!-- AND M2.rcvbic like '%' || #{revbak,jdbcType=VARCHAR} || '%'-->
<!-- </if>-->
<!-- <if test=" othref != null and othref != ''">-->
<!-- AND M2.othref like '%' || #{othref,jdbcType=VARCHAR} || ''-->
<!-- </if>-->
<!-- <if test=" ownref != null and ownref != ''">-->
<!-- AND M2.ownref like '%' || #{ ownref,jdbcType=VARCHAR} || '%'-->
<!-- </if>-->
<!-- <if test=" act != null and act != ''">-->
<!-- AND M2.act like '%' || #{ act,jdbcType=VARCHAR} || '%'-->
<!-- </if>-->
<!-- <if test=" cur != null and cur != ''">-->
<!-- AND M2.cur=#{ cur,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" dtlchg != null and dtlchg != ''">-->
<!-- AND M2.dtlchg=#{ dtlchg,jdbcType=VARCHAR}-->
<!-- </if>-->
<!-- <if test=" amtmin != null and amtmin != ''">-->
<!-- AND M2.amt &gt;= #{ amtmin,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" amtmax != null and amtmax != ''">-->
<!-- AND M2.amt &lt;= #{ amtmax,jdbcType=DECIMAL}-->
<!-- </if>-->
<!-- <if test=" actbic != null and actbic != ''">-->
<!-- AND (M2.actbic like '%' || #{ actbic,jdbcType=VARCHAR} || '%'-->
<!-- or M2.t53bic LIKE '%' || #{ actbic,jdbcType=VARCHAR} || '%')-->
<!-- </if>-->
<!-- <if test=" sta != null and sta != ''">-->
<!-- AND M1.sta=#{ sta,jdbcType=VARCHAR}-->
<!-- </if>-->
</mapper>
\ No newline at end of file
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
and IS_SHOW = 'Y' and IS_SHOW = 'Y'
order by SORT order by SORT
</select> </select>
<select id="selectByBustypAndIsShowAndBranch" resultType="com.brilliance.isc.bo.Busbtn"> <select id="selectByBustypAndIsShowAndBranch" resultType="com.brilliance.isc.bo.Busbtn">
select select
b.bustyp bustyp,case when a.inifrm is null then b.inifrm else a.inifrm end inifrm ,b.btnnam btnnam,b.IS_MAIN isMain,b.IS_SHOW isShow b.bustyp bustyp,case when a.inifrm is null then b.inifrm else a.inifrm end inifrm ,b.btnnam btnnam,b.IS_MAIN isMain,b.IS_SHOW isShow
......
...@@ -292,6 +292,97 @@ ...@@ -292,6 +292,97 @@
${sql} ${sql}
</select> </select>
<select id="queryFxd" resultType="com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo">
select
fxd.*,
max1.cur maxcur,max1.amt maxamt,
nom1.cur nomcur,nom1.amt nomamt,
pty.extkey aplExtkey,pty.nam1 aplName
from fxd
left join cbb max1 on max1.OBJINR = fxd.inr and max1.OBJTYP = 'FXD' and max1.cbc = 'MAXSUM' and max1.extid =
'AMT1' and max1.enddat = '2299-12-31'
left join cbb nom1 on nom1.OBJINR = fxd.inr and nom1.OBJTYP = 'FXD' and nom1.cbc = 'NOMSUM' and nom1.extid =
'AMT1' and nom1.enddat = '2299-12-31'
left join pts on pts.OBJINR = fxd.inr and pts.OBJTYP = 'FXD' and pts.rol = 'APL'
left join pty pty on pty.inr = pts.ptyinr
<!--开立状态-->
where 1 = 1
<!--业务品种-->
<if test="fxtypList != null and fxtypList.size() > 0">
and fxd.fxtyp in
<foreach item="item" collection="fxtypList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<!--业务编号-->
<if test="seaownref != null and seaownref != ''">
AND UPPER(fxd.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
</if>
<!--日期-->
<!--日期-->
<if test="opndatfrom != null and opndatfrom != ''">
AND fxd.opndat &gt;= #{opndatfrom}
</if>
<if test="opndatto != null and opndatto != ''">
AND fxd.opndat &lt;= #{opndatto}
</if>
<!--客户号/名称 -->
<if test="searef != null and searef != ''">
and exists (
select 1 from PTS,PTY
where fxd.INR = PTS.OBJINR
AND PTY.INR = PTS.PTYINR
AND PTS.OBJTYP = 'FXD'
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 fxd.clsdat is not null
</if>
<if test="isClosed == 'N'.toString()">
and fxd.clsdat is null
</if>
</if>
order by fxd.opndat desc , fxd.ownref desc
</select>
<select id="selectByInr" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from fxd
where inr = #{inr,jdbcType=VARCHAR}
</select>
<select id="selectByOwnref" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from fxd
where ownref = #{ownref}
</select>
<select id="queryFxdInfo" resultType="com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo">
</select>
</mapper> </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.SetstaMapper">
<resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Setsta">
<result property="inr" column="inr" jdbcType="VARCHAR"/>
<result property="objtyp" column="objtyp" jdbcType="VARCHAR"/>
<result property="objtyp" column="objtyp" jdbcType="VARCHAR"/>
<result property="amt" column="amt" jdbcType="DECIMAL"/>
<result property="cur" column="cur" jdbcType="VARCHAR"/>
<result property="lstamt" column="lstamt" jdbcType="DECIMAL"/>
<result property="objref" column="objref" jdbcType="VARCHAR"/>
<result property="ptyinr" column="ptyinr" jdbcType="VARCHAR"/>
<result property="reldat" column="reldat" jdbcType="DATE"/>
</resultMap>
<sql id="Base_Column_List">
inr,objtyp,objinr,amt,cur,lstamt,objref,ptyinr,reldat
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from setsta
where inr = #{inr,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey">
delete from setsta
where inr = #{inr,jdbcType=VARCHAR}
</delete>
<insert id="insert">
insert into setsta (<include refid="Base_Column_List"/>)
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{inr,jdbcType=VARCHAR},
#{objtyp,jdbcType=VARCHAR},
#{objinr,jdbcType=VARCHAR},
#{amt,jdbcType=DECIMAL},
#{cur,jdbcType=VARCHAR},
#{lstamt,jdbcType=DECIMAL},
#{objref,jdbcType=VARCHAR},
#{ptyinr,jdbcType=VARCHAR},
#{reldat,jdbcType=DATE},
</trim>
</insert>
<!-- inr,objtyp,objinr,amt,cur,lstamt,objref,ptyinr,reldat-->
<insert id="insertSelective">
insert into setsta
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inr != null">inr,</if>
<if test="objtyp != null">objtyp,</if>
<if test="objinr != null">objinr,</if>
<if test="amt != null">amt,</if>
<if test="cur != null">cur,</if>
<if test="lstamt != null">lstamt,</if>
<if test="objref != null">objref,</if>
<if test="ptyinr != null">ptyinr,</if>
<if test="reldat != null">reldat,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inr != null">#{inr,jdbcType=VARCHAR},</if>
<if test="objtyp != null">#{objtyp,jdbcType=VARCHAR},</if>
<if test="objinr != null">#{objinr,jdbcType=VARCHAR},</if>
<if test="amt != null">#{amt,jdbcType=DECIMAL},</if>
<if test="cur != null">#{cur,jdbcType=VARCHAR},</if>
<if test="lstamt != null">#{lstamt,jdbcType=DECIMAL},</if>
<if test="objref != null">#{objref,jdbcType=VARCHAR},</if>
<if test="ptyinr != null">#{ptyinr,jdbcType=VARCHAR},</if>
<if test="reldat != null">#{reldat,jdbcType=DATE},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">
update setsta
<set>
<if test="objtyp != null">objtyp = #{objtyp,jdbcType=VARCHAR},</if>
<if test="objinr != null">objinr = #{objinr,jdbcType=VARCHAR},</if>
<if test="amt != null">amt = #{amt,jdbcType=DECIMAL},</if>
<if test="cur != null">cur = #{cur,jdbcType=VARCHAR},</if>
<if test="lstamt != null">lstamt = #{lstamt,jdbcType=DECIMAL},</if>
<if test="objref != null">objref = #{objref,jdbcType=VARCHAR},</if>
<if test="ptyinr != null">ptyinr = #{ptyinr,jdbcType=VARCHAR},</if>
<if test="reldat != null">reldat = #{reldat,jdbcType=DATE},</if>
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey">
update setsta
<set>
objtyp = #{objtyp,jdbcType=VARCHAR},
objinr = #{objinr,jdbcType=VARCHAR},
amt = #{amt,jdbcType=DECIMAL},
cur = #{cur,jdbcType=VARCHAR},
lstamt = #{lstamt,jdbcType=DECIMAL},
objref = #{objref,jdbcType=VARCHAR},
ptyinr = #{ptyinr,jdbcType=VARCHAR},
reldat = #{reldat,jdbcType=DATE},
</set>
where inr = #{inr,jdbcType=VARCHAR}
</update>
<delete id="deleteByIds">
delete from setsta where inr in
<foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<update id="dyncUpdate">
update setsta
<set>
<if test="module.objtyp != null">objtyp = #{module.objtyp,jdbcType=VARCHAR},</if>
<if test="module.objinr != null">objinr = #{module.objinr,jdbcType=VARCHAR},</if>
<if test="module.amt != null">amt = #{module.amt,jdbcType=DECIMAL},</if>
<if test="module.cur != null">cur = #{module.cur,jdbcType=VARCHAR},</if>
<if test="module.lstamt != null">lstamt = #{module.lstamt,jdbcType=DECIMAL},</if>
<if test="module.objref != null">objref = #{module.objref,jdbcType=VARCHAR},</if>
<if test="module.ptyinr != null">ptyinr = #{module.ptyinr,jdbcType=VARCHAR},</if>
<if test="module.reldat != null">reldat = #{module.reldat,jdbcType=DATE},</if>
</set>
${conditions}
</update>
<delete id="dyncDelete">
${sql}
</delete>
<select id="dyncRead" resultMap="BaseResultMap">
${sql}
</select>
<select id="getSumAmtByPtyinrAndCur" resultType="java.math.BigDecimal">
SELECT SUM(amt) FROM SETSTA WHERE ptyinr =#{ptyinr} and cur =#{cur}
</select>
<select id="getSumLstamtByPtyinrAndCur" resultType="java.math.BigDecimal">
SELECT SUM(lstamt) FROM SETSTA WHERE ptyinr =#{ptyinr} and cur =#{cur}
</select>
</mapper>
...@@ -45,6 +45,10 @@ ...@@ -45,6 +45,10 @@
<result property="chlflg" column="chlflg" jdbcType="VARCHAR"/> <result property="chlflg" column="chlflg" jdbcType="VARCHAR"/>
<result property="orimsgtyp" column="orimsgtyp" jdbcType="VARCHAR"/> <result property="orimsgtyp" column="orimsgtyp" jdbcType="VARCHAR"/>
<result property="mpiinr" column="mpiinr" jdbcType="VARCHAR"/> <result property="mpiinr" column="mpiinr" jdbcType="VARCHAR"/>
<result property="xxxcnt" column="xxxcnt" jdbcType="INTEGER"/>
<result property="docmd5" column="docmd5" jdbcType="VARCHAR"/>
<result property="doclen" column="doclen" jdbcType="NUMERIC"/>
</resultMap> </resultMap>
...@@ -60,7 +64,7 @@ ...@@ -60,7 +64,7 @@
<!-- </resultMap>--> <!-- </resultMap>-->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
inr,objtyp,objinr,trntyp,trninr,trnsub,extkey,nam,creusr,crefrm,credattim,dir,docpth,docfil,docfxt,docmac,msgpos,msglen,grpinr,grpseq,cortyp,cortypsub,apf,sndkey,apfcnt,ptainr,oriflg,orismhinr,partflg,msgtyp,relcur,relamt,stp,etyextkey,sysno,staflg,clndat,f20,chlflg,orimsgtyp,mpiinr inr,objtyp,objinr,trntyp,trninr,trnsub,extkey,nam,creusr,crefrm,credattim,dir,docpth,docfil,docfxt,docmac,msgpos,msglen,grpinr,grpseq,cortyp,cortypsub,apf,sndkey,apfcnt,ptainr,oriflg,orismhinr,partflg,msgtyp,relcur,relamt,stp,etyextkey,sysno,staflg,clndat,f20,chlflg,orimsgtyp,mpiinr,xxxcnt,docmd5,doclen
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" resultMap="BaseResultMap">
...@@ -120,6 +124,9 @@ ...@@ -120,6 +124,9 @@
#{chlflg,jdbcType=VARCHAR}, #{chlflg,jdbcType=VARCHAR},
#{orimsgtyp,jdbcType=VARCHAR}, #{orimsgtyp,jdbcType=VARCHAR},
#{mpiinr,jdbcType=VARCHAR}, #{mpiinr,jdbcType=VARCHAR},
#{xxxcnt,jdbcType=INTEGER},
#{docmd5,jdbcType=VARCHAR},
#{doclen,jdbcType=NUMERIC},
</trim> </trim>
</insert> </insert>
...@@ -167,6 +174,9 @@ ...@@ -167,6 +174,9 @@
<if test="chlflg != null">chlflg,</if> <if test="chlflg != null">chlflg,</if>
<if test="orimsgtyp != null">orimsgtyp,</if> <if test="orimsgtyp != null">orimsgtyp,</if>
<if test="mpiinr != null">mpiinr,</if> <if test="mpiinr != null">mpiinr,</if>
<if test="xxxcnt != null">xxxcnt,</if>
<if test="docmd5 != null">docmd5,</if>
<if test="doclen != null">doclen,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inr != null">#{inr,jdbcType=VARCHAR},</if> <if test="inr != null">#{inr,jdbcType=VARCHAR},</if>
...@@ -210,6 +220,9 @@ ...@@ -210,6 +220,9 @@
<if test="chlflg != null">#{chlflg,jdbcType=VARCHAR},</if> <if test="chlflg != null">#{chlflg,jdbcType=VARCHAR},</if>
<if test="orimsgtyp != null">#{orimsgtyp,jdbcType=VARCHAR},</if> <if test="orimsgtyp != null">#{orimsgtyp,jdbcType=VARCHAR},</if>
<if test="mpiinr != null">#{mpiinr,jdbcType=VARCHAR},</if> <if test="mpiinr != null">#{mpiinr,jdbcType=VARCHAR},</if>
<if test="xxxcnt != null">#{xxxcnt,jdbcType=INTEGER},</if>
<if test="docmd5 != null">#{docmd5,jdbcType=VARCHAR},</if>
<if test="doclen != null">#{doclen,jdbcType=NUMERIC},</if>
</trim> </trim>
</insert> </insert>
...@@ -256,6 +269,9 @@ ...@@ -256,6 +269,9 @@
<if test="chlflg != null">chlflg = #{chlflg,jdbcType=VARCHAR},</if> <if test="chlflg != null">chlflg = #{chlflg,jdbcType=VARCHAR},</if>
<if test="orimsgtyp != null">orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR},</if> <if test="orimsgtyp != null">orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR},</if>
<if test="mpiinr != null">mpiinr = #{mpiinr,jdbcType=VARCHAR},</if> <if test="mpiinr != null">mpiinr = #{mpiinr,jdbcType=VARCHAR},</if>
<if test="xxxcnt != null">xxxcnt = #{xxxcnt,jdbcType=INTEGER},</if>
<if test="docmd5 != null">docmd5 = #{docmd5,jdbcType=VARCHAR},</if>
<if test="doclen != null">doclen = #{doclen,jdbcType=NUMERIC},</if>
</set> </set>
where inr = #{inr,jdbcType=VARCHAR} where inr = #{inr,jdbcType=VARCHAR}
</update> </update>
...@@ -303,6 +319,9 @@ ...@@ -303,6 +319,9 @@
chlflg = #{chlflg,jdbcType=VARCHAR}, chlflg = #{chlflg,jdbcType=VARCHAR},
orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR}, orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR},
mpiinr = #{mpiinr,jdbcType=VARCHAR}, mpiinr = #{mpiinr,jdbcType=VARCHAR},
xxxcnt = #{xxxcnt,jdbcType=INTEGER},
docmd5 = #{docmd5,jdbcType=VARCHAR},
doclen = #{doclen,jdbcType=NUMERIC},
</set> </set>
where inr = #{inr,jdbcType=VARCHAR} where inr = #{inr,jdbcType=VARCHAR}
</update> </update>
...@@ -356,7 +375,10 @@ ...@@ -356,7 +375,10 @@
<if test="module.f20 != null">f20 = #{module.f20,jdbcType=VARCHAR},</if> <if test="module.f20 != null">f20 = #{module.f20,jdbcType=VARCHAR},</if>
<if test="module.chlflg != null">chlflg = #{module.chlflg,jdbcType=VARCHAR},</if> <if test="module.chlflg != null">chlflg = #{module.chlflg,jdbcType=VARCHAR},</if>
<if test="module.orimsgtyp != null">orimsgtyp = #{module.orimsgtyp,jdbcType=VARCHAR},</if> <if test="module.orimsgtyp != null">orimsgtyp = #{module.orimsgtyp,jdbcType=VARCHAR},</if>
<if test="module.mpiinr != null">orimsgtyp = #{module.mpiinr,jdbcType=VARCHAR},</if> <if test="module.mpiinr != null">mpiinr = #{module.mpiinr,jdbcType=VARCHAR},</if>
<if test="module.xxxcnt != null">xxxcnt = #{module.xxxcnt,jdbcType=INTEGER},</if>
<if test="module.docmd5 != null">docmd5 = #{module.docmd5,jdbcType=VARCHAR},</if>
<if test="module.doclen != null">doclen = #{module.doclen,jdbcType=NUMERIC},</if>
</set> </set>
${conditions} ${conditions}
</update> </update>
...@@ -441,6 +463,9 @@ ...@@ -441,6 +463,9 @@
<if test="chlflg != null">and chlflg = #{chlflg,jdbcType=VARCHAR}</if> <if test="chlflg != null">and chlflg = #{chlflg,jdbcType=VARCHAR}</if>
<if test="orimsgtyp != null">and orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR}</if> <if test="orimsgtyp != null">and orimsgtyp = #{orimsgtyp,jdbcType=VARCHAR}</if>
<if test="mpiinr != null">and mpiinr = #{mpiinr,jdbcType=VARCHAR}</if> <if test="mpiinr != null">and mpiinr = #{mpiinr,jdbcType=VARCHAR}</if>
<if test="xxxcnt != null">and xxxcnt = #{xxxcnt,jdbcType=INTEGER}</if>
<if test="docmd5 != null">and docmd5 = #{docmd5,jdbcType=VARCHAR}</if>
<if test="doclen != null">and doclen = #{doclen,jdbcType=NUMERIC}</if>
</select> </select>
<select id="selectRelationSmh" resultMap="BaseResultMap"> <select id="selectRelationSmh" resultMap="BaseResultMap">
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
<select id="selectRefByTrninr" resultType="java.lang.String"> <select id="selectRefByTrninr" resultType="java.lang.String">
select select
concat(INIFRM ,'-',OWNREF) REF concat(INIFRM ,'-',OWNREF) "REF"
from trn from trn
where inr in (select prvinr from tro where TRNINR= #{trninr} ) where inr in (select prvinr from tro where TRNINR= #{trninr} )
and relflg != 'R' and relflg != 'F' and relflg != 'A' and relflg != 'R' and relflg != 'F' and relflg != 'A'
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<select id="selectRefByPrvinr" resultType="java.lang.String"> <select id="selectRefByPrvinr" resultType="java.lang.String">
select select
concat(INIFRM ,'-',OWNREF) REF concat(INIFRM ,'-',OWNREF) "REF"
from trn from trn
where inr in (select trninr from tro where prvinr= #{trninr} ) where inr in (select trninr from tro where prvinr= #{trninr} )
and relflg != 'R' and relflg != 'R'
......
...@@ -187,8 +187,11 @@ ...@@ -187,8 +187,11 @@
AND objinr = #{objinr,jdbcType=VARCHAR} AND objinr = #{objinr,jdbcType=VARCHAR}
</select> </select>
<select id="selectAllUsrByTrninr" resultType="String"> <select id="selectAllUsrByTrninr" resultType="String">
SELECT GROUP_CONCAT(DISTINCT usr) usrs FROM trs where objtyp='TRN' AND objinr =#{objinr,jdbcType=VARCHAR} GROUP BY objinr SELECT LISTAGG(DISTINCT usr,',') usrs FROM trs where objtyp='TRN' AND objinr =#{objinr,jdbcType=VARCHAR} GROUP BY objinr
</select> </select>
<!--<select id="selectAllUsrByTrninr" resultType="String">
SELECT GROUP_CONCAT(DISTINCT usr) usrs FROM trs where objtyp='TRN' AND objinr =#{objinr,jdbcType=VARCHAR} GROUP BY objinr
</select>-->
<select id="selectByObjtypAndObjinrAndSigidx" resultMap="BaseResultMap"> <select id="selectByObjtypAndObjinrAndSigidx" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
......
...@@ -64,17 +64,21 @@ public interface XrtmodService { ...@@ -64,17 +64,21 @@ public interface XrtmodService {
void getRateXrt(String argCur, String basCur, boolean ininFlg, String typ, Date value, Argument<BigDecimal> rat, Argument<BigDecimal> sqrRat); void getRateXrt(String argCur, String basCur, boolean ininFlg, String typ, Date value, Argument<BigDecimal> rat, Argument<BigDecimal> sqrRat);
void getrat(String fromCur,String toCur,String typ,Date value,Argument<BigDecimal> rat,Argument<BigDecimal> sqrRat); void getrat(String fromCur, String toCur, String typ, Date value, Argument<BigDecimal> rat, Argument<BigDecimal> sqrRat);
public BigDecimal amtcnv(BigDecimal amt,BigDecimal rat,String fromcur,String tocur); public BigDecimal amtcnv(BigDecimal amt, BigDecimal rat, String fromcur, String tocur);
boolean isCurrencyValid(String inCur); boolean isCurrencyValid(String inCur);
void xrtCheckRate(BigDecimal argRate,String argCur,Date argValue); void xrtCheckRate(BigDecimal argRate, String argCur, Date argValue);
List<CodetableItem> validCurrencies(); List<CodetableItem> validCurrencies();
void getratForENT(String fromCur,String fromTyp,String toCur,String toTyp,Date value,Argument<BigDecimal> rat,Argument<BigDecimal> sqrRat); void getratForENT(String fromCur, String fromTyp, String toCur, String toTyp, Date value, Argument<BigDecimal> rat, Argument<BigDecimal> sqrRat);
String validCurrencies(Date value); String validCurrencies(Date value);
//黑龙江版本比上面的多一个参数
void getratCebTim(String fromcur, String tocur, Date value, Argument<String> rmbrat, Argument<BigDecimal> brate, Argument<BigDecimal> srate, Argument<BigDecimal> mrate, Argument<BigDecimal> cbrate);
} }
...@@ -36,7 +36,7 @@ public class SettleContext { ...@@ -36,7 +36,7 @@ public class SettleContext {
private final String ETY_EXTKEY = "CEB"; private final String ETY_EXTKEY = "CEB";
private final String ETG_EXTKEY = "CEBGRP"; private final String ETG_EXTKEY = "CEBGRP";
private final static List<String> US_LOCALE_LIST = Arrays.asList("LE","LI","BE","BR"); private final static List<String> US_LOCALE_LIST = Arrays.asList("LE", "LI", "BE", "BR");
private Ety ety; private Ety ety;
private Etg etg; private Etg etg;
...@@ -86,61 +86,60 @@ public class SettleContext { ...@@ -86,61 +86,60 @@ public class SettleContext {
private static ThreadLocal<Integer> TRANS_STA = ThreadLocal.withInitial(() -> 0); private static ThreadLocal<Integer> TRANS_STA = ThreadLocal.withInitial(() -> 0);
public static int getTransSta(){ public static int getTransSta() {
return TRANS_STA.get(); return TRANS_STA.get();
} }
public static void setTransSta(int status){ public static void setTransSta(int status) {
TRANS_STA.set(status); TRANS_STA.set(status);
} }
public static void setInitTransSta(){ public static void setInitTransSta() {
setTransSta(0); setTransSta(0);
} }
public static void setHoldTransSta(){ public static void setHoldTransSta() {
setTransSta(1); setTransSta(1);
} }
public static void setSavTransSta(){ public static void setSavTransSta() {
setTransSta(2); setTransSta(2);
} }
public static void setViewDocTransSta(){ public static void setViewDocTransSta() {
setTransSta(3); setTransSta(3);
} }
public static void setViewTextTransSta(){ public static void setViewTextTransSta() {
setTransSta(4); setTransSta(4);
} }
public static void setCheckTransSta(){ public static void setCheckTransSta() {
setTransSta(4); setTransSta(4);
} }
public static boolean isInitTransSta(){ public static boolean isInitTransSta() {
return getTransSta() == 0; return getTransSta() == 0;
} }
public static boolean isPedTransSta(){ public static boolean isPedTransSta() {
return getTransSta() == 1; return getTransSta() == 1;
} }
public static boolean isSavTransSta(){ public static boolean isSavTransSta() {
return getTransSta() == 2; return getTransSta() == 2;
} }
public static boolean isViewDocTransSta(){ public static boolean isViewDocTransSta() {
return getTransSta() == 3; return getTransSta() == 3;
} }
public static boolean isViewTextTransSta(){ public static boolean isViewTextTransSta() {
return getTransSta() == 4; return getTransSta() == 4;
} }
public static void setUserSession(SettleSession userSession) { public static void setUserSession(SettleSession userSession) {
userSessionThreadLocal.set(userSession); userSessionThreadLocal.set(userSession);
} }
...@@ -167,7 +166,7 @@ public class SettleContext { ...@@ -167,7 +166,7 @@ public class SettleContext {
} }
// 后台服务使用改方法,用于初始化 SessionUserVo // 后台服务使用改方法,用于初始化 SessionUserVo
public static void setSessionUserVo(String logName,String ownOrgDepartmentNumber) { public static void setSessionUserVo(String logName, String ownOrgDepartmentNumber) {
SessionUserVo sessionUserVo = new SessionUserVo(); SessionUserVo sessionUserVo = new SessionUserVo();
sessionUserVo.setLogName(logName); sessionUserVo.setLogName(logName);
sessionUserVo.setOwnOrgDepartmentNumber(ownOrgDepartmentNumber); sessionUserVo.setOwnOrgDepartmentNumber(ownOrgDepartmentNumber);
...@@ -267,7 +266,6 @@ public class SettleContext { ...@@ -267,7 +266,6 @@ public class SettleContext {
settleSession.setOrgBch(orgBch); settleSession.setOrgBch(orgBch);
Atp atp = atpMapper.getAtpByCod(settleSession.getTransName()); Atp atp = atpMapper.getAtpByCod(settleSession.getTransName());
settleSession.setAtp(atp); settleSession.setAtp(atp);
...@@ -275,7 +273,6 @@ public class SettleContext { ...@@ -275,7 +273,6 @@ public class SettleContext {
settleSession.setEtg(etg); settleSession.setEtg(etg);
//如果wrkbchinr有值,则读取wrkbch,并读取对应的记账机构 //如果wrkbchinr有值,则读取wrkbch,并读取对应的记账机构
String wrkbchinr = bizInfoVo == null ? "" : bizInfoVo.getBranchInr(); String wrkbchinr = bizInfoVo == null ? "" : bizInfoVo.getBranchInr();
if (!MdaUtils.isEmpty(wrkbchinr)) { if (!MdaUtils.isEmpty(wrkbchinr)) {
...@@ -319,7 +316,7 @@ public class SettleContext { ...@@ -319,7 +316,7 @@ public class SettleContext {
String hndtyp = Utils.getFieldValue(bizInfoVo, "hndtyp"); String hndtyp = Utils.getFieldValue(bizInfoVo, "hndtyp");
String segtyp = Utils.getFieldValue(bizInfoVo, "segtyp"); String segtyp = Utils.getFieldValue(bizInfoVo, "segtyp");
String gartyp = Utils.getFieldValue(bizInfoVo, "gartyp"); String gartyp = Utils.getFieldValue(bizInfoVo, "gartyp");
if("OT".equals(hndtyp) && ("02".equals(segtyp) || "F".equalsIgnoreCase(gartyp))){ if ("OT".equals(hndtyp) && ("02".equals(segtyp) || "F".equalsIgnoreCase(gartyp))) {
//海关保函转开模式的wrkbch应该取当前记账机构 //海关保函转开模式的wrkbch应该取当前记账机构
settleSession.setWrkbch(settleSession.getBch()); settleSession.setWrkbch(settleSession.getBch());
} }
...@@ -337,16 +334,16 @@ public class SettleContext { ...@@ -337,16 +334,16 @@ public class SettleContext {
//20240131 满足海口自贸区上收到总行的业务 //20240131 满足海口自贸区上收到总行的业务
setAccBch4Zmq(settleSession, bizInfoVo, ptsList); setAccBch4Zmq(settleSession, bizInfoVo, ptsList);
Bch bch =settleSession.getBch(); Bch bch = settleSession.getBch();
String inifrm=settleSession.getTransName(); String inifrm = settleSession.getTransName();
String branch=""; String branch = "";
if(bch!=null){ if (bch != null) {
branch=bch.getBranch(); branch = bch.getBranch();
} }
Atpbch atpbch=atpbchMapper.selectByBranchAndInifrm(branch,inifrm); Atpbch atpbch = atpbchMapper.selectByBranchAndInifrm(branch, inifrm);
if(atpbch!=null && Objects.equals(atpbch.getNegflg(),"X")){ if (atpbch != null && Objects.equals(atpbch.getNegflg(), "X")) {
settleSession.setSdhTransaction(true); settleSession.setSdhTransaction(true);
}else { } else {
settleSession.setSdhTransaction(false); settleSession.setSdhTransaction(false);
} }
//设置经办机构 //设置经办机构
...@@ -433,16 +430,16 @@ public class SettleContext { ...@@ -433,16 +430,16 @@ public class SettleContext {
//20240131 满足海口自贸区上收到总行的业务 //20240131 满足海口自贸区上收到总行的业务
setAccBch4Zmq(settleSession, null, ptsList); setAccBch4Zmq(settleSession, null, ptsList);
Bch bch =settleSession.getBch(); Bch bch = settleSession.getBch();
String inifrm=settleSession.getTransName(); String inifrm = settleSession.getTransName();
String branch=""; String branch = "";
if(bch!=null){ if (bch != null) {
branch=bch.getBranch(); branch = bch.getBranch();
} }
Atpbch atpbch=atpbchMapper.selectByBranchAndInifrm(branch,inifrm); Atpbch atpbch = atpbchMapper.selectByBranchAndInifrm(branch, inifrm);
if(atpbch!=null && Objects.equals(atpbch.getNegflg(),"X")){ if (atpbch != null && Objects.equals(atpbch.getNegflg(), "X")) {
settleSession.setSdhTransaction(true); settleSession.setSdhTransaction(true);
}else { } else {
settleSession.setSdhTransaction(false); settleSession.setSdhTransaction(false);
} }
//设置经办机构 //设置经办机构
...@@ -507,21 +504,22 @@ public class SettleContext { ...@@ -507,21 +504,22 @@ public class SettleContext {
settleSession.setBch(accBch); settleSession.setBch(accBch);
} }
Bch bch =settleSession.getBch(); Bch bch = settleSession.getBch();
String inifrm=settleSession.getTransName(); String inifrm = settleSession.getTransName();
String branch=""; String branch = "";
if(bch!=null){ if (bch != null) {
branch=bch.getBranch(); branch = bch.getBranch();
} }
Atpbch atpbch=atpbchMapper.selectByBranchAndInifrm(branch,inifrm); Atpbch atpbch = atpbchMapper.selectByBranchAndInifrm(branch, inifrm);
if(atpbch!=null && Objects.equals(atpbch.getNegflg(),"X")){ if (atpbch != null && Objects.equals(atpbch.getNegflg(), "X")) {
settleSession.setSdhTransaction(true); settleSession.setSdhTransaction(true);
}else { } else {
settleSession.setSdhTransaction(false); settleSession.setSdhTransaction(false);
} }
//设置经办机构 //设置经办机构
setHandleBch(settleSession); setHandleBch(settleSession);
} }
/** /**
* 加载归属机构 经办机构 登录机构 * 加载归属机构 经办机构 登录机构
*/ */
...@@ -602,6 +600,7 @@ public class SettleContext { ...@@ -602,6 +600,7 @@ public class SettleContext {
/** /**
* 找到交易的wrkbch相关的Ptspta * 找到交易的wrkbch相关的Ptspta
* 代码出处 Mtabut.getWrkBranch * 代码出处 Mtabut.getWrkBranch
*
* @param bizInfoVo * @param bizInfoVo
* @param ptsList * @param ptsList
* @return * @return
...@@ -618,6 +617,7 @@ public class SettleContext { ...@@ -618,6 +617,7 @@ public class SettleContext {
switch (objtyp.substring(0, 2)) { switch (objtyp.substring(0, 2)) {
case "LI": case "LI":
case "BR": case "BR":
case "FX":
role = "APL"; role = "APL";
break; break;
case "LE": case "LE":
...@@ -635,14 +635,14 @@ public class SettleContext { ...@@ -635,14 +635,14 @@ public class SettleContext {
case "GI": case "GI":
String hndtypG = Utils.getFieldValue(bizInfoVo, "hndtyp"); String hndtypG = Utils.getFieldValue(bizInfoVo, "hndtyp");
String segtypG = Utils.getFieldValue(bizInfoVo, "segtyp"); String segtypG = Utils.getFieldValue(bizInfoVo, "segtyp");
if("OT".equals(hndtypG) && "02".equals(segtypG)){ if ("OT".equals(hndtypG) && "02".equals(segtypG)) {
//海关保函转开模式的wrkbch应该取当前记账机构 //海关保函转开模式的wrkbch应该取当前记账机构
return null; return null;
} }
if (StringUtils.isNotEmpty(hndtypG) && ("OT".equals(hndtypG) || hndtypG.startsWith("F"))) { if (StringUtils.isNotEmpty(hndtypG) && ("OT".equals(hndtypG) || hndtypG.startsWith("F"))) {
role = "BEN"; role = "BEN";
} else { } else {
if (ptsptaToolComponent.ptsIsRolSet(ptsList,"CTR")){ if (ptsptaToolComponent.ptsIsRolSet(ptsList, "CTR")) {
role = "CTR"; role = "CTR";
} else { } else {
role = "APL"; role = "APL";
...@@ -654,7 +654,7 @@ public class SettleContext { ...@@ -654,7 +654,7 @@ public class SettleContext {
case "NC": case "NC":
String hndtyp = Utils.getFieldValue(bizInfoVo, "hndtyp"); String hndtyp = Utils.getFieldValue(bizInfoVo, "hndtyp");
String segtyp = Utils.getFieldValue(bizInfoVo, "segtyp"); String segtyp = Utils.getFieldValue(bizInfoVo, "segtyp");
if("OT".equals(hndtyp) && "02".equals(segtyp)){ if ("OT".equals(hndtyp) && "02".equals(segtyp)) {
//海关保函转开模式的wrkbch应该取当前记账机构 //海关保函转开模式的wrkbch应该取当前记账机构
return null; return null;
} }
...@@ -675,10 +675,10 @@ public class SettleContext { ...@@ -675,10 +675,10 @@ public class SettleContext {
break; break;
case "CP": case "CP":
String paytyp = Utils.getFieldValue(bizInfoVo, "paytyp"); String paytyp = Utils.getFieldValue(bizInfoVo, "paytyp");
if( MdaUtils.compareTo(paytyp,"O") == 0 ) { if (MdaUtils.compareTo(paytyp, "O") == 0) {
role = "ORC"; role = "ORC";
} }
if( MdaUtils.compareTo(paytyp,"I") == 0 ) { if (MdaUtils.compareTo(paytyp, "I") == 0) {
role = "PYE"; role = "PYE";
} }
break; break;
...@@ -714,7 +714,7 @@ public class SettleContext { ...@@ -714,7 +714,7 @@ public class SettleContext {
* 适用于:自贸区业务上收到总行的逻辑 * 适用于:自贸区业务上收到总行的逻辑
* 记账机构从数据库中获取 * 记账机构从数据库中获取
*/ */
private void setAccBch4Zmq(SettleSession settleSession, BizInfoVo bizInfo, List<PtsptaVo> ptsList){ private void setAccBch4Zmq(SettleSession settleSession, BizInfoVo bizInfo, List<PtsptaVo> ptsList) {
Bch orgbch = settleSession.getOrgBch(); Bch orgbch = settleSession.getOrgBch();
if (orgbch != null && "0".equalsIgnoreCase(orgbch.getLev())) { if (orgbch != null && "0".equalsIgnoreCase(orgbch.getLev())) {
String objinr = ""; String objinr = "";
...@@ -750,7 +750,7 @@ public class SettleContext { ...@@ -750,7 +750,7 @@ public class SettleContext {
return new Locale("en", "US"); return new Locale("en", "US");
} else { } else {
// 国际信用证部分 // 国际信用证部分
if(!MdaUtils.isEmpty(atp.getBus()) && US_LOCALE_LIST.contains(atp.getBus())){ if (!MdaUtils.isEmpty(atp.getBus()) && US_LOCALE_LIST.contains(atp.getBus())) {
return Locale.US; return Locale.US;
} }
return Locale.SIMPLIFIED_CHINESE; return Locale.SIMPLIFIED_CHINESE;
...@@ -772,10 +772,10 @@ public class SettleContext { ...@@ -772,10 +772,10 @@ public class SettleContext {
Method method = clazz.getDeclaredMethod(methodName, bo.getClass()); Method method = clazz.getDeclaredMethod(methodName, bo.getClass());
if (method != null) { if (method != null) {
method.setAccessible(true); method.setAccessible(true);
return (BizInfoVo)method.invoke(transactionService, bo); return (BizInfoVo) method.invoke(transactionService, bo);
} }
return null; return null;
}catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
throw new CommonServiceException(e.getMessage()); throw new CommonServiceException(e.getMessage());
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
throw new CommonServiceException(e.getMessage()); throw new CommonServiceException(e.getMessage());
...@@ -786,6 +786,7 @@ public class SettleContext { ...@@ -786,6 +786,7 @@ public class SettleContext {
/** /**
* 获取收单行交易的非收单交易码 * 获取收单行交易的非收单交易码
*
* @param settleSession * @param settleSession
* @return * @return
*/ */
...@@ -801,6 +802,7 @@ public class SettleContext { ...@@ -801,6 +802,7 @@ public class SettleContext {
/** /**
* 设置经办机构 * 设置经办机构
*
* @param settleSession * @param settleSession
*/ */
public void setHandleBch(SettleSession settleSession) { public void setHandleBch(SettleSession settleSession) {
......
...@@ -126,4 +126,6 @@ public interface SetglgService { ...@@ -126,4 +126,6 @@ public interface SetglgService {
String calcMaceog(SetmodVo setmodVo); String calcMaceog(SetmodVo setmodVo);
Set<String> getFixDspflagSet(); Set<String> getFixDspflagSet();
void setSettlementDetails(SetglgVo setglg, String setTyp,String rol,String trnMan,String trdTyp);
} }
...@@ -46,17 +46,20 @@ public interface SetmodService { ...@@ -46,17 +46,20 @@ public interface SetmodService {
/** /**
* 判断指定日期是否是节假日 * 判断指定日期是否是节假日
*
* @param cur * @param cur
* @param date * @param date
* @return * @return
*/ */
boolean isHoliday(String cur, Date date); boolean isHoliday(String cur, Date date);
/**指定日期增加天数或者减少天数 /**
* 指定日期增加天数或者减少天数
*
* @param cur * @param cur
* @param beginDate * @param beginDate
* @param days * @param days
* @param workday 是否避开节假日 * @param workday 是否避开节假日
* @return * @return
*/ */
Date addDays(String cur, Date beginDate, int days, boolean workday); Date addDays(String cur, Date beginDate, int days, boolean workday);
...@@ -137,4 +140,7 @@ public interface SetmodService { ...@@ -137,4 +140,7 @@ public interface SetmodService {
void saveFale01(SetmodVo setmodVo); void saveFale01(SetmodVo setmodVo);
void updateSetfelObjmod(List<SetfelVo> setfels, String feecod, SimpleModuleVo linkModule);} void updateSetfelObjmod(List<SetfelVo> setfels, String feecod, SimpleModuleVo linkModule);
BigDecimal getSettlementAmount(SetmodVo setmodVo, String argCur);
}
...@@ -6,6 +6,7 @@ import com.brilliance.isc.bo.Pty; ...@@ -6,6 +6,7 @@ import com.brilliance.isc.bo.Pty;
import com.brilliance.isc.bo.Spt; import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.Trn; import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo; import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.mda.runtime.mda.impl.Argument; import com.brilliance.mda.runtime.mda.impl.Argument;
...@@ -159,4 +160,11 @@ public interface SysmodService { ...@@ -159,4 +160,11 @@ public interface SysmodService {
boolean sptIsPenLoaded(String sptState); boolean sptIsPenLoaded(String sptState);
boolean sptIsCorLoaded(String sptState); boolean sptIsCorLoaded(String sptState);
String getRef(String stRnTbl, int nLen);
void getPtyAccMng(String ptyinr, String argPtspta, String rol, String fileds, Argument<String> accmng, Argument<String> hdbch);
String getClientPath(String objtyp, BizInfoVo bizInfoVo);
} }
...@@ -28,6 +28,7 @@ import com.brilliance.isc.common.trnmod.service.TrnmodService; ...@@ -28,6 +28,7 @@ import com.brilliance.isc.common.trnmod.service.TrnmodService;
import com.brilliance.isc.common.util.SettleExceptionUtils; import com.brilliance.isc.common.util.SettleExceptionUtils;
import com.brilliance.isc.common.util.StringUtils; import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.util.Utils; import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.mda.dao.*; import com.brilliance.isc.mda.dao.*;
import com.brilliance.mda.runtime.mda.CodetableItem; import com.brilliance.mda.runtime.mda.CodetableItem;
...@@ -163,7 +164,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -163,7 +164,7 @@ public class SysmodServiceImpl implements SysmodService {
} }
/** /**
* source:sysmod.0159.script * source:sysmod.0159.script
*/ */
public String evtWrite(String argTyp, String argInr, String argRtn, String argTxt) { public String evtWrite(String argTyp, String argInr, String argRtn, String argTxt) {
...@@ -176,14 +177,14 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -176,14 +177,14 @@ public class SysmodServiceImpl implements SysmodService {
Evt evt = new Evt(); Evt evt = new Evt();
evt.setInr(counterService.dbCounterFormat("EVT")); evt.setInr(counterService.dbCounterFormat("EVT"));
// evt.setSsninr( SettleContext.getUserSession().getSsn().getInr()); // evt.setSsninr( SettleContext.getUserSession().getSsn().getInr());
evt.setObjtyp( argTyp); evt.setObjtyp(argTyp);
evt.setObjinr( argInr); evt.setObjinr(argInr);
evt.setFrm( SettleContext.getTransName()); evt.setFrm(SettleContext.getTransName());
evt.setDattim( Dates.now()); evt.setDattim(Dates.now());
evt.setUsr( SettleContext.getUserSession().getUsr().getExtkey()); evt.setUsr(SettleContext.getUserSession().getUsr().getExtkey());
evt.setRtn( argRtn); evt.setRtn(argRtn);
evt.setTxt( argTxt); evt.setTxt(argTxt);
evt.setArcflg( "N"); evt.setArcflg("N");
evtMapper.insert(evt); evtMapper.insert(evt);
// send a notify and or inform about the event via other channels // send a notify and or inform about the event via other channels
// //
...@@ -201,16 +202,16 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -201,16 +202,16 @@ public class SysmodServiceImpl implements SysmodService {
// if (!MdaUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getTid())) { // if (!MdaUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getTid())) {
// return SettleContext.getUserSession().getWrkbch().getTid(); // return SettleContext.getUserSession().getWrkbch().getTid();
// } else { // } else {
if (!MdaUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getBchkey())) { if (!MdaUtils.isEmpty(SettleContext.getUserSession().getWrkbch().getBchkey())) {
return SettleContext.getUserSession().getWrkbch().getBchkey(); return SettleContext.getUserSession().getWrkbch().getBchkey();
} else { } else {
return SettleContext.getUserSession().getBch().getBranch(); return SettleContext.getUserSession().getBch().getBranch();
} }
// } // }
} }
public boolean sptIsAnyLoaded(String sta){ public boolean sptIsAnyLoaded(String sta) {
// //取得上下文 // //取得上下文
// IContext ctx = MdaEnv.getContext(); // IContext ctx = MdaEnv.getContext();
// ctx.setErrorCode(NO_ERROR); // ctx.setErrorCode(NO_ERROR);
...@@ -225,11 +226,11 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -225,11 +226,11 @@ public class SysmodServiceImpl implements SysmodService {
return rtn; return rtn;
} }
public boolean sptIsIncLoaded(String sptState){ public boolean sptIsIncLoaded(String sptState) {
if(sptIsLoaded("INC",sptState)){ if (sptIsLoaded("INC", sptState)) {
return true; return true;
}else{ } else {
return sptIsLoaded("STP",sptState); return sptIsLoaded("STP", sptState);
} }
} }
...@@ -260,6 +261,66 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -260,6 +261,66 @@ public class SysmodServiceImpl implements SysmodService {
return sptIsLoaded(SptAfterSentToRepair, sptState); return sptIsLoaded(SptAfterSentToRepair, sptState);
} }
/**
* source:sysmod.0244.script
*/
@Override
public String getRef(String stRnTbl, int nLen) {
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//! 1: STrnTbl: 参考号前2位
//! 2: $Dbjgtxt :代办机构号
//! 3: $DatTxt1 :时间(年)
//! 4: $Ywssjgh :业务所属机构号(5位)\\
//! 5: Length: 流水号长度
//!
//!规则(14位 15位 16为)
//
//!1:不含进口LC 业务品种(2位) + 代办机构号(2位) + 时间(2位)+业务所属机构号(4位)+ 流水号(5),共计15位
//!1:含国内信用证 业务品种(2位) + 代办机构号(2位) + 时间(2位)+业务所属机构号(4位)+ 流水号(4)+到单次数(2),共计16位
//hnxtiaozheng
//!2:不含进口LC 业务品种(2位) + 时间(2位)+业务所属机构号(5位)+ 流水号(5),共计14位
//!2:含国内信用证 业务品种(2位) + 时间(2位)+业务所属机构号(5位)+ 流水号(4)+到单次数(2),共计15位
//
//!重新调整为
//!3:不含进口LC 业务所属机构号(5位)+业务品种(2位) + 时间(2位) + 代办机构号(2位) + 流水号(5),共计16位
//!3:含信用证 业务所属机构号(5位)+业务品种(2位) + 时间(2位)+ 代办机构号(2位) + 流水号(3)+到单次数(2),共计16
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
String ref = "";
String datTxt1 = Formats.format(Dates.today(), "YY");
String dbjgtxt = SettleContext.getUserSession().getBch().getBchflg();
String ywssjgh = SettleContext.getUserSession().getWrkbch().getBranch();
ref = ywssjgh + stRnTbl + datTxt1 + dbjgtxt + MdaUtils.toString(counterService.dbCounter(stRnTbl + ywssjgh + datTxt1), -nLen);
return ref;
}
@Override
public void getPtyAccMng(String ptyinr, String argPtspta, String rol, String fileds, Argument<String> accmng, Argument<String> hdbch) {
//!获取对应的rol对象的ID数据
//!=====================================================
//!根据客户信息返回客户的客户经理编号及客户经理所在部门
//!变量:
//!accmng 客户经理编号
//!hdbch 客户经理所属部门
//!=====================================================
String resusr = "";
String vhdbch = "";
String sql = NULLSTR;
int err = 0;
if (!MdaUtils.isEmpty(ptyinr)) {
// sql = "SELECT resusr,hdbch FROM PTY WHERE INR = '" + Strings.trim(ptyinr) + "'";
Pty pty = ptyCacheService.getPtyById(Strings.trim(ptyinr));
if (Objects.nonNull(pty)) {
resusr = pty.getResusr();
// vhdbch = pty.gethdbch();
}
}
accmng.value = resusr;
hdbch.value = vhdbch;
}
public boolean sptIsLoaded(String arg, String sptState) { public boolean sptIsLoaded(String arg, String sptState) {
//! Function to check whether one of the passed SPT status is loaded //! Function to check whether one of the passed SPT status is loaded
//! Arg holds a single SPT status or a blank delimited list of multiple SPT status to be checked //! Arg holds a single SPT status or a blank delimited list of multiple SPT status to be checked
...@@ -328,7 +389,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -328,7 +389,7 @@ public class SysmodServiceImpl implements SysmodService {
// } // }
// else // else
// { // {
fields.value = item; fields.value = item;
// } // }
} else { } else {
fields.value = ""; fields.value = "";
...@@ -397,7 +458,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -397,7 +458,7 @@ public class SysmodServiceImpl implements SysmodService {
// argSpt.setSsninr(SettleContext.getUserSession().getSsn().getInr()); // argSpt.setSsninr(SettleContext.getUserSession().getSsn().getInr());
if (MdaUtils.isEmpty(argSpt.getObjtyp())) { if (MdaUtils.isEmpty(argSpt.getObjtyp())) {
if(!MdaUtils.isEmpty(rec)) { if (!MdaUtils.isEmpty(rec)) {
argSpt.setObjtyp(Utils.recGetObj(rec)); argSpt.setObjtyp(Utils.recGetObj(rec));
argSpt.setObjinr(Utils.recGetInr(rec)); argSpt.setObjinr(Utils.recGetInr(rec));
} }
...@@ -428,7 +489,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -428,7 +489,7 @@ public class SysmodServiceImpl implements SysmodService {
// Utils.setFieldValue(storeObj, "spt", argSpt); //不用存入SPT到交易BO下面,影响收单行spt更新操作 // Utils.setFieldValue(storeObj, "spt", argSpt); //不用存入SPT到交易BO下面,影响收单行spt更新操作
streamSaveInSubDir(storeObj, "delete", argSpt.getInr() + ".bak"); streamSaveInSubDir(storeObj, "delete", argSpt.getInr() + ".bak");
// update/create que before SPT is cleared // update/create que before SPT is cleared
sptQueUpdate( argSpt ); sptQueUpdate(argSpt);
} }
/** /**
...@@ -447,9 +508,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -447,9 +508,8 @@ public class SysmodServiceImpl implements SysmodService {
} }
/** /**
* source:sysmod.0137.script * source:sysmod.0137.script
*/ */
public void sptDeleteEntry(Spt argSpt) { public void sptDeleteEntry(Spt argSpt) {
//! deletes pending item including fileimage. //! deletes pending item including fileimage.
...@@ -457,8 +517,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -457,8 +517,8 @@ public class SysmodServiceImpl implements SysmodService {
int ignore = 0; int ignore = 0;
IStream sptStm = new StreamImpl(); IStream sptStm = new StreamImpl();
String sptInr = NULLSTR; String sptInr = NULLSTR;
if( ! MdaUtils.isEmpty(argSpt.getInr()) ) { if (!MdaUtils.isEmpty(argSpt.getInr())) {
sptWriteLog(argSpt,"D"); sptWriteLog(argSpt, "D");
sptMapper.deleteByPrimaryKey(argSpt); sptMapper.deleteByPrimaryKey(argSpt);
// delete .BAK-File if available // delete .BAK-File if available
...@@ -473,8 +533,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -473,8 +533,8 @@ public class SysmodServiceImpl implements SysmodService {
// DB-Transaction gets commited // DB-Transaction gets commited
sptInr = argSpt.getInr(); sptInr = argSpt.getInr();
argSpt = new Spt(); argSpt = new Spt();
argSpt.setInr( sptInr); argSpt.setInr(sptInr);
queUpdate("SPT",sptInr," ","D"); queUpdate("SPT", sptInr, " ", "D");
} else { } else {
SettleExceptionUtils.sysDump("Delete of non existing SPT-Record with empty INR"); SettleExceptionUtils.sysDump("Delete of non existing SPT-Record with empty INR");
} }
...@@ -482,7 +542,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -482,7 +542,7 @@ public class SysmodServiceImpl implements SysmodService {
@Override @Override
public void sptQueUpdate(Spt argSpt) { public void sptQueUpdate(Spt argSpt) {
Date today =new Date(); Date today = new Date();
Que que = queMapper.selectByObjTypeInrSubId("SPT", argSpt.getInr(), null); Que que = queMapper.selectByObjTypeInrSubId("SPT", argSpt.getInr(), null);
if (que == null) { if (que == null) {
que = new Que(); que = new Que();
...@@ -520,18 +580,18 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -520,18 +580,18 @@ public class SysmodServiceImpl implements SysmodService {
que.setTardattim(today); que.setTardattim(today);
que.setBranchinr(argSpt.getBranchinr()); que.setBranchinr(argSpt.getBranchinr());
que.setBchkeyinr(argSpt.getBchkeyinr()); que.setBchkeyinr(argSpt.getBchkeyinr());
Bch accBch=SettleContext.getUserSession().getBch(); Bch accBch = SettleContext.getUserSession().getBch();
que.setAccbchinr(accBch!=null?accBch.getInr():""); que.setAccbchinr(accBch != null ? accBch.getInr() : "");
Ord ord =ordMapper.selectByOrdInr(argSpt.getOrdinr()); Ord ord = ordMapper.selectByOrdInr(argSpt.getOrdinr());
if(ord!=null) { if (ord != null) {
que.setSdhflg(ord.getSdhflg()); que.setSdhflg(ord.getSdhflg());
que.setOrdinr(ord.getInr()); que.setOrdinr(ord.getInr());
} }
Bch bch =bchService.getByBranch("1000");//总行机构 Bch bch = bchService.getByBranch("1000");//总行机构
if(StringUtils.isEmpty(que.getBchkeyinr())){ if (StringUtils.isEmpty(que.getBchkeyinr())) {
que.setBchkeyinr(bch.getInr()); que.setBchkeyinr(bch.getInr());
} }
if(StringUtils.isEmpty(que.getBranchinr())){ if (StringUtils.isEmpty(que.getBranchinr())) {
que.setBranchinr(que.getBchkeyinr()); que.setBranchinr(que.getBchkeyinr());
} }
que.setObjref(argSpt.getObjref()); que.setObjref(argSpt.getObjref());
...@@ -539,18 +599,18 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -539,18 +599,18 @@ public class SysmodServiceImpl implements SysmodService {
que.setUpdateTime(today); que.setUpdateTime(today);
que.setUsrcon(argSpt.getUsr()); que.setUsrcon(argSpt.getUsr());
que.setCtmnam(argSpt.getCtmnam()); que.setCtmnam(argSpt.getCtmnam());
if("Y".equals(argSpt.getHldflg())){//隐藏 if ("Y".equals(argSpt.getHldflg())) {//隐藏
que.setStatus(TaskStatus.NEW.getValue()); que.setStatus(TaskStatus.NEW.getValue());
que.setCla("RIM"); //注册中心 que.setCla("RIM"); //注册中心
que.setHldflg("D"); que.setHldflg("D");
que.setFlowstatus(TaskFlowStatus.HEADQUARTER_SDH_HANDLE.getValue()); que.setFlowstatus(TaskFlowStatus.HEADQUARTER_SDH_HANDLE.getValue());
}else{ } else {
que.setStatus(TaskStatus.PENDING.getValue()); que.setStatus(TaskStatus.PENDING.getValue());
que.setCla("PEN"); que.setCla("PEN");
Bch orgBch=SettleContext.getUserSession().getOrgBch(); Bch orgBch = SettleContext.getUserSession().getOrgBch();
if("1000".equals(orgBch.getBranch())) { if ("1000".equals(orgBch.getBranch())) {
que.setFlowstatus(TaskFlowStatus.HEADQUARTER_HANDLE.getValue()); que.setFlowstatus(TaskFlowStatus.HEADQUARTER_HANDLE.getValue());
}else{ } else {
que.setFlowstatus(TaskFlowStatus.BRANCH_HANDLE.getValue()); que.setFlowstatus(TaskFlowStatus.BRANCH_HANDLE.getValue());
} }
} }
...@@ -590,7 +650,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -590,7 +650,7 @@ public class SysmodServiceImpl implements SysmodService {
que.setCortyp(argSpt.getCortyp()); que.setCortyp(argSpt.getCortyp());
que.setFrontchannel(argSpt.getFrontchannel()); que.setFrontchannel(argSpt.getFrontchannel());
queMapper.insert(que); queMapper.insert(que);
if(!Objects.equals(que.getHldflg(),"D") && !Objects.equals(que.getCla(), QueClaStatus.PEN.getValue())) { if (!Objects.equals(que.getHldflg(), "D") && !Objects.equals(que.getCla(), QueClaStatus.PEN.getValue())) {
//HLDFLG为D时不需要调用 //HLDFLG为D时不需要调用
taskDistService.handleTaskEnqueue(que); taskDistService.handleTaskEnqueue(que);
} }
...@@ -600,50 +660,50 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -600,50 +660,50 @@ public class SysmodServiceImpl implements SysmodService {
} }
public String getChannelFromSta(String sta){ public String getChannelFromSta(String sta) {
String channel=""; String channel = "";
switch (sta){ switch (sta) {
case "INC": case "INC":
channel="SWT"; channel = "SWT";
break; break;
case "YPT": case "YPT":
channel="YPT"; channel = "YPT";
break; break;
case "EJS": case "EJS":
channel="EJS"; channel = "EJS";
break; break;
} }
return channel; return channel;
} }
public String getChannelFromSta(Spt spt){ public String getChannelFromSta(Spt spt) {
String channel=""; String channel = "";
switch (spt.getSta()){ switch (spt.getSta()) {
case "INC": case "INC":
if(!"SWT".equals(spt.getChannel())){ if (!"SWT".equals(spt.getChannel())) {
channel=spt.getChannel(); channel = spt.getChannel();
}else { } else {
channel = "SWT"; channel = "SWT";
} }
break; break;
case "YPT": case "YPT":
channel="YPT"; channel = "YPT";
break; break;
case "EJS": case "EJS":
channel="EJS"; channel = "EJS";
break; break;
} }
if(StringUtils.isEmpty(channel) && !StringUtils.isEmpty(spt.getTxt()) && spt.getTxt().length()==3 ){ if (StringUtils.isEmpty(channel) && !StringUtils.isEmpty(spt.getTxt()) && spt.getTxt().length() == 3) {
channel=spt.getTxt(); channel = spt.getTxt();
} }
if(StringUtils.isEmpty(channel)){ if (StringUtils.isEmpty(channel)) {
channel=spt.getChannel(); channel = spt.getChannel();
} }
return channel; return channel;
} }
public boolean isIncomingSptsta(String sta){ public boolean isIncomingSptsta(String sta) {
if("-INC-EJS-YPT-FMT-HVP-HVQ-HVR-BEP-BEQ-BES-CIU-CIV-CIW".indexOf(sta)>0){ if ("-INC-EJS-YPT-FMT-HVP-HVQ-HVR-BEP-BEQ-BES-CIU-CIV-CIW".indexOf(sta) > 0) {
return true; return true;
} }
return false; return false;
...@@ -653,10 +713,11 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -653,10 +713,11 @@ public class SysmodServiceImpl implements SysmodService {
String lin = argSpt.getObjtyp() + TAB + Strings.mid(argSpt.getObjinr(), 1, 16) + TAB + argSpt.getInr() + TAB + argFu + TAB + argSpt.getSta() + TAB + argSpt.getHldflg() + TAB + Formats.format(Dates.now(), "YY-MM-DD hh:mm:ss",/*Systems.getLang()*/"CN", tdContextTZSYSTEM) + TAB + "" + TAB + SettleContext.getTransName() + TAB + argSpt.getObjnam(); String lin = argSpt.getObjtyp() + TAB + Strings.mid(argSpt.getObjinr(), 1, 16) + TAB + argSpt.getInr() + TAB + argFu + TAB + argSpt.getSta() + TAB + argSpt.getHldflg() + TAB + Formats.format(Dates.now(), "YY-MM-DD hh:mm:ss",/*Systems.getLang()*/"CN", tdContextTZSYSTEM) + TAB + "" + TAB + SettleContext.getTransName() + TAB + argSpt.getObjnam();
log.info("sptWriteLog:{}", lin); log.info("sptWriteLog:{}", lin);
} }
@Override
@Override
public void streamSaveInSubDir(Object storeObj, String argDir, String argFil) { public void streamSaveInSubDir(Object storeObj, String argDir, String argFil) {
if("true".equals(appEnv.getFileLocalFlag())){ if ("true".equals(appEnv.getFileLocalFlag())) {
this.streamSaveInSubDirLocal(storeObj,argDir,argFil); this.streamSaveInSubDirLocal(storeObj, argDir, argFil);
return; return;
} }
argDir += "/" + getSubDirByFileName(argFil); //修改该长度时,注意argFile是带后缀的文件名xxx.dat argDir += "/" + getSubDirByFileName(argFil); //修改该长度时,注意argFile是带后缀的文件名xxx.dat
...@@ -665,58 +726,59 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -665,58 +726,59 @@ public class SysmodServiceImpl implements SysmodService {
//filPath = Strings.convertPrefix(filPath); //filPath = Strings.convertPrefix(filPath);
File file = Files.mkdirs(filPath); File file = Files.mkdirs(filPath);
String json = Utils.toPrettyJson(storeObj); String json = Utils.toPrettyJson(storeObj);
boolean bool=objectStroeToolService.saveObjectFileByString(json,filPath,""); boolean bool = objectStroeToolService.saveObjectFileByString(json, filPath, "");
if(!bool) { if (!bool) {
throw new CommonServiceException("文件存储失败!"); throw new CommonServiceException("文件存储失败!");
} }
} }
public void saveObjectJson(String argDir,String filePath, String json) { public void saveObjectJson(String argDir, String filePath, String json) {
String filPath = appEnv.getSubDataPath(argDir, filePath); String filPath = appEnv.getSubDataPath(argDir, filePath);
boolean bool = objectStroeToolService.saveObjectFileByString(json, filPath, ""); boolean bool = objectStroeToolService.saveObjectFileByString(json, filPath, "");
} }
public String loadObjectJson(String argDir,String fileName) { public String loadObjectJson(String argDir, String fileName) {
String fulFileName = appEnv.getSubDataPath(argDir, fileName); String fulFileName = appEnv.getSubDataPath(argDir, fileName);
byte[] fileByte = objectStroeToolService.readObjectFile(fulFileName); byte[] fileByte = objectStroeToolService.readObjectFile(fulFileName);
if(MdaUtils.isEmpty(fileByte)) if (MdaUtils.isEmpty(fileByte))
return ""; return "";
return new String(fileByte); return new String(fileByte);
} }
@Override @Override
public void streamSaveInDir(Object storeObj, String argDir, String argFil) { public void streamSaveInDir(Object storeObj, String argDir, String argFil) {
if("true".equals(appEnv.getFileLocalFlag())){ if ("true".equals(appEnv.getFileLocalFlag())) {
this.streamSaveInDirLocal(storeObj,argDir,argFil); this.streamSaveInDirLocal(storeObj, argDir, argFil);
return; return;
} }
String filPath = appEnv.getSubDataPath(argDir, argFil); String filPath = appEnv.getSubDataPath(argDir, argFil);
//filPath = Strings.convertPrefix(filPath); //filPath = Strings.convertPrefix(filPath);
String json = ""; String json = "";
if ((storeObj instanceof IStream)){ if ((storeObj instanceof IStream)) {
List<String> rows=((IStream) storeObj).getRows(); List<String> rows = ((IStream) storeObj).getRows();
for(int i=0;i<rows.size();i+=2){ for (int i = 0; i < rows.size(); i += 2) {
if(StringUtils.isEmpty(rows.get(i))) if (StringUtils.isEmpty(rows.get(i)))
continue; continue;
if(StringUtils.isEmpty(json)){ if (StringUtils.isEmpty(json)) {
json =rows.get(i); json = rows.get(i);
}else{ } else {
json =json+"\n"+rows.get(i); json = json + "\n" + rows.get(i);
} }
json=json+"\n"+rows.get(i+1); json = json + "\n" + rows.get(i + 1);
} }
}else{ } else {
json=Utils.toPrettyJson(storeObj); json = Utils.toPrettyJson(storeObj);
} }
boolean bool=objectStroeToolService.saveObjectFileByString(json,filPath,""); boolean bool = objectStroeToolService.saveObjectFileByString(json, filPath, "");
if(!bool) { if (!bool) {
throw new CommonServiceException("文件存储失败!"); throw new CommonServiceException("文件存储失败!");
} }
} }
/** /**
* 是否存在spt文件 * 是否存在spt文件
*
* @param argDir * @param argDir
* @param argFil * @param argFil
* @return * @return
...@@ -729,8 +791,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -729,8 +791,8 @@ public class SysmodServiceImpl implements SysmodService {
} }
public <T> T streamLoadInSubDir(Class<T> clazz, String argDir, String argFil) { public <T> T streamLoadInSubDir(Class<T> clazz, String argDir, String argFil) {
if("true".equals(appEnv.getFileLocalFlag())){ if ("true".equals(appEnv.getFileLocalFlag())) {
return this.streamLoadInSubDirLocal(clazz,argDir,argFil); return this.streamLoadInSubDirLocal(clazz, argDir, argFil);
} }
try { try {
argDir += "/" + getSubDirByFileName(argFil); argDir += "/" + getSubDirByFileName(argFil);
...@@ -744,8 +806,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -744,8 +806,8 @@ public class SysmodServiceImpl implements SysmodService {
} }
public <T> T streamLoadInDir(Class<T> clazz, String argDir, String argFil) { public <T> T streamLoadInDir(Class<T> clazz, String argDir, String argFil) {
if("true".equals(appEnv.getFileLocalFlag())){ if ("true".equals(appEnv.getFileLocalFlag())) {
return this.streamLoadInDirLocal(clazz,argDir,argFil); return this.streamLoadInDirLocal(clazz, argDir, argFil);
} }
try { try {
...@@ -759,9 +821,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -759,9 +821,8 @@ public class SysmodServiceImpl implements SysmodService {
} }
/** /**
* source:sysmod.0805.script * source:sysmod.0805.script
*/ */
public String getTrnnam(String transName) { public String getTrnnam(String transName) {
return codetableService.getTblLabel(transName, "ATPTXT"); return codetableService.getTblLabel(transName, "ATPTXT");
...@@ -783,6 +844,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -783,6 +844,7 @@ public class SysmodServiceImpl implements SysmodService {
} }
return objnam; return objnam;
} }
public String getProcessBranchinr() { public String getProcessBranchinr() {
SettleSession session = SettleContext.getUserSession(); SettleSession session = SettleContext.getUserSession();
if (session.getBch() != null) { if (session.getBch() != null) {
...@@ -835,7 +897,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -835,7 +897,7 @@ public class SysmodServiceImpl implements SysmodService {
// Utils.setFieldValue(argRec, "inr", counterService.dbCounterFormat(Utils.getBoType(argRec))); // Utils.setFieldValue(argRec, "inr", counterService.dbCounterFormat(Utils.getBoType(argRec)));
// Utils.setFieldValue(argRec, "etyextkey", SettleContext.getUserEty().getExtkey()); // Utils.setFieldValue(argRec, "etyextkey", SettleContext.getUserEty().getExtkey());
// Utils.setFieldValue(argRec, "etgextkey", SettleContext.getUserEtg().getExtkey()); // Utils.setFieldValue(argRec, "etgextkey", SettleContext.getUserEtg().getExtkey());
log.info("准备删除的对象,{} = {}",argRec.getClass().getSimpleName(),argRec); log.info("准备删除的对象,{} = {}", argRec.getClass().getSimpleName(), argRec);
dyncDaoService.dyncDeleteByPrimaryKey(argRec); dyncDaoService.dyncDeleteByPrimaryKey(argRec);
sdbSlgWrite(argRec, "D"); sdbSlgWrite(argRec, "D");
} }
...@@ -843,9 +905,9 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -843,9 +905,9 @@ public class SysmodServiceImpl implements SysmodService {
public void sdbInsertWithLog(Object argRec) { public void sdbInsertWithLog(Object argRec) {
String objType = Utils.getBoType(argRec); String objType = Utils.getBoType(argRec);
//NID用GID的Counter //NID用GID的Counter
if("NID".equalsIgnoreCase(objType)){ if ("NID".equalsIgnoreCase(objType)) {
objType = "GID"; objType = "GID";
}else if("NCD".equalsIgnoreCase(objType)){ } else if ("NCD".equalsIgnoreCase(objType)) {
objType = "GCD"; objType = "GCD";
} }
Utils.setFieldValue(argRec, "inr", counterService.dbCounterFormat(objType)); Utils.setFieldValue(argRec, "inr", counterService.dbCounterFormat(objType));
...@@ -862,7 +924,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -862,7 +924,7 @@ public class SysmodServiceImpl implements SysmodService {
if (StringUtils.isNotEmpty(ver)) { if (StringUtils.isNotEmpty(ver)) {
version = Integer.parseInt(ver); version = Integer.parseInt(ver);
} }
Utils.setFieldValue(argRec, "ver", String.format("%04d",version+1)); Utils.setFieldValue(argRec, "ver", String.format("%04d", version + 1));
Utils.setFieldValue(argRec, "etyextkey", SettleContext.getUserEty().getExtkey()); Utils.setFieldValue(argRec, "etyextkey", SettleContext.getUserEty().getExtkey());
Utils.setFieldValue(argRec, "etgextkey", SettleContext.getUserEtg().getExtkey()); Utils.setFieldValue(argRec, "etgextkey", SettleContext.getUserEtg().getExtkey());
dyncDaoService.dyncInsert(argRec); dyncDaoService.dyncInsert(argRec);
...@@ -871,16 +933,17 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -871,16 +933,17 @@ public class SysmodServiceImpl implements SysmodService {
public void sdbUpdateWithLog(Object argRec) { public void sdbUpdateWithLog(Object argRec) {
String ver = Utils.getFieldValue(argRec, "ver"); String ver = Utils.getFieldValue(argRec, "ver");
if(org.apache.commons.lang3.StringUtils.isBlank(ver)) if (org.apache.commons.lang3.StringUtils.isBlank(ver))
ver="0000"; ver = "0000";
int version = Integer.parseInt(ver); int version = Integer.parseInt(ver);
Utils.setFieldValue(argRec, "ver", String.format("%04d",version+1)); Utils.setFieldValue(argRec, "ver", String.format("%04d", version + 1));
dyncDaoService.dyncUpdateByPrimaryKeySelective(argRec); dyncDaoService.dyncUpdateByPrimaryKeySelective(argRec);
sdbSlgWrite(argRec, "U"); sdbSlgWrite(argRec, "U");
} }
/** /**
* 用于回滚业务数据 不需要更改版本号 * 用于回滚业务数据 不需要更改版本号
*
* @param argRec * @param argRec
*/ */
public void sdbUpdateWithLog2(Object argRec) { public void sdbUpdateWithLog2(Object argRec) {
...@@ -894,11 +957,11 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -894,11 +957,11 @@ public class SysmodServiceImpl implements SysmodService {
} }
public Object sdbRead(Object obj) { public Object sdbRead(Object obj) {
String inr =Utils.getFieldValue(obj,"inr"); String inr = Utils.getFieldValue(obj, "inr");
try { try {
Class clazz = Class.forName(obj.getClass().getName()); Class clazz = Class.forName(obj.getClass().getName());
return dyncDaoService.dyncReadByInr(clazz, inr); return dyncDaoService.dyncReadByInr(clazz, inr);
}catch(ClassNotFoundException e){ } catch (ClassNotFoundException e) {
throw new CommonServiceException("找不到对应的类!"); throw new CommonServiceException("找不到对应的类!");
} }
} }
...@@ -951,19 +1014,19 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -951,19 +1014,19 @@ public class SysmodServiceImpl implements SysmodService {
// Systems.setContext("SAVEDATASKIPEMPTY",false); // Systems.setContext("SAVEDATASKIPEMPTY",false);
Slg slg = new Slg(); Slg slg = new Slg();
slg.setLoginr(Utils.getFieldValue(logMod,"inr")); slg.setLoginr(Utils.getFieldValue(logMod, "inr"));
slg.setLogtyp(Utils.getBoType(logMod)); slg.setLogtyp(Utils.getBoType(logMod));
slg.setVer( Utils.getFieldValue(logMod,"ver")); slg.setVer(Utils.getFieldValue(logMod, "ver"));
slg.setDattim( Dates.now()); slg.setDattim(Dates.now());
slg.setUsr( SettleContext.getUserSession().getUsr().getExtkey()); slg.setUsr(SettleContext.getUserSession().getUsr().getExtkey());
slg.setFct( fct); slg.setFct(fct);
slg.setInr(counterService.dbCounterFormat("SLG")); slg.setInr(counterService.dbCounterFormat("SLG"));
dyncDaoService.dyncInsert(slg); dyncDaoService.dyncInsert(slg);
} }
/** /**
* source:sysmod.0209.script * source:sysmod.0209.script
*/ */
public Pty getPtyobj(String rol, List<PtsptaVo> ptsList) { public Pty getPtyobj(String rol, List<PtsptaVo> ptsList) {
//>>> ZL---面函移植改造中取PTY表字段的值------------ //>>> ZL---面函移植改造中取PTY表字段的值------------
...@@ -971,9 +1034,9 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -971,9 +1034,9 @@ public class SysmodServiceImpl implements SysmodService {
// ptyfileds: 要查的PTY表的字段名称 // ptyfileds: 要查的PTY表的字段名称
// ptyval: 输出该ptyfileds字段的值 // ptyval: 输出该ptyfileds字段的值
//<<< ZL------------------------------------------- //<<< ZL-------------------------------------------
String name = Strings.mid(SettleContext.getTransName(),1,2); String name = Strings.mid(SettleContext.getTransName(), 1, 2);
//进口保函和出口保函用同一个GID表------------------ //进口保函和出口保函用同一个GID表------------------
if( MdaUtils.compareTo(name,"GE") == 0 ) { if (MdaUtils.compareTo(name, "GE") == 0) {
name = "GI"; name = "GI";
} }
//----DZTEST---- //----DZTEST----
...@@ -1019,10 +1082,11 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1019,10 +1082,11 @@ public class SysmodServiceImpl implements SysmodService {
} }
return null; return null;
} }
/** /**
* source:sysmod.0178.script * source:sysmod.0178.script
*/ */
public void queUpdate(String argOBJTYP,String argOBJINR,String argOBJSUBID,String argHLDFLG) { public void queUpdate(String argOBJTYP, String argOBJINR, String argOBJSUBID, String argHLDFLG) {
//! Release or (logically) delete specified QUE entry / entries //! Release or (logically) delete specified QUE entry / entries
//! if argOBJSUBID ="*" entries for all OBJSUBIDs are deleted/released //! if argOBJSUBID ="*" entries for all OBJSUBIDs are deleted/released
Que que = new Que(); Que que = new Que();
...@@ -1033,7 +1097,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1033,7 +1097,7 @@ public class SysmodServiceImpl implements SysmodService {
que.setObjinr(argOBJINR); que.setObjinr(argOBJINR);
que.setOldstatus(que.getStatus()); que.setOldstatus(que.getStatus());
que.setStatus(CommonContants.QUE_STATUS_PENDING); que.setStatus(CommonContants.QUE_STATUS_PENDING);
if( MdaUtils.compareTo(argOBJSUBID,"*") == 0 ) { if (MdaUtils.compareTo(argOBJSUBID, "*") == 0) {
//Platform.dbExecuteSQL( "UPDATE QUE SET HLDFLG=?, HLDSSNINR=?, HLDDATTIM=? where OBJTYP = ? and OBJINR = ?", argHLDFLG, $\\sysmod\\ssn\\inr.getValue(), Platform.now(), argOBJTYP, argOBJINR ); //Platform.dbExecuteSQL( "UPDATE QUE SET HLDFLG=?, HLDSSNINR=?, HLDDATTIM=? where OBJTYP = ? and OBJINR = ?", argHLDFLG, $\\sysmod\\ssn\\inr.getValue(), Platform.now(), argOBJTYP, argOBJINR );
queMapper.updateHlddattimbyObjInr(que); queMapper.updateHlddattimbyObjInr(que);
} else { } else {
...@@ -1042,8 +1106,9 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1042,8 +1106,9 @@ public class SysmodServiceImpl implements SysmodService {
queMapper.updateHlddattimbyObjInr(que); queMapper.updateHlddattimbyObjInr(que);
} }
} }
/** /**
* source:sysmod.0258.script * source:sysmod.0258.script
*/ */
public void sweSaveEntry(Trn trn, Spt spt, String argSta, String sptinr, String trninr) { public void sweSaveEntry(Trn trn, Spt spt, String argSta, String sptinr, String trninr) {
//break 或者 repair 或者 save时更新swe表 //break 或者 repair 或者 save时更新swe表
...@@ -1052,7 +1117,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1052,7 +1117,7 @@ public class SysmodServiceImpl implements SysmodService {
// arginr SPT\\INR // arginr SPT\\INR
//如果读到记录说明此业务源头为清算报文 //如果读到记录说明此业务源头为清算报文
Swe swe = null; Swe swe = null;
if( ! MdaUtils.isEmpty(trninr) ) { if (!MdaUtils.isEmpty(trninr)) {
swe = sweMapper.getSweByTrninr(trninr); swe = sweMapper.getSweByTrninr(trninr);
} else { } else {
swe = sweMapper.getSweBySptinr(sptinr); swe = sweMapper.getSweBySptinr(sptinr);
...@@ -1061,36 +1126,37 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1061,36 +1126,37 @@ public class SysmodServiceImpl implements SysmodService {
log.warn("读不到swe表信息"); log.warn("读不到swe表信息");
return; return;
} }
swe.setSta( argSta); swe.setSta(argSta);
swe.setIniusr( SettleContext.getUserSession().getUsr().getExtkey()); swe.setIniusr(SettleContext.getUserSession().getUsr().getExtkey());
switch( argSta ) { switch (argSta) {
case "PEN": case "PEN":
swe.setOwnref( spt.getOwnref()); swe.setOwnref(spt.getOwnref());
break; break;
case "SAV": case "SAV":
swe.setObjtyp( trn.getObjtyp()); swe.setObjtyp(trn.getObjtyp());
swe.setObjinr( trn.getObjinr()); swe.setObjinr(trn.getObjinr());
swe.setOwnref( trn.getOwnref()); swe.setOwnref(trn.getOwnref());
swe.setTrninr( trn.getInr()); swe.setTrninr(trn.getInr());
swe.setSptinr( ""); swe.setSptinr("");
break; break;
case "DON": case "DON":
case "REL": case "REL":
break; break;
case "COR": case "COR":
case "REJ": case "REJ":
swe.setTrninr( ""); swe.setTrninr("");
swe.setSptinr( sptinr); swe.setSptinr(sptinr);
break; break;
case "DEL": case "DEL":
break; break;
} }
sweMapper.updateByPrimaryKeySelective(swe); sweMapper.updateByPrimaryKeySelective(swe);
} }
/** /**
* source:sysmod.0304.script * source:sysmod.0304.script
*/ */
public void msgSaveEntry(Trn trn, Spt spt,String argSta, String sptinr, String trninr) { public void msgSaveEntry(Trn trn, Spt spt, String argSta, String sptinr, String trninr) {
//break 或者 repair 或者 save时更新swe表 //break 或者 repair 或者 save时更新swe表
//仅针对清算报文进行处理 //仅针对清算报文进行处理
...@@ -1098,7 +1164,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1098,7 +1164,7 @@ public class SysmodServiceImpl implements SysmodService {
// arginr SPT\\INR // arginr SPT\\INR
//如果读到记录说明此业务源头为清算报文 //如果读到记录说明此业务源头为清算报文
Msg msg = null; Msg msg = null;
if( ! MdaUtils.isEmpty(trninr) ) { if (!MdaUtils.isEmpty(trninr)) {
msg = msgMapper.getMsgByTrninr(trninr); msg = msgMapper.getMsgByTrninr(trninr);
} else { } else {
msg = msgMapper.getMsgBySptinr(sptinr); msg = msgMapper.getMsgBySptinr(sptinr);
...@@ -1107,25 +1173,25 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1107,25 +1173,25 @@ public class SysmodServiceImpl implements SysmodService {
log.warn("读不到msg表信息"); log.warn("读不到msg表信息");
return; return;
} }
msg.setSta( argSta); msg.setSta(argSta);
switch( argSta ) { switch (argSta) {
case "PEN": case "PEN":
msg.setOwnref( spt.getOwnref()); msg.setOwnref(spt.getOwnref());
break; break;
case "SAV": case "SAV":
// msg\\OBJTYP = GetContent( "\\\\TRNMOD\\\\TRN\\\\objtyp" ) // msg\\OBJTYP = GetContent( "\\\\TRNMOD\\\\TRN\\\\objtyp" )
// msg\\OBJINR = GetContent( "\\\\TRNMOD\\\\TRN\\\\objinr" ) // msg\\OBJINR = GetContent( "\\\\TRNMOD\\\\TRN\\\\objinr" )
msg.setOwnref( trn.getOwnref()); msg.setOwnref(trn.getOwnref());
msg.setTrninr( trn.getInr()); msg.setTrninr(trn.getInr());
msg.setSptinr( ""); msg.setSptinr("");
break; break;
case "DON": case "DON":
case "REL": case "REL":
break; break;
case "COR": case "COR":
case "REJ": case "REJ":
msg.setTrninr( ""); msg.setTrninr("");
msg.setSptinr( sptinr); msg.setSptinr(sptinr);
break; break;
case "DEL": case "DEL":
break; break;
...@@ -1171,13 +1237,13 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1171,13 +1237,13 @@ public class SysmodServiceImpl implements SysmodService {
//! Date effictive of the update is 18th November 2018 //! Date effictive of the update is 18th November 2018
// DO5DOS.010108 // DO5DOS.010108
// DNGDEV.000291 für SR2018 // DNGDEV.000291 für SR2018
String sftTxt = Utils.cacheGetIniStr(AppIniFile,"System","SwiftRelNov2018Activation"); String sftTxt = Utils.cacheGetIniStr(AppIniFile, "System", "SwiftRelNov2018Activation");
Date sftRelDat = null; Date sftRelDat = null;
if (sftTxt != null) { if (sftTxt != null) {
sftRelDat = Utils.parseDate(sftTxt, "yyyy-MM-dd"); sftRelDat = Utils.parseDate(sftTxt, "yyyy-MM-dd");
} }
if( MdaUtils.isEmpty(sftRelDat) ) { if (MdaUtils.isEmpty(sftRelDat)) {
sftRelDat = Utils.parseDate("2018-11-18"); sftRelDat = Utils.parseDate("2018-11-18");
} }
return Dates.diff(sftRelDat, Dates.today()) <= 0; return Dates.diff(sftRelDat, Dates.today()) <= 0;
...@@ -1190,7 +1256,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1190,7 +1256,7 @@ public class SysmodServiceImpl implements SysmodService {
//! Function to check whether the Swift Release November 2020 is active //! Function to check whether the Swift Release November 2020 is active
//! Date effictive of the update is November 16, 2020. //! Date effictive of the update is November 16, 2020.
// DNGDEV.001899 f眉r SR2020 // DNGDEV.001899 f眉r SR2020
String sftTxt = Utils.cacheGetIniStr(AppIniFile,"System","SwiftRelNov2020Activation"); String sftTxt = Utils.cacheGetIniStr(AppIniFile, "System", "SwiftRelNov2020Activation");
Date sftRelDat = null; Date sftRelDat = null;
if (sftTxt != null) { if (sftTxt != null) {
sftRelDat = Utils.parseDate(sftTxt, "yyyy-MM-dd"); sftRelDat = Utils.parseDate(sftTxt, "yyyy-MM-dd");
...@@ -1213,11 +1279,11 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1213,11 +1279,11 @@ public class SysmodServiceImpl implements SysmodService {
} }
public boolean isRamSptLoaded() { public boolean isRamSptLoaded() {
if (SettleContext.getUserSession()==null || SettleContext.getUserSession().getSpt() == null) { if (SettleContext.getUserSession() == null || SettleContext.getUserSession().getSpt() == null) {
return false; return false;
} }
String smhinr = SettleContext.getUserSession().getSpt().getSmhinr(); String smhinr = SettleContext.getUserSession().getSpt().getSmhinr();
if(org.apache.commons.lang3.StringUtils.isEmpty(smhinr)) { if (org.apache.commons.lang3.StringUtils.isEmpty(smhinr)) {
return false; return false;
} }
...@@ -1319,12 +1385,12 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1319,12 +1385,12 @@ public class SysmodServiceImpl implements SysmodService {
return streamLoadInSubDir(clazz, "delete", fileName); return streamLoadInSubDir(clazz, "delete", fileName);
} }
public<T> T streamGetNameInSubDir(Class<T> clazz, String trninr) { public <T> T streamGetNameInSubDir(Class<T> clazz, String trninr) {
String fileName = trninr + ".dsp"; String fileName = trninr + ".dsp";
return streamLoadInSubDir(clazz, "display", fileName); return streamLoadInSubDir(clazz, "display", fileName);
} }
public<T> T streamGetDataFromDir(Class<T> clazz, String prefix,String argInr) { public <T> T streamGetDataFromDir(Class<T> clazz, String prefix, String argInr) {
String fileName = argInr + ".dat"; String fileName = argInr + ".dat";
return streamLoadInSubDir(clazz, prefix, fileName); return streamLoadInSubDir(clazz, prefix, fileName);
} }
...@@ -1350,47 +1416,47 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1350,47 +1416,47 @@ public class SysmodServiceImpl implements SysmodService {
} }
public boolean isSdhBusiness(){ public boolean isSdhBusiness() {
return SettleContext.getUserSession().isSdhTransaction(); return SettleContext.getUserSession().isSdhTransaction();
} }
public boolean isSdhBusiness(String inifrm){ public boolean isSdhBusiness(String inifrm) {
Bch bch =SettleContext.getUserSession().getBch(); Bch bch = SettleContext.getUserSession().getBch();
Bch orgBch =SettleContext.getUserSession().getOrgBch(); Bch orgBch = SettleContext.getUserSession().getOrgBch();
String branch=""; String branch = "";
if("1000".equals(orgBch.getBranch())){ if ("1000".equals(orgBch.getBranch())) {
return false; return false;
} }
if(bch!=null){ if (bch != null) {
branch=bch.getBranch(); branch = bch.getBranch();
} }
Atpbch atpbch=atpbchMapper.selectByBranchAndInifrm(branch,inifrm); Atpbch atpbch = atpbchMapper.selectByBranchAndInifrm(branch, inifrm);
if(atpbch!=null && Objects.equals(atpbch.getNegflg(),"X")){ if (atpbch != null && Objects.equals(atpbch.getNegflg(), "X")) {
return true; return true;
} }
return false; return false;
} }
public boolean isSdhBusiness(String inifrm,String branch){ public boolean isSdhBusiness(String inifrm, String branch) {
Atpbch atpbch=atpbchMapper.selectByBranchAndInifrm(branch,inifrm); Atpbch atpbch = atpbchMapper.selectByBranchAndInifrm(branch, inifrm);
if(atpbch!=null && Objects.equals(atpbch.getNegflg(),"X")){ if (atpbch != null && Objects.equals(atpbch.getNegflg(), "X")) {
return true; return true;
} }
return false; return false;
} }
@Override @Override
public boolean isCenterTaken(){ public boolean isCenterTaken() {
// 通过Registration进交易 // 通过Registration进交易
// 判断交易是否是单证中心Take收单行的业务 // 判断交易是否是单证中心Take收单行的业务
boolean bool = false; boolean bool = false;
Spt spt =SettleContext.getUserSession().getSpt(); Spt spt = SettleContext.getUserSession().getSpt();
Bch bch =SettleContext.getUserSession().getBch(); Bch bch = SettleContext.getUserSession().getBch();
List<Trn> trnList=null; List<Trn> trnList = null;
List<String> inrList=null; List<String> inrList = null;
Trn seltrn =new Trn(); Trn seltrn = new Trn();
//&& StringUtils.isNotEmpty(bch.getCorflg() ) //&& StringUtils.isNotEmpty(bch.getCorflg() )
if ("RIM".equals(spt.getSta())){ if ("RIM".equals(spt.getSta())) {
Bch selbch = new Bch(); Bch selbch = new Bch();
// selbch.setUpbchkey(bch.getBranch()); // selbch.setUpbchkey(bch.getBranch());
// List<Bch> bchList = bchMapper.selectByConditionList(selbch); // List<Bch> bchList = bchMapper.selectByConditionList(selbch);
...@@ -1403,18 +1469,18 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1403,18 +1469,18 @@ public class SysmodServiceImpl implements SysmodService {
seltrn.setObjinr(spt.getObjinr()); seltrn.setObjinr(spt.getObjinr());
seltrn.setObjtyp(spt.getObjtyp()); seltrn.setObjtyp(spt.getObjtyp());
seltrn.setInifrm(spt.getFrm()); seltrn.setInifrm(spt.getFrm());
trnList = trnMapper.selectByConditionListBchkeyinr(seltrn,inrList); trnList = trnMapper.selectByConditionListBchkeyinr(seltrn, inrList);
} }
//判断满足是否为单证中心处理 //判断满足是否为单证中心处理
Assert.notNull(trnList); Assert.notNull(trnList);
for(Trn item: trnList) { for (Trn item : trnList) {
if ("A".equals(item.getRelflg())) { if ("A".equals(item.getRelflg())) {
bool = true; bool = true;
break; break;
} }
} }
if(bool) if (bool)
return true; return true;
else else
return false; return false;
...@@ -1430,7 +1496,8 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1430,7 +1496,8 @@ public class SysmodServiceImpl implements SysmodService {
// + bch.getBranch() + "')"; // + bch.getBranch() + "')";
// } // }
} }
/**
/**
* source:sysmod.0283.script * source:sysmod.0283.script
* *
* @return * @return
...@@ -1441,27 +1508,27 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1441,27 +1508,27 @@ public class SysmodServiceImpl implements SysmodService {
//int lin = Systems.getAttribute(argField,tdAttrLines); //int lin = Systems.getAttribute(argField,tdAttrLines);
//int len = Systems.getAttribute(argField,tdAttrLength); //int len = Systems.getAttribute(argField,tdAttrLength);
String txt = argField; String txt = argField;
int len1 = Strings.len(Strings.convertBlock(txt,11)); int len1 = Strings.len(Strings.convertBlock(txt, 11));
int len2 = Strings.len(Strings.convertBlock(txt,13)); int len2 = Strings.len(Strings.convertBlock(txt, 13));
int lenChinese = ( len2 - len1 ); int lenChinese = (len2 - len1);
int num = 0; int num = 0;
IStream txtStm = new StreamImpl(); IStream txtStm = new StreamImpl();
String line = NULLSTR; String line = NULLSTR;
int p = 0; int p = 0;
if( lenChinese == 0 ) { if (lenChinese == 0) {
num = 0; num = 0;
if( ! MdaUtils.isEmpty(txt) ) { if (!MdaUtils.isEmpty(txt)) {
Streams.streamSet(txtStm,txt); Streams.streamSet(txtStm, txt);
num = Streams.streamCount(txtStm); num = Streams.streamCount(txtStm);
} }
if( num > 0 ) { if (num > 0) {
for(int i = 1;i <= num;i++) { for (int i = 1; i <= num; i++) {
line = Strings.getLine(txtStm,i); line = Strings.getLine(txtStm, i);
if( ! MdaUtils.isEmpty(line) ) { if (!MdaUtils.isEmpty(line)) {
for(int j = 1;j <= Strings.len(line);j++) { for (int j = 1; j <= Strings.len(line); j++) {
p = Strings.pos("[}|~$`^]#%&*=@",Strings.mid(line,j,1)); p = Strings.pos("[}|~$`^]#%&*=@", Strings.mid(line, j, 1));
if( p > 0 ) { if (p > 0) {
resultMap.put(String.valueOf(argField),MdaUtils.getI18NString("sysmod","CT000655")); resultMap.put(String.valueOf(argField), MdaUtils.getI18NString("sysmod", "CT000655"));
//if(1==1) return resultMap; //if(1==1) return resultMap;
} }
} }
...@@ -1470,7 +1537,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1470,7 +1537,7 @@ public class SysmodServiceImpl implements SysmodService {
} }
} }
} else { } else {
resultMap.put(String.valueOf(argField),MdaUtils.getI18NString("sysmod","CT000666")); resultMap.put(String.valueOf(argField), MdaUtils.getI18NString("sysmod", "CT000666"));
MdaUtils.exitRule(); MdaUtils.exitRule();
} }
return resultMap; return resultMap;
...@@ -1525,25 +1592,25 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1525,25 +1592,25 @@ public class SysmodServiceImpl implements SysmodService {
} }
} }
public Bch getUpperBch(Bch argBch){ public Bch getUpperBch(Bch argBch) {
if(argBch==null) if (argBch == null)
argBch=SettleContext.getUserSession().getOrgBch(); argBch = SettleContext.getUserSession().getOrgBch();
return bchService.getDirectParentBch(argBch.getBranch()); return bchService.getDirectParentBch(argBch.getBranch());
} }
public String getNextFrame(String inifrm){ public String getNextFrame(String inifrm) {
Atpbch atpbch =atpbchMapper.selecDistinctByInifrm(inifrm); Atpbch atpbch = atpbchMapper.selecDistinctByInifrm(inifrm);
if(atpbch!=null) { if (atpbch != null) {
return atpbch.getFrmtyp(); return atpbch.getFrmtyp();
}else{ } else {
return inifrm; return inifrm;
} }
} }
public String getPreFrame(String inifrm,String branch){ public String getPreFrame(String inifrm, String branch) {
if("1000".equals(branch)){ if ("1000".equals(branch)) {
return this.getNextFrame(inifrm); return this.getNextFrame(inifrm);
}else { } else {
Atpbch atpbch = atpbchMapper.selectByFrmtypAndBranchAndFlg(inifrm, branch, "X"); Atpbch atpbch = atpbchMapper.selectByFrmtypAndBranchAndFlg(inifrm, branch, "X");
if (atpbch == null) { if (atpbch == null) {
return inifrm; return inifrm;
...@@ -1555,6 +1622,7 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1555,6 +1622,7 @@ public class SysmodServiceImpl implements SysmodService {
/** /**
* 通过文件名长度截取子目录,文件名为inr,in扩长为16后截取前12位 * 通过文件名长度截取子目录,文件名为inr,in扩长为16后截取前12位
*
* @param argFil 文件名 * @param argFil 文件名
* @return 子目录 4位或12位 * @return 子目录 4位或12位
*/ */
...@@ -1567,19 +1635,20 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1567,19 +1635,20 @@ public class SysmodServiceImpl implements SysmodService {
public String midObjinr(String objInr) { public String midObjinr(String objInr) {
if (objInr.trim().length() == 16) { if (objInr.trim().length() == 16) {
return Strings.mid(objInr,1,16); return Strings.mid(objInr, 1, 16);
} }
return Strings.mid(objInr,1,8); return Strings.mid(objInr, 1, 8);
} }
/** /**
* 接口开关API【默认打开】 * 接口开关API【默认打开】
*
* @param srv 接口名(对应STB表的cod字段) * @param srv 接口名(对应STB表的cod字段)
* @return true表示接口开关打开 * @return true表示接口开关打开
*/ */
public boolean isInterfaceOpen(String srv){ public boolean isInterfaceOpen(String srv) {
Stb stb = stbMapper.selectByTblAndCodAndUil("INTACE",srv,"CN"); Stb stb = stbMapper.selectByTblAndCodAndUil("INTACE", srv, "CN");
if(stb!=null){ if (stb != null) {
return "Y".equals(stb.getTxt()) ? true : false; return "Y".equals(stb.getTxt()) ? true : false;
} }
return true; return true;
...@@ -1587,12 +1656,13 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1587,12 +1656,13 @@ public class SysmodServiceImpl implements SysmodService {
/** /**
* 接口上云开关API【默认打开】 * 接口上云开关API【默认打开】
*
* @param srv 接口名(对应STB表的cod字段) * @param srv 接口名(对应STB表的cod字段)
* @return true表示接口上云开关打开 * @return true表示接口上云开关打开
*/ */
public boolean isInterfaceSyOpen(String srv){ public boolean isInterfaceSyOpen(String srv) {
Stb stb = stbMapper.selectByTblAndCodAndUil("INTACE_SY",srv,"CN"); Stb stb = stbMapper.selectByTblAndCodAndUil("INTACE_SY", srv, "CN");
if(stb!=null){ if (stb != null) {
return "Y".equals(stb.getTxt()) ? true : false; return "Y".equals(stb.getTxt()) ? true : false;
} }
return true; return true;
...@@ -1600,21 +1670,22 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1600,21 +1670,22 @@ public class SysmodServiceImpl implements SysmodService {
/** /**
* 交易开关API【默认打开】 * 交易开关API【默认打开】
*
* @param switchCod 开关码 * @param switchCod 开关码
* @return true表示交易开关打开 * @return true表示交易开关打开
*/ */
public boolean isBusinessOpen(String switchCod){ public boolean isBusinessOpen(String switchCod) {
Offcfg offcfg = new Offcfg(); Offcfg offcfg = new Offcfg();
offcfg.setSwitchcode(switchCod); offcfg.setSwitchcode(switchCod);
Offcfg result = offcfgMapper.selectBySwitchcode(offcfg); Offcfg result = offcfgMapper.selectBySwitchcode(offcfg);
if(result != null){ if (result != null) {
return "Y".equals(result.getSwitchflg()) ? true : false; return "Y".equals(result.getSwitchflg()) ? true : false;
} }
return true; return true;
} }
public boolean isStartBusiness() { public boolean isStartBusiness() {
String transName=SettleContext.getTransName(); String transName = SettleContext.getTransName();
if ("OPN".equalsIgnoreCase(transName.substring(3, transName.length()))) { if ("OPN".equalsIgnoreCase(transName.substring(3, transName.length()))) {
return true; return true;
} }
...@@ -1650,10 +1721,10 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1650,10 +1721,10 @@ public class SysmodServiceImpl implements SysmodService {
public boolean isShangYun(String tbl) { public boolean isShangYun(String tbl) {
String languageSTB = "EN"; String languageSTB = "EN";
String valReturn = ""; String valReturn = "";
List<CodetableItem> dbCodeTable = codetableService.selectList(tbl.toUpperCase(),languageSTB); List<CodetableItem> dbCodeTable = codetableService.selectList(tbl.toUpperCase(), languageSTB);
if (dbCodeTable != null && !dbCodeTable.isEmpty()){ if (dbCodeTable != null && !dbCodeTable.isEmpty()) {
valReturn = dbCodeTable.get(0).getValue(); valReturn = dbCodeTable.get(0).getValue();
}else{ } else {
log.warn("找不到上云开关{}对应的码值", tbl); log.warn("找不到上云开关{}对应的码值", tbl);
} }
return "Y".equals(valReturn) ? true : false; return "Y".equals(valReturn) ? true : false;
...@@ -1664,4 +1735,89 @@ public class SysmodServiceImpl implements SysmodService { ...@@ -1664,4 +1735,89 @@ public class SysmodServiceImpl implements SysmodService {
return sptIsLoaded("PEN", sptState); return sptIsLoaded("PEN", sptState);
} }
/**
* source:sysmod.0223.script
* 黑龙江版本
*/
@Override
public String getClientPath(String objtyp, BizInfoVo bizInfoVo) {
if (StringUtils.isEmpty(objtyp)) {
return NULLSTR;
}
String path = NULLSTR;
switch (objtyp) {
case "LID":
case "BRD":
case "GID":
case "FXD":
case "FUD":
path = "APL";
break;
case "LED":
case "BED":
case "LTD":
path = "BEN";
break;
case "BCD":
path = "DRE";
break;
case "BOD":
path = "DRR";
break;
case "BPD":
if (MdaUtils.compareTo(Strings.mid(SettleContext.getTransName(), 1, 2), "BP") == 0) {
path = "FIA";
} else {
//对于福费廷发票转让交易需要特殊处理,防止160错误
if (MdaUtils.compareTo(SettleContext.getTransName(), "FSTPSL") == 0) {
path = "FIA";
}
}
break;
case "FBD":
path = "FIA";
break;
case "TRD":
if (MdaUtils.compareTo(Strings.mid(SettleContext.getTransName(), 1, 2), "TR") == 0) {
path = "FIP";
} else {
// path = "\\TRTCRE\\" + objtyp + "GRP\\FIP";
path = "FIP";
}
break;
case "CPD":
// "\\CPDGRP\\REC\\PAYTYP"
String paytyp = Utils.getFieldValue(bizInfoVo, "paytyp");
if (MdaUtils.compareTo(paytyp, "O") == 0) {
path = "ORC";
} else {
path = "PYE";
}
break;
case "ATD":
//"\\atdgrp\\rec\\sector"
String sector = Utils.getFieldValue(bizInfoVo, "sector");
if (MdaUtils.compareTo(sector, "0") == 0) {
path = "ORC";
} else {
path = "PYE";
}
break;
case "MCD":
path = "ADE";
break;
case "CCD":
path = "PRE";
break;
case "FMD":
case "FPD":
path = "SEL";
break;
default:
// hoping that in future product modules the client will always be CLI
path = "CLI";
}
return path;
}
} }
...@@ -141,7 +141,8 @@ public class Utils { ...@@ -141,7 +141,8 @@ public class Utils {
// 根据选择的账户类型返回账户类型代码 // 根据选择的账户类型返回账户类型代码
// //
// ----------------------------- // -----------------------------
String dsp = type.substring(0, 2); // String dsp = type.substring(0, 2);
String dsp = Strings.mid(type, 0, 2);
if (MdaUtils.compareTo(dsp, "PA") == 0) { if (MdaUtils.compareTo(dsp, "PA") == 0) {
dsp = "SP"; dsp = "SP";
} }
...@@ -626,8 +627,8 @@ public class Utils { ...@@ -626,8 +627,8 @@ public class Utils {
return amtStr.replace(pointSuffiex, ","); return amtStr.replace(pointSuffiex, ",");
} else { } else {
// JPY1300 -> JPY1300, // JPY1300 -> JPY1300,
if (amtStr.indexOf(".") == -1){ if (amtStr.indexOf(".") == -1) {
return amtStr+","; return amtStr + ",";
} else { } else {
return amtStr.replace(".", ",");//like 1000.01 -> 1000,01 return amtStr.replace(".", ",");//like 1000.01 -> 1000,01
} }
...@@ -660,7 +661,7 @@ public class Utils { ...@@ -660,7 +661,7 @@ public class Utils {
//! Corresponding functions: AddExtensionToName, AddNodeToPath, GetLastNode, Basename (TradeDesign function), GetFileExtension, GetNormalizedNodename //! Corresponding functions: AddExtensionToName, AddNodeToPath, GetLastNode, Basename (TradeDesign function), GetFileExtension, GetNormalizedNodename
// search for a backslash starting at the end // search for a backslash starting at the end
String chr = NULLSTR; String chr = NULLSTR;
for (int idx = Strings.len(argPth); idx >= 1; idx --) { for (int idx = Strings.len(argPth); idx >= 1; idx--) {
chr = Strings.mid(argPth, idx, 1); chr = Strings.mid(argPth, idx, 1);
if (MdaUtils.compareTo(chr, "\\") == 0 || MdaUtils.compareTo(chr, "/") == 0) { if (MdaUtils.compareTo(chr, "\\") == 0 || MdaUtils.compareTo(chr, "/") == 0) {
if (idx > 1) { if (idx > 1) {
...@@ -1236,10 +1237,10 @@ public class Utils { ...@@ -1236,10 +1237,10 @@ public class Utils {
field.setAccessible(true); field.setAccessible(true);
if (idx > 0) { if (idx > 0) {
Object subObject = field.get(object); Object subObject = field.get(object);
if(subObject instanceof Collection){ if (subObject instanceof Collection) {
subObject = CollectionUtils.get(subObject, 0); subObject = CollectionUtils.get(subObject, 0);
}else if(subObject instanceof Object[]){ } else if (subObject instanceof Object[]) {
subObject = Array.get(subObject,0); subObject = Array.get(subObject, 0);
} }
return getTargetFieldByPath(subObject, path.substring(idx + 1)); return getTargetFieldByPath(subObject, path.substring(idx + 1));
} else { } else {
......
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