提交 288f5246 authored 作者: 马路路's avatar 马路路

App获取当日--开票配置为否,当前运单司机确认交货之后,没有推无车承运

上级 1a10f375
......@@ -8,8 +8,8 @@ import com.clx.order.vo.pc.carrier.InvoicingCompanyVO;
import com.clx.order.vo.pc.owner.OwnerQuotationDetailVO;
import com.clx.performance.dao.OrderChildImageDao;
import com.clx.performance.dao.settle.SettlementOwnerDetailDao;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PowerTypeEnum;
import com.clx.performance.enums.QuotationEnum;
import com.clx.performance.enums.settle.SettlementDriverEnum;
import com.clx.performance.enums.settle.SettlementOwnerDetailEnum;
import com.clx.performance.enums.settle.SettlementOwnerEnum;
......@@ -118,11 +118,16 @@ public class OrderChildBrokerServiceImpl implements OrderChildBrokerService {
TruckInfoFeignVo truckInfoFeignVo = truckFeign.getTruckInfoWithTransport(orderChild.getTruckId()).getData();
InvoicingCompanyVO invoicingCompanyByGroupCode = invoicingCompanyService.getInvoicingCompanyByGroupCode(orderChild.getInvoicingCompanyGroupCode());
// 参数组装
TransportParam transportParam = new TransportParam();
transportParam.setTransportPlatformCode(invoicingCompanyByGroupCode.getNetworkCargoCompanyCode());
// 若有开票配置,且开票配置为是,则使用开票配置的平台编码
if (Objects.nonNull(quotationDetailVO) && Objects.nonNull(quotationDetailVO.getInvoiceConfigType())
&& Objects.equals(quotationDetailVO.getInvoiceConfigType(), QuotationEnum.InvoicingConfigType.YES.getCode())) {
InvoicingCompanyVO invoicingCompanyByGroupCode = invoicingCompanyService.getInvoicingCompanyByGroupCode(orderChild.getInvoicingCompanyGroupCode());
transportParam.setTransportPlatformCode(invoicingCompanyByGroupCode.getNetworkCargoCompanyCode());
}
transportParam.setOrderCode(orderChild.getChildNo());
transportParam.setOwnerMobile(ownerMobile);
......
package com.clx.performance.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.Optional;
public enum QuotationEnum {
;
//报价状态 1发布报价 2确认报价 3驳回报价
@Getter
@AllArgsConstructor
public enum Status {
PUBLISH(1, "发布报价"),
CONFIRM(2, "确认报价"),
REJECT(3, "驳回报价"),
;
private final int code;
private final String name;
public static Status getByCode(int code) {
for(Status type: Status.values()){
if(type.code == code){
return type;
}
}
return null;
}
}
@Getter
@AllArgsConstructor
public enum PlatformFreightQuotationTaxType {
NO(0, "未税"),
YES(1, "含税"),
;
private final int code;
private final String msg;
public static Optional<PlatformFreightQuotationTaxType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
public static String getMsgByCode(Integer code) {
if (code == null) {return null;}
return getByCode(code).map(PlatformFreightQuotationTaxType::getMsg).orElse(null);
}
}
/**
* 开票配置:0否,1是
*/
@Getter
@AllArgsConstructor
public enum InvoicingConfigType {
NO(0, "否"),
YES(1, "是"),
;
private final int code;
private final String msg;
public static Optional<InvoicingConfigType> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
public static String getMsgByCode(Integer code) {
if (code == null) {return null;}
return getByCode(code).map(InvoicingConfigType::getMsg).orElse(null);
}
}
/**
* 是否上报:0-否;1-是
*/
@Getter
@AllArgsConstructor
public enum ReportFlag {
NO(0, "否"),
YES(1, "是"),
;
private final int code;
private final String msg;
public static Optional<ReportFlag> getByCode(int code) {
return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
}
public static String getMsgByCode(Integer code) {
if (code == null) {return null;}
return getByCode(code).map(ReportFlag::getMsg).orElse(null);
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论