//public override bool InvokeAPI<T>(string[] opearteList, T t, LoginResult loginResult, Context ctx) //{ // InvokeResult invokeResult = null; // string input = null; // foreach (string opearte in opearteList) // { // BussnessLog.WriteBussnessLog(default(T), model, "操作=" + opearte); // if (Save.Equals(opearte)) // { // BussnessLog.WriteBussnessLog(default(T),model,"input json=" + JsonExtension.ToJSON(t)); // invokeResult = InvokeCloudAPI.InvokeFunction(JsonExtension.ToJSON(t), loginResult.client, formID, Save, model); // } // else // { // input = JsonExtension.ToJSON(handleReturnMessage<SupplierInfoexceptAllocate>(invokeResult, opearte, model, ctx).CustomOpearteObject); // BussnessLog.WriteBussnessLog(default(T),model,"input json=" + input); // invokeResult = InvokeCloudAPI.InvokeFunction(input, loginResult.client, formID, opearte, Save); // } // if (!handleReturnMessage<SupplierInfoexceptAllocate>(invokeResult, opearte, model, ctx).ReturnResult) // { // break; // } // else { // BussnessLog.WriteBussnessLog(default(T), model, "操作=" + opearte + "成功!"); // } // } // return true; // throw new NotImplementedException(); //} public override List <T> handleData <T>(DataSet dataSet) { List <SupplierInfoSaveObject> supplierSaveInfoObjList = new List <SupplierInfoSaveObject>(); for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) { SupplierInfoSaveObject supplierSaveInfoObj = new SupplierInfoSaveObject(); application.supplier.supplierSave.Model model = new application.supplier.supplierSave.Model(); FFinanceInfo fFinanceInfo = new FFinanceInfo(); FLocationInfo fLocationInfo = new FLocationInfo(); List <FLocationInfo> fLocationInfoList = new List <FLocationInfo>(); List <FBankInfo> fBankInfoList = new List <FBankInfo>(); FBankInfo fBankInfo = new FBankInfo(); FCreateOrgId fCreateOrgId = new FCreateOrgId(); FUseOrgId fUseOrgId = new FUseOrgId(); FPayCurrencyId fPayCurrencyId = new FPayCurrencyId(); FLocNewContact fLocNewContact = new FLocNewContact(); fCreateOrgId.FNumber = "9999"; model.FCreateOrgId = fCreateOrgId; fUseOrgId.FNumber = "9999"; model.FUseOrgId = fUseOrgId; fPayCurrencyId.Fnumber = "PRE001"; fFinanceInfo.FPayCurrencyId = fPayCurrencyId; fBankInfo.FOpenBankName = dataSet.Tables[0].Rows[i]["FopenBankName"].ToString(); fBankInfo.FBankCode = dataSet.Tables[0].Rows[i]["FbankCode"].ToString(); fBankInfo.FBankHolder = dataSet.Tables[0].Rows[i]["FbankHolder"].ToString(); fBankInfoList.Add(fBankInfo); model.Fnumber = dataSet.Tables[0].Rows[i]["fnumber"].ToString(); model.FName = dataSet.Tables[0].Rows[i]["fname"].ToString(); if (model.Fnumber.Contains("-") || model.FName.Contains("未知")) { BussnessLog.WriteBussnessLog("", "中间数据库取数", "中间数据库取数错误,编码=" + model.Fnumber + ",客户名称=" + model.FName); continue; } model.FBankInfo = fBankInfoList.ToArray(); model.FFinanceInfo = fFinanceInfo; supplierSaveInfoObj.Model = model; supplierSaveInfoObjList.Add(supplierSaveInfoObj); } return((List <T>)(object) supplierSaveInfoObjList); throw new NotImplementedException(); }
public override List <T> handleData <T>(DataSet dataSet) { List <CustomInfoSaveObject> customSaveInfoObjList = new List <CustomInfoSaveObject>(); for (int i = 0; i < dataSet.Tables[0].Rows.Count; i++) { CustomInfoSaveObject customSaveInfoObj = new CustomInfoSaveObject(); Model model = new Model(); FCreateOrgId fcreateOrgID = new FCreateOrgId(); FGroup fGroup = new FGroup(); FSALGROUPID fsalGroupID = new FSALGROUPID(); FTRADINGCURRID ftradingCurrID = new FTRADINGCURRID(); FUseOrgId fUserOrgId = new FUseOrgId(); fcreateOrgID.FNumber = "9999"; //fGroup.fNumber = "KH001"; fsalGroupID.fNumber = "0"; ftradingCurrID.fNumber = "PRE001"; fUserOrgId.FNumber = "9999"; model.Fnumber = dataSet.Tables[0].Rows[i]["fnumber"].ToString(); model.FName = dataSet.Tables[0].Rows[i]["fname"].ToString(); if (model.Fnumber.Contains("-") || model.FName.Contains("未知")) { BussnessLog.WriteBussnessLog("", "中间数据库取数", "中间数据库取数错误,编码=" + model.Fnumber + ",客户名称=" + model.FName); continue; } model.FCreateOrgId = fcreateOrgID; //model.FGroup = fGroup; model.FsalGroupID = fsalGroupID; model.FtradingCurrID = ftradingCurrID; model.FUseOrgId = fUserOrgId; customSaveInfoObj.Model = model; customSaveInfoObjList.Add(customSaveInfoObj); } return((List <T>)(object) customSaveInfoObjList); throw new NotImplementedException(); }