Commit 7236620f by huangshunlin

黑龙江版本资金业务 新增setsta表 ,setmod/sysmod 新增方法

parent e2b38ad6
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.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.BizInfoVo;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import lombok.Data;
/**
......@@ -11,5 +11,5 @@ import lombok.Data;
* @create: 2024-10-09 17:40
*/
@Data
public class FxdBizAmdInfoVo extends BizInfoVo {
public class FxdBizAmdInfoVo extends BizAmdInfoVo {
}
<?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>
......@@ -46,17 +46,20 @@ public interface SetmodService {
/**
* 判断指定日期是否是节假日
*
* @param cur
* @param date
* @return
*/
boolean isHoliday(String cur, Date date);
/**指定日期增加天数或者减少天数
/**
* 指定日期增加天数或者减少天数
*
* @param cur
* @param beginDate
* @param days
* @param workday 是否避开节假日
* @param workday 是否避开节假日
* @return
*/
Date addDays(String cur, Date beginDate, int days, boolean workday);
......@@ -137,4 +140,7 @@ public interface SetmodService {
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;
import com.brilliance.isc.bo.Spt;
import com.brilliance.isc.bo.Trn;
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.mda.runtime.mda.impl.Argument;
......@@ -163,4 +164,7 @@ public interface SysmodService {
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;
import com.brilliance.isc.common.util.SettleExceptionUtils;
import com.brilliance.isc.common.util.StringUtils;
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.mda.dao.*;
import com.brilliance.mda.runtime.mda.CodetableItem;
......@@ -1734,4 +1735,89 @@ public class SysmodServiceImpl implements SysmodService {
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;
}
}
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