@ningboyz/types 1.1.53 → 1.1.55

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/types",
3
- "version": "1.1.53",
3
+ "version": "1.1.55",
4
4
  "private": false,
5
5
  "description": "宁波甬政类型库",
6
6
  "author": "nbyt-syq",
@@ -169,7 +169,7 @@ export interface INotiMainResponse {
169
169
  /**
170
170
  * 密级
171
171
  */
172
- secretID: string;
172
+ secretID: number;
173
173
  /**
174
174
  * 保密期限
175
175
  */
@@ -205,7 +205,7 @@ export interface INotiMainResponse {
205
205
  /**
206
206
  * 来文单位
207
207
  */
208
- fileFrom: string;
208
+ fileFrom: number;
209
209
  }
210
210
 
211
211
  export class TNotiMainResponse implements INotiMainResponse {
@@ -336,7 +336,7 @@ export class TNotiMainResponse implements INotiMainResponse {
336
336
  zdField2: number = 0;
337
337
  zdField3: number = 0;
338
338
  zdField4: number = 0;
339
- secretID: string = "";
339
+ secretID: number = 0;
340
340
  secretAt: number = 0;
341
341
  urgentID: number = 0;
342
342
  deadLock: number = 0;
@@ -345,7 +345,7 @@ export class TNotiMainResponse implements INotiMainResponse {
345
345
  usesNoti: string = "";
346
346
  deptName: string = "";
347
347
  scanCode: string = "";
348
- fileFrom: string = "";
348
+ fileFrom: number = 0;
349
349
 
350
350
  constructor(card: any = {}) {
351
351
  if (card) {
@@ -1,4 +1,6 @@
1
+ import { TFlowDataResponse } from "../flow";
1
2
  import type { ITablDataResponse } from "./ITablDataResponse";
3
+ import _ from "lodash";
2
4
 
3
5
  export interface ITablMainResponse {
4
6
  whoBuild: number;
@@ -145,4 +147,38 @@ export class TTablMainResponse implements ITablMainResponse {
145
147
  taskMain: number = 0;
146
148
 
147
149
  listData: Array<ITablDataResponse> = [];
150
+
151
+ constructor(card: keyof ITablMainResponse | object) {
152
+ if (card) {
153
+ _.merge(this, _.pick(card, Object.keys(this)));
154
+ }
155
+ }
156
+
157
+ static toFlowDatas(card: ITablMainResponse[]): TFlowDataResponse[] {
158
+ return card.map((u) => this.toFlowData(u));
159
+ }
160
+
161
+ //#进入流程
162
+ static toFlowData(myoa: ITablMainResponse): TFlowDataResponse {
163
+ const result = new TFlowDataResponse();
164
+ result.whoBuild = myoa.whoBuild;
165
+ result.userIndx = myoa.userIndx;
166
+ result.flowMain = myoa.flowMain;
167
+ result.flowNode = myoa.flowNode;
168
+ // result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_HTQD_WAIT;
169
+ result.entityID = myoa.entityID;
170
+ result.billMain = myoa.tablIndx;
171
+ result.billMemo = myoa.tablMemo;
172
+ result.billUses = "";
173
+ result.ysxmText = "";
174
+ result.outMoney = 0;
175
+ result.createAt = myoa.createAt;
176
+ result.mastName = myoa.mastName;
177
+ result.createBy = myoa.createBy;
178
+ result.unitMain = myoa.unitMain;
179
+ result.menuUUID = myoa.menuUUID;
180
+ result.deptMain = myoa.deptMain;
181
+ result.flowStat = myoa.tablStat;
182
+ return result;
183
+ }
148
184
  }