// import { ServiceManager } from './ServiceManager'; // 假设 ServiceManager 已经在项目中定义 // import { TransitEntity, AttachFile } from './TransitEntity'; // 假设 TransitEntity 和 AttachFile 已经在项目中定义 // import { CommonFunction } from './CommonFunction'; // 假设 CommonFunction 已经在项目中定义 // import { THotKeyMessage, TTellerHotKey } from './Entitys'; // 假设 THotKeyMessage 和 TTellerHotKey 已经在项目中定义 // import { CommonParames } from './CommonParames'; // 假设 CommonParames 已经在项目中定义 // export class UserManagerHandle { // // 快捷键管理模块 // public static async GetKeyByTeller(tellerNum: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'HotKeyService'; // entity.FuncName = 'GetKeyByTeller'; // entity.Parameters = { '1': tellerNum }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return CommonFunction.ChangeEntityTable((tmpresult[0].AttachValue as DataTable)); // } // return null; // } catch (e) { // throw e; // } // } // public static async DelKeyMessage(keyName: string, tellerNum: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'HotKeyService'; // entity.FuncName = 'DelKeyMessage'; // entity.Parameters = { '1': keyName, '2': tellerNum }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async DelKeyValue(keyName: string, tellerNum: string, keyValue: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'HotKeyService'; // entity.FuncName = 'DelKeyValue'; // entity.Parameters = { '1': keyName, '2': tellerNum, '3': keyValue }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async UpdateKeyMessage(tTellerHotkey: TTellerHotKey): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'HotKeyService'; // entity.FuncName = 'UpdateKeyMessage'; // const attach = new AttachFile(); // attach.AttachIndex = '1'; // attach.AttachType = 'TableType'; // const tmp = [tTellerHotkey]; // attach.AttachValue = CommonFunction.ChangeEntityTable(tmp); // entity.AttachFiles.push(attach); // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // // 柜员管理模块 // public static async SendMessage(key: string, sender: string, time: string, title: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'SocketSendMessage'; // entity.Parameters = { '1': key, '2': sender, '3': time, '4': title }; // await ServiceManager.getInstance().Commit(entity); // } catch (e) { // throw e; // } // } // public static async SendMessage(sender: string, message: string, TradeNo: string[]): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'SendMessage'; // entity.Parameters = { '1': sender, '2': message, '3': CommonFunction.ChangArrayToStr(TradeNo) }; // await ServiceManager.getInstance().Commit(entity); // } catch (e) { // throw e; // } // } // public static async GetOutOfData(tradeno: string, tradetype: string, key_words: string, branch_no: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'TradeService'; // entity.FuncName = 'GetOutOfData'; // entity.Parameters = { '1': tradeno, '2': tradetype, '3': key_words, '4': branch_no }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return tmpresult[0].AttachValue as string; // } // return null; // } catch (e) { // throw e; // } // } // public static async SetOutOfData(guid: string, tradenum: string, tradetype: string, keywords: string, tradedata: string, tellerno: string, branch_no: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'TradeService'; // entity.FuncName = 'SetOutOfData'; // entity.Parameters = { '1': guid, '2': tradenum, '3': tradetype, '4': keywords, '5': tradedata, '6': tellerno, '7': branch_no }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async UpdateOutOfData(Guid: string, tradedata: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'TradeService'; // entity.FuncName = 'UpdateOutOfData'; // entity.Parameters = { '1': Guid, '2': tradedata }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async InsertBlob(tableName: string, columnName: string, strWhere: string, data: Uint8Array): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'InsertBlob'; // entity.Parameters = { '1': tableName, '2': columnName, '3': strWhere }; // const files = new AttachFile(); // files.AttachIndex = '4'; // files.AttachType = 'ByteType'; // files.AttachValue = data; // entity.AttachFiles.push(files); // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async DeleteFolderOrFile(sPath: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'DeleteFolder'; // entity.Parameters = { '1': sPath }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async GetBlob(tableName: string, columnName: string, strWhere: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'GetBlobColumn'; // entity.Parameters = { '1': tableName, '2': columnName, '3': strWhere }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return tmpresult[0].AttachValue as Uint8Array; // } // return null; // } catch (e) { // throw e; // } // } // public static async SaveConfFile(fileName: string, file: Uint8Array, flag: boolean): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'SaveFile'; // entity.Parameters = { '1': CommonParames.ConfigFilePath + fileName, '3': flag.toString() }; // const files = new AttachFile(); // files.AttachIndex = '2'; // files.AttachType = 'ByteType'; // files.AttachValue = file; // entity.AttachFiles.push(files); // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async findReportFile(path: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'FindReportFile'; // entity.Parameters = { '1': path }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return CommonFunction.ChangStrToArray(tmpresult[0].AttachValue as string); // } // return null; // } catch (e) { // throw e; // } // } // public static async GetConfFile(fileName: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'GetFile'; // entity.Parameters = { '1': CommonParames.ConfigFilePath + fileName }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return tmpresult[0].AttachValue as Uint8Array; // } // return null; // } catch (e) { // throw e; // } // } // public static async ExecuteSql(strsql: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'ExecuteSql'; // entity.Parameters = { '1': strsql }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Number(tmpresult[0].AttachValue); // } // return 0; // } catch (e) { // throw e; // } // } // public static async ExecuteQuery(sql: string): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'ExecuteQuery'; // entity.Parameters = { '1': sql }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return CommonFunction.ChangStrToArray(tmpresult[0].AttachValue as string); // } // return null; // } catch (e) { // throw e; // } // } // public static async ExecuteSQLTran(SQLStringList: string[]): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'ExecuteSQLTran'; // entity.Parameters = { '1': CommonFunction.ChangArrayToStr(SQLStringList) }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return Boolean(tmpresult[0].AttachValue); // } // return false; // } catch (e) { // throw e; // } // } // public static async SortSockAddress(Address: string[]): Promise { // try { // const entity = new TransitEntity(); // entity.ServiceName = 'UtilService'; // entity.FuncName = 'SortSockAddress'; // entity.Parameters = { '1': CommonFunction.ChangArrayToStr(Address) }; // const tmpresult = await ServiceManager.getInstance().Commit(entity); // if (tmpresult && tmpresult.length === 1) { // return tmpresult[0].AttachValue as string; // } // return null; // } catch (e) { // throw e; // } // } // } //TODO此代码没用