@ningboyz/types 1.2.183 → 1.2.185

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,3 +1,5 @@
1
+ import _ from "lodash";
2
+
1
3
  export interface IHznjZbjgBillResponse {
2
4
  whoBuild: number;
3
5
  userIndx: number;
@@ -82,4 +84,10 @@ export class THznjZbjgBillResponse implements IHznjZbjgBillResponse {
82
84
  fromUserIndx: number = 0;
83
85
  fromNotiBill: number = 0;
84
86
  fromZblrBill: number = 0;
87
+
88
+ constructor(data: Partial<IHznjZbjgBillResponse> = {}) {
89
+ if (data) {
90
+ _.merge(this, _.pick(data, Object.keys(this)));
91
+ }
92
+ }
85
93
  }
@@ -1,4 +1,6 @@
1
1
  import { THznj, TCore } from "..";
2
+ import _ from "lodash";
3
+ import {TFlowDataResponse} from "../flow";
2
4
 
3
5
  export interface IHznjZbjgResponse {
4
6
  whoBuild: number;
@@ -139,4 +141,35 @@ export class THznjZbjgResponse implements IHznjZbjgResponse {
139
141
  listPath: TCore.IPathResponse[] = [];
140
142
  listBill: THznj.IHznjZbjgBillResponse[] = [];
141
143
  listFrom: THznj.IHznjZblrResponse[] = [];
144
+
145
+ constructor(data: Partial<IHznjZbjgResponse> = {}) {
146
+ if (data) {
147
+ _.merge(this, _.pick(data, Object.keys(this)));
148
+ }
149
+ }
150
+
151
+ static toFlowData(data: IHznjZbjgResponse): TFlowDataResponse {
152
+ const result = new TFlowDataResponse();
153
+ result.whoBuild = data.whoBuild;
154
+ result.userIndx = data.userIndx;
155
+ result.flowMain = data.flowMain;
156
+ result.flowNode = data.flowNode;
157
+ result.notified = "";
158
+ result.entityID = data.entityID;
159
+ result.billMain = data.zbjgIndx;
160
+ result.billCode = data.zbjgCode;
161
+ result.billMemo = data.zbjgMemo;
162
+ result.flowStat = data.zbjgStat;
163
+ result.createAt = data.createAt;
164
+ result.mastName = data.mastName;
165
+ result.createBy = data.createBy;
166
+ result.unitMain = data.unitMain;
167
+ result.deptMain = data.deptMain;
168
+ result.menuUUID = data.menuUUID;
169
+ return result;
170
+ }
171
+
172
+ static toFlowDatas(list: IHznjZbjgResponse[]): TFlowDataResponse[] {
173
+ return list.map((data) => this.toFlowData(data));
174
+ }
142
175
  }
@@ -1,3 +1,5 @@
1
+ import _ from "lodash";
2
+
1
3
  export interface IHznjZblyBillResponse {
2
4
  whoBuild: number;
3
5
  userIndx: number;
@@ -55,4 +57,10 @@ export class THznjZblyBillResponse implements IHznjZblyBillResponse {
55
57
  fromNotiBill: number = 0;
56
58
  fromZblrBill: number = 0;
57
59
  fromZbjgBill: number = 0;
60
+
61
+ constructor(data: Partial<IHznjZblyBillResponse> = {}) {
62
+ if (data) {
63
+ _.merge(this, _.pick(data, Object.keys(this)));
64
+ }
65
+ }
58
66
  }
@@ -1,4 +1,6 @@
1
1
  import { THznj, TCore } from "..";
2
+ import _ from "lodash";
3
+ import {TFlowDataResponse} from "../flow";
2
4
 
3
5
  export interface IHznjZblyResponse {
4
6
  whoBuild: number;
@@ -139,4 +141,35 @@ export class THznjZblyResponse implements IHznjZblyResponse {
139
141
  listPath: TCore.IPathResponse[] = [];
140
142
  listBill: THznj.IHznjZblyBillResponse[] = [];
141
143
  listFrom: THznj.IHznjZbjgResponse[] = [];
144
+
145
+ constructor(data: Partial<IHznjZblyResponse> = {}) {
146
+ if (data) {
147
+ _.merge(this, _.pick(data, Object.keys(this)));
148
+ }
149
+ }
150
+
151
+ static toFlowData(data: IHznjZblyResponse): TFlowDataResponse {
152
+ const result = new TFlowDataResponse();
153
+ result.whoBuild = data.whoBuild;
154
+ result.userIndx = data.userIndx;
155
+ result.flowMain = data.flowMain;
156
+ result.flowNode = data.flowNode;
157
+ result.notified = "";
158
+ result.entityID = data.entityID;
159
+ result.billMain = data.zblyIndx;
160
+ result.billCode = data.zblyCode;
161
+ result.billMemo = data.zblyMemo;
162
+ result.flowStat = data.zblyStat;
163
+ result.createAt = data.createAt;
164
+ result.mastName = data.mastName;
165
+ result.createBy = data.createBy;
166
+ result.unitMain = data.unitMain;
167
+ result.deptMain = data.deptMain;
168
+ result.menuUUID = data.menuUUID;
169
+ return result;
170
+ }
171
+
172
+ static toFlowDatas(list: IHznjZblyResponse[]): TFlowDataResponse[] {
173
+ return list.map((data) => this.toFlowData(data));
174
+ }
142
175
  }
@@ -1,3 +1,5 @@
1
+ import _ from "lodash";
2
+
1
3
  export interface IHznjZbthBillResponse {
2
4
  whoBuild: number;
3
5
  userIndx: number;
@@ -52,4 +54,10 @@ export class THznjZbthBillResponse implements IHznjZbthBillResponse {
52
54
  fromNotiBill: number = 0;
53
55
  fromZblrBill: number = 0;
54
56
  fromZbjgBill: number = 0;
57
+
58
+ constructor(data: Partial<IHznjZbthBillResponse> = {}) {
59
+ if (data) {
60
+ _.merge(this, _.pick(data, Object.keys(this)));
61
+ }
62
+ }
55
63
  }
@@ -1,4 +1,6 @@
1
1
  import { THznj, TCore } from "..";
2
+ import _ from "lodash";
3
+ import {TFlowDataResponse} from "../flow";
2
4
 
3
5
  export interface IHznjZbthResponse {
4
6
  whoBuild: number;
@@ -139,4 +141,35 @@ export class THznjZbthResponse implements IHznjZbthResponse {
139
141
  listPath: TCore.IPathResponse[] = [];
140
142
  listBill: THznj.IHznjZbthBillResponse[] = [];
141
143
  listFrom: THznj.IHznjZbjgResponse[] = [];
144
+
145
+ constructor(data: Partial<IHznjZbthResponse> = {}) {
146
+ if (data) {
147
+ _.merge(this, _.pick(data, Object.keys(this)));
148
+ }
149
+ }
150
+
151
+ static toFlowData(data: IHznjZbthResponse): TFlowDataResponse {
152
+ const result = new TFlowDataResponse();
153
+ result.whoBuild = data.whoBuild;
154
+ result.userIndx = data.userIndx;
155
+ result.flowMain = data.flowMain;
156
+ result.flowNode = data.flowNode;
157
+ result.notified = "";
158
+ result.entityID = data.entityID;
159
+ result.billMain = data.zbthIndx;
160
+ result.billCode = data.zbthCode;
161
+ result.billMemo = data.zbthMemo;
162
+ result.flowStat = data.zbthStat;
163
+ result.createAt = data.createAt;
164
+ result.mastName = data.mastName;
165
+ result.createBy = data.createBy;
166
+ result.unitMain = data.unitMain;
167
+ result.deptMain = data.deptMain;
168
+ result.menuUUID = data.menuUUID;
169
+ return result;
170
+ }
171
+
172
+ static toFlowDatas(list: IHznjZbthResponse[]): TFlowDataResponse[] {
173
+ return list.map((data) => this.toFlowData(data));
174
+ }
142
175
  }
package/src/hznj/index.ts CHANGED
@@ -32,6 +32,9 @@ import { THznjZbthBillResponse, IHznjZbthBillResponse } from "./IHznjZbthBillRes
32
32
  //#zbcz
33
33
  import { THznjZbczResponse, IHznjZbczResponse } from "./IHznjZbczResponse";
34
34
  import { THznjZbczBillResponse, IHznjZbczBillResponse } from "./IHznjZbczBillResponse";
35
+ //#main
36
+ import { THznjMainResponse, IHznjMainResponse } from "./IHznjMainResponse";
37
+ import { THznjBillResponse, IHznjBillResponse } from "./IHznjBillResponse";
35
38
 
36
39
  export {
37
40
  THznjBaseResponse,
@@ -57,6 +60,8 @@ export {
57
60
  THznjZbthBillResponse,
58
61
  THznjZbczResponse,
59
62
  THznjZbczBillResponse,
63
+ THznjMainResponse,
64
+ THznjBillResponse,
60
65
  type IHznjBaseResponse,
61
66
  type IHznjBasePathResponse,
62
67
  type IHznjBaseItemResponse,
@@ -79,5 +84,7 @@ export {
79
84
  type IHznjZbthResponse,
80
85
  type IHznjZbthBillResponse,
81
86
  type IHznjZbczResponse,
82
- type IHznjZbczBillResponse
87
+ type IHznjZbczBillResponse,
88
+ type IHznjMainResponse,
89
+ type IHznjBillResponse
83
90
  };
@@ -67,6 +67,7 @@ export interface IHznkFytqResponse {
67
67
  lastMemo: string;
68
68
  userName: string;
69
69
  userGUID: string;
70
+ dContact: string;
70
71
  /**附件 */
71
72
  listPath: TCore.IPathResponse[];
72
73
  /**关联项目 */
@@ -136,6 +137,7 @@ export class THznkFytqResponse implements IHznkFytqResponse {
136
137
  lastMemo: string = "";
137
138
  userName: string = "";
138
139
  userGUID: string = "";
140
+ dContact: string = "";
139
141
 
140
142
  listPath: TCore.IPathResponse[] = [];
141
143
  listFrom: THznk.IHznkFydwBillResponse[] = [];