feat: 金蝶票池选票回切镜像读(本地真分页+票号未命中回源+瘦身版全票池定时同步+结算认领确认重查闸门,下线实时游标透传)
- 选票两门面端点改查 blade_kingdee_invoice_pool 本地镜像:Mapper.xml 真分页+total 跳页, 名称模糊/票种(invoice_type_code)/双税号/claimed/registered 三态过滤 SQL 直出, 仅出可用票(available_amount>0 且 amount_use_status='0',本地化执行原 isUsablePoolRow 口径) - 票号精确查本地未命中→窄查一次 A801-1 回源入库后重查,兜底增量窗口缝隙内当日新票 - 瘦身版同步任务回归:增量窗口分页拉取+镜像全列批量 upsert(无绑定/补偿/白名单/指纹), 复用 KingdeeSyncLockSupport single-flight;手动端点 POST /invoice-receipt/sync-invoice-pool 供 bootstrap - 镜像实体/表新增 available_amount/amount_use_status,fillInvoicePool 统一回填(存根/回源/同步同口径) - 结算认领确认补齐服务端按票号重查闸门(与收票保存 persistMirrorFromRemote 同闸门),收票保存重查原样保留 - 删除 KingdeeInvoicePoolPageVO 游标分页契约与 PoolScanCursor/decorateUseFlags 等实时链路代码
This commit is contained in:
+34
-17
@@ -5,23 +5,22 @@
|
||||
* 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
|
||||
* 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
|
||||
* Using this software signifies agreement to the 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)
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
package org.springblade.transport.pojo.dto;
|
||||
|
||||
@@ -32,12 +31,12 @@ import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 金蝶票池实时统一查询条件(收票登记选票与正式结算单认领共用)
|
||||
* 金蝶票据池镜像统一查询条件(收票登记选票与正式结算单认领共用,查本地镜像)
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "金蝶票池实时统一查询条件")
|
||||
@Schema(description = "金蝶票据池镜像统一查询条件")
|
||||
public class KingdeeInvoicePoolQueryDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
@@ -73,6 +72,24 @@ public class KingdeeInvoicePoolQueryDTO implements Serializable {
|
||||
@Schema(description = "开票日期止 yyyy-MM-dd")
|
||||
private String invoiceDateEnd;
|
||||
|
||||
/**
|
||||
* 开票单位(销方名称),模糊
|
||||
*/
|
||||
@Schema(description = "开票单位(销方名称,模糊)")
|
||||
private String salerName;
|
||||
|
||||
/**
|
||||
* 受票单位(购方名称),模糊
|
||||
*/
|
||||
@Schema(description = "受票单位(购方名称,模糊)")
|
||||
private String buyerName;
|
||||
|
||||
/**
|
||||
* 发票类型编码(票易通字典,如 26/27,镜像按 invoice_type_code 精确匹配)
|
||||
*/
|
||||
@Schema(description = "发票类型编码(票易通字典,如 26/27)")
|
||||
private String invoiceType;
|
||||
|
||||
/**
|
||||
* 销方税号,精确
|
||||
*/
|
||||
@@ -86,14 +103,14 @@ public class KingdeeInvoicePoolQueryDTO implements Serializable {
|
||||
private String buyerTaxNo;
|
||||
|
||||
/**
|
||||
* 发票类型编码(票易通字典,如 26/27)
|
||||
* 认领过滤:true 仅已认领,false 仅未认领,null 不过滤(已认领=存在非作废正式结算单发票行)
|
||||
*/
|
||||
@Schema(description = "发票类型编码(票易通字典,如 26/27)")
|
||||
private String invoiceType;
|
||||
@Schema(description = "认领过滤:true已认领/false未认领/null不限")
|
||||
private Boolean claimed;
|
||||
|
||||
/**
|
||||
* 续扫游标:下一页翻页时原样回传上页返回的 nextCursor,空表示按页码锚定重新扫描
|
||||
* 登记过滤:true 仅已登记,false 仅未登记,null 不过滤(已登记=存在非作废收票登记)
|
||||
*/
|
||||
@Schema(description = "续扫游标(下一页请求回传上页 nextCursor)")
|
||||
private String cursor;
|
||||
@Schema(description = "登记过滤:true已登记/false未登记/null不限")
|
||||
private Boolean registered;
|
||||
}
|
||||
|
||||
+8
@@ -143,4 +143,12 @@ public class KingdeeInvoicePool extends TenantEntity {
|
||||
* 票池数据更新时间(A801-1 billCreateTime,镜像排序字段)
|
||||
*/
|
||||
private LocalDateTime sourceUpdatedTime;
|
||||
/**
|
||||
* 剩余可用金额(A801-1 availableAmount,金蝶可用税额口径,选票本地过滤用:>0 才可选)
|
||||
*/
|
||||
private BigDecimal availableAmount;
|
||||
/**
|
||||
* 金额使用状态(A801-1 amountUseStatus,0 未使用可选 / 2 全部使用;选票本地过滤用)
|
||||
*/
|
||||
private String amountUseStatus;
|
||||
}
|
||||
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* 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.util.List;
|
||||
|
||||
/**
|
||||
* 金蝶票池实时查询游标分页返回体(A801-1 无总数:hasMore 驱动上一页/下一页)
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "金蝶票池游标分页返回体")
|
||||
public class KingdeeInvoicePoolPageVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 本页数据(金蝶实时行 + 本地认领/登记装饰标记) */
|
||||
@Schema(description = "本页数据")
|
||||
private List<KingdeeInvoicePoolVO> records;
|
||||
|
||||
/** 当前页码,从 1 开始 */
|
||||
@Schema(description = "当前页码")
|
||||
private Long current;
|
||||
|
||||
/** 每页条数 */
|
||||
@Schema(description = "每页条数")
|
||||
private Long size;
|
||||
|
||||
/** 是否还有下一页(服务端有界补页扫描判断) */
|
||||
@Schema(description = "是否还有下一页")
|
||||
private Boolean hasMore;
|
||||
|
||||
/** 下一页续扫游标("远程页码:已消费过滤行数"),null 表示没有更多;翻下一页时原样回传 */
|
||||
@Schema(description = "下一页续扫游标,null 表示没有更多")
|
||||
private String nextCursor;
|
||||
}
|
||||
Reference in New Issue
Block a user