@cpzxrobot/sdk 1.1.65 → 1.1.67

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.
@@ -1,4 +1,4 @@
1
- import { Cpzxrobot, Factory } from "./types";
1
+ import { Cpzxrobot } from "./types";
2
2
 
3
3
  export class CompanyGateway extends Object {
4
4
  context: Cpzxrobot;
@@ -45,7 +45,7 @@ export class CompanyGateway extends Object {
45
45
 
46
46
  get enterprise() {
47
47
  return {
48
- userCount: async (companyId: number) => {
48
+ userCount: async () => {
49
49
  var axios = await this.context.ready;
50
50
  return axios.get(`/api/v2/coremde-sale/company/enterprise/count/user`);
51
51
  },
@@ -1,4 +1,4 @@
1
- import { Cpzxrobot, Factory, Unit } from "./types";
1
+ import { Cpzxrobot } from "./types";
2
2
 
3
3
  export class CustomerGateway extends Object {
4
4
  context: Cpzxrobot;
@@ -41,7 +41,7 @@ class CompanyGateway extends Object {
41
41
  }
42
42
  get enterprise() {
43
43
  return {
44
- userCount: async (companyId) => {
44
+ userCount: async () => {
45
45
  var axios = await this.context.ready;
46
46
  return axios.get(`/api/v2/coremde-sale/company/enterprise/count/user`);
47
47
  },
@@ -100,7 +100,13 @@ class UnitGateway extends Object {
100
100
  unitIds
101
101
  });
102
102
  });
103
- }
103
+ },
104
+ //获取某个单元的批次信息
105
+ get: (unitNo) => {
106
+ return this.context.ready.then((axios) => {
107
+ return axios.get(`/api/v2/batch/unit/${unitNo}`);
108
+ });
109
+ },
104
110
  };
105
111
  }
106
112
  v2() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.1.65",
3
+ "version": "1.1.67",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- import { Cpzxrobot, Factory, Unit } from "./types";
1
+ import { Cpzxrobot } from "./types";
2
2
 
3
3
  export class ProjectGateway extends Object {
4
4
  context: Cpzxrobot;
package/readme.md CHANGED
@@ -142,6 +142,8 @@ baseURL: "/"
142
142
  | cpzxrobot().unit.thresholdConfig.delete | 删除单元的阈值配置信息,传入get获取的条目的具体id或对象本身 |
143
143
  | cpzxrobot().unit.batch.bind | 绑定单元和生产批次关系 |
144
144
  | cpzxrobot().unit.batch.clear | 清除单元绑定的生产批次 |
145
+ | cpzxrobot().unit.batch.get | 获取单元绑定的生产批次 |
146
+ | cpzxrobot().unit.batch.list | 获取多个单元的生产批次信息 |
145
147
  | cpzxrobot().user.add | 添加用户 |
146
148
  | cpzxrobot().user.update | 更新用户 |
147
149
  | cpzxrobot().user.list | 列出用户(传入工厂) |
package/unit_gateway.ts CHANGED
@@ -121,7 +121,21 @@ export class UnitGateway extends Object {
121
121
  unitIds
122
122
  });
123
123
  });
124
- }
124
+ },
125
+ //获取某个单元的批次信息
126
+ get: (unitNo: Number) => {
127
+ return this.context.ready.then((axios) => {
128
+ return axios.get(`/api/v2/batch/unit/${unitNo}`);
129
+ });
130
+ },
131
+ list: (unitIds: Number[]) => {
132
+ return this.context.ready.then((axios) => {
133
+ return axios.post(
134
+ `/api/v2/batch/unit/getUnitBatchs`,{
135
+ unitIds
136
+ });
137
+ });
138
+ },
125
139
  }
126
140
  }
127
141