Browse Source

添加盒易付判断

lcl 2 years ago
parent
commit
b88ec1f4df

+ 17 - 0
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -250,6 +250,18 @@ namespace MySystem
                                                 db.SaveChanges();
                                                 db.SaveChanges();
                                             }
                                             }
                                         }
                                         }
+                                        else if (pos.BrandId == 12) //盒易付
+                                        {
+                                            if (trade.BankCardType == "C")
+                                            {
+                                                BankCardType = 1;
+                                            }
+                                            else if (trade.BankCardType == "D")
+                                            {
+                                                BankCardType = 0;
+                                            }
+                                            if (trade.Field3 == "1") QrPayFlag = 1;
+                                        }
                                         int BrandId = pos.BrandId;
                                         int BrandId = pos.BrandId;
                                         // int BrandId = int.Parse(trade.ProductType);
                                         // int BrandId = int.Parse(trade.ProductType);
                                         // if (BrandId == 1 && trade.MerNo.StartsWith("M900"))
                                         // if (BrandId == 1 && trade.MerNo.StartsWith("M900"))
@@ -281,6 +293,11 @@ namespace MySystem
                                         {
                                         {
                                             pos.CreditTrade += SourceTradeAmount;
                                             pos.CreditTrade += SourceTradeAmount;
                                         }
                                         }
+                                        //盒易付
+                                        else if(BankCardType == 1 && trade.TradeType == "0" && pos.BrandId == 12)
+                                        {
+                                            pos.CreditTrade += SourceTradeAmount;
+                                        }
                                         //金控
                                         //金控
                                         else if((BankCardType == 1 || BankCardType == 2) && (pos.BrandId == 1 || pos.BrandId == 3))
                                         else if((BankCardType == 1 || BankCardType == 2) && (pos.BrandId == 1 || pos.BrandId == 3))
                                         {
                                         {

+ 1 - 1
AppStart/Timer/ResetSmallStoreHelper.cs

@@ -118,7 +118,7 @@ public class ResetSmallStoreHelper
             var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag, m.AuthFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0 && m.AuthFlag == 1).ToList();
             var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag, m.AuthFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0 && m.AuthFlag == 1).ToList();
             foreach (var prepos in prelist)
             foreach (var prepos in prelist)
             {
             {
-                if (prepos.BrandId == 1 || prepos.BrandId == 2 || prepos.BrandId == 4 || prepos.BrandId == 6 || prepos.BrandId == 7 || prepos.BrandId == 8 || prepos.BrandId == 10)
+                if (prepos.BrandId == 1 || prepos.BrandId == 2 || prepos.BrandId == 4 || prepos.BrandId == 6 || prepos.BrandId == 7 || prepos.BrandId == 8 || prepos.BrandId == 10 || prepos.BrandId == 12)
                 {
                 {
                     if (ProfitAmount > 200)
                     if (ProfitAmount > 200)
                     {
                     {

+ 5 - 5
AppStart/Timer/StoreApplyHelper.cs

@@ -101,7 +101,7 @@ public class StoreApplyHelper
             usercondition = " and UserId=" + UId;
             usercondition = " and UserId=" + UId;
         }
         }
         //上月出货额度
         //上月出货额度
-        DataTable dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (1,2,4,6,7,8,10) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
+        DataTable dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (1,2,4,6,7,8,10,12) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
         foreach(DataRow dr in dt.Rows)
         foreach(DataRow dr in dt.Rows)
         {
         {
             int StoreId = int.Parse(function.CheckInt(dr["StoreId"].ToString()));
             int StoreId = int.Parse(function.CheckInt(dr["StoreId"].ToString()));
@@ -176,7 +176,7 @@ public class StoreApplyHelper
             }
             }
             decimal AmountMore = 0;
             decimal AmountMore = 0;
             //仓库中机具占用额度+小分仓机具占用额度
             //仓库中机具占用额度+小分仓机具占用额度
-            DataTable dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (1,2,4,6,7,8,10) and `Status`>-1", connstr);
+            DataTable dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (1,2,4,6,7,8,10,12) and `Status`>-1", connstr);
             if(dtmore.Rows.Count > 0)
             if(dtmore.Rows.Count > 0)
             {
             {
                 AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
                 AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
@@ -187,7 +187,7 @@ public class StoreApplyHelper
                 AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
                 AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
             }
             }
             //除开小分仓中带“授”标记机具占用额度
             //除开小分仓中带“授”标记机具占用额度
-            dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (1,2,4,6,7,8,10) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
+            dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (1,2,4,6,7,8,10,12) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
             if(dtmore.Rows.Count > 0)
             if(dtmore.Rows.Count > 0)
             {
             {
                 AmountMore -= decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
                 AmountMore -= decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
@@ -304,7 +304,7 @@ public class StoreApplyHelper
                                 if(prepos.AuthFlag == 0)
                                 if(prepos.AuthFlag == 0)
                                 {
                                 {
                                     PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
                                     PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
-                                    if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 10)
+                                    if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 10 || pos.BrandId == 12)
                                     {
                                     {
                                         Amount += 200;
                                         Amount += 200;
                                     }
                                     }
@@ -331,7 +331,7 @@ public class StoreApplyHelper
                         if(store != null)
                         if(store != null)
                         {
                         {
                             decimal Amount = 0;
                             decimal Amount = 0;
-                            if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8 || BrandId == 10)
+                            if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8 || BrandId == 10 || BrandId == 12)
                             {
                             {
                                 Amount += 200 * OpStoreNum;
                                 Amount += 200 * OpStoreNum;
                             }
                             }