weaver-work-cli 0.1.75 → 0.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
- package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
- package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
- package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
- package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-24RL44SE.js} +3 -3
- package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
- package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
- package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
- package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
- package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
- package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
- package/dist/chunks/{chunk-NWYHCZTY.js → chunk-AZC53XSQ.js} +1 -1
- package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
- package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
- package/dist/chunks/{chunk-2AUFKU2D.js → chunk-H6N6U2D6.js} +10 -10
- package/dist/chunks/{chunk-I6NOHKEK.js → chunk-KJA7CRES.js} +1 -1
- package/dist/chunks/{chunk-PG5YSNYY.js → chunk-L5SCNJKX.js} +2 -2
- package/dist/chunks/{chunk-4FCBEWNB.js → chunk-MS7MKBGJ.js} +49 -49
- package/dist/chunks/{chunk-QJWVYOOV.js → chunk-NZQRW4KL.js} +2 -2
- package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
- package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
- package/dist/chunks/{chunk-BSR5TM7U.js → chunk-Q7RXCK2Y.js} +4 -4
- package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-R4PN3OFK.js} +6 -6
- package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
- package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-SQFKBWTR.js} +32 -32
- package/dist/chunks/{chunk-KWJEICD4.js → chunk-T7HVQ2WP.js} +2 -2
- package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
- package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
- package/dist/chunks/{chunk-ERZY6GYL.js → chunk-WHI6YAUE.js} +1 -1
- package/dist/chunks/{chunk-KEA4XQPO.js → chunk-WJQJ7YEX.js} +4 -4
- package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
- package/dist/chunks/{cli-FULPXIKJ.js → cli-DFLV57LO.js} +33 -33
- package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
- package/dist/chunks/{conflict-5BKCDV2F.js → conflict-72Q6DM4I.js} +2 -2
- package/dist/chunks/{contract-WI23OXVC.js → contract-IRNRQ5FY.js} +1 -1
- package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
- package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-UGTDI7SP.js} +6 -6
- package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
- package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
- package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-PHIBBUIG.js} +1 -1
- package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-5WOXFE67.js} +3 -3
- package/dist/chunks/{env-ZAQZ7EHN.js → env-H4ALHESA.js} +2 -2
- package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
- package/dist/chunks/{factory-XRI6KZ7H.js → factory-COX6AVK7.js} +1 -1
- package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
- package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-ZIWQQO4G.js} +3 -3
- package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
- package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
- package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
- package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
- package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
- package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
- package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
- package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
- package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
- package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
- package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-MZ3EZYDL.js} +4 -4
- package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
- package/dist/chunks/{meeting-WC5LD3IO.js → meeting-XE6CTXYA.js} +12 -12
- package/dist/chunks/{minute-doc-OQUMDTKG.js → minute-doc-4BA2R5EA.js} +4 -4
- package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
- package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
- package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
- package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
- package/dist/chunks/{project-4XVBQ3HX.js → project-XREEXFU2.js} +1 -1
- package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
- package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TSQWOGQD.js} +1 -1
- package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
- package/dist/chunks/{registry-NBTBXR4L.js → registry-7UDUWYB5.js} +11 -11
- package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-FO3HLPNB.js} +4 -4
- package/dist/chunks/{schedule-XOISYUPB.js → schedule-DHNNOHVS.js} +4 -4
- package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
- package/dist/chunks/{workflow-V54LJPXL.js → workflow-MAGCHWYZ.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/shortcuts/invoice/business-response.js +13 -0
- package/dist/shortcuts/invoice/calendar.js +24 -0
- package/dist/shortcuts/invoice/host.js +26 -15
- package/dist/shortcuts/invoice/index.js +2 -2
- package/dist/shortcuts/invoice/invoice-record.js +7 -2
- package/dist/shortcuts/invoice/manifest.js +179 -155
- package/dist/shortcuts/invoice/operations/get.js +9 -3
- package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
- package/dist/shortcuts/invoice/operations/registry.js +4 -5
- package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
- package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
- package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
- package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
- package/dist/shortcuts/invoice/operations/reim.js +2 -126
- package/dist/shortcuts/invoice/operations/shared.js +15 -17
- package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
- package/dist/shortcuts/invoice/projection.js +14 -0
- package/dist/shortcuts/invoice/read-enrichment.js +123 -0
- package/docs/agent-invoice.md +28 -2
- package/docs/invoice.md +60 -9
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +36 -7
- package/skills/weaver-e10-recruit-stage/SKILL.md +104 -95
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +43 -33
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +36 -4
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +168 -27
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +10 -13
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +13 -14
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +20 -25
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +21 -30
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -1
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +15 -9
- package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
- package/skills/weaver-e10-yepiaotong.zip +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { InvoiceCliError, invoiceValidationError } from '../errors.js';
|
|
2
|
+
import { asNonEmptyString, assertBusinessSuccess } from './shared.js';
|
|
3
|
+
const REQUEST_BROWSER_PATH = '/api/workflow/core/common/browser/data/wfcRequest';
|
|
4
|
+
const BLUE_INVOICE_WORKFLOW = {
|
|
5
|
+
fixedVersionId: '100003460000000214',
|
|
6
|
+
versionid: 1,
|
|
7
|
+
relateFormTypes: [],
|
|
8
|
+
// E10 IDs exceed Number.MAX_SAFE_INTEGER; keep the original decimal text.
|
|
9
|
+
subCompanyId: '6998005497747218000',
|
|
10
|
+
activeWfId: '100003460000000214',
|
|
11
|
+
name: '合同收款发票开具及快递申请',
|
|
12
|
+
moduleName: 'workflow',
|
|
13
|
+
formIds: ['100004030000000086'],
|
|
14
|
+
id: '100003460000000214',
|
|
15
|
+
workflowtype: '100501980000000032',
|
|
16
|
+
workflowTypeName: '类型:项目管理',
|
|
17
|
+
status: 1,
|
|
18
|
+
};
|
|
19
|
+
function invalidResponse() {
|
|
20
|
+
throw new InvoiceCliError('api', 'issuing_red_requests_invalid', '查询蓝字开票申请返回的数据格式不正确,无法确认红冲候选', { exitCode: 1 });
|
|
21
|
+
}
|
|
22
|
+
function record(value) {
|
|
23
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
24
|
+
return invalidResponse();
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
function textValue(row, ...keys) {
|
|
28
|
+
for (const key of keys) {
|
|
29
|
+
const value = row[key];
|
|
30
|
+
if (typeof value === 'string' && value.trim())
|
|
31
|
+
return value.trim();
|
|
32
|
+
if (typeof value === 'number' && Number.isSafeInteger(value))
|
|
33
|
+
return String(value);
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
function booleanValue(row, ...keys) {
|
|
38
|
+
for (const key of keys) {
|
|
39
|
+
if (typeof row[key] === 'boolean')
|
|
40
|
+
return row[key];
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function requestIdOf(row) {
|
|
45
|
+
// A numeric ID that has already lost precision must never become a page value.
|
|
46
|
+
const raw = row.requestid ?? row.requestId ?? row.id;
|
|
47
|
+
if (typeof raw === 'number' && !Number.isSafeInteger(raw))
|
|
48
|
+
return invalidResponse();
|
|
49
|
+
const id = typeof raw === 'string' ? raw.trim() : typeof raw === 'number' ? String(raw) : '';
|
|
50
|
+
if (!/^[1-9]\d*$/u.test(id))
|
|
51
|
+
return invalidResponse();
|
|
52
|
+
return id;
|
|
53
|
+
}
|
|
54
|
+
function normalizeRequest(value) {
|
|
55
|
+
const row = record(value);
|
|
56
|
+
return {
|
|
57
|
+
requestId: requestIdOf(row),
|
|
58
|
+
requestName: textValue(row, 'requestname', 'requestName', 'title', 'name'),
|
|
59
|
+
title: textValue(row, 'title'),
|
|
60
|
+
name: textValue(row, 'name'),
|
|
61
|
+
requestMark: textValue(row, 'requestmark', 'requestMark'),
|
|
62
|
+
workflowId: textValue(row, 'workflowid', 'workflowId'),
|
|
63
|
+
workflowName: textValue(row, 'workflowname', 'workflowName'),
|
|
64
|
+
flowStatus: textValue(row, 'flowstatus', 'flowStatus'),
|
|
65
|
+
flowStatusCode: textValue(row, 'flowstatuscode', 'flowStatusCode'),
|
|
66
|
+
creator: textValue(row, 'creater', 'creator', 'creatername', 'creatorName'),
|
|
67
|
+
creatorId: textValue(row, 'createrid', 'creatorId'),
|
|
68
|
+
createTime: textValue(row, 'createdatetime', 'createTime', 'createDateTime'),
|
|
69
|
+
finished: booleanValue(row, 'isComplete', 'finished', 'finish'),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function positiveInteger(value, name, defaultValue, maximum = Number.MAX_SAFE_INTEGER) {
|
|
73
|
+
if (value === undefined)
|
|
74
|
+
return defaultValue;
|
|
75
|
+
if (typeof value !== 'number' || !Number.isSafeInteger(value) || value < 1 || value > maximum) {
|
|
76
|
+
throw invoiceValidationError('input_invalid', `${name} 必须是 1 到 ${maximum} 之间的整数`);
|
|
77
|
+
}
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
function pagination(root, data, current, pageSize, count) {
|
|
81
|
+
const rawTotal = data.total ?? root.total;
|
|
82
|
+
let total;
|
|
83
|
+
if (rawTotal !== undefined && rawTotal !== null) {
|
|
84
|
+
if (typeof rawTotal !== 'number' || !Number.isSafeInteger(rawTotal) || rawTotal < 0)
|
|
85
|
+
return invalidResponse();
|
|
86
|
+
total = rawTotal;
|
|
87
|
+
}
|
|
88
|
+
const explicitHasMore = data.hasMore ?? root.hasMore;
|
|
89
|
+
if (explicitHasMore !== undefined && explicitHasMore !== null && typeof explicitHasMore !== 'boolean')
|
|
90
|
+
return invalidResponse();
|
|
91
|
+
return {
|
|
92
|
+
current,
|
|
93
|
+
pageSize,
|
|
94
|
+
hasMore: typeof explicitHasMore === 'boolean'
|
|
95
|
+
? explicitHasMore
|
|
96
|
+
: total !== undefined ? current < Math.ceil(total / pageSize) : count >= pageSize,
|
|
97
|
+
...(total !== undefined ? { total } : {}),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Search blue invoice applications for the red-invoice workflow's browser field. */
|
|
101
|
+
export class InvoiceIssuingRedRequestsListOperation {
|
|
102
|
+
name = 'invoice.issuing.red.requests.list';
|
|
103
|
+
async execute(input, { host }) {
|
|
104
|
+
const customerName = asNonEmptyString(input.customerName, 'customerName');
|
|
105
|
+
const current = positiveInteger(input.current, 'current', 1);
|
|
106
|
+
const pageSize = positiveInteger(input.pageSize, 'pageSize', 10, 100);
|
|
107
|
+
const result = await host.invoiceRequest({
|
|
108
|
+
path: REQUEST_BROWSER_PATH,
|
|
109
|
+
method: 'POST',
|
|
110
|
+
body: {
|
|
111
|
+
browserMultiple: true,
|
|
112
|
+
currentTab: 'all',
|
|
113
|
+
current,
|
|
114
|
+
pageSize,
|
|
115
|
+
formDatas: {
|
|
116
|
+
workflowid: [{ term: 'in', browserDatas: [{ ...BLUE_INVOICE_WORKFLOW }] }],
|
|
117
|
+
},
|
|
118
|
+
quickSearchDatas: { requestname: customerName, requestmark: customerName },
|
|
119
|
+
},
|
|
120
|
+
operation: this.name,
|
|
121
|
+
});
|
|
122
|
+
assertBusinessSuccess(result, 'issuing_red_requests_query_failed', '查询蓝字开票申请失败');
|
|
123
|
+
const root = record(result);
|
|
124
|
+
const data = record(root.data);
|
|
125
|
+
if (!Array.isArray(data.data))
|
|
126
|
+
return invalidResponse();
|
|
127
|
+
// Keep every browser candidate, including applications still in approval.
|
|
128
|
+
const items = data.data.map(normalizeRequest);
|
|
129
|
+
return {
|
|
130
|
+
status: 'COMPLETE',
|
|
131
|
+
data: {
|
|
132
|
+
items,
|
|
133
|
+
count: items.length,
|
|
134
|
+
...pagination(root, data, current, pageSize, items.length),
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -7,12 +7,13 @@ import { InvoiceGetOperation } from './get.js';
|
|
|
7
7
|
import { InvoiceImportApplyOperation, InvoiceImportPrepareOperation } from './import.js';
|
|
8
8
|
import { InvoiceIssuingContractDetailOperation } from './issuing-contract-detail.js';
|
|
9
9
|
import { InvoiceIssuingContractsListOperation } from './issuing-contracts.js';
|
|
10
|
+
import { InvoiceIssuingRedRequestsListOperation } from './issuing-red-requests.js';
|
|
10
11
|
import { InvoiceListOperation } from './list.js';
|
|
11
12
|
import { InvoiceOcrPreviewOperation } from './ocr-preview.js';
|
|
12
|
-
import {
|
|
13
|
+
import { InvoiceReimFileOcrPreviewOperation, InvoiceReimRequestsListOperation, InvoiceReimWorkflowResolveOperation, } from './reim.js';
|
|
13
14
|
import { InvoiceReimCandidatesListOperation } from './reim-auto.js';
|
|
14
15
|
import { InvoiceReimCustomerSearchOperation } from './reim-customer.js';
|
|
15
|
-
import { InvoiceReimRelationListOperation, InvoiceReimRelationSaveOperation,
|
|
16
|
+
import { InvoiceReimRelationListOperation, InvoiceReimRelationSaveOperation, } from './reim-relation.js';
|
|
16
17
|
import { InvoiceReimSubsidySubmitOperation } from './reim-subsidy.js';
|
|
17
18
|
import { InvoiceUpdateApplyOperation, InvoiceUpdatePrepareOperation } from './update.js';
|
|
18
19
|
import { InvoiceUploadOperation } from './upload.js';
|
|
@@ -39,15 +40,13 @@ function buildRegistry() {
|
|
|
39
40
|
new InvoiceReimRequestsListOperation(),
|
|
40
41
|
new InvoiceReimWorkflowResolveOperation(),
|
|
41
42
|
new InvoiceReimCandidatesListOperation(),
|
|
42
|
-
new InvoiceReimEmployeeSuperiorsOperation(),
|
|
43
|
-
new InvoiceReimFieldSearchOperation(),
|
|
44
43
|
new InvoiceReimCustomerSearchOperation(),
|
|
45
|
-
new InvoiceReimRelationSearchOperation(),
|
|
46
44
|
new InvoiceReimRelationSaveOperation(),
|
|
47
45
|
new InvoiceReimRelationListOperation(),
|
|
48
46
|
new InvoiceReimSubsidySubmitOperation(),
|
|
49
47
|
new InvoiceIssuingContractsListOperation(),
|
|
50
48
|
new InvoiceIssuingContractDetailOperation(),
|
|
49
|
+
new InvoiceIssuingRedRequestsListOperation(),
|
|
51
50
|
];
|
|
52
51
|
for (const handler of handlers) {
|
|
53
52
|
if (registry.has(handler.name))
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { invoiceValidationError } from '../errors.js';
|
|
2
|
+
import { FULL_EXT_MASK, invoiceExtInfo, invoiceRecordOf } from '../invoice-record.js';
|
|
3
|
+
import { readInvoiceEmployeeInfo } from '../read-enrichment.js';
|
|
4
|
+
import { readInvoicePreApprovals } from '../preapproval-enrichment.js';
|
|
2
5
|
import { isRedReversedInvoice, optionalEpochSeconds, reqBase, workflow } from './shared.js';
|
|
3
6
|
const MONEY_PATTERN = /^-?\d+(?:\.\d{1,2})?$/u;
|
|
4
7
|
function boundedInteger(value, name, options) {
|
|
@@ -53,6 +56,10 @@ function reimRequestNames(info) {
|
|
|
53
56
|
function candidateItem(info) {
|
|
54
57
|
const pro = info?.comm_info?.pro || {};
|
|
55
58
|
const price = info?.comm_info?.price || {};
|
|
59
|
+
const extInfo = invoiceExtInfo(info);
|
|
60
|
+
const consumptionTime = info?.modify_info?.cstm;
|
|
61
|
+
const hasConsumptionTime = typeof consumptionTime === 'number'
|
|
62
|
+
|| typeof consumptionTime === 'string' && consumptionTime.trim().length > 0;
|
|
56
63
|
return {
|
|
57
64
|
fid: invoiceRecordId(info),
|
|
58
65
|
number: String(info.number ?? ''),
|
|
@@ -61,6 +68,10 @@ function candidateItem(info) {
|
|
|
61
68
|
buyer: String(info?.comm_info?.buyer?.company ?? ''),
|
|
62
69
|
payer: String(info?.comm_info?.payer?.company ?? ''),
|
|
63
70
|
typeName: String(pro.cname ?? ''),
|
|
71
|
+
content: String(pro.content ?? '').trim() || extInfo.content || '',
|
|
72
|
+
extInfo,
|
|
73
|
+
...(hasConsumptionTime ? { consumptionTime } : {}),
|
|
74
|
+
travel_ids: Array.isArray(info.travel_ids) ? info.travel_ids : [],
|
|
64
75
|
status: typeof pro.status === 'number' ? pro.status : Number(pro.status ?? 0),
|
|
65
76
|
valid: typeof pro.valid === 'number' ? pro.valid : Number(pro.valid ?? 0),
|
|
66
77
|
reimRequests: reimRequestNames(info),
|
|
@@ -70,6 +81,9 @@ function candidateItem(info) {
|
|
|
70
81
|
export class InvoiceReimCandidatesListOperation {
|
|
71
82
|
name = 'invoice.reim.candidates.list';
|
|
72
83
|
async execute(input, { host }) {
|
|
84
|
+
if (input.includePreApprovals !== undefined && typeof input.includePreApprovals !== 'boolean') {
|
|
85
|
+
throw invoiceValidationError('input_invalid', 'includePreApprovals 必须是布尔值');
|
|
86
|
+
}
|
|
73
87
|
const pageSize = boundedInteger(input.page_size, 'page_size', { min: 10, max: 200, defaultValue: 50 });
|
|
74
88
|
const maxItems = boundedInteger(input.max_items, 'max_items', { min: 1, max: 500, defaultValue: 200 });
|
|
75
89
|
const dateBegin = optionalEpochSeconds(input.date_begin, 'date_begin');
|
|
@@ -88,6 +102,7 @@ export class InvoiceReimCandidatesListOperation {
|
|
|
88
102
|
let hasMore = false;
|
|
89
103
|
let startPos = 0;
|
|
90
104
|
let pulled = 0;
|
|
105
|
+
let employee;
|
|
91
106
|
do {
|
|
92
107
|
const body = {
|
|
93
108
|
flag: 0,
|
|
@@ -96,6 +111,7 @@ export class InvoiceReimCandidatesListOperation {
|
|
|
96
111
|
req_type: 1,
|
|
97
112
|
sreim: '3',
|
|
98
113
|
bill_type: 0,
|
|
114
|
+
mext: FULL_EXT_MASK,
|
|
99
115
|
req_base: reqBase(),
|
|
100
116
|
};
|
|
101
117
|
if (dateBegin !== undefined)
|
|
@@ -106,11 +122,25 @@ export class InvoiceReimCandidatesListOperation {
|
|
|
106
122
|
body.consumption_tm_begin = consumptionBegin;
|
|
107
123
|
if (consumptionEnd !== undefined)
|
|
108
124
|
body.consumption_tm_end = consumptionEnd;
|
|
109
|
-
const
|
|
125
|
+
const request = { path: '/api/inc/sync', method: 'POST', body, operation: this.name };
|
|
126
|
+
let result;
|
|
127
|
+
if (!employee) {
|
|
128
|
+
const [response, employeeResult] = await Promise.all([
|
|
129
|
+
host.invoiceRequest(request),
|
|
130
|
+
readInvoiceEmployeeInfo(host, this.name),
|
|
131
|
+
]);
|
|
132
|
+
result = response;
|
|
133
|
+
employee = employeeResult;
|
|
134
|
+
warnings.push(...employee.warnings);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
result = await host.invoiceRequest(request);
|
|
138
|
+
}
|
|
110
139
|
total = Number(result?.total ?? 0);
|
|
111
140
|
const infos = Array.isArray(result?.infos) ? result.infos : [];
|
|
112
|
-
for (const
|
|
141
|
+
for (const raw of infos) {
|
|
113
142
|
pulled += 1;
|
|
143
|
+
const info = invoiceRecordOf(raw);
|
|
114
144
|
if (isRedReversedInvoice(info))
|
|
115
145
|
continue;
|
|
116
146
|
kept.push(info);
|
|
@@ -146,6 +176,12 @@ export class InvoiceReimCandidatesListOperation {
|
|
|
146
176
|
availableAmount: summarize(available),
|
|
147
177
|
assignedAmount: summarize(assigned),
|
|
148
178
|
};
|
|
179
|
+
const approval = await readInvoicePreApprovals(host, {
|
|
180
|
+
operation: this.name,
|
|
181
|
+
invoices: capped,
|
|
182
|
+
includePreApprovals: input.includePreApprovals,
|
|
183
|
+
});
|
|
184
|
+
warnings.push(...approval.warnings);
|
|
149
185
|
return {
|
|
150
186
|
status: 'COMPLETE',
|
|
151
187
|
data: {
|
|
@@ -155,6 +191,8 @@ export class InvoiceReimCandidatesListOperation {
|
|
|
155
191
|
available,
|
|
156
192
|
assigned,
|
|
157
193
|
summary,
|
|
194
|
+
employeeInfo: employee?.info ?? null,
|
|
195
|
+
preApprovals: approval.preApprovals,
|
|
158
196
|
warnings,
|
|
159
197
|
workflow: workflow(this.name, 'COMPLETE'),
|
|
160
198
|
},
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { InvoiceCliError } from '../errors.js';
|
|
2
|
+
import { assertBusinessSuccess } from './shared.js';
|
|
3
|
+
export const CUSTOMER_PROJECT_NAME_FIELD = '1020275734718578690';
|
|
4
|
+
const PAGE_ID = '1144658644836794483';
|
|
5
|
+
const APP_ID = '1136121637129502949';
|
|
6
|
+
const COMP_ID = 'f5b2b31aeb2e4e46956464bba7d2e52c';
|
|
7
|
+
const PAGE_SIZE = 10;
|
|
8
|
+
const MAX_PAGES = 20;
|
|
9
|
+
function projectFilter(customerId) {
|
|
10
|
+
return [{
|
|
11
|
+
conditionType: 'and', dataType: 'field', value: customerId,
|
|
12
|
+
filterFields: [{
|
|
13
|
+
compType: 'Ebuilder',
|
|
14
|
+
dataset: {
|
|
15
|
+
id: '1020275562853482532', text: '项目基础', type: 'LOGIC', groupId: 'weaver-ebuilder-form-service',
|
|
16
|
+
isPhysical: true, usage: 'all', detailTable: false, objType: 'physical', module: 'ebuilder',
|
|
17
|
+
appId: '1020021532740116481',
|
|
18
|
+
ebuilderDataConfig: { dataSetup: { dataSource: 'ALL', dataPermission: 'HAVE_PERMISSION_DATA', dataType: 'ALL' }, type: 'FORM' },
|
|
19
|
+
isFormModuleSelected: true, hasChangeGroupFilter: false, hasChangePermissions: true, hasChangeExtConfig: false,
|
|
20
|
+
},
|
|
21
|
+
fieldName: 'field_1149506138249011280', id: '1149506138249011280', objId: '1020275562853482532',
|
|
22
|
+
type: 'Ebuilder', text: '关联客户',
|
|
23
|
+
}],
|
|
24
|
+
}];
|
|
25
|
+
}
|
|
26
|
+
function projectError(subtype, message) {
|
|
27
|
+
return new InvoiceCliError('api', subtype, message, { exitCode: 1 });
|
|
28
|
+
}
|
|
29
|
+
function project(value) {
|
|
30
|
+
const row = value && typeof value === 'object' && !Array.isArray(value) ? value : null;
|
|
31
|
+
if (!row || typeof row.form_data_id !== 'string' || !/^[1-9]\d*$/u.test(row.form_data_id)
|
|
32
|
+
|| typeof row[CUSTOMER_PROJECT_NAME_FIELD] !== 'string' || !row[CUSTOMER_PROJECT_NAME_FIELD].trim()) {
|
|
33
|
+
throw projectError('reim_customer_projects_invalid', '客户项目查询返回了无效的项目 ID 或项目名称');
|
|
34
|
+
}
|
|
35
|
+
return { relatedProjectName: row[CUSTOMER_PROJECT_NAME_FIELD], relatedProjectId: row.form_data_id };
|
|
36
|
+
}
|
|
37
|
+
/** 按当前客户 ID 直接查项目基础列表,不读取历史报销单,也不混用其他客户的分页。 */
|
|
38
|
+
export async function readInvoiceCustomerProjects(host, customerId, operation, deadline, cancelled = () => false) {
|
|
39
|
+
const projects = new Map();
|
|
40
|
+
const seenPages = new Set();
|
|
41
|
+
for (let pageNo = 1; pageNo <= MAX_PAGES; pageNo += 1) {
|
|
42
|
+
if (cancelled())
|
|
43
|
+
throw projectError('reim_customer_projects_incomplete', '客户项目查询已停止');
|
|
44
|
+
const remaining = deadline - Date.now();
|
|
45
|
+
if (remaining <= 0)
|
|
46
|
+
throw projectError('reim_customer_projects_incomplete', '客户项目查询达到本次查询时间上限,项目候选未读完整');
|
|
47
|
+
const result = await host.invoiceMultipartRequest({
|
|
48
|
+
path: '/api/ebuilder/form/eblist/getData', method: 'POST', operation,
|
|
49
|
+
timeoutMs: Math.min(5_000, remaining),
|
|
50
|
+
headers: {
|
|
51
|
+
ebbusinessid: PAGE_ID, langtype: 'zh_CN', pragma: 'no-cache', priority: 'u=1, i',
|
|
52
|
+
timezoneoffset: '-480', Accept: '*/*',
|
|
53
|
+
},
|
|
54
|
+
fields: {
|
|
55
|
+
[`appId_${PAGE_ID}`]: APP_ID,
|
|
56
|
+
filter: projectFilter(customerId),
|
|
57
|
+
pageAppId: APP_ID, compId: COMP_ID, pageId: PAGE_ID,
|
|
58
|
+
pageNo: String(pageNo), pageSize: String(PAGE_SIZE),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
assertBusinessSuccess(result, 'reim_customer_projects_failed', '查询客户相关项目失败');
|
|
62
|
+
const data = result?.data;
|
|
63
|
+
if (!data || !Array.isArray(data.list))
|
|
64
|
+
throw projectError('reim_customer_projects_invalid', '客户项目查询未返回 data.list 数组');
|
|
65
|
+
const page = data.list.map(project);
|
|
66
|
+
const signature = JSON.stringify(page.map((item) => item.relatedProjectId).sort());
|
|
67
|
+
if (seenPages.has(signature))
|
|
68
|
+
throw projectError('reim_customer_projects_incomplete', '客户项目查询返回重复页,无法确认完整项目候选');
|
|
69
|
+
seenPages.add(signature);
|
|
70
|
+
for (const item of page) {
|
|
71
|
+
if (!projects.has(item.relatedProjectId))
|
|
72
|
+
projects.set(item.relatedProjectId, item);
|
|
73
|
+
}
|
|
74
|
+
// count 可能错误为 0;按每个客户的原始页长独立续页,去重后再返回。
|
|
75
|
+
if (data.list.length < PAGE_SIZE)
|
|
76
|
+
return [...projects.values()];
|
|
77
|
+
}
|
|
78
|
+
throw projectError('reim_customer_projects_incomplete', '客户项目查询达到 20 页上限,项目候选未读完整');
|
|
79
|
+
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { InvoiceCliError, invoiceValidationError } from '../errors.js';
|
|
2
2
|
import { asNonEmptyString, assertBusinessSuccess } from './shared.js';
|
|
3
|
+
import { readInvoiceCustomerProjects } from './reim-customer-projects.js';
|
|
3
4
|
const CUSTOMER_PAGE_ID = '1218181956452048911';
|
|
4
5
|
const CUSTOMER_COMP_ID = 'c39b9e14c0034336adf9e9bc39aeed75';
|
|
5
6
|
const CUSTOMER_OBJECT_ID = '1173221220888059964';
|
|
6
7
|
const CUSTOMER_NAME_FIELD = '1173221220888062665';
|
|
7
8
|
const CUSTOMER_BEARER_FIELD = '1173221220888062667';
|
|
9
|
+
const CUSTOMER_PAGE_SIZE = 10;
|
|
10
|
+
const CUSTOMER_MAX_PAGES = 20;
|
|
8
11
|
function customerFilter(keywords) {
|
|
9
12
|
return [
|
|
10
13
|
{
|
|
11
14
|
conditionType: 'or',
|
|
12
15
|
dataType: 'field',
|
|
13
|
-
id: 'f9bf956948e54ed58ac32988ff8a84c8',
|
|
14
|
-
conditionComId: `${CUSTOMER_COMP_ID}_quick_EXCLUDECACHE`,
|
|
15
16
|
filterFields: [{
|
|
16
|
-
compId: CUSTOMER_COMP_ID,
|
|
17
17
|
compType: 'Text',
|
|
18
18
|
dataset: {
|
|
19
19
|
isPhysical: true,
|
|
20
|
-
ebuilderDataConfig: { dataSetup: {}, type: 'FORM' },
|
|
21
20
|
detailTable: false,
|
|
22
21
|
groupId: 'weaver-ebuilder-form-service',
|
|
23
22
|
usage: 'all',
|
|
@@ -30,17 +29,9 @@ function customerFilter(keywords) {
|
|
|
30
29
|
fieldName: `field_${CUSTOMER_NAME_FIELD}`,
|
|
31
30
|
id: CUSTOMER_NAME_FIELD,
|
|
32
31
|
objId: CUSTOMER_OBJECT_ID,
|
|
33
|
-
type: 'String',
|
|
34
|
-
text: '名称',
|
|
35
32
|
}],
|
|
36
33
|
value: keywords,
|
|
37
34
|
},
|
|
38
|
-
{
|
|
39
|
-
conditionComId: `${CUSTOMER_COMP_ID}_filter_EXCLUDECACHE`,
|
|
40
|
-
conditionType: 'and',
|
|
41
|
-
dataType: 'classification',
|
|
42
|
-
useConfig: true,
|
|
43
|
-
},
|
|
44
35
|
];
|
|
45
36
|
}
|
|
46
37
|
function invalidResponse() {
|
|
@@ -56,32 +47,34 @@ function responseString(value) {
|
|
|
56
47
|
return invalidResponse();
|
|
57
48
|
return value;
|
|
58
49
|
}
|
|
50
|
+
function responseId(value) {
|
|
51
|
+
const id = responseString(value);
|
|
52
|
+
if (!/^[1-9]\d*$/u.test(id))
|
|
53
|
+
return invalidResponse();
|
|
54
|
+
return id;
|
|
55
|
+
}
|
|
59
56
|
function projectCustomer(value) {
|
|
60
57
|
const row = record(value);
|
|
61
58
|
const bearers = row[CUSTOMER_BEARER_FIELD] ?? [];
|
|
62
59
|
if (!Array.isArray(bearers))
|
|
63
60
|
return invalidResponse();
|
|
64
61
|
return {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
customerId: responseId(row.form_data_id ?? row.id),
|
|
63
|
+
customerName: responseString(row[CUSTOMER_NAME_FIELD]),
|
|
64
|
+
expenseBearer: bearers.map((value) => {
|
|
68
65
|
const bearer = record(value);
|
|
69
66
|
return {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
type: responseString(bearer.type),
|
|
67
|
+
expenseBearerName: responseString(bearer.name),
|
|
68
|
+
expenseBearerId: responseId(bearer.id),
|
|
73
69
|
};
|
|
74
70
|
}),
|
|
75
71
|
};
|
|
76
72
|
}
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
throw invoiceValidationError('input_invalid', '客户查询只接受 keywords,其他查询参数固定');
|
|
83
|
-
}
|
|
84
|
-
const keywords = asNonEmptyString(input.keywords, 'keywords');
|
|
73
|
+
/** 统一客户名称查询,项目和承担主体均基于本轮返回的真实客户。 */
|
|
74
|
+
async function searchInvoiceCustomers(host, keywords, operation) {
|
|
75
|
+
const customers = new Map();
|
|
76
|
+
const seenPages = new Set();
|
|
77
|
+
for (let pageNo = 1; pageNo <= CUSTOMER_MAX_PAGES; pageNo += 1) {
|
|
85
78
|
const result = await host.invoiceMultipartRequest({
|
|
86
79
|
path: '/api/ebuilder/coms/nlist/getData',
|
|
87
80
|
method: 'POST',
|
|
@@ -97,15 +90,71 @@ export class InvoiceReimCustomerSearchOperation {
|
|
|
97
90
|
filter: customerFilter(keywords),
|
|
98
91
|
compId: CUSTOMER_COMP_ID,
|
|
99
92
|
pageId: CUSTOMER_PAGE_ID,
|
|
100
|
-
pageNo:
|
|
101
|
-
|
|
93
|
+
pageNo: String(pageNo),
|
|
94
|
+
pageSize: String(CUSTOMER_PAGE_SIZE),
|
|
102
95
|
},
|
|
103
|
-
|
|
96
|
+
timeoutMs: 5_000,
|
|
97
|
+
operation,
|
|
104
98
|
});
|
|
105
99
|
assertBusinessSuccess(result, 'reim_customer_search_failed', '搜索相关客户失败');
|
|
106
100
|
const list = record(record(result).data).list;
|
|
107
101
|
if (!Array.isArray(list))
|
|
108
102
|
return invalidResponse();
|
|
109
|
-
|
|
103
|
+
const page = list.map(projectCustomer);
|
|
104
|
+
const signature = JSON.stringify(page.map((customer) => customer.customerId).sort());
|
|
105
|
+
if (seenPages.has(signature)) {
|
|
106
|
+
throw new InvoiceCliError('api', 'reim_customer_search_incomplete', '客户查询返回重复页,无法确认完整候选,请缩小客户名称范围', { exitCode: 1 });
|
|
107
|
+
}
|
|
108
|
+
seenPages.add(signature);
|
|
109
|
+
for (const customer of page) {
|
|
110
|
+
if (!customers.has(customer.customerId))
|
|
111
|
+
customers.set(customer.customerId, customer);
|
|
112
|
+
}
|
|
113
|
+
// 接口 count 可能为 0,必须依据原始页长续页,不能在去重后判定唯一或末页。
|
|
114
|
+
if (list.length < CUSTOMER_PAGE_SIZE)
|
|
115
|
+
return [...customers.values()];
|
|
116
|
+
}
|
|
117
|
+
throw new InvoiceCliError('api', 'reim_customer_search_incomplete', '客户查询达到 20 页上限,候选未读完整,请缩小客户名称范围', { exitCode: 1 });
|
|
118
|
+
}
|
|
119
|
+
/** 各客户独立查询项目,最多四个客户并发,结果始终保持客户原顺序。 */
|
|
120
|
+
async function attachCustomerProjects(host, customers, operation, deadline) {
|
|
121
|
+
const results = new Array(customers.length);
|
|
122
|
+
let next = 0;
|
|
123
|
+
let authenticationError;
|
|
124
|
+
await Promise.all(Array.from({ length: Math.min(4, customers.length) }, async () => {
|
|
125
|
+
while (!authenticationError && next < customers.length) {
|
|
126
|
+
const index = next++;
|
|
127
|
+
const customer = customers[index];
|
|
128
|
+
try {
|
|
129
|
+
results[index] = { ...customer, relatedProject: await readInvoiceCustomerProjects(host, customer.customerId, operation, deadline, () => Boolean(authenticationError)) };
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error instanceof InvoiceCliError && error.type === 'authentication') {
|
|
133
|
+
authenticationError = error;
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
results[index] = {
|
|
137
|
+
...customer, relatedProject: null,
|
|
138
|
+
projectsError: error instanceof InvoiceCliError ? error.message : '客户项目查询失败,无法确认完整项目候选',
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
if (authenticationError)
|
|
144
|
+
throw authenticationError;
|
|
145
|
+
return results;
|
|
146
|
+
}
|
|
147
|
+
/** 所有按名称查询相关客户的场景,同时取得承担主体及各客户自己的相关项目。 */
|
|
148
|
+
export class InvoiceReimCustomerSearchOperation {
|
|
149
|
+
name = 'invoice.reim.customer.search';
|
|
150
|
+
async execute(input, { host }) {
|
|
151
|
+
if (Object.keys(input).some((key) => key !== 'keywords')) {
|
|
152
|
+
throw invoiceValidationError('input_invalid', '客户查询只接受 keywords,其他查询参数固定');
|
|
153
|
+
}
|
|
154
|
+
const keywords = asNonEmptyString(input.keywords, 'keywords');
|
|
155
|
+
const deadline = Date.now() + 120_000;
|
|
156
|
+
const customers = await searchInvoiceCustomers(host, keywords, this.name);
|
|
157
|
+
const list = await attachCustomerProjects(host, customers, this.name, deadline);
|
|
158
|
+
return { status: list.some((customer) => customer.relatedProject === null) ? 'PARTIAL' : 'COMPLETE', data: { list } };
|
|
110
159
|
}
|
|
111
160
|
}
|