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

平台账号查询

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