예제 #1
0
 /// <summary>
 /// 获取众销统计信息
 /// </summary>
 /// <param name="search">查询类</param>
 /// <returns>结果</returns>
 public Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumDTO GetShareOrderMoneySumInfo(Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumSearchDTO search)
 {
     base.Do(false);
     return(this.GetShareOrderMoneySumInfoExt(search));
 }
예제 #2
0
        /// <summary>
        /// 获取众销统计信息
        /// </summary>
        /// <param name="search">查询类</param>
        /// <returns>结果</returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumDTO GetShareOrderMoneySumInfoExt(Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumSearchDTO search)
        {
            if (search == null || search.UseId == Guid.Empty || search.AppId == Guid.Empty)
            {
                return(null);
            }
            Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumDTO result = new ShareOrderMoneySumDTO();

            //售中待收益
            var orderStates = new List <int>()
            {
                1, 2, 8, 9, 10, 12, 13, 14
            };
            //售后待收益
            var orderAfterStates = new List <int>()
            {
                3, 5, 10, 12, 13
            };

            //佣金总数(已收益佣金)
            var sumInfo = (from orderShare in OrderShare.ObjectSet()
                           join order in CommodityOrder.ObjectSet()
                           on orderShare.OrderId equals order.Id
                           join dataS in CommodityOrderService.ObjectSet()
                           on orderShare.OrderId equals dataS.Id
                           into tempS
                           from orderService in tempS.DefaultIfEmpty()
                           where
                           orderShare.PayeeId == search.UseId && orderShare.PayeeType == search.PayeeType && orderShare.Commission > 0 &&
                           order.EsAppId == search.AppId && order.State == 3 && orderService.State == 15
                           select orderShare.Commission).ToList().Sum();

            //待收益佣金总数
            var sumUnPayInfo = (from orderShare in OrderShare.ObjectSet()
                                join order in CommodityOrder.ObjectSet()
                                on orderShare.OrderId equals order.Id
                                join dataS in CommodityOrderService.ObjectSet()
                                on orderShare.OrderId equals dataS.Id
                                into tempS
                                from orderService in tempS.DefaultIfEmpty()
                                where
                                orderShare.PayeeId == search.UseId && orderShare.PayeeType == search.PayeeType && orderShare.Commission > 0 &&
                                order.EsAppId == search.AppId && (orderStates.Contains(order.State) ||
                                                                  order.State == 3 && orderService.State != null && orderAfterStates.Contains(orderService.State))
                                select orderShare.Commission).ToList().Sum();

            result.CommissionAmount = sumInfo;
            result.CommmissionUnPay = sumUnPayInfo;

            return(result);
        }
예제 #3
0
        /// <summary>
        /// 获取众销统计信息
        /// </summary>
        /// <param name="search">查询类</param>
        /// <returns>结果</returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumDTO GetShareOrderMoneySumInfo(Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumSearchDTO search)
        {
            //定义返回值
            Jinher.AMP.BTP.Deploy.CustomDTO.ShareOrderMoneySumDTO result;

            try
            {
                //调用代理方法
                result = base.Channel.GetShareOrderMoneySumInfo(search);
            }
            catch
            {
                //抛异常
                throw;
            }
            finally
            {
                //关链接
                ChannelClose();
            }            //返回结果
            return(result);
        }