@ningboyz/types 1.2.55 → 1.2.57

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.55",
4
+ "version": "1.2.57",
5
5
  "private": false,
6
6
  "description": "宁波甬政类型库",
7
7
  "author": "nbyt-syq",
@@ -1,3 +1,7 @@
1
+ import { Const } from "../..";
2
+ import { TFlowDataResponse } from "../flow";
3
+ import _ from "lodash";
4
+
1
5
  export interface IHzcbMainResponse {
2
6
  whoBuild: number;
3
7
  userIndx: number;
@@ -93,6 +97,9 @@ export interface IHzcbMainResponse {
93
97
  codeTxt1: string;
94
98
  /** 土地面积(公顷) */
95
99
  mjValue1: number;
100
+ flowNode: number;
101
+ flowMain: number;
102
+ flowStat: number;
96
103
 
97
104
  fromOutMoney: number;
98
105
  fromHzcbMemo: string;
@@ -193,7 +200,42 @@ export class THzcbMainResponse implements IHzcbMainResponse {
193
200
  codeTxt1: string = "";
194
201
  /** 土地面积(公顷) */
195
202
  mjValue1: number = 0;
203
+ flowNode: number = 0;
204
+ flowMain: number = 0;
205
+ flowStat: number = 0;
196
206
 
197
207
  fromOutMoney: number = 0;
198
208
  fromHzcbMemo: string = "";
209
+
210
+ constructor(card: any = {}) {
211
+ if (card) {
212
+ _.merge(this, _.pick(card, Object.keys(this)));
213
+ }
214
+ }
215
+
216
+ static toFlowDatas(card: THzcbMainResponse[]): TFlowDataResponse[] {
217
+ return card.map((u) => this.toFlowData(u));
218
+ }
219
+
220
+ static toFlowData(xmyk: THzcbMainResponse): TFlowDataResponse {
221
+ let result = new TFlowDataResponse();
222
+ result.whoBuild = xmyk.whoBuild;
223
+ result.userIndx = xmyk.userIndx;
224
+ result.flowMain = xmyk.flowMain;
225
+ result.flowNode = xmyk.flowNode;
226
+ result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_HZCB_XMYK_WAIT;
227
+ result.entityID = xmyk.entityID;
228
+ result.billMain = xmyk.hzcbIndx;
229
+ result.billCode = xmyk.hzcbCode;
230
+ result.billMemo = xmyk.hzcbMemo;
231
+ result.outMoney = 0;
232
+ result.createAt = xmyk.createAt;
233
+ result.mastName = xmyk.mastName;
234
+ result.createBy = xmyk.createBy;
235
+ result.unitMain = xmyk.unitMain;
236
+ result.deptMain = xmyk.deptMain;
237
+ result.menuUUID = xmyk.menuUUID;
238
+ result.flowStat = xmyk.hzcbStat;
239
+ return result;
240
+ }
199
241
  }