Commit c7d40774 by huangshunlin

接口屏蔽,账号相关校验屏蔽,pts ref关键字修改sql

parent 6fce343a
......@@ -308,7 +308,9 @@
<select id="getPtsByObjInrTyp" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
INR ,OBJTYP,OBJINR,ROL,PTAINR,PTYINR,EXTKEY,ADRBLK,"REF",NAM,OWNREF,DFTCUR,DFTDSP,
DFTACT,DFTFEECUR,DFTACTPTAINR,GLGGRPFLG,EXTACT,VER,ISSBANINF,BANKNO,JIGOMC,DIZHII,
YOUZBM,DIHDIG,DFTSETROL,PTCNAM,PTCOE,CNNAM,CNADR,ENNAM,ENADR
from pts
where objinr = #{objinr,jdbcType=VARCHAR}
and objtyp = #{objtyp,jdbcType=VARCHAR}
......
......@@ -7,6 +7,7 @@ import com.brilliance.isc.common.esb.tymd.ITymdFeign;
import com.brilliance.isc.common.forexmod.RiskCustomerDisposeComponent;
import com.brilliance.isc.common.monmod.vo.MonmodVo;
import com.brilliance.isc.common.setgll.vo.SetgllVo;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.common.transaction.newcheck.Warning;
import com.brilliance.isc.common.transaction.newcheck.WarningResult;
......@@ -49,17 +50,20 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
@Resource
private PtyMapper ptyMapper;
@Resource
private SysmodService sysmodService;
@Override
@PostConstruct
public void register() {
super.register();
}
@Warning(path = "warncustomer",level = "1")
@Warning(path = "warncustomer", level = "1")
public WarningResult checkCustom(MonmodVo vo) {
String msg = dovalidate(vo, true);
if (StringUtils.isNotEmpty(msg)) {
return WarningResult.build(WARNING_SUBID,msg);
return WarningResult.build(WARNING_SUBID, msg);
}
return WarningResult.buildEmpty(WARNING_SUBID);
}
......@@ -68,23 +72,23 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
public WarningResult checkCustomLevel2(MonmodVo vo) {
String msg = dovalidate(vo, false);
if (StringUtils.isNotEmpty(msg)) {
return WarningResult.build(DOWNGRADE_SUBID,msg);
return WarningResult.build(DOWNGRADE_SUBID, msg);
}
return WarningResult.buildEmpty(DOWNGRADE_SUBID);
}
public String dovalidate(MonmodVo vo, boolean interdiction) {
//先判断有没有重写方法获取 AbstractTransactionService#getPtyinr AbstractTransactionService#downgradeMsg
if (StringUtils.isNotEmpty(vo.getPtyinr())){
if (StringUtils.isNotEmpty(vo.getPtyinr())) {
Pty pty = ptyMapper.selectByPtyinr(vo.getPtyinr());
if (pty!=null) {
if (pty != null) {
// return RISK_LEVEL_4_MSG;
String extkey = pty.getExtkey();
String level = callDU01(extkey);
if (interdiction){
if (interdiction) {
return null; // TODO 现需求主要求保函阻断
}else {
return getDowngradeWarningMsg(level,extkey,vo);
} else {
return getDowngradeWarningMsg(level, extkey, vo);
}
}
}
......@@ -99,14 +103,14 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
// }
String extkey = getExtkey(vo);
String level = callDU01(extkey);
if (interdiction){
if ("4".equals(level)){
if (interdiction) {
if ("4".equals(level)) {
return RISK_LEVEL_4_MSG;
} else {
return null;
}
}else {
return getDowngradeWarningMsg(level,extkey,vo);
} else {
return getDowngradeWarningMsg(level, extkey, vo);
}
case "GITAME":
case "GITPAM":
......@@ -194,7 +198,7 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
public String dealSameMethod(String hndtyp, List<PtsptaVo> list) {
String extkey = "";
if ("OT".equalsIgnoreCase(hndtyp) || "F".equalsIgnoreCase(hndtyp.substring(0,1))) {
if ("OT".equalsIgnoreCase(hndtyp) || "F".equalsIgnoreCase(hndtyp.substring(0, 1))) {
extkey = getExtkeyDataByHndtyp(list, "BEN");
} else {
extkey = getExtkeyDataByHndtyp(list, "APL");
......@@ -202,18 +206,18 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
return extkey;
}
private String getDowngradeWarningMsg(String level,String extkey, MonmodVo vo) {
private String getDowngradeWarningMsg(String level, String extkey, MonmodVo vo) {
// String level = callDU01(extkey);
StringBuilder sb = new StringBuilder();
if (StringUtils.isNotEmpty(vo.getDowngradeMsg())){
if (StringUtils.isNotEmpty(vo.getDowngradeMsg())) {
sb.append(vo.getDowngradeMsg());
}
if ("3".equalsIgnoreCase(level)||"4".equalsIgnoreCase(level)){
if ("3".equalsIgnoreCase(level) || "4".equalsIgnoreCase(level)) {
sb.append("洗钱风险等级为".concat(level));
}
if (sb.length()>0){
if (vo!=null&&vo.getForexmod()!=null&&("01".equals(vo.getForexmod().getRiskLevel())||"02".equals(vo.getForexmod().getRiskLevel()))) {
callOC52(extkey, sb.toString(),vo);
if (sb.length() > 0) {
if (vo != null && vo.getForexmod() != null && ("01".equals(vo.getForexmod().getRiskLevel()) || "02".equals(vo.getForexmod().getRiskLevel()))) {
callOC52(extkey, sb.toString(), vo);
return "客户风险等级降级原因:".concat(sb.toString());
}
}
......@@ -225,26 +229,28 @@ public class MonmodValidator extends AbstractModuleValidator<MonmodVo> {
}
public String callDU01(String extkey) {
InnerReqDU01 innerReqDU01 = new InnerReqDU01();
// 需要查询的客户号
innerReqDU01.ECIF_CUST_NO = extkey;
InnerReq<InnerReqDU01> innerReqDU01InnerReq = new InnerReq<>(innerReqDU01);
InnerRes<InnerResDU01> innerResDU01InnerRes = this.iTymdFeign.callDU01(innerReqDU01InnerReq);
//调用成功
if ("AAAAAAA".equals(innerResDU01InnerRes.header.code)) {
// 判断是否是高风险客户号
if (innerResDU01InnerRes.DATA != null) {
return innerResDU01InnerRes.DATA.getRISK_RATING();
if (sysmodService.isInterfaceOpen("DU01")) {
InnerReqDU01 innerReqDU01 = new InnerReqDU01();
// 需要查询的客户号
innerReqDU01.ECIF_CUST_NO = extkey;
InnerReq<InnerReqDU01> innerReqDU01InnerReq = new InnerReq<>(innerReqDU01);
InnerRes<InnerResDU01> innerResDU01InnerRes = this.iTymdFeign.callDU01(innerReqDU01InnerReq);
//调用成功
if ("AAAAAAA".equals(innerResDU01InnerRes.header.code)) {
// 判断是否是高风险客户号
if (innerResDU01InnerRes.DATA != null) {
return innerResDU01InnerRes.DATA.getRISK_RATING();
}
}
}
return null;
}
private void callOC52(String extkey, String reason, MonmodVo vo){
if (vo!=null&&vo.getForexmod()!=null&&("01".equals(vo.getForexmod().getRiskLevel())||"02".equals(vo.getForexmod().getRiskLevel()))){
private void callOC52(String extkey, String reason, MonmodVo vo) {
if (vo != null && vo.getForexmod() != null && ("01".equals(vo.getForexmod().getRiskLevel()) || "02".equals(vo.getForexmod().getRiskLevel()))) {
String usr = SettleContext.getSessionUserVo().getLogName();
taskDistAsyncExecutor.execute(()->{
riskCustomerDisposeComponent.OC52(extkey,reason,usr);
taskDistAsyncExecutor.execute(() -> {
riskCustomerDisposeComponent.OC52(extkey, reason, usr);
});
}
}
......
......@@ -1096,7 +1096,7 @@ public class SetgllValidator extends AbstractModuleValidator<SetgllVo> {
return ValidResult.build(false, "该账号为待核查且已确认不使用,请重新点击获取确认");
}
} else {
if(!MdaUtils.isEmpty(setgllVo.getAct())
/*if(!MdaUtils.isEmpty(setgllVo.getAct())
&& MdaUtils.compareTo(Strings.mid(setgllVo.getDsp(),1,2),"LO") == 0
&& MdaUtils.compareTo(setgllVo.getAcccur(),"CNY") != 0 ) {
AccountRequestVo requestVo = new AccountRequestVo();
......@@ -1109,7 +1109,7 @@ public class SetgllValidator extends AbstractModuleValidator<SetgllVo> {
return ValidResult.build(false, "该账号为待核查账户,请点击获取确认");
}
}
}
}*/
}
return null;
}
......
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