fix: close order intake five minutes before scheduled mail

This commit is contained in:
abaishu0730 committed 2026-10-26 13:42:06 +08:00
1 parent 5fe461c77d
commit 4d8f393895
17 files changed
+137 -24

No files matched your search

@@ -9,6 +9,8 @@ function fixture(t,{all=false}={}){
let store=new RuleStore(path.join(dir,'state'),options);t.after(()=>{store.close();fs.rmSync(dir,{recursive:true,force:true});});
const ids=all?store.all('rules').map(r=>r.id):['bs-change'];let sample;
for(const id of ids){const rule=store.get('rules',id).draft;
// Isolated BPM catalog evidence is distinct from historical field samples.
require('../../src/modules/order-rules/scope-catalog.cjs').observe(store,require('../../src/modules/order-rules/scopes.cjs').scopesFor(rule).map(scope=>({...scope,source:'todo'})));
sample={connectionId:'c1',source:'history',configurationOnly:true,timestampType:'process-start',instanceId:'history-'+id,taskId:'h-'+id,revision:'1',processName:rule.processNames[0],processVersion:'test-1',nodeName:'历史节点',receivedAt:'2026-10-21T01:00:00Z',serialNum:'S-'+id,title:'订单号:123456 客户简称:测试客户',fields:{order:'123456'}};
const captured=store.recordCapture({sample,snapshot:{processVersion:'test-1',fields:[{path:'order',label:'订单号',value:'123456'}]},taskId:sample.taskId});
const active=activateFieldMapping(store,{sampleId:captured.id,processName:sample.processName,processVersion:sample.processVersion,fields:{orderNo:'order'}},admin);