Commit d4024bce by zhoujunpeng

资金定存拆借入口交易

parent b7f88141
package com.brilliance.isc.funds.basesel.common;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Cnd;
import com.brilliance.isc.bo.Ftd;
import com.brilliance.isc.bo.FtdVo;
import com.brilliance.isc.bo.model.Cpacbs;
import com.brilliance.isc.bo.model.Cpdgrp;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.exception.CommonServiceException;
import com.brilliance.isc.common.transaction.help.TransactionServiceSet;
import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.common.util.Utils;
import com.brilliance.isc.common.vo.FremsgVo;
import com.brilliance.isc.common.vo.PtsptaVo;
import com.brilliance.isc.funds.mapper.FtdselMapper;
import com.brilliance.isc.mda.dao.CbbMapper;
import com.brilliance.isc.mda.dao.CndMapper;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.lang.reflect.Field;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component
public class FtToolComponent {
// @Autowired
// private CpdMapper cpdMapper;
@Autowired
private FtdselMapper ftdselMapper;
@Autowired
private CbbMapper cbbMapper;
@Autowired
private CbsmodService cbsmodService;
@Autowired
private PtsptaToolComponent ptsptaToolComponent;
@Autowired
private CndMapper cndMapper;
// @Autowired
// private ICheckRule iCheckRule;
public Ftdgrp getCpdgrpByInr(String inr) {
Ftd ftd = new Ftd();
ftd.setInr(inr);
ftd = ftdselMapper.selectByPrimaryKey(ftd);
if (ftd == null) {
throw new CommonServiceException("主键" + inr + "找不到FTD数据");
}
Ftdgrp ftdgrp = new Ftdgrp();
ftdgrp.reset();
ftdgrp.setRec(ftd);
// Cbb cbb = new Cbb();
// cbb.setInr(inr);
// cbb = cbbMapper.selectByPrimaryKey(cbb);
//
// ftdgrp.setCbb(cbb);
//
// //获取cbb金额信息
// Date date = Dates.add(Utils.getMaxDate(), -1);
// cbsmodService.cbsGetBalance(ftdgrp.getCbb(), "CBB", inr, "MAXSUM", "AMT1", date);
// //获取ptspta信息
// storePtsToGrp(cpdgrp, inr, "CPD");
// //获取cnd信息
// getCndInfo(cpdgrp, inr, "CPD");
return ftdgrp;
}
public void getCndInfo(Cpdgrp cpdgrp, String objInr, String objType) {
List<Cnd> cnds = cndMapper.selectByObjtypAndObjinr(objType, objInr);
if (!MdaUtils.isEmpty(cnds)) {
cpdgrp.setPyebchkey(cnds.get(0).getPyebchkey());
cpdgrp.setPyebchnam(cnds.get(0).getPyebchnam());
}
}
public void storePtsToGrp(Object grpObject, String objInr, String objType) {
//找ptspta数据
Map<String, PtsptaVo> maps = ptsptaToolComponent.getPtsptaList(objInr, objType);
if (maps.size() > 0) {
maps.keySet().forEach(key -> {
PtsptaVo ptsptaVo = maps.get(key);
if (key.equalsIgnoreCase("INT")) {
key = "tmpint";
}
Utils.setFieldValue(grpObject, key.toLowerCase(), ptsptaVo);
});
}
}
public void collectCbsMap(TransactionServiceSet set, String prefix, Cpacbs cbs, String... cbsNames) {
Map<String, Cbb> cbsMap = set.getCbsMap();
if (cbsMap == null) {
cbsMap = new HashMap<>();
}
for (String name : cbsNames) {
Cbb cbb = Utils.getFieldValue(cbs, name);
if (cbb != null) {
cbsMap.put(prefix.toUpperCase() + name.toUpperCase(), cbb);
}
}
set.setCbsMap(cbsMap);
}
public void collectPtsList(TransactionServiceSet set, Cpdgrp cpdgrp, String... ptsNames) {
if (ptsNames == null) {
//找所有的ptspta对象
Field[] fields = cpdgrp.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
if (PtsptaVo.class.equals(field.getType())) {
PtsptaVo ptspta = Utils.getFieldValue(cpdgrp, field.getName());
if (ptspta != null) {
set.addPtspta(transferFrom(ptspta));
}
}
}
} else {
for (String name : ptsNames) {
PtsptaVo ptspta = Utils.getFieldValue(cpdgrp, name);
if (ptspta != null && ptspta.getPts() != null && StringUtils.isNotEmpty(ptspta.getPts().getRol())) {
set.addPtspta(transferFrom(ptspta));
}
}
}
}
public void collectPtsList(TransactionServiceSet set, FremsgVo fremsg, String... ptsNames) {
if (ptsNames == null) {
//找所有的ptspta对象
Field[] fields = fremsg.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
if (PtsptaVo.class.equals(field.getType())) {
PtsptaVo ptspta = Utils.getFieldValue(fremsg, field.getName());
if (ptspta != null) {
set.addPtspta(transferFrom(ptspta));
}
}
}
} else {
for (String name : ptsNames) {
PtsptaVo ptspta = Utils.getFieldValue(fremsg, name);
if (ptspta != null && ptspta.getPts() != null && StringUtils.isNotEmpty(ptspta.getPts().getRol())) {
set.addPtspta(transferFrom(ptspta));
}
}
}
}
/**
* 根据STL结构的ptspta转化成抽象组件的ptspta,结构不一样
*
* @param ptsptas
* @return List<com.brilliance.common.vo.PtsptaVo>
*/
protected PtsptaVo transferFrom(PtsptaVo ptsptas) {
PtsptaVo ptspta = ptsptas;
ptspta.setRol(ptsptas.getPts().getRol());
ptspta.setPtsinr(ptsptas.getPts().getInr());
ptspta.setNam(ptsptas.getPts().getNam());
ptspta.setPtyinr(ptsptas.getPts().getPtyinr());
ptspta.setPtainr(ptsptas.getPts().getPtainr());
ptspta.setExtkey(ptsptas.getPts().getExtkey());
ptspta.setDftdsp(ptsptas.getPts().getDftdsp());
ptspta.setDftcur(ptsptas.getPts().getDftcur());
ptspta.setDftact(ptsptas.getPts().getDftact());
ptspta.setDftfeecur(ptsptas.getPts().getDftfeecur());
ptspta.setDftactptainr(ptsptas.getPts().getDftactptainr());
ptspta.setDftselrol(ptsptas.getPts().getDftsetrol());
ptspta.setGlggrpflg(ptsptas.getPts().getGlggrpflg());
ptspta.setRef(ptsptas.getPts().getRef());
ptspta.setPtytyp(ptsptas.getPtytyp());
ptspta.setPtyextkey(ptsptas.getPtyextkey());
ptspta.setAdrblk(ptsptas.getPts().getAdrblk());
return ptspta;
}
// public void save(Cpdgrp cpdgrp) {
// if (MdaUtils.isEmpty(cpdgrp.getRec().getOpndat())) {
// cpdgrp.getRec().setOpndat(Dates.today());
// if ("04,98".indexOf(cpdgrp.getRec().getCptrou()) != -1 && (MdaUtils.compareTo(cpdgrp.getRec().getAccmod(), "DJ") == 0 || MdaUtils.compareTo(cpdgrp.getRec().getAccmod(), "TD") == 0 || MdaUtils.compareTo(cpdgrp.getRec().getAccmod(), "HC") == 0)) {
// cpdgrp.getRec().setClsdat(null);
// } else {
// cpdgrp.getRec().setClsdat(RemitUtils.getCoreSysDay());
// //批量汇出行内互转邮路闭卷时间置空
// if (MdaUtils.compareTo(cpdgrp.getRec().getAccmod(), "GZ") == 0 || MdaUtils.compareTo(SettleContext.getTransName(), "CPTBAT") == 0) {
// cpdgrp.getRec().setClsdat(null);
// }
// }
// }
// //币种金额+我行客户名称 吴佳
//// String subnam = cpdgrp.getRec().getCur() + cpdgrp.getRec().getAmt();
// String subnam = cpdgrp.getCbs().getMax().getCur() + cpdgrp.getCbs().getMax().getAmt();
// if (BusiCons.CODE_PAYTYP0.equals(cpdgrp.getRec().getPaytyp())) {
// cpdgrp.getRec().setNam(subnam + " " + cpdgrp.getRec().getOrcnam());
// } else {
// cpdgrp.getRec().setNam(subnam + " " + cpdgrp.getRec().getPyenam());
// }
// boolean flag = true;
// flag = iCheckRule.checkIncomingRepeat(cpdgrp.getRec());
// if (!flag) {
// throw new CommonServiceException(I18nUtil.getMessage("remit_common_e3"));
// }
// // TODO 该方法汇款里有添加代码,后面迁移
// trnmodService.trnStoreContract(cpdgrp);
// flag = iCheckRule.checkOutgoingRepeat(cpdgrp.getRec().getInr());
// if (!flag) {
// throw new CommonServiceException(I18nUtil.getMessage("remit_common_e3"));
// }
// }
}
package com.brilliance.isc.funds.basesel.ftdsel.resource;
import com.brilliance.isc.bo.FtdVo;
import com.brilliance.isc.funds.basesel.ftdsel.service.FtdselService;
import com.brilliance.isc.funds.vo.FtdVo;
import com.brilliance.isc.funds.basesel.trncod.service.TrncodService;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Map;
@RestController
@RequestMapping("/ftdsel")
......@@ -16,6 +18,9 @@ public class FtdselController {
@Resource
private FtdselService ftdselService;
@Resource
private TrncodService trncodService;
@RequestMapping("/query")
public ResponseSet list(@RequestBody FtdVo vo) {
return ResponseSet.simpleSuccess(ftdselService.query(vo));
......@@ -24,12 +29,18 @@ public class FtdselController {
* 处理按钮查看能够进行的交易
*
*/
@RequestMapping("/dealWithByInr")
public ResponseSet dealWithByInr(@RequestBody TrnCodeQueryVo trnCodeQueryVo) {
return ResponseSet.simpleSuccess(trncodService.dealWithByInr(trnCodeQueryVo));
}
/**
* 详情页面初始化
*/
@RequestMapping("/selectXxdByPrimaryKey")
public ResponseSet selectXxdByPrimaryKey(@RequestBody Map<String,String> map) {
return ResponseSet.simpleSuccess(trncodService.selectXxdByPrimaryKey(map));
}
}
package com.brilliance.isc.funds.basesel.ftdsel.service;
import com.brilliance.isc.funds.bo.Ftd;
import com.brilliance.isc.funds.vo.FtdVo;
import com.brilliance.isc.bo.FtdVo;
import com.github.pagehelper.PageInfo;
public interface FtdselService {
PageInfo<Ftd> query(FtdVo ftdVo);
PageInfo<FtdVo> query(FtdVo ftdVo);
}
\ No newline at end of file
package com.brilliance.isc.funds.basesel.ftdsel.service.impl;
import com.brilliance.isc.bo.FtdVo;
import com.brilliance.isc.funds.basesel.ftdsel.service.FtdselService;
import com.brilliance.isc.funds.bo.Ftd;
import com.brilliance.isc.funds.vo.FtdVo;
import com.brilliance.isc.funds.mapper.FtdselMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
......@@ -15,12 +17,14 @@ import java.util.List;
public class FtdselServiceImpl implements FtdselService {
@Resource
private FtdselMapper ftdselMapper;
@Override
public PageInfo<Ftd> query(FtdVo vo) {
@Override
public PageInfo<FtdVo> query(FtdVo vo) {
//搜索
PageHelper.startPage(vo.getPageNo(), vo.getPageSize(), null).setReasonable(true);
List<Ftd> result= ftdselMapper.query(vo);
return new PageInfo<>(result);
List<FtdVo> list = ftdselMapper.query(vo);
return new PageInfo<>(list);
// String branch = fxtselQueryVo.getBranch();
// if (Strings.isEmpty(branch)) {
......@@ -53,4 +57,5 @@ public class FtdselServiceImpl implements FtdselService {
}
}
package com.brilliance.isc.funds.basesel.trncod.consts;
public class ErrorPrompt {
public final static String ErrSelN = "No Clean Payment selected\n";
public final static String ErrClsY = "Selected Clean Payment is closed\n";
public final static String ErrClsN = "Selected Clean Payment is not closed\n";
public final static String ErrOpnN = "Selected Clean Payment is not yet opened\n";
public final static String ErrOpnY = "Selected Clean Payment is already opened\n";
public final static String ErropnI = "Selected incoming Payment is already opened\n";
public final static String ErropnO = "Selected Outgoing Payment is already opened\n";
}
package com.brilliance.isc.funds.basesel.trncod.service;
import com.brilliance.isc.bo.model.Cpdgrp;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.authority.ITrnCodService;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import java.util.List;
import java.util.Map;
public interface TrncodService extends ITrnCodService {
String isFTTrnAllowed(Ftdgrp cpdgrp, String trnNam);
List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
Object selectXxdByPrimaryKey(Map<String, String> map);
}
package com.brilliance.isc.funds.basesel.trncod.service.impl;
import com.brilliance.isc.bo.Busbtn;
import com.brilliance.isc.bo.Cbb;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.Cpdgrp;
//import com.brilliance.isc.bo.remit.CptadvStoreBo;
//import com.brilliance.isc.bo.remit.CptopnStoreBo;
import com.brilliance.isc.bo.model.Ftdgrp;
import com.brilliance.isc.common.cbsmod.service.CbsmodService;
//import com.brilliance.isc.common.component.CpToolComponent;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.funds.basesel.common.FtToolComponent;
import com.brilliance.isc.funds.basesel.trncod.consts.ErrorPrompt;
import com.brilliance.isc.funds.basesel.trncod.service.TrncodService;
import com.brilliance.isc.mda.dao.BusbtnMapper;
import com.brilliance.isc.mda.dao.TrnMapper;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.mda.runtime.mda.util.Dates;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.google.common.collect.Lists;
import org.checkerframework.checker.units.qual.C;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class TrncodServiceImpl implements TrncodService {
@Resource
private BusbtnMapper busbtnMapper;
@Resource
private TrncodService trncodService;
@Resource
private TrnMapper trnMapper;
@Resource
private SysmodService sysmodService;
@Resource
private CbsmodService cbsmodService;
@Resource
private FtToolComponent ftToolComponent;
@Override
public String isFTTrnAllowed(Ftdgrp ftdgrp, String trnNam) {
ftdgrp.reset();
trnNam = trnNam.toUpperCase();
String errMsg = "";
switch(trnNam){
case "FTTFMT":
if(MdaUtils.isEmpty(ftdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;}
// }else {
// if(!MdaUtils.isEmpty(ftdgrp.getRec().getClsdat())){
// errMsg += ErrorPrompt.ErrClsY;
// }
// if(MdaUtils.isEmpty(cpdgrp.getRec().getOpndat())){
// errMsg += ErrorPrompt.ErrOpnN;
// }
// if(!MdaUtils.equals(cpdgrp.getRec().getAccmod(),"2")){
// errMsg += "业务未挂账!\n";
// }
// }
break;
case "FTTFCN":
if(MdaUtils.isEmpty(ftdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}
// }else {
// if (!MdaUtils.isEmpty(cpdgrp.getRec().getClsdat())) {
// errMsg += ErrorPrompt.ErrClsY;
// }
// }
// break;
// case "CPTROP":
// if(MdaUtils.isEmpty(cpdgrp.getRec().getInr())){
// errMsg += ErrorPrompt.ErrSelN;
// }else {
// if (MdaUtils.isEmpty(cpdgrp.getRec().getClsdat())) {
// errMsg += ErrorPrompt.ErrClsN;
// }
// }
break;
case "CPTFEE":
case "CPTFRE":
case "CPTATT":
case "JSTOPN":
if(MdaUtils.isEmpty(ftdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}
break;
default:
errMsg += "";
break;
}
return errMsg;
}
@Override
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
List<TrncodVo> result = Lists.newArrayList();
//获取模型数据
Ftdgrp cpdgrp = ftToolComponent.getCpdgrpByInr(trnCodeQueryVo.getInr());
List<Busbtn> busbtnList = busbtnMapper.selectByBustypAndIsShow(trnCodeQueryVo.getType());
String disResult = "";
Cbb gz1amt = new Cbb();
cbsmodService.cbsGetBalance(gz1amt, "CPD", trnCodeQueryVo.getInr(), "GZ1AMT", "AMT1", Dates.today());
Cbb jf1amt = new Cbb();
cbsmodService.cbsGetBalance(jf1amt, "CPD", trnCodeQueryVo.getInr(), "JF1AMT", "AMT1", Dates.today());
Cbb th1amt = new Cbb();
cbsmodService.cbsGetBalance(th1amt, "CPD", trnCodeQueryVo.getInr(), "TH1AMT", "AMT1", Dates.today());
for (int i = 0; i < busbtnList.size(); i++) {
//按钮亮灰显逻辑
disResult = "";
// if ("资金拆借".equals(busbtnList.get(i).getBtnnam())) {
// // 如果btnnam是"挂账退汇"
// if (gz1amt.getAmt() != null && gz1amt.getAmt().compareTo(BigDecimal.ZERO) > 0) {
// } else {
// disResult = "业务未挂账!\n";
// }
// } else if ("头寸调拨".equals(busbtnList.get(i).getBtnnam())) {
// // 如果btnnam是"解付后退汇"
// if (jf1amt.getAmt() != null && jf1amt.getAmt().compareTo(BigDecimal.ZERO) > 0) {
// } else {
// disResult = "业务未解付!\n";
// }
// } else {
// disResult = trncodService.isFTTrnAllowed(cpdgrp, busbtnList.get(i).getInifrm());
// }
TrncodVo trncodVo = new TrncodVo(busbtnList.get(i).getInifrm(), busbtnList.get(i).getBtnnam(), MdaUtils.isEmpty(disResult) ? "Y" : "N", busbtnList.get(i).getIsMain(), disResult);
result.add(trncodVo);
}
return result;
}
@Override
public Object selectXxdByPrimaryKey(Map<String, String> map) {
String objinr = map.get("objinr");
String objtyp = map.get("objtyp");
// String pntinr = map.get("pntinr");
String paytyp = map.get("paytyp");
// switch(paytyp) {
// case "I":
// CptadvStoreBo cptadvStoreBo = new CptadvStoreBo();
// cptadvStoreBo.reset();
// if(objinr.length() == 16) {
// Trn trnCpdI = trnMapper.selectByObjinrTrn(objtyp, objinr, "FTTFMT");
// if (!Objects.isNull(trnCpdI)) {
// cptadvStoreBo = sysmodService.streamGetNameInSubDir(CptadvStoreBo.class, trnCpdI.getInr());
// }
// }
// cptadvStoreBo.setCpdgrp(cpToolComponent.getCpdgrpByInr(objinr));
// return cptadvStoreBo;
// case "O":
// CptopnStoreBo cptopnStoreBo = new CptopnStoreBo();
// cptopnStoreBo.reset();
// if(objinr.length() == 16) {
// Trn trnCpdO = trnMapper.selectByObjinrTrn(objtyp, objinr, "FTTFCN");
// if (!Objects.isNull(trnCpdO)) {
// cptopnStoreBo = sysmodService.streamGetNameInSubDir(CptopnStoreBo.class, trnCpdO.getInr());
// }
// }
// cptopnStoreBo.setCpdgrp(cpToolComponent.getCpdgrpByInr(objinr));
// return cptopnStoreBo;
// }
return null;
}
}
package com.brilliance.isc.funds.fxtlop.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtlopValidator
* @description: 结售汇平盘登记 Fxtlop 校验
* @author: wangweidong
* @create: 2024-10-08 16:42
*/
@Component
public class FxtlopValidator extends AbstractModuleValidator<FxtlopStoreBo> {
@Override
@PostConstruct
public void register() {
super.register();
}
@Override
public Map<String, String> validate(FxtlopStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
}
package com.brilliance.isc.funds.fxtlop.document;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @program: isc-funds
* @ClassName: FxtlopDocSet
* @description: 结售汇平盘登记 Fxtlop 面函
* @author: wangweidong
* @create: 2024-10-08 16:39
*/
@Component("fxtlop.docset")
public class FxtlopDocSet extends AbstractTransactionDocSet<FxtlopStoreBo> {
private static final Logger logger = LoggerFactory.getLogger(FxtlopDocSet.class);
/**
* 构建需要支持的面函组件
*/
@PostConstruct
public void buildMember() {
//扫描Cortype支持,必须要执行
scanDocCortypSupport();
}
}
package com.brilliance.isc.funds.fxtlop.register.diasav;
import com.brilliance.isc.common.register.diasav.IDiasavRegister;
import com.brilliance.isc.common.register.diasav.common.DftcreDiasavRegister;
import com.brilliance.isc.common.register.diasav.common.LiaallDiasavRegister;
import com.brilliance.isc.common.register.diasav.common.LiaallDiasavZZZRegister;
import com.brilliance.isc.common.register.diasav.common.TrtcreDiasavRegister;
import com.brilliance.isc.common.trndia.service.TrndiaService;
import com.brilliance.isc.common.trndia.vo.TrndiaVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @program: isc-funds
* @ClassName: FxtlopDiasavRegister
* @description: 结售汇平盘登记 Fxtlop 备忘录注册
* @author: wangweidong
* @create: 2024-10-08 16:39
*/
@Component("fxtlop.diasavRegister")
public class FxtlopDiasavRegister implements IDiasavRegister {
@Autowired
private TrndiaService trndiaService;
@Autowired
private LiaallDiasavRegister liaallDiasavRegister;
@Autowired
private LiaallDiasavZZZRegister liaallDiasavZZZRegister;
@Autowired
private TrtcreDiasavRegister trtcreDiasavRegister;
@Autowired
private DftcreDiasavRegister dftcreDiasavRegister;
@Override
public void diasav(TrndiaVo trndia) {
trnDiasav(trndia);
liaallDiasavRegister.diasav(trndia);
liaallDiasavZZZRegister.diasav(trndia);
trtcreDiasavRegister.diasav(trndia);
dftcreDiasavRegister.diasav(trndia);
}
private void trnDiasav(TrndiaVo trndiaVo) {
}
}
package com.brilliance.isc.funds.fxtlop.register.doc;
import com.brilliance.isc.common.register.document.IDocumentRegister;
import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import org.springframework.stereotype.Component;
/**
* @program: isc-funds
* @ClassName: FxtlopDocumentRegister
* @description: 结售汇平盘登记 Fxtlop 面函注册
* @author: wangweidong
* @create: 2024-10-09 10:39
*/
@Component("fxtlop.documentRegister")
public class FxtlopDocumentRegister implements IDocumentRegister {
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
}
public void doRegister(TrndocVo trndoc) {
}
}
package com.brilliance.isc.funds.fxtlop.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.transfer.transaction.FxtlopStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtlopStoreVo;
import com.brilliance.isc.transfer.IStructMapper;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @program: isc-funds
* @ClassName: FxtlopResource
* @description: 结售汇平盘登记 Fxtlop 请求入口
* @author: wangweidong
* @create: 2024-10-08 16:34
*/
@RestController
@RequestMapping("/fxtlop")
@Api("结售汇平盘登记")
public class FxtlopResource extends AbstractTransactionController<FxtlopStoreVo> {
@Resource
private FxtlopStructMapper fxtlopStructMapper;
public IStructMapper getStructMapper() {
return fxtlopStructMapper;
}
}
package com.brilliance.isc.funds.fxtlop.service;
import com.brilliance.isc.common.contants.CommonContants;
import com.brilliance.isc.common.transaction.AbstractTransactionService;
import com.brilliance.isc.common.vo.BizAmdInfoVo;
import com.brilliance.isc.common.vo.BizInfoVo;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.isc.funds.fxtlop.check.FxtlopValidator;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtlopTransactionServiceImpl
* @description: 结售汇平盘登记 Fxtlop 业务处理
* @author: wangweidong
* @create: 2024-10-08 16:35
*/
@Service("fxtlop.transaction")
public class FxtlopTransactionServiceImpl extends AbstractTransactionService<FxtlopStoreBo> {
@Resource
private FxtlopValidator fxtlopValidator;
@PostConstruct
public void regisertService() {
serviceRegisterMaps.put(CommonContants.SETMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDOC_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.GLEMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNDIA_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.TRNMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.UMDMOD_SERVICE, "N");
serviceRegisterMaps.put(CommonContants.LIMMOD_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_RMB_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_SZSB_BOPREM_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.BOPSET_CFABOP_SERVICE, "Y");
serviceRegisterMaps.put(CommonContants.FANXIQIAN_SERVICE, "Y");
}
@Override
protected void txnSave(FxtlopStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
}
public void ruleMtabutSavN500(FxtlopStoreBo bo) {
}
@Override
protected Map<String, String> txnCheck(FxtlopStoreBo transactionVo) {
return fxtlopValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FxtlopStoreBo transactionVo) {
return null;
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtlopStoreBo transactionVo) {
return null;
}
@Override
public FxtlopStoreBo init(FxtlopStoreBo fxtlopStoreBo) {
fxtlopStoreBo.reset();
return fxtlopStoreBo;
}
@Override
public void beforeSave(FxtlopStoreBo transactionVo) {
transactionVo.reset();
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtlopStoreBo transactionVo) {
}
}
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.brilliance.isc.funds.mapper.FtdselMapper">
<resultMap id="BaseResultMap" type="com.brilliance.isc.funds.bo.Ftd">
<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"/>
......@@ -22,24 +22,33 @@
<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>
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
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>
......@@ -55,8 +64,82 @@
<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 != ''">-->
......@@ -117,8 +200,4 @@
<!-- AND M1.sta=#{ sta,jdbcType=VARCHAR}-->
<!-- </if>-->
</select>
</mapper>
\ No newline at end of file
package com.brilliance.isc.funds.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;
}
\ No newline at end of file
package com.brilliance.isc.funds.bo.funds;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
/**
* @program: isc-funds
* @ClassName: FxtlopStoreBo
* @description: 结售汇平盘登记bo
* @author: wangweidong
* @create: 2024-10-08 16:51
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtlopStoreBo extends BaseTransactionVo {
}
package com.brilliance.isc.funds.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brilliance.isc.funds.bo.Ftd;
import com.brilliance.isc.funds.vo.FtdVo;
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<Ftd> {
public interface FtdselMapper extends BaseMapper<FtdVo> {
List<FtdVo> query(FtdVo vo);
List<Ftd> query(FtdVo vo);
Ftd selectByPrimaryKey(Ftd ftd);
//String findInrByRcvbic(String cod);
}
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
import com.brilliance.isc.funds.vo.funds.FxtlopStoreVo;
import com.brilliance.isc.transfer.IBaseStructMapper;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
/**
* @program: isc-funds
* @ClassName: FxtlopStructMapper
* @description: 结售汇平盘登记转换Fxtlop Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: wangweidong
* @create: 2024-10-08 16:27
*/
@Mapper(componentModel = "spring")
public interface FxtlopStructMapper extends IBaseStructMapper<FxtlopStoreBo, FxtlopStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtlopStructMapper INSTANCE = Mappers.getMapper(FxtlopStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtlopStoreBo voTransferToBo(FxtlopStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FxtlopStoreVo vo, @MappingTarget FxtlopStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtlopStoreVo boTransferToVo(FxtlopStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FxtlopStoreBo bo, @MappingTarget FxtlopStoreVo vo);
}
package com.brilliance.isc.funds.vo;
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.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 seacur;
// /**
// * //金额
// */
// private BigDecimal seaamtfr;
// /**
// * //金额
// */
// private BigDecimal seaamtto;
// /**
// *参与方参考号
// */
// 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.funds.vo.funds;
import com.brilliance.isc.common.transaction.vo.BaseTransactionVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
/**
* @program: isc-funds
* @ClassName: FxtlopStoreVo
* @description: 结售汇平盘登记
* @author: wangweidong
* @create: 2024-10-08 16:26
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtlopStoreVo extends BaseTransactionVo {
}
......@@ -6,6 +6,7 @@
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-parent</artifactId>
<version>3.1.0</version>
<!-- <relativePath>../pom.xml</relativePath>-->
<!-- <relativePath>../isc-common/isc-common-parent/pom.xml</relativePath>-->
</parent>
......
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