Files
tms-erp-api/doc/nacos/blade-dev.yaml
T
刘泉佳 b3eee6347b ⚡ 金蝶全票池定时同步按变更比对落库并加 single-flight 锁
- 镜像批量 upsert 增加票面字段指纹比对,票面无变化不重写(含 attachments_json 大字段),口径对齐 MyBatis-Plus 非空字段更新策略
- 收票登记绑定前比对 kingdeeInvoicePoolId/kingdeeBillNo/kingdeeStatus,三项均无变化不更新;同步流水只在绑定关系变化或金蝶状态迁移时写入,原因文案按语义拆分为「定时绑定」与「定时刷新」
- 同步入口按租户加 RedisLockClient 分布式锁做 single-flight(零等待、租约可配 lockLeaseSeconds),未开启 blade.lock.enabled 时降级执行并告警
- 客商税号白名单明确为购、销双方税号均须命中客商档案(我方主体税号亦在档案中),抽出 taxNoArchived 做空值防护
- 日志补强:每页过滤漏斗明细、镜像无变化数、镜像未匹配登记提示、翻页触顶告警、补偿绑定耗时与远程补查次数、解析失败带发票号码
- Nacos 模板:MySQL 连接串补 rewriteBatchedStatements=true 使 JDBC 批量真正合批;dev/test 开启 blade.lock.enabled,prod 补开启前置条件说明
- SyncKingdeeTest:方法名更正为 syncKingdeeInvoicePool,测试属性关闭 syncEnabled,避免 cron 与手动触发在同一 JVM 并发跑
2026-09-21 17:31:22 +08:00

189 lines
8.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#spring配置
spring:
data:
redis:
##redis 单机环境配置
host: 127.0.0.1
port: 6379
password:
database: 0
ssl:
enabled: false
##redis 集群环境配置
#cluster:
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
#driver-class-name: com.kingbase8.Driver
druid:
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
blade:
#分布式锁配置
lock:
# blade.lock.enabled=true 才会装配 RedisLockClient;收票全票池同步等定时任务依赖它做 single-flight
enabled: true
address: redis://127.0.0.1:6379
#多团队协作服务配置
loadbalancer:
#开启配置
enabled: true
#负载均衡优先调用的ip段
prior-ip-pattern:
- 192.168.0.*
- 127.0.0.1
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
dev:
# MySql
# rewriteBatchedStatements=true:MyBatis-Plus saveBatch/updateBatchById 依赖该参数才会合并为多值语句,否则仍是逐条往返(仅 MySQL 支持,切换其他库需移除)
url: jdbc:mysql://localhost:3306/transport?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
username: root
password: root
# PostgreSQL
#url: jdbc:postgresql://127.0.0.1:5432/bladex
#username: postgres
#password: 123456
# Oracle
#url: jdbc:oracle:thin:@//127.0.0.1:1521/ORCLPDB
#username: BLADEX
#password: BLADEX
# SqlServer
#url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex
#username: bladex
#password: bladex
# DaMeng
#url: jdbc:dm://127.0.0.1:5236/BLADEX?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
#username: BLADEX
#password: BLADEX
# YashanDB
#url: jdbc:yasdb://127.0.0.1:1688/BLADEX
#username: BLADEX
#password: BLADEX
# KingbaseES
#url: jdbc:kingbase8://localhost:4321/bladex
#username: kingbase
#password: 123456
#第三方接口配置
thirdParty:
ocr:
# OCR磅单、车牌识别接口地址
baseUrl: http://127.0.0.1:8080
# OCR证件识别接口地址
baseOtherUrl: http://127.0.0.1:8080
wps:
# WPS开放接口地址
baseUrl: http://127.0.0.1:8080
oa:
# OA开放接口地址
baseUrl: http://127.0.0.1:8080
track:
# 轨迹开放接口地址
baseUrl: http://127.0.0.1:8080
mk:
# MK应用及接口配置,敏感值通过环境变量注入
appKey: ${MK_APP_KEY:}
appSecret: ${MK_APP_SECRET:}
baseUrl: ${MK_BASE_URL:http://127.0.0.1:8080}
loginUrl: ${MK_LOGIN_URL:http://127.0.0.1:8080}
oauthAppId: ${MK_OAUTH_APP_ID:}
oauthAppSecret: ${MK_OAUTH_APP_SECRET:}
subjectPrefix: ${MK_SUBJECT_PREFIX:}
templateCodePrefix: ${MK_TEMPLATE_CODE_PREFIX:}
mkSsoLoginUrl: ${MK_SSO_LOGIN_URL:/data/sys-oauth/ssoLogin}
checkReferer: ${MK_CHECK_REFERER:true}
erpBaseUrls: ${MK_ERP_BASE_URLS:http://127.0.0.1:2888}
getTokenUrl: ${MK_GET_TOKEN_URL:/authapi/getToken}
processSubmitUrl: ${MK_PROCESS_SUBMIT_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/submit}
processExecuteUrl: ${MK_PROCESS_EXECUTE_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/execute}
processDeleteUrl: ${MK_PROCESS_DELETE_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/delete}
getCurrentNodesUrl: ${MK_CURRENT_NODES_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/getCurNodesInfo}
getNodeHandlersUrl: ${MK_NODE_HANDLERS_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/getNodeHandlerInfos}
getManualNodeUrl: ${MK_MANUAL_NODE_URL:/openapi/sys-lbpm/sysLbpmTemplate/openSupport/getManualNode}
pushOrgDeptUrl: ${MK_PUSH_ORG_DEPT_URL:/openapi/sys-org/v2/push/orgDept}
pushPersonUrl: ${MK_PUSH_PERSON_URL:/openapi/sys-org/v2/push/person}
getOAuthCodeUrl: ${MK_OAUTH_CODE_URL:/openapi/sys-oauth/openOauth/getCode}
getOAuthTokenUrl: ${MK_OAUTH_TOKEN_URL:/openapi/sys-oauth/openOauth/getToken}
getOAuthUserInfoUrl: ${MK_OAUTH_USER_INFO_URL:/openapi/sys-oauth/openOauth/getUserInfo}
queryAuditNotesUrl: ${MK_QUERY_AUDIT_NOTES_URL:/openapi/sys-lbpm/lbpmAuditNote/openSupport/listNote}
querySenderListUrl: ${MK_QUERY_SENDER_LIST_URL:/openapi/sys-lbpm/sysLbpmProcessCard/openSupport/getSenderList}
downloadFileUrl: ${MK_DOWNLOAD_FILE_URL:/openapi/sys-attach/fileStream/download}
queryApprovalListUrl: ${MK_QUERY_APPROVAL_LIST_URL:/openapi/lbpm-approval/lbpmApproval/portal/list}
queryProcessListUrl: ${MK_QUERY_PROCESS_LIST_URL:/openapi/sys-lbpm/sysLbpmProcess/openSupport/list}
bfi:
# 业财融合(BFI)应用及接口配置,敏感值通过环境变量注入
baseUrl: ${BFI_BASE_URL:http://172.16.203.134:8000/gwzh/BFI}
authorization: ${BFI_AUTHORIZATION:3F7e8yI6RV8S53mJ9tYa0672r3W4n279}
clientId: ${BFI_CLIENT_ID:WLTMS}
clientSecret: ${BFI_CLIENT_SECRET:XDWLwltmstest@HT2026}
username: ${BFI_USERNAME:XDWL-03024}
accountId: ${BFI_ACCOUNT_ID:2454399096727798784}
language: ${BFI_LANGUAGE:zh_CN}
# 数据来源系统编码(推送金蝶公共参数:客商、付款申请等统一使用),默认 WLTMS(运输TMS)
srcSys: ${BFI_SRC_SYS:WLTMS}
# 付款申请推送配置(A103-3 付款申请保存)
payApply:
# 单据类型编码:ap_payapply_BT_S 采购付款申请、ap_payapply_oth_BT_S 其他付款申请
billtype: ${BFI_PAY_APPLY_BILLTYPE:ap_payapply_oth_BT_S}
# 组织编码、币种取自付款申请关联合同的所属组织与结算币种
# 汇率表编码
exratetable: ${BFI_PAY_APPLY_EXRATE_TABLE:01}
# 外部单据类型
srcType: ${BFI_PAY_APPLY_SRC_TYPE:0KzXs}
# 金蝶付款结果定时回写(A103-2 付款申请单查询 / A103-4 付款处理查询)
payResult:
# 回写任务开关
syncEnabled: ${BFI_PAY_RESULT_SYNC_ENABLED:true}
# 调度 cron,默认每10分钟
cron: ${BFI_PAY_RESULT_CRON:0 */10 * * * ?}
# 收票管理金蝶全票池发票定时绑定(A801-1 查询全票池发票数据)
invoiceReceipt:
# 绑定任务开关,默认关闭(联调稳定后开启)
syncEnabled: ${BFI_INVOICE_RECEIPT_SYNC_ENABLED:false}
# 调度 cron,默认每30分钟
cron: ${BFI_INVOICE_RECEIPT_CRON:0 */30 * * * ?}
# 增量窗口天数(按票池更新时间),首轮/兜底全量比对窗口
incrementDays: ${BFI_INVOICE_RECEIPT_INCREMENT_DAYS:30}
# 同步发票种类白名单(逗号分隔票易通编码,如 26,27 数电普票/专票),为空不限制
invoiceTypes: ${BFI_INVOICE_RECEIPT_INVOICE_TYPES:}
# 补偿绑定单轮限量(未绑定登记按发票号码精确补查条数上限)
compensateLimit: ${BFI_INVOICE_RECEIPT_COMPENSATE_LIMIT:200}
#百度OCR配置,API Key和Secret Key请通过环境变量注入
baidu:
ocr:
enabled: ${BAIDU_OCR_ENABLED:false}
api-key: ${BAIDU_OCR_API_KEY:}
secret-key: ${BAIDU_OCR_SECRET_KEY:}
endpoint: ${BAIDU_OCR_ENDPOINT:https://aip.baidubce.com}
connect-timeout: 5s
request-timeout: 30s
token-refresh-advance: 1m
#MinIO文件存储配置
file:
storage:
minio:
endpoint: http://8.148.239.157:9000
access-key-id: transport
access-key-secret: transport
bucket-name: transport
powerjob:
worker:
enabled: false
server-address: 172.16.203.228:7700