Beispiel #1
0
        public void Refresh(DateTime start, DateTime end, Shop shop, Liquidate liquidate)
        {
            // 1, pay, 4 doneprepay, 3, cancel, 6, canceldoneprepay
            var sql =
                string.Format(
                    @"select 
	                            isnull((select sum(amount) from deallogs where shopId = @shopId and state <> 3 and  (dealtype = 1 or dealType = 4) and submittime >= @start and submittime < @end), 0.0) as dealAmount, 
	                            isnull((select sum(amount) from deallogs where shopId = @shopId and state <> 3 and (dealtype = 2 or dealType = 6) and submittime >= @start and submittime < @end), 0.0) as cancelAmount;
	                        "    );
            var             list = _databaseInstance.Query <ShopDealLogItem>(sql, new { start = start, end = end, shopId = shop.ShopId });
            ShopDealLogItem item = list.FirstOrDefault();

            if (item != null)
            {
                liquidate.CancelAmount = item.CancelAmount;
                liquidate.DealAmount   = item.DealAmount;
            }
            liquidate.SubmitTime = DateTime.Now;
        }
Beispiel #2
0
 public void OnReceiveLiquidate(object sender, Liquidate e)
 {
     EnCash++;
     OrderType = e.EnCash.SlbyTP.Equals("1") ? "201" : "301";
 }
Beispiel #3
0
 public void Delete(Liquidate item)
 {
     _databaseInstance.Delete(item, TableName);
 }
Beispiel #4
0
 public void Insert(Liquidate liquidate)
 {
     liquidate.LiquidateId = _databaseInstance.Insert(liquidate, TableName);
 }
Beispiel #5
0
 public void Update(Liquidate liquidate)
 {
     _databaseInstance.Update(liquidate, TableName);
 }
Beispiel #6
0
 protected void SetInnerObject(Liquidate item)
 {
     _innerObject = item;
 }
Beispiel #7
0
 public ShopDealLogModelBase(Liquidate shop)
 {
     _innerObject = shop;
 }
Beispiel #8
0
 public ShopDealLogModelBase()
 {
     _innerObject = new Liquidate();
 }
Beispiel #9
0
 public ListLiquidate(Liquidate innerObject)
 {
     _innerObject = innerObject;
 }
Beispiel #10
0
 public ListLiquidate()
 {
     _innerObject = new Liquidate();
 }