@ningboyz/types 1.7.99 → 1.7.101

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.7.99",
4
+ "version": "1.7.101",
5
5
  "private": false,
6
6
  "description": "宁波甬政类型库",
7
7
  "author": "nbyt-syq",
@@ -38,6 +38,7 @@ export const CONST_STR_TODO_TYPE_TO_MYOA_MAIN_WAIT = "CONST_STR_TODO_TYPE_TO_MYO
38
38
  export const CONST_STR_TODO_TYPE_TO_GZZD_MAIN_WAIT = "CONST_STR_TODO_TYPE_TO_GZZD_MAIN_WAIT"; // #工资审核
39
39
  export const CONST_STR_TODO_TYPE_TO_TABL_MAIN_WAIT = "CONST_STR_TODO_TYPE_TO_TABL_MAIN_WAIT"; // #预算审核
40
40
  export const CONST_STR_TODO_TYPE_TO_HZCB_XMTZ_WAIT = "CONST_STR_TODO_TYPE_TO_HZCB_XMTZ_WAIT"; // #投资计划审核
41
+ export const CONST_STR_TODO_TYPE_TO_HZCB_XMTZTZ_WAIT = "CONST_STR_TODO_TYPE_TO_HZCB_XMTZTZ_WAIT"; // #投资计划调整审核
41
42
  export const CONST_STR_TODO_TYPE_TO_HZCB_XMYK_WAIT = "CONST_STR_TODO_TYPE_TO_HZCB_XMYK_WAIT"; // #用款计划审核
42
43
  export const CONST_STR_TODO_TYPE_TO_CARD_FWCZ_WAIT = "CONST_STR_TODO_TYPE_TO_CARD_FWCZ_WAIT"; // #房屋出租审核
43
44
  export const CONST_STR_TODO_TYPE_TO_YZHT_MAIN_WAIT = "CONST_STR_TODO_TYPE_TO_YZHT_MAIN_WAIT"; // #房产合同审核
@@ -3,8 +3,7 @@ import _ from "lodash";
3
3
  import { IElemElemResponse } from "../elem/IElemElemResponse";
4
4
  import type { IGzjgGzlmResponseGzlmPara } from "./IGzjgGzlmResponseGzlmPara";
5
5
  import { TGzjgGzlmResponseGzlmPara } from "./IGzjgGzlmResponseGzlmPara";
6
- import { TGzlmLiteResponse } from "./IGzlmLiteResponse.ts";
7
-
6
+ import { TGzlmLiteResponse} from "./IGzlmLiteResponse.ts";
8
7
  // #工资栏目
9
8
  export interface IGzjgGzlmResponse {
10
9
  whoBuild: number; //#PK
@@ -175,6 +174,12 @@ export class TGzjgGzlmResponse implements IGzjgGzlmResponse {
175
174
  id: number = 0;
176
175
  children = [];
177
176
 
177
+ constructor(data: Partial<IGzjgGzlmResponse> = {}) {
178
+ if (data) {
179
+ _.merge(this, _.pick(data, Object.keys(this)));
180
+ }
181
+ }
182
+
178
183
  static parseJson(gzlmPara: string) {
179
184
  const defaultGzlmPara = new TGzjgGzlmResponseGzlmPara();
180
185
  if (_.isEmpty(gzlmPara)) {
@@ -196,29 +201,8 @@ export class TGzjgGzlmResponse implements IGzjgGzlmResponse {
196
201
  }
197
202
 
198
203
  static toGzlmLite(listPara: IGzjgGzlmResponse[]) {
199
- var result = [];
200
-
201
- for (let index = 0; index < listPara.length; index++) {
202
- const element = listPara[index];
203
-
204
- if (!_.isNil(element)) {
205
-
206
- var gzlmLite = new TGzlmLiteResponse();
207
- gzlmLite.whoBuild = element.whoBuild;
208
- gzlmLite.userIndx = element.userIndx;
209
- gzlmLite.gzjgIndx = element.gzjgIndx;
210
- gzlmLite.gzlmFlid = element.gzlmFlid;
211
-
212
- gzlmLite.gzlmFlbh = element.gzlmFlbh;
213
- gzlmLite.gzlmFljs = element.gzlmFljs;
214
- gzlmLite.gzlmFllx = element.gzlmFllx;
215
- gzlmLite.gzlmFlws = element.gzlmFlws;
216
- gzlmLite.typTotal = element.typTotal;
217
-
218
- result.push(gzlmLite);
219
- }
220
- }
221
-
222
- return result;
204
+ return listPara
205
+ .filter((element): element is IGzjgGzlmResponse => !_.isNil(element))
206
+ .map((element) => new TGzlmLiteResponse(element));
223
207
  }
224
208
  }
@@ -1,3 +1,5 @@
1
+ import _ from "lodash";
2
+
1
3
  export interface IGzlmLiteResponse {
2
4
  whoBuild: number;
3
5
  userIndx: number;
@@ -20,4 +22,10 @@ export class TGzlmLiteResponse implements IGzlmLiteResponse {
20
22
  gzlmFlws: number = 0;
21
23
  gzlmFljs: number = 0;
22
24
  typTotal: number = 0;
25
+
26
+ constructor(data: Partial<IGzlmLiteResponse> = {}) {
27
+ if (data) {
28
+ _.merge(this, _.pick(data, Object.keys(this)));
29
+ }
30
+ }
23
31
  }