Commit 6c9f37c0 by wangweidong

结售汇平盘登记基本框架

parent b7f88141
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) {
}
}
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.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.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 {
}
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