提交 48aaa2d8 authored 作者: jiangwenye's avatar jiangwenye

平台账号查询

上级 eb2e103b
......@@ -118,6 +118,8 @@ public enum PerformanceResultEnum implements ResultEnum {
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY(1915, "提现平台账户配置不唯一"),
PLATFORM_ACCOUNT_CONFIG_RECHARGE_IS_NULL(1916, "充值平台账户未配置"),
PLATFORM_ACCOUNT_CONFIG_RECHARGE_MANY(1917, "充值平台账户配置不唯一"),
PLATFORM_ACCOUNT_CONFIG_IS_NULL(1918, "平台账户未配置"),
PLATFORM_ACCOUNT_CONFIG_MANY(1919, "平台账户配置不唯一"),
;
private final int code;
private final String msg;
......
......@@ -22,15 +22,12 @@ public class SavePlatformAccountConfigParam {
@ApiModelProperty(value = "货主类型 1-企业,2-个人")
private Integer ownerType;
@NotNull(message = "开票标识不能为空")
@ApiModelProperty(value = "开票标识:1网运单 2普通单")
private Integer invoiceType;
@NotNull(message = "开票公司id不能为空")
@ApiModelProperty(value = "开票公司id")
private Integer invoiceCompanyId;
@NotBlank(message = "开票公司名称不能为空")
@ApiModelProperty(value = "开票公司名称")
private String invoiceCompanyName;
......
......@@ -23,10 +23,12 @@ import com.clx.performance.model.breakcontract.BreakContractOwnerRecord;
import com.clx.performance.model.breakcontract.BreakContractOwnerRule;
import com.clx.performance.model.breakcontract.BreakContractSettlementLog;
import com.clx.performance.model.breakcontract.BreakContractSettlementOwner;
import com.clx.performance.model.settle.SettlementOwner;
import com.clx.performance.model.settle.SettlementPlatformAccount;
import com.clx.performance.param.feign.OrderAdjustTonnageDownParam;
import com.clx.performance.param.pc.breakcontract.carrier.*;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.service.breakcontract.BreakContractOwnerRecordService;
import com.clx.performance.service.breakcontract.BreakContractSettlementLogService;
import com.clx.performance.service.breakcontract.BreakContractSettlementOwnerService;
......@@ -40,6 +42,7 @@ import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO;
import com.clx.performance.vo.pc.breakcontract.carrier.CarrierBreakContractSettlementLogVO;
import com.clx.performance.vo.pc.breakcontract.carrier.CarrierBreakContractSettlementOwnerDetailVO;
import com.clx.performance.vo.pc.breakcontract.carrier.PageCarrierBreakContractSettlementOwnerVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.performance.vo.pc.owner.settle.SettlementPlatformAccountVO;
import com.clx.user.vo.pc.owner.OwnerBindCardVO;
import com.msl.common.exception.ServiceSystemException;
......@@ -83,6 +86,7 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
private final BreakContractOwnerRecordService breakContractOwnerRecordService;
private final BreakContractOwnerRecordDao breakContractOwnerRecordDao;
private final OrderGoodsDao orderGoodsDao;
private final PlatformAccountConfigService platformAccountConfigService;
......@@ -383,15 +387,32 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
@Override
public SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(Integer id) {
//平台账号
SettlementPlatformAccount platformAccount = settlementPlatformAccountDao.getSettlementPlatformAccount();
//SettlementPlatformAccount platformAccount = settlementPlatformAccountDao.getSettlementPlatformAccount();
//返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
if(Objects.nonNull(platformAccount)){
/*if(Objects.nonNull(platformAccount)){
vo.setPaymentBankCardNo(platformAccount.getBankCardNo());
vo.setPaymentBankName(platformAccount.getBankName());
}
}*/
//货主账号
BreakContractSettlementOwner settlementOwner = breakContractSettlementOwnerDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.BREAK.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,
null,
PlatformAccountConfigEnum.ConfigRange.PAY.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.setPaymentBankCardNo(configs.get(0).getBankCardNo());
vo.setPaymentBankName(configs.get(0).getBankName());
OwnerBindCardVO card = ownerAccountService.getOwnerBindCard(settlementOwner.getOwnerUserNo());
if(Objects.nonNull(card)){
vo.setPayee(card.getName());
......
......@@ -11,6 +11,7 @@ import com.clx.performance.dao.settle.SettlementPlatformAccountDao;
import com.clx.performance.dto.InvoicingStatusNotifyDTO;
import com.clx.performance.enums.OrderChildLogEnum;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.enums.settle.*;
import com.clx.performance.model.settle.SettlementLog;
import com.clx.performance.model.settle.SettlementOwner;
......@@ -18,6 +19,7 @@ import com.clx.performance.model.settle.SettlementOwnerDetail;
import com.clx.performance.model.settle.SettlementPlatformAccount;
import com.clx.performance.param.pc.owner.*;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.service.settle.SettlementLogService;
import com.clx.performance.service.settle.SettlementMqHandlerService;
import com.clx.performance.service.settle.SettlementOwnerService;
......@@ -36,6 +38,7 @@ import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -75,6 +78,8 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
private final NetworkSyncComponent networkSyncComponent;
private final SettlementMqHandlerService settlementMqHandlerService;
private final PlatformAccountConfigService platformAccountConfigService;
@Override
......@@ -175,17 +180,35 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
@Override
public SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo){
//平台账号
/*//平台账号
SettlementPlatformAccount platformAccount = settlementPlatformAccountDao.getSettlementPlatformAccount();
//返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
if(Objects.nonNull(platformAccount)){
vo.setPaymentBankCardNo(platformAccount.getBankCardNo());
vo.setPaymentBankName(platformAccount.getBankName());
}*/
//返回对象
SettlementPlatformAccountVO vo = new SettlementPlatformAccountVO();
SettlementOwner settlementOwner = settlementOwnerDao.selectBySettlementNo(settlementNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.SETTLE.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
PlatformAccountConfigEnum.InvoiceType.ORDINARY.getCode(),
settlementOwner.getInvoicingCompanyId(),
PlatformAccountConfigEnum.ConfigRange.PAY.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.setPaymentBankCardNo(configs.get(0).getBankCardNo());
vo.setPaymentBankName(configs.get(0).getBankName());
//货主账号
SettlementOwner settlementOwner = settlementOwnerDao.selectBySettlementNo(settlementNo).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
OwnerBindCardVO card = ownerAccountService.getOwnerBindCard(settlementOwner.getOwnerUserNo());
if(Objects.nonNull(card)){
vo.setPayee(card.getName());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论