新增钉钉 Stream SDK 依赖,支持无 HTTP 上下文的后台线程显式传入 token 进行审批回调。同时,完善了 MES 审批台账功能,新增审批记录同步、批量发起审批时的门禁与台账写入逻辑,增强了系统的审批流管理能力。

This commit is contained in:
geht
2026-06-05 10:44:30 +08:00
parent 4785c55e52
commit fc4e3211ad
73 changed files with 5225 additions and 240 deletions

View File

@@ -0,0 +1,31 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
canLaunch = '/xslmes/approvalGate/canLaunch',
canLaunchBatch = '/xslmes/approvalGate/canLaunchBatch',
history = '/xslmes/approvalGate/history',
}
export interface ApprovalGateVo {
allowed?: boolean;
reason?: string;
bizTable?: string;
bizDataId?: string;
latestRecordId?: string;
latestStatus?: string;
latestChannel?: string;
latestChannelText?: string;
latestStatusText?: string;
}
/** 检查是否允许发起审批 */
export const checkCanLaunch = (params: { bizTable: string; bizDataId: string }) =>
defHttp.get<ApprovalGateVo>({ url: Api.canLaunch, params });
/** 批量检查是否允许发起审批 */
export const checkCanLaunchBatch = (params: { bizTable: string; bizDataIds: string[] }) =>
defHttp.post<ApprovalGateVo[]>({ url: Api.canLaunchBatch, params });
/** 查询业务单据审批台账历史 */
export const getApprovalHistory = (params: { bizTable: string; bizDataId: string }) =>
defHttp.get({ url: Api.history, params });