@ningboyz/types 1.3.138 → 1.3.140

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.3.138",
4
+ "version": "1.3.140",
5
5
  "private": false,
6
6
  "description": "宁波甬政类型库",
7
7
  "author": "nbyt-syq",
@@ -0,0 +1,41 @@
1
+ import _ from "lodash";
2
+
3
+ export interface IWebSocketResponse {
4
+ entityid: string;
5
+ notified: string;
6
+ shiftpwd: string;
7
+ shiftusr: string;
8
+ username: string;
9
+ fromuuid: string;
10
+ billuuid: string;
11
+ notimemo: string;
12
+ onstatus: boolean;
13
+ path4url: string;
14
+ }
15
+
16
+ export class TWebSocketResponse implements IWebSocketResponse {
17
+ entityid: string = "";
18
+ notified: string = "";
19
+ shiftpwd: string = "";
20
+ shiftusr: string = "";
21
+ username: string = "";
22
+ fromuuid: string = "";
23
+ billuuid: string = "";
24
+ notimemo: string = "";
25
+ onstatus: boolean = false;
26
+ path4url: string = "";
27
+
28
+ static parseJson(data: string) {
29
+ let result = new TWebSocketResponse();
30
+ if (_.isEmpty(data)) {
31
+ return result;
32
+ }
33
+ try {
34
+ const temp = JSON.parse(data) as TWebSocketResponse;
35
+ return _.merge(result, temp);
36
+ } catch (e: any) {
37
+ console.error(e.message);
38
+ }
39
+ return result;
40
+ }
41
+ }
package/src/core/index.ts CHANGED
@@ -21,6 +21,7 @@ import { IUserPartResponse, TUserPartResponse } from "./IUserPartResponse";
21
21
  import { IUserSzdwResponse, TUserSzdwResponse } from "./IUserSzdwResponse";
22
22
  import { ICoreValidResponse, TCoreValidResponse } from "./ICoreValidResponse";
23
23
  import { ISysTravelResponse, TSysTravelResponse, ISysTravelWithParaResponse, TSysTravelWithParaResponse } from "./ISysTravelResponse";
24
+ import { IWebSocketResponse, TWebSocketResponse } from "./IWebSocketResponse"
24
25
 
25
26
  export {
26
27
  type ICoreValidResponse,
@@ -48,6 +49,7 @@ export {
48
49
  type IUserResponse,
49
50
  type IUserSzdwResponse,
50
51
  type IUserPartResponse,
52
+ type IWebSocketResponse,
51
53
 
52
54
  // 类
53
55
  TCoreValidResponse,
@@ -73,5 +75,6 @@ export {
73
75
  TUserLiteResponse,
74
76
  TUserResponse,
75
77
  TUserSzdwResponse,
76
- TUserPartResponse
78
+ TUserPartResponse,
79
+ TWebSocketResponse
77
80
  };
@@ -88,6 +88,8 @@ export interface IHznjXmsyWtdwResponse {
88
88
  batchTxt: string;
89
89
  /**规格型号 */
90
90
  ggxhText: string;
91
+ /**样品来源 */
92
+ fromText: string;
91
93
 
92
94
  /**
93
95
  * 虚拟字段
@@ -149,6 +151,8 @@ export class THznjXmsyWtdwResponse implements IHznjXmsyWtdwResponse {
149
151
  batchTxt: string = "";
150
152
  ggxhText: string = "";
151
153
  baseIndx: number = 0;
154
+ /**样品来源 */
155
+ fromText: string = "";
152
156
 
153
157
  constructor(data: Partial<IHznjXmsyWtdwResponse> = {}) {
154
158
  if (data) {
@@ -1,67 +0,0 @@
1
- import _ from "lodash";
2
-
3
- export interface ISyszclbgblbResponse {
4
- whoBuild: number
5
- userIndx: number
6
- zclbIndx: number
7
- dataStat: number
8
- dataHide: number
9
- dataOrdr: number
10
- dataFrom: number
11
- dataDate: number
12
- dataTime: number
13
- createBy: string
14
- createAt: number
15
- updateBy: string
16
- updateAt: number
17
- deleteBy: string
18
- deleteAt: number
19
- queuesBy: number
20
- fromWhoBuild: number
21
- fromUserIndx: number
22
- fromGblbIndx: number
23
- sourceND: number
24
- fromSourceND: number
25
-
26
- zclbTypeText: string
27
- zclbCode: string
28
- zclbName: string
29
- gblbCode: string
30
- gblbName: string
31
- }
32
-
33
- export class TSyszclbgblbResponse implements ISyszclbgblbResponse {
34
- whoBuild: number = 0
35
- userIndx: number = 0
36
- zclbIndx: number = 0
37
- dataStat: number = 0
38
- dataHide: number = 0
39
- dataOrdr: number = 0
40
- dataFrom: number = 0
41
- dataDate: number = 0
42
- dataTime: number = 0
43
- createBy: string = ""
44
- createAt: number = 0
45
- updateBy: string = ""
46
- updateAt: number = 0
47
- deleteBy: string = ""
48
- deleteAt: number = 0
49
- queuesBy: number = 0
50
- fromWhoBuild: number = 0
51
- fromUserIndx: number = 0
52
- fromGblbIndx: number = 0
53
- sourceND: number = 0
54
- fromSourceND: number = 0
55
-
56
- zclbTypeText: string = ""
57
- zclbCode: string = ""
58
- zclbName: string = ""
59
- gblbCode: string = ""
60
- gblbName: string = ""
61
-
62
- constructor(data: any = {}) {
63
- if (data) {
64
- _.merge(this, _.pick(data, Object.keys(this)));
65
- }
66
- }
67
- }
@@ -1,68 +0,0 @@
1
- import _ from "lodash";
2
-
3
- export interface ISyszclbgblb{
4
- whoBuild : number
5
- userIndx : number
6
- zclbIndx : number
7
- dataStat : number
8
- dataHide : number
9
- dataOrdr : number
10
- dataFrom : number
11
- dataDate : number
12
- dataTime : number
13
- createBy : string
14
- createAt : number
15
- updateBy : string
16
- updateAt : number
17
- deleteBy : string
18
- deleteAt : number
19
- queuesBy : number
20
- fromWhoBuild: number
21
- fromUserIndx: number
22
- fromGblbIndx: number
23
- sourceND : number
24
- fromSourceND: number
25
-
26
- zclbTypeText : string
27
- zclbCode: string
28
- zclbName: string
29
- gblbCode: string
30
- gblbName: string
31
-
32
- }
33
-
34
- export class TSyszclbgblb implements ISyszclbgblb{
35
- whoBuild : number = 0
36
- userIndx : number = 0
37
- zclbIndx : number = 0
38
- dataStat : number = 0
39
- dataHide : number = 0
40
- dataOrdr : number = 0
41
- dataFrom : number = 0
42
- dataDate : number = 0
43
- dataTime : number = 0
44
- createBy : string =''
45
- createAt : number = 0
46
- updateBy : string =''
47
- updateAt : number = 0
48
- deleteBy : string =''
49
- deleteAt : number = 0
50
- queuesBy : number = 0
51
- fromWhoBuild: number = 0
52
- fromUserIndx: number = 0
53
- fromGblbIndx: number = 0
54
- sourceND : number = 0
55
- fromSourceND: number = 0
56
-
57
- zclbTypeText : string =""
58
- zclbCode: string =""
59
- zclbName: string =""
60
- gblbCode: string =""
61
- gblbName: string =""
62
-
63
- constructor(data: Partial<ISYSZCLBGBLB> = {}) {
64
- if (data) {
65
- _.merge(this, _.pick(data, Object.keys(this)));
66
- }
67
- }
68
- }
@@ -1,20 +0,0 @@
1
- export const CONST_ITEM_TYPE_TO_数值 = 0; // #数值
2
- export const CONST_ITEM_TYPE_TO_文本 = 1; // #文本
3
- export const CONST_ITEM_TYPE_TO_文本域 = 2; // #备注
4
- export const CONST_ITEM_TYPE_TO_日期 = 3; // #日期
5
- export const CONST_ITEM_TYPE_TO_字典 = 4; // #字典
6
-
7
- export const CONST_VALIDATE_TO_手机号码 = 0; // #整数
8
- export const CONST_VALIDATE_TO_邮箱 = 1; // #文本
9
- export const CONST_VALIDATE_TO_身份证 = 2; // #备注
10
- export const CONST_VALIDATE_TO_自定义 = 3;
11
-
12
- export const CONST_CLEARABLE_TO_不清空 = 0; //不清空
13
- export const CONST_CLEARABLE_TO_清空 = 1; //清空
14
- export const CONST_CLEARABLE_TO_询问 = 2; //询问
15
-
16
- export const CONST_OPERATOR_TO_大于 = 0; //大于
17
- export const CONST_OPERATOR_TO_等于 = 1; //等于
18
- export const CONST_OPERATOR_TO_小于 = 2; //小于
19
- export const CONST_OPERATOR_TO_大于等于 = 3; //大于等于
20
- export const CONST_OPERATOR_TO_小于等于 = 4; //小于等于
@@ -1,162 +0,0 @@
1
- import { construct, destruct } from "@aximario/json-tree";
2
- import type { IBaseResponse } from "../base/IBaseResponse";
3
- import { TBaseResponse } from "../base/IBaseResponse";
4
- import type { IDictResponse } from "./IDictResponse";
5
- import _ from "lodash";
6
- import { TCore } from "../../index.ts";
7
-
8
- export interface IDeptResponse extends IBaseResponse<IDeptResponse[]> {
9
- codeFull: string;
10
- createAt: number;
11
- createBy: string;
12
- dataDate: number;
13
- dataFrom: number;
14
- dataGUID: string;
15
- dataHide: number;
16
- dataLevl: number;
17
- dataOrdr: number;
18
- dataStat: number;
19
- dataTime: number;
20
- dataType: number;
21
- deleteAt: number;
22
- deleteBy: string;
23
- /**联系电话 */
24
- deptCall: string;
25
- deptCode: string;
26
- deptGnkm: string;
27
- deptIndx: number;
28
- /** 负责人 */
29
- deptMast: string;
30
- /** 备注 */
31
- deptMemo: string;
32
- deptName: string;
33
- /** 部门类型(新) 文本 */
34
- deptTypeText: string;
35
- entityID: string;
36
- gkbmText: string;
37
- hashCode: number;
38
- isLasted: number;
39
- kjndKJQJ: number;
40
- mastGUID: string;
41
- mastName: string;
42
- nameFull: string;
43
- parentID: number;
44
- uniqueID: number;
45
- unitMain: number;
46
- unitText: string;
47
- updateAt: number;
48
- updateBy: string;
49
- userIndx: number;
50
- whoBuild: number;
51
- matchVal: string;
52
- dataMemo: string;
53
- queuesBy: number;
54
-
55
- ratioVal: number; //固定资产-部门分摊-占比
56
- cardZcyz: number; //固定资产-部门分摊-金额
57
-
58
- /** 部门类型 */
59
- listBMLX: Array<IDictResponse>;
60
- /** 部门类型(新) */
61
- listType: Array<IDictResponse>;
62
- }
63
-
64
- export class TDeptResponse extends TBaseResponse<IDeptResponse[]> implements IDeptResponse {
65
- codeFull: string = "";
66
- createAt: number = 0;
67
- createBy: string = "";
68
- dataDate: number = 0;
69
- dataFrom: number = 0;
70
- dataGUID: string = "";
71
- dataHide: number = 0;
72
- dataLevl: number = 0;
73
- dataOrdr: number = 0;
74
- dataStat: number = 0;
75
- dataTime: number = 0;
76
- dataType: number = 0;
77
- deleteAt: number = 0;
78
- deleteBy: string = "";
79
- deptCall: string = "";
80
- deptCode: string = "";
81
- deptGnkm: string = "";
82
- deptIndx: number = 0;
83
- deptMast: string = "";
84
- deptMemo: string = "";
85
- deptName: string = "";
86
- deptTypeText: string = "";
87
- entityID: string = "";
88
- gkbmText: string = "";
89
- hashCode: number = 0;
90
- isLasted: number = 0;
91
- kjndKJQJ: number = 0;
92
- mastGUID: string = "";
93
- mastName: string = "";
94
- nameFull: string = "";
95
- parentID: number = 0;
96
- uniqueID: number = 0;
97
- unitMain: number = 0;
98
- unitText: string = "";
99
- updateAt: number = 0;
100
- updateBy: string = "";
101
- userIndx: number = 0;
102
- whoBuild: number = 0;
103
- matchVal: string = "";
104
- dataMemo: string = "";
105
- queuesBy: number = 0;
106
-
107
- ratioVal: number = 0;
108
- cardZcyz: number = 0;
109
-
110
- listBMLX: IDictResponse[] = [];
111
- /** 部门类型(新) */
112
- listType: IDictResponse[] = [];
113
-
114
- constructor(data: any = {}) {
115
- super();
116
- if (data) {
117
- _.merge(this, _.pick(data, Object.keys(this)));
118
- }
119
- }
120
-
121
- public static toTree(listDept: IDeptResponse[]) {
122
- return construct(listDept, { id: "deptIndx", pid: "parentID", children: "children" }) as IDeptResponse[];
123
- }
124
-
125
- public static toList(treeDept: IDeptResponse[]) {
126
- return destruct(treeDept, { id: "deptIndx", pid: "parentID", children: "children" }) as IDeptResponse[];
127
- }
128
-
129
- public static createDetp(deptMain: number, deptName: string) {
130
- const dept = new TDeptResponse();
131
- dept.deptIndx = deptMain;
132
- dept.deptName = deptName;
133
- return dept;
134
- }
135
-
136
- static toTravel(dept: IDeptResponse, whatDone: string): TCore.ISysTravelResponse {
137
- const travel = new TCore.TSysTravelResponse();
138
- travel.whoBuild = dept.whoBuild;
139
- travel.flowMain = 0;
140
- travel.flowNode = 0;
141
- travel.billUUID = dept.entityID;
142
- travel.billMain = dept.deptIndx;
143
- travel.billCode = dept.deptCode;
144
- travel.mastName = dept.mastName;
145
- travel.createBy = dept.createBy;
146
- travel.whatDone = `${whatDone}${dept.deptName}`;
147
- return travel;
148
- }
149
-
150
- /** 转换成记录日志需要的数据(第一层,不包含菜单) */
151
- static toTravelData(card?: IDeptResponse | IDeptResponse[], whatDone: string = ""): TCore.ISysTravelResponse[] {
152
- if (_.isNil(card)) {
153
- return [];
154
- }
155
- if (_.isArray(card)) {
156
- return card.map((u) => {
157
- return this.toTravel(u, whatDone);
158
- });
159
- }
160
- return [this.toTravel(card, whatDone)];
161
- }
162
- }