Commit 70e061cd by huangshunlin

即期结售汇交易基本框架

parent 6244b92d
package com.brilliance.isc.fxtssb.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.funds.bo.funds.FxtssbStoreBo;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtssbValidator
* @description: 即期结汇 Fxtssb 校验
* @author: huangshunlin
* @create: 2024-10-08 15:38
*/
@Component
public class FxtssbValidator extends AbstractModuleValidator<FxtssbStoreBo> {
@Override
@PostConstruct
public void register() {
super.register();
}
@Override
public Map<String, String> validate(FxtssbStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
}
package com.brilliance.isc.fxtssb.document;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FxtssbStoreBo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @program: isc-funds
* @ClassName: FxtssbDocSet
* @description: 即期结汇 Fxtssb 面函
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component("fxtssb.docset")
public class FxtssbDocSet extends AbstractTransactionDocSet<FxtssbStoreBo> {
private static final Logger logger = LoggerFactory.getLogger(FxtssbDocSet.class);
/**
* 构建需要支持的面函组件
*/
@PostConstruct
public void buildMember() {
//扫描Cortype支持,必须要执行
scanDocCortypSupport();
}
}
package com.brilliance.isc.fxtssb.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: FxtssbDocumentRegister
* @description: 即期结汇 Fxtssb 面函注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component("fxtssb.documentRegister")
public class FxtssbDocumentRegister implements IDocumentRegister {
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
}
public void doRegister(TrndocVo trndoc) {
}
}
package com.brilliance.isc.fxtssb.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.transfer.transaction.FxtssbStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtssbStoreVo;
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: FxtssbResource
* @description: 即期结汇 Fxtssb 请求入口
* @author: huangshunlin
* @create: 2024-10-08 15:34
*/
@RestController
@RequestMapping("/fxtssb")
@Api("即期结汇")
public class FxtssbResource extends AbstractTransactionController<FxtssbStoreVo> {
@Resource
private FxtssbStructMapper fxtssbStructMapper;
public IStructMapper getStructMapper() {
return fxtssbStructMapper;
}
}
package com.brilliance.isc.fxtssb.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.FxtssbStoreBo;
import com.brilliance.isc.fxtssb.check.FxtssbValidator;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtssbTransactionServiceImpl
* @description: 即期结汇 Fxtssb 业务处理
* @author: huangshunlin
* @create: 2024-10-08 15:35
*/
@Service("fxtssb.transaction")
public class FxtssbTransactionServiceImpl extends AbstractTransactionService<FxtssbStoreBo> {
@Resource
private FxtssbValidator fxtssbValidator;
@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(FxtssbStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
}
public void ruleMtabutSavN500(FxtssbStoreBo bo) {
}
@Override
protected Map<String, String> txnCheck(FxtssbStoreBo transactionVo) {
return fxtssbValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FxtssbStoreBo transactionVo) {
return null;
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtssbStoreBo transactionVo) {
return null;
}
@Override
public FxtssbStoreBo init(FxtssbStoreBo fxtssbStoreBo) {
fxtssbStoreBo.reset();
return fxtssbStoreBo;
}
@Override
public void beforeSave(FxtssbStoreBo transactionVo) {
transactionVo.reset();
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtssbStoreBo transactionVo) {
}
}
package com.brilliance.isc.fxtsss.check;
import com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator;
import com.brilliance.isc.funds.bo.funds.FxtsssStoreBo;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtsssValidator
* @description: 即期售汇 Fxtsss 校验
* @author: huangshunlin
* @create: 2024-10-08 15:38
*/
@Component
public class FxtsssValidator extends AbstractModuleValidator<FxtsssStoreBo> {
@Override
@PostConstruct
public void register() {
super.register();
}
@Override
public Map<String, String> validate(FxtsssStoreBo vo) {
Map<String, String> maps = new HashMap<>();
maps.putAll(super.validate(vo));
return maps;
}
}
package com.brilliance.isc.fxtsss.document;
import com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet;
import com.brilliance.isc.funds.bo.funds.FxtsssStoreBo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
* @program: isc-funds
* @ClassName: FxtsssDocSet
* @description: 即期售汇 Fxtsss 面函
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component("fxtsss.docset")
public class FxtsssDocSet extends AbstractTransactionDocSet<FxtsssStoreBo> {
private static final Logger logger = LoggerFactory.getLogger(FxtsssDocSet.class);
/**
* 构建需要支持的面函组件
*/
@PostConstruct
public void buildMember() {
//扫描Cortype支持,必须要执行
scanDocCortypSupport();
}
}
package com.brilliance.isc.fxtsss.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: FxtsssDocumentRegister
* @description: 即期售汇 Fxtsss 面函注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component("fxtsss.documentRegister")
public class FxtsssDocumentRegister implements IDocumentRegister {
@Override
public void registerDocument(TrndocVo trndoc) {
doRegister(trndoc);
}
public void doRegister(TrndocVo trndoc) {
}
}
package com.brilliance.isc.fxtsss.resource;
import com.brilliance.isc.common.transaction.controller.AbstractTransactionController;
import com.brilliance.isc.funds.transfer.transaction.FxtsssStructMapper;
import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo;
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: FxtsssResource
* @description: 即期售汇 Fxtsss 请求入口
* @author: huangshunlin
* @create: 2024-10-08 15:34
*/
@RestController
@RequestMapping("/fxtsss")
@Api("即期售汇")
public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo> {
@Resource
private FxtsssStructMapper fxtsssStructMapper;
public IStructMapper getStructMapper() {
return fxtsssStructMapper;
}
}
package com.brilliance.isc.fxtsss.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.FxtsssStoreBo;
import com.brilliance.isc.fxtsss.check.FxtsssValidator;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
/**
* @program: isc-funds
* @ClassName: FxtsssTransactionServiceImpl
* @description: 即期售汇 Fxtsss 业务处理
* @author: huangshunlin
* @create: 2024-10-08 15:35
*/
@Service("fxtsss.transaction")
public class FxtsssTransactionServiceImpl extends AbstractTransactionService<FxtsssStoreBo> {
@Resource
private FxtsssValidator fxtsssValidator;
@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(FxtsssStoreBo transactionVo) {
ruleMtabutSavN500(transactionVo);
}
public void ruleMtabutSavN500(FxtsssStoreBo bo) {
}
@Override
protected Map<String, String> txnCheck(FxtsssStoreBo transactionVo) {
return fxtsssValidator.validate(transactionVo);
}
@Override
protected BizInfoVo buildBizInfo(FxtsssStoreBo transactionVo) {
return null;
}
@Override
protected BizAmdInfoVo buildBizAmdInfo(FxtsssStoreBo transactionVo) {
return null;
}
@Override
public FxtsssStoreBo init(FxtsssStoreBo fxtsssStoreBo) {
fxtsssStoreBo.reset();
return fxtsssStoreBo;
}
@Override
public void beforeSave(FxtsssStoreBo transactionVo) {
transactionVo.reset();
}
@Override
protected void updateBizInfoVo(BizInfoVo bizInfoVo, FxtsssStoreBo transactionVo) {
}
}
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: FxtssbStoreBo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:25
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtssbStoreBo extends BaseTransactionVo {
}
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: FxtsssStoreBo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:51
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtsssStoreBo extends BaseTransactionVo {
}
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FxtssbStoreBo;
import com.brilliance.isc.funds.vo.funds.FxtssbStoreVo;
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: FxtssbStructMapper
* @description: 即期结汇转换Fxtssb Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: huangshunlin
* @create: 2024-10-08 15:27
*/
@Mapper(componentModel = "spring")
public interface FxtssbStructMapper extends IBaseStructMapper<FxtssbStoreBo, FxtssbStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtssbStructMapper INSTANCE = Mappers.getMapper(FxtssbStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtssbStoreBo voTransferToBo(FxtssbStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FxtssbStoreVo vo, @MappingTarget FxtssbStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtssbStoreVo boTransferToVo(FxtssbStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FxtssbStoreBo bo, @MappingTarget FxtssbStoreVo vo);
}
package com.brilliance.isc.funds.transfer.transaction;
import com.brilliance.isc.funds.bo.funds.FxtsssStoreBo;
import com.brilliance.isc.funds.vo.funds.FxtsssStoreVo;
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: FxtsssStructMapper
* @description: 即期结汇转换Fxtsss Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: huangshunlin
* @create: 2024-10-08 15:27
*/
@Mapper(componentModel = "spring")
public interface FxtsssStructMapper extends IBaseStructMapper<FxtsssStoreBo, FxtsssStoreVo> {
/**
* 此行语句一定要写,StructMapper需要
*/
FxtsssStructMapper INSTANCE = Mappers.getMapper(FxtsssStructMapper.class);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtsssStoreBo voTransferToBo(FxtsssStoreVo vo);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings({
})
void voUpdateToBo(FxtsssStoreVo vo, @MappingTarget FxtsssStoreBo bo);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtsssStoreVo boTransferToVo(FxtsssStoreBo bo);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void boUpdateToVo(FxtsssStoreBo bo, @MappingTarget FxtsssStoreVo vo);
}
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: FxtssbStoreVo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:26
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtssbStoreVo extends BaseTransactionVo {
}
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: FxtsssStoreVo
* @description: 即期售汇 bo
* @author: huangshunlin
* @create: 2024-10-08 15:26
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FxtsssStoreVo extends BaseTransactionVo {
}
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