123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- // 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<THotKeyMessage[] | null> {
- // 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<DataTable, THotKeyMessage[]>((tmpresult[0].AttachValue as DataTable));
- // }
- // return null;
- // } catch (e) {
- // throw e;
- // }
- // }
-
- // public static async DelKeyMessage(keyName: string, tellerNum: string): Promise<boolean> {
- // 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<boolean> {
- // 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<boolean> {
- // 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<TTellerHotKey[], DataTable>(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<void> {
- // 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<void> {
- // 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<string | null> {
- // 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<boolean> {
- // 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<boolean> {
- // 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<boolean> {
- // 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<boolean> {
- // 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<Uint8Array | null> {
- // 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<boolean> {
- // 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<string[] | null> {
- // 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<Uint8Array | null> {
- // 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<number> {
- // 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<string[] | null> {
- // 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<boolean> {
- // 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<string | null> {
- // 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此代码没用
|