@ningboyz/types 1.2.109 → 1.2.110

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ningboyz/types",
3
3
  "type": "module",
4
- "version": "1.2.109",
4
+ "version": "1.2.110",
5
5
  "private": false,
6
6
  "description": "宁波甬政类型库",
7
7
  "author": "nbyt-syq",
@@ -2,6 +2,8 @@ import { IPathResponse } from "../core";
2
2
  import { IHznkBaseNbyhResponse } from "./IHznkBaseNbyhResponse";
3
3
  import { IHznkBaseWbdwResponse } from "./IHznkBaseWbdwResponse";
4
4
  import { IHznkBaseWbyhResponse } from "./IHznkBaseWbyhResponse";
5
+ import _ from "lodash";
6
+ import { TFlowDataResponse } from "../flow";
5
7
 
6
8
  export interface IHznkBaseResponse {
7
9
  whoBuild: number;
@@ -20,6 +22,8 @@ export interface IHznkBaseResponse {
20
22
  dataTime: number;
21
23
  dataGUID: string;
22
24
  userMain: number;
25
+ flowNode: number;
26
+ flowMain: number;
23
27
  mastName: string;
24
28
  mastGUID: string;
25
29
  createBy: string;
@@ -97,6 +101,8 @@ export class THznkBaseResponse implements IHznkBaseResponse {
97
101
  dataTime: number = 0;
98
102
  dataGUID: string = "";
99
103
  userMain: number = 0;
104
+ flowNode: number = 0;
105
+ flowMain: number = 0;
100
106
  mastName: string = "";
101
107
  mastGUID: string = "";
102
108
  createBy: string = "";
@@ -140,4 +146,37 @@ export class THznkBaseResponse implements IHznkBaseResponse {
140
146
  listNBYH: IHznkBaseNbyhResponse[] = [];
141
147
  listWBYH: IHznkBaseWbyhResponse[] = [];
142
148
  listWBDW: IHznkBaseWbdwResponse[] = [];
149
+
150
+ constructor(data: Partial<IHznkBaseResponse> = {}) {
151
+ if (data) {
152
+ _.merge(this, _.pick(data, Object.keys(this)));
153
+ }
154
+ }
155
+
156
+
157
+
158
+ static toFlowData(data: IHznkBaseResponse): TFlowDataResponse {
159
+ const result = new TFlowDataResponse();
160
+ result.whoBuild = data.whoBuild;
161
+ result.flowMain = data.flowMain;
162
+ result.flowNode = data.flowNode;
163
+ result.notified = "";
164
+ result.entityID = data.entityID;
165
+ result.billMain = data.baseIndx;
166
+ result.billCode = data.baseCode;
167
+ result.billMemo = data.baseMemo;
168
+ result.createAt = data.createAt;
169
+ result.mastName = data.mastName;
170
+ result.createBy = data.createBy;
171
+ result.unitMain = data.unitMain;
172
+ result.deptMain = data.deptMain;
173
+ result.menuUUID = data.menuUUID;
174
+ result.flowStat = data.baseStat;
175
+ return result;
176
+ }
177
+
178
+ static toFlowDatas(data: IHznkBaseResponse[]): TFlowDataResponse[] {
179
+ return data.map((u) => this.toFlowData(u));
180
+ }
181
+
143
182
  }
@@ -2,6 +2,8 @@ import { IPathResponse } from "../core";
2
2
  import { IHznkMainNbyhResponse } from "./IHznkMainNbyhResponse";
3
3
  import { IHznkMainWbdwResponse } from "./IHznkMainWbdwResponse";
4
4
  import { IHznkMainWbyhResponse } from "./IHznkMainWbyhResponse";
5
+ import _ from "lodash";
6
+ import { TFlowDataResponse } from "../flow";
5
7
 
6
8
  export interface IHznkMainResponse {
7
9
  whoBuild: number;
@@ -20,6 +22,8 @@ export interface IHznkMainResponse {
20
22
  dataTime: number;
21
23
  dataGUID: string;
22
24
  userMain: number;
25
+ flowNode: number;
26
+ flowMain: number;
23
27
  mastName: string;
24
28
  mastGUID: string;
25
29
  createBy: string;
@@ -110,6 +114,8 @@ export class THznkMainResponse implements IHznkMainResponse {
110
114
  dataType: number = 0;
111
115
  dataDate: number = 0;
112
116
  dataTime: number = 0;
117
+ flowNode: number = 0;
118
+ flowMain: number = 0;
113
119
  dataGUID: string = "";
114
120
  userMain: number = 0;
115
121
  mastName: string = "";
@@ -161,4 +167,36 @@ export class THznkMainResponse implements IHznkMainResponse {
161
167
  listNBYH: IHznkMainNbyhResponse[] = [];
162
168
  listWBYH: IHznkMainWbyhResponse[] = [];
163
169
  listWBDW: IHznkMainWbdwResponse[] = [];
170
+
171
+ constructor(data: Partial<IHznkMainResponse> = {}) {
172
+ if (data) {
173
+ _.merge(this, _.pick(data, Object.keys(this)));
174
+ }
175
+ }
176
+
177
+
178
+
179
+ static toFlowData(data: IHznkMainResponse): TFlowDataResponse {
180
+ const result = new TFlowDataResponse();
181
+ result.whoBuild = data.whoBuild;
182
+ result.flowMain = data.flowMain;
183
+ result.flowNode = data.flowNode;
184
+ result.notified = "";
185
+ result.entityID = data.entityID;
186
+ result.billMain = data.hznkIndx;
187
+ result.billCode = data.baseCode;
188
+ result.billMemo = data.baseMemo;
189
+ result.createAt = data.createAt;
190
+ result.mastName = data.mastName;
191
+ result.createBy = data.createBy;
192
+ result.unitMain = data.unitMain;
193
+ result.deptMain = data.deptMain;
194
+ result.menuUUID = data.menuUUID;
195
+ result.flowStat = data.hznkStat;
196
+ return result;
197
+ }
198
+
199
+ static toFlowDatas(data: IHznkMainResponse[]): TFlowDataResponse[] {
200
+ return data.map((u) => this.toFlowData(u));
201
+ }
164
202
  }