feat(storage): group archives by the BPM order field
This commit is contained in:
1 parent
607b240aa3
commit
fff2a29ec0
13 files changed
+163
-18
No files matched your search
@@ -16,6 +16,11 @@ function buildFilename(metadata = {}) {
|
||||
function validateSnapshot(snapshot) {
|
||||
if (!snapshot || typeof snapshot.html !== 'string' || !snapshot.html.trim() || snapshot.html.length > 12_000_000) throw new Error('页面内容为空或超过大小限制。');
|
||||
buildFilename(snapshot.metadata);
|
||||
if (snapshot.bpmOrder != null && (
|
||||
typeof snapshot.bpmOrder !== 'object' || Array.isArray(snapshot.bpmOrder) ||
|
||||
!/^OFR_(?:LSCP|BS|KD|WY)_Applicant\.OrderNum$/.test(snapshot.bpmOrder.field) ||
|
||||
typeof snapshot.bpmOrder.value !== 'string' || snapshot.bpmOrder.value !== snapshot.metadata.order
|
||||
)) throw new Error('BPM 订单号字段与导出订单号不一致,请重新采集。');
|
||||
if (snapshot.styles !== undefined && (!Array.isArray(snapshot.styles) || snapshot.styles.some(s => typeof s !== 'string'))) throw new Error('页面样式格式不正确。');
|
||||
if (snapshot.images !== undefined && (!Array.isArray(snapshot.images) || snapshot.images.length > 200)) throw new Error('页面图片格式不正确。');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user