Browse Source

调整报错逻辑

main
hulei 2 weeks ago
parent
commit
09d311a09e

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

1
 import { ref, reactive } from 'vue'
1
 import { ref, reactive } from 'vue'
2
 //import { PlatformSettings } from '../../platfrom/common/RunningParameters/PlatformSettings'
2
 //import { PlatformSettings } from '../../platfrom/common/RunningParameters/PlatformSettings'
3
-//import { PlatformLogger } from './PlatformLogger'
3
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger";
4
 //import { BitMapInstance } from './BitMapInstance'
4
 //import { BitMapInstance } from './BitMapInstance'
5
 import { MsgBitMap } from '../../develop/Communication/MessageHelper/MsgBitMap'
5
 import { MsgBitMap } from '../../develop/Communication/MessageHelper/MsgBitMap'
6
 import { TransitType } from './MessageHelper/TransitType'
6
 import { TransitType } from './MessageHelper/TransitType'
24
 }
24
 }
25
 export default class Message {
25
 export default class Message {
26
 
26
 
27
+    static cconv(fileData: string): string {
28
+        throw new Error("Method not implemented.");
29
+    }
30
+    integrateFd(bitMapByte: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBufferLike> {
31
+        throw new Error("Method not implemented.");
32
+    }
33
+
27
     InitGateway2CBS(txCode: string, arg1: string, arg2: string, predicate2retCode: (code: string) => boolean) {
34
     InitGateway2CBS(txCode: string, arg1: string, arg2: string, predicate2retCode: (code: string) => boolean) {
28
         throw new Error("Method not implemented.")
35
         throw new Error("Method not implemented.")
29
     }
36
     }
46
             this.Init(type);
53
             this.Init(type);
47
         }
54
         }
48
     }
55
     }
56
+
49
     // 交易附件数据
57
     // 交易附件数据
50
     private _fileData = ref<string>('')
58
     private _fileData = ref<string>('')
51
-    private _filename = ref<string>('')
52
-    private _fdDict = reactive<Record<string, Uint8Array>>({})
59
+    public _filename = ref<string>('')
60
+    private _fdDict: Record<string, string>
53
     private _BigFds_: Record<string, any> = {}
61
     private _BigFds_: Record<string, any> = {}
54
     BitMapType: BitMap
62
     BitMapType: BitMap
55
     static BitMap: any
63
     static BitMap: any
101
         let result = ''
109
         let result = ''
102
         if (this._fdDict[fdName]) {
110
         if (this._fdDict[fdName]) {
103
             const decoder = new TextDecoder()
111
             const decoder = new TextDecoder()
104
-            //result = BitMapInstance.FdBitMap[fdName].RealValue(decoder.decode(this._fdDict[fdName])) //hulei先注销
112
+            //result = this.BitMapInstance.FdBitMap[fdName].RealValue(decoder.decode(this._fdDict[fdName])) //hulei先注销
105
         }
113
         }
106
         return result
114
         return result
107
     }
115
     }
139
             // }
147
             // }
140
         }
148
         }
141
     }
149
     }
142
-    //private MsgBitMap BitMapInstance(BitMapType) {
150
+
143
     // private BitMapInstance(BitMapType: any): MsgBitMap {
151
     // private BitMapInstance(BitMapType: any): MsgBitMap {
144
     //     switch (BitMapType) {
152
     //     switch (BitMapType) {
145
     //         case BitMap.Server:
153
     //         case BitMap.Server:
153
     //     }
161
     //     }
154
 
162
 
155
     // }
163
     // }
156
-    private BitMapInstance(BitMapType): MsgBitMap {
164
+    private static BitMapInstance(): MsgBitMap {
157
         switch (BitMapType) {
165
         switch (BitMapType) {
158
             case BitMap.Server:
166
             case BitMap.Server:
159
                 return MsgBitMap.Instance_Server;
167
                 return MsgBitMap.Instance_Server;
185
     */
193
     */
186
     public Init(type?: BitMap): void {
194
     public Init(type?: BitMap): void {
187
         if (type === undefined) {
195
         if (type === undefined) {
188
-            // _fdDict.Clear();
189
-            // _fileData = string.Empty;
196
+            this._fdDict.Clear();
197
+            this._fileData = string.Empty;
190
             // //TransitNode = TransitType.CallServer; //初始化默认为CallServer
198
             // //TransitNode = TransitType.CallServer; //初始化默认为CallServer
191
             // //BitMapType = type;
199
             // //BitMapType = type;
192
-            // CustomizeTransitEntry = null;
193
-            // Extra = new Dictionary<string, object>();
200
+            this.CustomizeTransitEntry = null;
201
+            Extra = new Dictionary<string, object>();
194
         } else {
202
         } else {
195
             // this._fdDict = {};
203
             // this._fdDict = {};
196
             // this._fileData = '';
204
             // this._fileData = '';
468
     }
476
     }
469
     // 实现剩余所有域...
477
     // 实现剩余所有域...
470
     // 按照相同模式实现Fd21到Fd47的所有域
478
     // 按照相同模式实现Fd21到Fd47的所有域
479
+
480
+
481
+
482
+    public static anilyzeFd(msgData: Uint8Array): boolean {
483
+        // 拆解位图,报文数据区格式为 5位报文类型+8/16位位图区域+有效数据区
484
+        // 标志位,是否采用128位位图
485
+        const isBitmap128 = msgData[5].toString(2).padStart(8, '0').startsWith('1');
486
+        let bitMap = '';
487
+        const msgBit = new Uint8Array(isBitmap128 ? 16 : 8);
488
+        msgBit.set(msgData.slice(5, 5 + msgBit.length));
489
+        // 扩展16位字符串转换为128位01格式的位图字符串
490
+        for (const bytes of msgBit) {
491
+            bitMap += bytes.toString(2).padStart(8, '0');
492
+        }
493
+        // 拆解数据部分
494
+        const startIndex = 5 + (isBitmap128 ? 16 : 8);
495
+        const data = new Uint8Array(msgData.length - startIndex);
496
+        data.set(msgData.slice(startIndex));
497
+        let curPosition = 0;
498
+        // 日志内容
499
+        const logInfo: string[] = [];
500
+        logInfo.push("解包数据:");
501
+        logInfo.push(`解包位图:[${bitMap}]`);
502
+        try {
503
+            // 循环解包
504
+            for (let i = 0; i < bitMap.length; i++) {
505
+                if (bitMap[i] === '1') {
506
+                    // 第一位为标志位
507
+                    if (i + 1 === 1) {
508
+                        continue;
509
+                    }
510
+                    const fdName = (i + 1).toString().padStart(3, '0') + "0";
511
+                    if (!this.BitMapInstance.FdBitMap[fdName]) {
512
+                        continue;
513
+                    }
514
+                    // 先清理组包数据,否则解析子域会产生数据交错
515
+                    clearFd(i + 1);
516
+                    const item = this.BitMapInstance.FdBitMap[fdName];
517
+                    let tmp: Uint8Array | null = null;
518
+                    switch (item.FieldType) {
519
+                        case "-1":
520
+                            break;
521
+                        case "0":
522
+                            // 定长域
523
+                            tmp = new Uint8Array(item.Length);
524
+                            // 截取数据区域,判定新位置
525
+                            tmp.set(data.slice(curPosition, curPosition + item.Length));
526
+                            curPosition += item.Length;
527
+                            break;
528
+                        default:
529
+                            // 变长域
530
+                            // 获取数据长度
531
+                            const len = parseInt(item.FieldType, 10);
532
+                            tmp = new Uint8Array(len);
533
+                            tmp.set(data.slice(curPosition, curPosition + len));
534
+                            curPosition += len;
535
+                            // 获取数据部分
536
+                            const length = parseInt(encodingToString(tmp), 10);
537
+                            tmp = new Uint8Array(length);
538
+                            tmp.set(data.slice(curPosition, curPosition + length));
539
+                            curPosition += length;
540
+                            break;
541
+                    }
542
+                    if (!tmp) continue;
543
+                    // 记录日志
544
+                    const value = encodingToString(tmp);
545
+                    logInfo.push(`第${(i + 1).toString().padStart(3, '0')}域:[${value}]`);
546
+                    if (!item.Children || item.Children.length === 0) {
547
+                        // // 生僻字处理,字符类型FD需要检查
548
+                        // if ("056".includes(item.Type) && hasCconvKey(value)) {
549
+                        //     const val = item.RealValue ? item.RealValue(value) : value;
550
+                        //     const newVal = item.FormatValue ? item.FormatValue(cconv(val as string, false)) : val;
551
+                        //     tmp = encodingGetBytes(newVal);
552
+                        // }//hulei 生僻字处理暂时放弃
553
+                        if (fdDict.hasOwnProperty(item.Code)) {
554
+                            fdDict[item.Code] = tmp;
555
+                        } else {
556
+                            fdDict[item.Code] = tmp;
557
+                        }
558
+                    } else {
559
+                        // 循环给子域赋值,子域暂时只存在定长域
560
+                        let index = 0;
561
+                        for (const child of item.Children) {
562
+                            if (index >= tmp.length) break;
563
+                            // 子域为定长
564
+                            const childLen = Math.min(index + child.Length, tmp.length) - index;
565
+                            const childData = new Uint8Array(childLen);
566
+                            childData.set(tmp.slice(index, index + childLen));
567
+                            index += childData.length;
568
+                            const chindValue = encodingToString(childData);
569
+                            // // 生僻字处理,字符类型FD需要检查
570
+                            // if ("056".includes(child.Type) && hasCconvKey(chindValue)) {
571
+                            //     const val = child.RealValue ? child.RealValue(chindValue) : chindValue;
572
+                            //     const newVal = child.FormatValue ? child.FormatValue(cconv(val as string, false)) : val;
573
+                            //     childData = encodingGetBytes(newVal);
574
+                            // }hulei 生僻字处理暂时放弃
575
+                            if (fdDict.hasOwnProperty(child.Code)) {
576
+                                fdDict[child.Code] = childData;
577
+                            } else {
578
+                                fdDict[child.Code] = childData;
579
+                            }
580
+                        }
581
+                    }
582
+                }
583
+            }
584
+            // 解包完成后将解析数据写入交易日志文件
585
+            communicationInfo(logInfo.join('\n'));
586
+            return true;
587
+        } catch (e) {
588
+            // 解包失败
589
+            logInfo.push(`解包出错:${(e as Error).message}`);
590
+            communicationInfo(logInfo.join('\n'));
591
+            return false;
592
+        }
593
+    }
594
+}
595
+function clearFd(arg0: number) {
596
+    throw new Error('Function not implemented.');
597
+}
598
+
599
+function encodingToString(tmp: Uint8Array<ArrayBufferLike>): string {
600
+    throw new Error('Function not implemented.');
601
+}
602
+function communicationInfo(arg0: string) {
603
+    throw new Error('Function not implemented.');
471
 }
604
 }

+ 9
- 9
ant-design-pro-vue3/src/views/front/develop/Communication/MessageExtension.ts View File

1
-import { Message } from './Message'
1
+import Message from "@/views/front/develop/Communication/Message";
2
 import { PackageType } from './PackageType'
2
 import { PackageType } from './PackageType'
3
 import { TransitType } from './TransitType'
3
 import { TransitType } from './TransitType'
4
 import { MsgPackage } from './MsgPackage'
4
 import { MsgPackage } from './MsgPackage'
5
 import { BitMapInstance } from './BitMapInstance'
5
 import { BitMapInstance } from './BitMapInstance'
6
 import { PlatformSettings } from './PlatformSettings'
6
 import { PlatformSettings } from './PlatformSettings'
7
-import { PlatformLogger } from './PlatformLogger'
7
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger";
8
 
8
 
9
 /**
9
 /**
10
  * Message的扩展方法集合
10
  * Message的扩展方法集合
25
             default:
25
             default:
26
                 break
26
                 break
27
         }
27
         }
28
-        
28
+
29
         if (message.CustomizeTransitEntry) {
29
         if (message.CustomizeTransitEntry) {
30
             return message.CustomizeTransitEntry.process(message, packageType)
30
             return message.CustomizeTransitEntry.process(message, packageType)
31
         }
31
         }
45
     public static serializeForAuth(message: Message): string {
45
     public static serializeForAuth(message: Message): string {
46
         const ret: Record<string, string> = {}
46
         const ret: Record<string, string> = {}
47
         const empty: string[] = []
47
         const empty: string[] = []
48
-        
48
+
49
         for (const fd of Object.values(BitMapInstance.FdBitMap)) {
49
         for (const fd of Object.values(BitMapInstance.FdBitMap)) {
50
             const type = fd.getItemType()
50
             const type = fd.getItemType()
51
             const key = fd.Code
51
             const key = fd.Code
79
      */
79
      */
80
     public static getMsgBitMapTypes(message: Message): Record<string, string> {
80
     public static getMsgBitMapTypes(message: Message): Record<string, string> {
81
         const result: Record<string, string> = {}
81
         const result: Record<string, string> = {}
82
-        
82
+
83
         for (const item of Object.values(BitMapInstance.FdBitMap)) {
83
         for (const item of Object.values(BitMapInstance.FdBitMap)) {
84
             const type = item.getItemType()
84
             const type = item.getItemType()
85
             const value = type === String ? '1' : '0'
85
             const value = type === String ? '1' : '0'
86
             result[`FD${item.Code}`] = value
86
             result[`FD${item.Code}`] = value
87
         }
87
         }
88
-        
88
+
89
         return result
89
         return result
90
     }
90
     }
91
 
91
 
96
         const msg = new Message()
96
         const msg = new Message()
97
         const packageType = PackageType[type as keyof typeof PackageType]
97
         const packageType = PackageType[type as keyof typeof PackageType]
98
         const packageInstance = MsgPackage.packageList[packageType]
98
         const packageInstance = MsgPackage.packageList[packageType]
99
-        
99
+
100
         const totalData = new Uint8Array(returnData.length + fileData.length)
100
         const totalData = new Uint8Array(returnData.length + fileData.length)
101
         totalData.set(returnData, 0)
101
         totalData.set(returnData, 0)
102
         totalData.set(fileData, returnData.length)
102
         totalData.set(fileData, returnData.length)
103
-        
103
+
104
         const success = packageInstance.analyze(msg, totalData)
104
         const success = packageInstance.analyze(msg, totalData)
105
         return { success, msg }
105
         return { success, msg }
106
     }
106
     }
111
     code: string = ''
111
     code: string = ''
112
     type: string = ''
112
     type: string = ''
113
     values: string = ''
113
     values: string = ''
114
-}
114
+}

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

88
     private static _instance_Agn: MsgBitMap
88
     private static _instance_Agn: MsgBitMap
89
     private static _instance_Cnaps2: MsgBitMap
89
     private static _instance_Cnaps2: MsgBitMap
90
 
90
 
91
-    FdBitMap: Record<string, FdItem> = {}
91
+    public static FdBitMap: Record<string, FdItem> = {}
92
 
92
 
93
     private constructor() { }
93
     private constructor() { }
94
 
94
 

+ 2
- 2
ant-design-pro-vue3/src/views/front/develop/Communication/Package/IPackage.ts View File

1
-import { Message } from './Message'
1
+import Message from "@/views/front/develop/Communication/Message";
2
 
2
 
3
 /**
3
 /**
4
  * 报文打包解包接口
4
  * 报文打包解包接口
18
      * @returns 是否解包成功
18
      * @returns 是否解包成功
19
      */
19
      */
20
     analyze(msg: Message, data: Uint8Array): boolean;
20
     analyze(msg: Message, data: Uint8Array): boolean;
21
-}
21
+}

+ 0
- 423
ant-design-pro-vue3/src/views/front/develop/Communication/Package/Msg858301.cs View File

1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using Platform.Common;
6
-using Platform.Common.RunningParameters;
7
-using Platform.Common.LogSystem;
8
-
9
-namespace TellerSystem.Communication.Package
10
-{
11
-    /// <summary>
12
-    /// 8583 128域类型报文,Tcp通讯方式的组包,解包处理。承德渠道
13
-    /// </summary>
14
-    class Msg858301 : IPackage
15
-    {
16
-        //定义静态实例
17
-        public static Msg858301 Instance;
18
-        /// <summary>
19
-        ///静态实例初始化函数
20
-        /// </summary>
21
-        static public Msg858301 GetInstance()
22
-        {
23
-            if (Instance == null)
24
-            {
25
-                Instance = new Msg858301();
26
-            }
27
-            return Instance;
28
-        }
29
-
30
-        /// <summary>
31
-        /// 组包操作
32
-        /// </summary>
33
-        /// <returns>报文数据包</returns>
34
-        public byte[] Integrate(Message msg)
35
-        {
36
-            byte[] returnData = null;
37
-
38
-            try
39
-            {
40
-                returnData = DoIntegrate(msg);
41
-            }
42
-            catch (Exception ex)
43
-            {
44
-                //写错误信息
45
-                PlatformLogger.SystemErrorInfo("组包发生异常:", ex);
46
-                throw;
47
-            }
48
-            return returnData;
49
-        }
50
-
51
-        /// <summary>
52
-        /// 解包操作
53
-        /// </summary>
54
-        /// <param name="msg">核心返回数据包</param>
55
-        /// <param name="data">核心返回数据包</param>
56
-        /// <returns></returns>
57
-        public bool Analyze(Message msg, byte[] data)
58
-        {
59
-            try
60
-            {
61
-                //进行解包处理
62
-                DoAnalyze(msg, data);
63
-            }
64
-            catch (Exception ex)
65
-            {
66
-
67
-                return false;
68
-            }
69
-            return true;
70
-        }
71
-
72
-        #region 组包处理
73
-
74
-        /// <summary>
75
-        /// 组包处理
76
-        /// </summary>
77
-        /// <param name="msg"></param>
78
-        /// <returns></returns>
79
-        private byte[] DoIntegrate(Message msg)
80
-        {
81
-            #region new
82
-            ///*******************************************
83
-            // * 组包规则:
84
-            // * msgHeader         byte[68]   Tuxedo报文头
85
-            // * msgData           byte[]     报文数据
86
-            // * fileFlag          byte       是否发送附件 
87
-            // * *****************************************/
88
-
89
-            ////文件标志
90
-            //byte fileFlag = (byte)(msg.FileFlag ? 0x7f : 0xff);
91
-            ////报文数据
92
-            //byte[] bitMapData;
93
-            //var fdData = msg.IntegrateFd(out bitMapData);
94
-            //byte[] msgKindData = PlatformSettings.Encoding.GetBytes(MsgParames.MsgType.PadLeft(5, '0'));
95
-            //var msgData = new byte[msgKindData.Length + bitMapData.Length + fdData.Length];
96
-            //msgKindData.CopyTo(msgData, 0);
97
-            //bitMapData.CopyTo(msgData, msgKindData.Length);
98
-            //fdData.CopyTo(msgData, msgKindData.Length + bitMapData.Length);
99
-            ////加密报文数据
100
-            //MsgPackage.Encrypt(msgData, Encoding.ASCII.GetBytes(MsgParames.KeyStr), 1);
101
-            ////报文头
102
-            //var msgHeader = GetMsgT(msg, msgData.Length.ToString()).ToArray<byte>();
103
-            ////组装报文
104
-            //var totalData = new byte[msgHeader.Length + msgData.Length + 1];
105
-            //msgHeader.CopyTo(totalData, 0);
106
-            //msgData.CopyTo(totalData, msgHeader.Length);
107
-            //totalData[totalData.Length - 1] = fileFlag;
108
-
109
-            //return totalData;
110
-            #endregion
111
-
112
-
113
-            #region deleted
114
-            //报文数据区
115
-            byte[] msgData;
116
-            //报文总长度
117
-            int totalLen;
118
-            //8位长度对应字符串
119
-            string strLen;
120
-            //报文数据区的长度
121
-            int msgDataLen;
122
-            //60位报文头
123
-            string msgTitle;
124
-            //5报文类型
125
-            byte[] msgKindByte;
126
-            //位图区域
127
-            byte[] bitMapByte = new byte[16];
128
-            //有效数据内容
129
-            string bitDataStr = string.Empty;
130
-            byte[] bitDataByte;
131
-            //组包数据包
132
-            byte[] totalMsgData;
133
-
134
-            //文件标志 0xff==no file   0x7f==file
135
-            byte fileFlag;
136
-            //根据当前交易附件标志设置文件标志
137
-            if (msg.FileFlag)
138
-            {
139
-                fileFlag = 0x7f;
140
-            }
141
-            //无文件
142
-            else
143
-            {
144
-                fileFlag = 0xff;
145
-            }
146
-            try
147
-            {
148
-                //报文类型
149
-                msgKindByte = PlatformSettings.Encoding.GetBytes("00000");
150
-                //组织报文数据区域信息,位图区,数据区
151
-                //GetBitData(msg, bitMapByte, ref bitDataStr);
152
-                //bitDataByte = PlatformSettings.Encoding.GetBytes(bitDataStr);
153
-                bitDataByte = msg.IntegrateFd(out bitMapByte);
154
-
155
-                //报文数据区长度
156
-                msgDataLen = msgKindByte.Length + bitMapByte.Length + bitDataByte.Length;
157
-                //报文总长度
158
-                totalLen = msgDataLen + 68;
159
-                //8位长度对应字符串
160
-                strLen = Convert.ToString(totalLen).PadLeft(8, '0');
161
-                //60位报文头
162
-                msgTitle = msgDataLen.ToString().PadLeft(4, '0').PadLeft(68, ' ');//GetMsgT(msg, msgDataLen.ToString());
163
-
164
-                //合并5位报文类型,位图,数据区域
165
-                msgData = new byte[msgDataLen];
166
-                //合并操作
167
-                for (int i = 0; i < msgData.Length; i++)
168
-                {
169
-                    if (i < msgKindByte.Length)
170
-                    {
171
-                        msgData[i] = msgKindByte[i];
172
-                    }
173
-
174
-                    if (i > msgKindByte.Length - 1 & i < msgKindByte.Length + bitMapByte.Length)
175
-                    {
176
-                        msgData[i] = bitMapByte[i - msgKindByte.Length];
177
-                    }
178
-                    if (i > msgKindByte.Length + bitMapByte.Length - 1)
179
-                    {
180
-                        msgData[i] = bitDataByte[i - msgKindByte.Length - bitMapByte.Length];
181
-                    }
182
-                }
183
-
184
-                //MsgPackage.LogObj.Debug("加密前数据:"+PlatformSettings.Encoding.GetString(msgData));
185
-                //加密报文数据区
186
-                //MsgPackage.Encrypt(msgData, Encoding.ASCII.GetBytes(CommonSettings.KeyStr), 1);
187
-                //MsgPackage.LogObj.Debug("加密后数据:" + PlatformSettings.Encoding.GetString(msgData));
188
-
189
-                //合并组包数据
190
-                //8位的报文长度
191
-                byte[] len8 = PlatformSettings.Encoding.GetBytes(strLen);//new byte[0];
192
-                //报文头字节数组
193
-                byte[] msgTitleByte = PlatformSettings.Encoding.GetBytes(msgTitle);
194
-                totalMsgData = new byte[len8.Length + msgTitleByte.Length + msgData.Length + 1];
195
-                for (int j = 0; j < totalMsgData.Length - 1; j++)
196
-                {
197
-                    if (j < len8.Length)
198
-                    {
199
-                        totalMsgData[j] = len8[j];
200
-                    }
201
-                    if (j > len8.Length - 1 & j < len8.Length + msgTitleByte.Length)
202
-                    {
203
-                        totalMsgData[j] = msgTitleByte[j - len8.Length];
204
-                    }
205
-                    if (j > len8.Length + msgTitleByte.Length - 1)
206
-                    {
207
-                        totalMsgData[j] = msgData[j - len8.Length - msgTitleByte.Length];
208
-                    }
209
-                }
210
-                //设置文件标志位
211
-                totalMsgData[totalMsgData.Length - 1] = fileFlag;
212
-
213
-                //处理附件
214
-                if (msg.FileFlag)
215
-                {
216
-                    //文件追加到数据后
217
-                    var file = PlatformSettings.Encoding.GetBytes(Message.Cconv(msg.FileData));//生僻字转义:文件组包处理
218
-                    var lenData = PlatformSettings.Encoding.GetBytes(file.Length.ToString().PadLeft(8, '0'));
219
-                    var fileName = !string.IsNullOrEmpty(msg._filename) ? PlatformSettings.Encoding.GetBytes(msg._filename.PadRight(30)) : PlatformSettings.Encoding.GetBytes((LoginUserInfo.KinbrNo + LoginUserInfo.TtyName).PadRight(30));
220
-                    var ret = new byte[totalMsgData.Length + fileName.Length + lenData.Length + file.Length + 1];
221
-                    Array.Copy(totalMsgData, ret, totalMsgData.Length);
222
-                    Array.Copy(fileName, 0, ret, totalMsgData.Length, fileName.Length);
223
-                    Array.Copy(lenData, 0, ret, totalMsgData.Length + fileName.Length, lenData.Length);
224
-                    Array.Copy(file, 0, ret, totalMsgData.Length + fileName.Length + lenData.Length, file.Length);
225
-                    //补充一个结束字符
226
-                    ret[ret.Length - 1] = 0xff;
227
-                    totalMsgData = ret;
228
-                }
229
-                //MsgPackage.LogObj.Debug("报文整体数据:" + PlatformSettings.Encoding.GetString(totalMsgData));
230
-            }
231
-            catch (Exception ex)
232
-            {
233
-                //写错误信息
234
-                PlatformLogger.SystemErrorInfo("组包发生异常!", ex);
235
-                throw;
236
-            }
237
-            return totalMsgData;
238
-            #endregion
239
-        }
240
-
241
-        /// <summary>
242
-        /// 生成TUXEDO方式报文头
243
-        /// </summary>
244
-        /// <param name="msg">域信息</param>
245
-        /// <param name="msgDataLen"></param>
246
-        /// <returns></returns>
247
-        private string GetMsgT(Message msg, string msgDataLen)
248
-        {
249
-            string clnm = "";                 //5位   空串
250
-            string svcnm = "";                //15位  Tuxedo交易服务名
251
-            string reqtype = "";              //1位   "4"
252
-            string branchNo = "";             //10位   机构编号
253
-            string tty = "";                  //12位   终端号
254
-            string titaOr8583;                //1位   代码中的值 8’
255
-            string cbs = "";                  //10位  空串
256
-            string macflg = "";               //1位   空串
257
-            string mac = "";                  //8位   空串
258
-            string result = "";               //1位   '0'
259
-            string len = "";                  //4位   8583数据区长度
260
-            //TUXEDO方式报文头
261
-            StringBuilder tmpMstTile = new StringBuilder();
262
-
263
-            //设置对应变量的值
264
-            clnm = "".PadLeft(5, ' ');
265
-            tmpMstTile.Append(clnm);
266
-            svcnm = "".PadLeft(15, ' ');
267
-            tmpMstTile.Append(svcnm);
268
-            reqtype = "4";
269
-            tmpMstTile.Append(reqtype);
270
-            //TODO:机构号扩展为10位,故报文大小变成68
271
-            branchNo = msg.Fd3.PadLeft(10, ' ');
272
-            tmpMstTile.Append(branchNo);
273
-            //TODO:由于tty采用12位,故修改为12位(保证核心已经修改)
274
-            //tty = msg.Fd10.PadLeft(9, ' ');
275
-            tty = msg.Fd10.PadLeft(12, ' ');
276
-            tmpMstTile.Append(tty);
277
-            titaOr8583 = "8";
278
-            tmpMstTile.Append(titaOr8583);
279
-            cbs = "".PadLeft(10, ' ');
280
-            tmpMstTile.Append(cbs);
281
-            macflg = "".PadLeft(1, ' ');
282
-            tmpMstTile.Append(macflg);
283
-            mac = "".PadLeft(8, ' ');
284
-            tmpMstTile.Append(mac);
285
-            result = "0";
286
-            tmpMstTile.Append(result);
287
-            len = msgDataLen.PadLeft(4, '0');
288
-            tmpMstTile.Append(len);
289
-
290
-            return tmpMstTile.ToString();
291
-        }
292
-        #endregion
293
-
294
-        #region 解包处理
295
-
296
-        /// <summary>
297
-        /// 解包操作
298
-        /// </summary>
299
-        /// <param name="msg"></param>
300
-        /// <param name="returnData"></param>
301
-        /// <returns></returns>
302
-        public void DoAnalyze(Message msg, byte[] returnData)
303
-        {
304
-            try
305
-            {
306
-                //丢弃前8位
307
-                var ret = new byte[returnData.Length - 8];
308
-                Array.Copy(returnData, 8, ret, 0, ret.Length);
309
-                returnData = ret;
310
-
311
-                //报文前68位内容       
312
-                byte[] msg60 = new byte[68];
313
-                //报文数据区长度        
314
-                int msgDataLen = 0;
315
-                //报文数据区内容
316
-                byte[] msgData;
317
-                //报文有效数据内容
318
-                byte[] msgDataReal;
319
-                //报文位图区
320
-                byte[] msgBit;
321
-                string msgBitStr = "";
322
-
323
-                //报文前60位(60位报文头)
324
-                for (int i = 0; i < 68; i++)
325
-                {
326
-                    msg60[i] = returnData[i];
327
-                }
328
-
329
-                //报文数据区长度 
330
-                byte[] tmpLen = new byte[4];
331
-                Array.Copy(msg60, 64, tmpLen, 0, 4);
332
-                msgDataLen = Convert.ToInt32(PlatformSettings.Encoding.GetString(tmpLen));
333
-
334
-                //报文前60位字符串内容
335
-                //MsgStr60 = Encoding.GetEncoding(CAppInfo.CodingStr).GetString(Msg60);
336
-
337
-                #region 20140423 王全
338
-                //承德平台无此返回报文场景
339
-                ////如果报文数据区第五位为0xff
340
-                ////总共报文数据区为4位应答码.
341
-                //if (returnData[72] == (byte)'\0')
342
-                //{
343
-                //    //应答码错误信息
344
-                //    byte[] tmpData = new byte[4];
345
-                //    //取得应答码错误信息内容
346
-                //    Array.Copy(returnData, 68, tmpData, 0, 4);
347
-                //    //返回应答码
348
-                //    msg.Fd12 = PlatformSettings.Encoding.GetString(tmpData);
349
-                //    return;
350
-                //}
351
-                #endregion
352
-
353
-                //取得报文数据区内容
354
-                msgData = new byte[msgDataLen];
355
-                Array.Copy(returnData, 68, msgData, 0, msgDataLen);
356
-                //文件标志
357
-                byte fileDataFlag = returnData[20];
358
-                //解密数据区内容
359
-                //MsgPackage.Encrypt(msgData, Encoding.ASCII.GetBytes(CommonSettings.KeyStr),
360
-                //                   0);
361
-                #region delete 解包封装
362
-                ////报文数据区格式为 5位报文类型+16位位图区域+有效数据区
363
-                ////报文位图区
364
-                ////报文位图区存在2种情况,当位图区第1域为0时,位图长度为64(压缩为8位数据),否则为128(压缩为16位数据)
365
-                ////标志位,是否采用128位位图
366
-                //bool IsBitmap128 = Convert.ToString(msgData[5], 2).PadLeft(8, '0').StartsWith("1");
367
-
368
-                //msgBit = new byte[IsBitmap128 ? 16 : 8];
369
-                //Array.Copy(msgData, 5, msgBit, 0, msgBit.Length);
370
-                ////扩展16位字符串转换为128位01格式的位图字符串
371
-                //foreach (byte bytes in msgBit)
372
-                //{
373
-                //    msgBitStr += Convert.ToString(bytes, 2).PadLeft(8, '0');
374
-                //}
375
-                ////写调试日志
376
-                ////MsgPackage.LogObj.Debug("\n返回位图:\n" + msgBitStr.Replace('\0', '\n'));
377
-                ////报文数据内容
378
-                //int startIndex = 5 + (IsBitmap128 ? 16 : 8);
379
-                //msgDataReal = new byte[msgDataLen - startIndex];
380
-                //Array.Copy(msgData, startIndex, msgDataReal, 0, msgDataReal.Length);
381
-                ////写调试日志
382
-                ////MsgPackage.LogObj.Debug("\n解包前应答数据:\n" + PlatformSettings.Encoding.GetString(msgDataReal).Replace('\0', '\n'));
383
-
384
-                ////详细解析每个域的信息
385
-                ////Message tmpMsg = AnilyzeFd(msgBitStr, msgDataReal, msg);
386
-                //if (!msg.AnilyzeFd(msgBitStr, msgDataReal))
387
-                //{
388
-                //    //解包失败
389
-                //    throw new FormatException("8583通讯解包操作失败!具体情况请查看日志!");
390
-                //}
391
-                if (!msg.AnilyzeFd(msgData))
392
-                {
393
-                    //解包失败
394
-                    throw new FormatException("8583通讯解包操作失败!具体情况请查看日志!");
395
-                }
396
-                #endregion
397
-                //将解析后结果复制到当前交易对象中
398
-                //MsgPackage.Clone(msg, tmpMsg);
399
-                //有文件附件的处理
400
-                //存在附件,规则[文件名称:30][数据长度:8][数据:n]
401
-                var fileLen = returnData.Length - 68 - msgDataLen - 38 - 1;
402
-                if (fileLen > 0)
403
-                {
404
-                    //报文文件内容               
405
-                    byte[] fileData = new byte[fileLen];
406
-                    Array.Copy(returnData, 68 + msgDataLen + 38 + 1, fileData, 0, fileLen);
407
-                    //返回解包后文件数据
408
-                    msg.FileData = Message.Cconv(PlatformSettings.Encoding.GetString(fileData), false);//生僻字转义:文件解包处理
409
-                    //写调试日志
410
-                    PlatformLogger.CommunicationInfo("\n文件数据:\n" + PlatformSettings.Encoding.GetString(fileData));
411
-                }
412
-            }
413
-            catch (Exception ex)
414
-            {
415
-                //写错误信息
416
-                PlatformLogger.SystemErrorInfo("解析报文失败!", ex);
417
-                throw;
418
-            }
419
-        }
420
-        #endregion
421
-
422
-    }
423
-}

+ 19
- 19
ant-design-pro-vue3/src/views/front/develop/Communication/Package/Msg858301.ts View File

1
-import { Message } from './Message'
2
-import { PlatformLogger } from './PlatformLogger'
3
-import { PlatformSettings } from './PlatformSettings'
1
+import Message from "@/views/front/develop/Communication/Message";
2
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger";
4
 import { IPackage } from './IPackage'
3
 import { IPackage } from './IPackage'
4
+import LoginUserInfo from "@/views/front/platfrom/common/RunningParameters/LoginUserInfo";
5
 
5
 
6
 /**
6
 /**
7
  * 8583 128域类型报文,Tcp通讯方式的组包,解包处理。承德渠道
7
  * 8583 128域类型报文,Tcp通讯方式的组包,解包处理。承德渠道
32
             returnData = this.doIntegrate(msg)
32
             returnData = this.doIntegrate(msg)
33
         } catch (ex) {
33
         } catch (ex) {
34
             // 写错误信息
34
             // 写错误信息
35
-            PlatformLogger.systemErrorInfo("组包发生异常:", ex)
35
+            PlatformLogger.SystemErrorInfo("组包发生异常:", ex)
36
             throw ex
36
             throw ex
37
         }
37
         }
38
         return returnData
38
         return returnData
117
             // 报文头字节数组
117
             // 报文头字节数组
118
             const msgTitleByte = new TextEncoder().encode(msgTitle)
118
             const msgTitleByte = new TextEncoder().encode(msgTitle)
119
             totalMsgData = new Uint8Array(len8.length + msgTitleByte.length + msgData.length + 1)
119
             totalMsgData = new Uint8Array(len8.length + msgTitleByte.length + msgData.length + 1)
120
-            
120
+
121
             for (let j = 0; j < totalMsgData.length - 1; j++) {
121
             for (let j = 0; j < totalMsgData.length - 1; j++) {
122
                 if (j < len8.length) {
122
                 if (j < len8.length) {
123
                     totalMsgData[j] = len8[j]
123
                     totalMsgData[j] = len8[j]
137
                 // 文件追加到数据后
137
                 // 文件追加到数据后
138
                 const file = new TextEncoder().encode(Message.cconv(msg.fileData))
138
                 const file = new TextEncoder().encode(Message.cconv(msg.fileData))
139
                 const lenData = new TextEncoder().encode(file.length.toString().padStart(8, '0'))
139
                 const lenData = new TextEncoder().encode(file.length.toString().padStart(8, '0'))
140
-                const fileName = !msg._filename 
141
-                    ? new TextEncoder().encode(msg._filename.padEnd(30)) 
142
-                    : new TextEncoder().encode((msg.loginUserInfo.kinbrNo + msg.loginUserInfo.ttyName).padEnd(30))
143
-                
140
+                const fileName = !msg._filename
141
+                    ? new TextEncoder().encode(msg._filename.value.padEnd(30))//hulei 取value 转右补齐
142
+                    : new TextEncoder().encode((LoginUserInfo.KinbrNo + LoginUserInfo.TtyName).padEnd(30))
143
+
144
                 const ret = new Uint8Array(totalMsgData.length + fileName.length + lenData.length + file.length + 1)
144
                 const ret = new Uint8Array(totalMsgData.length + fileName.length + lenData.length + file.length + 1)
145
                 ret.set(totalMsgData, 0)
145
                 ret.set(totalMsgData, 0)
146
                 ret.set(fileName, totalMsgData.length)
146
                 ret.set(fileName, totalMsgData.length)
152
             }
152
             }
153
         } catch (ex) {
153
         } catch (ex) {
154
             // 写错误信息
154
             // 写错误信息
155
-            PlatformLogger.systemErrorInfo("组包发生异常!", ex)
155
+            PlatformLogger.SystemErrorInfo("组包发生异常!", ex)
156
             throw ex
156
             throw ex
157
         }
157
         }
158
         return totalMsgData
158
         return totalMsgData
184
             // 取得报文数据区内容
184
             // 取得报文数据区内容
185
             msgData = new Uint8Array(msgDataLen)
185
             msgData = new Uint8Array(msgDataLen)
186
             msgData.set(returnData.subarray(68, 68 + msgDataLen), 0)
186
             msgData.set(returnData.subarray(68, 68 + msgDataLen), 0)
187
-            
187
+
188
             if (!msg.anilyzeFd(msgData)) {
188
             if (!msg.anilyzeFd(msgData)) {
189
                 // 解包失败
189
                 // 解包失败
190
                 throw new Error("8583通讯解包操作失败!具体情况请查看日志!")
190
                 throw new Error("8583通讯解包操作失败!具体情况请查看日志!")
197
                 const fileData = new Uint8Array(fileLen)
197
                 const fileData = new Uint8Array(fileLen)
198
                 fileData.set(returnData.subarray(68 + msgDataLen + 38 + 1, 68 + msgDataLen + 38 + 1 + fileLen), 0)
198
                 fileData.set(returnData.subarray(68 + msgDataLen + 38 + 1, 68 + msgDataLen + 38 + 1 + fileLen), 0)
199
                 // 返回解包后文件数据
199
                 // 返回解包后文件数据
200
-                msg.fileData = Message.cconv(new TextDecoder().decode(fileData), false)
200
+                msg.fileData = Message.cconv(new TextDecoder().decode(fileData))
201
                 // 写调试日志
201
                 // 写调试日志
202
-                PlatformLogger.communicationInfo("\n文件数据:\n" + new TextDecoder().decode(fileData))
202
+                PlatformLogger.CommunicationInfo("\n文件数据:\n" + new TextDecoder().decode(fileData))
203
             }
203
             }
204
         } catch (ex) {
204
         } catch (ex) {
205
             // 写错误信息
205
             // 写错误信息
206
-            PlatformLogger.systemErrorInfo("解析报文失败!", ex)
206
+            PlatformLogger.SystemErrorInfo("解析报文失败!", ex)
207
             throw ex
207
             throw ex
208
         }
208
         }
209
     }
209
     }
213
         const clnm = "".padStart(5, ' ')         //5位   空串
213
         const clnm = "".padStart(5, ' ')         //5位   空串
214
         const svcnm = "".padStart(15, ' ')        //15位  Tuxedo交易服务名
214
         const svcnm = "".padStart(15, ' ')        //15位  Tuxedo交易服务名
215
         const reqtype = "4"                       //1位   "4"
215
         const reqtype = "4"                       //1位   "4"
216
-        const branchNo = msg.fd3.padStart(10, ' ') //10位   机构编号
217
-        const tty = msg.fd10.padStart(12, ' ')    //12位   终端号
216
+        const branchNo = msg.Fd3.padStart(10, ' ') //10位   机构编号
217
+        const tty = msg.Fd10.padStart(12, ' ')    //12位   终端号
218
         const titaOr8583 = "8"                    //1位   代码中的值 8'
218
         const titaOr8583 = "8"                    //1位   代码中的值 8'
219
         const cbs = "".padStart(10, ' ')          //10位  空串
219
         const cbs = "".padStart(10, ' ')          //10位  空串
220
         const macflg = "".padStart(1, ' ')        //1位   空串
220
         const macflg = "".padStart(1, ' ')        //1位   空串
223
         const len = msgDataLen.padStart(4, '0')   //4位   8583数据区长度
223
         const len = msgDataLen.padStart(4, '0')   //4位   8583数据区长度
224
 
224
 
225
         // TUXEDO方式报文头
225
         // TUXEDO方式报文头
226
-        return clnm + svcnm + reqtype + branchNo + tty + titaOr8583 + 
227
-               cbs + macflg + mac + result + len
226
+        return clnm + svcnm + reqtype + branchNo + tty + titaOr8583 +
227
+            cbs + macflg + mac + result + len
228
     }
228
     }
229
-}
229
+}

+ 7
- 7
ant-design-pro-vue3/src/views/front/develop/Communication/Package/Msg858302.ts View File

1
-import { Message } from './Message'
2
-import { PlatformLogger } from './PlatformLogger'
1
+import Message from "@/views/front/develop/Communication/Message";
2
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger";
3
 import { PlatformSettings } from './PlatformSettings'
3
 import { PlatformSettings } from './PlatformSettings'
4
 import { IPackage } from './IPackage'
4
 import { IPackage } from './IPackage'
5
 import { MsgPackage } from './MsgPackage'
5
 import { MsgPackage } from './MsgPackage'
122
             // 报文头字节数组
122
             // 报文头字节数组
123
             const msgTitleByte = new TextEncoder().encode(msgTitle)
123
             const msgTitleByte = new TextEncoder().encode(msgTitle)
124
             totalMsgData = new Uint8Array(len8.length + msgTitleByte.length + msgData.length + 1)
124
             totalMsgData = new Uint8Array(len8.length + msgTitleByte.length + msgData.length + 1)
125
-            
125
+
126
             for (let j = 0; j < totalMsgData.length - 1; j++) {
126
             for (let j = 0; j < totalMsgData.length - 1; j++) {
127
                 if (j < len8.length) {
127
                 if (j < len8.length) {
128
                     totalMsgData[j] = len8[j]
128
                     totalMsgData[j] = len8[j]
164
         const len = msgDataLen.padStart(4, '0')  //4位   8583数据区长度
164
         const len = msgDataLen.padStart(4, '0')  //4位   8583数据区长度
165
 
165
 
166
         // TUXEDO方式报文头
166
         // TUXEDO方式报文头
167
-        return clnm + svcnm + reqtype + branchNo + tty + titaOr8583 + 
168
-               cbs + macflg + mac + result + len
167
+        return clnm + svcnm + reqtype + branchNo + tty + titaOr8583 +
168
+            cbs + macflg + mac + result + len
169
     }
169
     }
170
 
170
 
171
     // 解包处理
171
     // 解包处理
189
             // 取得报文数据区内容
189
             // 取得报文数据区内容
190
             msgData = new Uint8Array(msgDataLen)
190
             msgData = new Uint8Array(msgDataLen)
191
             msgData.set(returnData.subarray(68, 68 + msgDataLen), 0)
191
             msgData.set(returnData.subarray(68, 68 + msgDataLen), 0)
192
-            
192
+
193
             if (!msg.anilyzeFd(msgData)) {
193
             if (!msg.anilyzeFd(msgData)) {
194
                 // 解包失败
194
                 // 解包失败
195
                 throw new Error("8583通讯解包操作失败!具体情况请查看日志!")
195
                 throw new Error("8583通讯解包操作失败!具体情况请查看日志!")
200
             throw ex
200
             throw ex
201
         }
201
         }
202
     }
202
     }
203
-}
203
+}

+ 41
- 39
ant-design-pro-vue3/src/views/front/develop/Constract/ContractBase/PageBase.ts View File

3
 import { TradeInfoHelper } from './TradeInfoHelper'
3
 import { TradeInfoHelper } from './TradeInfoHelper'
4
 import { TradeAPIsHelper } from './TradeAPIsHelper'
4
 import { TradeAPIsHelper } from './TradeAPIsHelper'
5
 import { TradeResourcesHelper } from './TradeResourcesHelper'
5
 import { TradeResourcesHelper } from './TradeResourcesHelper'
6
-import { PaperlessEntry } from './PaperlessEntry'
7
-import { CashCodeEntry } from './CashCodeEntry'
8
-import { PlatformLogger } from '../../Platform.Common/LogSystem/PlatformLogger'
9
-import { ServiceSettings } from '../../TellerSystem.ServiceProxy/Ext/ServiceHelper/ServiceSettings'
10
-import { TradeHandle } from '../../TellerSystem.Library/Ext/Function/TradeHandle'
11
-import { PrintAttributes } from '../../Platform.Presentation/PageFunctions/PrintAttributes'
6
+//import { PaperlessEntry } from './PaperlessEntry'
7
+//import { CashCodeEntry } from './CashCodeEntry'
8
+import PlatformLogger from "@/views/front/platfrom/common/LogSystem/PlatformLogger";
9
+import { ServiceSettings } from "@/views/front/develop/ServiceProxy.Ext/ServiceSettings"
10
+import TradeHandle from '../../ServiceProxy.Ext/ServiceHelper/TradeHandle'
11
+import { PrintAttributes } from "../../PrintTemplate/Extension/PrintAttributes";
12
+//import TradeModel from "@/views/front/platfrom/common/BasicFunctions/";
13
+
12
 
14
 
13
 /**
15
 /**
14
  * 页面基类,填充通用的业务接口API
16
  * 页面基类,填充通用的业务接口API
51
         return this._tradeResources
53
         return this._tradeResources
52
     }
54
     }
53
 
55
 
54
-    // 无纸化对象
55
-    private paperless: PaperlessEntry | null = null
56
-    get Paperless(): PaperlessEntry {
57
-        if (!this.paperless) {
58
-            this.paperless = new PaperlessEntry()
59
-        }
60
-        return this.paperless
61
-    }
56
+    // 无纸化对象 hulei  无纸化和冠字号没用 暂时注销
57
+    // private paperless: PaperlessEntry | null = null
58
+    // get Paperless(): PaperlessEntry {
59
+    //     if (!this.paperless) {
60
+    //         this.paperless = new PaperlessEntry()
61
+    //     }
62
+    //     return this.paperless
63
+    // }
62
 
64
 
63
     // 冠字号对象
65
     // 冠字号对象
64
-    private cashCode: CashCodeEntry | null = null
65
-    get CashCode(): CashCodeEntry {
66
-        if (!this.cashCode) {
67
-            this.cashCode = new CashCodeEntry()
68
-        }
69
-        return this.cashCode
70
-    }
66
+    // private cashCode: CashCodeEntry | null = null
67
+    // get CashCode(): CashCodeEntry {
68
+    //     if (!this.cashCode) {
69
+    //         this.cashCode = new CashCodeEntry()
70
+    //     }
71
+    //     return this.cashCode
72
+    // }
71
 
73
 
72
     // 银行标签
74
     // 银行标签
73
     get BankFlag(): string {
75
     get BankFlag(): string {
104
                 }
106
                 }
105
             }
107
             }
106
         } catch (e) {
108
         } catch (e) {
107
-            PlatformLogger.tradeErrorInfo('调用InitPage失败!', e, this.TradeModel.Code)
109
+            PlatformLogger.TradeErrorInfo('调用InitPage失败!', e,)// TradeModel.Code hulei trademodel 不明确类
108
         }
110
         }
109
         if (!flag) {
111
         if (!flag) {
110
             // 关闭页面逻辑
112
             // 关闭页面逻辑
116
      */
118
      */
117
     private log2PagePrinted(log: string): void {
119
     private log2PagePrinted(log: string): void {
118
         try {
120
         try {
119
-            PlatformLogger.systemInfo(`Log2PagePrinted:start 【${log}】=>${this.pagePrintedHandlers.length}`)
121
+            PlatformLogger.SystemInfo(`Log2PagePrinted:start 【${log}】=>${this.pagePrintedHandlers.length}`)
120
             if (this.pagePrintedHandlers.length === 0) return
122
             if (this.pagePrintedHandlers.length === 0) return
121
-            PlatformLogger.systemInfo(`Log2PagePrinted:list length=>${this.pagePrintedHandlers.length}`)
122
-        } catch {}
123
+            PlatformLogger.SystemInfo(`Log2PagePrinted:list length=>${this.pagePrintedHandlers.length}`)
124
+        } catch { }
123
     }
125
     }
124
 
126
 
125
     /**
127
     /**
126
      * 触发打印后事件
128
      * 触发打印后事件
127
      */
129
      */
128
     public onPagePrinted(attr: PrintAttributes): void {
130
     public onPagePrinted(attr: PrintAttributes): void {
129
-        PlatformLogger.systemInfo(`OnPagePrinted:触发事件=>${this.pagePrintedHandlers.length}`)
131
+        PlatformLogger.SystemInfo(`OnPagePrinted:触发事件=>${this.pagePrintedHandlers.length}`)
130
         if (this.pagePrintedHandlers.length > 0) {
132
         if (this.pagePrintedHandlers.length > 0) {
131
             this.log2PagePrinted('OnPagePrinted.start')
133
             this.log2PagePrinted('OnPagePrinted.start')
132
             this.pagePrintedHandlers.forEach(handler => handler(attr))
134
             this.pagePrintedHandlers.forEach(handler => handler(attr))
152
      * 清理缓存数据
154
      * 清理缓存数据
153
      */
155
      */
154
     public clear(): void {
156
     public clear(): void {
155
-        this.paperless = null
157
+        // this.paperless = null
156
         this._tradeAPIs = null
158
         this._tradeAPIs = null
157
         this._tradeBus = null
159
         this._tradeBus = null
158
         this._tradeInfo = null
160
         this._tradeInfo = null
160
     }
162
     }
161
 }
163
 }
162
 
164
 
163
-// Vue组件封装
164
-export const PageBaseComponent = defineComponent({
165
-    extends: PageBase,
166
-    methods: {
167
-        initPage(): boolean {
168
-            return super.initPage()
169
-        },
170
-        onPagePrinted(attr: PrintAttributes): void {
171
-            super.onPagePrinted(attr)
172
-        }
173
-    }
174
-})
165
+// // Vue组件封装
166
+// export const PageBaseComponent = defineComponent({
167
+//     extends: PageBase,
168
+//     methods: {
169
+//         initPage(): boolean {
170
+//             return super.initPage()
171
+//         },
172
+//         onPagePrinted(attr: PrintAttributes): void {
173
+//             super.onPagePrinted(attr)
174
+//         }
175
+//     }
176
+// })

+ 47
- 47
ant-design-pro-vue3/src/views/front/develop/Constract/Contracts/ContractManager.ts View File

1
 import { reactive } from 'vue'
1
 import { reactive } from 'vue'
2
-import type { PageBase } from './PageBase'
3
-import type { Message } from './Message'
2
+import type { PageBase } from "@/views/front/develop/Constract/ContractBase/PageBase"
3
+import Message from "@/views/front/develop/Communication/Message";
4
 import type { PrintContainer } from './PrintContainer'
4
 import type { PrintContainer } from './PrintContainer'
5
 import type { EvaluationRecord } from './EvaluationRecord'
5
 import type { EvaluationRecord } from './EvaluationRecord'
6
 import type { PaymentFeeArguments } from './PaymentFeeArguments'
6
 import type { PaymentFeeArguments } from './PaymentFeeArguments'
21
             authdata.ClearAuthData()
21
             authdata.ClearAuthData()
22
             const contract = page as ISubmitContract
22
             const contract = page as ISubmitContract
23
             if (!contract || !contract.SubmitEntry) return false
23
             if (!contract || !contract.SubmitEntry) return false
24
-            
24
+
25
             if (contract.SubmitEntry.Submitted) {
25
             if (contract.SubmitEntry.Submitted) {
26
                 TradeHandle.WriteTraceLog("ContractManager.RaiseSubmit:阻断错误的重复提交!", contract.SubmitEntry.MessageData.Fd16)
26
                 TradeHandle.WriteTraceLog("ContractManager.RaiseSubmit:阻断错误的重复提交!", contract.SubmitEntry.MessageData.Fd16)
27
                 return false
27
                 return false
35
 
35
 
36
             const entry = contract.SubmitEntry
36
             const entry = contract.SubmitEntry
37
             if (!entry || !entry.LoadData(page, message)) return false
37
             if (!entry || !entry.LoadData(page, message)) return false
38
-            
39
-            if (!this.RaiseRecheck(page, message)) return false             
38
+
39
+            if (!this.RaiseRecheck(page, message)) return false
40
             if (!this.RaiseAuthorize(page, message)) return false
40
             if (!this.RaiseAuthorize(page, message)) return false
41
             if (!this.RaisePaymentFee(page, message)) return false
41
             if (!this.RaisePaymentFee(page, message)) return false
42
             if (!entry.RaiseSubmit()) return false
42
             if (!entry.RaiseSubmit()) return false
51
         if (page.isAuthorizeContract) {
51
         if (page.isAuthorizeContract) {
52
             const contract = page as IAuthorizeContract
52
             const contract = page as IAuthorizeContract
53
             if (!contract) return false
53
             if (!contract) return false
54
-            
54
+
55
             if (ExamSystem.Instance.InExamMode) return true
55
             if (ExamSystem.Instance.InExamMode) return true
56
-            
56
+
57
             if (page.TradeAPIs.GetTradeMetadata("isAuth") !== "true") return true
57
             if (page.TradeAPIs.GetTradeMetadata("isAuth") !== "true") return true
58
-            
58
+
59
             if (!contract.AuthorizeEntries || contract.AuthorizeEntries.length === 0) return false
59
             if (!contract.AuthorizeEntries || contract.AuthorizeEntries.length === 0) return false
60
 
60
 
61
             const entry = contract.AuthorizeEntries.find(x => x.PowerCode === powerCode)
61
             const entry = contract.AuthorizeEntries.find(x => x.PowerCode === powerCode)
62
             if (!entry) return false
62
             if (!entry) return false
63
-            
63
+
64
             entry.LoadData(page, message)
64
             entry.LoadData(page, message)
65
             return entry.RaiseAuthorize()
65
             return entry.RaiseAuthorize()
66
         }
66
         }
74
         if (page.isRecheckContract) {
74
         if (page.isRecheckContract) {
75
             const contract = page as IRecheckContract
75
             const contract = page as IRecheckContract
76
             if (!contract) return false
76
             if (!contract) return false
77
-            
77
+
78
             if (ExamSystem.Instance.InExamMode) return true
78
             if (ExamSystem.Instance.InExamMode) return true
79
-            
79
+
80
             if (page.TradeAPIs.GetTradeMetadata("isRecheck") !== "true") return true
80
             if (page.TradeAPIs.GetTradeMetadata("isRecheck") !== "true") return true
81
-            
81
+
82
             if (!contract.RecheckEntries || contract.RecheckEntries.length === 0) return false
82
             if (!contract.RecheckEntries || contract.RecheckEntries.length === 0) return false
83
 
83
 
84
             const entry = contract.RecheckEntries.find(x => x.PowerCode === powerCode)
84
             const entry = contract.RecheckEntries.find(x => x.PowerCode === powerCode)
85
             if (!entry) return false
85
             if (!entry) return false
86
-            
86
+
87
             entry.LoadData(page, message)
87
             entry.LoadData(page, message)
88
             return entry.RaiseRecheck()
88
             return entry.RaiseRecheck()
89
         }
89
         }
97
         if (page.isPaymentFeeContract) {
97
         if (page.isPaymentFeeContract) {
98
             const contract = page as IPaymentFeeContract
98
             const contract = page as IPaymentFeeContract
99
             if (!contract) return false
99
             if (!contract) return false
100
-            
100
+
101
             if (page.TradeAPIs.GetTradeMetadata("isPaymentFee") !== "true") return true
101
             if (page.TradeAPIs.GetTradeMetadata("isPaymentFee") !== "true") return true
102
-            
102
+
103
             if (message.TransitNode === TransitType.CallGateway2CBS) {
103
             if (message.TransitNode === TransitType.CallGateway2CBS) {
104
                 PlatformLogger.CommunicationInfo("核心前置通讯不支持收费(TransitType.CallGateway2CBS)")
104
                 PlatformLogger.CommunicationInfo("核心前置通讯不支持收费(TransitType.CallGateway2CBS)")
105
                 return true
105
                 return true
107
 
107
 
108
             const FLAG = TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("2ea3a7e6cfa04f89a335bf1e363295de")
108
             const FLAG = TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("2ea3a7e6cfa04f89a335bf1e363295de")
109
             const filedata = message.FileData
109
             const filedata = message.FileData
110
-            
110
+
111
             let isPaymentFee = false
111
             let isPaymentFee = false
112
             const args = new PaymentFeeArguments(message)
112
             const args = new PaymentFeeArguments(message)
113
             if (!contract.CheckFee(args, out isPaymentFee)) return false
113
             if (!contract.CheckFee(args, out isPaymentFee)) return false
114
-            
114
+
115
             if (isPaymentFee && !contract.RaisePaymentFee(args)) return false
115
             if (isPaymentFee && !contract.RaisePaymentFee(args)) return false
116
-            
116
+
117
             message.FileData = filedata
117
             message.FileData = filedata
118
         }
118
         }
119
         return true
119
         return true
125
     public static RaiseEvaluation(page: PageBase): void {
125
     public static RaiseEvaluation(page: PageBase): void {
126
         const contract = page as IEvaluationContract
126
         const contract = page as IEvaluationContract
127
         if (!contract) return
127
         if (!contract) return
128
-        
128
+
129
         if (page.TradeAPIs.GetTradeMetadata("isEvaluation") !== "true") return
129
         if (page.TradeAPIs.GetTradeMetadata("isEvaluation") !== "true") return
130
-        
130
+
131
         const record = new EvaluationRecord()
131
         const record = new EvaluationRecord()
132
         if (!contract.PreviewEvaluation(record)) {
132
         if (!contract.PreviewEvaluation(record)) {
133
             const list_accno = page.PositioningUI(["账/卡号", "账号", "卡    号", "账    号", "结算账号", "账/卡号", "贷款账号", "还款账号", "贷方账号", "记贷付款账号", "借据展示号", "记账账号", "收款人账号", "付款人账号", "签约账号", "账/卡 号", "本行账号", "申请人账号"])
133
             const list_accno = page.PositioningUI(["账/卡号", "账号", "卡    号", "账    号", "结算账号", "账/卡号", "贷款账号", "还款账号", "贷方账号", "记贷付款账号", "借据展示号", "记账账号", "收款人账号", "付款人账号", "签约账号", "账/卡 号", "本行账号", "申请人账号"])
135
                 .map(x => (x[1] as HTMLInputElement).value)
135
                 .map(x => (x[1] as HTMLInputElement).value)
136
                 .filter((value, index, self) => self.indexOf(value) === index)
136
                 .filter((value, index, self) => self.indexOf(value) === index)
137
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
137
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
138
-            
138
+
139
             const list_idno = page.PositioningUI(["证件号码"])
139
             const list_idno = page.PositioningUI(["证件号码"])
140
                 .filter(x => x[1] instanceof HTMLInputElement)
140
                 .filter(x => x[1] instanceof HTMLInputElement)
141
                 .map(x => (x[1] as HTMLInputElement).value)
141
                 .map(x => (x[1] as HTMLInputElement).value)
142
                 .filter((value, index, self) => self.indexOf(value) === index)
142
                 .filter((value, index, self) => self.indexOf(value) === index)
143
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
143
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
144
-            
144
+
145
             const list_name = page.PositioningUI(["户    名", "户  名", "客户名称"])
145
             const list_name = page.PositioningUI(["户    名", "户  名", "客户名称"])
146
                 .filter(x => x[1] instanceof HTMLInputElement)
146
                 .filter(x => x[1] instanceof HTMLInputElement)
147
                 .map(x => (x[1] as HTMLInputElement).value)
147
                 .map(x => (x[1] as HTMLInputElement).value)
148
                 .filter((value, index, self) => self.indexOf(value) === index)
148
                 .filter((value, index, self) => self.indexOf(value) === index)
149
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
149
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
150
-            
150
+
151
             const list_amt = page.PositioningUI(["交易金额", "开户金额", "支取金额"])
151
             const list_amt = page.PositioningUI(["交易金额", "开户金额", "支取金额"])
152
                 .filter(x => x[1] instanceof HTMLInputElement)
152
                 .filter(x => x[1] instanceof HTMLInputElement)
153
                 .map(x => (x[1] as HTMLInputElement).value)
153
                 .map(x => (x[1] as HTMLInputElement).value)
154
                 .filter((value, index, self) => self.indexOf(value) === index)
154
                 .filter((value, index, self) => self.indexOf(value) === index)
155
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
155
                 .reduce((acc, curr) => (acc[curr] = curr, acc), {} as Record<string, string>)
156
-            
156
+
157
             record.AccNo = Object.keys(list_accno).length === 1 ? list_accno[Object.keys(list_accno)[0]] : ''
157
             record.AccNo = Object.keys(list_accno).length === 1 ? list_accno[Object.keys(list_accno)[0]] : ''
158
             record.IdNo = Object.keys(list_idno).length === 1 ? list_idno[Object.keys(list_idno)[0]] : ''
158
             record.IdNo = Object.keys(list_idno).length === 1 ? list_idno[Object.keys(list_idno)[0]] : ''
159
             record.Name = Object.keys(list_name).length === 1 ? list_name[Object.keys(list_name)[0]] : ''
159
             record.Name = Object.keys(list_name).length === 1 ? list_name[Object.keys(list_name)[0]] : ''
160
             record.Amt = Object.keys(list_amt).length === 1 ? list_amt[Object.keys(list_amt)[0]] : ''
160
             record.Amt = Object.keys(list_amt).length === 1 ? list_amt[Object.keys(list_amt)[0]] : ''
161
-            
161
+
162
             const gen = (title: string, dict: Record<string, string>): HTMLElement => {
162
             const gen = (title: string, dict: Record<string, string>): HTMLElement => {
163
                 const line = document.createElement('div')
163
                 const line = document.createElement('div')
164
                 line.style.display = 'flex'
164
                 line.style.display = 'flex'
166
                 titleEl.textContent = title
166
                 titleEl.textContent = title
167
                 titleEl.style.width = '120px'
167
                 titleEl.style.width = '120px'
168
                 line.appendChild(titleEl)
168
                 line.appendChild(titleEl)
169
-                
169
+
170
                 const comboBox = document.createElement('select')
170
                 const comboBox = document.createElement('select')
171
                 comboBox.style.width = '300px'
171
                 comboBox.style.width = '300px'
172
                 Object.keys(dict).forEach(key => {
172
                 Object.keys(dict).forEach(key => {
175
                     option.textContent = dict[key]
175
                     option.textContent = dict[key]
176
                     comboBox.appendChild(option)
176
                     comboBox.appendChild(option)
177
                 })
177
                 })
178
-                
178
+
179
                 comboBox.addEventListener('change', () => {
179
                 comboBox.addEventListener('change', () => {
180
                     if (dict === list_accno) record.AccNo = comboBox.value
180
                     if (dict === list_accno) record.AccNo = comboBox.value
181
                     else if (dict === list_idno) record.IdNo = comboBox.value
181
                     else if (dict === list_idno) record.IdNo = comboBox.value
182
                     else if (dict === list_name) record.Name = comboBox.value
182
                     else if (dict === list_name) record.Name = comboBox.value
183
                     else if (dict === list_amt) record.Amt = comboBox.value
183
                     else if (dict === list_amt) record.Amt = comboBox.value
184
                 })
184
                 })
185
-                
185
+
186
                 line.appendChild(comboBox)
186
                 line.appendChild(comboBox)
187
                 return line
187
                 return line
188
             }
188
             }
190
             do {
190
             do {
191
                 if (Object.keys(list_accno).length >= 1 || Object.keys(list_idno).length >= 1) {
191
                 if (Object.keys(list_accno).length >= 1 || Object.keys(list_idno).length >= 1) {
192
                     const content = document.createElement('div')
192
                     const content = document.createElement('div')
193
-                    
193
+
194
                     if (Object.keys(list_accno).length > 0) content.appendChild(gen("银行账号", list_accno))
194
                     if (Object.keys(list_accno).length > 0) content.appendChild(gen("银行账号", list_accno))
195
                     if (Object.keys(list_idno).length > 0) content.appendChild(gen("身份证号", list_idno))
195
                     if (Object.keys(list_idno).length > 0) content.appendChild(gen("身份证号", list_idno))
196
                     if (Object.keys(list_name).length > 0) content.appendChild(gen("客户姓名", list_name))
196
                     if (Object.keys(list_name).length > 0) content.appendChild(gen("客户姓名", list_name))
197
                     if (Object.keys(list_amt).length > 0) content.appendChild(gen("发生金额", list_amt))
197
                     if (Object.keys(list_amt).length > 0) content.appendChild(gen("发生金额", list_amt))
198
-                    
198
+
199
                     if (confirm('请确认当前客户信息:')) {
199
                     if (confirm('请确认当前客户信息:')) {
200
                         if (Object.keys(list_accno).length > 0) record.AccNo = (content.querySelector('select') as HTMLSelectElement).value
200
                         if (Object.keys(list_accno).length > 0) record.AccNo = (content.querySelector('select') as HTMLSelectElement).value
201
                         if (Object.keys(list_idno).length > 0) record.IdNo = (content.querySelectorAll('select')[1] as HTMLSelectElement).value
201
                         if (Object.keys(list_idno).length > 0) record.IdNo = (content.querySelectorAll('select')[1] as HTMLSelectElement).value
208
                 }
208
                 }
209
             } while (true)
209
             } while (true)
210
         }
210
         }
211
-        
211
+
212
         PlatformLogger.SystemInfo("RaiseEvaluation:数据=>" + record.toString())
212
         PlatformLogger.SystemInfo("RaiseEvaluation:数据=>" + record.toString())
213
-        
213
+
214
         if (!record.IdNo.trim() && record.AccNo.trim()) {
214
         if (!record.IdNo.trim() && record.AccNo.trim()) {
215
             const ac = page.TradeAPIs.TF_Customer_QueryCustomerInformation({
215
             const ac = page.TradeAPIs.TF_Customer_QueryCustomerInformation({
216
                 ZH: record.AccNo.trim()
216
                 ZH: record.AccNo.trim()
219
                 record.IdNo = ac.ZJHM.trim()
219
                 record.IdNo = ac.ZJHM.trim()
220
             }
220
             }
221
         }
221
         }
222
-        
222
+
223
         if (!record.Name) {
223
         if (!record.Name) {
224
             if (record.IdNo.trim()) {
224
             if (record.IdNo.trim()) {
225
                 const khInfo = page.TradeAPIs.TF_Customer_QueryCustomerInformation({
225
                 const khInfo = page.TradeAPIs.TF_Customer_QueryCustomerInformation({
257
                 return
257
                 return
258
             }
258
             }
259
         }
259
         }
260
-        
260
+
261
         const msg1 = new Message(Message.BitMap.Agn)
261
         const msg1 = new Message(Message.BitMap.Agn)
262
         page.InitFd(msg1)
262
         page.InitFd(msg1)
263
         page.CommSend(msg1)
263
         page.CommSend(msg1)
276
         msg1.Fd26 = record.Name
276
         msg1.Fd26 = record.Name
277
         msg1.Fd24 = "1"
277
         msg1.Fd24 = "1"
278
         msg1.Fd38 = page.TradeInfo.SerialNumber
278
         msg1.Fd38 = page.TradeInfo.SerialNumber
279
-        msg1.Fd27 = LoginUserInfo.KinbrName.includes("银行") 
280
-            ? LoginUserInfo.KinbrName.split("银行")[1] 
279
+        msg1.Fd27 = LoginUserInfo.KinbrName.includes("银行")
280
+            ? LoginUserInfo.KinbrName.split("银行")[1]
281
             : LoginUserInfo.KinbrName
281
             : LoginUserInfo.KinbrName
282
-        
282
+
283
         page.CallAgn(msg1)
283
         page.CallAgn(msg1)
284
         if (msg1.Fd12 !== "0000") {
284
         if (msg1.Fd12 !== "0000") {
285
             page.TradeAPIs.ShowInfoMessageBox(`${page.GetError(msg1)}\n,微信评价推送失败!`)
285
             page.TradeAPIs.ShowInfoMessageBox(`${page.GetError(msg1)}\n,微信评价推送失败!`)
293
      */
293
      */
294
     public static RaisePrint(page: PageBase, message: Message, printList: PrintContainer[]): boolean {
294
     public static RaisePrint(page: PageBase, message: Message, printList: PrintContainer[]): boolean {
295
         if (!page || !message || !printList) return false
295
         if (!page || !message || !printList) return false
296
-        
296
+
297
         const pl: PrintContainer[] = []
297
         const pl: PrintContainer[] = []
298
         const printAttr = page.GetPrintAttributes()
298
         const printAttr = page.GetPrintAttributes()
299
-        
299
+
300
         if (message.Fd4) {
300
         if (message.Fd4) {
301
             printAttr.SerialNumber = page.CreateTellerSerialNumber(printAttr.SystemSerialNumber)
301
             printAttr.SerialNumber = page.CreateTellerSerialNumber(printAttr.SystemSerialNumber)
302
             printAttr.BusinessTransaction = message.Fd4
302
             printAttr.BusinessTransaction = message.Fd4
303
-            
303
+
304
             if (printAttr.BusinessTransaction === "000000000" && message.CustomizeTransitEntry?.SerialNo) {
304
             if (printAttr.BusinessTransaction === "000000000" && message.CustomizeTransitEntry?.SerialNo) {
305
                 printAttr.BusinessTransaction = message.CustomizeTransitEntry.SerialNo
305
                 printAttr.BusinessTransaction = message.CustomizeTransitEntry.SerialNo
306
             }
306
             }
307
         }
307
         }
308
-        
308
+
309
         for (const item of printList) {
309
         for (const item of printList) {
310
             PrintContainerExt.SetPrintElement(item, printAttr)
310
             PrintContainerExt.SetPrintElement(item, printAttr)
311
-            
311
+
312
             const printfee = item as IPrintFeeContract
312
             const printfee = item as IPrintFeeContract
313
             const print = item as IPrintContract
313
             const print = item as IPrintContract
314
-            
314
+
315
             if (!print || !print.PrintData) {
315
             if (!print || !print.PrintData) {
316
                 pl.push(item)
316
                 pl.push(item)
317
             } else {
317
             } else {
318
                 print.PrintData.LoadData(page, message)
318
                 print.PrintData.LoadData(page, message)
319
-                
319
+
320
                 try {
320
                 try {
321
                     if (item.DocumentId === "TellerSystem.Controls.Ext.PrintsHelper.Print_Fee") {
321
                     if (item.DocumentId === "TellerSystem.Controls.Ext.PrintsHelper.Print_Fee") {
322
                         const msg = new Message()
322
                         const msg = new Message()
331
                 } catch (ex) {
331
                 } catch (ex) {
332
                     PlatformLogger.SystemErrorInfo("RaisePrintflow:调用LoadPrintData方法发生异常!", ex)
332
                     PlatformLogger.SystemErrorInfo("RaisePrintflow:调用LoadPrintData方法发生异常!", ex)
333
                 }
333
                 }
334
-                
334
+
335
                 if (print.PrintData.IsBatchPrint) {
335
                 if (print.PrintData.IsBatchPrint) {
336
                     print.PrintData.BatchList.forEach(x => PrintContainerExt.SetPrintElement(x, printAttr))
336
                     print.PrintData.BatchList.forEach(x => PrintContainerExt.SetPrintElement(x, printAttr))
337
                     pl.push(...print.PrintData.BatchList)
337
                     pl.push(...print.PrintData.BatchList)
340
                 }
340
                 }
341
             }
341
             }
342
         }
342
         }
343
-        
343
+
344
         const list = page.TradeAPIs.DoPrintLimit(page.TradeModel.Code, pl)
344
         const list = page.TradeAPIs.DoPrintLimit(page.TradeModel.Code, pl)
345
         page.PrintCertificate(list)
345
         page.PrintCertificate(list)
346
         return true
346
         return true
357
         RaiseEvaluation: ContractManager.RaiseEvaluation,
357
         RaiseEvaluation: ContractManager.RaiseEvaluation,
358
         RaisePrint: ContractManager.RaisePrint
358
         RaisePrint: ContractManager.RaisePrint
359
     })
359
     })
360
-}
360
+}

+ 4
- 5
ant-design-pro-vue3/src/views/front/develop/Constract/Contracts/IPaymentFeeContract.ts View File

1
-import type { Message } from './Message'
2
-
1
+import Message from "@/views/front/develop/Communication/Message";
3
 /**
2
 /**
4
  * 收费合约接口
3
  * 收费合约接口
5
  */
4
  */
54
 // Vue组件封装
53
 // Vue组件封装
55
 export const usePaymentFeeContract = (impl: IPaymentFeeContract) => {
54
 export const usePaymentFeeContract = (impl: IPaymentFeeContract) => {
56
     return {
55
     return {
57
-        CheckFee: (args: PaymentFeeArguments, isPaymentFee: { value: boolean }) => 
56
+        CheckFee: (args: PaymentFeeArguments, isPaymentFee: { value: boolean }) =>
58
             impl.CheckFee(args, isPaymentFee),
57
             impl.CheckFee(args, isPaymentFee),
59
-        RaisePaymentFee: (args: PaymentFeeArguments) => 
58
+        RaisePaymentFee: (args: PaymentFeeArguments) =>
60
             impl.RaisePaymentFee(args)
59
             impl.RaisePaymentFee(args)
61
     }
60
     }
62
-}
61
+}

+ 2
- 2
ant-design-pro-vue3/src/views/front/develop/Constract/Contracts/ISubmitContract.ts View File

1
-import type { Message } from './Message'
1
+import Message from "@/views/front/develop/Communication/Message";
2
 import type { SubmitEntry } from './SubmitEntry'
2
 import type { SubmitEntry } from './SubmitEntry'
3
 
3
 
4
 /**
4
 /**
23
     return {
23
     return {
24
         ISubmitContract
24
         ISubmitContract
25
     }
25
     }
26
-}
26
+}

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

5
 import CommonFunction from "@/views/front/platfrom/serviceproxy/CommonFunction";
5
 import CommonFunction from "@/views/front/platfrom/serviceproxy/CommonFunction";
6
 import { ServiceSettings } from "@/views/front/develop/ServiceProxy.Ext/ServiceSettings"
6
 import { ServiceSettings } from "@/views/front/develop/ServiceProxy.Ext/ServiceSettings"
7
 import FilesHandle from '@/views/front/platfrom/serviceproxy/ServiceHelper/FilesHandle';
7
 import FilesHandle from '@/views/front/platfrom/serviceproxy/ServiceHelper/FilesHandle';
8
+import { CheckInfo } from '@/views/front/develop/ServiceProxy.Ext/ServiceEntitys/CheckInfo';
9
+import { CheckResult } from '@/views/front/develop/ServiceProxy.Ext/ServiceEntitys/CheckResult';
10
+import { AuthResult } from '@/views/front/develop/ServiceProxy.Ext/ServiceEntitys/AuthResult';
11
+
8
 
12
 
9
 export enum Transit {
13
 export enum Transit {
10
     CallServer = 'CallServer',
14
     CallServer = 'CallServer',
167
             const tmpresult = await ServiceManager.GetInstance().Commit(entity)
171
             const tmpresult = await ServiceManager.GetInstance().Commit(entity)
168
             if (tmpresult && tmpresult.length === 1) {
172
             if (tmpresult && tmpresult.length === 1) {
169
                 const rmpresult = CommonFunction.ChangeTableToEntitys<CheckResult>(
173
                 const rmpresult = CommonFunction.ChangeTableToEntitys<CheckResult>(
170
-                    tmpresult[0].AttachValue as DataTable
174
+                    tmpresult[0].AttachValue
171
                 )
175
                 )
172
                 if (rmpresult.length > 0) {
176
                 if (rmpresult.length > 0) {
173
                     result = rmpresult[0]
177
                     result = rmpresult[0]
241
             const tmpresult = await ServiceManager.GetInstance().Commit(entity)
245
             const tmpresult = await ServiceManager.GetInstance().Commit(entity)
242
             if (tmpresult && tmpresult.length === 1) {
246
             if (tmpresult && tmpresult.length === 1) {
243
                 const rmpresult = CommonFunction.ChangeTableToEntitys<AuthResult>(
247
                 const rmpresult = CommonFunction.ChangeTableToEntitys<AuthResult>(
244
-                    tmpresult[0].AttachValue as DataTable
248
+                    tmpresult[0].AttachValue
245
                 )
249
                 )
246
                 if (rmpresult.length > 0) {
250
                 if (rmpresult.length > 0) {
247
                     result = rmpresult[0]
251
                     result = rmpresult[0]
252
         }
256
         }
253
         return result
257
         return result
254
     }
258
     }
259
+    WriteImportantLog
255
 }
260
 }
256
 
261
 
257
-interface CheckInfo {
258
-    // ... 检查信息字段
259
-}
260
 
262
 
261
-interface CheckResult {
262
-    // ... 检查结果字段
263
-}
264
 
263
 
265
-interface AuthResult {
266
-    // ... 授权结果字段
267
-}
264
+
268
 
265
 
269
 interface AskSuperInfo {
266
 interface AskSuperInfo {
270
     // ... 申请复核信息字段
267
     // ... 申请复核信息字段

Loading…
Cancel
Save