Browse Source

修改

main
hulei 2 weeks ago
parent
commit
9e8397c136
42 changed files with 5117 additions and 1926 deletions
  1. 260
    31
      ant-design-pro-vue3/src/views/front/develop/Communication/Message.ts
  2. 172
    166
      ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/MsgBitMap.ts
  3. 110
    111
      ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/TransitErrorCodeMap.ts
  4. 25
    25
      ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/TransitType.ts
  5. 14
    13
      ant-design-pro-vue3/src/views/front/develop/Communication/TransitSettings.ts
  6. 0
    71
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/EntryBase.cs
  7. 8
    8
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/EntryBase.ts
  8. 0
    22
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/HomePageBase.cs
  9. 0
    33
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/ITradeHelper.cs
  10. 0
    252
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/PageBase.cs
  11. 1325
    0
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeAPIsHelper.ts
  12. 2328
    0
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeBusHelper.ts
  13. 0
    89
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeInfoHelper.cs
  14. 0
    25
      ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeResourcesHelper.cs
  15. 230
    228
      ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/ServiceHelper/TradeHandle.ts
  16. 30
    30
      ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/ServiceSettings.ts
  17. 66
    19
      ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/AuthHandle.ts
  18. 1
    1
      ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/TokenResult.ts
  19. 28
    26
      ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/RestClient.ts
  20. 2
    2
      ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/EncrypDecryptHelper.ts
  21. 6
    6
      ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/EventAggregator.ts
  22. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/ObservableObject.ts
  23. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/Extensions/DependencyObjectExtensions.ts
  24. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/Handles/EncryptAndDecryptHandle.ts
  25. 9
    9
      ant-design-pro-vue3/src/views/front/platfrom/common/LogSystem/LogWriter.ts
  26. 151
    126
      ant-design-pro-vue3/src/views/front/platfrom/common/LogSystem/PlatformLogger.ts
  27. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/common/RunningParameters/LoginUserInfo.ts
  28. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/controls/ControlsHelper/GridHelper.ts
  29. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/controls/NumericContainer/CurrencyEditor.ts
  30. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenu.ts
  31. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenuItemBase.ts
  32. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenuItemLeaf.ts
  33. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusCheck/Adorner/FocusAdorner.ts
  34. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusCheck/FieldPolicy/ShowTipPolicy.ts
  35. 4
    4
      ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusManagers/FocusManager.ts
  36. 3
    2
      ant-design-pro-vue3/src/views/front/platfrom/presentation/Interfaces/Ipage.ts
  37. 7
    6
      ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/CommonFunction.ts
  38. 1
    1
      ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceFunction/MsgHandle/MessageHandle.ts
  39. 5
    5
      ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/FilesHandle.ts
  40. 2
    2
      ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/InitializeHandle.ts
  41. 319
    319
      ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/TradeHandle.ts
  42. 0
    283
      ant-design-pro-vue3/src/views/front/serviceManager/TradeHandle.ts

+ 260
- 31
ant-design-pro-vue3/src/views/front/develop/Communication/Message.ts View File

@@ -1,18 +1,62 @@
1 1
 import { ref, reactive } from 'vue'
2
-import { PlatformSettings } from './PlatformSettings'
3
-import { PlatformLogger } from './PlatformLogger'
4
-import { BitMapInstance } from './BitMapInstance'
5
-
2
+//import { PlatformSettings } from '../../platfrom/common/RunningParameters/PlatformSettings'
3
+//import { PlatformLogger } from './PlatformLogger'
4
+//import { BitMapInstance } from './BitMapInstance'
5
+import { MsgBitMap } from '../../develop/Communication/MessageHelper/MsgBitMap'
6
+import { TransitType } from './MessageHelper/TransitType'
6 7
 /**
7 8
  * 报文通讯域定义,交易调用
8 9
  */
9
-export class Message {
10
+
11
+export enum BitMap {
12
+    /// <summary>
13
+    /// 核心定义
14
+    /// </summary>
15
+    Server,
16
+    /// <summary>
17
+    /// 渠道定义
18
+    /// </summary>
19
+    Agn,
20
+    /// <summary>
21
+    /// 二代支付定义
22
+    /// </summary>
23
+    Cnaps2
24
+}
25
+export default class Message {
26
+
27
+    InitGateway2CBS(txCode: string, arg1: string, arg2: string, predicate2retCode: (code: string) => boolean) {
28
+        throw new Error("Method not implemented.")
29
+    }
30
+    InitHfmsApp(url: string, predicate2retCode: (code: string) => boolean) {
31
+        throw new Error("Method not implemented.")
32
+    }
33
+    DoTransit(): boolean {
34
+        throw new Error("Method not implemented.")
35
+    }
36
+    /// <summary>
37
+    /// 创建Message对象
38
+    /// </summary>
39
+    /// <param name="type"></param>
40
+    Message(type?: BitMap) {
41
+        this.IsMainTrade = false;
42
+        if (type === undefined) {
43
+            this.TransitNode = TransitType.CallServer;
44
+            this.Init(BitMap.Server);
45
+        } else {
46
+            this.Init(type);
47
+        }
48
+    }
10 49
     // 交易附件数据
11 50
     private _fileData = ref<string>('')
12 51
     private _filename = ref<string>('')
13 52
     private _fdDict = reactive<Record<string, Uint8Array>>({})
14 53
     private _BigFds_: Record<string, any> = {}
15
-
54
+    BitMapType: BitMap
55
+    static BitMap: any
56
+    _transitNode: TransitType
57
+    TransitName: string
58
+    CustomizeTransitEntry: null
59
+    IsMainTrade = false;
16 60
     /**
17 61
      * 交易文件附件传送标志
18 62
      */
@@ -22,6 +66,13 @@ export class Message {
22 66
     set fileFlag(value: boolean) {
23 67
         if (!value) this._fileData.value = ''
24 68
     }
69
+    // public Message() {
70
+    //     this.IsMainTrade = false;
71
+    //     this.TransitNode = TransitType.CallServer;
72
+    //     this.Init(BitMap.Server);
73
+    // }
74
+
75
+
25 76
 
26 77
     /**
27 78
      * 传入的文件名
@@ -50,23 +101,26 @@ export class Message {
50 101
         let result = ''
51 102
         if (this._fdDict[fdName]) {
52 103
             const decoder = new TextDecoder()
53
-            result = BitMapInstance.FdBitMap[fdName].RealValue(decoder.decode(this._fdDict[fdName]))
104
+            //result = BitMapInstance.FdBitMap[fdName].RealValue(decoder.decode(this._fdDict[fdName])) //hulei先注销
54 105
         }
55 106
         return result
56 107
     }
57 108
 
58 109
     /**
59
-     * 获取参数指定域的组包数据
60
-     */
61
-    internal getFdFormatValue(fdName: string): string {
62
-        let result = ''
110
+  * 获取参数指定域的组包数据
111
+  * @param fdName - 域名称
112
+  * @returns 指定域的组包数据
113
+  */
114
+    public getFdFormatValue(fdName: string): string {
115
+        let result = '';
63 116
         if (this._fdDict[fdName]) {
64
-            const decoder = new TextDecoder()
65
-            result = decoder.decode(this._fdDict[fdName])
117
+            const decoder = new TextDecoder();
118
+            result = decoder.decode(this._fdDict[fdName]);
66 119
         }
67
-        return result
120
+        return result;
68 121
     }
69 122
 
123
+
70 124
     /**
71 125
      * 设置Fd域值
72 126
      */
@@ -74,31 +128,81 @@ export class Message {
74 128
         this.setFdFormatValue(fdName, value)
75 129
         if (!fdName.endsWith('0')) {
76 130
             const bigFdName = `${fdName.substring(0, 3)}0`
77
-            const fds = BitMapInstance.FdBitMap[bigFdName]
78
-            delete this._BigFds_[fds.Code]
79
-            
80
-            for (const fd of fds.Children) {
81
-                if (fd.Code === fdName) break
82
-                if (!this._fdDict[fd.Code]) {
83
-                    this.setFdFormatValue(fd.Code, null)
84
-                }
85
-            }
131
+            //const fds = this.BitMapInstance.FdBitMap[bigFdName]
132
+            // delete this._BigFds_[fds.Code]
133
+
134
+            // for (const fd of fds.Children) {
135
+            //     if (fd.Code === fdName) break
136
+            //     if (!this._fdDict[fd.Code]) {
137
+            //         this.setFdFormatValue(fd.Code, null)
138
+            //     }
139
+            // }
140
+        }
141
+    }
142
+    //private MsgBitMap BitMapInstance(BitMapType) {
143
+    // private BitMapInstance(BitMapType: any): MsgBitMap {
144
+    //     switch (BitMapType) {
145
+    //         case BitMap.Server:
146
+    //             return MsgBitMap.Instance_Server;
147
+    //         case BitMap.Agn:
148
+    //             return MsgBitMap.Instance_Agn;
149
+    //         case BitMap.Cnaps2:
150
+    //             return MsgBitMap.Instance_Cnaps2;
151
+    //         default:
152
+    //             return MsgBitMap.Instance_Server;
153
+    //     }
154
+
155
+    // }
156
+    private BitMapInstance(BitMapType): MsgBitMap {
157
+        switch (BitMapType) {
158
+            case BitMap.Server:
159
+                return MsgBitMap.Instance_Server;
160
+            case BitMap.Agn:
161
+                return MsgBitMap.Instance_Agn;
162
+            case BitMap.Cnaps2:
163
+                return MsgBitMap.Instance_Cnaps2;
164
+            default:
165
+                return MsgBitMap.Instance_Server;
86 166
         }
87 167
     }
88
-
89 168
     /**
90 169
      * 根据域类型格式化输入数据
91 170
      */
92 171
     private setFdFormatValue(fdName: string, value: any): void {
93
-        if (BitMapInstance.FdBitMap[fdName]) {
94
-            const item = BitMapInstance.FdBitMap[fdName]
95
-            const encoder = new TextEncoder()
96
-            const formatValue = encoder.encode(item.FormatValue(value))
97
-            
98
-            this._fdDict[fdName] = formatValue
172
+        // if (this.BitMapInstance.FdBitMap[fdName]) {
173
+        //     // const item = this.BitMapInstance.FdBitMap[fdName]
174
+        //     const encoder = new TextEncoder()
175
+        //     const formatValue = encoder.encode()//item.FormatValue(value)
176
+
177
+        //     this._fdDict[fdName] = formatValue
178
+        // }
179
+        //hulei 报错了需要处理
180
+    }
181
+
182
+    /**
183
+    * 初始化,清空所有域和附件
184
+    * @param type 位图类型
185
+    */
186
+    public Init(type?: BitMap): void {
187
+        if (type === undefined) {
188
+            // _fdDict.Clear();
189
+            // _fileData = string.Empty;
190
+            // //TransitNode = TransitType.CallServer; //初始化默认为CallServer
191
+            // //BitMapType = type;
192
+            // CustomizeTransitEntry = null;
193
+            // Extra = new Dictionary<string, object>();
194
+        } else {
195
+            // this._fdDict = {};
196
+            // this._fileData = '';
197
+            // this.TransitNode = TransitType.CallServer; // 初始化默认为 CallServer
198
+            this.BitMapType = type;
199
+
200
+
99 201
         }
202
+
100 203
     }
101 204
 
205
+
102 206
     // 以下是各域的定义,保持与C#代码相同的命名规范
103 207
     get Fd1(): string { return this.getFdVaule('0010').toString() }
104 208
     set Fd1(value: string) { this.setFdValue('0010', value) }
@@ -236,7 +340,132 @@ export class Message {
236 340
 
237 341
     get Fd20(): string { return this.getFdVaule('0200').toString() }
238 342
     set Fd20(value: string) { this.setFdValue('0200', value) }
343
+    get Fd21(): string { return this.getFdVaule('0210').toString() }
344
+    set Fd21(value: string) { this.setFdValue('0210', value) }
345
+    get Fd22(): string { return this.getFdVaule('0220').toString() }
346
+    set Fd22(value: string) { this.setFdValue('0220', value) }
347
+
348
+
349
+    get Fd30(): string { return this.getFdVaule('0300').toString() }
350
+    set Fd30(value: string) { this.setFdValue('0300', value) }
351
+    get Fd66(): string { return this.getFdVaule('0660').toString() }
352
+    set Fd66(value: string) { this.setFdValue('0660', value) }
353
+
354
+    get Fd23(): string { return this.getFdVaule('0100').toString() }
355
+    set Fd23(value: string) { this.setFdValue('0100', value) }
356
+
357
+    get Fd24(): string { return this.getFdVaule('0100').toString() }
358
+    set Fd24(value: string) { this.setFdValue('0100', value) }
359
+
360
+    get Fd25(): string { return this.getFdVaule('0100').toString() }
361
+    set Fd25(value: string) { this.setFdValue('0100', value) }
239 362
 
363
+    get Fd26(): string { return this.getFdVaule('0100').toString() }
364
+    set Fd26(value: string) { this.setFdValue('0100', value) }
365
+
366
+    get Fd27(): string { return this.getFdVaule('0100').toString() }
367
+    set Fd27(value: string) { this.setFdValue('0100', value) }
368
+
369
+    get Fd28(): string { return this.getFdVaule('0100').toString() }
370
+    set Fd28(value: string) { this.setFdValue('0100', value) }
371
+    get Fd29(): string { return this.getFdVaule('0100').toString() }
372
+    set Fd29(value: string) { this.setFdValue('0100', value) }
373
+
374
+    get Fd31(): string { return this.getFdVaule('0100').toString() }
375
+    set Fd31(value: string) { this.setFdValue('0100', value) }
376
+
377
+    get Fd32(): string { return this.getFdVaule('0100').toString() }
378
+    set Fd32(value: string) { this.setFdValue('0100', value) }
379
+
380
+    get Fd33(): string { return this.getFdVaule('0100').toString() }
381
+    set Fd33(value: string) { this.setFdValue('0100', value) }
382
+    get Fd34(): string { return this.getFdVaule('0100').toString() }
383
+    set Fd34(value: string) { this.setFdValue('0100', value) }
384
+    get Fd35(): string { return this.getFdVaule('0100').toString() }
385
+    set Fd35(value: string) { this.setFdValue('0100', value) }
386
+    get Fd36(): string { return this.getFdVaule('0100').toString() }
387
+    set Fd36(value: string) { this.setFdValue('0100', value) }
388
+
389
+    get Fd37(): string { return this.getFdVaule('0100').toString() }
390
+    set Fd37(value: string) { this.setFdValue('0100', value) }
391
+
392
+    get Fd38(): string { return this.getFdVaule('0100').toString() }
393
+    set Fd38(value: string) { this.setFdValue('0100', value) }
394
+
395
+    get Fd39(): string { return this.getFdVaule('0100').toString() }
396
+    set Fd39(value: string) { this.setFdValue('0100', value) }
397
+
398
+    get Fd40(): string { return this.getFdVaule('0100').toString() }
399
+    set Fd40(value: string) { this.setFdValue('0100', value) }
400
+
401
+    get Fd41(): string { return this.getFdVaule('0100').toString() }
402
+    set Fd41(value: string) { this.setFdValue('0100', value) }
403
+
404
+    get Fd42(): string { return this.getFdVaule('0100').toString() }
405
+    set Fd42(value: string) { this.setFdValue('0100', value) }
406
+
407
+    get Fd43(): string { return this.getFdVaule('0100').toString() }
408
+    set Fd43(value: string) { this.setFdValue('0100', value) }
409
+
410
+    get Fd44(): string { return this.getFdVaule('0100').toString() }
411
+    set Fd44(value: string) { this.setFdValue('0100', value) }
412
+
413
+    get Fd45(): string { return this.getFdVaule('0100').toString() }
414
+    set Fd45(value: string) { this.setFdValue('0100', value) }
415
+
416
+    get Fd46(): string { return this.getFdVaule('0100').toString() }
417
+    set Fd46(value: string) { this.setFdValue('0100', value) }
418
+
419
+    get Fd47(): string { return this.getFdVaule('0100').toString() }
420
+    set Fd47(value: string) { this.setFdValue('0100', value) }
421
+
422
+    get Fd48(): string { return this.getFdVaule('0100').toString() }
423
+    set Fd48(value: string) { this.setFdValue('0100', value) }
424
+
425
+    get Fd49(): string { return this.getFdVaule('0100').toString() }
426
+    set Fd49(value: string) { this.setFdValue('0100', value) }
427
+
428
+    get Fd50(): string { return this.getFdVaule('0100').toString() }
429
+    set Fd50(value: string) { this.setFdValue('0100', value) }
430
+
431
+    get Fd51(): string { return this.getFdVaule('0100').toString() }
432
+    set Fd51(value: string) { this.setFdValue('0100', value) }
433
+
434
+    get Fd52(): string { return this.getFdVaule('0100').toString() }
435
+    set Fd52(value: string) { this.setFdValue('0100', value) }
436
+
437
+    get Fd53(): string { return this.getFdVaule('0100').toString() }
438
+    set Fd53(value: string) { this.setFdValue('0100', value) }
439
+
440
+    get Fd54(): string { return this.getFdVaule('0100').toString() }
441
+    set Fd54(value: string) { this.setFdValue('0100', value) }
442
+
443
+    get Fd55(): string { return this.getFdVaule('0100').toString() }
444
+    set Fd55(value: string) { this.setFdValue('0100', value) }
445
+    get Fd56(): string { return this.getFdVaule('0100').toString() }
446
+    set Fd56(value: string) { this.setFdValue('0100', value) }
447
+
448
+    get Fd57(): string { return this.getFdVaule('0100').toString() }
449
+    set Fd57(value: string) { this.setFdValue('0100', value) }
450
+    get Fd58(): string { return this.getFdVaule('0100').toString() }
451
+    set Fd58(value: string) { this.setFdValue('0100', value) }
452
+    get Fd59(): string { return this.getFdVaule('0100').toString() }
453
+    set Fd59(value: string) { this.setFdValue('0100', value) }
454
+    get Fd92(): string { return this.getFdVaule('0100').toString() }
455
+    set Fd92(value: string) { this.setFdValue('0100', value) }
456
+    get Fd98(): string { return this.getFdVaule('0100').toString() }
457
+    set Fd98(value: string) { this.setFdValue('0100', value) }
458
+    /**
459
+  * 通讯外端
460
+  */
461
+    get TransitNode(): TransitType {
462
+        return this._transitNode;
463
+    }
464
+
465
+    set TransitNode(value: TransitType) {
466
+        this._transitNode = value;
467
+        this.TransitName = value.toString();
468
+    }
240 469
     // 实现剩余所有域...
241 470
     // 按照相同模式实现Fd21到Fd47的所有域
242
-}
471
+}

+ 172
- 166
ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/MsgBitMap.ts View File

@@ -1,187 +1,193 @@
1
-import { TradeHandle } from './TradeHandle'
1
+import TradeHandle from '../../ServiceProxy.Ext/ServiceHelper/TradeHandle'
2 2
 
3 3
 export class FdItem {
4
-  Code: string = ''
5
-  Type: string = ''
6
-  Length: number = 0
7
-  DotLength: number = 0
8
-  Description: string = ''
9
-  FieldType: string = ''
10
-  MaxLength: number = 0
11
-  Children: FdItem[] = []
12
-  MetaData: Record<string, any> = {}
13
-
14
-  private static charType = ['0', '5', '6']
15
-  private static numberType = ['1', '2', '4']
16
-
17
-  getItemType(): 'string' | 'number' | null {
18
-    if (FdItem.charType.includes(this.Type)) return 'string'
19
-    if (FdItem.numberType.includes(this.Type)) return 'number'
20
-    return null
21
-  }
22
-
23
-  formatValue(value: any): string {
24
-    if (this.Children && this.Children.length > 0) {
25
-      throw new Error(`域[${this.Code}]存在子域,不允许执行formatValue方法!`)
4
+    Code: string = ''
5
+    Type: string = ''
6
+    Length: number = 0
7
+    DotLength: number = 0
8
+    Description: string = ''
9
+    FieldType: string = ''
10
+    MaxLength: number = 0
11
+    Children: FdItem[] = []
12
+    MetaData: Record<string, any> = {}
13
+
14
+    private static charType = ['0', '5', '6']
15
+    private static numberType = ['1', '2', '4']
16
+
17
+    getItemType(): 'string' | 'number' | null {
18
+        if (FdItem.charType.includes(this.Type)) return 'string'
19
+        if (FdItem.numberType.includes(this.Type)) return 'number'
20
+        return null
26 21
     }
27 22
 
28
-    let result = ''
29
-    switch (this.FieldType) {
30
-      case '-1':
31
-        // 该域被禁用
32
-        break
33
-      case '0':
34
-        // 定长域
35
-        if (FdItem.charType.includes(this.Type)) {
36
-          // 字符型域
37
-          const data = new Uint8Array(this.Length).fill(' '.charCodeAt(0))
38
-          const source = new TextEncoder().encode(value?.toString() || '')
39
-          const copyLength = Math.min(source.length, data.length)
40
-          data.set(source.subarray(0, copyLength))
41
-          result = new TextDecoder().decode(data)
42
-        } else if (FdItem.numberType.includes(this.Type)) {
43
-          // 数字型域
44
-          const data = new Uint8Array(this.Length).fill('0'.charCodeAt(0))
45
-          let newValue = parseFloat(value?.toString() || '0') || 0
46
-          
47
-          // 处理负数
48
-          if (newValue < 0) data[0] = '-'.charCodeAt(0)
49
-          
50
-          // 处理小数位
51
-          newValue = newValue * Math.pow(10, this.DotLength)
52
-          newValue = Math.abs(Math.trunc(newValue))
53
-          
54
-          const source = new TextEncoder().encode(newValue.toString())
55
-          const len = source.length - data.length
56
-          
57
-          if (len < 0) {
58
-            data.set(source, -len)
59
-          } else {
60
-            data.set(source.subarray(len))
61
-          }
62
-          result = new TextDecoder().decode(data)
23
+    formatValue(value: any): string {
24
+        if (this.Children && this.Children.length > 0) {
25
+            throw new Error(`域[${this.Code}]存在子域,不允许执行formatValue方法!`)
63 26
         }
64
-        break
65
-      default:
66
-        // 变长域
67
-        if (FdItem.charType.includes(this.Type)) {
68
-          // 字符型域
69
-          const source = new TextEncoder().encode(value?.toString() || '')
70
-          const data = source.subarray(0, Math.min(source.length, this.MaxLength))
71
-          result = new TextDecoder().decode(data)
72
-        } else if (FdItem.numberType.includes(this.Type)) {
73
-          // 数字型域
74
-          let newValue = parseFloat(value?.toString() || '0') || 0
75
-          newValue = newValue * Math.pow(10, this.DotLength)
76
-          const source = new TextEncoder().encode(newValue.toString())
77
-          const data = source.subarray(0, Math.min(source.length, this.MaxLength))
78
-          result = new TextDecoder().decode(data)
27
+
28
+        let result = ''
29
+        switch (this.FieldType) {
30
+            case '-1':
31
+                // 该域被禁用
32
+                break
33
+            case '0':
34
+                // 定长域
35
+                if (FdItem.charType.includes(this.Type)) {
36
+                    // 字符型域
37
+                    const data = new Uint8Array(this.Length).fill(' '.charCodeAt(0))
38
+                    const source = new TextEncoder().encode(value?.toString() || '')
39
+                    const copyLength = Math.min(source.length, data.length)
40
+                    data.set(source.subarray(0, copyLength))
41
+                    result = new TextDecoder().decode(data)
42
+                } else if (FdItem.numberType.includes(this.Type)) {
43
+                    // 数字型域
44
+                    const data = new Uint8Array(this.Length).fill('0'.charCodeAt(0))
45
+                    let newValue = parseFloat(value?.toString() || '0') || 0
46
+
47
+                    // 处理负数
48
+                    if (newValue < 0) data[0] = '-'.charCodeAt(0)
49
+
50
+                    // 处理小数位
51
+                    newValue = newValue * Math.pow(10, this.DotLength)
52
+                    newValue = Math.abs(Math.trunc(newValue))
53
+
54
+                    const source = new TextEncoder().encode(newValue.toString())
55
+                    const len = source.length - data.length
56
+
57
+                    if (len < 0) {
58
+                        data.set(source, -len)
59
+                    } else {
60
+                        data.set(source.subarray(len))
61
+                    }
62
+                    result = new TextDecoder().decode(data)
63
+                }
64
+                break
65
+            default:
66
+                // 变长域
67
+                if (FdItem.charType.includes(this.Type)) {
68
+                    // 字符型域
69
+                    const source = new TextEncoder().encode(value?.toString() || '')
70
+                    const data = source.subarray(0, Math.min(source.length, this.MaxLength))
71
+                    result = new TextDecoder().decode(data)
72
+                } else if (FdItem.numberType.includes(this.Type)) {
73
+                    // 数字型域
74
+                    let newValue = parseFloat(value?.toString() || '0') || 0
75
+                    newValue = newValue * Math.pow(10, this.DotLength)
76
+                    const source = new TextEncoder().encode(newValue.toString())
77
+                    const data = source.subarray(0, Math.min(source.length, this.MaxLength))
78
+                    result = new TextDecoder().decode(data)
79
+                }
80
+                break
79 81
         }
80
-        break
82
+        return result
81 83
     }
82
-    return result
83
-  }
84 84
 }
85 85
 
86 86
 export class MsgBitMap {
87
-  private static _instance_Server: MsgBitMap
88
-  private static _instance_Agn: MsgBitMap
89
-  private static _instance_Cnaps2: MsgBitMap
87
+    private static _instance_Server: MsgBitMap
88
+    private static _instance_Agn: MsgBitMap
89
+    private static _instance_Cnaps2: MsgBitMap
90 90
 
91
-  FdBitMap: Record<string, FdItem> = {}
91
+    FdBitMap: Record<string, FdItem> = {}
92 92
 
93
-  private constructor() {}
93
+    private constructor() { }
94 94
 
95
-  static get Instance_Server(): MsgBitMap {
96
-    if (!this._instance_Server) {
97
-      this._instance_Server = new MsgBitMap()
98
-      this._instance_Server.FdBitMap = this.InitFdBitMap('Server')
95
+    static get Instance_Server(): MsgBitMap {
96
+        if (!this._instance_Server) {
97
+            this._instance_Server = new MsgBitMap()
98
+            this.InitFdBitMap('Server').then((data: Record<string, FdItem>) => {
99
+                this._instance_Server.FdBitMap = data // 在这里使用 data
100
+            });
101
+        }
102
+        return this._instance_Server
99 103
     }
100
-    return this._instance_Server
101
-  }
102 104
 
103
-  static get Instance_Agn(): MsgBitMap {
104
-    if (!this._instance_Agn) {
105
-      this._instance_Agn = new MsgBitMap()
106
-      this._instance_Agn.FdBitMap = this.InitFdBitMap('Agn')
105
+    static get Instance_Agn(): MsgBitMap {
106
+        if (!this._instance_Agn) {
107
+            this._instance_Agn = new MsgBitMap()
108
+            this.InitFdBitMap('Agn').then((data: Record<string, FdItem>) => {
109
+                this._instance_Agn.FdBitMap = data // 在这里使用 data
110
+            });
111
+        }
112
+        return this._instance_Agn
107 113
     }
108
-    return this._instance_Agn
109
-  }
110 114
 
111
-  static get Instance_Cnaps2(): MsgBitMap {
112
-    if (!this._instance_Cnaps2) {
113
-      this._instance_Cnaps2 = new MsgBitMap()
114
-      this._instance_Cnaps2.FdBitMap = this.InitFdBitMap('Cnaps2')
115
-    }
116
-    return this._instance_Cnaps2
117
-  }
118
-
119
-  private static async InitFdBitMap(type: string): Promise<Record<string, FdItem>> {
120
-    const dict: Record<string, FdItem> = {}
121
-    const data = await TradeHandle.GetFdItemMap(type)
122
-
123
-    data.forEach((item: any) => {
124
-      const fdItem = new FdItem()
125
-      fdItem.Code = item.Code
126
-      fdItem.Type = item.Type
127
-      fdItem.Length = parseInt(item.Length)
128
-      fdItem.DotLength = parseInt(item.DotLength)
129
-      fdItem.Description = item.Description
130
-      fdItem.FieldType = item.FieldType
131
-      fdItem.MaxLength = parseInt(item.MaxLength)
132
-      fdItem.Children = []
133
-      fdItem.MetaData = {}
134
-
135
-      dict[fdItem.Code] = fdItem
136
-      if (!fdItem.Code.endsWith('0')) {
137
-        const code = fdItem.Code.substring(0, 3) + '0'
138
-        if (dict[code]) {
139
-          dict[code].Children.push(fdItem)
115
+    static get Instance_Cnaps2(): MsgBitMap {
116
+        if (!this._instance_Cnaps2) {
117
+            this._instance_Cnaps2 = new MsgBitMap()
118
+            this.InitFdBitMap('Cnaps2').then((data: Record<string, FdItem>) => {
119
+                this._instance_Cnaps2.FdBitMap = data // 在这里使用 data
120
+            });
140 121
         }
141
-      }
142
-    })
143
-
144
-    return dict
145
-  }
146
-
147
-  static async CreateMessageCode(): Promise<string> {
148
-    const fdInfo: string[] = []
149
-    const fds = Object.values(MsgBitMap.Instance_Server.FdBitMap)
150
-
151
-    for (const item of fds) {
152
-      if (!item.Children || item.Children.length === 0) {
153
-        fdInfo.push(this.CreateFdCode(item))
154
-      } else {
155
-        fdInfo.push(`#region ${item.Code}域定义`)
156
-        for (const child of item.Children) {
157
-          fdInfo.push(this.CreateFdCode(child))
122
+        return this._instance_Cnaps2
123
+    }
124
+
125
+    private static async InitFdBitMap(type: string): Promise<Record<string, FdItem>> {
126
+        const dict: Record<string, FdItem> = {}
127
+        const data = await TradeHandle.GetFdItemMap(type)
128
+
129
+        data.forEach((item: any) => {
130
+            const fdItem = new FdItem()
131
+            fdItem.Code = item.Code
132
+            fdItem.Type = item.Type
133
+            fdItem.Length = parseInt(item.Length)
134
+            fdItem.DotLength = parseInt(item.DotLength)
135
+            fdItem.Description = item.Description
136
+            fdItem.FieldType = item.FieldType
137
+            fdItem.MaxLength = parseInt(item.MaxLength)
138
+            fdItem.Children = []
139
+            fdItem.MetaData = {}
140
+
141
+            dict[fdItem.Code] = fdItem
142
+            if (!fdItem.Code.endsWith('0')) {
143
+                const code = fdItem.Code.substring(0, 3) + '0'
144
+                if (dict[code]) {
145
+                    dict[code].Children.push(fdItem)
146
+                }
147
+            }
148
+        })
149
+
150
+        return dict
151
+    }
152
+
153
+    static async CreateMessageCode(): Promise<string> {
154
+        const fdInfo: string[] = []
155
+        const fds = Object.values(MsgBitMap.Instance_Server.FdBitMap)
156
+
157
+        for (const item of fds) {
158
+            if (!item.Children || item.Children.length === 0) {
159
+                fdInfo.push(this.CreateFdCode(item))
160
+            } else {
161
+                fdInfo.push(`#region ${item.Code}域定义`)
162
+                for (const child of item.Children) {
163
+                    fdInfo.push(this.CreateFdCode(child))
164
+                }
165
+                fdInfo.push('#endregion\n')
166
+            }
158 167
         }
159
-        fdInfo.push('#endregion\n')
160
-      }
168
+
169
+        return fdInfo.join('\n')
161 170
     }
162 171
 
163
-    return fdInfo.join('\n')
164
-  }
165
-
166
-  private static CreateFdCode(fdItem: FdItem): string {
167
-    const fdNo = fdItem.Code.replace(/^0+/, '').slice(0, -1)
168
-    const fdIndex = fdItem.Code.slice(-1)
169
-    const isParent = fdIndex === '0'
170
-
171
-    const codeLines: string[] = []
172
-    codeLines.push(`#region ${fdItem.Code}域定义`)
173
-    codeLines.push('/**')
174
-    codeLines.push(` * ${isParent ? `第${fdNo}域` : `第${fdNo}域${fdIndex}子域`}`)
175
-    codeLines.push(' */')
176
-    codeLines.push(`public get ${isParent ? `Fd${fdNo}` : `Fd${fdNo}_${fdIndex}`}(): string {`)
177
-    codeLines.push(`  return this.GetFdVaule("${fdItem.Code}").toString()`)
178
-    codeLines.push('}')
179
-    codeLines.push('')
180
-    codeLines.push(`public set ${isParent ? `Fd${fdNo}` : `Fd${fdNo}_${fdIndex}`}(value: string) {`)
181
-    codeLines.push(`  this.SetFdValue("${fdItem.Code}", value)`)
182
-    codeLines.push('}')
183
-    codeLines.push('#endregion')
184
-    
185
-    return codeLines.join('\n')
186
-  }
187
-}
172
+    private static CreateFdCode(fdItem: FdItem): string {
173
+        const fdNo = fdItem.Code.replace(/^0+/, '').slice(0, -1)
174
+        const fdIndex = fdItem.Code.slice(-1)
175
+        const isParent = fdIndex === '0'
176
+
177
+        const codeLines: string[] = []
178
+        codeLines.push(`#region ${fdItem.Code}域定义`)
179
+        codeLines.push('/**')
180
+        codeLines.push(` * ${isParent ? `第${fdNo}域` : `第${fdNo}域${fdIndex}子域`}`)
181
+        codeLines.push(' */')
182
+        codeLines.push(`public get ${isParent ? `Fd${fdNo}` : `Fd${fdNo}_${fdIndex}`}(): string {`)
183
+        codeLines.push(`  return this.GetFdVaule("${fdItem.Code}").toString()`)
184
+        codeLines.push('}')
185
+        codeLines.push('')
186
+        codeLines.push(`public set ${isParent ? `Fd${fdNo}` : `Fd${fdNo}_${fdIndex}`}(value: string) {`)
187
+        codeLines.push(`  this.SetFdValue("${fdItem.Code}", value)`)
188
+        codeLines.push('}')
189
+        codeLines.push('#endregion')
190
+
191
+        return codeLines.join('\n')
192
+    }
193
+}

+ 110
- 111
ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/TransitErrorCodeMap.ts View File

@@ -1,130 +1,129 @@
1
-import { ref } from 'vue'
2 1
 import * as fs from 'fs'
3 2
 import * as path from 'path'
4
-import { FilesHandle } from './FilesHandle'
5
-import { ServiceSettings } from './ServiceSettings'
3
+import FilesHandle from '../../../platfrom/serviceproxy/ServiceHelper/FilesHandle'
4
+import { ServiceSettings } from '../../ServiceProxy.Ext/ServiceSettings'
6 5
 
7 6
 type ErrorMapValue = {
8
-  description: string
9
-  codes: Map<string, string>
7
+    description: string
8
+    codes: Map<string, string>
10 9
 }
11 10
 
12
-export class TransitErrorCodeMap {
13
-  private static instance: TransitErrorCodeMap
14
-  private _errorMap = new Map<string, ErrorMapValue>()
11
+export default class TransitErrorCodeMap {
12
+    private static instance: TransitErrorCodeMap
13
+    private _errorMap = new Map<string, ErrorMapValue>()
15 14
 
16
-  public static GetInstance(): TransitErrorCodeMap {
17
-    if (!this.instance) {
18
-      this.instance = new TransitErrorCodeMap()
19
-    }
20
-    return this.instance
21
-  }
22
-
23
-  private constructor() {
24
-    this.initErrorMap()
25
-  }
26
-
27
-  private async initErrorMap() {
28
-    const localFile = path.join(process.cwd(), 'errorMap.xml')
29
-    const serverPath = path.join(ServiceSettings.ConfigFilePath, 'errorMap.xml')
30
-
31
-    // 检查文件是否需要更新
32
-    if (!fs.existsSync(localFile) || !(await FilesHandle.CheckMD5(localFile, serverPath))) {
33
-      try {
34
-        // 更新文件
35
-        if (fs.existsSync(localFile)) {
36
-          fs.unlinkSync(localFile)
15
+    public static GetInstance(): TransitErrorCodeMap {
16
+        if (!this.instance) {
17
+            this.instance = new TransitErrorCodeMap()
37 18
         }
38
-        const data = await FilesHandle.GetFileData(serverPath)
39
-        fs.writeFileSync(localFile, data)
40
-      } catch (e) {
41
-        console.error('更新错误码映射文件失败:', e)
42
-      }
19
+        return this.instance
20
+    }
21
+
22
+    private constructor() {
23
+        this.initErrorMap()
43 24
     }
44 25
 
45
-    // 读取配置文件
46
-    try {
47
-      const xmlData = fs.readFileSync(localFile, 'utf-8')
48
-      const parser = new DOMParser()
49
-      const document = parser.parseFromString(xmlData, 'text/xml')
50
-
51
-      if (document.documentElement) {
52
-        // 分类配置文件
53
-        const categories = document.documentElement.getElementsByTagName('category')
54
-        for (let i = 0; i < categories.length; i++) {
55
-          const node = categories[i]
56
-          const type = node.getAttribute('name')
57
-          if (!type || this._errorMap.has(type)) continue
58
-
59
-          const desc = node.getAttribute('value') || ''
60
-          const codeMap = new Map<string, string>()
61
-
62
-          const errors = node.getElementsByTagName('error')
63
-          for (let j = 0; j < errors.length; j++) {
64
-            const error = errors[j]
65
-            const code = error.getAttribute('name')
66
-            const value = error.getAttribute('value')
67
-            if (code && value && !codeMap.has(code)) {
68
-              codeMap.set(code, value)
26
+    private async initErrorMap() {
27
+        const localFile = path.join(process.cwd(), 'errorMap.xml')
28
+        const serverPath = path.join(ServiceSettings.ConfigFilePath, 'errorMap.xml')
29
+
30
+        // 检查文件是否需要更新
31
+        if (!fs.existsSync(localFile) || !(await FilesHandle.CheckMD5(localFile, serverPath))) {
32
+            try {
33
+                // 更新文件
34
+                if (fs.existsSync(localFile)) {
35
+                    fs.unlinkSync(localFile)
36
+                }
37
+                const data = await FilesHandle.GetFileData(serverPath)
38
+                fs.writeFileSync(localFile, data)
39
+            } catch (e) {
40
+                console.error('更新错误码映射文件失败:', e)
69 41
             }
70
-          }
42
+        }
71 43
 
72
-          this._errorMap.set(type, {
73
-            description: desc,
74
-            codes: codeMap
75
-          })
44
+        // 读取配置文件
45
+        try {
46
+            const xmlData = fs.readFileSync(localFile, 'utf-8')
47
+            const parser = new DOMParser()
48
+            const document = parser.parseFromString(xmlData, 'text/xml')
49
+
50
+            if (document.documentElement) {
51
+                // 分类配置文件
52
+                const categories = document.documentElement.getElementsByTagName('category')
53
+                for (let i = 0; i < categories.length; i++) {
54
+                    const node = categories[i]
55
+                    const type = node.getAttribute('name')
56
+                    if (!type || this._errorMap.has(type)) continue
57
+
58
+                    const desc = node.getAttribute('value') || ''
59
+                    const codeMap = new Map<string, string>()
60
+
61
+                    const errors = node.getElementsByTagName('error')
62
+                    for (let j = 0; j < errors.length; j++) {
63
+                        const error = errors[j]
64
+                        const code = error.getAttribute('name')
65
+                        const value = error.getAttribute('value')
66
+                        if (code && value && !codeMap.has(code)) {
67
+                            codeMap.set(code, value)
68
+                        }
69
+                    }
70
+
71
+                    this._errorMap.set(type, {
72
+                        description: desc,
73
+                        codes: codeMap
74
+                    })
75
+                }
76
+            }
77
+        } catch (e) {
78
+            console.error('解析错误码映射文件失败:', e)
76 79
         }
77
-      }
78
-    } catch (e) {
79
-      console.error('解析错误码映射文件失败:', e)
80
-    }
81
-  }
82
-
83
-  /**
84
-   * 获取错误代码指代的错误信息
85
-   */
86
-  public GetErrorMessage(errorCode: string, type?: string): string {
87
-    const errorType = type || 'default'
88
-    const dict = this._errorMap.get(errorType)
89
-    
90
-    if (!dict) {
91
-      return `[${errorType}-${errorCode}]未知的错误代码类型`
92 80
     }
93 81
 
94
-    let msg = dict.codes.get(errorCode) || '未知的错误代码'
95
-    
96
-    // 若找不到错误码,从default中再找一遍
97
-    if (msg === '未知的错误代码' && errorType === 'agn') {
98
-      const defaultDict = this._errorMap.get('default')
99
-      if (defaultDict && defaultDict.codes.has(errorCode)) {
100
-        msg = defaultDict.codes.get(errorCode)!
101
-      }
102
-    }
82
+    /**
83
+     * 获取错误代码指代的错误信息
84
+     */
85
+    public GetErrorMessage(errorCode: string, type?: string): string {
86
+        const errorType = type || 'default'
87
+        const dict = this._errorMap.get(errorType)
103 88
 
104
-    return `[${dict.description}-${errorCode}]${msg}`
105
-  }
106
-
107
-  /**
108
-   * 获取带域信息的错误代码指代的错误信息
109
-   */
110
-  public GetErrorMessageWithField(errorCode: string, errorFd: string, type?: string): string {
111
-    const errorType = type || 'default'
112
-    const dict = this._errorMap.get(errorType)
113
-    
114
-    if (!dict) {
115
-      return `[${errorType}-${errorCode}]未知的错误代码类型(${errorFd})`
116
-    }
89
+        if (!dict) {
90
+            return `[${errorType}-${errorCode}]未知的错误代码类型`
91
+        }
92
+
93
+        let msg = dict.codes.get(errorCode) || '未知的错误代码'
94
+
95
+        // 若找不到错误码,从default中再找一遍
96
+        if (msg === '未知的错误代码' && errorType === 'agn') {
97
+            const defaultDict = this._errorMap.get('default')
98
+            if (defaultDict && defaultDict.codes.has(errorCode)) {
99
+                msg = defaultDict.codes.get(errorCode)!
100
+            }
101
+        }
117 102
 
118
-    let msg = dict.codes.get(errorCode) || '未知的错误代码'
119
-    
120
-    // 若找不到错误码,从default中再找一遍
121
-    if (msg === '未知的错误代码' && errorType === 'agn') {
122
-      const defaultDict = this._errorMap.get('default')
123
-      if (defaultDict && defaultDict.codes.has(errorCode)) {
124
-        msg = defaultDict.codes.get(errorCode)!
125
-      }
103
+        return `[${dict.description}-${errorCode}]${msg}`
126 104
     }
127 105
 
128
-    return `[${dict.description}-${errorCode}]${msg}(${errorFd})`
129
-  }
130
-}
106
+    /**
107
+     * 获取带域信息的错误代码指代的错误信息
108
+     */
109
+    public GetErrorMessageWithField(errorCode: string, errorFd: string, type?: string): string {
110
+        const errorType = type || 'default'
111
+        const dict = this._errorMap.get(errorType)
112
+
113
+        if (!dict) {
114
+            return `[${errorType}-${errorCode}]未知的错误代码类型(${errorFd})`
115
+        }
116
+
117
+        let msg = dict.codes.get(errorCode) || '未知的错误代码'
118
+
119
+        // 若找不到错误码,从default中再找一遍
120
+        if (msg === '未知的错误代码' && errorType === 'agn') {
121
+            const defaultDict = this._errorMap.get('default')
122
+            if (defaultDict && defaultDict.codes.has(errorCode)) {
123
+                msg = defaultDict.codes.get(errorCode)!
124
+            }
125
+        }
126
+
127
+        return `[${dict.description}-${errorCode}]${msg}(${errorFd})`
128
+    }
129
+}

+ 25
- 25
ant-design-pro-vue3/src/views/front/develop/Communication/MessageHelper/TransitType.ts View File

@@ -6,17 +6,17 @@ export enum TransitType {
6 6
      * 未知外端
7 7
      */
8 8
     Unknown = 0,
9
-    
9
+
10 10
     /**
11 11
      * 核心后台
12 12
      */
13 13
     CallServer = 1,
14
-    
14
+
15 15
     /**
16 16
      * 平台渠道
17 17
      */
18 18
     CallAgn = 2,
19
-    
19
+
20 20
     CallMobileBanking = 3,
21 21
     CallAgnCIS = 4,
22 22
     CallAgnCard = 5,
@@ -41,102 +41,102 @@ export enum TransitType {
41 41
     CallAgnHeat03 = 24,
42 42
     CallAgnWater = 25,
43 43
     CallAgnIDC = 26,
44
-    
44
+
45 45
     /**
46 46
      * 超级网银
47 47
      */
48 48
     CallAgnIBPS = 27,
49
-    
49
+
50 50
     CallAgnOrder = 28,
51 51
     CallAgnTips = 29,
52 52
     CallAgnRun = 30,
53
-    
53
+
54 54
     // 村镇银行网银
55 55
     CallAgn_CZYYSW = 31,
56
-    
56
+
57 57
     // 二代货币/反假币
58 58
     CallNoFileSys = 32,
59
-    
59
+
60 60
     // 青隆易缴费
61 61
     CallAgn_EasyPay = 33,
62
-    
62
+
63 63
     /**
64 64
      * 阳光燃气费代交
65 65
      */
66 66
     CallAgn_GasFee = 34,
67
-    
67
+
68 68
     /**
69 69
      * 山东一窗通
70 70
      */
71 71
     CallAgn_SDYCT = 35,
72
-    
72
+
73 73
     /**
74 74
      * 中牟存量房监管
75 75
      */
76 76
     CallAgnCLFJG = 36,
77
-    
77
+
78 78
     /**
79 79
      * 农金通
80 80
      */
81 81
     CallAgn_NJT = 37,
82
-    
82
+
83 83
     /**
84 84
      * 青隆房管局网签
85 85
      */
86 86
     CallAgn_FGJWQ = 38,
87
-    
87
+
88 88
     /**
89 89
      * 阳光电子汇票
90 90
      */
91 91
     CallAgn_Ebill = 39,
92
-    
92
+
93 93
     /**
94 94
      * 农信银网联
95 95
      */
96 96
     CallAgnNew_WL = 40,
97
-    
97
+
98 98
     /**
99 99
      * 境外卡渠道
100 100
      */
101 101
     CallAgn_JWK = 85001,
102
-    
102
+
103 103
     /**
104 104
      * 青隆房管局网签 黄骅市
105 105
      */
106 106
     CallAgn_FGJWQ_HH = 30201,
107
-    
107
+
108 108
     /**
109 109
      * 扶沟 农民工工资代发
110 110
      */
111 111
     CallAgn_DF = 13201,
112
-    
112
+
113 113
     /**
114 114
      * 固始公积金
115 115
      */
116 116
     CallAgn_GGJ = 10801,
117
-    
117
+
118 118
     /**
119 119
      * 中牟超网
120 120
      */
121 121
     CallAgn_CW = 10201,
122
-    
122
+
123 123
     /**
124 124
      * 中牟资金监管
125 125
      */
126 126
     CallAgn_ZJJG = 10202,
127
-    
127
+
128 128
     /**
129 129
      * 中牟查控系统
130 130
      */
131 131
     CallAgn_CKXT = 10203,
132
-    
132
+
133 133
     /**
134 134
      * 核心前置通讯
135 135
      */
136 136
     CallGateway2CBS = 10204,
137
-    
137
+
138 138
     /**
139 139
      * 浚县房屋资金维修
140 140
      */
141 141
     CallHfmsApp = 16201
142
-}
142
+}

+ 14
- 13
ant-design-pro-vue3/src/views/front/develop/Communication/TransitSettings.ts View File

@@ -1,14 +1,15 @@
1
-import { ConfigManager } from './ConfigManager'
2
-import { ConfigType } from './ConfigType'
1
+// import { ConfigManager } from './ConfigManager'
2
+// import { ConfigType } from './ConfigType'
3 3
 
4
-/**
5
- * 通讯设置类
6
- */
7
-export class TransitSettings {
8
-    /**
9
-     * 通讯采用的加密方式
10
-     */
11
-    public static get KeyStr(): string {
12
-        return ConfigManager.getInstance().getConfigValue('KeyStr', ConfigType.System)
13
-    }
14
-}
4
+// /**
5
+//  * 通讯设置类
6
+//  */
7
+// export class TransitSettings {
8
+//     /**
9
+//      * 通讯采用的加密方式
10
+//      */
11
+//     public static get KeyStr(): string {
12
+//         return ConfigManager.getInstance().getConfigValue('KeyStr', ConfigType.System)
13
+//     }
14
+// }
15
+//hulei 原项目中被排除了

+ 0
- 71
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/EntryBase.cs View File

@@ -1,71 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using TellerSystem.Communication;
6
-
7
-namespace TellerSystem.Contract.ContractBase
8
-{
9
-    /// <summary>
10
-    /// 入口基类,包括Message和PageBase
11
-    /// </summary>
12
-    public class EntryBase : ITradeHelper
13
-    {
14
-        #region 数据属性
15
-        public Message MessageData { get; private set; }
16
-        public PageBase PageData { get; private set; }
17
-        #endregion
18
-
19
-        /// <summary>
20
-        /// 加载数据
21
-        /// </summary>
22
-        /// <param name="page"></param>
23
-        /// <param name="message"></param>
24
-        /// <returns></returns>
25
-        public bool LoadData(PageBase page, Message message)
26
-        {
27
-            var flag = true;
28
-            //检测参数变化
29
-            if (page != null && page == PageData)
30
-            {
31
-                if (message == MessageData || (message.FileData == MessageData.FileData && message.GetAllFds().Except(MessageData.GetAllFds()).Count() == 0))//KeyValuePair是结构体,会对比下辖所有值
32
-                    flag = false;//参数与历史登记一致,未作修改
33
-            }
34
-            PageData = page;
35
-            MessageData = message;
36
-            return OnLoadData(flag);
37
-        }
38
-
39
-        /// <summary>
40
-        /// 加载数据时触发
41
-        /// </summary>
42
-        /// <param name="changed">标识数据是否发生改变</param>
43
-        /// <returns></returns>
44
-        protected virtual bool OnLoadData(bool changed)
45
-        {
46
-            return true;
47
-        }
48
-
49
-        #region ITradeHelper
50
-        public TradeBusHelper TradeBus
51
-        {
52
-            get { return PageData.TradeBus; }
53
-        }
54
-
55
-        public TradeInfoHelper TradeInfo
56
-        {
57
-            get { return PageData.TradeInfo; }
58
-        }
59
-
60
-        public TradeAPIsHelper TradeAPIs
61
-        {
62
-            get { return PageData.TradeAPIs; }
63
-        }
64
-
65
-        public TradeResourcesHelper TradeResources
66
-        {
67
-            get { return PageData.TradeResources; }
68
-        }
69
-        #endregion
70
-    }
71
-}

+ 8
- 8
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/EntryBase.ts View File

@@ -1,4 +1,4 @@
1
-import type { Message } from './Message'
1
+import type { Message } from '../../Communication/Message'
2 2
 import type { PageBase } from './PageBase'
3 3
 import type { ITradeHelper } from './ITradeHelper'
4 4
 import type { TradeBusHelper } from './TradeBusHelper'
@@ -10,7 +10,7 @@ import type { TradeResourcesHelper } from './TradeResourcesHelper'
10 10
  * 入口基类,包括Message和PageBase
11 11
  */
12 12
 export class EntryBase implements ITradeHelper {
13
-    #region 数据属性
13
+    //#region 数据属性
14 14
     private _messageData: Message | null = null
15 15
     private _pageData: PageBase | null = null
16 16
 
@@ -37,16 +37,16 @@ export class EntryBase implements ITradeHelper {
37 37
      */
38 38
     public LoadData(page: PageBase, message: Message): boolean {
39 39
         let flag = true
40
-        
40
+
41 41
         // 检测参数变化
42 42
         if (page !== null && page === this.PageData) {
43
-            if (message === this.MessageData || 
44
-                (message.FileData === this.MessageData?.FileData && 
45
-                 this.getDiffFields(message, this.MessageData).length === 0)) {
43
+            if (message === this.MessageData ||
44
+                (message.FileData === this.MessageData?.FileData &&
45
+                    this.getDiffFields(message, this.MessageData).length === 0)) {
46 46
                 flag = false // 参数与历史登记一致,未作修改
47 47
             }
48 48
         }
49
-        
49
+
50 50
         this.PageData = page
51 51
         this.MessageData = message
52 52
         return this.OnLoadData(flag)
@@ -96,4 +96,4 @@ export const useEntryBase = () => {
96 96
         EntryBase,
97 97
         createEntry: () => reactive(new EntryBase())
98 98
     }
99
-}
99
+}

+ 0
- 22
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/HomePageBase.cs View File

@@ -1,22 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Windows;
6
-
7
-namespace TellerSystem.Contract.ContractBase
8
-{
9
-    /// <summary>
10
-    /// 主界面框架基础
11
-    /// </summary>
12
-    public abstract class HomePageBase : PageBase
13
-    {
14
-        public HomePageBase()
15
-        {
16
-        }
17
-
18
-        public void LoadTradeHost(UIElement host)
19
-        {
20
-        }
21
-    }
22
-}

+ 0
- 33
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/ITradeHelper.cs View File

@@ -1,33 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-
6
-namespace TellerSystem.Contract.ContractBase
7
-{
8
-    /// <summary>
9
-    /// 交易帮助接口
10
-    /// </summary>
11
-    public interface ITradeHelper
12
-    { 
13
-        /// <summary>
14
-        /// 业务总线
15
-        /// </summary>
16
-        TradeBusHelper TradeBus { get; }
17
-
18
-        /// <summary>
19
-        /// 交易信息
20
-        /// </summary>
21
-        TradeInfoHelper TradeInfo { get; }
22
-
23
-        /// <summary>
24
-        /// 操作接口
25
-        /// </summary> 
26
-        TradeAPIsHelper TradeAPIs { get; }
27
-
28
-        /// <summary>
29
-        /// 资源集合
30
-        /// </summary>
31
-        TradeResourcesHelper TradeResources { get; }
32
-    }
33
-}

+ 0
- 252
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/PageBase.cs View File

@@ -1,252 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using Platform.Presentation.PageFunctions;
6
-using System.Windows.Documents;
7
-using System.Windows;
8
-using System.Windows.Media;
9
-using System.ComponentModel;
10
-using System.IO;
11
-using System.Reflection;
12
-using Platform.Common.RunningParameters;
13
-using TellerSystem.Library.Ext.Function;
14
-using Platform.Presentation.FocusManagers;
15
-using TellerSystem.ServiceProxy.Ext;
16
-using TellerSystem.Contract.Entry;
17
-using Platform.Common.LogSystem;
18
-using TellerSystem.PrintTemplate.Extension;
19
-using TellerSystem.ServiceProxy.Ext.ServiceHelper;
20
-
21
-namespace TellerSystem.Contract.ContractBase
22
-{
23
-    /// <summary>
24
-    /// 页面基类,填充通用的业务接口API
25
-    /// 注意:该对象需要支持序列化/反序列化
26
-    /// </summary>
27
-    public abstract class PageBase : TradePage, ITradeHelper
28
-    {
29
-        #region InitPage
30
-        /// <summary>
31
-        /// 银行标签
32
-        /// </summary>
33
-        public string BankFlag
34
-        {
35
-            get
36
-            {
37
-                return ServiceSettings.BankFlag;
38
-            }
39
-        }
40
-
41
-        /// <summary>
42
-        /// 密封
43
-        /// </summary>
44
-        protected sealed override void OnTradePageLoaded()
45
-        {
46
-            var flag = false;
47
-            try
48
-            {
49
-                base.OnTradePageLoaded();
50
-                //加载页面初始化
51
-                flag = InitPage();
52
-                if (flag)
53
-                    this.Dispatcher.BeginInvoke(new Action(() =>
54
-                    {
55
-                        if (FocusManager.GetEnableFocusControl(this))
56
-                        {
57
-                            //若焦点控件不存在,则认为初始化焦点失败
58
-                            var fm = FocusManager.GetManagerInstance(this);
59
-                            if (fm != null && fm.CurrentFocusedElement == null)
60
-                            {
61
-                                fm.Refresh();
62
-                                fm.ReSetFocus();
63
-                            }
64
-                            //将交易打开的时间登记到bus
65
-                            try {
66
-                                if (string.IsNullOrEmpty(TradeBus["__StartTime__"]))
67
-                                    this.TradeBus["__StartTime__"] = DateTime.Now.ToString("yyyyMMddHHmmss");
68
-                            }
69
-                            catch (Exception ex)
70
-                            {
71
-                                TradeHandle.WriteImportantLog("获取交易打开时间异常", ex.Message, "StartTime");
72
-                                return;
73
-                            }
74
-                        }
75
-                    }), System.Windows.Threading.DispatcherPriority.SystemIdle, null);
76
-            }
77
-            catch (Exception e)
78
-            {
79
-                Platform.Common.LogSystem.PlatformLogger.TradeErrorInfo("调用InitPage失败!", e, TradeModel.Code);
80
-            }
81
-            if (!flag)
82
-            {
83
-                this.OwnerContainer.ClosePage();
84
-                //this.Dispatcher.BeginInvoke(new Action(() => { this.OwnerContainer.ClosePage(); }), System.Windows.Threading.DispatcherPriority.Loaded);
85
-            }
86
-        }
87
-
88
-        /// <summary>
89
-        /// 初始化页面
90
-        /// </summary>
91
-        /// <returns></returns>
92
-        public virtual bool InitPage()
93
-        {
94
-            return true;
95
-        }
96
-
97
-        public class PagePrintedEventArgs : EventArgs
98
-        {
99
-            public PagePrintedEventArgs(PrintAttributes attr)
100
-            {
101
-                PrintAttr = attr;
102
-            }
103
-            public PrintAttributes PrintAttr { get; private set; }
104
-        }
105
-
106
-        public event EventHandler<PagePrintedEventArgs> PagePrinted;
107
-
108
-        public void Log2PagePrinted(string log)
109
-        {
110
-            try
111
-            {
112
-                PlatformLogger.SystemInfo("Log2PagePrinted:start 【" + log + "】=>" + this.PagePrinted);
113
-                if (this.PagePrinted == null) return;
114
-                var list = this.PagePrinted.GetInvocationList();
115
-                if (list == null) return;
116
-                PlatformLogger.SystemInfo("Log2PagePrinted:list length=>" + list.Length + ",data=>"
117
-                    + string.Join(",", list.ToList().Where(x => x != null).Select(d => d.Method.ToString()).ToList()));
118
-            }
119
-            catch { }
120
-        }
121
-
122
-        /// <summary>
123
-        /// 触发打印后事件
124
-        /// </summary>
125
-        public void OnPagePrinted(PrintAttributes attr)
126
-        {
127
-            PlatformLogger.SystemInfo("OnPagePrinted:触发事件=>" + this.PagePrinted);
128
-            if (this.PagePrinted != null)
129
-            {
130
-                Log2PagePrinted("OnPagePrinted.start");
131
-                this.PagePrinted(this, new PagePrintedEventArgs(attr));
132
-                Log2PagePrinted("OnPagePrinted.end");
133
-            }
134
-        }
135
-        #endregion
136
-
137
-        #region 访问接口
138
-        #region 业务总线TradeBus
139
-        private TradeBusHelper _tradeBus;
140
-        /// <summary>
141
-        /// 业务总线
142
-        /// </summary>
143
-        public TradeBusHelper TradeBus
144
-        {
145
-            get
146
-            {
147
-                if (_tradeBus == null)
148
-                    _tradeBus = new TradeBusHelper(this);
149
-                return _tradeBus;
150
-            }
151
-        }
152
-        #endregion
153
-
154
-        #region 交易信息TradeInfo
155
-        private TradeInfoHelper _tradeInfo;
156
-        /// <summary>
157
-        /// 交易信息
158
-        /// </summary>
159
-        public TradeInfoHelper TradeInfo
160
-        {
161
-            get
162
-            {
163
-                if (_tradeInfo == null)
164
-                    _tradeInfo = new TradeInfoHelper(this);
165
-                return _tradeInfo;
166
-            }
167
-        }
168
-        #endregion
169
-
170
-        #region 操作接口TradeAPIs
171
-
172
-        private TradeAPIsHelper _tradeAPIs;
173
-        /// <summary>
174
-        /// 操作接口
175
-        /// </summary>
176
-        public TradeAPIsHelper TradeAPIs
177
-        {
178
-            get
179
-            {
180
-                if (_tradeAPIs == null)
181
-                    _tradeAPIs = new TradeAPIsHelper(this);
182
-                return _tradeAPIs;
183
-            }
184
-        }
185
-
186
-        #endregion
187
-
188
-        #region 资源集合TradeResources
189
-        private TradeResourcesHelper _tradeResources;
190
-        /// <summary>
191
-        /// 资源集合
192
-        /// </summary>
193
-        public TradeResourcesHelper TradeResources
194
-        {
195
-            get
196
-            {
197
-                if (_tradeResources == null)
198
-                    _tradeResources = new TradeResourcesHelper(this);
199
-                return _tradeResources;
200
-            }
201
-        }
202
-
203
-        #endregion
204
-
205
-        #region Paperless
206
-        private PaperlessEntry paperless;
207
-        /// <summary>
208
-        /// 无纸化对象
209
-        /// </summary>
210
-        public PaperlessEntry Paperless
211
-        {
212
-            get
213
-            {
214
-                if (paperless == null)
215
-                    paperless = new PaperlessEntry();
216
-                return paperless;
217
-            }
218
-        }
219
-        #endregion
220
-
221
-        #region CashCode
222
-        private CashCodeEntry cashCode;
223
-        /// <summary>
224
-        /// 冠字号对象
225
-        /// </summary>
226
-        public CashCodeEntry CashCode
227
-        {
228
-            get
229
-            {
230
-                if (cashCode == null)
231
-                    cashCode = new CashCodeEntry();
232
-                return cashCode;
233
-            }
234
-        }
235
-        #endregion
236
-        #endregion
237
-
238
-        #region 清理
239
-        /// <summary>
240
-        /// 清理缓存数据
241
-        /// </summary>
242
-        public void Clear()
243
-        {
244
-            this.paperless = null;
245
-            this._tradeAPIs = null;
246
-            this._tradeBus = null;
247
-            this._tradeInfo = null;
248
-            this._tradeResources = null;
249
-        }
250
-        #endregion
251
-    }
252
-}

+ 1325
- 0
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeAPIsHelper.ts
File diff suppressed because it is too large
View File


+ 2328
- 0
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeBusHelper.ts
File diff suppressed because it is too large
View File


+ 0
- 89
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeInfoHelper.cs View File

@@ -1,89 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using TellerSystem.Library.Ext.TradeExtension;
6
-using System.Windows.Media;
7
-
8
-namespace TellerSystem.Contract.ContractBase
9
-{
10
-    /// <summary>
11
-    /// 交易基础信息的访问辅助类
12
-    /// </summary>
13
-    public class TradeInfoHelper
14
-    {
15
-        #region ctor & Property
16
-        public TradeInfoHelper(PageBase page)
17
-        {
18
-            Page = page;
19
-            _tradeInfoData = TradeInfoData.GetTradeInfo(Page);
20
-        }
21
-        public PageBase Page { get; private set; }
22
-        private TradeInfoData _tradeInfoData;
23
-        #endregion
24
-
25
-        #region 交易属性
26
-        /// <summary>
27
-        /// 柜员前端流水号
28
-        /// </summary>
29
-        public string SerialNumber
30
-        {
31
-            get { return _tradeInfoData.SerialNumber; }
32
-        }
33
-        /// <summary>
34
-        /// 系统前端流水号
35
-        /// </summary>
36
-        public string SystemSerialNumber
37
-        {
38
-            get { return _tradeInfoData.SystemSerialNumber; }
39
-        }
40
-
41
-        /// <summary>
42
-        /// 打印票号
43
-        /// </summary>
44
-        public string PrintNum
45
-        {
46
-            get { return _tradeInfoData.PrintNum; }
47
-        }
48
-        /// <summary>
49
-        /// 交易号,指代一个完整的业务流程
50
-        /// </summary>
51
-        public string TradeCode
52
-        {
53
-            get { return _tradeInfoData.TradeCode; }
54
-        }
55
-        /// <summary>
56
-        /// 交易名称,指代一个完整的业务流程
57
-        /// </summary>
58
-        public string TradeName
59
-        {
60
-            get { return _tradeInfoData.TradeName; }
61
-        }
62
-        /// <summary>
63
-        /// 交易截图 modify by hulei  20190116
64
-        /// </summary>
65
-        public Dictionary<string, List<ImageSource>> TradeScreens
66
-        {
67
-            set
68
-            {
69
-                _tradeInfoData.TradeScreens = value;
70
-            }
71
-            get { return _tradeInfoData.TradeScreens; }
72
-        }
73
-        /// <summary>
74
-        /// 主交易提交代码
75
-        /// </summary>
76
-        public string MainCode
77
-        {
78
-            get
79
-            {
80
-                return _tradeInfoData.TradeBus["MainCode"];
81
-            }
82
-            set
83
-            {
84
-                _tradeInfoData.TradeBus["MainCode"] = value;
85
-            }
86
-        }
87
-        #endregion
88
-    }
89
-}

+ 0
- 25
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/TradeResourcesHelper.cs View File

@@ -1,25 +0,0 @@
1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-
6
-namespace TellerSystem.Contract.ContractBase
7
-{
8
-    /// <summary>
9
-    /// 业务资源的访问辅助类
10
-    /// </summary>
11
-    public class TradeResourcesHelper
12
-    {
13
-        #region ctor & Property
14
-        public TradeResourcesHelper(PageBase page)
15
-        {
16
-            Page = page;
17
-        }
18
-        public PageBase Page { get; private set; }
19
-        #endregion
20
-
21
-        #region 资源属性
22
-        public string ButtonStyle { get; set; }
23
-        #endregion
24
-    }
25
-}

+ 230
- 228
ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/ServiceHelper/TradeHandle.ts View File

@@ -1,283 +1,285 @@
1 1
 import { ref } from 'vue'
2 2
 import { message } from 'ant-design-vue'
3
-import { ServiceManager } from './ServiceManager'
3
+import ServiceManager from "@/views/front/platfrom/serviceproxy/ServiceHelper/TradeHandle";
4 4
 import { TransitEntity, AttachFile } from './ServiceEntitys'
5
-import { Platform } from './Platform'
5
+import CommonFunction from "@/views/front/platfrom/serviceproxy/CommonFunction";
6
+import { ServiceSettings } from "@/views/front/develop/ServiceProxy.Ext/ServiceSettings"
7
+import FilesHandle from '@/views/front/platfrom/serviceproxy/ServiceHelper/FilesHandle';
6 8
 
7 9
 export enum Transit {
8
-  CallServer = 'CallServer',
9
-  CallAgn = 'CallAgn',
10
-  CallTips = 'CallTips',
11
-  CallAgnPay = 'CallAgnPay',
12
-  CallAgnTIPS = 'CallAgnTIPS',
13
-  CallAgnSecdistruct = 'CallAgnSecdistruct',
14
-  CallAgnMobileBanking = 'CallAgnMobileBanking'
10
+    CallServer = 'CallServer',
11
+    CallAgn = 'CallAgn',
12
+    CallTips = 'CallTips',
13
+    CallAgnPay = 'CallAgnPay',
14
+    CallAgnTIPS = 'CallAgnTIPS',
15
+    CallAgnSecdistruct = 'CallAgnSecdistruct',
16
+    CallAgnMobileBanking = 'CallAgnMobileBanking'
15 17
 }
16 18
 
17
-export class TradeHandle {
18
-  /**
19
-   * 获取8583域定义
20
-   */
21
-  static async GetFdItemMap(type: string): Promise<any> {
22
-    const table = {
23
-      Code: '',
24
-      Type: '',
25
-      Length: '',
26
-      DotLength: '',
27
-      Description: '',
28
-      FieldType: '',
29
-      MaxLength: ''
30
-    }
19
+export default class TradeHandle {
20
+    /**
21
+     * 获取8583域定义
22
+     */
23
+    static async GetFdItemMap(type: string): Promise<any> {
24
+        const table = {
25
+            Code: '',
26
+            Type: '',
27
+            Length: '',
28
+            DotLength: '',
29
+            Description: '',
30
+            FieldType: '',
31
+            MaxLength: ''
32
+        }
31 33
 
32
-    const entity = new TransitEntity()
33
-    entity.ServiceName = 'TradeService'
34
-    entity.FuncName = 'GetFdItemMap'
35
-    entity.Parameters = { '1': type }
34
+        const entity = new TransitEntity()
35
+        entity.ServiceName = 'TradeService'
36
+        entity.FuncName = 'GetFdItemMap'
37
+        entity.Parameters = { '1': type }
36 38
 
37
-    const tmpresult = await ServiceManager.GetInstance().Commit(entity)
38
-    let data = null
39
-    if (tmpresult && tmpresult.length === 1) {
40
-      data = tmpresult[0].AttachValue as string
41
-    }
42
-    
43
-    if (data) {
44
-      const lines = data.split('\n')
45
-      return lines.map(line => {
46
-        const rows = line.split('|')
47
-        return {
48
-          ...table,
49
-          Code: rows[0],
50
-          Type: rows[1],
51
-          Length: rows[2],
52
-          DotLength: rows[3],
53
-          Description: rows[4],
54
-          FieldType: rows[5],
55
-          MaxLength: rows[6]
39
+        const tmpresult = await ServiceManager.GetInstance().Commit(entity)
40
+        let data = null
41
+        if (tmpresult && tmpresult.length === 1) {
42
+            data = tmpresult[0].AttachValue as string
43
+        }
44
+
45
+        if (data) {
46
+            const lines = data.split('\n')
47
+            return lines.map(line => {
48
+                const rows = line.split('|')
49
+                return {
50
+                    ...table,
51
+                    Code: rows[0],
52
+                    Type: rows[1],
53
+                    Length: rows[2],
54
+                    DotLength: rows[3],
55
+                    Description: rows[4],
56
+                    FieldType: rows[5],
57
+                    MaxLength: rows[6]
58
+                }
59
+            })
56 60
         }
57
-      })
61
+        return []
58 62
     }
59
-    return []
60
-  }
61 63
 
62
-  /**
63
-   * 按照参数指示与外端进行通讯交互
64
-   */
65
-  static async DoTrade(
66
-    transit: string, 
67
-    integrateData: Uint8Array, 
68
-    kinBrno: string, 
69
-    fileName: string,
70
-    fileData: Uint8Array, 
71
-    args: any[], 
72
-    serialNo: string
73
-  ): Promise<Uint8Array[]> {
74
-    const result: Uint8Array[] = []
75
-    try {
76
-      const entity = new TransitEntity()
77
-      entity.ServiceName = 'TradeService'
78
-      entity.FuncName = 'DoTradeByTransit'
79
-      entity.Parameters = { 
80
-        '1': transit, 
81
-        '3': kinBrno, 
82
-        '4': fileName, 
83
-        '6': '', 
84
-        '7': serialNo 
85
-      }
64
+    /**
65
+     * 按照参数指示与外端进行通讯交互
66
+     */
67
+    static async DoTrade(
68
+        transit: string,
69
+        integrateData: Uint8Array,
70
+        kinBrno: string,
71
+        fileName: string,
72
+        fileData: Uint8Array,
73
+        args: any[],
74
+        serialNo: string
75
+    ): Promise<Uint8Array[]> {
76
+        const result: Uint8Array[] = []
77
+        try {
78
+            const entity = new TransitEntity()
79
+            entity.ServiceName = 'TradeService'
80
+            entity.FuncName = 'DoTradeByTransit'
81
+            entity.Parameters = {
82
+                '1': transit,
83
+                '3': kinBrno,
84
+                '4': fileName,
85
+                '6': '',
86
+                '7': serialNo
87
+            }
86 88
 
87
-      const data = new AttachFile()
88
-      data.AttachIndex = '2'
89
-      data.AttachType = 'ByteType'
90
-      data.AttachValue = integrateData
91
-      entity.AttachFiles.push(data)
89
+            const data = new AttachFile()
90
+            data.AttachIndex = '2'
91
+            data.AttachType = 'ByteType'
92
+            data.AttachValue = integrateData
93
+            entity.AttachFiles.push(data)
92 94
 
93
-      const data1 = new AttachFile()
94
-      data1.AttachIndex = '5'
95
-      data1.AttachType = 'ByteType'
96
-      data1.AttachValue = fileData
97
-      entity.AttachFiles.push(data1)
95
+            const data1 = new AttachFile()
96
+            data1.AttachIndex = '5'
97
+            data1.AttachType = 'ByteType'
98
+            data1.AttachValue = fileData
99
+            entity.AttachFiles.push(data1)
98 100
 
99
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity)
100
-      if (tmpresult) {
101
-        tmpresult.forEach(attachFile => {
102
-          result.push(attachFile.AttachValue as Uint8Array)
103
-        })
104
-      }
105
-    } catch (e) {
106
-      throw e
101
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
102
+            if (tmpresult) {
103
+                tmpresult.forEach(attachFile => {
104
+                    result.push(attachFile.AttachValue as Uint8Array)
105
+                })
106
+            }
107
+        } catch (e) {
108
+            throw e
109
+        }
110
+        return result
107 111
     }
108
-    return result
109
-  }
110 112
 
111
-  /**
112
-   * 获取交易返回的附件信息数据
113
-   */
114
-  static async GetTradeFile(fileName: string): Promise<Uint8Array> {
115
-    const filePath = ServiceSettings.TempFilePath + fileName + 'dhcc'
116
-    return FilesHandle.GetFileData(filePath)
117
-  }
113
+    /**
114
+     * 获取交易返回的附件信息数据
115
+     */
116
+    static async GetTradeFile(fileName: string): Promise<Uint8Array> {
117
+        const filePath = ServiceSettings.TempFilePath + fileName + 'dhcc'
118
+        return FilesHandle.GetFileData(filePath)
119
+    }
118 120
 
119
-  /**
120
-   * 清空交易附件信息
121
-   */
122
-  static async ClearvFile(fileName: string): Promise<boolean> {
123
-    let result = false
124
-    try {
125
-      const entity = new TransitEntity()
126
-      entity.ServiceName = 'UtilService'
127
-      entity.FuncName = 'SaveFile'
128
-      entity.Parameters = { 
129
-        '1': fileName, 
130
-        '3': 'false' 
131
-      }
121
+    /**
122
+     * 清空交易附件信息
123
+     */
124
+    static async ClearvFile(fileName: string): Promise<boolean> {
125
+        let result = false
126
+        try {
127
+            const entity = new TransitEntity()
128
+            entity.ServiceName = 'UtilService'
129
+            entity.FuncName = 'SaveFile'
130
+            entity.Parameters = {
131
+                '1': fileName,
132
+                '3': 'false'
133
+            }
132 134
 
133
-      const data = new AttachFile()
134
-      data.AttachIndex = '2'
135
-      data.AttachType = 'ByteType'
136
-      data.AttachValue = new Uint8Array(0)
137
-      entity.AttachFiles.push(data)
135
+            const data = new AttachFile()
136
+            data.AttachIndex = '2'
137
+            data.AttachType = 'ByteType'
138
+            data.AttachValue = new Uint8Array(0)
139
+            entity.AttachFiles.push(data)
138 140
 
139
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity)
140
-      if (tmpresult && tmpresult.length === 1) {
141
-        result = tmpresult[0].AttachValue as boolean
142
-      }
143
-    } catch (e) {
144
-      throw e
141
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
142
+            if (tmpresult && tmpresult.length === 1) {
143
+                result = tmpresult[0].AttachValue as boolean
144
+            }
145
+        } catch (e) {
146
+            throw e
147
+        }
148
+        return result
145 149
     }
146
-    return result
147
-  }
148 150
 
149
-  /**
150
-   * 检查交易
151
-   */
152
-  static async Check(inf: CheckInfo): Promise<CheckResult | null> {
153
-    let result: CheckResult | null = null
154
-    try {
155
-      const entity = new TransitEntity()
156
-      entity.ServiceName = 'TradeService'
157
-      entity.FuncName = 'Check'
151
+    /**
152
+     * 检查交易
153
+     */
154
+    static async Check(inf: CheckInfo): Promise<CheckResult | null> {
155
+        let result: CheckResult | null = null
156
+        try {
157
+            const entity = new TransitEntity()
158
+            entity.ServiceName = 'TradeService'
159
+            entity.FuncName = 'Check'
158 160
 
159
-      const data = new AttachFile()
160
-      data.AttachIndex = '1'
161
-      data.AttachType = 'TableType'
162
-      data.AttachValue = Platform.CommonFunction.ChangeEntityToTable([inf])
163
-      entity.AttachFiles.push(data)
161
+            const data = new AttachFile()
162
+            data.AttachIndex = '1'
163
+            data.AttachType = 'TableType'
164
+            data.AttachValue = CommonFunction.ChangeEntityToTable([inf])
165
+            entity.AttachFiles.push(data)
164 166
 
165
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity)
166
-      if (tmpresult && tmpresult.length === 1) {
167
-        const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<CheckResult>(
168
-          tmpresult[0].AttachValue as DataTable
169
-        )
170
-        if (rmpresult.length > 0) {
171
-          result = rmpresult[0]
167
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
168
+            if (tmpresult && tmpresult.length === 1) {
169
+                const rmpresult = CommonFunction.ChangeTableToEntitys<CheckResult>(
170
+                    tmpresult[0].AttachValue as DataTable
171
+                )
172
+                if (rmpresult.length > 0) {
173
+                    result = rmpresult[0]
174
+                }
175
+            }
176
+        } catch (e) {
177
+            throw e
172 178
         }
173
-      }
174
-    } catch (e) {
175
-      throw e
179
+        return result
176 180
     }
177
-    return result
178
-  }
179 181
 
180
-  /**
181
-   * 复核操作
182
-   */
183
-  static async Super(
184
-    serialId: string, 
185
-    SuperId: string, 
186
-    taskid: string, 
187
-    stat: number, 
188
-    TellerNo: string, 
189
-    tradedata: Record<string, string>, 
190
-    pagedata: Uint8Array,
191
-    refuseReason: string
192
-  ): Promise<boolean> {
193
-    let result = false
194
-    try {
195
-      const entity = new TransitEntity()
196
-      entity.ServiceName = 'TradeService'
197
-      entity.FuncName = 'Super'
198
-      entity.Parameters = { 
199
-        '1': serialId, 
200
-        '2': SuperId, 
201
-        '3': taskid, 
202
-        '4': stat.toString(), 
203
-        '5': TellerNo, 
204
-        '6': Platform.CommonFunction.ChangeDicToStr(tradedata),
205
-        '8': refuseReason
206
-      }
182
+    /**
183
+     * 复核操作
184
+     */
185
+    static async Super(
186
+        serialId: string,
187
+        SuperId: string,
188
+        taskid: string,
189
+        stat: number,
190
+        TellerNo: string,
191
+        tradedata: Record<string, string>,
192
+        pagedata: Uint8Array,
193
+        refuseReason: string
194
+    ): Promise<boolean> {
195
+        let result = false
196
+        try {
197
+            const entity = new TransitEntity()
198
+            entity.ServiceName = 'TradeService'
199
+            entity.FuncName = 'Super'
200
+            entity.Parameters = {
201
+                '1': serialId,
202
+                '2': SuperId,
203
+                '3': taskid,
204
+                '4': stat.toString(),
205
+                '5': TellerNo,
206
+                '6': CommonFunction.ChangeDicToStr(tradedata),
207
+                '8': refuseReason
208
+            }
207 209
 
208
-      const data = new AttachFile()
209
-      data.AttachIndex = '7'
210
-      data.AttachType = 'ByteType'
211
-      data.AttachValue = pagedata
212
-      entity.AttachFiles.push(data)
210
+            const data = new AttachFile()
211
+            data.AttachIndex = '7'
212
+            data.AttachType = 'ByteType'
213
+            data.AttachValue = pagedata
214
+            entity.AttachFiles.push(data)
213 215
 
214
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity)
215
-      if (tmpresult && tmpresult.length === 1) {
216
-        result = tmpresult[0].AttachValue as boolean
217
-      }
218
-    } catch (e) {
219
-      throw e
216
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
217
+            if (tmpresult && tmpresult.length === 1) {
218
+                result = tmpresult[0].AttachValue as boolean
219
+            }
220
+        } catch (e) {
221
+            throw e
222
+        }
223
+        return result
220 224
     }
221
-    return result
222
-  }
223 225
 
224
-  /**
225
-   * 授权验证操作
226
-   */
227
-  static async DoAuth(auth: string, pwd: string, lvl: string | null): Promise<AuthResult | null> {
228
-    let result: AuthResult | null = null
229
-    try {
230
-      const entity = new TransitEntity()
231
-      entity.ServiceName = 'TradeService'
232
-      entity.FuncName = 'DoAuth'
233
-      entity.Parameters = { 
234
-        '1': auth, 
235
-        '2': pwd, 
236
-        '3': lvl || '' 
237
-      }
226
+    /**
227
+     * 授权验证操作
228
+     */
229
+    static async DoAuth(auth: string, pwd: string, lvl: string | null): Promise<AuthResult | null> {
230
+        let result: AuthResult | null = null
231
+        try {
232
+            const entity = new TransitEntity()
233
+            entity.ServiceName = 'TradeService'
234
+            entity.FuncName = 'DoAuth'
235
+            entity.Parameters = {
236
+                '1': auth,
237
+                '2': pwd,
238
+                '3': lvl || ''
239
+            }
238 240
 
239
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity)
240
-      if (tmpresult && tmpresult.length === 1) {
241
-        const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<AuthResult>(
242
-          tmpresult[0].AttachValue as DataTable
243
-        )
244
-        if (rmpresult.length > 0) {
245
-          result = rmpresult[0]
241
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
242
+            if (tmpresult && tmpresult.length === 1) {
243
+                const rmpresult = CommonFunction.ChangeTableToEntitys<AuthResult>(
244
+                    tmpresult[0].AttachValue as DataTable
245
+                )
246
+                if (rmpresult.length > 0) {
247
+                    result = rmpresult[0]
248
+                }
249
+            }
250
+        } catch (e) {
251
+            throw e
246 252
         }
247
-      }
248
-    } catch (e) {
249
-      throw e
253
+        return result
250 254
     }
251
-    return result
252
-  }
253 255
 }
254 256
 
255 257
 interface CheckInfo {
256
-  // ... 检查信息字段
258
+    // ... 检查信息字段
257 259
 }
258 260
 
259 261
 interface CheckResult {
260
-  // ... 检查结果字段
262
+    // ... 检查结果字段
261 263
 }
262 264
 
263 265
 interface AuthResult {
264
-  // ... 授权结果字段
266
+    // ... 授权结果字段
265 267
 }
266 268
 
267 269
 interface AskSuperInfo {
268
-  // ... 申请复核信息字段
270
+    // ... 申请复核信息字段
269 271
 }
270 272
 
271 273
 interface AskAuthInfo {
272
-  // ... 申请授权信息字段
274
+    // ... 申请授权信息字段
273 275
 }
274 276
 
275 277
 interface PageData {
276
-  datas: Uint8Array
277
-  dataslength: number
278
-  // ... 其他字段
278
+    datas: Uint8Array
279
+    dataslength: number
280
+    // ... 其他字段
279 281
 }
280 282
 
281 283
 interface AuthTransRecords {
282
-  // ... 授权交易记录字段
283
-}
284
+    // ... 授权交易记录字段
285
+}

+ 30
- 30
ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/ServiceSettings.ts View File

@@ -112,26 +112,39 @@ class ServiceSettings {
112 112
 
113 113
     private static _SysConfig_: TT_SysConfig[] = TradeManagerHandle.GetSysconfigList("");
114 114
 
115
-    /**
116
-     * 获取服务端配置项,TT_Sysconfig
117
-     */
118
-    static GetConfig(id: string, defV: string = ''): string {
119
-        // 设计时不执行
120
-        // 由于 TypeScript 环境没有类似 WPF 的设计时模式,这里暂时注释掉
121
-        // if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject())) return defV;
122
-        const item = this._SysConfig_.find(x => x.Configid === id || x.Configname === id);
123
-        // 找到配置项,返回
124
-        if (item) return item.Configvalue;
125
-        // 数据库未配置的情况,以 System 配置文件为准
126
-        const value = ConfigManager.GetInstance().GetConfigValue(id, ConfigType.System);
127
-        if (value) return value;
128
-        return defV;
115
+    // static _SysConfig_: { Configid: string; Configname: string; Configvalue: string }[] = [];
116
+    static GetConfig(id: string, defV: number): number;
117
+    static GetConfig(id: string, defV: boolean): boolean;
118
+    static GetConfig(id: string, defV: string): string;
119
+    static GetConfig<T>(id: string, defV?: T): T;
120
+
121
+    // 函数实现
122
+    static GetConfig<T>(id: string, defV?: T): T {
123
+        if (typeof defV === 'number') {
124
+            const value = this.GetConfig(id, '');
125
+            const v = parseInt(value, 10);
126
+            return isNaN(v) ? defV : v as unknown as T;
127
+        } else if (typeof defV === 'boolean') {
128
+            const value = this.GetConfig(id, '');
129
+            return value.toLowerCase() === 'true' ? true as unknown as T : false as unknown as T;
130
+        } else {
131
+            // 设计时不执行
132
+            // 由于 TypeScript 环境没有类似 WPF 的设计时模式,这里暂时注释掉 hulei
133
+            // if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject())) return defV;
134
+            const item = this._SysConfig_.find(x => x.Configid === id || x.Configname === id);
135
+            // 找到配置项,返回
136
+            if (item) return item.Configvalue as unknown as T;
137
+            // 数据库未配置的情况,以 System 配置文件为准
138
+            const value = ConfigManager.GetInstance().GetConfigValue(id, ConfigType.System);
139
+            if (value) return value as unknown as T;
140
+            return defV as T;
141
+        }
129 142
     }
130 143
 
131 144
     /**
132 145
      * 获取参数集合
133 146
      */
134
-    static GetConfigList(prefix: string): { [key: string]: string } {
147
+    static GetConfigList(prefix?: string): { [key: string]: string } {
135 148
         if (!prefix) return {};
136 149
         // 优先匹配 id
137 150
         const dict = this._SysConfig_.filter(x => x.Configid.startsWith(prefix)).reduce((acc, x) => {
@@ -145,20 +158,7 @@ class ServiceSettings {
145 158
         }, {} as { [key: string]: string });
146 159
     }
147 160
 
148
-    static GetConfig(id: string, defV: number): number;
149
-    static GetConfig(id: string, defV: boolean): boolean;
150
-    static GetConfig<T>(id: string, defV?: T): T {
151
-        if (typeof defV === 'number') {
152
-            const value = this.GetConfig(id, '');
153
-            const v = parseInt(value, 10);
154
-            return isNaN(v) ? defV : v as unknown as T;
155
-        } else if (typeof defV === 'boolean') {
156
-            const value = this.GetConfig(id, '');
157
-            return value.toLowerCase() === 'true' ? true : false as unknown as T;
158
-        } else {
159
-            return this.GetConfig(id, defV as string) as unknown as T;
160
-        }
161
-    }
161
+
162 162
 
163 163
     /**
164 164
      * 是否登记打印数据
@@ -175,4 +175,4 @@ class ServiceSettings {
175 175
     }
176 176
 }
177 177
 
178
-export { ServiceSettings };
178
+export { ServiceSettings };

+ 66
- 19
ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/AuthHandle.ts View File

@@ -1,11 +1,18 @@
1 1
 // 模拟导入相关模块,需要根据实际情况调整
2
-import { RestClient } from './RestClient'; // 假设 RestClient 定义在此路径
3
-import { ServiceSettings } from './ServiceSettings'; // 假设 ServiceSettings 定义在此路径
4
-import { LoginUserInfo } from './LoginUserInfo'; // 假设 LoginUserInfo 定义在此路径
5
-import { GetTokenReq, TokenResult, ElementInfoResult, ApplyInfoReq, RmAuthResult, FlawTradeListResult, AuthHistoryInfoResult, FlawInfoReq } from './AuthEntity'; // 假设这些实体定义在此路径
6
-import { RSAUtil } from './RSAUtil'; // 假设 RSAUtil 定义在此路径
7
-import { PlatformLogger } from './PlatformLogger'; // 假设 PlatformLogger 定义在此路径
8
-
2
+import { RestClient } from '@/views/front/develop/ServiceProxy.Ext/WebAPI/RestClient'; // 假设 RestClient 定义在此路径
3
+import { ServiceSettings } from "@/views/front/develop/ServiceProxy.Ext/ServiceSettings"
4
+import LoginUserInfo from "@/views/front/platfrom/common/RunningParameters/LoginUserInfo";
5
+//import { RmAuthResult, FlawTradeListResult, AuthHistoryInfoResult, FlawInfoReq } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/"// 假设这些实体定义在此路径
6
+import { RSAUtil } from '@/views/front/develop/ServiceProxy.Ext/WebAPI/RSAUtil'; // 假设 RSAUtil 定义在此路径
7
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger"; //定义在此路径 hulei 日志登记还没有
8
+import GetTokenReq from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/GetTokenReq"
9
+import { TokenResult } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/TokenResult"
10
+import { ElementInfoResult } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/ElementInfoResult"
11
+import { ApplyInfoReq } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/ApplyInfoReq"
12
+import { RmAuthResult } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/RmAuthResult"
13
+import FlawTradeListResult from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/FlawTradeListResult"
14
+import { AuthHistoryInfoResult } from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/AuthHistoryInfoResult"
15
+import FlawInfoReq from "@/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/FlawInfoReq"
9 16
 export class AuthHandle {
10 17
     private static restClient: RestClient = new RestClient(ServiceSettings.AuthServiceUri);
11 18
     private static authSystemName: string = ServiceSettings.AuthSystemName;
@@ -37,38 +44,64 @@ export class AuthHandle {
37 44
     private static GetToken(): string {
38 45
         const req: GetTokenReq = new GetTokenReq();
39 46
         req.sysName = this.authSystemName;
40
-        req.secret = new RSAUtil(this.GetPublicKey()).Encrypt(this.authSystemSecret);
41
-        const result: TokenResult = this.restClient.Post<TokenResult>("auth/getToken", req);
47
+        req.secret = new RSAUtil(this.GetPublicKey()).encrypt(this.authSystemSecret);
48
+        let result: TokenResult = null
49
+        this.restClient.Post<TokenResult>("auth/getToken", req).then(x => {
50
+            result = x
51
+
52
+        });
42 53
         return result.accessToken;
43 54
     }
44 55
 
45 56
     private static GetPublicKey(): string {
46 57
         const para: { [key: string]: string } = {};
58
+        let result = "";
47 59
         para["sysName"] = this.authSystemName;
48
-        return this.restClient.Get<string>("auth/getPublicKey", para);
60
+        this.restClient.Get<string>("auth/getPublicKey", para).then(x => {
61
+            result = x;
62
+        });
63
+        return result;
49 64
     }
50 65
 
51 66
     public static GetRmAuthElementByMenu(menuCode: string, menuNo: string = "0"): ElementInfoResult {
52 67
         const para: { [key: string]: string } = {};
53 68
         para["menuCode"] = menuCode;
54 69
         para["menuNo"] = menuNo;
55
-        return this.restClient.Get<ElementInfoResult>("client/getRmAuthElementByMenu", para, this.AuthToken);
70
+        let result: ElementInfoResult = null;
71
+        this.restClient.Get<ElementInfoResult>("client/getRmAuthElementByMenu", para, this.AuthToken).then(x => {
72
+            result = x;
73
+        });
74
+        return result;
56 75
     }
57 76
 
58 77
     public static ApplyRmAuth(applyInfoReq: ApplyInfoReq): string {
59
-        return this.restClient.Post<string>("client/applyRmAuth", applyInfoReq, this.AuthToken);
78
+        let result = "";
79
+        this.restClient.Post<string>("client/applyRmAuth", applyInfoReq, this.AuthToken).then(x => {
80
+            result = x
81
+        });
82
+        return result;
60 83
     }
61 84
 
62 85
     public static GetRmAuthResultByRecord(rmAuthRecord: string): RmAuthResult {
86
+        let result: RmAuthResult = null;
63 87
         const para: { [key: string]: string } = {};
64 88
         para["rmAuthRecord"] = rmAuthRecord;
65
-        return this.restClient.Get<RmAuthResult>("client/getRmAuthResultByRecord", para, this.AuthToken);
89
+        this.restClient.Get<RmAuthResult>("client/getRmAuthResultByRecord", para, this.AuthToken).then(x => {
90
+            result = x
91
+
92
+        });
93
+        return result;
66 94
     }
67 95
 
68 96
     public static UndoRmAuth(rmAuthRecord: string): string {
97
+        let result = "";
69 98
         const para: { [key: string]: string } = {};
70 99
         para["rmAuthRecord"] = rmAuthRecord;
71
-        return this.restClient.Get<string>("client/undoRmAuth", para, this.AuthToken);
100
+        this.restClient.Get<string>("client/undoRmAuth", para, this.AuthToken).then(x => {
101
+            result = x
102
+
103
+        });
104
+        return result;
72 105
     }
73 106
 
74 107
     public static UploadFile(fileName: string, fileByte: Uint8Array): string {
@@ -76,7 +109,10 @@ export class AuthHandle {
76 109
         try {
77 110
             const startime = new Date().toISOString().replace(/[^0-9]/g, '');
78 111
             PlatformLogger.SystemInfo(`--------------------------start--${startime}::${fileName}------------------------`);
79
-            resultUploadeFile = this.restClient.UploadFile<string>("file/upload", fileName, fileByte, this.AuthToken);
112
+            this.restClient.UploadFile<string>("file/upload", fileName, fileByte, this.AuthToken).then(x => {
113
+                resultUploadeFile = x;
114
+
115
+            });
80 116
         } catch (e) {
81 117
             // 原代码未处理异常,这里保持原样
82 118
         }
@@ -96,18 +132,29 @@ export class AuthHandle {
96 132
     }
97 133
 
98 134
     public static GetFlawTradeList(): FlawTradeListResult[] {
135
+        let result = null;
99 136
         const para: { [key: string]: string } = {};
100 137
         para["userCode"] = this.tellerNo;
101
-        return this.restClient.Get<FlawTradeListResult[]>("record/getFlawTradeList", para, this.AuthToken);
138
+        this.restClient.Get<FlawTradeListResult[]>("record/getFlawTradeList", para, this.AuthToken).then(x => {
139
+
140
+            result = x
141
+        });
142
+        return result
102 143
     }
103 144
 
104 145
     public static GetHistoryInfo(recordCode: string): AuthHistoryInfoResult {
105 146
         const para: { [key: string]: string } = {};
147
+        let result: AuthHistoryInfoResult = null;
106 148
         para["recordCode"] = recordCode;
107
-        return this.restClient.Get<AuthHistoryInfoResult>("/client/getHistoryInfo", para, this.AuthToken);
149
+        this.restClient.Get<AuthHistoryInfoResult>("/client/getHistoryInfo", para, this.AuthToken).then(x => {
150
+            result = x;
151
+        });
152
+        return result;
108 153
     }
109 154
 
110 155
     public static AdditionalRmauthInfo(flawInfoReq: FlawInfoReq): string {
111
-        return this.restClient.Post<string>("record/additionalRmauthInfo", flawInfoReq, this.AuthToken);
156
+        let result = null;
157
+        this.restClient.Post<string>("record/additionalRmauthInfo", flawInfoReq, this.AuthToken);
158
+        return result
112 159
     }
113
-}
160
+}

+ 1
- 1
ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/Auth/Entity/TokenResult.ts View File

@@ -12,4 +12,4 @@ export interface TokenResult {
12 12
      * 刷新令牌,用于在访问令牌过期时获取新的访问令牌
13 13
      */
14 14
     refreshToken: string;
15
-}
15
+}

+ 28
- 26
ant-design-pro-vue3/src/views/front/develop/ServiceProxy.Ext/WebAPI/RestClient.ts View File

@@ -77,31 +77,33 @@ export class RestClient {
77 77
 
78 78
     // 基础文件上传请求
79 79
     private async uploadFileRequest(uri: string, fileName: string, fileByte: Uint8Array, token?: string): Promise<string> {
80
-        // 假设 ServiceSettings 存在,这里简单模拟
81
-        let serviceUrl = 'https://example.com/auth-file'; 
82
-        let formData = new FormData();
83
-        let blob = new Blob([fileByte], { type: 'application/octet-stream' });
84
-        formData.append('file', blob, fileName);
85
-
86
-        let config: AxiosRequestConfig = {
87
-            headers: {
88
-                'Content-Type': `multipart/form-data; boundary=${formData.getBoundary()}`
89
-            }
90
-        };
91
-
92
-        if (token) {
93
-            config.headers['Authorization'] = token;
94
-        }
95
-
96
-        try {
97
-            let response: AxiosResponse = await axios.post(serviceUrl, formData, config);
98
-            return response.data;
99
-        } catch (error) {
100
-            if (axios.isAxiosError(error) && error.code === 'ETIMEDOUT') {
101
-                throw new Error(error.message);
102
-            }
103
-            throw error;
104
-        }
80
+        // // 假设 ServiceSettings 存在,这里简单模拟
81
+        // let serviceUrl = 'https://example.com/auth-file'; 
82
+        // let formData = new FormData();
83
+        // let blob = new Blob([fileByte], { type: 'application/octet-stream' });
84
+        // formData.append('file', blob, fileName);
85
+
86
+        // let config: AxiosRequestConfig = {
87
+        //     headers: {
88
+        //         'Content-Type': `multipart/form-data; boundary=${formData.getBoundary()}`
89
+        //     }
90
+        // };
91
+
92
+        // if (token) {
93
+        //     config.headers['Authorization'] = token;
94
+        // }
95
+
96
+        // try {
97
+        //     let response: AxiosResponse = await axios.post(serviceUrl, formData, config);
98
+        //     return response.data;
99
+        // } catch (error) {
100
+        //     if (axios.isAxiosError(error) && error.code === 'ETIMEDOUT') {
101
+        //         throw new Error(error.message);
102
+        //     }
103
+        //     throw error;
104
+        // }
105
+        return "";
106
+        //hulei 与原文件实现逻辑不一样需要重写
105 107
     }
106 108
 
107 109
     // 结果处理
@@ -124,4 +126,4 @@ export class RestClient {
124 126
         }
125 127
         return url;
126 128
     }
127
-}
129
+}

+ 2
- 2
ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/EncrypDecryptHelper.ts View File

@@ -61,7 +61,7 @@ export default class EncrypDecryptHelper {
61 61
     private static _instance: EncrypDecryptHelper;
62 62
     private KEY = PlatformSettings.EncryptsKey;
63 63
     private defaultMode: Mode;
64
-    private publicKeyFileInfo = null;// new FileInfo('Devices/Cfca/Platform.PublicKey.sm2');//TODO:加密
64
+    private publicKeyFileInfo = null;// new FileInfo('Devices/Cfca/Platform.PublicKey.sm2');//hulei:加密
65 65
     private msgEncrypt: MsgEncryptionKitLib.CryptoAgent | null = null;
66 66
     private publicKey = '';
67 67
     private genSymKey = '';
@@ -111,7 +111,7 @@ export default class EncrypDecryptHelper {
111 111
         }
112 112
         return true;
113 113
     }
114
-    //TODO 加密方式
114
+    //hulei 加密方式
115 115
     static Encrypt(msgByte: Uint8Array<ArrayBuffer>, arg1: boolean): Uint8Array<ArrayBuffer> {
116 116
         throw new Error('Method not implemented.');
117 117
     }

+ 6
- 6
ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/EventAggregator.ts View File

@@ -1,8 +1,8 @@
1
-// 标记接口,用于标识实现了消息处理功能的类 TODO 注调了
1
+// 标记接口,用于标识实现了消息处理功能的类 hulei 注调了
2 2
 //interface IHandle {}
3 3
 
4 4
 // 泛型接口,用于处理特定类型的消息
5
-interface IHandle<TMessage> {//extends IHandle TODO 报错
5
+interface IHandle<TMessage> {//extends IHandle hulei 继承报错
6 6
     // 处理传入的消息
7 7
     Handle(message: TMessage): void;
8 8
 }
@@ -53,11 +53,11 @@ class EventAggregator implements IEventAggregator {
53 53
         }
54 54
     }
55 55
 
56
-    // 使用默认的线程调度器发布消息 TODO
56
+    // 使用默认的线程调度器发布消息 hulei
57 57
     public Publish(message: any): void {
58 58
         //this.Publish(message, this.PublicationThreadMarshaller);
59 59
     }
60
-    //TODO 线程消息发布订阅的模式是否ts中是否有其他的方式能实现
60
+    //hulei 线程消息发布订阅的模式是否ts中是否有其他的方式能实现
61 61
     //使用指定的线程调度器发布消息
62 62
     // public Publish(message: any, marshal: (action: () => void) => void): void {
63 63
     //     const toNotify = [...this.handlers];
@@ -82,11 +82,11 @@ class Handler {
82 82
 
83 83
     constructor(handler: any) {
84 84
         this.reference = new WeakRef(handler);
85
-        const handlerInfo = null;//(IHandle as any).prototype; TODO 这个IHandle
85
+        const handlerInfo = null;//(IHandle as any).prototype; hulei 这个IHandle
86 86
         const interfaces = Object.getPrototypeOf(handler).constructor
87 87
             .getInterfaces()
88 88
             .filter(x => x.prototype instanceof handlerInfo && x.typeParameters.length > 0);
89
-        // interfaces.forEach((@interface: any) => { TODO注掉了
89
+        // interfaces.forEach((@interface: any) => { hulei注掉了
90 90
         //     const type = @interface.typeParameters[0];
91 91
         //     const method = @interface.prototype.Handle;
92 92
         //     this.supportedHandlers.set(type, method.bind(handler));

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/BaseClasses/ObservableObject.ts View File

@@ -46,7 +46,7 @@ class ObservableObject {
46 46
     }
47 47
 
48 48
     // 创建响应式对象
49
-    createReactive<T extends object>(obj: T): object {//TODO这里由T泛型改为 object
49
+    createReactive<T extends object>(obj: T): object {//hulei这里由T泛型改为 object
50 50
         const reactiveObj = reactive(obj);
51 51
         // 监听所有属性的变化
52 52
         watch(() => Object.values(reactiveObj), () => {

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/Extensions/DependencyObjectExtensions.ts View File

@@ -82,7 +82,7 @@ function findVisualParent<T extends HTMLElement>(element: HTMLElement): T | null
82 82
         if (parent instanceof HTMLElement) {
83 83
             return parent as T;
84 84
         }
85
-        parent = null;//parent.parentElement;TODO VUE上有视觉树的概念吗?
85
+        parent = null;//parent.parentElement;hulei VUE上有视觉树的概念吗?
86 86
     }
87 87
     return null;
88 88
 }

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/common/BasicFunctions/Handles/EncryptAndDecryptHandle.ts View File

@@ -4,5 +4,5 @@ namespace Platform.Common.BasicFunctions {
4 4
     }
5 5
 }
6 6
 
7
-// 示例使用 TODO报错暂时先注释调
7
+// 示例使用 hulei 报错暂时先注释调
8 8
 //const result = Platform.Common.BasicFunctions.EncryptAndDecryptHandle;

+ 9
- 9
ant-design-pro-vue3/src/views/front/platfrom/common/LogSystem/LogWriter.ts View File

@@ -1,4 +1,4 @@
1
-//import { ILog, Level } from 'log4net'; // 假设 log4net 有对应的 TypeScript 定义//TODO日志信息可以先不登记
1
+//import { ILog, Level } from 'log4net'; // 假设 log4net 有对应的 TypeScript 定义//hulei 日志信息可以先不登记
2 2
 
3 3
 // 假设的 LoginUserInfo 类
4 4
 class LoginUserInfo {
@@ -24,8 +24,8 @@ class EncrypDecryptHelper {
24 24
 // 日志数据类
25 25
 class LogData {
26 26
     constructor(
27
-        //public LogObject: ILog,//TODO日志信息可以先不登记
28
-        //public LogLevel: Level,//TODO日志信息可以先不登记
27
+        //public LogObject: ILog,//hulei日志信息可以先不登记
28
+        //public LogLevel: Level,//hulei日志信息可以先不登记
29 29
         public Content: string,
30 30
         public TradeNo: string = null,
31 31
         public LogException: Error = null
@@ -34,13 +34,13 @@ class LogData {
34 34
         this.LogDate = new Date().toISOString().replace('T', ' ').substring(0, 19);
35 35
     }
36 36
 
37
-    //public LogObject: ILog;//TODO日志信息可以先不登记
38
-    //ublic LogLevel: Level;
37
+    //public LogObject: ILog;//hulei日志信息可以先不登记
38
+    // public LogLevel: Level;
39 39
     //public TradeNo: string;
40 40
     public LogDate: string;
41 41
     public TellerNo: string;
42
-    //public Content: string;
43
-    //public LogException: Error;
42
+    // public Content: string;
43
+    // public LogException: Error;
44 44
     public AttachData: any;
45 45
 }
46 46
 
@@ -94,11 +94,11 @@ class LogWriter {
94 94
             stringBuilder += msg;
95 95
             stringBuilder += 'End\n';
96 96
 
97
-            // this.SendToLog4net(target.LogObject, target.LogLevel, stringBuilder, null);//TODO日志信息可以先不登记
97
+            // this.SendToLog4net(target.LogObject, target.LogLevel, stringBuilder, null);//hulei 日志信息可以先不登记
98 98
         });
99 99
     }
100 100
 
101
-    private SendToLog4net(log: "", level: "", msg: any, exception: Error) {//TODO日志信息可以先不登记(log: ILog, level: Level, msg: any, exception: Error)
101
+    private SendToLog4net(log: "", level: "", msg: any, exception: Error) {//hulei日志信息可以先不登记(log: ILog, level: Level, msg: any, exception: Error)
102 102
         // switch (level.Name) {
103 103
         //     case 'DEBUG':
104 104
         //         log.Debug(msg, exception);

+ 151
- 126
ant-design-pro-vue3/src/views/front/platfrom/common/LogSystem/PlatformLogger.ts View File

@@ -1,156 +1,181 @@
1
-import winston from './winston'; //TODO这里日志记录使用了log4net.dll需要解决对应的方案 可以使用vuejs-logger来代替
2
-import LoginUserInfo from '../RunningParameters/LoginUserInfo'; // 假设 LoginUserInfo 定义在该文件中TODO:缺用户模块
3
-
1
+import winston from './winston'; //hulei这里日志记录使用了log4net.dll需要解决对应的方案 可以使用vuejs-logger来代替
2
+import LoginUserInfo from '../RunningParameters/LoginUserInfo'; // 假设 LoginUserInfo 定义在该文件中hulei:缺用户模块
3
+import { LogWriter } from "@/views/front/platfrom/common/LogSystem/LogWriter"
4 4
 // 假设 LogWriter 类的实现
5
-class LogWriter {
6
-    private static instance: LogWriter;
7
-    private logData: any[] = [];
5
+// class LogWriter {
6
+//     private static instance: LogWriter;
7
+//     private logData: any[] = [];
8 8
 
9
-    private constructor() { }
9
+//     private constructor() { }
10 10
 
11
-    public static get Instance() {
12
-        return this.instance || (this.instance = new this());
13
-    }
11
+//     public static get Instance() {
12
+//         return this.instance || (this.instance = new this());
13
+//     }
14 14
 
15
-    public AddLogData(data: any) {
16
-        this.logData.push(data);
17
-    }
15
+//     public AddLogData(data: any) {
16
+//         this.logData.push(data);
17
+//     }
18 18
 
19
-    public SaveLog() {
20
-        // 实现保存日志的逻辑
21
-    }
19
+//     public SaveLog() {
20
+//         // 实现保存日志的逻辑
21
+//     }
22
+// }
23
+const enum Enum {
24
+    A = 1,
25
+    B = A * 2,
22 26
 }
23
-
24
-// 定义日志记录器
25 27
 const lg1 = winston.createLogger("lg1");
26 28
 const lg2 = winston.createLogger("lg2");
27 29
 const lg3 = winston.createLogger("lg3");
28 30
 const lg4 = winston.createLogger("lg4");
29 31
 const lg5 = winston.createLogger("lg5");
32
+export default class PlatformLogger {
30 33
 
31
-// 日志文件开关状态
32
-const dics: { [key: string]: string } = {
33
-    'System.log': 'on',
34
-    'Debug.log': 'on',
35
-    'Message.log': 'on',
36
-    'Error.log': 'on',
37
-};
38
-
39
-// 创建连接
40
-function CreateConnection(tellerNo: string, tradeDate: string) {
41
-    // 实现创建连接的逻辑
42
-}
34
+    private static instance: LogWriter;
35
+    //     private logData: any[] = [];
43 36
 
44
-// 关闭连接
45
-function CloseConnection() {
46
-    // 实现关闭连接的逻辑
47
-}
37
+    //     private constructor() { }
48 38
 
49
-// 系统正常运行的输出日志
50
-export function SystemInfo(logDetail: string) {
51
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
52
-    LogWriter.Instance.AddLogData({ logger: lg1, level: 'debug', message: logDetail });
53
-    LogWriter.Instance.SaveLog();
54
-    CloseConnection();
55
-}
39
+    //     public static get Instance() {
40
+    //         return this.instance || (this.instance = new this());
41
+    //     }
56 42
 
57
-// 交易正常运行的输出日志
58
-export function TradeInfo(logDetail: string, tradeNum = '****') {
59
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
60
-    LogWriter.Instance.AddLogData({ logger: lg2, level: 'debug', message: logDetail, tradeNum });
61
-    LogWriter.Instance.SaveLog();
62
-    CloseConnection();
63
-}
43
+    //     public AddLogData(data: any) {
44
+    //         this.logData.push(data);
45
+    //     }
64 46
 
65
-// 交易异常的输出日志
66
-export function TradeErrorInfo(errMsg: string, ex: Error, tradeNum = '****') {
67
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
68
-    LogWriter.Instance.AddLogData({ logger: lg3, level: 'error', message: errMsg, tradeNum, ex });
69
-    LogWriter.Instance.SaveLog();
70
-    CloseConnection();
71
-}
47
+    //     public SaveLog() {
48
+    //         // 实现保存日志的逻辑
49
+    //     }
50
+    // 定义日志记录器
72 51
 
73
-// 普通异常(不属于交易异常)的输出日志
74
-export function SystemErrorInfo(errMsg: string, ex: Error) {
75
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
76
-    LogWriter.Instance.AddLogData({ logger: lg5, level: 'error', message: errMsg, ex });
77
-    LogWriter.Instance.SaveLog();
78
-    CloseConnection();
79
-}
80 52
 
81
-// 通讯内容的输出日志
82
-export function CommunicationInfo(msg: string, tradeNum = '****') {
83
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
84
-    LogWriter.Instance.AddLogData({ logger: lg4, level: 'debug', message: msg, tradeNum });
85
-    LogWriter.Instance.SaveLog();
86
-    CloseConnection();
87
-}
53
+    // 日志文件开关状态
54
+    // const dics: { [key: string]: string } = {
55
+    //     'System.log': 'on',
56
+    //     'Debug.log': 'on',
57
+    //     'Message.log': 'on',
58
+    //     'Error.log': 'on',
59
+    // };
60
+
61
+    // 创建连接
62
+    public static CreateConnection(tellerNo: string, tradeDate: string) {
63
+        // 实现创建连接的逻辑
64
+    }
65
+
66
+    // 关闭连接
67
+    public static CloseConnection() {
68
+        // 实现关闭连接的逻辑
69
+    }
70
+
71
+    // 系统正常运行的输出日志
72
+    public static SystemInfo(logDetail: string) {
73
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
74
+        // LogWriter.Instance.AddLogData({ Content: "", TradeNo: 'debug', TellerNo: "" });//hulei 先排除
75
+        LogWriter.Instance.SaveLog();
76
+        this.CloseConnection();
77
+    }
78
+
79
+    // 交易正常运行的输出日志
80
+    public static TradeInfo(logDetail: string, tradeNum = '****') {
81
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
82
+        // LogWriter.Instance.AddLogData({ logger: lg2, level: 'debug', message: logDetail, tradeNum });;//hulei 先排除
83
+        LogWriter.Instance.SaveLog();
84
+        this.CloseConnection();
85
+    }
86
+
87
+    // 交易异常的输出日志
88
+    public static TradeErrorInfo(errMsg: string, ex: Error, tradeNum = '****') {
89
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
90
+        // LogWriter.Instance.AddLogData({ logger: lg3, level: 'error', message: errMsg, tradeNum, ex });;//hulei 先排除
91
+        LogWriter.Instance.SaveLog();
92
+        this.CloseConnection();
93
+    }
94
+
95
+    // 普通异常(不属于交易异常)的输出日志
96
+    public static SystemErrorInfo(errMsg: string, ex: Error) {
97
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
98
+        // LogWriter.Instance.AddLogData({ logger: lg5, level: 'error', message: errMsg, ex });;//hulei 先排除
99
+        LogWriter.Instance.SaveLog();
100
+        this.CloseConnection();
101
+    }
88 102
 
89
-// 获取待上传的目录路径
90
-export function GetUploadDataPath(isChecked: boolean): string {
91
-    CloseConnection();
92
-    if (isChecked) {
93
-        if (CanbeSent(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate)) {
94
-            return GetBackUp();
103
+    // 通讯内容的输出日志
104
+    public static CommunicationInfo(msg: string, tradeNum = '****') {
105
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
106
+        // LogWriter.Instance.AddLogData({ logger: lg4, level: 'debug', message: msg, tradeNum });;//hulei 先排除
107
+        LogWriter.Instance.SaveLog();
108
+        this.CloseConnection();
109
+    }
110
+
111
+    // 获取待上传的目录路径
112
+    public static GetUploadDataPath(isChecked: boolean): string {
113
+        this.CloseConnection();
114
+        if (isChecked) {
115
+            if (this.CanbeSent(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate)) {
116
+                return this.GetBackUp();
117
+            }
118
+        } else {
119
+            return this.GetBackUp();
95 120
         }
96
-    } else {
97
-        return GetBackUp();
121
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
122
+        return '';
98 123
     }
99
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
100
-    return '';
101
-}
124
+    static CanbeSent(TellerNo: string, TradeDate: string): boolean {
125
+        return false;
102 126
 
103
-// 更改输出配置
104
-export function ChangeOutput() {
105
-    CloseConnection();
106
-    CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
107
-}
127
+    }
108 128
 
109
-// 判断日志文件是否满足上传条件
110
-function CanbeSent(path: string, tradeDate: string): boolean {
111
-    // 实现判断逻辑
112
-    return false;
113
-}
129
+    // 更改输出配置
130
+    public static ChangeOutput() {
131
+        this.CloseConnection();
132
+        this.CreateConnection(LoginUserInfo.TellerNo, LoginUserInfo.TradeDate);
133
+    }
114 134
 
115
-// 检查日志文件是否能写入
116
-function CheckSwitchOfFile(logger: "", dic: { [key: string]: string }) {//TODO(logger: winston.Logger, dic: { [key: string]: string })
117
-    // 实现检查逻辑
118
-}
135
+    // 判断日志文件是否满足上传条件
136
+    public static static(path: string, tradeDate: string): boolean {
137
+        // 实现判断逻辑
138
+        return false;
139
+    }
119 140
 
120
-// 获取日志文件的最近上传时间
121
-function GetLastSentTime(fInfo: any): Date {
122
-    // 实现获取时间逻辑
123
-    return new Date();
124
-}
141
+    // 检查日志文件是否能写入
142
+    public static CheckSwitchOfFile(logger: "", dic: { [key: string]: string }) {//hulei(logger: winston.Logger, dic: { [key: string]: string })
143
+        // 实现检查逻辑
144
+    }
125 145
 
126
-// 获取日志文件的大小
127
-function GetSizeOfFile(fInfo: any): number {
128
-    // 实现获取大小逻辑
129
-    return 0;
130
-}
131
-const enum Enum {
132
-    A = 1,
133
-    B = A * 2,
134
-}
135
-// 为指定的日志记录器添加输出文件
136
-function SetAppender(logger: "", appender: any) {//TODO(logger: winston.Logger, appender: any)
137
-    // 实现添加输出文件逻辑
138
-}
146
+    // 获取日志文件的最近上传时间
147
+    public static GetLastSentTime(fInfo: any): Date {
148
+        // 实现获取时间逻辑
149
+        return new Date();
150
+    }
139 151
 
140
-// 创建输出文件
141
-function CreateAppender(tellerNo: string, fileName: string): any {
142
-    // 实现创建输出文件逻辑
143
-    return {};
144
-}
152
+    // 获取日志文件的大小
153
+    public static GetSizeOfFile(fInfo: any): number {
154
+        // 实现获取大小逻辑
155
+        return 0;
156
+    }
145 157
 
146
-// 截屏函数
147
-function CutScreen(): string {
148
-    // 实现截屏逻辑
149
-    return '';
150
-}
158
+    // 为指定的日志记录器添加输出文件
159
+    public static SetAppender(logger: "", appender: any) {//hulei(logger: winston.Logger, appender: any)
160
+        // 实现添加输出文件逻辑
161
+    }
162
+
163
+    // 创建输出文件
164
+    public static CreateAppender(tellerNo: string, fileName: string): any {
165
+        // 实现创建输出文件逻辑
166
+        return {};
167
+    }
168
+
169
+    // 截屏函数
170
+    public static CutScreen(): string {
171
+        // 实现截屏逻辑
172
+        return '';
173
+    }
174
+
175
+    // 对待上传的目录进行备份,并返回目录路径
176
+    public static GetBackUp(): string {
177
+        // 实现备份逻辑
178
+        return '';
179
+    }
151 180
 
152
-// 对待上传的目录进行备份,并返回目录路径
153
-function GetBackUp(): string {
154
-    // 实现备份逻辑
155
-    return '';
156 181
 }

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/common/RunningParameters/LoginUserInfo.ts View File

@@ -38,7 +38,7 @@ export default class LoginUserInfo {
38 38
         return this.GetUserInfo<TradeModel[]>('TradeRight');
39 39
     }
40 40
 
41
-    // // 获取参数指定的缓存配置项 //TODO此处有两种方法 不能重载
41
+    // // 获取参数指定的缓存配置项 //hulei此处有两种方法 不能重载
42 42
     // static GetUserInfo(key: string): string {
43 43
     //     let ret = '';
44 44
     //     if (key && this._dict.hasOwnProperty(key)) {

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/controls/ControlsHelper/GridHelper.ts View File

@@ -27,7 +27,7 @@ class GridHelper {
27 27
         el.dataset.gridLineBrush = value;
28 28
     }
29 29
 
30
-    // 模拟 GridLoaded 方法 TODO 这里Grid.rows 报错 需要重构
30
+    // 模拟 GridLoaded 方法 hulei 这里Grid.rows 报错 需要重构
31 31
     static gridLoaded(grid: HTMLElement) {
32 32
         const children = Array.from(grid.children) as HTMLElement[];
33 33
         const rowCount = 1;//grid.rows ? grid.rows.length : 1;

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/controls/NumericContainer/CurrencyEditor.ts View File

@@ -10,7 +10,7 @@ interface CurrencyBase {
10 10
     onGotFocus?: (e: FocusEvent) => void;
11 11
     onLostFocus?: (e: FocusEvent) => void;
12 12
 }
13
-//TODO这里方法重复了需要处理
13
+// hulei这里方法重复了需要处理
14 14
 // 模拟 CurrencyBase 类
15 15
 class CurrencyBase {
16 16
     _initTxtLength: number = 0;

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenu.ts View File

@@ -60,7 +60,7 @@ class MultilevelMenu {
60 60
     public onOpenItem(callback: (leaf: MultilevelMenuItemLeaf) => void) {
61 61
         this.openItemEvent.push(callback);
62 62
     }
63
-    //TODO 后续在处理
63
+    //hulei 后续在处理
64 64
     // internal  raiseOpenItemEvent(leaf: MultilevelMenuItemLeaf) {
65 65
     //     this.openItemEvent.forEach(callback => callback(leaf));
66 66
     // }

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenuItemBase.ts View File

@@ -35,7 +35,7 @@ export class MultilevelMenuItemBase extends MenuItem {
35 35
 
36 36
     MultilevelMenu(): MultilevelMenu | null {
37 37
         let items: ItemsControl | null = this._parentItemsSource;
38
-        while (true) {//TODO 这里做了改动
38
+        while (true) {//hulei 这里做了改动
39 39
             // 这里无法完全模拟 ItemsControl.ItemsControlFromItemContainer 的逻辑
40 40
             // 简单假设 _parentItemsSource 已经指向上级 ItemsControl
41 41
             items = null;

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/controls/TableContainer/Menu/MultilevelMenuItemLeaf.ts View File

@@ -36,7 +36,7 @@ class MultilevelMenuItemLeaf extends MultilevelMenuItemBase {
36 36
     }
37 37
 
38 38
     OnPreviewMouseLeftButtonDown(e: any) {
39
-        //TODO缺少方法 原始文件中没有这个方法 这个是微软系统自带的方法需要业务重写
39
+        //hulei缺少方法 原始文件中没有这个方法 这个是微软系统自带的方法需要业务重写
40 40
         //super.OnPreviewMouseLeftButtonDown && super.OnPreviewMouseLeftButtonDown(e);
41 41
         this.RaiseRoutedEvent(e.OriginalSource as HTMLElement, MultilevelMenu.MouseLeftClickItemEvent);
42 42
     }

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusCheck/Adorner/FocusAdorner.ts View File

@@ -38,7 +38,7 @@ class DrawingContext {
38 38
 }
39 39
 
40 40
 class Rect {
41
-    constructor(public size: { width: number, height: number }) { }//TODO 将height由0改为number
41
+    constructor(public size: { width: number, height: number }) { }//hulei 将height由0改为number
42 42
 
43 43
     get TopLeft() { return { x: 0, y: 0 }; }
44 44
     get TopRight() { return { x: this.size.width, y: 0 }; }

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusCheck/FieldPolicy/ShowTipPolicy.ts View File

@@ -68,7 +68,7 @@ export class ShowTipPolicy implements IFieldPolicy {
68 68
 
69 69
             element.addEventListener('blur', this.OnLostFocus.bind(this));
70 70
 
71
-            if (element.tagName === 'INPUT') {// && element.type === 'text' TODO报错暂时注掉
71
+            if (element.tagName === 'INPUT') {// && element.type === 'text' hulei 报错暂时注掉
72 72
                 (element as HTMLInputElement).select();
73 73
             }
74 74
         }

+ 4
- 4
ant-design-pro-vue3/src/views/front/platfrom/presentation/FocusManagers/FocusManager.ts View File

@@ -5,7 +5,7 @@ import FocusList from "./FocusList";
5 5
 interface DependencyObject {
6 6
     // 可根据实际情况添加更多属性和方法
7 7
 }
8
-//微软系统框架 需要重新实现TODO
8
+//微软系统框架 需要重新实现 hulei
9 9
 interface FrameworkElement extends DependencyObject {
10 10
     // Focus(): boolean;
11 11
     // IsEnabled: boolean;
@@ -178,7 +178,7 @@ export default class FocusManager {
178 178
             // tmp.Ready -= this._target_Ready.bind(this);
179 179
         }
180 180
 
181
-        // this._focusList = FocusList.create(this._target);//TODO FrameworkElement 焦点控制先注释
181
+        // this._focusList = FocusList.create(this._target);//hulei FrameworkElement 焦点控制先注释
182 182
 
183 183
         if (!this._focusAdornerLayer) {
184 184
             this._focusAdornerLayer = {} as AdornerLayer;
@@ -202,7 +202,7 @@ export default class FocusManager {
202 202
         if (this._currentFocusedElement && (getAttachedProperty(this._target, "AutoFocus"))) {
203 203
             this.CurrentFocusedElement = this._currentFocusedElement;
204 204
         }
205
-        //TODO  || this._target.IsMouseOver) &&!this._target.IsKeyboardFocusWithin && this._currentFocusedElement.Focus() //TODO 没有FrameworkElement IsMouseOver方法
205
+        //hulei  || this._target.IsMouseOver) &&!this._target.IsKeyboardFocusWithin && this._currentFocusedElement.Focus() //hulei 没有FrameworkElement IsMouseOver方法
206 206
         // if (this._currentFocusedElement &&
207 207
         //     this._currentFocusedElement.IsFocused &&
208 208
         //     !this.IsEnableFocus(this._currentFocusedElement) &&
@@ -248,7 +248,7 @@ export default class FocusManager {
248 248
         } else {
249 249
             let targetElement = this._currentFocusedElement;
250 250
             if (this._focusList && targetElement) {
251
-                const index = 100;// this._focusList.IndexOf(targetElement);//TODO
251
+                const index = 100;// this._focusList.IndexOf(targetElement);//hulei 默认给100
252 252
                 switch (navigation) {
253 253
                     case FocusNavigation.Top:
254 254
                         this.ReSetFocus();

+ 3
- 2
ant-design-pro-vue3/src/views/front/platfrom/presentation/Interfaces/Ipage.ts View File

@@ -4,10 +4,11 @@ interface Disposable {
4 4
 }
5 5
 
6 6
 // 假设 PageContainer 类型定义
7
-class PageContainer {}
7
+class PageContainer { }
8 8
 
9 9
 // 定义 IPage 接口
10 10
 export interface IPage extends Disposable {
11
+    GetTradeInfoData(): unknown;
11 12
     /**
12 13
      * 实例化ID
13 14
      */
@@ -39,4 +40,4 @@ export interface IPage extends Disposable {
39 40
      * 释放资源
40 41
      */
41 42
     dispose(): void;
42
-}
43
+}

+ 7
- 6
ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/CommonFunction.ts View File

@@ -1,9 +1,10 @@
1 1
 // 假设 IEntity 接口定义如下
2
-interface IEntity {
3
-    ChangeToTable(): string[];
4
-    ChangeFromTable(parms: any[]): void;
5
-}
6
-
2
+// interface IEntity {
3
+//     ChangeToTable(): string[];
4
+//     ChangeFromTable(parms: any[]): void;
5
+// }
6
+//IEntity
7
+import { IEntity } from "@/views/front/platfrom/serviceproxy/ServiceFunction/Interfaces/IEntity"
7 8
 class CommonFunction {
8 9
     static enqualSign = "&&"; // 行分隔符
9 10
     static splitSign = "##"; // 列分隔符
@@ -124,4 +125,4 @@ class CommonFunction {
124 125
     }
125 126
 }
126 127
 
127
-export default CommonFunction;
128
+export default CommonFunction;

+ 1
- 1
ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceFunction/MsgHandle/MessageHandle.ts View File

@@ -263,7 +263,7 @@ class MessageHandle {
263 263
                             //     const rowData = Array.from(fields).map(field => field.textContent);
264 264
                             //     dataTable.push(rowData);
265 265
                             // }
266
-                            //TODO报错了待解决
266
+                            // hulei报错了待解决
267 267
                         }
268 268
                         attachfile.AttachValue = dataTable;
269 269
                     }

+ 5
- 5
ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/FilesHandle.ts View File

@@ -139,7 +139,7 @@ export default class FilesHandle {
139 139
                     let i = 0;
140 140
                     for (const tmp of tradeReturn) {
141 141
                         tmp.Filedata = new Array(tmp.FiledataLength);
142
-                        // tmp.Filedata.set(tmpresult[1].AttachValue.slice(i, i + tmp.FiledataLength));TODO
142
+                        // tmp.Filedata.set(tmpresult[1].AttachValue.slice(i, i + tmp.FiledataLength));hulei 报错
143 143
                         i += tmp.FiledataLength;
144 144
                     }
145 145
                 }
@@ -164,7 +164,7 @@ export default class FilesHandle {
164 164
             if (tmpresult && tmpresult.length === 1) {
165 165
                 const serverMd5 = tmpresult[0].AttachValue as string;
166 166
                 const fileInfo = new FileHandle();
167
-                const localMd5 = "";// fileInfo.GetFileMD5(localFilePath);//微软自带的fileInfo TODO
167
+                const localMd5 = "";// fileInfo.GetFileMD5(localFilePath);//微软自带的fileInfo hulei
168 168
                 result = localMd5.toUpperCase() === serverMd5.toUpperCase();
169 169
             }
170 170
         } catch (e) {
@@ -188,7 +188,7 @@ export default class FilesHandle {
188 188
             if (localFile) {
189 189
                 const files = await this.GetUsedFilesInfo(`/${PlatformSettings.PagesDirectory}`, fileName, '1');
190 190
                 if (files.length === 1) {
191
-                    const localMd5 = "";// localFile.GetFileMD5(localFilePath);////微软自带的fileInfo TODO
191
+                    const localMd5 = "";// localFile.GetFileMD5(localFilePath);////微软自带的fileInfo hulei
192 192
                     const serverMd5 = files[0].Md5;
193 193
                     if (localMd5.toUpperCase() === serverMd5.toUpperCase()) {
194 194
                         this.UpdateAssemblys[actionName] = false;
@@ -202,7 +202,7 @@ export default class FilesHandle {
202 202
 
203 203
             const data = await this.GetDllFile(fileName, `/${PlatformSettings.PagesDirectory}`);
204 204
             if (data) {
205
-                result = true;// localFile.SaveFile(localFilePath, data, false);//localFile TODO
205
+                result = true;// localFile.SaveFile(localFilePath, data, false);//localFile hulei报错了
206 206
                 this.UpdateAssemblys[actionName] = true;
207 207
             }
208 208
         } catch (e) {
@@ -326,7 +326,7 @@ export default class FilesHandle {
326 326
                 while (offset < len) {
327 327
                     const lens = len - offset > size ? size : len - offset;
328 328
                     const result = await this.GetFileBlock(serverFilePath, offset, lens);
329
-                    //tradeReturn.set(result, offset);TODO
329
+                    //tradeReturn.set(result, offset);hulei 报错了
330 330
                     offset += size;
331 331
                 }
332 332
             }

+ 2
- 2
ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/InitializeHandle.ts View File

@@ -6,7 +6,7 @@ import FilesHandle from '../ServiceHelper/FilesHandle'
6 6
 
7 7
 //import { CommonParames, TradeParames } from '../../Common/RunningParameters/CommonParames';
8 8
 
9
-// 假设这些类型和方法在其他文件中定义 TODO 
9
+// 假设这些类型和方法在其他文件中定义 hulei 
10 10
 // interface TransitEntity {
11 11
 //     ServiceName: string;
12 12
 //     FuncName: string;
@@ -37,7 +37,7 @@ namespace TradeParames {
37 37
 export class InitializeHandle {
38 38
     static async InitMsgFormat() {
39 39
         if (!TradeParames.MsgFormat) {
40
-            // TradeParames.MsgFormat = await this.GetMessageFormatMap();//TODO
40
+            // TradeParames.MsgFormat = await this.GetMessageFormatMap();//hulei
41 41
         }
42 42
     }
43 43
 

+ 319
- 319
ant-design-pro-vue3/src/views/front/platfrom/serviceproxy/ServiceHelper/TradeHandle.ts View File

@@ -3,15 +3,15 @@ import axios from 'axios';
3 3
 // 假设这些类型在其他文件中定义
4 4
 type Transit = string;
5 5
 type AttachFile = {
6
-  AttachIndex: string;
7
-  AttachType: string;
8
-  AttachValue: any;
6
+    AttachIndex: string;
7
+    AttachType: string;
8
+    AttachValue: any;
9 9
 };
10 10
 type TransitEntity = {
11
-  ServiceName: string;
12
-  FuncName: string;
13
-  Parameters: { [key: string]: string };
14
-  AttachFiles: AttachFile[];
11
+    ServiceName: string;
12
+    FuncName: string;
13
+    Parameters: { [key: string]: string };
14
+    AttachFiles: AttachFile[];
15 15
 };
16 16
 type TradeInfo = any;
17 17
 type IsAuthResult = any;
@@ -19,355 +19,355 @@ type AuthResult = any;
19 19
 type AuthCondInf = any;
20 20
 
21 21
 // 假设 ServiceManager 封装了 HTTP 请求逻辑
22
-class ServiceManager {
23
-  private static instance: ServiceManager;
22
+export default class ServiceManager {
23
+    private static instance: ServiceManager;
24 24
 
25
-  private constructor() {}
25
+    private constructor() { }
26 26
 
27
-  public static GetInstance(): ServiceManager {
28
-    if (!this.instance) {
29
-      this.instance = new ServiceManager();
27
+    public static GetInstance(): ServiceManager {
28
+        if (!this.instance) {
29
+            this.instance = new ServiceManager();
30
+        }
31
+        return this.instance;
30 32
     }
31
-    return this.instance;
32
-  }
33 33
 
34
-  public async Commit(entity: TransitEntity): Promise<AttachFile[]> {
35
-    try {
36
-      const response = await axios.post('/api/service', entity);
37
-      return response.data as AttachFile[];
38
-    } catch (error) {
39
-      throw error;
34
+    public async Commit(entity: TransitEntity): Promise<AttachFile[]> {
35
+        try {
36
+            const response = await axios.post('/api/service', entity);
37
+            return response.data as AttachFile[];
38
+        } catch (error) {
39
+            throw error;
40
+        }
40 41
     }
41
-  }
42 42
 }
43 43
 
44 44
 // 假设这些常量和函数在其他文件中定义
45 45
 const CommonParames = {
46
-  TempFilePath: '',
47
-  Coding: 'utf-8'
46
+    TempFilePath: '',
47
+    Coding: 'utf-8'
48 48
 };
49 49
 const FilesHandle = {
50
-  GetFileData: async (filePath: string): Promise<Uint8Array> => {
51
-    try {
52
-      const response = await axios.get(filePath, { responseType: 'arraybuffer' });
53
-      return new Uint8Array(response.data);
54
-    } catch (error) {
55
-      throw error;
50
+    GetFileData: async (filePath: string): Promise<Uint8Array> => {
51
+        try {
52
+            const response = await axios.get(filePath, { responseType: 'arraybuffer' });
53
+            return new Uint8Array(response.data);
54
+        } catch (error) {
55
+            throw error;
56
+        }
56 57
     }
57
-  }
58 58
 };
59 59
 const CommonFunction = {
60
-  ChangeEntityTable: <TIn, TOut>(input: TIn): TOut => {
61
-    // 这里需要根据实际逻辑实现转换
62
-    return {} as TOut;
63
-  },
64
-  ChangStrToArray: (str: string): string[] => {
65
-    return str.split(',');
66
-  }
60
+    ChangeEntityTable: <TIn, TOut>(input: TIn): TOut => {
61
+        // 这里需要根据实际逻辑实现转换
62
+        return {} as TOut;
63
+    },
64
+    ChangStrToArray: (str: string): string[] => {
65
+        return str.split(',');
66
+    }
67 67
 };
68 68
 
69 69
 export class TradeHandle {
70
-  public static async DoTrade(
71
-    transit: Transit,
72
-    integrateData: Uint8Array,
73
-    kinBrno: string,
74
-    fileName: string,
75
-    fileFlag: boolean,
76
-    args: any[]
77
-  ): Promise<Uint8Array | null> {
78
-    let result: Uint8Array | null = null;
79
-    try {
80
-      const entity: TransitEntity = {
81
-        ServiceName: 'TradeService',
82
-        FuncName: 'DoTradeByTransit',
83
-        Parameters: {
84
-          '1': transit.toString(),
85
-          '3': kinBrno,
86
-          '4': fileName,
87
-          '5': fileFlag.toString(),
88
-          '6': ''
89
-        },
90
-        AttachFiles: []
91
-      };
92
-      const data: AttachFile = {
93
-        AttachIndex: '2',
94
-        AttachType: 'ByteType',
95
-        AttachValue: integrateData
96
-      };
97
-      entity.AttachFiles.push(data);
98
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
99
-      if (tmpresult && tmpresult.length === 1) {
100
-        result = tmpresult[0].AttachValue as Uint8Array;
101
-      }
102
-    } catch (error) {
103
-      throw error;
70
+    public static async DoTrade(
71
+        transit: Transit,
72
+        integrateData: Uint8Array,
73
+        kinBrno: string,
74
+        fileName: string,
75
+        fileFlag: boolean,
76
+        args: any[]
77
+    ): Promise<Uint8Array | null> {
78
+        let result: Uint8Array | null = null;
79
+        try {
80
+            const entity: TransitEntity = {
81
+                ServiceName: 'TradeService',
82
+                FuncName: 'DoTradeByTransit',
83
+                Parameters: {
84
+                    '1': transit.toString(),
85
+                    '3': kinBrno,
86
+                    '4': fileName,
87
+                    '5': fileFlag.toString(),
88
+                    '6': ''
89
+                },
90
+                AttachFiles: []
91
+            };
92
+            const data: AttachFile = {
93
+                AttachIndex: '2',
94
+                AttachType: 'ByteType',
95
+                AttachValue: integrateData
96
+            };
97
+            entity.AttachFiles.push(data);
98
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
99
+            if (tmpresult && tmpresult.length === 1) {
100
+                result = tmpresult[0].AttachValue as Uint8Array;
101
+            }
102
+        } catch (error) {
103
+            throw error;
104
+        }
105
+        return result;
104 106
     }
105
-    return result;
106
-  }
107 107
 
108
-  public static async GetTradeFile(fileName: string): Promise<Uint8Array | null> {
109
-    const filePath = CommonParames.TempFilePath + fileName + 'dhcc';
110
-    try {
111
-      return await FilesHandle.GetFileData(filePath);
112
-    } catch (error) {
113
-      throw error;
108
+    public static async GetTradeFile(fileName: string): Promise<Uint8Array | null> {
109
+        const filePath = CommonParames.TempFilePath + fileName + 'dhcc';
110
+        try {
111
+            return await FilesHandle.GetFileData(filePath);
112
+        } catch (error) {
113
+            throw error;
114
+        }
114 115
     }
115
-  }
116 116
 
117
-  public static async ClearvFile(fileName: string): Promise<boolean> {
118
-    const vfileName = CommonParames.TempFilePath + fileName;
119
-    let result = false;
120
-    try {
121
-      const entity: TransitEntity = {
122
-        ServiceName: 'UtilService',
123
-        FuncName: 'SaveFile',
124
-        Parameters: {
125
-          '1': fileName,
126
-          '3': false.toString()
127
-        },
128
-        AttachFiles: []
129
-      };
130
-      const data: AttachFile = {
131
-        AttachIndex: '2',
132
-        AttachType: 'ByteType',
133
-        AttachValue: new Uint8Array()
134
-      };
135
-      entity.AttachFiles.push(data);
136
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
137
-      if (tmpresult && tmpresult.length === 1) {
138
-        result = Boolean(tmpresult[0].AttachValue);
139
-      }
140
-    } catch (error) {
141
-      throw error;
117
+    public static async ClearvFile(fileName: string): Promise<boolean> {
118
+        const vfileName = CommonParames.TempFilePath + fileName;
119
+        let result = false;
120
+        try {
121
+            const entity: TransitEntity = {
122
+                ServiceName: 'UtilService',
123
+                FuncName: 'SaveFile',
124
+                Parameters: {
125
+                    '1': fileName,
126
+                    '3': false.toString()
127
+                },
128
+                AttachFiles: []
129
+            };
130
+            const data: AttachFile = {
131
+                AttachIndex: '2',
132
+                AttachType: 'ByteType',
133
+                AttachValue: new Uint8Array()
134
+            };
135
+            entity.AttachFiles.push(data);
136
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
137
+            if (tmpresult && tmpresult.length === 1) {
138
+                result = Boolean(tmpresult[0].AttachValue);
139
+            }
140
+        } catch (error) {
141
+            throw error;
142
+        }
143
+        return result;
142 144
     }
143
-    return result;
144
-  }
145 145
 
146
-  public static async Addvfile(fileName: string, fileContent: string): Promise<boolean> {
147
-    const vfileName = CommonParames.TempFilePath + fileName;
148
-    const data = new TextEncoder().encode(fileContent);
149
-    let result = false;
150
-    try {
151
-      const entity: TransitEntity = {
152
-        ServiceName: 'UtilService',
153
-        FuncName: 'SaveFile',
154
-        Parameters: {
155
-          '1': vfileName,
156
-          '3': true.toString()
157
-        },
158
-        AttachFiles: []
159
-      };
160
-      const attachdata: AttachFile = {
161
-        AttachIndex: '2',
162
-        AttachType: 'ByteType',
163
-        AttachValue: data
164
-      };
165
-      entity.AttachFiles.push(attachdata);
166
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
167
-      if (tmpresult && tmpresult.length === 1) {
168
-        result = Boolean(tmpresult[0].AttachValue);
169
-      }
170
-    } catch (error) {
171
-      throw error;
146
+    public static async Addvfile(fileName: string, fileContent: string): Promise<boolean> {
147
+        const vfileName = CommonParames.TempFilePath + fileName;
148
+        const data = new TextEncoder().encode(fileContent);
149
+        let result = false;
150
+        try {
151
+            const entity: TransitEntity = {
152
+                ServiceName: 'UtilService',
153
+                FuncName: 'SaveFile',
154
+                Parameters: {
155
+                    '1': vfileName,
156
+                    '3': true.toString()
157
+                },
158
+                AttachFiles: []
159
+            };
160
+            const attachdata: AttachFile = {
161
+                AttachIndex: '2',
162
+                AttachType: 'ByteType',
163
+                AttachValue: data
164
+            };
165
+            entity.AttachFiles.push(attachdata);
166
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
167
+            if (tmpresult && tmpresult.length === 1) {
168
+                result = Boolean(tmpresult[0].AttachValue);
169
+            }
170
+        } catch (error) {
171
+            throw error;
172
+        }
173
+        return result;
172 174
     }
173
-    return result;
174
-  }
175 175
 
176
-  public static async CheckAuth(inf: TradeInfo): Promise<IsAuthResult | null> {
177
-    let result: IsAuthResult | null = null;
178
-    try {
179
-      const entity: TransitEntity = {
180
-        ServiceName: 'TradeService',
181
-        FuncName: 'CheckAuth',
182
-        Parameters: {},
183
-        AttachFiles: []
184
-      };
185
-      const data: AttachFile = {
186
-        AttachIndex: '1',
187
-        AttachType: 'TableType',
188
-        AttachValue: CommonFunction.ChangeEntityTable<TradeInfo[], any>([inf])
189
-      };
190
-      entity.AttachFiles.push(data);
191
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
192
-      if (tmpresult && tmpresult.length === 1) {
193
-        const rmpresult = CommonFunction.ChangeEntityTable<any, IsAuthResult[]>(
194
-          tmpresult[0].AttachValue as any
195
-        );
196
-        result = rmpresult[0];
197
-      }
198
-    } catch (error) {
199
-      throw error;
176
+    public static async CheckAuth(inf: TradeInfo): Promise<IsAuthResult | null> {
177
+        let result: IsAuthResult | null = null;
178
+        try {
179
+            const entity: TransitEntity = {
180
+                ServiceName: 'TradeService',
181
+                FuncName: 'CheckAuth',
182
+                Parameters: {},
183
+                AttachFiles: []
184
+            };
185
+            const data: AttachFile = {
186
+                AttachIndex: '1',
187
+                AttachType: 'TableType',
188
+                AttachValue: CommonFunction.ChangeEntityTable<TradeInfo[], any>([inf])
189
+            };
190
+            entity.AttachFiles.push(data);
191
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
192
+            if (tmpresult && tmpresult.length === 1) {
193
+                const rmpresult = CommonFunction.ChangeEntityTable<any, IsAuthResult[]>(
194
+                    tmpresult[0].AttachValue as any
195
+                );
196
+                result = rmpresult[0];
197
+            }
198
+        } catch (error) {
199
+            throw error;
200
+        }
201
+        return result;
200 202
     }
201
-    return result;
202
-  }
203 203
 
204
-  public static async DoAuthByAuthno(authno: string): Promise<AuthResult | null> {
205
-    let result: AuthResult | null = null;
206
-    try {
207
-      const entity: TransitEntity = {
208
-        ServiceName: 'TradeService',
209
-        FuncName: 'DoAuthByAuthno',
210
-        Parameters: {
211
-          '1': authno
212
-        },
213
-        AttachFiles: []
214
-      };
215
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
216
-      if (tmpresult && tmpresult.length === 1) {
217
-        const rmpresult = CommonFunction.ChangeEntityTable<any, AuthResult[]>(
218
-          tmpresult[0].AttachValue as any
219
-        );
220
-        result = rmpresult[0];
221
-      }
222
-    } catch (error) {
223
-      throw error;
204
+    public static async DoAuthByAuthno(authno: string): Promise<AuthResult | null> {
205
+        let result: AuthResult | null = null;
206
+        try {
207
+            const entity: TransitEntity = {
208
+                ServiceName: 'TradeService',
209
+                FuncName: 'DoAuthByAuthno',
210
+                Parameters: {
211
+                    '1': authno
212
+                },
213
+                AttachFiles: []
214
+            };
215
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
216
+            if (tmpresult && tmpresult.length === 1) {
217
+                const rmpresult = CommonFunction.ChangeEntityTable<any, AuthResult[]>(
218
+                    tmpresult[0].AttachValue as any
219
+                );
220
+                result = rmpresult[0];
221
+            }
222
+        } catch (error) {
223
+            throw error;
224
+        }
225
+        return result;
224 226
     }
225
-    return result;
226
-  }
227 227
 
228
-  public static async DoAuthByAuth(
229
-    auth: string,
230
-    pwd: string,
231
-    lvl: string | null,
232
-    records: string
233
-  ): Promise<AuthResult | null> {
234
-    let result: AuthResult | null = null;
235
-    try {
236
-      const entity: TransitEntity = {
237
-        ServiceName: 'TradeService',
238
-        FuncName: 'DoAuthByAuth',
239
-        Parameters: {
240
-          '1': auth,
241
-          '2': pwd,
242
-          '3': lvl || '',
243
-          '4': records
244
-        },
245
-        AttachFiles: []
246
-      };
247
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
248
-      if (tmpresult && tmpresult.length === 1) {
249
-        const rmpresult = CommonFunction.ChangeEntityTable<any, AuthResult[]>(
250
-          tmpresult[0].AttachValue as any
251
-        );
252
-        result = rmpresult[0];
253
-      }
254
-    } catch (error) {
255
-      throw error;
228
+    public static async DoAuthByAuth(
229
+        auth: string,
230
+        pwd: string,
231
+        lvl: string | null,
232
+        records: string
233
+    ): Promise<AuthResult | null> {
234
+        let result: AuthResult | null = null;
235
+        try {
236
+            const entity: TransitEntity = {
237
+                ServiceName: 'TradeService',
238
+                FuncName: 'DoAuthByAuth',
239
+                Parameters: {
240
+                    '1': auth,
241
+                    '2': pwd,
242
+                    '3': lvl || '',
243
+                    '4': records
244
+                },
245
+                AttachFiles: []
246
+            };
247
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
248
+            if (tmpresult && tmpresult.length === 1) {
249
+                const rmpresult = CommonFunction.ChangeEntityTable<any, AuthResult[]>(
250
+                    tmpresult[0].AttachValue as any
251
+                );
252
+                result = rmpresult[0];
253
+            }
254
+        } catch (error) {
255
+            throw error;
256
+        }
257
+        return result;
256 258
     }
257
-    return result;
258
-  }
259 259
 
260
-  public static async CheckAuthBytxno(txno: string): Promise<number> {
261
-    let result = 0;
262
-    try {
263
-      const entity: TransitEntity = {
264
-        ServiceName: 'TradeService',
265
-        FuncName: 'CheckAuthBytxno',
266
-        Parameters: {
267
-          '1': txno
268
-        },
269
-        AttachFiles: []
270
-      };
271
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
272
-      if (tmpresult && tmpresult.length === 1) {
273
-        result = Number(tmpresult[0].AttachValue);
274
-      }
275
-    } catch (error) {
276
-      throw error;
260
+    public static async CheckAuthBytxno(txno: string): Promise<number> {
261
+        let result = 0;
262
+        try {
263
+            const entity: TransitEntity = {
264
+                ServiceName: 'TradeService',
265
+                FuncName: 'CheckAuthBytxno',
266
+                Parameters: {
267
+                    '1': txno
268
+                },
269
+                AttachFiles: []
270
+            };
271
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
272
+            if (tmpresult && tmpresult.length === 1) {
273
+                result = Number(tmpresult[0].AttachValue);
274
+            }
275
+        } catch (error) {
276
+            throw error;
277
+        }
278
+        return result;
277 279
     }
278
-    return result;
279
-  }
280 280
 
281
-  public static async Getuserlvl(txno: string): Promise<string | null> {
282
-    let result: string | null = null;
283
-    try {
284
-      const entity: TransitEntity = {
285
-        ServiceName: 'TradeService',
286
-        FuncName: 'Getuserlvl',
287
-        Parameters: {
288
-          '1': txno
289
-        },
290
-        AttachFiles: []
291
-      };
292
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
293
-      if (tmpresult && tmpresult.length === 1) {
294
-        result = tmpresult[0].AttachValue as string;
295
-      }
296
-    } catch (error) {
297
-      throw error;
281
+    public static async Getuserlvl(txno: string): Promise<string | null> {
282
+        let result: string | null = null;
283
+        try {
284
+            const entity: TransitEntity = {
285
+                ServiceName: 'TradeService',
286
+                FuncName: 'Getuserlvl',
287
+                Parameters: {
288
+                    '1': txno
289
+                },
290
+                AttachFiles: []
291
+            };
292
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
293
+            if (tmpresult && tmpresult.length === 1) {
294
+                result = tmpresult[0].AttachValue as string;
295
+            }
296
+        } catch (error) {
297
+            throw error;
298
+        }
299
+        return result;
298 300
     }
299
-    return result;
300
-  }
301 301
 
302
-  public static async AddAuthCond(
303
-    txcode: string,
304
-    authcondinf: AuthCondInf[]
305
-  ): Promise<boolean> {
306
-    let result = false;
307
-    try {
308
-      const entity: TransitEntity = {
309
-        ServiceName: 'TradeService',
310
-        FuncName: 'AddAuthCond',
311
-        Parameters: {
312
-          '1': txcode
313
-        },
314
-        AttachFiles: []
315
-      };
316
-      const data: AttachFile = {
317
-        AttachIndex: '2',
318
-        AttachType: 'TableType',
319
-        AttachValue: CommonFunction.ChangeEntityTable<AuthCondInf[], any>(authcondinf)
320
-      };
321
-      entity.AttachFiles.push(data);
322
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
323
-      if (tmpresult && tmpresult.length === 1) {
324
-        result = Boolean(tmpresult[0].AttachValue);
325
-      }
326
-    } catch (error) {
327
-      throw error;
302
+    public static async AddAuthCond(
303
+        txcode: string,
304
+        authcondinf: AuthCondInf[]
305
+    ): Promise<boolean> {
306
+        let result = false;
307
+        try {
308
+            const entity: TransitEntity = {
309
+                ServiceName: 'TradeService',
310
+                FuncName: 'AddAuthCond',
311
+                Parameters: {
312
+                    '1': txcode
313
+                },
314
+                AttachFiles: []
315
+            };
316
+            const data: AttachFile = {
317
+                AttachIndex: '2',
318
+                AttachType: 'TableType',
319
+                AttachValue: CommonFunction.ChangeEntityTable<AuthCondInf[], any>(authcondinf)
320
+            };
321
+            entity.AttachFiles.push(data);
322
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
323
+            if (tmpresult && tmpresult.length === 1) {
324
+                result = Boolean(tmpresult[0].AttachValue);
325
+            }
326
+        } catch (error) {
327
+            throw error;
328
+        }
329
+        return result;
328 330
     }
329
-    return result;
330
-  }
331 331
 
332
-  public static async GetAuthCondByTradecode(txcode: string): Promise<AuthCondInf[] | null> {
333
-    let result: AuthCondInf[] | null = null;
334
-    try {
335
-      const entity: TransitEntity = {
336
-        ServiceName: 'TradeService',
337
-        FuncName: 'GetAuthCondByTradecode',
338
-        Parameters: {
339
-          '1': txcode
340
-        },
341
-        AttachFiles: []
342
-      };
343
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
344
-      if (tmpresult && tmpresult.length === 1) {
345
-        result = CommonFunction.ChangeEntityTable<any, AuthCondInf[]>(
346
-          tmpresult[0].AttachValue as any
347
-        );
348
-      }
349
-    } catch (error) {
350
-      throw error;
332
+    public static async GetAuthCondByTradecode(txcode: string): Promise<AuthCondInf[] | null> {
333
+        let result: AuthCondInf[] | null = null;
334
+        try {
335
+            const entity: TransitEntity = {
336
+                ServiceName: 'TradeService',
337
+                FuncName: 'GetAuthCondByTradecode',
338
+                Parameters: {
339
+                    '1': txcode
340
+                },
341
+                AttachFiles: []
342
+            };
343
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
344
+            if (tmpresult && tmpresult.length === 1) {
345
+                result = CommonFunction.ChangeEntityTable<any, AuthCondInf[]>(
346
+                    tmpresult[0].AttachValue as any
347
+                );
348
+            }
349
+        } catch (error) {
350
+            throw error;
351
+        }
352
+        return result;
351 353
     }
352
-    return result;
353
-  }
354 354
 
355
-  public static async GetAuthLvls(): Promise<string[] | null> {
356
-    let result: string[] | null = null;
357
-    try {
358
-      const entity: TransitEntity = {
359
-        ServiceName: 'TradeService',
360
-        FuncName: 'GetAuthLvls',
361
-        Parameters: {},
362
-        AttachFiles: []
363
-      };
364
-      const tmpresult = await ServiceManager.GetInstance().Commit(entity);
365
-      if (tmpresult && tmpresult.length === 1) {
366
-        result = CommonFunction.ChangStrToArray(tmpresult[0].AttachValue as string);
367
-      }
368
-    } catch (error) {
369
-      throw error;
355
+    public static async GetAuthLvls(): Promise<string[] | null> {
356
+        let result: string[] | null = null;
357
+        try {
358
+            const entity: TransitEntity = {
359
+                ServiceName: 'TradeService',
360
+                FuncName: 'GetAuthLvls',
361
+                Parameters: {},
362
+                AttachFiles: []
363
+            };
364
+            const tmpresult = await ServiceManager.GetInstance().Commit(entity);
365
+            if (tmpresult && tmpresult.length === 1) {
366
+                result = CommonFunction.ChangStrToArray(tmpresult[0].AttachValue as string);
367
+            }
368
+        } catch (error) {
369
+            throw error;
370
+        }
371
+        return result;
370 372
     }
371
-    return result;
372
-  }
373
-}
373
+}

+ 0
- 283
ant-design-pro-vue3/src/views/front/serviceManager/TradeHandle.ts View File

@@ -1,283 +0,0 @@
1
-import { ref } from 'vue'
2
-import { message } from 'ant-design-vue'
3
-//import { ServiceManager } from './ServiceManager'
4
-//import { TransitEntity, AttachFile } from './ServiceEntitys'
5
-//import { Platform } from './Platform'
6
-
7
-export enum Transit {
8
-    CallServer = 'CallServer',
9
-    CallAgn = 'CallAgn',
10
-    CallTips = 'CallTips',
11
-    CallAgnPay = 'CallAgnPay',
12
-    CallAgnTIPS = 'CallAgnTIPS',
13
-    CallAgnSecdistruct = 'CallAgnSecdistruct',
14
-    CallAgnMobileBanking = 'CallAgnMobileBanking'
15
-}
16
-
17
-export class TradeHandle {
18
-    /**
19
-     * 获取8583域定义
20
-     */
21
-    static async GetFdItemMap(type: string): Promise<any> {
22
-        const table = {
23
-            Code: '',
24
-            Type: '',
25
-            Length: '',
26
-            DotLength: '',
27
-            Description: '',
28
-            FieldType: '',
29
-            MaxLength: ''
30
-        }
31
-
32
-        const entity = new TransitEntity()
33
-        entity.ServiceName = 'TradeService'
34
-        entity.FuncName = 'GetFdItemMap'
35
-        entity.Parameters = { '1': type }
36
-
37
-        const tmpresult = await ServiceManager.GetInstance().Commit(entity)
38
-        let data = null
39
-        if (tmpresult && tmpresult.length === 1) {
40
-            data = tmpresult[0].AttachValue as string
41
-        }
42
-
43
-        if (data) {
44
-            const lines = data.split('\n')
45
-            return lines.map(line => {
46
-                const rows = line.split('|')
47
-                return {
48
-                    ...table,
49
-                    Code: rows[0],
50
-                    Type: rows[1],
51
-                    Length: rows[2],
52
-                    DotLength: rows[3],
53
-                    Description: rows[4],
54
-                    FieldType: rows[5],
55
-                    MaxLength: rows[6]
56
-                }
57
-            })
58
-        }
59
-        return []
60
-    }
61
-
62
-    /**
63
-     * 按照参数指示与外端进行通讯交互
64
-     */
65
-    static async DoTrade(
66
-        transit: string,
67
-        integrateData: Uint8Array,
68
-        kinBrno: string,
69
-        fileName: string,
70
-        fileData: Uint8Array,
71
-        args: any[],
72
-        serialNo: string
73
-    ): Promise<Uint8Array[]> {
74
-        const result: Uint8Array[] = []
75
-        try {
76
-            const entity = new TransitEntity()
77
-            entity.ServiceName = 'TradeService'
78
-            entity.FuncName = 'DoTradeByTransit'
79
-            entity.Parameters = {
80
-                '1': transit,
81
-                '3': kinBrno,
82
-                '4': fileName,
83
-                '6': '',
84
-                '7': serialNo
85
-            }
86
-
87
-            const data = new AttachFile()
88
-            data.AttachIndex = '2'
89
-            data.AttachType = 'ByteType'
90
-            data.AttachValue = integrateData
91
-            entity.AttachFiles.push(data)
92
-
93
-            const data1 = new AttachFile()
94
-            data1.AttachIndex = '5'
95
-            data1.AttachType = 'ByteType'
96
-            data1.AttachValue = fileData
97
-            entity.AttachFiles.push(data1)
98
-
99
-            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
100
-            if (tmpresult) {
101
-                tmpresult.forEach(attachFile => {
102
-                    result.push(attachFile.AttachValue as Uint8Array)
103
-                })
104
-            }
105
-        } catch (e) {
106
-            throw e
107
-        }
108
-        return result
109
-    }
110
-
111
-    /**
112
-     * 获取交易返回的附件信息数据
113
-     */
114
-    static async GetTradeFile(fileName: string): Promise<Uint8Array> {
115
-        const filePath = ServiceSettings.TempFilePath + fileName + 'dhcc'
116
-        return FilesHandle.GetFileData(filePath)
117
-    }
118
-
119
-    /**
120
-     * 清空交易附件信息
121
-     */
122
-    static async ClearvFile(fileName: string): Promise<boolean> {
123
-        let result = false
124
-        try {
125
-            const entity = new TransitEntity()
126
-            entity.ServiceName = 'UtilService'
127
-            entity.FuncName = 'SaveFile'
128
-            entity.Parameters = {
129
-                '1': fileName,
130
-                '3': 'false'
131
-            }
132
-
133
-            const data = new AttachFile()
134
-            data.AttachIndex = '2'
135
-            data.AttachType = 'ByteType'
136
-            data.AttachValue = new Uint8Array(0)
137
-            entity.AttachFiles.push(data)
138
-
139
-            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
140
-            if (tmpresult && tmpresult.length === 1) {
141
-                result = tmpresult[0].AttachValue as boolean
142
-            }
143
-        } catch (e) {
144
-            throw e
145
-        }
146
-        return result
147
-    }
148
-
149
-    /**
150
-     * 检查交易
151
-     */
152
-    static async Check(inf: CheckInfo): Promise<CheckResult | null> {
153
-        let result: CheckResult | null = null
154
-        try {
155
-            const entity = new TransitEntity()
156
-            entity.ServiceName = 'TradeService'
157
-            entity.FuncName = 'Check'
158
-
159
-            const data = new AttachFile()
160
-            data.AttachIndex = '1'
161
-            data.AttachType = 'TableType'
162
-            data.AttachValue = Platform.CommonFunction.ChangeEntityToTable([inf])
163
-            entity.AttachFiles.push(data)
164
-
165
-            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
166
-            if (tmpresult && tmpresult.length === 1) {
167
-                const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<CheckResult>(
168
-                    tmpresult[0].AttachValue as DataTable
169
-                )
170
-                if (rmpresult.length > 0) {
171
-                    result = rmpresult[0]
172
-                }
173
-            }
174
-        } catch (e) {
175
-            throw e
176
-        }
177
-        return result
178
-    }
179
-
180
-    /**
181
-     * 复核操作
182
-     */
183
-    static async Super(
184
-        serialId: string,
185
-        SuperId: string,
186
-        taskid: string,
187
-        stat: number,
188
-        TellerNo: string,
189
-        tradedata: Record<string, string>,
190
-        pagedata: Uint8Array,
191
-        refuseReason: string
192
-    ): Promise<boolean> {
193
-        let result = false
194
-        try {
195
-            const entity = new TransitEntity()
196
-            entity.ServiceName = 'TradeService'
197
-            entity.FuncName = 'Super'
198
-            entity.Parameters = {
199
-                '1': serialId,
200
-                '2': SuperId,
201
-                '3': taskid,
202
-                '4': stat.toString(),
203
-                '5': TellerNo,
204
-                '6': Platform.CommonFunction.ChangeDicToStr(tradedata),
205
-                '8': refuseReason
206
-            }
207
-
208
-            const data = new AttachFile()
209
-            data.AttachIndex = '7'
210
-            data.AttachType = 'ByteType'
211
-            data.AttachValue = pagedata
212
-            entity.AttachFiles.push(data)
213
-
214
-            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
215
-            if (tmpresult && tmpresult.length === 1) {
216
-                result = tmpresult[0].AttachValue as boolean
217
-            }
218
-        } catch (e) {
219
-            throw e
220
-        }
221
-        return result
222
-    }
223
-
224
-    /**
225
-     * 授权验证操作
226
-     */
227
-    static async DoAuth(auth: string, pwd: string, lvl: string | null): Promise<AuthResult | null> {
228
-        let result: AuthResult | null = null
229
-        try {
230
-            const entity = new TransitEntity()
231
-            entity.ServiceName = 'TradeService'
232
-            entity.FuncName = 'DoAuth'
233
-            entity.Parameters = {
234
-                '1': auth,
235
-                '2': pwd,
236
-                '3': lvl || ''
237
-            }
238
-
239
-            const tmpresult = await ServiceManager.GetInstance().Commit(entity)
240
-            if (tmpresult && tmpresult.length === 1) {
241
-                const rmpresult = Platform.CommonFunction.ChangeTableToEntitys<AuthResult>(
242
-                    tmpresult[0].AttachValue as DataTable
243
-                )
244
-                if (rmpresult.length > 0) {
245
-                    result = rmpresult[0]
246
-                }
247
-            }
248
-        } catch (e) {
249
-            throw e
250
-        }
251
-        return result
252
-    }
253
-}
254
-
255
-interface CheckInfo {
256
-    // ... 检查信息字段
257
-}
258
-
259
-interface CheckResult {
260
-    // ... 检查结果字段
261
-}
262
-
263
-interface AuthResult {
264
-    // ... 授权结果字段
265
-}
266
-
267
-interface AskSuperInfo {
268
-    // ... 申请复核信息字段
269
-}
270
-
271
-interface AskAuthInfo {
272
-    // ... 申请授权信息字段
273
-}
274
-
275
-interface PageData {
276
-    datas: Uint8Array
277
-    dataslength: number
278
-    // ... 其他字段
279
-}
280
-
281
-interface AuthTransRecords {
282
-    // ... 授权交易记录字段
283
-}

Loading…
Cancel
Save