@cpzxrobot/sdk 1.2.5 → 1.2.7
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/contract_gateway.ts +1 -1
- package/customer_gateway.ts +34 -0
- package/dist/customer_gateway.js +21 -0
- package/dist/transport_gateway.js +7 -0
- package/dist/unit_gateway.js +20 -8
- package/logs_gateway.ts +1 -1
- package/package.json +1 -1
- package/readme.md +7 -0
- package/robot_gateway.ts +3 -3
- package/transport_gateway.ts +8 -1
- package/unit_gateway.ts +21 -9
package/contract_gateway.ts
CHANGED
package/customer_gateway.ts
CHANGED
|
@@ -123,6 +123,40 @@ export class CustomerGateway extends Object {
|
|
|
123
123
|
return axios.get(`/api/v2/coremde-sale/customer/stat/china`);
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
|
+
periodCount: (args: {
|
|
127
|
+
dateType: number;
|
|
128
|
+
companyId: number;
|
|
129
|
+
}) => {
|
|
130
|
+
return this.context.ready.then((axios) => {
|
|
131
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/period/count`, args);
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
totalCount: (args: {
|
|
135
|
+
companyId: number;
|
|
136
|
+
}) => {
|
|
137
|
+
return this.context.ready.then((axios) => {
|
|
138
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/total/count`, args);
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
//成交金额统计
|
|
142
|
+
amount: (args: {
|
|
143
|
+
companyId: number;
|
|
144
|
+
}) => {
|
|
145
|
+
return this.context.ready.then((axios) => {
|
|
146
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/total/amount`, args);
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
project: (args: {
|
|
150
|
+
pageNo: number;
|
|
151
|
+
pageSize: number;
|
|
152
|
+
projectProgress: number;
|
|
153
|
+
companyId: number;
|
|
154
|
+
status: "tracking"
|
|
155
|
+
}) => {
|
|
156
|
+
return this.context.ready.then((axios) => {
|
|
157
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/period/project`, args);
|
|
158
|
+
});
|
|
159
|
+
},
|
|
126
160
|
}
|
|
127
161
|
}
|
|
128
162
|
|
package/dist/customer_gateway.js
CHANGED
|
@@ -90,6 +90,27 @@ class CustomerGateway extends Object {
|
|
|
90
90
|
return axios.get(`/api/v2/coremde-sale/customer/stat/china`);
|
|
91
91
|
});
|
|
92
92
|
},
|
|
93
|
+
periodCount: (args) => {
|
|
94
|
+
return this.context.ready.then((axios) => {
|
|
95
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/period/count`, args);
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
totalCount: (args) => {
|
|
99
|
+
return this.context.ready.then((axios) => {
|
|
100
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/total/count`, args);
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
//成交金额统计
|
|
104
|
+
amount: (args) => {
|
|
105
|
+
return this.context.ready.then((axios) => {
|
|
106
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/total/amount`, args);
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
project: (args) => {
|
|
110
|
+
return this.context.ready.then((axios) => {
|
|
111
|
+
return axios.post(`/api/v2/coremde-sale/customer/stat/period/project`, args);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
93
114
|
};
|
|
94
115
|
}
|
|
95
116
|
get count() {
|
|
@@ -30,6 +30,13 @@ class TransportGateway extends Object {
|
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
|
+
///api/v2/pigfarm/feedTower/fodder/recentLoad/{towerId}
|
|
34
|
+
getRecentLoad: (towerId) => {
|
|
35
|
+
return this.context.ready.then(() => {
|
|
36
|
+
return this.context.axios
|
|
37
|
+
.get(`/api/v2/pigfarm/feedTower/fodder/recentLoad/${towerId}`);
|
|
38
|
+
});
|
|
39
|
+
},
|
|
33
40
|
//获取打料详情
|
|
34
41
|
get inputs() {
|
|
35
42
|
return this.getDetail;
|
package/dist/unit_gateway.js
CHANGED
|
@@ -137,14 +137,26 @@ class UnitGateway extends Object {
|
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
// 获取批次操作记录
|
|
141
|
+
operation: (batchNo) => {
|
|
142
|
+
return this.context.ready.then((axios) => {
|
|
143
|
+
return axios.get(`/api/v2/batch/operation`, {
|
|
144
|
+
params: {
|
|
145
|
+
batchNo
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
// 删除批次
|
|
151
|
+
delete: (id) => {
|
|
152
|
+
return this.context.ready.then((axios) => {
|
|
153
|
+
return axios.get(`/api/v2/batch/delete`, {
|
|
154
|
+
params: {
|
|
155
|
+
id
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
148
160
|
};
|
|
149
161
|
}
|
|
150
162
|
v2() {
|
package/logs_gateway.ts
CHANGED
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -103,6 +103,7 @@ baseURL: "/"
|
|
|
103
103
|
| cpzxrobot().factory.workshop.delete | 删除车间信息,需要传入id参数 |
|
|
104
104
|
| cpzxrobot().factory.batch.list | 获得批次列表,传入factoryId参数 |ldiba
|
|
105
105
|
| cpzxrobot().transport.fodder.getDeviceByFodderld | 获得料单对应的设备 |
|
|
106
|
+
| cpzxrobot().transport.fodder.getRecentLoad | 获取料塔最近打料记录,传入towerId参数 |
|
|
106
107
|
| cpzxrobot().transport.fodder.delete | 删除饲料信息,需要传入id参数 |
|
|
107
108
|
| cpzxrobot().pigfarm.heatlamp.xxx | 操作保温灯 |
|
|
108
109
|
| cpzxrobot().pigfarm.weightMeter.config.list | 获取称重计的配置信息 |
|
|
@@ -152,6 +153,8 @@ baseURL: "/"
|
|
|
152
153
|
| cpzxrobot().unit.batch.getUnits | 获取批次的绑定单元信息 |
|
|
153
154
|
| cpzxrobot().unit.batch.searchInUnit | 搜索单元的生产批次信息 |
|
|
154
155
|
| cpzxrobot().unit.batch.list | 获取多个单元的生产批次信息 |
|
|
156
|
+
| cpzxrobot().unit.batch.operation | 获取批次操作记录,传入 batchNo 参数 |
|
|
157
|
+
| cpzxrobot().unit.batch.delete | 删除批次,传入批次 id 参数 |
|
|
155
158
|
| cpzxrobot().user.add | 添加用户 |
|
|
156
159
|
| cpzxrobot().user.update | 更新用户 |
|
|
157
160
|
| cpzxrobot().user.list | 列出用户(传入工厂) |
|
|
@@ -226,6 +229,10 @@ baseURL: "/"
|
|
|
226
229
|
| cpzxrobot().customer.categories | 获得客户类别列表 |
|
|
227
230
|
| cpzxrobot().customer.count.byStatus | 获取客户状态列表及各状态下的客户数量 |
|
|
228
231
|
| cpzxrobot().customer.visit.list | 获取客户拜访列表 |
|
|
232
|
+
| cpzxrobot().customer.stat.periodCount | 按周、月、年及类型对客户数量统计 |
|
|
233
|
+
| cpzxrobot().customer.stat.totalCount | 统计客户总数 |
|
|
234
|
+
| cpzxrobot().customer.stat.amount | 统计追踪、在建阶段的项目金额 |
|
|
235
|
+
| cpzxrobot().customer.stat.project | 追踪项目统计 |
|
|
229
236
|
| cpzxrobot().company.list | 获得公司列表,传入必要的分页参数 |
|
|
230
237
|
| cpzxrobot().company.rank.byRevenue | 按公司营收获取排名,传入必要的分页参数 |
|
|
231
238
|
| cpzxrobot().company.rank.byProfit | 按公司利润获取排名,传入必要的分页参数 |
|
package/robot_gateway.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cpzxrobot
|
|
1
|
+
import { Cpzxrobot } from "./types";
|
|
2
2
|
|
|
3
3
|
export class RobotGateway extends Object {
|
|
4
4
|
context: Cpzxrobot;
|
|
@@ -8,13 +8,13 @@ export class RobotGateway extends Object {
|
|
|
8
8
|
this.context = context;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
async cage(unitId: number){
|
|
11
|
+
async cage(unitId: number) {
|
|
12
12
|
///api/v2/robot/getCageList/{unitId}
|
|
13
13
|
var axios = await this.context.ready;
|
|
14
14
|
return axios.get(`/api/v2/robot/getCageList/${unitId}`);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
async alarm(unitId: number){
|
|
17
|
+
async alarm(unitId: number) {
|
|
18
18
|
///api/v2/robot/getAlarmList/{unitId}
|
|
19
19
|
var axios = await this.context.ready;
|
|
20
20
|
return axios.get(`/api/v2/robot/getAlarmList/${unitId}`);
|
package/transport_gateway.ts
CHANGED
|
@@ -41,6 +41,13 @@ export class TransportGateway extends Object {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
|
+
///api/v2/pigfarm/feedTower/fodder/recentLoad/{towerId}
|
|
45
|
+
getRecentLoad: (towerId: number) => {
|
|
46
|
+
return this.context.ready.then(() => {
|
|
47
|
+
return this.context.axios
|
|
48
|
+
.get(`/api/v2/pigfarm/feedTower/fodder/recentLoad/${towerId}`);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
44
51
|
//获取打料详情
|
|
45
52
|
get inputs() {
|
|
46
53
|
return this.getDetail;
|
|
@@ -90,7 +97,7 @@ export class TransportGateway extends Object {
|
|
|
90
97
|
addImage: (args: any) => {
|
|
91
98
|
return this.context.ready.then(() => {
|
|
92
99
|
return this.context.axios
|
|
93
|
-
.upload("/api/v2/pigfarm/feedTower/fodder/photo/add",args)
|
|
100
|
+
.upload("/api/v2/pigfarm/feedTower/fodder/photo/add", args)
|
|
94
101
|
.then((res) => {
|
|
95
102
|
if (res.data.code != 200) {
|
|
96
103
|
throw res.data.message;
|
package/unit_gateway.ts
CHANGED
|
@@ -160,14 +160,26 @@ export class UnitGateway extends Object {
|
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
},
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
163
|
+
// 获取批次操作记录
|
|
164
|
+
operation: (batchNo: string) => {
|
|
165
|
+
return this.context.ready.then((axios) => {
|
|
166
|
+
return axios.get(`/api/v2/batch/operation`, {
|
|
167
|
+
params: {
|
|
168
|
+
batchNo
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
// 删除批次
|
|
174
|
+
delete: (id: string) => {
|
|
175
|
+
return this.context.ready.then((axios) => {
|
|
176
|
+
return axios.get(`/api/v2/batch/delete`, {
|
|
177
|
+
params: {
|
|
178
|
+
id
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
171
183
|
}
|
|
172
184
|
}
|
|
173
185
|
|
|
@@ -212,4 +224,4 @@ export class UnitGateway extends Object {
|
|
|
212
224
|
},
|
|
213
225
|
};
|
|
214
226
|
}
|
|
215
|
-
}
|
|
227
|
+
}
|