Jelajahi Sumber

仓库同步数据将UserId改为BuyUserId

lichunlei 3 tahun lalu
induk
melakukan
d8683685cf

+ 2 - 2
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -982,7 +982,7 @@ namespace MySystem.Areas.Admin.Controllers
         {
             if (Id > 0)
             {
-                DataTable dt = OtherMySqlConn.dtable("select Id,(select count(Id) from PosMachinesTwo where StoreId=s.Id and UserId=0 and PreUserId=0 and Status>-1) as CurLaveNum from StoreHouse s where Id=" + Id);
+                DataTable dt = OtherMySqlConn.dtable("select Id,(select count(Id) from PosMachinesTwo where StoreId=s.Id and BuyUserId=0 and PreUserId=0 and Status>-1) as CurLaveNum from StoreHouse s where Id=" + Id);
                 if (dt.Rows.Count > 0)
                 {
                     int CurLaveNum = int.Parse(function.CheckInt(dt.Rows[0]["CurLaveNum"].ToString()));
@@ -996,7 +996,7 @@ namespace MySystem.Areas.Admin.Controllers
             }
             else
             {
-                DataTable dt = OtherMySqlConn.dtable("select s.Id,LaveNum,count(p.Id) as CurLaveNum from StoreHouse s left join PosMachinesTwo p on s.Id=p.StoreId and s.BrandId=p.BrandId and p.UserId=0 and p.PreUserId=0 and p.Status>-1 group by s.Id HAVING LaveNum!=count(p.Id)");
+                DataTable dt = OtherMySqlConn.dtable("select s.Id,LaveNum,count(p.Id) as CurLaveNum from StoreHouse s left join PosMachinesTwo p on s.Id=p.StoreId and s.BrandId=p.BrandId and p.BuyUserId=0 and p.PreUserId=0 and p.Status>-1 group by s.Id HAVING LaveNum!=count(p.Id)");
                 foreach (DataRow dr in dt.Rows)
                 {
                     int StoreId = int.Parse(function.CheckInt(dr["Id"].ToString()));