@cpzxrobot/sdk 1.2.45 → 1.2.46
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/pigfarm_gateway.js +8 -8
- package/dist/quotation_gateway.js +29 -0
- package/dist/user_gateway.js +6 -0
- package/package.json +1 -1
- package/pigfarm_gateway.ts +21 -21
- package/quotation_gateway.ts +41 -0
- package/user_gateway.ts +7 -0
package/dist/pigfarm_gateway.js
CHANGED
|
@@ -17,15 +17,15 @@ class PigfarmGateway extends Object {
|
|
|
17
17
|
return this.context.ready.then((axios) => {
|
|
18
18
|
return axios.get(`/api/v1/pigfarm/pigcount/${unit.id}`);
|
|
19
19
|
});
|
|
20
|
-
/**
|
|
21
|
-
* 获取单元统计信息
|
|
22
|
-
*
|
|
23
|
-
* @param unitIds 单元ID数组
|
|
24
|
-
* @param start 开始时间,格式为"yyyy-MM-dd"
|
|
25
|
-
* @param end 结束时间,格式为"yyyy-MM-dd"
|
|
26
|
-
* @returns 返回Promise对象,解析后得到axios响应结果
|
|
27
|
-
*/
|
|
28
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* 获取单元统计信息
|
|
23
|
+
*
|
|
24
|
+
* @param unitIds 单元ID数组
|
|
25
|
+
* @param start 开始时间,格式为"yyyy-MM-dd"
|
|
26
|
+
* @param end 结束时间,格式为"yyyy-MM-dd"
|
|
27
|
+
* @returns 返回Promise对象,解析后得到axios响应结果
|
|
28
|
+
*/
|
|
29
29
|
unitStat(unitIds, start, end) {
|
|
30
30
|
return this.context.ready.then((axios) => {
|
|
31
31
|
return axios.post(`/api/v1/pigfarm/feedStatics`, {
|
|
@@ -36,5 +36,34 @@ class QuotationGateway extends Object {
|
|
|
36
36
|
return axios.get(`/api/v2/coremde-sale/quotation/transform?id=${id}`);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
+
get apply() {
|
|
40
|
+
return {
|
|
41
|
+
add: (args) => {
|
|
42
|
+
return this.context.ready.then((axios) => {
|
|
43
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/add`, args);
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
list: (args) => {
|
|
47
|
+
return this.context.ready.then((axios) => {
|
|
48
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/list`, args);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
get: (id) => {
|
|
52
|
+
return this.context.ready.then((axios) => {
|
|
53
|
+
return axios.get(`/api/v2/coremde-sale/quotation/apply/get?id=${id}`);
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
update: (args) => {
|
|
57
|
+
return this.context.ready.then((axios) => {
|
|
58
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/update`, args);
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
delete: (id) => {
|
|
62
|
+
return this.context.ready.then((axios) => {
|
|
63
|
+
return axios.get(`/api/v2/coremde-sale/quotation/apply/delete?id=${id}`);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
39
68
|
}
|
|
40
69
|
exports.QuotationGateway = QuotationGateway;
|
package/dist/user_gateway.js
CHANGED
|
@@ -283,6 +283,12 @@ class UserGateway extends Object {
|
|
|
283
283
|
var axios = await this.context.ready;
|
|
284
284
|
return axios.get(`/api/v2/user/info/${userId}`);
|
|
285
285
|
}
|
|
286
|
+
//根据组织机构id获得该组织机构下所有人员
|
|
287
|
+
listByGroup(groupId) {
|
|
288
|
+
return this.context.ready.then((axios) => {
|
|
289
|
+
return axios.get(`/api/v2/user/list/${groupId}`);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
286
292
|
get position() {
|
|
287
293
|
return {
|
|
288
294
|
leader: () => {
|
package/package.json
CHANGED
package/pigfarm_gateway.ts
CHANGED
|
@@ -27,16 +27,16 @@ export class PigfarmGateway extends Object {
|
|
|
27
27
|
return this.context.ready.then((axios) => {
|
|
28
28
|
return axios.get(`/api/v1/pigfarm/pigcount/${unit.id}`);
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 获取单元统计信息
|
|
33
|
-
*
|
|
34
|
-
* @param unitIds 单元ID数组
|
|
35
|
-
* @param start 开始时间,格式为"yyyy-MM-dd"
|
|
36
|
-
* @param end 结束时间,格式为"yyyy-MM-dd"
|
|
37
|
-
* @returns 返回Promise对象,解析后得到axios响应结果
|
|
38
|
-
*/
|
|
39
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 获取单元统计信息
|
|
34
|
+
*
|
|
35
|
+
* @param unitIds 单元ID数组
|
|
36
|
+
* @param start 开始时间,格式为"yyyy-MM-dd"
|
|
37
|
+
* @param end 结束时间,格式为"yyyy-MM-dd"
|
|
38
|
+
* @returns 返回Promise对象,解析后得到axios响应结果
|
|
39
|
+
*/
|
|
40
40
|
unitStat(unitIds: Number[], start: string, end: string) {
|
|
41
41
|
return this.context.ready.then((axios) => {
|
|
42
42
|
return axios.post(`/api/v1/pigfarm/feedStatics`, {
|
|
@@ -252,11 +252,11 @@ export class PigfarmGateway extends Object {
|
|
|
252
252
|
list: async (factory: Factory): Promise<any> => {
|
|
253
253
|
var axios = await this.context.ready;
|
|
254
254
|
return axios.get(
|
|
255
|
-
`/api/v1/pigfarm/heatLamp/config/template/list/${factory.id
|
|
255
|
+
`/api/v1/pigfarm/heatLamp/config/template/list/${factory.id}`
|
|
256
256
|
);
|
|
257
257
|
},
|
|
258
258
|
//增加模板
|
|
259
|
-
add: (factory: Factory, name:String,data: HeatLamp) => {
|
|
259
|
+
add: (factory: Factory, name: String, data: HeatLamp) => {
|
|
260
260
|
return this.context.ready.then((axios) => {
|
|
261
261
|
return axios.post(`/api/v1/pigfarm/heatLamp/config/template`, {
|
|
262
262
|
...data,
|
|
@@ -264,13 +264,13 @@ export class PigfarmGateway extends Object {
|
|
|
264
264
|
templateName: name,
|
|
265
265
|
});
|
|
266
266
|
});
|
|
267
|
-
},
|
|
267
|
+
},
|
|
268
268
|
//删除模版
|
|
269
269
|
delete: (id: number) => {
|
|
270
270
|
return this.context.ready.then((axios) => {
|
|
271
271
|
return axios.post(`/api/v1/pigfarm/heatLamp/config/template/delete?id=${id}`);
|
|
272
272
|
});
|
|
273
|
-
}
|
|
273
|
+
}
|
|
274
274
|
},
|
|
275
275
|
list: async (unit: Unit): Promise<any> => {
|
|
276
276
|
var axios = await this.context.ready;
|
|
@@ -318,18 +318,18 @@ export class PigfarmGateway extends Object {
|
|
|
318
318
|
var axios = await this.context.ready;
|
|
319
319
|
return axios.post(`/api/v1/pigfarm/heatLamp/config/update`, lamp);
|
|
320
320
|
},
|
|
321
|
-
updateByUnit: async (unit: Unit,lamp: HeatLamp,ids:Number[]|null = null): Promise<any> => {
|
|
321
|
+
updateByUnit: async (unit: Unit, lamp: HeatLamp, ids: Number[] | null = null): Promise<any> => {
|
|
322
322
|
var axios = await this.context.ready;
|
|
323
323
|
return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/update`, {
|
|
324
324
|
...lamp,
|
|
325
325
|
ids
|
|
326
326
|
});
|
|
327
327
|
},
|
|
328
|
-
switchByUnit: async (unit: Unit, action: "on" | "off",ids:Number[]|null = null): Promise<any> => {
|
|
328
|
+
switchByUnit: async (unit: Unit, action: "on" | "off", ids: Number[] | null = null): Promise<any> => {
|
|
329
329
|
var axios = await this.context.ready;
|
|
330
|
-
var args:{
|
|
330
|
+
var args: {
|
|
331
331
|
action: "on" | "off",
|
|
332
|
-
ids?:Number[]
|
|
332
|
+
ids?: Number[]
|
|
333
333
|
} = {
|
|
334
334
|
action,
|
|
335
335
|
}
|
|
@@ -338,13 +338,13 @@ export class PigfarmGateway extends Object {
|
|
|
338
338
|
}
|
|
339
339
|
return axios.post(`/api/v1/pigfarm/heatLamp/config/${unit.id}/switch`, args);
|
|
340
340
|
},
|
|
341
|
-
taskStatus: async (args:{
|
|
342
|
-
id?:number,
|
|
343
|
-
unitId?:number,
|
|
341
|
+
taskStatus: async (args: {
|
|
342
|
+
id?: number,
|
|
343
|
+
unitId?: number,
|
|
344
344
|
type?: string
|
|
345
345
|
}): Promise<any> => {
|
|
346
346
|
var axios = await this.context.ready;
|
|
347
|
-
return axios.post(`/api/v1/pigfarm/heatLamp/task`,args);
|
|
347
|
+
return axios.post(`/api/v1/pigfarm/heatLamp/task`, args);
|
|
348
348
|
},
|
|
349
349
|
control: async (lamp: HeatLamp | number, action: "on" | "off") => {
|
|
350
350
|
var axios = await this.context.ready;
|
package/quotation_gateway.ts
CHANGED
|
@@ -49,4 +49,45 @@ export class QuotationGateway extends Object {
|
|
|
49
49
|
return axios.get(`/api/v2/coremde-sale/quotation/transform?id=${id}`);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
get apply() {
|
|
54
|
+
return {
|
|
55
|
+
add: (args: { projectId: number; quotationApplyDescription: string }) => {
|
|
56
|
+
return this.context.ready.then((axios) => {
|
|
57
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/add`, args);
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
list: (args: {
|
|
62
|
+
pageNo: number;
|
|
63
|
+
pageSize: number;
|
|
64
|
+
projectId?: number;
|
|
65
|
+
customerId?: number;
|
|
66
|
+
quotationApplyDateStart?: string;
|
|
67
|
+
quotationApplyDateEnd?: string;
|
|
68
|
+
}) => {
|
|
69
|
+
return this.context.ready.then((axios) => {
|
|
70
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/list`, args);
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
get: (id: number) => {
|
|
75
|
+
return this.context.ready.then((axios) => {
|
|
76
|
+
return axios.get(`/api/v2/coremde-sale/quotation/apply/get?id=${id}`);
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
update: (args: { projectId: number; quotationApplyDescription: string; id: number }) => {
|
|
81
|
+
return this.context.ready.then((axios) => {
|
|
82
|
+
return axios.post(`/api/v2/coremde-sale/quotation/apply/update`, args);
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
delete: (id: number) => {
|
|
87
|
+
return this.context.ready.then((axios) => {
|
|
88
|
+
return axios.get(`/api/v2/coremde-sale/quotation/apply/delete?id=${id}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
52
93
|
}
|
package/user_gateway.ts
CHANGED
|
@@ -313,6 +313,13 @@ export class UserGateway extends Object {
|
|
|
313
313
|
return axios.get(`/api/v2/user/info/${userId}`);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
//根据组织机构id获得该组织机构下所有人员
|
|
317
|
+
listByGroup(groupId: number) {
|
|
318
|
+
return this.context.ready.then((axios) => {
|
|
319
|
+
return axios.get(`/api/v2/user/list/${groupId}`);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
316
323
|
get position() {
|
|
317
324
|
return {
|
|
318
325
|
leader: () => {
|