@ningboyz/types 1.2.156 → 1.2.157
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,9 @@
|
|
|
1
1
|
import { IPathResponse } from "../core/IPathResponse";
|
|
2
|
+
import { TFlowDataResponse } from "../flow";
|
|
2
3
|
import { IHznkMainResponse } from "./IHznkMainResponse";
|
|
3
4
|
import { IHznkXmysItemResponse } from "./IHznkXmysItemResponse";
|
|
4
5
|
import { IHznkXmysYsxqResponse } from "./IHznkXmysYsxqResponse";
|
|
6
|
+
import _ from "lodash";
|
|
5
7
|
|
|
6
8
|
export interface IHznkXmysResponse {
|
|
7
9
|
whoBuild: number;
|
|
@@ -142,4 +144,36 @@ export class THznkXmysResponse implements IHznkXmysResponse {
|
|
|
142
144
|
listFrom: IHznkMainResponse[] = [];
|
|
143
145
|
listItem: IHznkXmysItemResponse[] = [];
|
|
144
146
|
listYSXQ: IHznkXmysYsxqResponse[] = [];
|
|
147
|
+
|
|
148
|
+
constructor(data: Partial<IHznkXmysResponse> = {}) {
|
|
149
|
+
if (data) {
|
|
150
|
+
_.merge(this, _.pick(data, Object.keys(this)));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
static toFlowDatas(card: IHznkXmysResponse[]): TFlowDataResponse[] {
|
|
155
|
+
return card.map((u) => this.toFlowData(u));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static toFlowData(xmtz: IHznkXmysResponse): TFlowDataResponse {
|
|
159
|
+
let result = new TFlowDataResponse();
|
|
160
|
+
result.whoBuild = xmtz.whoBuild;
|
|
161
|
+
result.userIndx = xmtz.userIndx;
|
|
162
|
+
result.flowMain = xmtz.flowMain;
|
|
163
|
+
result.flowNode = xmtz.flowNode;
|
|
164
|
+
result.flowStat = xmtz.xmysStat;
|
|
165
|
+
// result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_HZCB_XMTZ_WAIT;
|
|
166
|
+
result.entityID = xmtz.entityID;
|
|
167
|
+
result.billMain = xmtz.xmysIndx;
|
|
168
|
+
result.billCode = xmtz.baseCode;
|
|
169
|
+
result.billMemo = xmtz.baseMemo;
|
|
170
|
+
result.outMoney = 0;
|
|
171
|
+
result.createAt = xmtz.createAt;
|
|
172
|
+
result.mastName = xmtz.mastName;
|
|
173
|
+
result.createBy = xmtz.createBy;
|
|
174
|
+
result.unitMain = xmtz.unitMain;
|
|
175
|
+
result.deptMain = xmtz.deptMain;
|
|
176
|
+
result.menuUUID = xmtz.menuUUID;
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
145
179
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPathResponse } from "../core/IPathResponse";
|
|
2
|
+
import { TFlowDataResponse } from "../flow";
|
|
2
3
|
import { IHznkMainResponse } from "./IHznkMainResponse";
|
|
3
4
|
|
|
4
5
|
export interface IHznkYssqResponse {
|
|
@@ -136,4 +137,30 @@ export class THznkYssqResponse implements IHznkYssqResponse {
|
|
|
136
137
|
|
|
137
138
|
listPath: IPathResponse[] = [];
|
|
138
139
|
listFrom: IHznkMainResponse[] = [];
|
|
140
|
+
|
|
141
|
+
static toFlowDatas(card: IHznkYssqResponse[]): TFlowDataResponse[] {
|
|
142
|
+
return card.map((u) => this.toFlowData(u));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static toFlowData(xmtz: IHznkYssqResponse): TFlowDataResponse {
|
|
146
|
+
let result = new TFlowDataResponse();
|
|
147
|
+
result.whoBuild = xmtz.whoBuild;
|
|
148
|
+
result.userIndx = xmtz.userIndx;
|
|
149
|
+
result.flowMain = xmtz.flowMain;
|
|
150
|
+
result.flowNode = xmtz.flowNode;
|
|
151
|
+
result.flowStat = xmtz.yssqStat;
|
|
152
|
+
// result.notified = Const.Todo.CONST_STR_TODO_TYPE_TO_HZCB_XMTZ_WAIT;
|
|
153
|
+
result.entityID = xmtz.entityID;
|
|
154
|
+
result.billMain = xmtz.yssqIndx;
|
|
155
|
+
result.billCode = xmtz.baseCode;
|
|
156
|
+
result.billMemo = xmtz.baseMemo;
|
|
157
|
+
result.outMoney = 0;
|
|
158
|
+
result.createAt = xmtz.createAt;
|
|
159
|
+
result.mastName = xmtz.mastName;
|
|
160
|
+
result.createBy = xmtz.createBy;
|
|
161
|
+
result.unitMain = xmtz.unitMain;
|
|
162
|
+
result.deptMain = xmtz.deptMain;
|
|
163
|
+
result.menuUUID = xmtz.menuUUID;
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
139
166
|
}
|