feat(shipping-notice): 新增发货批次和任务管理功能,支持批次创建与任务处理
This commit is contained in:
1 parent
457f0f4e5e
commit
634dee4b81
81 files changed
+9088
-3625
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 出货聊天:parse_review 订单表消息 payload 读取。
|
||||
*/
|
||||
import type { ChatMessage } from '../types/chat.types';
|
||||
import type { ShippingParseReviewPayload } from '../types/shipping.types';
|
||||
|
||||
export function getShippingParseReviewPayload(chatMsg: ChatMessage): ShippingParseReviewPayload | null {
|
||||
if (!chatMsg || chatMsg.type !== 'shipping-parse-review') return null;
|
||||
const payload = chatMsg.payload;
|
||||
if (!payload || typeof payload !== 'object') return null;
|
||||
const taskId = String((payload as ShippingParseReviewPayload).taskId || '').trim();
|
||||
const checkpoint = String((payload as ShippingParseReviewPayload).checkpoint || '').trim();
|
||||
const lines = (payload as ShippingParseReviewPayload).lines;
|
||||
if (!taskId || !checkpoint || !Array.isArray(lines)) return null;
|
||||
return payload as ShippingParseReviewPayload;
|
||||
}
|
||||
Reference in new issue
Block a user