Merge remote-tracking branch 'origin/feature/20261019-bfi-all' into feature/hcs-api-p0

# Conflicts:
#	blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/PaymentApplicationServiceImpl.java
This commit is contained in:
刘泉佳
2026-10-22 09:39:06 +08:00
250 changed files with 23455 additions and 1479 deletions
@@ -309,12 +309,13 @@ public interface ISysClient {
R<Region> getRegion(@RequestParam("code") String code);
/**
* 获取启用的费用项
* 获取费用项。默认仅返回启用档案;includeDisabled 为 true 时同时返回停用档案。
*
* @param includeDisabled 是否包含停用费用项
* @return 费用项集合
*/
@GetMapping(FEE_ITEMS)
R<List<FeeItem>> getFeeItems();
R<List<FeeItem>> getFeeItems(@RequestParam(value = "includeDisabled", required = false) Boolean includeDisabled);
@GetMapping(CARGO_TYPES)
R<List<CargoType>> getCargoTypes();
@@ -165,7 +165,7 @@ public class ISysClientFallback implements ISysClient {
}
@Override
public R<List<FeeItem>> getFeeItems() {
public R<List<FeeItem>> getFeeItems(Boolean includeDisabled) {
return R.fail("获取数据失败");
}
@@ -150,6 +150,13 @@ public class Dept extends TenantEntity {
@Schema(description = "合同编码前缀")
private String contractCodePrefix;
/**
* 合同初始流水号(该部门当年首个合同时从此号起编,范围1-999)
*/
@Schema(description = "合同初始流水号")
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private Integer contractInitialSerial;
/**
* 组织简称
*/
@@ -69,4 +69,22 @@ public class OaOrgSyncPageVO implements Serializable {
@Schema(description = "增量同步使用的 OA modified 起始时间,后续分页需原样回传")
private String modifiedSince;
@Schema(description = "全量同步结束后原始数据层级 JSON 文件路径")
private String dumpFilePath;
@Schema(description = "当前同步的公司 OA 主键(部门阶段按公司轮询时使用)")
private String companyOaId;
@Schema(description = "当前公司序号,从 1 开始")
private Integer companyIndex;
@Schema(description = "待同步公司总数")
private Integer companyTotal;
@Schema(description = "当前公司的部门是否已同步完")
private Boolean companyFinished;
@Schema(description = "下一公司 OA 主键;当前公司完成后回传,前端据此切换并重置页码")
private String nextCompanyOaId;
}
@@ -66,4 +66,7 @@ public class OaPersonSyncPageVO implements Serializable {
@Schema(description = "增量同步使用的 OA modified 起始时间,后续分页需原样回传")
private String modifiedSince;
@Schema(description = "全量同步结束后原始数据层级 JSON 文件路径")
private String dumpFilePath;
}
@@ -32,6 +32,8 @@ public class FormalSettlementSaveRequest implements Serializable {
private String remark;
private List<SummaryFee> summaryFees;
private List<Invoice> invoices;
/** 项目预付核销 */
private List<SettlementProjectAdvanceWriteOffRequest> projectAdvanceWriteOffs;
@Data
public static class DetailAdjustment implements Serializable {
@@ -35,6 +35,9 @@ public class PaymentApplicationSaveRequest implements Serializable {
private Long settlementId;
private List<Long> settlementIds;
private Long preSettlementId;
private List<Long> preSettlementIds;
/** 预结算单号。驳回重提时用于在主键失真后找回预结算单 */
private String preSettlementNo;
private Long projectId;
private String projectName;
private Long deptId;
@@ -60,4 +63,6 @@ public class PaymentApplicationSaveRequest implements Serializable {
private String remark;
private List<PaymentApplicationInvoiceRequest> invoices;
private List<PaymentApplicationRecordRequest> paymentRecords;
/** 多张结算单时按行提交的付款金额 */
private List<PaymentApplicationSettlementLineRequest> settlementLines;
}
@@ -0,0 +1,43 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/** 付款申请多结算单付款明细。 @author Chill */
@Data
public class PaymentApplicationSettlementLineRequest implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Long formalSettlementId;
private Long preSettlementId;
private BigDecimal paymentRatio;
private BigDecimal appliedAmount;
}
@@ -51,6 +51,12 @@ public class PersonCertSubmitRequest implements Serializable {
private String realName;
@Schema(description = "身份证号")
private String idCardNo;
@Schema(description = "出生年月")
private LocalDate birthday;
@Schema(description = "住址-区划:省市区名称拼接串")
private String addressRegion;
@Schema(description = "住址-详细地址")
private String address;
@Schema(description = "身份证正面照")
private String idCardFrontUrl;
@Schema(description = "身份证反面照")
@@ -33,7 +33,7 @@ public class PreSettlementDetailAdjustRequest implements Serializable {
@Schema(description = "预结算明细ID")
private Long detailId;
@Schema(description = "调整原因")
@Schema(description = "备注(写入结算明细备注,非必填)")
private String changeReason;
@Schema(description = "明细费用行")
@@ -76,6 +76,9 @@ public class PreSettlementSaveRequest implements Serializable {
@Schema(description = "结算合计费用")
private List<SummaryFee> summaryFees;
@Schema(description = "项目预付核销")
private List<SettlementProjectAdvanceWriteOffRequest> projectAdvanceWriteOffs;
@Data
@Schema(description = "结算合计费用")
public static class SummaryFee implements Serializable {
@@ -63,4 +63,10 @@ public class ReceivablePayableFeeCalculateRequest implements Serializable {
@Schema(description = "动态费用项目")
private Map<String, BigDecimal> feeItems;
@Schema(description = "运输单价")
private BigDecimal unitPrice;
@Schema(description = "本次调整字段:transportQuantity、mileage、unitPrice 或费用项名称")
private String changedField;
}
@@ -0,0 +1,107 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 导入结算单请求(列表筛选 + 确认/草稿入参)
*
* @author Chill
*/
@Data
@Schema(description = "导入结算单请求")
public class SettlementImportBatchRequest implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "主键")
private Long id;
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "项目ID")
private Long projectId;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "结算类型 receivable/payable")
private String settlementType;
@Schema(description = "结算单类型 formal/pre,应收仅 formal")
private String settlementBillType;
@Schema(description = "客户合同ID")
private Long customerContractId;
@Schema(description = "客户合同名称")
private String customerContractName;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "承运商合同ID")
private Long carrierContractId;
@Schema(description = "承运商合同名称")
private String carrierContractName;
@Schema(description = "承运商名称")
private String carrierName;
@Schema(description = "运单模式:new=新运单,history=历史运单")
private String waybillMode;
@Schema(description = "导入状态")
private String importStatus;
@Schema(description = "备注")
private String remark;
@Schema(description = "动态费用列名")
private List<String> feeItemNames;
@Schema(description = "导入明细行")
private List<Map<String, Object>> rows;
@Schema(description = "分批追加")
private Boolean append;
@Schema(description = "列表筛选:项目名称")
private String projectNameLike;
@Schema(description = "列表筛选:创建人")
private Long createUser;
}
@@ -0,0 +1,51 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 导入结算单作废请求
*
* @author Chill
*/
@Data
@Schema(description = "导入结算单作废请求")
public class SettlementImportVoidRequest implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "批次主键")
private Long id;
@Schema(description = "作废原因")
private String reason;
}
@@ -0,0 +1,53 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 结算单项目预付核销保存行
*
* @author Chill
*/
@Data
@Schema(description = "结算单项目预付核销保存行")
public class SettlementProjectAdvanceWriteOffRequest implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "项目预付付款申请ID")
private Long paymentApplicationId;
@Schema(description = "本次核销金额")
private BigDecimal writeOffAmount;
}
@@ -172,4 +172,12 @@ public class FormalSettlement extends TenantEntity {
* 作废原因,驳回时记录驳回原因
*/
private String voidReason;
/**
* 来源原正式结算单号:结算调整重推生成的新单,指向被调整的原单
*/
private String originFormalSettlementNo;
/**
* 调整状态:adjusted-已被结算调整(原单标记)
*/
private String adjustStatus;
}
@@ -25,6 +25,10 @@ public class FormalSettlementChangeRecord extends TenantEntity {
private Integer lineNo;
private String operationType;
private String changeContent;
/** 变更前数据JSON */
private String beforeData;
/** 变更后数据JSON */
private String afterData;
private String changeReason;
private String operatorName;
private LocalDateTime changeTime;
@@ -8,7 +8,9 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@@ -123,6 +125,12 @@ public class FormalSettlementDetail extends TenantEntity {
* 批次号
*/
private String batchNo;
/**
* 计费方式(来源应收应付货物费用计费类型,非本表字段)
*/
@TableField(exist = false)
@Schema(description = "计费方式")
private String billingType;
/**
* 运输单价
*/
@@ -8,7 +8,9 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@@ -70,6 +72,12 @@ public class FormalSettlementDetailFee extends TenantEntity {
* 费用项JSON
*/
private String feeItemsJson;
/**
* 命中计费规则JSON(来源费用带回,非本表字段)
*/
@TableField(exist = false)
@Schema(description = "命中计费规则JSON")
private String billingRulesJson;
/**
* 原金额
*/
@@ -1,5 +1,6 @@
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -17,7 +18,12 @@ public class PaymentApplicationSettlement extends TenantEntity {
private Long paymentApplicationId;
private Long formalSettlementId;
private String formalSettlementNo;
private Long preSettlementId;
private String preSettlementNo;
private BigDecimal settlementAmount;
private BigDecimal appliedAmount;
private BigDecimal paidAmount;
/** 查看时回填的可付款金额,不落库 */
@TableField(exist = false)
private BigDecimal payableAmount;
}
@@ -9,6 +9,7 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -99,6 +100,10 @@ public class PreSettlementDetail extends TenantEntity {
@Schema(description = "批次号")
private String batchNo;
@TableField(exist = false)
@Schema(description = "计费方式")
private String billingType;
@Schema(description = "运输单价")
private BigDecimal unitPrice;
@@ -30,6 +30,10 @@ public class SettlementAdjustment extends TenantEntity {
private String currentNode;
private String currentProcessor;
private String kingdeeSyncStatus;
/**
* 金蝶单据号(未推送场景回填原结算单金蝶单号;重推场景回填新单金蝶单号)
*/
private String kingdeeBillNo;
private String attachmentsJson;
private String remark;
private LocalDateTime approvedTime;
@@ -0,0 +1,118 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serial;
/**
* 导入结算单批次
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_settlement_import_batch")
@Schema(description = "导入结算单批次")
public class SettlementImportBatch extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "批次号")
private String batchNo;
@Schema(description = "项目ID")
private Long projectId;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "结算类型 receivable/payable")
private String settlementType;
@Schema(description = "结算单类型 formal/pre")
private String settlementBillType;
@Schema(description = "客户合同ID")
private Long customerContractId;
@Schema(description = "客户合同名称")
private String customerContractName;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "承运商合同ID")
private Long carrierContractId;
@Schema(description = "承运商合同名称")
private String carrierContractName;
@Schema(description = "承运商名称")
private String carrierName;
@Schema(description = "运单模式 new")
private String waybillMode;
@Schema(description = "导入状态 draft/completed/voided")
private String importStatus;
@Schema(description = "运单数量")
private Integer waybillCount;
@Schema(description = "明细数量")
private Integer detailCount;
@Schema(description = "正式结算单ID")
private Long formalSettlementId;
@Schema(description = "正式结算单号")
private String formalSettlementNo;
@Schema(description = "预结算单ID")
private Long preSettlementId;
@Schema(description = "预结算单号")
private String preSettlementNo;
@Schema(description = "动态费用列名JSON")
private String feeItemNamesJson;
@Schema(description = "导入明细行JSON")
private String rowsJson;
@Schema(description = "备注")
private String remark;
@Schema(description = "关联运单导入批次ID")
private Long waybillImportBatchId;
}
@@ -0,0 +1,90 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serial;
import java.math.BigDecimal;
import java.util.Date;
/**
* 结算单项目预付核销实体类
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_settlement_project_advance_write_off")
@Schema(description = "结算单项目预付核销")
public class SettlementProjectAdvanceWriteOff extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "结算单类型:pre/formal")
private String settlementType;
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "预结算/正式结算单ID")
private Long settlementId;
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "项目预付付款申请ID")
private Long paymentApplicationId;
@Schema(description = "预付单号")
private String paymentNo;
@Schema(description = "项目预付金额")
private BigDecimal projectAdvanceAmount;
@Schema(description = "本次核销金额")
private BigDecimal writeOffAmount;
@Schema(description = "金蝶预付单号")
private String kingdeeBillNo;
@TableField(exist = false)
@Schema(description = "可核销金额(动态计算)")
private BigDecimal availableWriteOffAmount;
@TableField(exist = false)
@Schema(description = "预付单创建人姓名")
private String createUserName;
@TableField(exist = false)
@Schema(description = "预付单创建时间(展示用)")
private Date paymentCreateTime;
}
@@ -6,6 +6,8 @@
*/
package org.springblade.transport.pojo.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -41,6 +43,7 @@ public class TransportReconciliationExternal extends TenantEntity {
private BigDecimal freightAmount;
private String feeItemsJson;
private BigDecimal settlementAmount;
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private Boolean suspectedDuplicate;
private String matchStatus;
private Long matchedInternalId;
@@ -249,6 +249,9 @@ public class Waybill extends TenantEntity {
@Schema(description = "导入批次ID")
private Long importBatchId;
@Schema(description = "导入结算单批次ID")
private Long settlementImportBatchId;
@Schema(description = "关联单号")
private String relationNo;
@@ -92,4 +92,30 @@ public class AdminWaybillCardVO implements Serializable {
@Schema(description = "采购方是否已付款(预留)")
private Boolean buyerPaid;
/* ===== 运次(一趟车)字段:列表按运次下发,卡片的展示单号与路线取这些 ===== */
@Schema(description = "运次主键:配载单主键或运单主键,按字符串下发(19 位雪花号按数字下发会被前端取整)")
private String tripId;
@Schema(description = "配载单号,未配载为空")
private String loadingNo;
@Schema(description = "展示单号:有配载取配载单号,否则取运单号")
private String tripNo;
@Schema(description = "途经站点:整趟车中间各站按顺序以「 → 」连接,无中间站为空")
private String viaName;
@Schema(description = "站点数(整趟车,含起终点)")
private Integer stationCount;
@Schema(description = "货物汇总(整趟车,同名货物合并且单位一致时取数量合计)")
private String cargoSummary;
@Schema(description = "合计重量(整趟车同单位时才有值,单位不一致为空)")
private String totalWeight;
@Schema(description = "子运单数(可见口径;配载运次即整趟车的子单数)")
private Integer waybillCount;
}
@@ -66,9 +66,12 @@ public class AdminWaybillDetailVO implements Serializable {
@Schema(description = "卸货地址")
private String unloadAddress;
@Schema(description = "货物名称")
@Schema(description = "货物名称:运单上录入的全部货名以「、」连接")
private String cargoName;
@Schema(description = "货物名称清单:运单上录入的全部货物,同名的只留一次")
private List<String> cargoNames;
@Schema(description = "货物数量(带单位)")
private String cargoQuantity;
@@ -135,6 +138,29 @@ public class AdminWaybillDetailVO implements Serializable {
@Schema(description = "途打卡记录")
private List<DriverEnrouteRecordVO> enrouteRecords;
/* ===== 运次(一趟车)字段:详情按运次下发,与司机端接单页同一口径 ===== */
@Schema(description = "运次主键:配载单主键或运单主键,按字符串下发(19 位雪花号按数字下发会被前端取整)")
private String tripId;
@Schema(description = "配载单号,未配载为空")
private String loadingNo;
@Schema(description = "展示单号:有配载取配载单号,否则取运单号")
private String tripNo;
@Schema(description = "途经站点:整趟车中间各站按顺序以「 → 」连接,无中间站为空")
private String viaName;
@Schema(description = "站点数(整趟车,含起终点)")
private Integer stationCount;
@Schema(description = "货物汇总(整趟车,同名货物合并且单位一致时取数量合计)")
private String cargoSummary;
@Schema(description = "站点任务安排(整趟车按实际途经顺序,第 1 站即 ①;配载运次含每站装卸与货物条目)")
private List<TripStationVO> stations;
@Data
@Schema(description = "装卸点")
public static class AdminRoutePointVO implements Serializable {
@@ -0,0 +1,48 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 货物明细行:一条货物一行
* <p>
* 详情页逐行展示「货物名称 + 数量单位」,名称与数量分开给,前端不需要再从汇总串里拆。
*/
@Data
@Schema(description = "货物明细行")
public class CargoLineVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "货物名称")
private String cargoName;
@Schema(description = "数量(含单位,如 1000吨);录入时只填了名称则为空")
private String quantity;
}
@@ -67,9 +67,15 @@ public class DriverPunchNodeVO implements Serializable {
@Schema(description = "不可打卡的原因,供司机端展示")
private String lockReason;
@Schema(description = "运单已结束(完成/取消):卡片仅展示、不可提交")
private Boolean ended;
@Schema(description = "是否展示该卡(在途可能因频次/时段隐藏)")
private Boolean visible;
@Schema(description = "打这张卡即完成运单:该运单的末位可打卡节点,且过程配置不要求业务员确认回单")
private Boolean finishOnPunch;
@Schema(description = "是否默认展开(仅第一个可打卡节点)")
private Boolean defaultExpanded;
@@ -67,6 +67,9 @@ public class DriverWaybillCardVO implements Serializable {
@Schema(description = "货物类别")
private String cargoCategory;
@Schema(description = "货物明细(详情返回):一条一行,同名同单位的货物已合并数量")
private List<CargoLineVO> cargos;
@Schema(description = "重量(带单位)")
private String weight;
@@ -150,6 +153,29 @@ public class DriverWaybillCardVO implements Serializable {
@Schema(description = "运输方式文案:公路运输等")
private String transportType;
@Schema(description = "运输组织:common普通 / load配载")
private String transportOrgType;
/* ===== 运次(一趟车)字段:运次接口返回,旧运单接口不填 ===== */
@Schema(description = "运次主键:配载单主键或运单主键,按字符串下发(19 位雪花号按数字下发会被前端取整)")
private String tripId;
@Schema(description = "配载单号,未配载为空")
private String loadingNo;
@Schema(description = "展示单号:有配载取配载单号,否则取运单号")
private String tripNo;
@Schema(description = "途经站点:整趟车中间各站按顺序以「 → 」连接")
private String viaName;
@Schema(description = "站点数(整趟车,含起终点)")
private Integer stationCount;
@Schema(description = "货物汇总(整趟车,同名货物合并且单位一致时取数量合计)")
private String cargoSummary;
@Schema(description = "计划发货时间")
private String planShipTime;
@@ -165,6 +191,9 @@ public class DriverWaybillCardVO implements Serializable {
@Schema(description = "装卸点(详情返回)")
private List<DriverRoutePointVO> routePoints;
@Schema(description = "站点任务安排(详情返回,按实际途经顺序,第 1 站即 ①;有配载时含每站装卸与货物条目)")
private List<TripStationVO> stations;
@Schema(description = "过程配置 JSON(详情返回,供前端兜底推导打卡节点)")
private String processJson;
@@ -20,10 +20,12 @@ import org.springblade.transport.pojo.entity.FormalSettlementSource;
import org.springblade.transport.pojo.entity.FormalSettlementPayment;
import org.springblade.transport.pojo.entity.FormalSettlementSummaryFee;
import org.springblade.transport.pojo.entity.InvoiceApplicationInvoice;
import org.springblade.transport.pojo.entity.SettlementProjectAdvanceWriteOff;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -33,7 +35,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class FormalSettlementVO extends FormalSettlement {
public class FormalSettlementVO extends FormalSettlement implements KingdeeUnlockMark {
@Serial private static final long serialVersionUID = 1L;
@TableField(exist = false) @DateTimeFormat(pattern = "yyyy-MM-dd") private LocalDate createStartDate;
@TableField(exist = false) @DateTimeFormat(pattern = "yyyy-MM-dd") private LocalDate createEndDate;
@@ -50,6 +52,14 @@ public class FormalSettlementVO extends FormalSettlement {
private String kingdeeLockFailReason;
@TableField(exist = false) @Schema(description = "金蝶锁重试次数(达上限5后不再自动补偿,需重推同步金蝶)")
private Integer kingdeeTryCount;
@TableField(exist = false) @Schema(description = "金蝶解锁时间(非空代表该单曾被金蝶解锁/删单)")
private LocalDateTime kingdeeUnlockTime;
@TableField(exist = false) @Schema(description = "金蝶侧解锁操作人(回调报文 operator)")
private String kingdeeUnlockOperator;
@TableField(exist = false) @Schema(description = "解锁动作名称:金蝶删单/金蝶锁单")
private String kingdeeUnlockOperationName;
@TableField(exist = false) @Schema(description = "调整状态名称:adjusted-已调整")
private String adjustStatusName;
@TableField(exist = false) private String preSettlementNos;
@TableField(exist = false) private String preSettlementNo;
@TableField(exist = false) private List<FormalSettlementSource> sources;
@@ -57,9 +67,12 @@ public class FormalSettlementVO extends FormalSettlement {
@TableField(exist = false) private List<FormalSettlementSummaryFee> summaryFees;
@TableField(exist = false) private List<FormalSettlementPayment> payments;
@TableField(exist = false) private List<FormalSettlementInvoice> invoices;
@TableField(exist = false) @Schema(description = "项目预付核销")
private List<SettlementProjectAdvanceWriteOff> projectAdvanceWriteOffs;
@TableField(exist = false) @Schema(description = "开票申请经金蝶回写的发票结果(含文件地址,只读展示)")
private List<InvoiceApplicationInvoice> issuedInvoices;
@TableField(exist = false) private List<PaymentApplicationVO> paymentApplications;
@TableField(exist = false) private List<SettlementAdvancePaymentVO> advancePayments;
@TableField(exist = false) private List<SettlementAdjustmentVO> adjustments;
@TableField(exist = false) private List<FormalSettlementChangeRecord> changeRecords;
}
@@ -35,6 +35,7 @@ import org.springblade.transport.pojo.entity.InvoiceApplicationRecord;
import org.springblade.transport.pojo.entity.InvoiceApplicationSettlement;
import java.io.Serial;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -44,7 +45,7 @@ import java.util.List;
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class InvoiceApplicationVO extends InvoiceApplication {
public class InvoiceApplicationVO extends InvoiceApplication implements KingdeeUnlockMark {
@Serial private static final long serialVersionUID = 1L;
@TableField(exist = false) private String settlementNos;
@TableField(exist = false) private String approvalStatusName;
@@ -55,6 +56,12 @@ public class InvoiceApplicationVO extends InvoiceApplication {
@TableField(exist = false) private String kingdeeLockStatus;
@TableField(exist = false) private String kingdeeLockFailReason;
@TableField(exist = false) private Integer kingdeeTryCount;
/** 金蝶解锁终态标识(unlocked 锁记录回填):解锁时间非空即代表该单曾被金蝶解锁/删单 */
@TableField(exist = false) private LocalDateTime kingdeeUnlockTime;
/** 金蝶侧解锁操作人(回调报文 operator) */
@TableField(exist = false) private String kingdeeUnlockOperator;
/** 解锁动作名称:金蝶删单/金蝶锁单 */
@TableField(exist = false) private String kingdeeUnlockOperationName;
@TableField(exist = false) private String createUserName;
@TableField(exist = false) private List<InvoiceApplicationSettlement> settlements;
@TableField(exist = false) private List<InvoiceApplicationSheetVO> sheets;
@@ -0,0 +1,36 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import java.time.LocalDateTime;
/**
* 金蝶解锁终态标识展示契约:需在页面展示「金蝶删单/解锁」标识的 VO 实现之,
* 由 {@code KingdeeBillLockService#fillUnlockMarks} 统一回填(列表/详情共用)
*
* @author Chill
*/
public interface KingdeeUnlockMark {
/**
* 金蝶解锁时间(unlocked 锁记录回填),非空即代表该单曾被金蝶解锁/删单
*/
void setKingdeeUnlockTime(LocalDateTime kingdeeUnlockTime);
/**
* 金蝶侧解锁操作人(回调报文 operator)
*/
void setKingdeeUnlockOperator(String kingdeeUnlockOperator);
/**
* 解锁动作名称:金蝶删单/金蝶锁单
*/
void setKingdeeUnlockOperationName(String kingdeeUnlockOperationName);
}
@@ -27,4 +27,6 @@ public class PaymentApplicationReferenceAmountVO implements Serializable {
@Schema(description = "结算金额") private BigDecimal settlementAmount;
@Schema(description = "累计申请付款金额") private BigDecimal cumulativeAppliedAmount;
@Schema(description = "可付款金额") private BigDecimal payableAmount;
/** 该结算单当前为第几次付款(含本次,已作废不计) */
@Schema(description = "付款次序") private Integer paymentSequence;
}
@@ -29,12 +29,13 @@ import org.springblade.transport.pojo.entity.PaymentApplicationSettlement;
import java.io.Serial;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/** 付款申请视图。 @author Chill */
@Data
@EqualsAndHashCode(callSuper = true)
public class PaymentApplicationVO extends PaymentApplication {
public class PaymentApplicationVO extends PaymentApplication implements KingdeeUnlockMark {
@Serial private static final long serialVersionUID = 1L;
@TableField(exist = false) private LocalDate applyStartDate;
@TableField(exist = false) private LocalDate applyEndDate;
@@ -49,6 +50,12 @@ public class PaymentApplicationVO extends PaymentApplication {
@TableField(exist = false) private String kingdeeLockStatus;
@TableField(exist = false) private String kingdeeLockFailReason;
@TableField(exist = false) private Integer kingdeeTryCount;
/** 金蝶解锁终态标识(unlocked 锁记录回填):解锁时间非空即代表该单曾被金蝶解锁/删单,供页面展示明显标识 */
@TableField(exist = false) private LocalDateTime kingdeeUnlockTime;
/** 金蝶侧解锁操作人(回调报文 operator) */
@TableField(exist = false) private String kingdeeUnlockOperator;
/** 解锁动作名称:金蝶删单/金蝶锁单 */
@TableField(exist = false) private String kingdeeUnlockOperationName;
@TableField(exist = false) private List<PaymentApplicationInvoice> invoices;
@TableField(exist = false) private List<PaymentApplicationRecord> paymentRecords;
@TableField(exist = false) private List<PaymentApplicationSettlement> settlements;
@@ -35,6 +35,7 @@ import org.springblade.transport.pojo.entity.PreSettlementChangeRecord;
import org.springblade.transport.pojo.entity.PreSettlementDetail;
import org.springblade.transport.pojo.entity.PreSettlementDetailFee;
import org.springblade.transport.pojo.entity.PreSettlementSummaryFee;
import org.springblade.transport.pojo.entity.SettlementProjectAdvanceWriteOff;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serial;
@@ -100,6 +101,10 @@ public class PreSettlementVO extends PreSettlement {
@Schema(description = "预付信息")
private List<PreSettlementAdvance> advances;
@TableField(exist = false)
@Schema(description = "项目预付核销")
private List<SettlementProjectAdvanceWriteOff> projectAdvanceWriteOffs;
@TableField(exist = false)
@Schema(description = "变更记录")
private List<PreSettlementChangeRecord> changeRecords;
@@ -0,0 +1,72 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 可选项目预付核销选项
*
* @author Chill
*/
@Data
@Schema(description = "可选项目预付核销选项")
public class ProjectAdvanceWriteOffOptionVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@JsonSerialize(using = ToStringSerializer.class)
@Schema(description = "付款申请ID")
private Long paymentApplicationId;
@Schema(description = "预付单号")
private String paymentNo;
@Schema(description = "项目预付金额")
private BigDecimal projectAdvanceAmount;
@Schema(description = "可核销金额")
private BigDecimal availableWriteOffAmount;
@Schema(description = "金蝶预付单号")
private String kingdeeBillNo;
@Schema(description = "创建人姓名")
private String createUserName;
@Schema(description = "创建时间")
private Date createTime;
}
@@ -39,6 +39,7 @@ import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 收款流水视图实体类
@@ -91,4 +92,9 @@ public class ReceiptFlowVO extends KingdeeReceiptFlow {
private BigDecimal receiptAmountEnd;
@TableField(exist = false)
private List<ReceiptFlowRecord> claimRecords = new ArrayList<>();
/**
* 本流水历史关联且仍有剩余可认领金额的应收正式结算单(继续认领时预填)
*/
@TableField(exist = false)
private List<Map<String, Object>> relatedSettlements = new ArrayList<>();
}
@@ -73,6 +73,10 @@ public class ReceivablePayableDetailVO extends ReceivablePayableDetail {
@Schema(description = "状态名称")
private String settlementStatusName;
@TableField(exist = false)
@Schema(description = "计费方式")
private String billingType;
@TableField(exist = false)
@Schema(description = "费用项目")
private Map<String, Object> feeItems;
@@ -17,7 +17,6 @@ public class SettlementAdjustmentVO extends SettlementAdjustment {
private String approvalStatusName;
private String settlementTypeName;
private String createUserName;
private String kingdeeBillNo;
private List<SettlementAdjustmentDetail> details;
private List<FormalSettlementDetail> formalDetails;
}
@@ -0,0 +1,72 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 结算单统一预付付款记录(进度预付 / 项目预付核销,供付款记录合并展示)
*
* @author Chill
*/
@Data
@Schema(description = "结算单统一预付付款记录")
public class SettlementAdvancePaymentVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "记录类型:progress_advance 进度预付 / project_advance 项目预付核销")
private String recordType;
@Schema(description = "付款单号")
private String paymentNo;
@Schema(description = "申请金额(进度预付为申请预付金额,项目预付为本次核销金额)")
private BigDecimal appliedAmount;
@Schema(description = "已付款金额(底层付款申请实付)")
private BigDecimal paidAmount;
@Schema(description = "单据状态")
private String billStatus;
@Schema(description = "金蝶单据号")
private String kingdeeBillNo;
@Schema(description = "创建人姓名")
private String createUserName;
@Schema(description = "创建时间(统一取底层付款申请创建时间)")
private Date createTime;
}
@@ -0,0 +1,73 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.transport.pojo.entity.SettlementImportBatch;
import java.io.Serial;
import java.util.List;
import java.util.Map;
/**
* 导入结算单批次视图
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "导入结算单批次视图")
public class SettlementImportBatchVO extends SettlementImportBatch {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "创建人姓名")
private String createUserName;
@Schema(description = "更新人姓名")
private String updateUserName;
@Schema(description = "导入状态显示名")
private String importStatusName;
@Schema(description = "结算类型显示名")
private String settlementTypeName;
@Schema(description = "结算单类型显示名")
private String settlementBillTypeName;
@Schema(description = "运单模式显示名")
private String waybillModeName;
@Schema(description = "动态费用列名")
private List<String> feeItemNames;
@Schema(description = "导入明细行")
private List<Map<String, Object>> rows;
}
@@ -0,0 +1,104 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* 运次查询条件
* <p>
* 司机端用 {@link #forDriver(String)} 按司机手机号收口;管理端用 {@link #forAdmin()} 不按司机收口。
* 两者都不给时收口为空集——收口一旦缺省就等于把别人的运次发出去,故缺省不放行。
*/
@Data
@Schema(description = "运次查询条件")
public class TripQueryVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "运次主键(详情按它取单个运次)")
private String tripId;
@Schema(description = "司机手机号")
private String driverPhone;
@Schema(description = "是否不按司机收口(管理端)")
private boolean allDrivers;
@Schema(description = "可见组织 ID 集合:非空时只出这些组织的运单行,空集合表示不按组织过滤")
private List<Long> deptIds;
@Schema(description = "状态:0待接单/1进行中/2已完成/3已取消,不传为全部(不含已取消)")
private Integer status;
@Schema(description = "多档状态:同上取值,非空时优先于 status(待处理列表要待接单与进行中两档)")
private List<Integer> statuses;
@Schema(description = "关键字:运单号 / 配载单号 / 起终点 / 车牌")
private String keyword;
@Schema(description = "运输组织类型:load 公路配载 / common 普通运输,不传为全部(按子单行筛选)")
private String transportOrgType;
@Schema(description = "异常筛选:exception 只看命中异常的子单 / normal 只看未命中的,不传为全部(按子单行筛选)")
private String exception;
@Schema(description = "有未完成异常的子运单主键集合,配合 exception 使用(按子单行筛选)")
private Set<Long> exceptionWaybillIds;
@Schema(description = "创建时间下界,按子单行筛选")
private Date createdFrom;
@Schema(description = "创建时间上界,按子单行筛选")
private Date createdTo;
@Schema(description = "是否排除「有子单被拒且这趟车还没结束」的运次(待处理列表用)")
private boolean excludeRejectedTrips;
@Schema(description = "当前页,从 1 开始")
private Integer current;
@Schema(description = "每页条数(按运次,不是运单)")
private Integer size;
public static TripQueryVO forDriver(String driverPhone) {
TripQueryVO query = new TripQueryVO();
query.setDriverPhone(driverPhone);
return query;
}
public static TripQueryVO forAdmin() {
TripQueryVO query = new TripQueryVO();
query.setAllDrivers(true);
return query;
}
}
@@ -0,0 +1,105 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 运次站点(任务安排)
* <p>
* 有配载单时按配载单的路线信息给出实际途经顺序,第 1 站即 ①;站点上的「装N / 卸N」指向配载单运单集合里的第 N 张子运单,
* 同一站可以既卸又装(装卸)。没有路线信息时回退到子运单的起讫点去重成站。
* <p>
* 站点上的货物条目取子运单,不取配载单的货物信息:配载单的货物条数与子运单不一定同数,行序也对不上站点编号。
*/
@Data
@Schema(description = "运次站点")
public class TripStationVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "站序,从 1 开始(展示为 ①②③)")
private Integer index;
@Schema(description = "站名:展示地址优先,回退详细地址")
private String name;
@Schema(description = "详细地址")
private String address;
@Schema(description = "站点标记原文:装N / 卸N")
private List<String> tags;
@Schema(description = "操作类型:load 装货 / unload 卸货 / load_unload 装卸,无从判定时为空")
private String operationType;
@Schema(description = "操作类型文案:装货 / 卸货 / 装卸")
private String operationTypeLabel;
@Schema(description = "该站涉及的货物条目")
private List<TripCargoVO> cargos;
/**
* 站点货物条目
*/
@Data
@Schema(description = "运次站点货物条目")
public static class TripCargoVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "所属子运单主键,按字符串下发")
private String waybillId;
@Schema(description = "所属运单号")
private String waybillNo;
@Schema(description = "货物名称")
private String cargoName;
@Schema(description = "货主名称")
private String customerName;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "数量单位")
private String quantityUnit;
@Schema(description = "该站的操作:load 装货 / unload 卸货")
private String operation;
@Schema(description = "项目名称")
private String projectName;
}
}
@@ -0,0 +1,55 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 运次 Tab 统计
* <p>
* 与司机端运单统计字段同名同义,但计数单位是运次(一卡一趟车),不是运单。
*/
@Data
@Schema(description = "运次 Tab 统计")
public class TripTabCountsVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "全部(待接单+进行中+已完成,不含已取消)")
private long all;
@Schema(description = "待接单")
private long pending;
@Schema(description = "进行中")
private long doing;
@Schema(description = "已完成")
private long done;
}
@@ -0,0 +1,236 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.transport.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
/**
* 运次:一趟车的展示与操作单位
* <p>
* 有配载单时就是那张配载单连同它的全部子运单,没配载时就是一张运单;它没有自己的表。
* 状态与接单需求都由子运单读时聚合,配载单上不落这两个字段。
*/
@Data
@Schema(description = "运次")
public class TripVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "运次主键:配载单主键或运单主键,按字符串下发(19 位雪花号按数字下发会被前端取整)")
private String id;
@Schema(description = "展示单号:有配载取配载单号,否则取运单号")
private String tripNo;
@Schema(description = "配载单号,未配载为空")
private String loadingNo;
@Schema(description = "运输组织类型:load 公路配载 / common 普通运输")
private String transportOrgType;
@Schema(description = "状态:0待接单/1运输中/2已完成/3已取消,子单集合为空时为空")
private Integer status;
@Schema(description = "排序键:运次内子运单 create_time 的最大值")
private Date sortTime;
@Schema(description = "是否需要接单:任一子运单的项目有接单节点即为是")
private Boolean requireAccept;
@Schema(description = "接单态:accepted 已接单 / pending 待接单,无从判定时为空")
private String acceptStatus;
@Schema(description = "子运单数(可见口径:已排除本司机拒单的子单)")
private int waybillCount;
@Schema(description = "司机姓名")
private String driverName;
@Schema(description = "司机手机号")
private String driverPhone;
@Schema(description = "车牌号")
private String vehicleNo;
@Schema(description = "挂车车牌号")
private String trailerVehicleNo;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "运输类型")
private String transportType;
@Schema(description = "货物名称:整趟车全部货名以「、」连接,一格多名的历史写法已摊平")
private String cargoName;
@Schema(description = "货物名称清单:整趟车全部货物,同名的只留一次,保持子单与录入顺序")
private List<String> cargoNames;
@Schema(description = "货物类型:整趟车全部类型以「、」连接")
private String cargoType;
@Schema(description = "货物类型清单:整趟车全部货物类型,同类型的只留一次")
private List<String> cargoTypes;
@Schema(description = "发货地址")
private String departureAddress;
@Schema(description = "途经地")
private String transitAddress;
@Schema(description = "到货地")
private String arrivalAddress;
@Schema(description = "起点名称:整趟车首站,展示地址优先、回退详细地址")
private String departureName;
@Schema(description = "途经站点:中间各站按顺序以「 → 」连接,无中间站为空")
private String transitName;
@Schema(description = "终点名称:整趟车末站,展示地址优先、回退详细地址")
private String arrivalName;
@Schema(description = "站点数(整趟车,含起终点)")
private int stationCount;
@Schema(description = "货物汇总:按货物名合并数量,同名同单位取合计")
private String cargoSummary;
@Schema(description = "货物明细:一条货物一行,同名同单位的货物已合并数量")
private List<CargoLineVO> cargos;
@Schema(description = "合计重量:全部子运单同单位时为数量合计,单位不一致时为空")
private BigDecimal totalQuantity;
@Schema(description = "合计重量的单位,与 totalQuantity 同时为空或同时有值")
private String quantityUnit;
@Schema(description = "计重合计:全部货物同单位时取该单位合计,单位不一致时只合计「吨」项(其余单位不参与);无可用合计时为空")
private BigDecimal weighingQuantity;
@Schema(description = "计重合计的单位,与 weighingQuantity 同时为空或同时有值")
private String weighingUnit;
@Schema(description = "计划发货日期(配载单,未配载为空)")
private LocalDate estimatedStartDate;
@Schema(description = "计划完成日期(配载单,未配载为空)")
private LocalDate estimatedEndDate;
@Schema(description = "任务备注(配载单的运输说明)")
private String taskRemark;
@Schema(description = "路线信息,仅单个运次详情返回(列表不带,省流量)")
private String routeJson;
@Schema(description = "货物信息,仅单个运次详情返回(列表不带,省流量)")
private String goodsJson;
@Schema(description = "站点(任务安排,按实际途经顺序),仅单个运次详情返回;列表用起/经/终与站点数")
private List<TripStationVO> stations;
@Schema(description = "子运单(可见子单,按创建时间升序)")
private List<TripWaybillVO> waybills;
/**
* 运次下的子运单
* <p>
* 接单事实仍落在每张子运单上,运次只是把它们的需要接单与接单态聚合起来。
*/
@Data
@Schema(description = "运次下的子运单")
public static class TripWaybillVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "运单主键,按字符串下发")
private String id;
@Schema(description = "运单号")
private String waybillNo;
@Schema(description = "业务状态")
private String businessStatus;
@Schema(description = "接单状态:pending待接单/accepted已接单/rejected已拒绝")
private String acceptStatus;
@Schema(description = "该运单是否需要接单确认")
private Boolean requireAccept;
@Schema(description = "项目ID")
private Long projectId;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "货物名称:运单上录入的全部货名以「、」连接,一格多名的历史写法已摊平")
private String cargoName;
@Schema(description = "货物名称清单:运单上录入的全部货物,同名的只留一次")
private List<String> cargoNames;
@Schema(description = "货物类型:主表首行的类型,完整清单见 cargoTypes")
private String cargoType;
@Schema(description = "货物类型清单:运单上录入的全部货物类型,同类型的只留一次")
private List<String> cargoTypes;
@Schema(description = "数量")
private BigDecimal quantity;
@Schema(description = "数量单位")
private String quantityUnit;
@Schema(description = "发货地")
private String departureName;
@Schema(description = "发货地址")
private String departureAddress;
@Schema(description = "收货地")
private String arrivalName;
@Schema(description = "收货地址")
private String arrivalAddress;
@Schema(description = "创建时间")
private Date createTime;
}
}
@@ -20,6 +20,12 @@ public class WaybillImportBatchVO extends WaybillImportBatch {
private static final long serialVersionUID = 1L;
private String importTypeName;
private String statusName;
/** 结算状态:unsettled/partial/settled */
@Schema(description = "结算状态")
private String settlementStatus;
/** 结算状态名称:未结算/部分结算/已结算 */
@Schema(description = "结算状态名称")
private String settlementStatusName;
private String createUserName;
private String updateUserName;
}
@@ -29,6 +29,7 @@ import lombok.EqualsAndHashCode;
import org.springblade.transport.pojo.entity.Waybill;
import java.io.Serial;
import java.util.List;
/**
* 运单管理视图实体类
@@ -78,4 +79,12 @@ public class WaybillVO extends Waybill {
@Schema(description = "是否仅查询未配载运单")
private Integer onlyUnassignedLoading;
@TableField(exist = false)
@Schema(description = "是否仅查询可配载运单")
private Integer loadableOnly;
@TableField(exist = false)
@Schema(description = "运单主键集合")
private List<Long> ids;
}
@@ -17,7 +17,40 @@ public interface ISettlementAdjustmentService {
Long saveDraft(SettlementAdjustmentSaveRequest request);
void removeDraft(Long id);
void submit(SettlementAdjustmentStatusRequest request);
void approve(SettlementAdjustmentStatusRequest request);
/**
* 审批通过:未推送场景回写原单并发布金蝶自动推送事件;已推送场景原单零改动仅追加变更记录。
*
* @param request 审批请求
* @return 已推送场景的手工冲销提示文案,未推送场景返回 null
*/
String approve(SettlementAdjustmentStatusRequest request);
void returnBill(SettlementAdjustmentStatusRequest request);
String repush(Long adjustmentId);
/**
* 选单后金蝶冲销预检(软提示,不阻断建单):未推送 / 已推送已冲销 / 已推送未冲销;
* 金蝶查询异常降级返回「未校验」,由审批分流与重推闸门兜底
*
* @param formalSettlementId 选定正式结算单id
* @return syncStatus / writtenOff / message
*/
Map<String, Object> kingdeeWriteOffPrecheck(Long formalSettlementId);
/**
* 推送金蝶(未推送/生成失败场景):推送关联正式结算单,成功后由正式结算单回填调整单金蝶单号与同步状态
*
* @param adjustmentId 结算调整单id
* @return 金蝶单据编号
*/
String syncKingdee(Long adjustmentId);
/**
* 重推克隆+应用(独立事务,由 repush 经自代理调用):克隆原单为新正式结算单并应用调整,
* 供推送失败重试时幂等复用
*
* @param originalSettlementId 原正式结算单id
* @param adjustmentId 结算调整单id
* @return 新正式结算单id
*/
Long cloneAndApplyForRepush(Long originalSettlementId, Long adjustmentId);
}
@@ -132,6 +132,10 @@ public class User extends TenantEntity implements IPhone {
* 是否是oa的账号
*/
private Integer isOa;
/**
* OA登录名
*/
private String oaLoginId;
/**
* OA上次更新时间(OA 的 modified 字段),仅同步比对使用
*/