Commit 2abc28f0 by zhoujunpeng

Merge remote-tracking branch 'origin/develop' into develop

parents e90484c5 9698b046
...@@ -9,6 +9,7 @@ funds_fxtsqo_000004={0} ...@@ -9,6 +9,7 @@ funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0} 0136=This contract is overdrawn by {0}
0141=The selected value date {0} on settlement details panel is in the past.
funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5 funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97 funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97
......
...@@ -9,6 +9,7 @@ funds_fxtsqo_000004={0} ...@@ -9,6 +9,7 @@ funds_fxtsqo_000004={0}
funds_fxtfop_000000=Foreign Exchange Liquidation funds_fxtfop_000000=Foreign Exchange Liquidation
funds_fxtfcn_CT000009=Foreign Exchange Liquidation funds_fxtfcn_CT000009=Foreign Exchange Liquidation
0136=This contract is overdrawn by {0} 0136=This contract is overdrawn by {0}
0141=The selected value date {0} on settlement details panel is in the past.
funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5 funds_fttfcm_000000=\u8d77\u606f\u65e5\u4e0d\u80fd\u5927\u4e8e\u5230\u671f\u65e5
funds_crtcri_000000=Clearing in funds_crtcri_000000=Clearing in
funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97 funds_crtcr0_000000=\u4ed8\u6b3e\u6e05\u7b97
......
package com.brilliance.isc.funds.fxtfcm.resource; package com.brilliance.isc.funds.fxtfcm.resource;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController; import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo; import com.brilliance.isc.funds.bo.funds.FxtfcmStoreBo;
import com.brilliance.isc.funds.fxtfcm.service.FxtfcmTransactionServiceImpl;
import com.brilliance.isc.funds.transfer.transaction.FxtfcmStructMapper; import com.brilliance.isc.funds.transfer.transaction.FxtfcmStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtfcmStoreVo; import com.brilliance.isc.funds.vo.funds.FxtfcmStoreVo;
import com.brilliance.isc.transfer.IStructMapper; import com.brilliance.isc.transfer.IStructMapper;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.funds.FttselQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @program: isc-funds * @program: isc-funds
...@@ -28,4 +36,37 @@ public class FxtfcmResource extends AbstractTransactionController<FxtfcmStoreVo> ...@@ -28,4 +36,37 @@ public class FxtfcmResource extends AbstractTransactionController<FxtfcmStoreVo>
public IStructMapper getStructMapper() { public IStructMapper getStructMapper() {
return fxtfcmStructMapper; return fxtfcmStructMapper;
} }
@Resource
FxtfcmTransactionServiceImpl fxtfcmTransactionService;
@Autowired
private SettleContext settleContext;
@PostMapping("/defaultAcc1N1000")
public ResponseSet defaultAcc1N1000(@RequestBody FxtfcmStoreVo vo) {
try {
settleContext.loadSettleSession("FXTFCM","","");
List<String> accList= fxtfcmTransactionService.defaultAcc1N1000(vo);
return ResponseSet.simpleSuccess(accList);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
@PostMapping("/defaultAcc2N1000")
public ResponseSet defaultAcc2N1000(@RequestBody FxtfcmStoreVo vo) {
try {
settleContext.loadSettleSession("FXTFCM","","");
List<String> accList= fxtfcmTransactionService.defaultAcc2N1000(vo);
return ResponseSet.simpleSuccess(accList);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
} }
...@@ -227,10 +227,10 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -227,10 +227,10 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getAplacc().getPts().getPtyinr()) ) if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getAplacc().getPts().getPtyinr()) )
{ {
String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getAplacc().getPts().getPtyinr() + "' AND TYP = 'DB'"; String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getAplacc().getPts().getPtyinr() + "' AND TYP = 'DB'";
List<String > actList = actMapper.getSerAccByConditionSql(sql); actLst = actMapper.getSerAccByConditionSql(sql);
if( ! vo.isModified("acc2") && actLst.size()>0) { if( ! vo.isModified("acc2") && actLst.size()>0) {
vo.setAcc2( actLst.get(1)); vo.setAcc2( actLst.get(0));
} }
} }
else else
...@@ -254,10 +254,10 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -254,10 +254,10 @@ public class FxtfcmTransactionServiceImpl extends AbstractTransactionService<Fxt
if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getFxdgrp().getAct().getPts().getPtyinr()) ) if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getFxdgrp().getAct().getPts().getPtyinr()) )
{ {
String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getFxdgrp().getAct().getPts().getPtyinr() + "' AND TYP = 'DB'"; String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getFxdgrp().getAct().getPts().getPtyinr() + "' AND TYP = 'DB'";
List<String > actList = actMapper.getSerAccByConditionSql(sql); actLst = actMapper.getSerAccByConditionSql(sql);
if( ! vo.isModified("acc1") && actLst.size()>0) { if( ! vo.isModified("acc1") && actLst.size()>0) {
vo.setAcc1( actLst.get(1)); vo.setAcc1( actLst.get(0));
} }
} }
else else
......
...@@ -20,7 +20,7 @@ import java.util.Map; ...@@ -20,7 +20,7 @@ import java.util.Map;
* @author: Lenovo * @author: Lenovo
* @create: 2024-10-14 14:43 * @create: 2024-10-14 14:43
*/ */
@Component("fxtlcm.docset") @Component("fxtlcm.BuildFxt300s1")
public class BuildFxt300s1 { public class BuildFxt300s1 {
public Map<String, Object> build(FxtlcmStoreBo trnBo, DoceotVo doceotVo) { public Map<String, Object> build(FxtlcmStoreBo trnBo, DoceotVo doceotVo) {
......
...@@ -20,7 +20,7 @@ import java.util.Map; ...@@ -20,7 +20,7 @@ import java.util.Map;
* @author: Lenovo * @author: Lenovo
* @create: 2024-10-14 15:14 * @create: 2024-10-14 15:14
*/ */
@Component("fxtLcm.docset") @Component("fxtlcm.docset")
public class FxtlcmDocset extends AbstractTransactionDocSet<FxtlcmStoreBo> { public class FxtlcmDocset extends AbstractTransactionDocSet<FxtlcmStoreBo> {
@Resource @Resource
......
...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtlcm.register.doc; ...@@ -2,6 +2,7 @@ package com.brilliance.isc.funds.fxtlcm.register.doc;
import com.brilliance.isc.common.component.PtsptaToolComponent; import com.brilliance.isc.common.component.PtsptaToolComponent;
import com.brilliance.isc.common.register.document.IDocumentRegister; import com.brilliance.isc.common.register.document.IDocumentRegister;
import com.brilliance.isc.common.register.document.common.SetmodDocumentRegister;
import com.brilliance.isc.common.trndoc.service.TrndocService; import com.brilliance.isc.common.trndoc.service.TrndocService;
import com.brilliance.isc.common.trndoc.vo.TrndocVo; import com.brilliance.isc.common.trndoc.vo.TrndocVo;
import com.brilliance.isc.common.vo.PtsptaVo; import com.brilliance.isc.common.vo.PtsptaVo;
...@@ -27,9 +28,15 @@ public class FxtlcmDocumentRegister implements IDocumentRegister { ...@@ -27,9 +28,15 @@ public class FxtlcmDocumentRegister implements IDocumentRegister {
@Resource @Resource
PtsptaToolComponent ptsptaToolComponent; PtsptaToolComponent ptsptaToolComponent;
@Autowired
private SetmodDocumentRegister setmodDocumentRegister;
@Override @Override
public void registerDocument(TrndocVo trndoc) { public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc); doRegister(trndoc);
setmodDocumentRegister.registerDocument(trndoc);
} }
public void doRegister(TrndocVo trndoc){ public void doRegister(TrndocVo trndoc){
......
...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @program: isc-funds * @program: isc-funds
...@@ -47,4 +48,31 @@ public class FxtlcmResource extends AbstractTransactionController<FxtlcmStoreVo> ...@@ -47,4 +48,31 @@ public class FxtlcmResource extends AbstractTransactionController<FxtlcmStoreVo>
return ResponseSet.simpleSuccess(fxtlcmStoreVo); return ResponseSet.simpleSuccess(fxtlcmStoreVo);
} }
@PostMapping("/defaultAcc1N1000")
public ResponseSet defaultAcc1N1000(@RequestBody FxtlcmStoreVo vo) {
try {
settleContext.loadSettleSession("FXTLCM","","");
List<String> accList= fxtlcmTransactionService.defaultAcc1N1000(vo);
return ResponseSet.simpleSuccess(accList);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
@PostMapping("/defaultAcc2N1000")
public ResponseSet defaultAcc2N1000(@RequestBody FxtlcmStoreVo vo) {
try {
settleContext.loadSettleSession("FXTLCM","","");
List<String> accList= fxtlcmTransactionService.defaultAcc2N1000(vo);
return ResponseSet.simpleSuccess(accList);
} catch (Exception e) {
throw e;
} finally {
SettleContext.removeUserSession();
}
}
} }
...@@ -26,18 +26,22 @@ import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo; ...@@ -26,18 +26,22 @@ import com.brilliance.isc.funds.bo.funds.FttfcmStoreBo;
import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo; import com.brilliance.isc.funds.bo.funds.FxtlcmStoreBo;
import com.brilliance.isc.funds.common.component.FxToolComponent; import com.brilliance.isc.funds.common.component.FxToolComponent;
import com.brilliance.isc.funds.fxtlcm.check.FxtlcmValidator; import com.brilliance.isc.funds.fxtlcm.check.FxtlcmValidator;
import com.brilliance.isc.funds.transfer.transaction.FttfcmStructMapper;
import com.brilliance.isc.funds.transfer.transaction.FxtlcmStructMapper; import com.brilliance.isc.funds.transfer.transaction.FxtlcmStructMapper;
import com.brilliance.isc.funds.vo.funds.FttfcmStoreVo; import com.brilliance.isc.funds.vo.funds.FttfcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtfcmStoreVo;
import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo; import com.brilliance.isc.funds.vo.funds.FxtlcmStoreVo;
import com.brilliance.isc.mda.dao.ActMapper;
import com.brilliance.isc.vo.funds.FxdBizInfoVo; import com.brilliance.isc.vo.funds.FxdBizInfoVo;
import com.brilliance.mda.runtime.mda.util.Dates; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
...@@ -52,7 +56,8 @@ import static com.brilliance.mda.runtime.mda.Constants.NULLSTR; ...@@ -52,7 +56,8 @@ import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;
*/ */
@Service("fxtlcm.transaction") @Service("fxtlcm.transaction")
public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<FxtlcmStoreBo> { public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<FxtlcmStoreBo> {
@Resource
private ActMapper actMapper;
@Resource @Resource
private FxtlcmValidator fxtlcmValidator; private FxtlcmValidator fxtlcmValidator;
@Resource @Resource
...@@ -110,8 +115,8 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -110,8 +115,8 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
bizInfoVo.setObjinr(rec.getInr()); bizInfoVo.setObjinr(rec.getInr());
bizInfoVo.setOwnref(rec.getOwnref()); bizInfoVo.setOwnref(rec.getOwnref());
bizInfoVo.setFxtyp(rec.getFxtyp()); bizInfoVo.setFxtyp(rec.getFxtyp());
bizInfoVo.setAcc(rec.getAcc()); bizInfoVo.setAcc1(transactionVo.getAcc1());
bizInfoVo.setAcc2(rec.getAcc2()); bizInfoVo.setAcc2(transactionVo.getAcc2());
bizInfoVo.setDsp(rec.getDsp()); bizInfoVo.setDsp(rec.getDsp());
bizInfoVo.setDsp2(rec.getDsp2()); bizInfoVo.setDsp2(rec.getDsp2());
bizInfoVo.setTrdint(rec.getTrdint()); bizInfoVo.setTrdint(rec.getTrdint());
...@@ -140,6 +145,15 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -140,6 +145,15 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
String fxdinr = fxdgrp.getRec().getInr(); String fxdinr = fxdgrp.getRec().getInr();
fxdgrp = fxToolComponent.getFxdgrpByInr(fxtlcmStoreBo.getFxdgrp().getRec().getInr()); fxdgrp = fxToolComponent.getFxdgrpByInr(fxtlcmStoreBo.getFxdgrp().getRec().getInr());
String extkey = SettleContext.getUserSession().getUsr().getExtkey();
if (MdaUtils.isEmpty(fxdgrp.getRec().getOwnusr())){
fxdgrp.getRec().setOwnusr(extkey);
}
if (MdaUtils.isEmpty(fxdgrp.getRec().getUsr())){
fxdgrp.getRec().setUsr(extkey);
}
fxtlcmStoreBo.setFxdgrp(fxdgrp); fxtlcmStoreBo.setFxdgrp(fxdgrp);
} }
...@@ -210,7 +224,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -210,7 +224,7 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
// if ( !MdaUtils.isEmpty( transactionHelpService.getTransactionStoreSet().getLiaall())) { // if ( !MdaUtils.isEmpty( transactionHelpService.getTransactionStoreSet().getLiaall())) {
// liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall()); // liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
// } // }
liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall()); // liaallService.storeAll(transactionHelpService.getTransactionStoreSet().getLiaall());
cbsmodService.cbsTrnCommit(); cbsmodService.cbsTrnCommit();
} }
...@@ -238,4 +252,56 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt ...@@ -238,4 +252,56 @@ public class FxtlcmTransactionServiceImpl extends AbstractTransactionService<Fxt
fxToolComponent.getref(fxdgrp); fxToolComponent.getref(fxdgrp);
return fxdgrp.getRec().getOwnref(); return fxdgrp.getRec().getOwnref();
} }
public List<String> defaultAcc2N1000(FxtlcmStoreVo vo){
vo.reset();
FxtlcmStoreBo bo= fxtlcmStructMapper.voTransferToBo(vo);
Fxd rec=bo.getFxdgrp().getRec();
List<String> actLst=new ArrayList<>();
if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getAplacc().getPts().getPtyinr()) )
{
String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getAplacc().getPts().getPtyinr() + "' AND TYP = 'DB'";
actLst = actMapper.getSerAccByConditionSql(sql);
if( ! vo.isModified("acc2") && actLst.size()>0) {
vo.setAcc2( actLst.get(0));
}
}
else
{
vo.setAcc2(NULLSTR);
}
return actLst;
}
/**
* source:fxtfcm.0009.script
*/
public List<String> defaultAcc1N1000(FxtlcmStoreVo vo){
vo.reset();
FxtlcmStoreBo bo= fxtlcmStructMapper.voTransferToBo(vo);
Fxd rec=bo.getFxdgrp().getRec();
List<String> actLst=new ArrayList<>();
if( ! MdaUtils.isEmpty(vo.getFxdgrp().getCbs().getMax().getCur()) && ! MdaUtils.isEmpty(vo.getFxdgrp().getAct().getPts().getPtyinr()) )
{
String sql = "WHERE CUR = '" + vo.getFxdgrp().getCbs().getMax().getCur() + "' AND SERPTYINR = '" + vo.getFxdgrp().getAct().getPts().getPtyinr() + "' AND TYP = 'DB'";
actLst = actMapper.getSerAccByConditionSql(sql);
if( ! vo.isModified("acc1") && actLst.size()>0) {
vo.setAcc1( actLst.get(0));
}
}
else
{
vo.setAcc1(NULLSTR);
}
return actLst;
}
} }
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