@cpzxrobot/sdk 1.3.25 → 1.3.27
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/device_gateway.ts +8 -0
- package/dist/device_gateway.js +7 -0
- package/dist/project_gateway.js +30 -0
- package/package.json +1 -1
- package/project_gateway.ts +44 -0
package/device_gateway.ts
CHANGED
|
@@ -305,6 +305,14 @@ export class DeviceGateway extends Object {
|
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
+
async batchValidate(serialNumbers: string[], type: string = "pywl") {
|
|
309
|
+
let axios = await this.context.ready;
|
|
310
|
+
return axios.upload(`/api/v2/device/batchValidate`, {
|
|
311
|
+
serialNumbers,
|
|
312
|
+
type,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
308
316
|
async faults(deviceId: number, startTime: Date, endTime: Date): Promise<DeviceFault[]> {
|
|
309
317
|
let axios = await this.context.ready;
|
|
310
318
|
const startTimeRfc3339 = startTime.toISOString();
|
package/dist/device_gateway.js
CHANGED
|
@@ -213,6 +213,13 @@ class DeviceGateway extends Object {
|
|
|
213
213
|
type,
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
+
async batchValidate(serialNumbers, type = "pywl") {
|
|
217
|
+
let axios = await this.context.ready;
|
|
218
|
+
return axios.upload(`/api/v2/device/batchValidate`, {
|
|
219
|
+
serialNumbers,
|
|
220
|
+
type,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
216
223
|
async faults(deviceId, startTime, endTime) {
|
|
217
224
|
let axios = await this.context.ready;
|
|
218
225
|
const startTimeRfc3339 = startTime.toISOString();
|
package/dist/project_gateway.js
CHANGED
|
@@ -338,6 +338,36 @@ class ProjectGateway extends Object {
|
|
|
338
338
|
return axios.post(`/api/v2/coremde-sale/project/bom-config/create`, args);
|
|
339
339
|
});
|
|
340
340
|
},
|
|
341
|
+
/**
|
|
342
|
+
* 获取报价配置单列表
|
|
343
|
+
* @param args 查询参数
|
|
344
|
+
* @returns Promise
|
|
345
|
+
*/
|
|
346
|
+
list: (args) => {
|
|
347
|
+
return this.context.ready.then((axios) => {
|
|
348
|
+
return axios.post(`/api/v2/coremde-sale/project/bom-config/list`, args);
|
|
349
|
+
});
|
|
350
|
+
},
|
|
351
|
+
/**
|
|
352
|
+
* 获取报价配置单详情
|
|
353
|
+
* @param id 配置单ID
|
|
354
|
+
* @returns Promise
|
|
355
|
+
*/
|
|
356
|
+
get: (id) => {
|
|
357
|
+
return this.context.ready.then((axios) => {
|
|
358
|
+
return axios.get(`/api/v2/coremde-sale/project/bom-config/get?id=${id}`);
|
|
359
|
+
});
|
|
360
|
+
},
|
|
361
|
+
/**
|
|
362
|
+
* 获取报价配置单历史版本
|
|
363
|
+
* @param id 配置单ID
|
|
364
|
+
* @returns Promise
|
|
365
|
+
*/
|
|
366
|
+
history: (id) => {
|
|
367
|
+
return this.context.ready.then((axios) => {
|
|
368
|
+
return axios.get(`/api/v2/coremde-sale/project/bom-config/history?id=${id}`);
|
|
369
|
+
});
|
|
370
|
+
},
|
|
341
371
|
};
|
|
342
372
|
}
|
|
343
373
|
get plan() {
|
package/package.json
CHANGED
package/project_gateway.ts
CHANGED
|
@@ -511,6 +511,50 @@ export class ProjectGateway extends Object {
|
|
|
511
511
|
)
|
|
512
512
|
})
|
|
513
513
|
},
|
|
514
|
+
/**
|
|
515
|
+
* 获取报价配置单列表
|
|
516
|
+
* @param args 查询参数
|
|
517
|
+
* @returns Promise
|
|
518
|
+
*/
|
|
519
|
+
list: (args: {
|
|
520
|
+
projectId: number
|
|
521
|
+
customerId: number
|
|
522
|
+
pageNo: number
|
|
523
|
+
pageSize: number
|
|
524
|
+
createTimeStart: string
|
|
525
|
+
createTimeEnd: string
|
|
526
|
+
}) => {
|
|
527
|
+
return this.context.ready.then((axios) => {
|
|
528
|
+
return axios.post(
|
|
529
|
+
`/api/v2/coremde-sale/project/bom-config/list`,
|
|
530
|
+
args
|
|
531
|
+
)
|
|
532
|
+
})
|
|
533
|
+
},
|
|
534
|
+
/**
|
|
535
|
+
* 获取报价配置单详情
|
|
536
|
+
* @param id 配置单ID
|
|
537
|
+
* @returns Promise
|
|
538
|
+
*/
|
|
539
|
+
get: (id: number) => {
|
|
540
|
+
return this.context.ready.then((axios) => {
|
|
541
|
+
return axios.get(
|
|
542
|
+
`/api/v2/coremde-sale/project/bom-config/get?id=${id}`
|
|
543
|
+
)
|
|
544
|
+
})
|
|
545
|
+
},
|
|
546
|
+
/**
|
|
547
|
+
* 获取报价配置单历史版本
|
|
548
|
+
* @param id 配置单ID
|
|
549
|
+
* @returns Promise
|
|
550
|
+
*/
|
|
551
|
+
history: (id: number) => {
|
|
552
|
+
return this.context.ready.then((axios) => {
|
|
553
|
+
return axios.get(
|
|
554
|
+
`/api/v2/coremde-sale/project/bom-config/history?id=${id}`
|
|
555
|
+
)
|
|
556
|
+
})
|
|
557
|
+
},
|
|
514
558
|
}
|
|
515
559
|
}
|
|
516
560
|
|