提交 702fdf20 authored 作者: liuhaiquan's avatar liuhaiquan

Merge remote-tracking branch 'origin/v11.1_plat_acc_config_20240125'

# Conflicts: # performance-web/src/main/java/com/clx/performance/listener/OrderChildDtsListener.java # performance-web/src/main/java/com/clx/performance/service/impl/breakcontract/BreakContractSettlementOwnerServiceImpl.java # performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementOwnerServiceImpl.java
...@@ -115,6 +115,13 @@ public enum PerformanceResultEnum implements ResultEnum { ...@@ -115,6 +115,13 @@ public enum PerformanceResultEnum implements ResultEnum {
SLIDER_CHECK_FAIL(1911, "滑块验证错误"), SLIDER_CHECK_FAIL(1911, "滑块验证错误"),
ORDER_CHILD_SYNC_ERROR(1912, "承运同步网络货运异常"), ORDER_CHILD_SYNC_ERROR(1912, "承运同步网络货运异常"),
PLATFORM_ACCOUNT_CONFIG_ONLY(1913, "当前配置已存在"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_IS_NULL(1914, "提现平台账户未配置"),
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 int code;
private final String msg; private final String msg;
......
package com.clx.performance.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;
public enum PlatformAccountConfigEnum {
;
@Getter
@AllArgsConstructor
public enum InvoiceType {
ONLINE(1, "网运单"),
ORDINARY(2, "普通单");
private final Integer code;
private final String msg;
public static Optional<InvoiceType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findFirst();
}
public static String getMsgByCode(int code) {
return getByCode(code).map(InvoiceType::getMsg).orElse(null);
}
}
@Getter
@AllArgsConstructor
public enum BusinessType {
SETTLE(1, "结算单"),
BREAK(2, "违约结算单"),
RECHARGE(3, "充值"),
WITHDRAWAL(4, "提现");
private final Integer code;
private final String msg;
public static Optional<BusinessType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findFirst();
}
public static String getMsgByCode(int code) {
return getByCode(code).map(BusinessType::getMsg).orElse(null);
}
}
@Getter
@AllArgsConstructor
public enum OwnerType {
COMPANY(1, "企业"),
PERSON(2, "个人");
private final Integer code;
private final String msg;
public static Optional<OwnerType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findFirst();
}
public static String getMsgByCode(int code) {
return getByCode(code).map(OwnerType::getMsg).orElse(null);
}
}
@Getter
@AllArgsConstructor
public enum ConfigRange {
COLLECTION(1, "收款账户"),
PAY(2, "付款账户");
private final Integer code;
private final String msg;
public static Optional<ConfigRange> getByCode(int code) {
return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findFirst();
}
public static String getMsgByCode(int code) {
return getByCode(code).map(ConfigRange::getMsg).orElse(null);
}
}
}
package com.clx.performance.param.pc.carrier;
import com.msl.common.base.PageParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* @ClassName PageCarrierSettlementOwnerParam
* @Description
* @Author jiangwenye
* @Date 2024/01/25 13:25
* @Version 1.0
*/
@Getter
@Setter
public class PagePlatformAccountConfigParam extends PageParam {
@ApiModelProperty(value = "应用场景 1-结算单,2-违约结算单,3-充值,4-提现", example = "1")
private Integer businessType;
@ApiModelProperty(value = "货主类型 1-企业,2-个人", example = "2")
private Integer ownerType;
}
package com.clx.performance.param.pc.carrier;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Getter
@Setter
public class SavePlatformAccountConfigParam {
@ApiModelProperty(value = "id")
private Integer Id;
@NotNull(message = "应用场景不能为空")
@ApiModelProperty(value = "应用场景 1-结算单,2-违约结算单,3-充值,4-提现")
private Integer businessType;
@NotNull(message = "货主类型不能为空")
@ApiModelProperty(value = "货主类型 1-企业,2-个人")
private Integer ownerType;
@ApiModelProperty(value = "开票标识:1网运单 2普通单")
private Integer invoiceType;
@ApiModelProperty(value = "开票公司id")
private Integer invoiceCompanyId;
@ApiModelProperty(value = "开票公司名称")
private String invoiceCompanyName;
@NotNull(message = "配置范围不能为空")
@ApiModelProperty(value = "配置范围:1收款账户 2付款账户")
private Integer configRange;
@NotBlank(message = "公司名称不能为空")
@ApiModelProperty(value = "公司名称")
private String companyName;
@NotBlank(message = "银行名称不能为空")
@ApiModelProperty(value = "银行名称")
private String bankName;
@NotBlank(message = "开户行不能为空")
@ApiModelProperty(value = "开户行")
private String openBank;
@NotBlank(message = "银行编码不能为空")
@ApiModelProperty(value = "银行编码")
private String bankCode;
@NotBlank(message = "银行账号不能为空")
@ApiModelProperty(value = "银行账号")
private String bankCardNo;
}
package com.clx.performance.vo.pc.carrier.settle;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* @Description
* @Author jiangwenye
* @Date 2024/01/25 15:01
* @Version 1.0
*/
@Getter
@Setter
public class CarrierPagePlatformAccountConfigVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "应用场景 1-结算单,2-违约结算单,3-充值,4-提现")
private Integer businessType;
@ApiModelProperty(value = "应用场景")
private String businessTypeMsg;
@ApiModelProperty(value = "货主类型 1-企业,2-个人")
private Integer ownerType;
@ApiModelProperty(value = "货主类型")
private String ownerTypeMsg;
@ApiModelProperty(value = "开票标识:1网运单 2普通单")
private Integer invoiceType;
@ApiModelProperty(value = "开票标识")
private String invoiceTypeMsg;
@ApiModelProperty(value = "开票公司id")
private Integer invoiceCompanyId;
@ApiModelProperty(value = "开票公司名称")
private String invoiceCompanyName;
@ApiModelProperty(value = "配置范围:1收款账户 2付款账户")
private Integer configRange;
@ApiModelProperty(value = "配置范围")
private String configRangeMsg;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "银行名称")
private String bankName;
@ApiModelProperty(value = "开户行")
private String openBank;
@ApiModelProperty(value = "银行编码")
private String bankCode;
@ApiModelProperty(value = "银行账号")
private String bankCardNo;
@ApiModelProperty(value = "创建人编码")
private Long createUserNo;
@ApiModelProperty(value = "创建人姓名")
private String createUserName;
@ApiModelProperty(value = "修改人编码")
private Long modifiedUserNo;
@ApiModelProperty(value = "修改人姓名")
private String modifiedUserName;
@ApiModelProperty(value = "删除状态: 0-否;1-是")
private Integer deleteStatus;
@ApiModelProperty(value = "创建时间")
private String createTime;
@ApiModelProperty(value = "修改时间")
private String modifiedTime;
}
...@@ -54,4 +54,11 @@ public class CarrierPageSettlementOwnerVO { ...@@ -54,4 +54,11 @@ public class CarrierPageSettlementOwnerVO {
private Integer status; private Integer status;
@ApiModelProperty("结算方式 1装车净重 2卸车净重") @ApiModelProperty("结算方式 1装车净重 2卸车净重")
private Integer settlementWay; private Integer settlementWay;
@ApiModelProperty("开票公司简称")
private String invoicingCompanyShorterName;
@ApiModelProperty("开票公司统一社会信用代码")
private String invoicingCompanyGroupCode;
@ApiModelProperty("是否上报 0-否;1-是")
private Integer reportFlag;
} }
...@@ -153,5 +153,12 @@ public class CarrierSettlementOwnerDetailVO { ...@@ -153,5 +153,12 @@ public class CarrierSettlementOwnerDetailVO {
@ApiModelProperty(value = "结算单操作日志") @ApiModelProperty(value = "结算单操作日志")
private List<SettlementLogVO> settlementLogs; private List<SettlementLogVO> settlementLogs;
@ApiModelProperty("开票公司简称")
private String invoicingCompanyShorterName;
@ApiModelProperty("开票公司统一社会信用代码")
private String invoicingCompanyGroupCode;
@ApiModelProperty("是否上报 0-否;1-是")
private Integer reportFlag;
} }
\ No newline at end of file
...@@ -55,4 +55,13 @@ public class OwnerPageSettlementOwnerVO { ...@@ -55,4 +55,13 @@ public class OwnerPageSettlementOwnerVO {
@ApiModelProperty(value = "结算方式 1装车净重 2卸车净重") @ApiModelProperty(value = "结算方式 1装车净重 2卸车净重")
private Integer settlementWay; private Integer settlementWay;
@ApiModelProperty(value="开票公司id",example = "1")
private Integer invoicingCompanyId; //开票公司id
@ApiModelProperty(value="开票公司简称",example = "1")
private String invoicingCompanyShorterName; //开票公司简称
@ApiModelProperty(value="开票公司统一社会信用代码",example = "1")
private String invoicingCompanyGroupCode; //开票公司统一社会信用代码
@ApiModelProperty(value="是否上报 0-否;1-是",example = "1")
private Integer reportFlag; //是否上报 0-否;1-是
} }
...@@ -86,6 +86,15 @@ public class PageOwnerSettlementOwnerDetailVO { ...@@ -86,6 +86,15 @@ public class PageOwnerSettlementOwnerDetailVO {
private Integer settlementWay; private Integer settlementWay;
@ApiModelProperty(value="开票公司id",example = "1")
private Integer invoicingCompanyId; //开票公司id
@ApiModelProperty(value="开票公司简称",example = "1")
private String invoicingCompanyShorterName; //开票公司简称
@ApiModelProperty(value="开票公司统一社会信用代码",example = "1")
private String invoicingCompanyGroupCode; //开票公司统一社会信用代码
@ApiModelProperty(value="是否上报 0-否;1-是",example = "1")
private Integer reportFlag; //是否上报 0-否;1-是
@ApiModelProperty(value="创建时间",example = "2013-01-01 00:00:00") @ApiModelProperty(value="创建时间",example = "2013-01-01 00:00:00")
private String createTime; private String createTime;
......
...@@ -231,6 +231,7 @@ public class OrderGoodsStatusLazyComponent implements InitializingBean { ...@@ -231,6 +231,7 @@ public class OrderGoodsStatusLazyComponent implements InitializingBean {
// 到达货源地超时取消 // 到达货源地超时取消
orderChildPostService.arriveSendAddressTimeoutCancel(orderChild); orderChildPostService.arriveSendAddressTimeoutCancel(orderChild);
goodsOrderTruckRecordComponent.releaseDriverCard(orderGoodsNo, orderChild.getTruckNo());
} }
log.info("取消运单ID集合:{}", childNoList); log.info("取消运单ID集合:{}", childNoList);
if (CollectionUtil.isNotEmpty(childNoList)) { if (CollectionUtil.isNotEmpty(childNoList)) {
......
package com.clx.performance.controller.pc.carrier; package com.clx.performance.controller.pc.carrier;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.*; import com.clx.performance.param.pc.*;
import com.clx.performance.service.OwnerAccountService; import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.OwnerCaseOutService; import com.clx.performance.service.OwnerCaseOutService;
import com.clx.performance.service.OwnerTopUpService; import com.clx.performance.service.OwnerTopUpService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO; import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO; import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.OwnerCaseOutVO; import com.clx.performance.vo.pc.OwnerCaseOutVO;
import com.clx.performance.vo.pc.OwnerTopUpVO; import com.clx.performance.vo.pc.OwnerTopUpVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.user.param.pc.driver.truck.PageDriverTruckParam; import com.clx.user.param.pc.driver.truck.PageDriverTruckParam;
import com.msl.common.base.PageData; import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert; import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.result.Result; import com.msl.common.result.Result;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
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.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
...@@ -26,6 +33,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -26,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.util.List;
@Slf4j @Slf4j
...@@ -42,6 +50,8 @@ public class CarrierAccountController { ...@@ -42,6 +50,8 @@ public class CarrierAccountController {
private final OwnerCaseOutService ownerCaseOutService; private final OwnerCaseOutService ownerCaseOutService;
private final PlatformAccountConfigService platformAccountConfigService;
@ApiOperation(value = "查看资金管理列表(保证金和预付运费)", notes = "<br>By:胡宇帆") @ApiOperation(value = "查看资金管理列表(保证金和预付运费)", notes = "<br>By:胡宇帆")
@PostMapping("/pageList") @PostMapping("/pageList")
...@@ -115,4 +125,22 @@ public class CarrierAccountController { ...@@ -115,4 +125,22 @@ public class CarrierAccountController {
return Result.page(page.getRecords(), page.getTotal(), page.getPages()); return Result.page(page.getRecords(), page.getTotal(), page.getPages());
} }
@ApiOperation(value = "提现审批平台付款银行账号", notes = "<br>By:jiangwenye")
@GetMapping("/ownerCaseOutAccount")
@UnitCovert(param = false)
public Result<CarrierPagePlatformAccountConfigVO> ownerCaseOutAccount() {
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.WITHDRAWAL.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,null,null);
if(CollectionUtils.isEmpty(configs)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_IS_NULL);
}
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY);
}
return Result.ok(configs.get(0));
}
} }
package com.clx.performance.controller.pc.carrier;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.clx.performance.param.pc.carrier.SavePlatformAccountConfigParam;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.vo.pc.carrier.settle.*;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotNull;
@Slf4j
@RestController
@RequestMapping(value="/pc/carrier/platformAccountConfig")
@Validated
@Api(tags = "承运端-平台账户配置")
@AllArgsConstructor
public class PlatformAccountConfigController {
private final PlatformAccountConfigService platformAccountConfigService;
@ApiOperation(value = "平台账户配置列表",notes = "<br>By:姜文业")
@PostMapping("/pagePlatformAccountConfig")
@UnitCovert(param = false)
public Result<PageData<CarrierPagePlatformAccountConfigVO>> pagePlatformAccountConfig(@RequestBody @Validated PagePlatformAccountConfigParam param) {
IPage<CarrierPagePlatformAccountConfigVO> page = platformAccountConfigService.pagePlatformAccountConfig(param);
return Result.page(page.getRecords(),page.getTotal(),page.getPages());
}
@ApiOperation(value = "平台账户配置详情",notes = "<br>By:姜文业")
@GetMapping("/getPlatformAccountConfigDetail")
@UnitCovert(param = false)
public Result<CarrierPagePlatformAccountConfigVO> getPlatformAccountConfigDetail(@NotNull(message = "id不能为空") Integer id) {
return Result.ok(platformAccountConfigService.getPlatformAccountConfigDetail(id));
}
@ApiOperation(value = "删除平台账户配置",notes = "<br>By:姜文业")
@GetMapping("/deletePlatformAccountConfig")
@UnitCovert(param = false)
public Result<CarrierPagePlatformAccountConfigVO> deletePlatformAccountConfig(@NotNull(message = "id不能为空") Integer id) {
platformAccountConfigService.deletePlatformAccountConfig(id);
return Result.ok();
}
@ApiOperation(value = "新增平台账户配置",notes = "<br>By:姜文业")
@PostMapping("/savePlatformAccountConfig")
public Result savePlatformAccountConfig(@RequestBody @Validated SavePlatformAccountConfigParam param) {
platformAccountConfigService.savePlatformAccountConfig(param);
return Result.ok();
}
@ApiOperation(value = "编辑平台账户配置",notes = "<br>By:姜文业")
@PostMapping("/updatePlatformAccountConfig")
public Result updatePlatformAccountConfig(@RequestBody @Validated SavePlatformAccountConfigParam param) {
platformAccountConfigService.updatePlatformAccountConfig(param);
return Result.ok();
}
}
...@@ -62,6 +62,18 @@ public class OwnerSettlementOwnerController { ...@@ -62,6 +62,18 @@ 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:姜文业")
@GetMapping("/getBreakSettlementPlatformAccount")
public Result<SettlementPlatformAccountVO> getBreakSettlementPlatformAccount(@NotNull(message = "id不能为空") Integer id) {
return Result.ok(settlementOwnerService.getBreakSettlementPlatformAccount(id));
}
@ApiOperation(value = "付款接口",notes = "<br>By:李瑞新") @ApiOperation(value = "付款接口",notes = "<br>By:李瑞新")
@PostMapping("/updatePaymentSettlement") @PostMapping("/updatePaymentSettlement")
public Result updatePaymentSettlement(@RequestBody @Validated OwnerPaymentSettlementParam param) { public Result updatePaymentSettlement(@RequestBody @Validated OwnerPaymentSettlementParam param) {
......
package com.clx.performance.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.mapper.PlatformAccountConfigMapper;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.msl.common.dao.BaseDao;
import java.util.List;
public interface PlatformAccountConfigDao extends BaseDao<PlatformAccountConfigMapper, PlatformAccountConfig, Integer> {
IPage<PlatformAccountConfig> pagePlatformAccountConfig(PagePlatformAccountConfigParam param);
boolean deletePlatformAccountConfig(Integer id);
boolean updatePlatformAccountConfig(PlatformAccountConfig platformAccountConfig);
List<PlatformAccountConfig> checkPlatformAccountConfigOnly(PlatformAccountConfig config);
List<PlatformAccountConfig> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange);
}
package com.clx.performance.dao.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.order.enums.DeleteStatusEnum;
import com.clx.performance.dao.PlatformAccountConfigDao;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.mapper.PlatformAccountConfigMapper;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Objects;
/**
* @Author: 姜文业
* @Description: 平台账户配置
* @Date: 2024-01-25 18:04:09
* @Version: 1.0
*/
@Repository
public class PlatformAccountConfigImpl extends BaseDaoImpl<PlatformAccountConfigMapper, PlatformAccountConfig, Integer> implements PlatformAccountConfigDao {
@Override
public IPage<PlatformAccountConfig> pagePlatformAccountConfig(PagePlatformAccountConfigParam param) {
LambdaQueryWrapper<PlatformAccountConfig> query = new LambdaQueryWrapper<>();
query.eq(PlatformAccountConfig :: getDeleteStatus, DeleteStatusEnum.NO.getCode());
if(Objects.nonNull(param.getBusinessType())){
query.eq(PlatformAccountConfig :: getBusinessType,param.getBusinessType());
}
if(Objects.nonNull(param.getOwnerType())){
query.eq(PlatformAccountConfig :: getOwnerType,param.getOwnerType());
}
query.orderByDesc(PlatformAccountConfig :: getModifiedTime);
return baseMapper.selectPage(Page.of(param.getPage(),param.getPageSize()),query);
}
@Override
public boolean deletePlatformAccountConfig(Integer id) {
return update(lUdWrapper()
.eq(PlatformAccountConfig::getId, id)
.set(PlatformAccountConfig::getDeleteStatus, DeleteStatusEnum.YES.getCode())
);
}
@Override
public boolean updatePlatformAccountConfig(PlatformAccountConfig config) {
return update(lUdWrapper()
.eq(PlatformAccountConfig::getId, config.getId())
.set(PlatformAccountConfig::getBusinessType, config.getBusinessType())
.set(PlatformAccountConfig::getOwnerType, config.getOwnerType())
.set(PlatformAccountConfig::getInvoiceType, config.getInvoiceType())
.set(PlatformAccountConfig::getInvoiceCompanyId, config.getInvoiceCompanyId())
.set(PlatformAccountConfig::getInvoiceCompanyName, config.getInvoiceCompanyName())
.set(PlatformAccountConfig::getConfigRange, config.getConfigRange())
.set(PlatformAccountConfig::getCompanyName, config.getCompanyName())
.set(PlatformAccountConfig::getBankName, config.getBankName())
.set(PlatformAccountConfig::getOpenBank, config.getOpenBank())
.set(PlatformAccountConfig::getBankCode, config.getBankCode())
.set(PlatformAccountConfig::getBankCardNo, config.getBankCardNo())
.set(PlatformAccountConfig::getModifiedUserNo, config.getModifiedUserNo())
.set(PlatformAccountConfig::getModifiedUserName, config.getModifiedUserName())
);
}
@Override
public List<PlatformAccountConfig> checkPlatformAccountConfigOnly(PlatformAccountConfig config) {
LambdaQueryWrapper<PlatformAccountConfig> query = new LambdaQueryWrapper<>();
query.eq(PlatformAccountConfig :: getDeleteStatus, DeleteStatusEnum.NO.getCode());
if(Objects.equals(config.getBusinessType(), PlatformAccountConfigEnum.BusinessType.SETTLE.getCode())){
query.eq(PlatformAccountConfig :: getBusinessType, config.getBusinessType());
query.eq(PlatformAccountConfig :: getOwnerType, config.getOwnerType());
query.eq(PlatformAccountConfig :: getInvoiceType, config.getInvoiceType());
query.eq(PlatformAccountConfig :: getInvoiceCompanyId, config.getInvoiceCompanyId());
query.eq(PlatformAccountConfig :: getConfigRange, config.getConfigRange());
}
if(Objects.equals(config.getBusinessType(), PlatformAccountConfigEnum.BusinessType.BREAK.getCode())){
query.eq(PlatformAccountConfig :: getBusinessType, config.getBusinessType());
query.eq(PlatformAccountConfig :: getOwnerType, config.getOwnerType());
query.eq(PlatformAccountConfig :: getInvoiceCompanyId, config.getInvoiceCompanyId());
query.eq(PlatformAccountConfig :: getConfigRange, config.getConfigRange());
}
if(Objects.equals(config.getBusinessType(), PlatformAccountConfigEnum.BusinessType.RECHARGE.getCode())){
query.eq(PlatformAccountConfig :: getBusinessType, config.getBusinessType());
query.eq(PlatformAccountConfig :: getOwnerType, config.getOwnerType());
}
if(Objects.equals(config.getBusinessType(), PlatformAccountConfigEnum.BusinessType.WITHDRAWAL.getCode())){
query.eq(PlatformAccountConfig :: getBusinessType, config.getBusinessType());
query.eq(PlatformAccountConfig :: getOwnerType, config.getOwnerType());
}
return baseMapper.selectList(query);
}
@Override
public List<PlatformAccountConfig> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange){
LambdaQueryWrapper<PlatformAccountConfig> query = new LambdaQueryWrapper<>();
query.eq(PlatformAccountConfig :: getDeleteStatus, DeleteStatusEnum.NO.getCode());
if(Objects.nonNull(businessType)){
query.eq(PlatformAccountConfig :: getBusinessType, businessType);
}
if(Objects.nonNull(ownerType)){
query.eq(PlatformAccountConfig :: getOwnerType, ownerType);
}
if(Objects.nonNull(invoiceCompanyId)){
query.eq(PlatformAccountConfig :: getInvoiceCompanyId, invoiceCompanyId);
}
if(Objects.nonNull(configRange)){
query.eq(PlatformAccountConfig :: getConfigRange, configRange);
}
if(Objects.nonNull(invoiceType)){
query.eq(PlatformAccountConfig :: getInvoiceType, invoiceType);
}
return baseMapper.selectList(query);
}
}
...@@ -36,20 +36,10 @@ import java.util.Optional; ...@@ -36,20 +36,10 @@ import java.util.Optional;
@Component @Component
@AllArgsConstructor @AllArgsConstructor
public class OrderChildDtsListener { public class OrderChildDtsListener {
@Autowired
private final MslAppConfig mslAppConfig; private final MslAppConfig mslAppConfig;
private final OrderFeign orderFeign;
private final LastTruckService lastTruckService;
@Autowired private final DriverService driverService;
private OrderFeign orderFeign;
@Autowired
LastTruckService lastTruckService;
@Autowired
OrderChildStruct orderChildStruct;
@Autowired
private DriverService driverService;
@RabbitListener(queues = RabbitKeyConstants.CLX_PERFORMANCE_ORDER_CHILD_QUEUE) @RabbitListener(queues = RabbitKeyConstants.CLX_PERFORMANCE_ORDER_CHILD_QUEUE)
...@@ -65,19 +55,19 @@ public class OrderChildDtsListener { ...@@ -65,19 +55,19 @@ public class OrderChildDtsListener {
if(Objects.equals(DtsOperationTypeEnum.INSERT.getCode(),dataTransportDTO.getOperationType().getCode())){ if(Objects.equals(DtsOperationTypeEnum.INSERT.getCode(),dataTransportDTO.getOperationType().getCode())){
//同步after数据 //同步after数据
log.info("新增:{}"+after); log.info("新增:{}",after);
if(OrderChildEnum.SYNC_STATUS_lIST.contains(after.getStatus()) && !Objects.equals(before.getStatus(),after.getStatus())){ if(OrderChildEnum.SYNC_STATUS_lIST.contains(after.getStatus()) && !Objects.equals(before.getStatus(),after.getStatus())){
orderChildChangeAfter(after); orderChildChangeAfter(after);
} }
}else if(Objects.equals(DtsOperationTypeEnum.UPDATE.getCode(),dataTransportDTO.getOperationType().getCode())){ }else if(Objects.equals(DtsOperationTypeEnum.UPDATE.getCode(),dataTransportDTO.getOperationType().getCode())){
log.info("修改:{}"+after); log.info("修改:{}",after);
if(OrderChildEnum.SYNC_STATUS_lIST.contains(after.getStatus()) && if(OrderChildEnum.SYNC_STATUS_lIST.contains(after.getStatus()) &&
(!Objects.equals(before.getStatus(),after.getStatus()) || !Objects.equals(before.getLoadNet(),after.getLoadNet()))){ (!Objects.equals(before.getStatus(),after.getStatus()) || !Objects.equals(before.getLoadNet(),after.getLoadNet()))){
orderChildChangeAfter(after); orderChildChangeAfter(after);
} }
}else if(Objects.equals(DtsOperationTypeEnum.DELETE.getCode(),dataTransportDTO.getOperationType().getCode())){ }else if(Objects.equals(DtsOperationTypeEnum.DELETE.getCode(),dataTransportDTO.getOperationType().getCode())){
//数据删除 //数据删除
log.info("删除:{}"+before); log.info("删除:{}",before);
} }
} catch (Exception e) { } catch (Exception e) {
......
package com.clx.performance.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clx.performance.model.PlatformAccountConfig;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface PlatformAccountConfigMapper extends BaseMapper<PlatformAccountConfig> {
}
package com.clx.performance.model; package com.clx.performance.model;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn; import com.msl.common.config.KeyColumn;
...@@ -92,7 +93,12 @@ public class OrderChild implements HasKey<Integer> { ...@@ -92,7 +93,12 @@ public class OrderChild implements HasKey<Integer> {
private Integer settlementAccountPeriod; //结算账期 1拉运完成结 2月结 private Integer settlementAccountPeriod; //结算账期 1拉运完成结 2月结
private Integer settlementWay; //结算方式 1装车净重 2卸车净重 private Integer settlementWay; //结算方式 1装车净重
private Integer invoicingCompanyId; //开票公司id
private String invoicingCompanyShorterName; //开票公司简称
private String invoicingCompanyGroupCode; //开票公司统一社会信用代码
private Integer reportFlag; //是否上报 0-否;1-是
private LocalDateTime createTime; //创建时间 private LocalDateTime createTime; //创建时间
private LocalDateTime modifiedTime; //修改时间 private LocalDateTime modifiedTime; //修改时间
......
package com.clx.performance.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import lombok.*;
import java.time.LocalDateTime;
/**
* @Author: jiangwenye
* @Description: 平台账户配置
* @Date: 2024/01/25 17:46:48
* @Version: 1.0
*/
@Getter
@Setter
@NoArgsConstructor
@TableName(autoResultMap = true)
@Builder
@AllArgsConstructor
public class PlatformAccountConfig implements HasKey<Integer> {
@TableId(value = "id", type = IdType.AUTO)
private Integer id; //id
private Integer businessType; //应用场景 1-结算单,2-违约结算单,3-充值,4-提现
private Integer ownerType; //货主类型 1-企业,2-个人
private Integer invoiceType; //开票标识:1网运单 2普通单
private Integer invoiceCompanyId; //开票公司id
private String invoiceCompanyName; //开票公司名称
private Integer configRange; //配置范围:1收款账户 2付款账户
private String companyName; //公司名称
private String bankName; //银行名称
private String openBank; //开户行
private String bankCode; //银行编码
private String bankCardNo; //银行账号
private Long createUserNo; //创建人编码
private String createUserName; //创建人姓名
private Long modifiedUserNo; //修改人编码
private String modifiedUserName; //修改人姓名
private Integer deleteStatus; //删除状态: 0-否;1-是
private LocalDateTime createTime; //创建时间
private LocalDateTime modifiedTime; //修改时间
@KeyColumn("id")
@Override
public Integer gainKey() {
return id;
}
}
...@@ -68,6 +68,10 @@ public class SettlementOwner implements HasKey<Integer> { ...@@ -68,6 +68,10 @@ public class SettlementOwner implements HasKey<Integer> {
private Integer mergeStatus; //是否合并 0-否,1-是 private Integer mergeStatus; //是否合并 0-否,1-是
private Integer mergeSettlementFlag; //合并结算单标志 1:普通结算单 2:合并结算单 private Integer mergeSettlementFlag; //合并结算单标志 1:普通结算单 2:合并结算单
private String mergedBy; //合并人 private String mergedBy; //合并人
private Integer invoicingCompanyId; //开票公司id
private String invoicingCompanyShorterName; //开票公司简称
private String invoicingCompanyGroupCode; //开票公司统一社会信用代码
private Integer reportFlag; //是否上报 0-否;1-是
private LocalDateTime mergeTime; //合并结算单时间 private LocalDateTime mergeTime; //合并结算单时间
private LocalDateTime createTime; //创建时间 private LocalDateTime createTime; //创建时间
private LocalDateTime modifiedTime; //修改时间 private LocalDateTime modifiedTime; //修改时间
......
...@@ -53,6 +53,10 @@ public class SettlementOwnerDetail implements HasKey<Integer> { ...@@ -53,6 +53,10 @@ public class SettlementOwnerDetail implements HasKey<Integer> {
private Integer invoiceType; //开票标识:1网运单 2普通单 private Integer invoiceType; //开票标识:1网运单 2普通单
private Integer finalPaymentStatus; //尾款状态 0-否,1-是,2-无需支付 private Integer finalPaymentStatus; //尾款状态 0-否,1-是,2-无需支付
private Integer invoiceStatus; //开票状态 0-否,1-是,2-无需开票 private Integer invoiceStatus; //开票状态 0-否,1-是,2-无需开票
private Integer invoicingCompanyId; //开票公司id
private String invoicingCompanyShorterName; //开票公司简称
private String invoicingCompanyGroupCode; //开票公司统一社会信用代码
private Integer reportFlag; //是否上报 0-否;1-是
private Integer status; //状态 private Integer status; //状态
private LocalDateTime createTime; //创建时间 private LocalDateTime createTime; //创建时间
private LocalDateTime modifiedTime; //修改时间 private LocalDateTime modifiedTime; //修改时间
......
package com.clx.performance.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.clx.performance.param.pc.carrier.SavePlatformAccountConfigParam;
import com.clx.performance.vo.pc.carrier.settle.*;
import java.util.List;
/**
* @author jiangwenye
* Date 2024-01-25
* Time 09:43
*/
public interface PlatformAccountConfigService {
IPage<CarrierPagePlatformAccountConfigVO> pagePlatformAccountConfig(PagePlatformAccountConfigParam param);
CarrierPagePlatformAccountConfigVO getPlatformAccountConfigDetail(Integer id);
void deletePlatformAccountConfig(Integer id);
void savePlatformAccountConfig(SavePlatformAccountConfigParam param);
void updatePlatformAccountConfig(SavePlatformAccountConfigParam config);
List<CarrierPagePlatformAccountConfigVO> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange);
}
...@@ -389,6 +389,12 @@ public class OrderChildServiceImpl implements OrderChildService { ...@@ -389,6 +389,12 @@ public class OrderChildServiceImpl implements OrderChildService {
orderChild.setSettlementAccountPeriod(orderGoods.getSettlementAccountPeriod()); orderChild.setSettlementAccountPeriod(orderGoods.getSettlementAccountPeriod());
orderChild.setSettlementWay(orderGoods.getSettlementWay()); orderChild.setSettlementWay(orderGoods.getSettlementWay());
//设置开票公司信息
orderChild.setInvoicingCompanyId(orderInfo.getInvoicingCompanyId());
orderChild.setInvoicingCompanyShorterName(orderInfo.getInvoicingCompanyShorterName());
orderChild.setInvoicingCompanyGroupCode(orderInfo.getInvoicingCompanyGroupCode());
orderChild.setReportFlag(orderInfo.getReportFlag());
// 更新货单数据 // 更新货单数据
updateOrderGoodsAmount(orderGoods, orderChild); updateOrderGoodsAmount(orderGoods, orderChild);
......
...@@ -18,6 +18,7 @@ import com.clx.performance.dao.*; ...@@ -18,6 +18,7 @@ import com.clx.performance.dao.*;
import com.clx.performance.enums.IdTypeEnum; import com.clx.performance.enums.IdTypeEnum;
import com.clx.performance.enums.OwnerAccountEnum; import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.enums.PerformanceResultEnum; import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.extranal.user.OwnerInfoService; import com.clx.performance.extranal.user.OwnerInfoService;
import com.clx.performance.model.*; import com.clx.performance.model.*;
import com.clx.performance.param.app.CheckMobileParam; import com.clx.performance.param.app.CheckMobileParam;
...@@ -32,6 +33,7 @@ import com.clx.performance.param.pc.owner.CreteAccountParam; ...@@ -32,6 +33,7 @@ import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam; import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam; import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OwnerAccountService; import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.struct.OwnerAccountStruct; import com.clx.performance.struct.OwnerAccountStruct;
import com.clx.performance.utils.MyMD5Util; import com.clx.performance.utils.MyMD5Util;
import com.clx.performance.utils.excel.ExcelData; import com.clx.performance.utils.excel.ExcelData;
...@@ -41,6 +43,7 @@ import com.clx.performance.utils.excel.ExcelUtil; ...@@ -41,6 +43,7 @@ import com.clx.performance.utils.excel.ExcelUtil;
import com.clx.performance.vo.pc.OwnerAccountAllVO; import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO; import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO; import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.user.enums.owner.FreezeSettingEnum; import com.clx.user.enums.owner.FreezeSettingEnum;
import com.clx.user.feign.OwnerFeign; import com.clx.user.feign.OwnerFeign;
import com.clx.user.feign.OwnerInfoFeign; import com.clx.user.feign.OwnerInfoFeign;
...@@ -55,6 +58,7 @@ import com.msl.user.data.UserSessionData; ...@@ -55,6 +58,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.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.amqp.core.Message; import org.springframework.amqp.core.Message;
...@@ -111,6 +115,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -111,6 +115,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private final OwnerInfoService ownerInfoService; private final OwnerInfoService ownerInfoService;
private final PlatformAccountConfigService platformAccountConfigService;
@Override @Override
public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) { public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) {
return ownerAccountDao.pageList(param); return ownerAccountDao.pageList(param);
...@@ -615,7 +621,26 @@ public class OwnerAccountServiceImpl implements OwnerAccountService { ...@@ -615,7 +621,26 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override @Override
public OwnerTransferInfo transferPublic() { public OwnerTransferInfo transferPublic() {
return ownerTransferInfoDao.getEntityByKey(1).orElse(null); List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.RECHARGE.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,null,null);
if(CollectionUtils.isEmpty(configs)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_RECHARGE_IS_NULL);
}
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_RECHARGE_MANY);
}
OwnerTransferInfo info = new OwnerTransferInfo();
CarrierPagePlatformAccountConfigVO vo = configs.get(0);
info.setAccountNumber(vo.getBankCardNo());
info.setOpenAccountBank(vo.getOpenBank());
info.setOpenAccountBankNumber(vo.getBankCode());
info.setEnterpriseName(vo.getCompanyName());
return info;
//return ownerTransferInfoDao.getEntityByKey(1).orElse(null);
} }
@Override @Override
......
package com.clx.performance.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.order.enums.DeleteStatusEnum;
import com.clx.performance.dao.PlatformAccountConfigDao;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.clx.performance.param.pc.carrier.SavePlatformAccountConfigParam;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.struct.PlatformAccountConfigStruct;
import com.clx.performance.vo.pc.carrier.settle.*;
import com.msl.common.exception.ServiceSystemException;
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.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* @author jiangwenye
* Date 2024-01-25
* Time 09:43
*/
@Slf4j
@Service
@AllArgsConstructor
public class PlatformAccountConfigServiceImpl implements PlatformAccountConfigService {
private final PlatformAccountConfigDao platformAccountConfigDao;
private final PlatformAccountConfigStruct platformAccountConfigStruct;
@Override
public IPage<CarrierPagePlatformAccountConfigVO> pagePlatformAccountConfig(PagePlatformAccountConfigParam param) {
IPage<PlatformAccountConfig> page = platformAccountConfigDao.pagePlatformAccountConfig(param);
List<CarrierPagePlatformAccountConfigVO> list = platformAccountConfigStruct.convertToVOList(page.getRecords());
return new Page<CarrierPagePlatformAccountConfigVO>().setRecords(list).setTotal(page.getTotal()).setPages(page.getPages());
}
@Override
public CarrierPagePlatformAccountConfigVO getPlatformAccountConfigDetail(Integer id) {
//结算单详情
PlatformAccountConfig platformAccountConfig =platformAccountConfigDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
CarrierPagePlatformAccountConfigVO detail = platformAccountConfigStruct.convertToDetail(platformAccountConfig);
return detail;
}
@Override
public void deletePlatformAccountConfig(Integer id) {
platformAccountConfigDao.deletePlatformAccountConfig(id);
}
@Override
public void updatePlatformAccountConfig(SavePlatformAccountConfigParam param) {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
PlatformAccountConfig config = new PlatformAccountConfig();
config.setId(param.getId());
config.setBusinessType(param.getBusinessType());
config.setOwnerType(param.getOwnerType());
config.setInvoiceType(param.getInvoiceType());
config.setInvoiceCompanyId(param.getInvoiceCompanyId());
config.setInvoiceCompanyName(param.getInvoiceCompanyName());
config.setConfigRange(param.getConfigRange());
config.setCompanyName(param.getCompanyName());
config.setBankName(param.getBankName());
config.setOpenBank(param.getOpenBank());
config.setBankCode(param.getBankCode());
config.setBankCardNo(param.getBankCardNo());
config.setModifiedUserNo(loginUserInfo.getUserNo());
config.setModifiedUserName(loginUserInfo.getUserName());
if(!checkConfigOnly(config)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_ONLY);
}
platformAccountConfigDao.updatePlatformAccountConfig(config);
}
@Override
public void savePlatformAccountConfig(SavePlatformAccountConfigParam param){
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
PlatformAccountConfig config = new PlatformAccountConfig();
config.setBusinessType(param.getBusinessType());
config.setOwnerType(param.getOwnerType());
config.setInvoiceType(param.getInvoiceType());
config.setInvoiceCompanyId(param.getInvoiceCompanyId());
config.setInvoiceCompanyName(param.getInvoiceCompanyName());
config.setConfigRange(param.getConfigRange());
config.setCompanyName(param.getCompanyName());
config.setBankName(param.getBankName());
config.setOpenBank(param.getOpenBank());
config.setBankCode(param.getBankCode());
config.setBankCardNo(param.getBankCardNo());
config.setDeleteStatus(DeleteStatusEnum.NO.getCode());
config.setCreateUserNo(loginUserInfo.getUserNo());
config.setCreateUserName(loginUserInfo.getUserName());
if(!checkConfigOnly(config)){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_ONLY);
}
platformAccountConfigDao.saveEntity(config);
}
public boolean checkConfigOnly(PlatformAccountConfig config){
List<PlatformAccountConfig> checkList = platformAccountConfigDao.checkPlatformAccountConfigOnly(config);
if(CollectionUtils.isNotEmpty(checkList)){
if(checkList.size() > 1){
return false;
}
PlatformAccountConfig check = checkList.get(0);
if(!Objects.equals(check.getId(),config.getId())){
return false;
}
}
return true;
}
@Override
public List<CarrierPagePlatformAccountConfigVO> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange){
List<PlatformAccountConfig> configs = platformAccountConfigDao.getPlatformAccountConfigByType( businessType, ownerType, invoiceType, invoiceCompanyId, configRange);
List<CarrierPagePlatformAccountConfigVO> list = platformAccountConfigStruct.convertToVOList(configs);
return list;
}
}
...@@ -44,7 +44,7 @@ public class BreakContractJobHandlerServiceImpl implements BreakContractJobHandl ...@@ -44,7 +44,7 @@ public class BreakContractJobHandlerServiceImpl implements BreakContractJobHandl
String msg = null; String msg = null;
BreakContractSettlementDriver breakContractSettlementDriver = breakContractSettlementDriverDao.getEntityByKey(settlementId).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); BreakContractSettlementDriver breakContractSettlementDriver = breakContractSettlementDriverDao.getEntityByKey(settlementId).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
if (Objects.equals(breakContractSettlementDriver.getSettleStatus(), BreakContractSettlementDriverEnum.SettleStatus.YES.getMsg())){ if (Objects.equals(breakContractSettlementDriver.getSettleStatus(), BreakContractSettlementDriverEnum.SettleStatus.YES.getCode())){
return msg; return msg;
} }
......
...@@ -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;
...@@ -41,6 +43,7 @@ import com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO; ...@@ -41,6 +43,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;
...@@ -85,6 +88,7 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe ...@@ -85,6 +88,7 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe
private final BreakContractOwnerRecordDao breakContractOwnerRecordDao; private final BreakContractOwnerRecordDao breakContractOwnerRecordDao;
private final OrderGoodsDao orderGoodsDao; private final OrderGoodsDao orderGoodsDao;
private final OwnerAccountPasswordDao ownerAccountPasswordDao; private final OwnerAccountPasswordDao ownerAccountPasswordDao;
private final PlatformAccountConfigService platformAccountConfigService;
...@@ -396,15 +400,33 @@ public class BreakContractSettlementOwnerServiceImpl implements BreakContractSe ...@@ -396,15 +400,33 @@ 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);
FeignOrderVO orderInfoFeign = orderFeign.getOrderInfoFeign(settlementOwner.getOrderNo());
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.BREAK.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,
orderInfoFeign.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());
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());
......
package com.clx.performance.service.impl.settle; package com.clx.performance.service.impl.settle;
import com.clx.order.vo.feign.FeignOrderInfoVO;
import com.clx.performance.config.MslPaymentConfig; import com.clx.performance.config.MslPaymentConfig;
import com.clx.performance.constant.RedissonConstants; import com.clx.performance.constant.RedissonConstants;
import com.clx.performance.dao.OrderChildDao; import com.clx.performance.dao.OrderChildDao;
...@@ -17,6 +18,7 @@ import com.clx.performance.enums.settle.SettlementLogEnum; ...@@ -17,6 +18,7 @@ import com.clx.performance.enums.settle.SettlementLogEnum;
import com.clx.performance.enums.settle.SettlementOwnerEnum; import com.clx.performance.enums.settle.SettlementOwnerEnum;
import com.clx.performance.enums.settle.SettlementPlatformEnum; import com.clx.performance.enums.settle.SettlementPlatformEnum;
import com.clx.performance.extranal.user.DriverService; import com.clx.performance.extranal.user.DriverService;
import com.clx.performance.extranal.user.OrderService;
import com.clx.performance.extranal.user.OwnerInfoService; import com.clx.performance.extranal.user.OwnerInfoService;
import com.clx.performance.model.OrderChild; import com.clx.performance.model.OrderChild;
import com.clx.performance.model.OrderGoods; import com.clx.performance.model.OrderGoods;
...@@ -103,6 +105,10 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic ...@@ -103,6 +105,10 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
@Autowired @Autowired
private OrderChildSyncTransportRecordService childSyncTransportRecordService; private OrderChildSyncTransportRecordService childSyncTransportRecordService;
@Autowired
private OrderService orderService;
...@@ -293,6 +299,8 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic ...@@ -293,6 +299,8 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
private String settlementPeriodMonthInit(SettlementOwnerDetail settlementOwnerDetail, LocalDateTime settlementPeriodTime,OwnerInfoFeignVO ownerInfo){ private String settlementPeriodMonthInit(SettlementOwnerDetail settlementOwnerDetail, LocalDateTime settlementPeriodTime,OwnerInfoFeignVO ownerInfo){
FeignOrderInfoVO orderInfo = orderService.getOrderInfo(settlementOwnerDetail.getOrderNo()).orElseThrow(PerformanceResultEnum.ORDER_INVALID);
//获取所有detail //获取所有detail
SettlementOwner settlementOwner = new SettlementOwner(); SettlementOwner settlementOwner = new SettlementOwner();
...@@ -331,6 +339,11 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic ...@@ -331,6 +339,11 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwner.setCompanyContactMobile(ownerInfo.getContactsTelephone()); settlementOwner.setCompanyContactMobile(ownerInfo.getContactsTelephone());
settlementOwner.setCompanyContactAddress(ownerInfo.getContactsAddress()); settlementOwner.setCompanyContactAddress(ownerInfo.getContactsAddress());
settlementOwner.setSettlementWay(settlementOwnerDetail.getSettlementWay()); settlementOwner.setSettlementWay(settlementOwnerDetail.getSettlementWay());
//设置开票公司
settlementOwner.setInvoicingCompanyId(orderInfo.getInvoicingCompanyId());
settlementOwner.setInvoicingCompanyShorterName(orderInfo.getInvoicingCompanyShorterName());
settlementOwner.setInvoicingCompanyGroupCode(orderInfo.getInvoicingCompanyGroupCode());
settlementOwner.setReportFlag(orderInfo.getReportFlag());
settlementOwnerDao.saveEntity(settlementOwner); settlementOwnerDao.saveEntity(settlementOwner);
//保存结算单日志----创建结算单 //保存结算单日志----创建结算单
...@@ -373,6 +386,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic ...@@ -373,6 +386,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
* 拉运完成结 初始化 * 拉运完成结 初始化
*/ */
private String settlementPeriodImmediateInit(SettlementOwnerDetail settlementOwnerDetail,OwnerInfoFeignVO ownerInfo){ private String settlementPeriodImmediateInit(SettlementOwnerDetail settlementOwnerDetail,OwnerInfoFeignVO ownerInfo){
FeignOrderInfoVO orderInfo = orderService.getOrderInfo(settlementOwnerDetail.getOrderNo()).orElseThrow(PerformanceResultEnum.ORDER_INVALID);
SettlementOwner settlementOwner = new SettlementOwner(); SettlementOwner settlementOwner = new SettlementOwner();
String settlementNo = settlementNoGenerate(); String settlementNo = settlementNoGenerate();
...@@ -409,6 +425,11 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic ...@@ -409,6 +425,11 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwner.setSettlementWay(settlementOwnerDetail.getSettlementWay()); settlementOwner.setSettlementWay(settlementOwnerDetail.getSettlementWay());
settlementOwner.setInvoiceStatus(SettlementOwnerEnum.InvoiceStatus.NOT_INVOICE.getCode()); settlementOwner.setInvoiceStatus(SettlementOwnerEnum.InvoiceStatus.NOT_INVOICE.getCode());
//设置开票公司
settlementOwner.setInvoicingCompanyId(orderInfo.getInvoicingCompanyId());
settlementOwner.setInvoicingCompanyShorterName(orderInfo.getInvoicingCompanyShorterName());
settlementOwner.setInvoicingCompanyGroupCode(orderInfo.getInvoicingCompanyGroupCode());
settlementOwner.setReportFlag(orderInfo.getReportFlag());
settlementOwnerDao.saveEntity(settlementOwner); settlementOwnerDao.saveEntity(settlementOwner);
//保存结算单日志----创建结算单 //保存结算单日志----创建结算单
......
...@@ -144,8 +144,12 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS ...@@ -144,8 +144,12 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS
// //
settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO.getCode()); settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO.getCode());
//设置开票公司信息
settlementOwnerDetail.setInvoicingCompanyId(orderChild.getInvoicingCompanyId());
settlementOwnerDetail.setInvoicingCompanyShorterName(orderChild.getInvoicingCompanyShorterName());
settlementOwnerDetail.setInvoicingCompanyGroupCode(orderChild.getInvoicingCompanyGroupCode());
settlementOwnerDetail.setReportFlag(orderChild.getReportFlag());
settlementOwnerDetailDao.saveEntity(settlementOwnerDetail); settlementOwnerDetailDao.saveEntity(settlementOwnerDetail);
return settlementOwnerDetail.getId(); return settlementOwnerDetail.getId();
} }
......
package com.clx.performance.service.impl.settle; package com.clx.performance.service.impl.settle;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.clx.order.enums.OrderEnum;
import com.clx.performance.component.IdGenerateSnowFlake; import com.clx.performance.component.IdGenerateSnowFlake;
import com.clx.performance.constant.RabbitKeyConstants; import com.clx.performance.constant.RabbitKeyConstants;
import com.clx.performance.dao.OrderChildDao; import com.clx.performance.dao.OrderChildDao;
...@@ -72,77 +73,18 @@ public class SettlementServiceImpl implements SettlementService { ...@@ -72,77 +73,18 @@ public class SettlementServiceImpl implements SettlementService {
settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode()); settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO); settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
} else { } else {
//TODO 发送MQ异步 if(Objects.equals(orderChild.getReportFlag(), OrderEnum.ReportFlag.YES.getCode())){
log.info("运单号:{},对应的开票公司上报标识为【是】",orderChild.getChildNo());
Message message = MessageBuilder.withBody(JSONUtil.parse(orderChild).toString().getBytes()).build(); Message message = MessageBuilder.withBody(JSONUtil.parse(orderChild).toString().getBytes()).build();
rabbitTemplate.send( rabbitTemplate.send(
RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE, RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY, message RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE, RabbitKeyConstants.ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY, message
); );
return; return;
// OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(orderChild.getOrderGoodsNo()).get(); } else {
// //是否通过风控,调用网络货运 invoiceType = SettlementOwnerEnum.InvoiceType.ORDINARY.getCode();
// ThirdOrderChildBrokerParam param = transportSyncService.generateOrderChildSync(orderChild, orderGoods, settlementOwnerDetail, settlementDriverDetail); settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// HttpDTO httpDTOResult = transportFeignService.orderChildSync(param); settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// String decrypt = ThirdComponent.decrypt(httpDTOResult.getData()); }
// OrderChildSyncDTO bean = JSONUtil.toBean(decrypt, OrderChildSyncDTO.class);
// log.info("OrderChildSyncDTO信息为:{}", JSONUtil.parse(bean));
// if (bean.getCode() == 0) {
// Integer status = bean.getData().getStatus();
// if (status == 1) {
// //通过风控
// List<OwnerRunningWaterRecord> runningWaterRecordList = ownerRunningWaterRecordDao.getOwnerRunningWaterRecord(orderChild.getOrderNo());
// BigDecimal frozen = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
//
// BigDecimal takeOut = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.TAKE_OUT.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
// //设置预付运费金额
// BigDecimal ans = getPrepayFreightPay(orderChild.getSettlementWay(), settlementOwnerDetail, frozen);
// BigDecimal subtract = frozen.subtract(takeOut);
// log.info("冻结预付运费:{}, 扣除的流水总和:{}", frozen, takeOut);
// invoiceType = SettlementOwnerEnum.InvoiceType.ONLINE.getCode();
// settlementDriverDetail.setPrepayFreight(ans);
// //冻结的预付运费为0 或者 此刻预付运费也可能为0,那么就不用生成扣除相关流水逻辑
// if (subtract.compareTo(BigDecimal.ZERO) <= 0 || ans.compareTo(BigDecimal.ZERO) == 0) {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// } else {
// if (subtract.subtract(ans).compareTo(BigDecimal.ZERO) >= 0) {
// //账户扣钱并生成扣除流水
// generateTakeOutRunningWatter(orderChild, ans, settlementOwnerDetail, settlementDriverDetail);
// try {
// //网络货运钱包账户
// networkDriverRunningWaterRecordService.generateNetworkDriverRunningWaterRecord(
// settlementDriverDetail,
// NetworkDriverAccountEnum.RunningWaterStatus.SETTLEMENT.getCode()
// );
// //生成提现记录
// networkDriverRunningWaterRecordService.generateNetworkCaseOutRecord(settlementDriverDetail);
// }catch (Exception e) {
// log.info("运单同步网络货运生成司机运单结算流水失败:{}", e.getMessage());
// }
//
// } else {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
//
// }
// }
//
// } else {
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO.getCode());
// }
// } else {
// throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_SYNC_ERROR);
//
// }
} }
// 结算金额 // 结算金额
......
...@@ -21,6 +21,10 @@ public interface SettlementOwnerService { ...@@ -21,6 +21,10 @@ public interface SettlementOwnerService {
SettlementPlatformAccountVO getSettlementPlatformAccount(); SettlementPlatformAccountVO getSettlementPlatformAccount();
SettlementPlatformAccountVO getSettlementPlatformAccountById(Integer id);
SettlementPlatformAccountVO getBreakSettlementPlatformAccount(Integer id);
SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo); SettlementPlatformAccountVO getCarrierSettlementPlatformAccount(String settlementNo);
void updatePaymentSettlement(OwnerPaymentSettlementParam param); void updatePaymentSettlement(OwnerPaymentSettlementParam param);
......
package com.clx.performance.struct;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.vo.pc.carrier.settle.*;
import com.msl.common.utils.DateStructUtil;
import com.msl.common.utils.DateUtils;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import java.util.List;
import java.util.Objects;
@Mapper(componentModel = "spring", uses = DateStructUtil.class, imports = {PlatformAccountConfigEnum.class, Objects.class, DateUtils.class})
public interface PlatformAccountConfigStruct {
@Mapping(target = "businessTypeMsg", expression = "java(Objects.isNull(config.getBusinessType()) ? null : PlatformAccountConfigEnum.BusinessType.getMsgByCode(config.getBusinessType()))")
@Mapping(target = "ownerTypeMsg", expression = "java(Objects.isNull(config.getOwnerType()) ? null : PlatformAccountConfigEnum.OwnerType.getMsgByCode(config.getOwnerType()))")
@Mapping(target = "invoiceTypeMsg", expression = "java(Objects.isNull(config.getInvoiceType()) ? null : PlatformAccountConfigEnum.InvoiceType.getMsgByCode(config.getInvoiceType()))")
@Mapping(target = "configRangeMsg", expression = "java(Objects.isNull(config.getConfigRange()) ? null : PlatformAccountConfigEnum.ConfigRange.getMsgByCode(config.getConfigRange()))")
CarrierPagePlatformAccountConfigVO convertToDetail(PlatformAccountConfig config);
List<CarrierPagePlatformAccountConfigVO> convertToVOList(List<PlatformAccountConfig> settlementOwners);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论