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