private void CountJuJian(ClientTradeJuJianInfo info) { foreach (var item in info.TradeJuJianLst) { info.Qichu += item.Qichu; info.Rujin += item.Rujin; info.Chujin += item.Chujin; info.Manual_rujin += item.Manual_rujin; info.Manual_chujin += item.Manual_chujin; info.Hisyingkui += item.Hisyingkui; info.Tradefee += item.Tradefee; info.Storagefee += item.Storagefee; info.Qimo += item.Qimo; info.Money += item.Money; info.KC_XAG_100kg_Num += item.KC_XAG_100kg_Num; info.XAG_100kg_Num += item.XAG_100kg_Num; info.KC_XAG_50kg_Num += item.XAG_50kg_Num; info.XAG_50kg_Num += item.XAG_50kg_Num; info.KC_XAG_20kg_Num += item.KC_XAG_20kg_Num; info.XAG_20kg_Num += item.XAG_20kg_Num; info.KC_XAU_1000g_Num += item.KC_XAU_1000g_Num; info.XAU_1000g_Num += item.XAU_1000g_Num; info.KC_XPT_1000g_Num += item.KC_XPT_1000g_Num; info.XPT_1000g_Num += item.XPT_1000g_Num; info.KC_XPD_1000g_Num += item.KC_XPD_1000g_Num; info.XPD_1000g_Num += item.XPD_1000g_Num; info.KC_Copper_50t_Num += item.KC_Copper_50t_Num; info.Copper_50t_Num += item.Copper_50t_Num; info.KC_Copper_20t_Num += item.KC_Copper_20t_Num; info.Copper_20t_Num += item.Copper_20t_Num; info.KC_UKOil_100_Num += item.KC_UKOil_100_Num; info.UKOil_100_Num += item.UKOil_100_Num; info.KC_UKOil_50_Num += item.KC_UKOil_50_Num; info.UKOil_50_Num += item.UKOil_50_Num; info.KC_UKOil_20_Num += item.KC_UKOil_20_Num; info.UKOil_20_Num += item.UKOil_20_Num; } }
/// <summary> /// 实例化一个后台管理View Mode对象 /// </summary> private ManagementViewModel() { lockobj = new Object(); _TradeJuJianInfo = new ClientTradeJuJianInfo(); _dpObj = new DependencyObject(); LogRequestInfo = new LogRequestInformation(); ClientAccFilter = new ClientAccountFilter(); OnlineClientAccFilter = new ClientAccountFilter(); MarketOrderRequestInfo = new RequestInformationBase(); PendingOrderRequestInfo = new RequestInformationBase(); HedgingTradeRequestInfo = new RequestInformationBase(); StatementsRequestInfo = new StatementsRequestInformation(); _businessService = new BusinessServiceProvider(); _tradeService = new TradeServiceProvider(); _bzjService = new BzjServiceProvider(); // GetNewsCondition = new SelectCondition(); _BzjInfoInformation = new BzjInfoInformation(); TakeGoodsDetialSelectCondition = new SelectCondition(); _TakeGoodsDetailList = new ObservableCollection<BzjTakeGoodsDetailEntity>(); BindingJgjAccountCondition = new SelectCondition(); _DeliveryGoodsCondition = new SelectCondition(); _DeliveryGoodsList = new ObservableCollection<BzjDeliverEntity>(); _TakeGoodsCondition = new SelectCondition(); _TakeGoodsList = new ObservableCollection<BzjOrderEntity>(); _BackGoodsCondition = new SelectCondition(); _BackGoodsList = new ObservableCollection<BzjOrderEntity>(); _JgjGoodsCondition = new SelectCondition(); _JgjGoodsList = new ObservableCollection<BzjOrderEntity>(); _DeliveryBackGoodsCondition = new SelectCondition(); _DeliveryBackGoodsList = new List<BzjRecoverOrder>(); _GetClerkCondition = new SelectCondition(); _ClerkAccountList = new ObservableCollection<BzjClerk>(); InterOfficeSelectCondtion = new SelectCondition(); ClientAccountSelectCondition = new SelectCondition(); OnlineAccountSelectCondition = new SelectCondition(); ManagerAccountSelectCondition = new SelectCondition(); OrgAccountSelectCondition = new SelectCondition(); FundReportSelectCondition = new SelectCondition(); OrgSelectCondition = new SelectCondition(); ChuJinSelectCondition = new SelectCondition(); TerminationSelectCondition = new SelectCondition(); TradeConfigInfoList = new ObservableCollection<TradeConfigInfo>(); NewsList = new ObservableCollection<NewsInfo>(); ArtilesList = new ObservableCollection<NewsInfo>(); AdvertList = new ObservableCollection<AdvertInfo>(); GetNewsCondition = new SelectCondition(); GetArticlesCondition = new SelectCondition(); GetAdvertCondition = new SelectCondition(); FundReportList = new ObservableCollection<FundChangeInformation>(); ChuJinList = new ObservableCollection<TradeChuJinInformation>(); OrgList = new ObservableCollection<OrgInfo>(); UserGroups = new ObservableCollection<UserGroup>(); UserGroupSelectCon = new SelectCondition(); GroupAccounts = new ObservableCollection<ClientAccount>(); }
/// <summary> /// 获取会员报表 /// </summary> /// <param name="cond"></param> /// <returns></returns> public void GetTradeJuJianInfo(SelectCondition cond, string UserID, ref ClientTradeJuJianInfo cinfo) { if (null == cinfo) { return; } try { JJQueryCon con = new JJQueryCon() { StartTime = cond.StartTime, EndTime = cond.EndTime, OrgName = cond.OrgName, LoginID = UserID }; TradeJuJianInfo info = _managerService.GetTradeJuJianInfo(con); if (info.Result) { cinfo.Result = info.Result; cinfo.Desc = info.Desc; //info.TdJuJianList.ForEach(p => cinfo.TradeJuJianLst.Add(MyConverter.ToClientTradeJuJianInfo(p))); foreach (var item in info.TdJuJianList) { cinfo.TradeJuJianLst.Add(MyConverter.ToClientTradeJuJianInfo(item)); } CountJuJian(cinfo); } else { cinfo.Result = false; cinfo.Desc = info.Desc; } } catch (TimeoutException te) { cinfo.Result = false; cinfo.Desc = "服务器响应超时"; } catch (Exception ex) { cinfo.Result = false; cinfo.Desc = "获取数据失败,请稍后再试"; } }