@ningboyz/types 1.0.21 → 1.0.23
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/index.ts +8 -0
- package/package.json +1 -1
- package/src/antv/IAntvCnfgResponse.ts +69 -0
- package/src/antv/IAntvMainResponse.ts +67 -0
- package/src/antv/IAntvParaResponse.ts +48 -0
- package/src/antv/index.ts +5 -0
- package/src/card/ICardMainResponse.ts +256 -130
- package/src/card/IGblbResponse.ts +64 -5
- package/src/card/IP4pzResponse.ts +68 -0
- package/src/card/IZcbdResponse.ts +103 -9
- package/src/card/IZccfResponse.ts +141 -3
- package/src/card/IZcczResponse.ts +134 -0
- package/src/card/IZcdbResponse.ts +149 -0
- package/src/card/IZclbResponse.ts +138 -0
- package/src/card/IZczjPropResponse.ts +94 -0
- package/src/card/IZczjResponse.ts +121 -0
- package/src/card/index.ts +18 -6
- package/src/conf/IConfig.ts +1 -0
- package/src/conf/index.ts +1 -1
- package/src/const/const_bizCode.ts +3 -0
- package/src/const/const_module.ts +72 -0
- package/src/const/const_p4pt.ts +8 -0
- package/src/const/const_stat.ts +11 -2
- package/src/const/const_todo.ts +5 -0
- package/src/const/const_type_name.ts +10 -0
- package/src/const/const_wldy_item_type.ts +4 -0
- package/src/const/const_wtui_item_type.ts +20 -0
- package/src/const/index.ts +7 -1
- package/src/core/ICoreValidResponse.ts +21 -0
- package/src/core/IDeptLiteResponse.ts +0 -1
- package/src/core/IDeptResponse.ts +60 -0
- package/src/core/IDictResponse.ts +45 -2
- package/src/core/IDictResponseDictPara.ts +2 -0
- package/src/core/ILaidResponse.ts +34 -1
- package/src/core/IPartResponse.ts +29 -0
- package/src/core/ISysMenuWithCoreResponse.ts +3 -2
- package/src/core/ISysTravelResponse.ts +135 -0
- package/src/core/ITypeResponse.ts +27 -0
- package/src/core/IUnitResponse.ts +99 -5
- package/src/core/IUserLiteResponse.ts +2 -0
- package/src/core/IUserResponse.ts +29 -0
- package/src/core/index.ts +8 -0
- package/src/enums/btnMode.ts +82 -3
- package/src/enums/emitterType.ts +5 -0
- package/src/enums/index.ts +2 -2
- package/src/enums/storeId.ts +4 -1
- package/src/enums/usesStat.ts +13 -0
- package/src/enums/whatDone.ts +29 -0
- package/src/flow/IFlowCnfgResponse.ts +0 -2
- package/src/flow/IFlowDataResponse.ts +34 -0
- package/src/flow/IFlowDutyResponse.ts +3 -2
- package/src/flow/IFlowNodeResponse.ts +15 -1
- package/src/flow/IFlowUservoidResponse.ts +35 -0
- package/src/flow/index.ts +3 -1
- package/src/gzjg/IGzjgGzlmResponse.ts +3 -2
- package/src/gzjg/IGzjgGzlmResponseGzlmPara.ts +2 -0
- package/src/gzjg/IGzjgMainResponse.ts +5 -2
- package/src/gztb/IGztbMainResponse.ts +103 -0
- package/src/gztb/index.ts +3 -0
- package/src/load/index.ts +2 -2
- package/src/micro/appName.ts +2 -1
- package/src/noti/INotiMainResponse.ts +278 -0
- package/src/noti/index.ts +3 -0
- package/src/pzpt/IPzptItemResponse.ts +0 -2
- package/src/response/IResponse.ts +31 -0
- package/src/store/dateState.ts +48 -0
- package/src/store/index.ts +4 -2
- package/src/store/menuState.ts +9 -0
- package/src/store/userState.ts +3 -0
- package/src/tabl/ITablDataResponse.ts +2 -0
- package/src/tabl/ITablMainResponse.ts +2 -0
- package/src/task/ITaskMainResponse.ts +121 -0
- package/src/task/index.ts +3 -0
- package/src/wldy/IWldyPageResponse.ts +4 -3
- package/src/wldy/index.ts +5 -5
- package/src/wtui/ITodoResponse.ts +15 -0
- package/src/wtui/IViewCtrlResponse.ts +15 -7
- package/src/wtui/IWtuiColWidthResponse.ts +53 -0
- package/src/wtui/IWtuiFormParaResponse.ts +17 -0
- package/src/wtui/IWtuiFormResponse.ts +95 -0
- package/src/wtui/IWtuiItemCalc.ts +36 -0
- package/src/wtui/IWtuiItemEffect.ts +43 -0
- package/src/wtui/IWtuiItemParaResponse.ts +59 -0
- package/src/wtui/IWtuiItemResponse.ts +119 -0
- package/src/wtui/IWtuiMainResponse.ts +3 -0
- package/src/wtui/IWtuiNodeResponse.ts +71 -0
- package/src/wtui/IWtuiTodoResponse.ts +36 -0
- package/src/wtui/IWtuiTodoResponseTodoPara.ts +7 -0
- package/src/wtui/IWtuiTodoResponseWithPara.ts +32 -0
- package/src/wtui/IWtuiUserCnfgResponse.ts +100 -0
- package/src/wtui/IWtuiZoneResponse.ts +61 -0
- package/src/wtui/index.ts +46 -1
- package/src/enums/wldyItemType.ts +0 -5
|
@@ -2,6 +2,8 @@ import { construct, destruct } from "@aximario/json-tree";
|
|
|
2
2
|
import type { IBaseResponse } from "../base/IBaseResponse";
|
|
3
3
|
import { TBaseResponse } from "../base/IBaseResponse";
|
|
4
4
|
import type { IDictResponse } from "./IDictResponse";
|
|
5
|
+
import _ from "lodash";
|
|
6
|
+
import { TCore } from "../../index.ts";
|
|
5
7
|
|
|
6
8
|
export interface IDeptResponse extends IBaseResponse<IDeptResponse[]> {
|
|
7
9
|
codeFull: string;
|
|
@@ -28,6 +30,7 @@ export interface IDeptResponse extends IBaseResponse<IDeptResponse[]> {
|
|
|
28
30
|
/** 备注 */
|
|
29
31
|
deptMemo: string;
|
|
30
32
|
deptName: string;
|
|
33
|
+
/** 部门类型(新) 文本 */
|
|
31
34
|
deptTypeText: string;
|
|
32
35
|
entityID: string;
|
|
33
36
|
gkbmText: string;
|
|
@@ -40,14 +43,22 @@ export interface IDeptResponse extends IBaseResponse<IDeptResponse[]> {
|
|
|
40
43
|
parentID: number;
|
|
41
44
|
uniqueID: number;
|
|
42
45
|
unitMain: number;
|
|
46
|
+
unitText: string;
|
|
43
47
|
updateAt: number;
|
|
44
48
|
updateBy: string;
|
|
45
49
|
userIndx: number;
|
|
46
50
|
whoBuild: number;
|
|
47
51
|
matchVal: string;
|
|
52
|
+
dataMemo: string;
|
|
48
53
|
queuesBy: number;
|
|
54
|
+
|
|
55
|
+
ratioVal: number; //固定资产-部门分摊-占比
|
|
56
|
+
cardZcyz: number; //固定资产-部门分摊-金额
|
|
57
|
+
|
|
49
58
|
/** 部门类型 */
|
|
50
59
|
listBMLX: Array<IDictResponse>;
|
|
60
|
+
/** 部门类型(新) */
|
|
61
|
+
listType: Array<IDictResponse>;
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
export class TDeptResponse extends TBaseResponse<IDeptResponse[]> implements IDeptResponse {
|
|
@@ -84,13 +95,28 @@ export class TDeptResponse extends TBaseResponse<IDeptResponse[]> implements IDe
|
|
|
84
95
|
parentID: number = 0;
|
|
85
96
|
uniqueID: number = 0;
|
|
86
97
|
unitMain: number = 0;
|
|
98
|
+
unitText: string = "";
|
|
87
99
|
updateAt: number = 0;
|
|
88
100
|
updateBy: string = "";
|
|
89
101
|
userIndx: number = 0;
|
|
90
102
|
whoBuild: number = 0;
|
|
91
103
|
matchVal: string = "";
|
|
104
|
+
dataMemo: string = "";
|
|
92
105
|
queuesBy: number = 0;
|
|
106
|
+
|
|
107
|
+
ratioVal: number = 0;
|
|
108
|
+
cardZcyz: number = 0;
|
|
109
|
+
|
|
93
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
|
+
}
|
|
94
120
|
|
|
95
121
|
public static toTree(listDept: IDeptResponse[]) {
|
|
96
122
|
return construct(listDept, { id: "deptIndx", pid: "parentID", children: "children" }) as IDeptResponse[];
|
|
@@ -99,4 +125,38 @@ export class TDeptResponse extends TBaseResponse<IDeptResponse[]> implements IDe
|
|
|
99
125
|
public static toList(treeDept: IDeptResponse[]) {
|
|
100
126
|
return destruct(treeDept, { id: "deptIndx", pid: "parentID", children: "children" }) as IDeptResponse[];
|
|
101
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;
|
|
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
|
+
}
|
|
102
162
|
}
|
|
@@ -3,6 +3,7 @@ import _ from "lodash";
|
|
|
3
3
|
import { type IBaseResponse, TBaseResponse } from "../base/IBaseResponse";
|
|
4
4
|
import type { IDictResponseDictPara } from "./IDictResponseDictPara";
|
|
5
5
|
import { TDictResponseDictPara } from "./IDictResponseDictPara";
|
|
6
|
+
import { TCore } from "../../index.ts";
|
|
6
7
|
|
|
7
8
|
export interface IDictResponse extends IBaseResponse<IDictResponse[]> {
|
|
8
9
|
asParent: number;
|
|
@@ -45,10 +46,14 @@ export interface IDictResponse extends IBaseResponse<IDictResponse[]> {
|
|
|
45
46
|
unitText: string;
|
|
46
47
|
updateAt: number;
|
|
47
48
|
updateBy: string;
|
|
49
|
+
dataMemo: string;
|
|
48
50
|
userIndx: number;
|
|
49
51
|
whoBuild: number;
|
|
50
52
|
readOnly: boolean;
|
|
51
53
|
dictParaConv: IDictResponseDictPara;
|
|
54
|
+
|
|
55
|
+
ratioVal: number; //固定资产-资金明细-占比
|
|
56
|
+
cardZcyz: number; //固定资产-资金明细-金额
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
export class TDictResponse extends TBaseResponse<IDictResponse[]> implements IDictResponse {
|
|
@@ -88,6 +93,7 @@ export class TDictResponse extends TBaseResponse<IDictResponse[]> implements IDi
|
|
|
88
93
|
sysTypec: number = 0;
|
|
89
94
|
typeIndx: number = 0;
|
|
90
95
|
typeName: string = "";
|
|
96
|
+
dataMemo: string = "";
|
|
91
97
|
typeUses: string = "";
|
|
92
98
|
unitText: string = "";
|
|
93
99
|
updateAt: number = 0;
|
|
@@ -96,6 +102,9 @@ export class TDictResponse extends TBaseResponse<IDictResponse[]> implements IDi
|
|
|
96
102
|
whoBuild: number = 0;
|
|
97
103
|
dictParaConv: IDictResponseDictPara = new TDictResponseDictPara();
|
|
98
104
|
|
|
105
|
+
ratioVal: number = 0;
|
|
106
|
+
cardZcyz: number = 0;
|
|
107
|
+
|
|
99
108
|
public static toTree(listDict: IDictResponse[]) {
|
|
100
109
|
return construct(listDict, { id: "dictIndx", pid: "parentID", children: "children" }) as IDictResponse[];
|
|
101
110
|
}
|
|
@@ -112,9 +121,43 @@ export class TDictResponse extends TBaseResponse<IDictResponse[]> implements IDi
|
|
|
112
121
|
try {
|
|
113
122
|
const obj = JSON.parse(dictPara) as TDictResponseDictPara;
|
|
114
123
|
return _.merge(defaultDictPara, obj);
|
|
115
|
-
} catch (e
|
|
116
|
-
|
|
124
|
+
} catch (e) {
|
|
125
|
+
const error = e as Error;
|
|
126
|
+
console.error(error.message);
|
|
117
127
|
}
|
|
118
128
|
return defaultDictPara;
|
|
119
129
|
}
|
|
130
|
+
|
|
131
|
+
constructor(card: any = {}) {
|
|
132
|
+
super();
|
|
133
|
+
if (card) {
|
|
134
|
+
_.merge(this, _.pick(card, Object.keys(this)));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static toTravel(dict: IDictResponse): TCore.ISysTravelResponse {
|
|
139
|
+
const travel = new TCore.TSysTravelResponse();
|
|
140
|
+
travel.whoBuild = dict.whoBuild;
|
|
141
|
+
travel.flowMain = 0;
|
|
142
|
+
travel.flowNode = 0;
|
|
143
|
+
travel.billUUID = dict.entityID;
|
|
144
|
+
travel.billMain = dict.dictIndx;
|
|
145
|
+
travel.billCode = dict.dictCode;
|
|
146
|
+
travel.mastName = dict.mastName;
|
|
147
|
+
travel.createBy = dict.createBy;
|
|
148
|
+
return travel;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** 转化成记录日志需要的数据 */
|
|
152
|
+
static toTravelData(card?: IDictResponse | IDictResponse[]): TCore.ISysTravelResponse[] {
|
|
153
|
+
if (_.isNil(card)) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
if (_.isArray(card)) {
|
|
157
|
+
return card.map((u) => {
|
|
158
|
+
return this.toTravel(u);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return [this.toTravel(card)];
|
|
162
|
+
}
|
|
120
163
|
}
|
|
@@ -4,6 +4,7 @@ export interface IDictResponseDictPara {
|
|
|
4
4
|
required: boolean;
|
|
5
5
|
hidden: boolean;
|
|
6
6
|
show: boolean;
|
|
7
|
+
gdzc: boolean; //字典-部门类型是否是固定资产
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export class TDictResponseDictPara implements IDictResponseDictPara {
|
|
@@ -12,4 +13,5 @@ export class TDictResponseDictPara implements IDictResponseDictPara {
|
|
|
12
13
|
required: boolean = false;
|
|
13
14
|
hidden: boolean = false;
|
|
14
15
|
show: boolean = false;
|
|
16
|
+
gdzc: boolean = false;
|
|
15
17
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { construct, destruct } from "@aximario/json-tree";
|
|
2
2
|
import type { IBaseResponse } from "../base/IBaseResponse";
|
|
3
3
|
import { TBaseResponse } from "../base/IBaseResponse";
|
|
4
|
+
import _ from "lodash";
|
|
5
|
+
import { TCore } from "../../index.ts";
|
|
4
6
|
|
|
5
7
|
export interface ILaidResponse extends IBaseResponse<ILaidResponse> {
|
|
6
8
|
whoBuild: number;
|
|
@@ -33,6 +35,7 @@ export interface ILaidResponse extends IBaseResponse<ILaidResponse> {
|
|
|
33
35
|
laidMemo: string; // #存放地点.备注
|
|
34
36
|
|
|
35
37
|
unitMain: number; // #单位标识
|
|
38
|
+
unitText: string;
|
|
36
39
|
wldyMain: number; // #网络终端.标识{1号柜,2号柜...}
|
|
37
40
|
wldyName: string; // #网络终端.名称
|
|
38
41
|
matchKey: string; // #匹配标识
|
|
@@ -78,6 +81,7 @@ export class TLaidResponse extends TBaseResponse<ILaidResponse> implements ILaid
|
|
|
78
81
|
laidMemo: string = "";
|
|
79
82
|
|
|
80
83
|
unitMain: number = 0;
|
|
84
|
+
unitText: string = "";
|
|
81
85
|
wldyMain: number = 0;
|
|
82
86
|
wldyName: string = "";
|
|
83
87
|
matchKey: string = "";
|
|
@@ -101,6 +105,35 @@ export class TLaidResponse extends TBaseResponse<ILaidResponse> implements ILaid
|
|
|
101
105
|
|
|
102
106
|
constructor(response?: any) {
|
|
103
107
|
super();
|
|
104
|
-
if (response)
|
|
108
|
+
if (response) {
|
|
109
|
+
_.merge(this, _.pick(response, Object.keys(this)));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static toTravel(laid: ILaidResponse, whatDone: string): TCore.ISysTravelResponse {
|
|
114
|
+
const travel = new TCore.TSysTravelResponse();
|
|
115
|
+
travel.whoBuild = laid.whoBuild;
|
|
116
|
+
travel.flowMain = 0;
|
|
117
|
+
travel.flowNode = 0;
|
|
118
|
+
travel.billUUID = laid.entityID;
|
|
119
|
+
travel.billMain = laid.laidIndx;
|
|
120
|
+
travel.billCode = laid.laidCode;
|
|
121
|
+
travel.mastName = laid.mastName;
|
|
122
|
+
travel.createBy = laid.createBy;
|
|
123
|
+
travel.whatDone = whatDone;
|
|
124
|
+
return travel;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** 转换成记录日志需要的数据(第一层,不包含菜单) */
|
|
128
|
+
static toTravelData(card?: ILaidResponse | ILaidResponse[], whatDone: string = ""): TCore.ISysTravelResponse[] {
|
|
129
|
+
if (_.isNil(card)) {
|
|
130
|
+
return [];
|
|
131
|
+
}
|
|
132
|
+
if (_.isArray(card)) {
|
|
133
|
+
return card.map((u) => {
|
|
134
|
+
return this.toTravel(u, whatDone);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return [this.toTravel(card, whatDone)];
|
|
105
138
|
}
|
|
106
139
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TCore } from "../../index.ts";
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
|
|
1
4
|
export interface IPartResponse {
|
|
2
5
|
whoBuild: number;
|
|
3
6
|
userIndx: number;
|
|
@@ -66,4 +69,30 @@ export class TPartResponse implements IPartResponse {
|
|
|
66
69
|
queuesBy: number = 0;
|
|
67
70
|
usesZbhd: number = 0;
|
|
68
71
|
usesFlow: number = 0;
|
|
72
|
+
|
|
73
|
+
static toTravel(part: IPartResponse): TCore.ISysTravelResponse {
|
|
74
|
+
const travel = new TCore.TSysTravelResponse();
|
|
75
|
+
travel.whoBuild = part.whoBuild;
|
|
76
|
+
travel.flowMain = 0;
|
|
77
|
+
travel.flowNode = 0;
|
|
78
|
+
travel.billUUID = part.entityID;
|
|
79
|
+
travel.billMain = part.usrPartc;
|
|
80
|
+
travel.billCode = "";
|
|
81
|
+
travel.mastName = part.mastName;
|
|
82
|
+
travel.createBy = part.createBy;
|
|
83
|
+
return travel;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 转化成记录日志需要的数据 */
|
|
87
|
+
static toTravelData(card?: IPartResponse | IPartResponse[]): TCore.ISysTravelResponse[] {
|
|
88
|
+
if (_.isNil(card)) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
if (_.isArray(card)) {
|
|
92
|
+
return card.map((u) => {
|
|
93
|
+
return this.toTravel(u);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return [this.toTravel(card)];
|
|
97
|
+
}
|
|
69
98
|
}
|
|
@@ -122,8 +122,9 @@ export class TSysMenuWithCoreResponse implements ISysMenuWithCoreResponse {
|
|
|
122
122
|
try {
|
|
123
123
|
const obj = JSON.parse(menuPara) as TSysMenuWithCoreResponseMenuPara;
|
|
124
124
|
return _.merge(defaultMenuPara, obj);
|
|
125
|
-
} catch (e
|
|
126
|
-
|
|
125
|
+
} catch (e) {
|
|
126
|
+
const error = e as Error;
|
|
127
|
+
console.error(error.message);
|
|
127
128
|
}
|
|
128
129
|
return defaultMenuPara;
|
|
129
130
|
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
|
|
3
|
+
export interface ISysTravelWithParaResponse {
|
|
4
|
+
visitorId: string;
|
|
5
|
+
userAgent: string;
|
|
6
|
+
fileName: string;
|
|
7
|
+
billHead: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class TSysTravelWithParaResponse implements ISysTravelWithParaResponse {
|
|
11
|
+
visitorId: string = "";
|
|
12
|
+
userAgent: string = "";
|
|
13
|
+
fileName: string = ""; //文件名
|
|
14
|
+
billHead: string = ""; //
|
|
15
|
+
|
|
16
|
+
public toString() {
|
|
17
|
+
return JSON.stringify(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export interface ISysTravelResponse {
|
|
21
|
+
dataStat: number;
|
|
22
|
+
dataHide: number;
|
|
23
|
+
dataOrdr: number;
|
|
24
|
+
dataFrom: number;
|
|
25
|
+
dataDate: number;
|
|
26
|
+
dataTime: number;
|
|
27
|
+
createBy: string;
|
|
28
|
+
createAt: number;
|
|
29
|
+
updateBy: string;
|
|
30
|
+
updateAt: number;
|
|
31
|
+
|
|
32
|
+
deleteBy: string;
|
|
33
|
+
deleteAt: number;
|
|
34
|
+
sysClasc: number;
|
|
35
|
+
sysClasn: string;
|
|
36
|
+
//制单人 操作人
|
|
37
|
+
mastName: string;
|
|
38
|
+
mastGUID: string;
|
|
39
|
+
clientIP: string;
|
|
40
|
+
masterID: number;
|
|
41
|
+
entityID: string;
|
|
42
|
+
//WEB
|
|
43
|
+
tablFrom: string;
|
|
44
|
+
//TWhatDone
|
|
45
|
+
whatDone: string;
|
|
46
|
+
|
|
47
|
+
mainCode: string;
|
|
48
|
+
mainName: string;
|
|
49
|
+
//操作时间
|
|
50
|
+
startOff: string;
|
|
51
|
+
arriveAt: string;
|
|
52
|
+
userMain: number;
|
|
53
|
+
userName: string;
|
|
54
|
+
//单据id
|
|
55
|
+
billMain: number;
|
|
56
|
+
//单据编号
|
|
57
|
+
billCode: string;
|
|
58
|
+
//单据entityid
|
|
59
|
+
billUUID: string;
|
|
60
|
+
sysPathc: number;
|
|
61
|
+
|
|
62
|
+
flowMain: number;
|
|
63
|
+
flowNode: number;
|
|
64
|
+
menuMain: number;
|
|
65
|
+
menuUUID: string;
|
|
66
|
+
//菜单名称
|
|
67
|
+
menuName: string;
|
|
68
|
+
withPara: string;
|
|
69
|
+
travelID: number;
|
|
70
|
+
withParaConv: ISysTravelWithParaResponse;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class TSysTravelResponse implements ISysTravelResponse {
|
|
74
|
+
whoBuild: number = 0;
|
|
75
|
+
userIndx: number = 0;
|
|
76
|
+
travelID: number = 0;
|
|
77
|
+
dataStat: number = 0;
|
|
78
|
+
dataHide: number = 0;
|
|
79
|
+
dataOrdr: number = 0;
|
|
80
|
+
dataFrom: number = 0;
|
|
81
|
+
dataDate: number = 0;
|
|
82
|
+
dataTime: number = 0;
|
|
83
|
+
createBy: string = "";
|
|
84
|
+
createAt: number = 0;
|
|
85
|
+
updateBy: string = "";
|
|
86
|
+
updateAt: number = 0;
|
|
87
|
+
deleteBy: string = "";
|
|
88
|
+
deleteAt: number = 0;
|
|
89
|
+
sysClasc: number = 0;
|
|
90
|
+
sysClasn: string = "";
|
|
91
|
+
mastName: string = "";
|
|
92
|
+
mastGUID: string = "";
|
|
93
|
+
clientIP: string = "";
|
|
94
|
+
masterID: number = 0;
|
|
95
|
+
entityID: string = "";
|
|
96
|
+
tablFrom: string = "";
|
|
97
|
+
whatDone: string = "";
|
|
98
|
+
mainCode: string = "";
|
|
99
|
+
mainName: string = "";
|
|
100
|
+
startOff: string = "";
|
|
101
|
+
arriveAt: string = "";
|
|
102
|
+
userMain: number = 0;
|
|
103
|
+
userName: string = "";
|
|
104
|
+
billMain: number = 0;
|
|
105
|
+
billCode: string = "";
|
|
106
|
+
billUUID: string = "";
|
|
107
|
+
sysPathc: number = 0;
|
|
108
|
+
flowMain: number = 0;
|
|
109
|
+
flowNode: number = 0;
|
|
110
|
+
menuMain: number = 0;
|
|
111
|
+
menuUUID: string = "";
|
|
112
|
+
menuName: string = "";
|
|
113
|
+
withPara: string = "";
|
|
114
|
+
withParaConv: ISysTravelWithParaResponse = new TSysTravelWithParaResponse();
|
|
115
|
+
|
|
116
|
+
static parseJson(withPara: string) {
|
|
117
|
+
const result = new TSysTravelWithParaResponse();
|
|
118
|
+
if (_.isEmpty(withPara)) {
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
try {
|
|
122
|
+
const temp = JSON.parse(withPara) as TSysTravelWithParaResponse;
|
|
123
|
+
return _.merge(result, temp);
|
|
124
|
+
} catch (e: any) {
|
|
125
|
+
console.error(e.message);
|
|
126
|
+
}
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
constructor(card: any = {}) {
|
|
131
|
+
if (card) {
|
|
132
|
+
_.merge(this, _.pick(card, Object.keys(this)));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { construct, destruct } from "@aximario/json-tree";
|
|
2
2
|
import { type IBaseResponse, TBaseResponse } from "../base/IBaseResponse";
|
|
3
|
+
import { TCore } from "../../index.ts";
|
|
3
4
|
import _ from "lodash";
|
|
4
5
|
|
|
5
6
|
export interface ITypeResponse extends IBaseResponse<ITypeResponse[]> {
|
|
@@ -90,4 +91,30 @@ export class TTypeResponse extends TBaseResponse<ITypeResponse[]> implements ITy
|
|
|
90
91
|
static toList(treeType: ITypeResponse[]) {
|
|
91
92
|
return destruct(treeType, { id: "typeMain", pid: "parentID", children: "children" }) as ITypeResponse[];
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
static toTravel(listType: ITypeResponse): TCore.ISysTravelResponse {
|
|
96
|
+
const travel = new TCore.TSysTravelResponse();
|
|
97
|
+
travel.whoBuild = listType.whoBuild;
|
|
98
|
+
travel.flowMain = 0;
|
|
99
|
+
travel.flowNode = 0;
|
|
100
|
+
travel.billUUID = listType.entityID;
|
|
101
|
+
travel.billMain = listType.typeIndx;
|
|
102
|
+
travel.billCode = "";
|
|
103
|
+
travel.mastName = listType.mastName;
|
|
104
|
+
travel.createBy = listType.createBy;
|
|
105
|
+
return travel;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** 转化成记录日志需要的数据 */
|
|
109
|
+
static toTravelData(card?: ITypeResponse | ITypeResponse[]): TCore.ISysTravelResponse[] {
|
|
110
|
+
if (_.isNil(card)) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
if (_.isArray(card)) {
|
|
114
|
+
return card.map((u) => {
|
|
115
|
+
return this.toTravel(u);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return [this.toTravel(card)];
|
|
119
|
+
}
|
|
93
120
|
}
|
|
@@ -5,11 +5,29 @@ import { type IBaseResponse, TBaseResponse } from "../base/IBaseResponse";
|
|
|
5
5
|
import type { IUnitResponseElemPara } from "./IUnitResponseElemPara";
|
|
6
6
|
import { TUnitResponseElemPara } from "./IUnitResponseElemPara";
|
|
7
7
|
import { IPzptCnfgResponse } from "../pzpt";
|
|
8
|
+
import { TCore } from "../../index.ts";
|
|
9
|
+
|
|
10
|
+
export interface IUnitWithCardResponse {
|
|
11
|
+
realKJQJ: number;
|
|
12
|
+
usesKJQJ: number;
|
|
13
|
+
usesStat: number;
|
|
14
|
+
usesZczj: number;
|
|
15
|
+
realZjff: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class TUnitWithCardResponse implements IUnitWithCardResponse {
|
|
19
|
+
realKJQJ: number = 0;
|
|
20
|
+
usesKJQJ: number = 0;
|
|
21
|
+
usesStat: number = 0;
|
|
22
|
+
usesZczj: number = 0;
|
|
23
|
+
realZjff: string = "";
|
|
24
|
+
}
|
|
8
25
|
|
|
9
26
|
export interface IUnitResponse extends IBaseResponse<IUnitResponse[]> {
|
|
10
27
|
viewIndx: any;
|
|
11
28
|
viewName: any;
|
|
12
29
|
billCode: string;
|
|
30
|
+
/** 单位编码链 */
|
|
13
31
|
codeFull: string;
|
|
14
32
|
createAt: number;
|
|
15
33
|
createBy: string;
|
|
@@ -24,6 +42,7 @@ export interface IUnitResponse extends IBaseResponse<IUnitResponse[]> {
|
|
|
24
42
|
deleteAt: number;
|
|
25
43
|
deleteBy: string;
|
|
26
44
|
entityID: string;
|
|
45
|
+
/** 法人代表联系方式 */
|
|
27
46
|
finaMast: string;
|
|
28
47
|
fromDictIndx: number;
|
|
29
48
|
gkdwText: string;
|
|
@@ -32,18 +51,28 @@ export interface IUnitResponse extends IBaseResponse<IUnitResponse[]> {
|
|
|
32
51
|
listDWLX: any;
|
|
33
52
|
mastGUID: string;
|
|
34
53
|
mastName: string;
|
|
54
|
+
/** 单位全称链 */
|
|
35
55
|
nameFull: string;
|
|
56
|
+
/** 单位简称 */
|
|
36
57
|
nameLite: string;
|
|
37
58
|
parentID: number;
|
|
38
59
|
uniqueID: number;
|
|
60
|
+
/** 单位地址 */
|
|
39
61
|
unitAddr: string;
|
|
62
|
+
/** 联系方式 */
|
|
40
63
|
unitCall: string;
|
|
64
|
+
/** 单位编码 */
|
|
41
65
|
unitCode: string;
|
|
42
66
|
unitIndx: number;
|
|
67
|
+
/** 法人代表 */
|
|
43
68
|
unitMast: string;
|
|
69
|
+
/** 单位备注 */
|
|
44
70
|
unitMemo: string;
|
|
71
|
+
/** 单位全称 */
|
|
45
72
|
unitNamf: string;
|
|
73
|
+
/** 单位类型 */
|
|
46
74
|
unitType: number;
|
|
75
|
+
/** 单位类型名称 */
|
|
47
76
|
unitTypeText: string;
|
|
48
77
|
updateAt: number;
|
|
49
78
|
updateBy: string;
|
|
@@ -55,11 +84,32 @@ export interface IUnitResponse extends IBaseResponse<IUnitResponse[]> {
|
|
|
55
84
|
unitParaConv: IUnitResponseElemPara;
|
|
56
85
|
hzValue1: number;
|
|
57
86
|
codeFullN: string;
|
|
87
|
+
/** 统一信用代码 */
|
|
58
88
|
usciCode: string;
|
|
89
|
+
/** 所属集团名称 */
|
|
59
90
|
belongToText: string;
|
|
91
|
+
/** 所属集团统一信用代码 */
|
|
60
92
|
belongToUsci: string;
|
|
61
|
-
|
|
93
|
+
|
|
94
|
+
/** 折旧状态:1:折旧;0:不折旧 */
|
|
95
|
+
usesZczj: number;
|
|
96
|
+
/** 启用期间:YYYYMM */
|
|
97
|
+
usesKJQJ: number;
|
|
98
|
+
/** 折旧期间:YYYYMM */
|
|
99
|
+
realKJQJ: number;
|
|
100
|
+
|
|
101
|
+
/** 启用状态 1:开启;0:关闭 */
|
|
102
|
+
usesStat: number;
|
|
103
|
+
|
|
104
|
+
listType: any[];
|
|
62
105
|
listCnfg: IPzptCnfgResponse[];
|
|
106
|
+
|
|
107
|
+
zclbtype: number;
|
|
108
|
+
|
|
109
|
+
/** 折旧方法 */
|
|
110
|
+
realZjff: string;
|
|
111
|
+
|
|
112
|
+
withCard: IUnitWithCardResponse;
|
|
63
113
|
}
|
|
64
114
|
|
|
65
115
|
export class TUnitResponse extends TBaseResponse<IUnitResponse[]> implements IUnitResponse {
|
|
@@ -114,8 +164,26 @@ export class TUnitResponse extends TBaseResponse<IUnitResponse[]> implements IUn
|
|
|
114
164
|
usciCode: string = "";
|
|
115
165
|
belongToText: string = "";
|
|
116
166
|
belongToUsci: string = "";
|
|
167
|
+
|
|
168
|
+
usesZczj: number = 0;
|
|
169
|
+
usesKJQJ: number = 0;
|
|
170
|
+
realKJQJ: number = 0;
|
|
171
|
+
|
|
172
|
+
usesStat: number = 0;
|
|
173
|
+
|
|
174
|
+
realZjff: string = "";
|
|
175
|
+
|
|
117
176
|
listType: IPzptTypeResponse[] = [];
|
|
118
177
|
listCnfg: IPzptCnfgResponse[] = [];
|
|
178
|
+
zclbtype: number = 0;
|
|
179
|
+
withCard: IUnitWithCardResponse = new TUnitWithCardResponse();
|
|
180
|
+
|
|
181
|
+
constructor(card: any = {}) {
|
|
182
|
+
super();
|
|
183
|
+
if (card) {
|
|
184
|
+
_.merge(this, _.pick(card, Object.keys(this)));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
119
187
|
|
|
120
188
|
static parseJson(unitPara: string) {
|
|
121
189
|
const defaultUnitPara = new TUnitResponseElemPara();
|
|
@@ -125,17 +193,43 @@ export class TUnitResponse extends TBaseResponse<IUnitResponse[]> implements IUn
|
|
|
125
193
|
try {
|
|
126
194
|
const obj = JSON.parse(unitPara) as TUnitResponseElemPara;
|
|
127
195
|
return _.merge(defaultUnitPara, obj);
|
|
128
|
-
} catch (e
|
|
129
|
-
|
|
196
|
+
} catch (e) {
|
|
197
|
+
const error = e as Error;
|
|
198
|
+
console.error(error.message);
|
|
130
199
|
}
|
|
131
200
|
return defaultUnitPara;
|
|
132
201
|
}
|
|
133
202
|
|
|
134
203
|
static toTree(listUnit: IUnitResponse[]) {
|
|
135
|
-
return construct(listUnit, { id: "unitIndx", pid: "parentID", children: "children" }) as IUnitResponse[];
|
|
204
|
+
return construct(_.cloneDeep(listUnit), { id: "unitIndx", pid: "parentID", children: "children" }) as IUnitResponse[];
|
|
136
205
|
}
|
|
137
206
|
|
|
138
207
|
static toList(treeUnit: IUnitResponse[]) {
|
|
139
|
-
return destruct(treeUnit, { id: "unitIndx", pid: "parentID", children: "children" }) as IUnitResponse[];
|
|
208
|
+
return destruct(_.cloneDeep(treeUnit), { id: "unitIndx", pid: "parentID", children: "children" }) as IUnitResponse[];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
static toTravel(unit: IUnitResponse): TCore.ISysTravelResponse {
|
|
212
|
+
const travel = new TCore.TSysTravelResponse();
|
|
213
|
+
travel.whoBuild = unit.whoBuild;
|
|
214
|
+
travel.flowMain = 0;
|
|
215
|
+
travel.flowNode = 0;
|
|
216
|
+
travel.billUUID = unit.entityID;
|
|
217
|
+
travel.billMain = unit.unitIndx;
|
|
218
|
+
travel.billCode = unit.unitCode;
|
|
219
|
+
travel.mastName = unit.mastName;
|
|
220
|
+
travel.createBy = unit.createBy;
|
|
221
|
+
return travel;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
static toTravelData(card?: IUnitResponse | IUnitResponse[]): TCore.ISysTravelResponse[] {
|
|
225
|
+
if (_.isNil(card)) {
|
|
226
|
+
return [];
|
|
227
|
+
}
|
|
228
|
+
if (_.isArray(card)) {
|
|
229
|
+
return card.map((u) => {
|
|
230
|
+
return this.toTravel(u);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return [this.toTravel(card)];
|
|
140
234
|
}
|
|
141
235
|
}
|
|
@@ -16,6 +16,7 @@ export interface IUserLiteResponse {
|
|
|
16
16
|
userBorn: number; //出生年月
|
|
17
17
|
inGender: number; //性别 1男2女
|
|
18
18
|
usrTitle: string; //身份
|
|
19
|
+
usrEmail: string; //电子邮箱
|
|
19
20
|
enrollBy: number; //#是否主动注册
|
|
20
21
|
verifyID: string; //#三方登录
|
|
21
22
|
enrollID: string; //#登录账号
|
|
@@ -76,6 +77,7 @@ export class TUserLiteResponse implements IUserLiteResponse {
|
|
|
76
77
|
userBorn: number = 0; //出生年月
|
|
77
78
|
inGender: number = 0; //性别 1男2女
|
|
78
79
|
usrTitle: string = ""; //身份
|
|
80
|
+
usrEmail: string = ""; //电子邮箱
|
|
79
81
|
parentID: number = 0; //@父级标识
|
|
80
82
|
|
|
81
83
|
wContact: string = ""; //#联系人
|