Quellcode durchsuchen

重置仓库额度添加联动Id

lcl vor 2 Jahren
Ursprung
Commit
05daa56a26
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 6 6
      AppStart/Timer/StoreApplyHelper.cs

+ 6 - 6
AppStart/Timer/StoreApplyHelper.cs

@@ -101,7 +101,7 @@ public class StoreApplyHelper
             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) 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) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
         foreach(DataRow dr in dt.Rows)
         {
             int StoreId = int.Parse(function.CheckInt(dr["StoreId"].ToString()));
@@ -117,7 +117,7 @@ public class StoreApplyHelper
                 dataDic[store.UserId] += AmountMore;
             }
         }
-        dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (3,5,9) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
+        dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (3,5,9,11) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
         foreach(DataRow dr in dt.Rows)
         {
             int StoreId = int.Parse(function.CheckInt(dr["StoreId"].ToString()));
@@ -176,23 +176,23 @@ public class StoreApplyHelper
             }
             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) 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) and `Status`>-1", connstr);
             if(dtmore.Rows.Count > 0)
             {
                 AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
             }
-            dtmore = CustomerSqlConn.dtable("select count(Id)*300 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (3,5,9) and `Status`>-1", connstr);
+            dtmore = CustomerSqlConn.dtable("select count(Id)*300 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (3,5,9,11) and `Status`>-1", connstr);
             if(dtmore.Rows.Count > 0)
             {
                 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) 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) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
             if(dtmore.Rows.Count > 0)
             {
                 AmountMore -= decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
             }
-            dtmore = CustomerSqlConn.dtable("select count(Id)*300 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (3,5,9) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
+            dtmore = CustomerSqlConn.dtable("select count(Id)*300 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (3,5,9,11) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
             if(dtmore.Rows.Count > 0)
             {
                 AmountMore -= decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));