提交 b46c2f0f authored 作者: jiangwenye's avatar jiangwenye

增加开票公司信息

上级 003738ac
...@@ -62,6 +62,12 @@ public class OwnerSettlementOwnerController { ...@@ -62,6 +62,12 @@ public class OwnerSettlementOwnerController {
return Result.ok(settlementOwnerService.getSettlementPlatformAccount()); return Result.ok(settlementOwnerService.getSettlementPlatformAccount());
} }
@ApiOperation(value = "获取结算平台收款账号",notes = "<br>By:李瑞新")
@GetMapping("/getSettlementPlatformAccountById")
public Result<SettlementPlatformAccountVO> getSettlementPlatformAccountById(@NotNull(message = "id不能为空") Integer id) {
return Result.ok(settlementOwnerService.getSettlementPlatformAccountById(id));
}
@ApiOperation(value = "获取违约结算平台收款账号",notes = "<br>By:姜文业") @ApiOperation(value = "获取违约结算平台收款账号",notes = "<br>By:姜文业")
@GetMapping("/getBreakSettlementPlatformAccount") @GetMapping("/getBreakSettlementPlatformAccount")
public Result<SettlementPlatformAccountVO> getBreakSettlementPlatformAccount(@NotNull(message = "id不能为空") Integer id) { public Result<SettlementPlatformAccountVO> getBreakSettlementPlatformAccount(@NotNull(message = "id不能为空") Integer id) {
......
...@@ -184,18 +184,43 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService { ...@@ -184,18 +184,43 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
} }
@Override @Override
public SettlementPlatformAccountVO getBreakSettlementPlatformAccount(Integer id) { public SettlementPlatformAccountVO getSettlementPlatformAccountById(Integer id) {
//平台账号
//SettlementPlatformAccount platformAccount = settlementPlatformAccountDao.getSettlementPlatformAccount();
//返回对象 //返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO(); SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
/*if(Objects.nonNull(platformAccount)){ SettlementOwner settlementOwner = settlementOwnerDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
vo.setPayee(platformAccount.getCardHolder()); FeignOrderVO orderInfoFeign = orderFeign.getOrderInfoFeign(settlementOwner.getOrderNo());
vo.setPayeeBankCardNo(platformAccount.getBankCardNo());
vo.setPayeeBankName(platformAccount.getBankName()); List<CarrierPagePlatformAccountConfigVO> configs =
}*/ platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.SETTLE.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
settlementOwner.getInvoiceType(),
orderInfoFeign.getInvoicingCompanyId(),
PlatformAccountConfigEnum.ConfigRange.COLLECTION.getCode());
if(CollectionUtils.isEmpty(configs)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_IS_NULL);
}
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_MANY);
}
vo.setPayee(configs.get(0).getCompanyName());
vo.setPayeeBankCardNo(configs.get(0).getBankCardNo());
vo.setPayeeBankName(configs.get(0).getBankName());
//当前账号
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
OwnerBindCardVO card = ownerAccountService.getOwnerBindCard(loginUserInfo.getUserNo());
if(Objects.nonNull(card)){
vo.setPaymentBankCardNo(card.getOwnerBankAccount());
vo.setPaymentBankName(card.getOwnerAccountBank());
}
return vo;
}
@Override
public SettlementPlatformAccountVO getBreakSettlementPlatformAccount(Integer id) {
//返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
BreakContractSettlementOwner settlementOwner = breakContractSettlementOwnerDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); BreakContractSettlementOwner settlementOwner = breakContractSettlementOwnerDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
FeignOrderVO orderInfoFeign = orderFeign.getOrderInfoFeign(settlementOwner.getOrderNo()); FeignOrderVO orderInfoFeign = orderFeign.getOrderInfoFeign(settlementOwner.getOrderNo());
......
...@@ -21,6 +21,8 @@ public interface SettlementOwnerService { ...@@ -21,6 +21,8 @@ public interface SettlementOwnerService {
SettlementPlatformAccountVO getSettlementPlatformAccount(); SettlementPlatformAccountVO getSettlementPlatformAccount();
SettlementPlatformAccountVO getSettlementPlatformAccountById(Integer id);
SettlementPlatformAccountVO getBreakSettlementPlatformAccount(Integer id); SettlementPlatformAccountVO getBreakSettlementPlatformAccount(Integer id);
SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo); SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论