|
@@ -71,12 +71,12 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//创客编号
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
|
{
|
|
{
|
|
|
- condition += " and Id in (select Id from SysAdmin where MakerCode='" + MakerCode + "')";
|
|
|
|
|
|
|
+ condition += " and UserId in (select UserId from SysAdmin where MakerCode='" + MakerCode + "')";
|
|
|
}
|
|
}
|
|
|
//运营中心编号
|
|
//运营中心编号
|
|
|
if (!string.IsNullOrEmpty(OpCode))
|
|
if (!string.IsNullOrEmpty(OpCode))
|
|
|
{
|
|
{
|
|
|
- condition += " and Id in (select Id from SysAdmin where OpCode='" + OpCode + "')";
|
|
|
|
|
|
|
+ condition += " and UserId in (select UserId from SysAdmin where OpCode='" + OpCode + "')";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(StatusSelect))
|
|
if (!string.IsNullOrEmpty(StatusSelect))
|
|
@@ -96,8 +96,8 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (Status == 1) dic["StatusName"] = "已发货";
|
|
if (Status == 1) dic["StatusName"] = "已发货";
|
|
|
if (Status == 2) dic["StatusName"] = "已驳回";
|
|
if (Status == 2) dic["StatusName"] = "已驳回";
|
|
|
//创客
|
|
//创客
|
|
|
- int OpId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
|
|
|
|
|
- SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.Id == OpId) ?? new SysAdmin();
|
|
|
|
|
|
|
+ int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
|
|
|
|
|
+ SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == UserId) ?? new SysAdmin();
|
|
|
dic["MakerName"] = sysAdmin.MakerName;
|
|
dic["MakerName"] = sysAdmin.MakerName;
|
|
|
dic["MakerCode"] = sysAdmin.MakerCode;
|
|
dic["MakerCode"] = sysAdmin.MakerCode;
|
|
|
dic["OpCode"] = sysAdmin.OpCode;
|
|
dic["OpCode"] = sysAdmin.OpCode;
|
|
@@ -153,12 +153,12 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//创客编号
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
if (!string.IsNullOrEmpty(MakerCode))
|
|
|
{
|
|
{
|
|
|
- condition += " and Id in (select Id from SysAdmin where MakerCode='" + MakerCode + "')";
|
|
|
|
|
|
|
+ condition += " and UserId in (select UserId from SysAdmin where MakerCode='" + MakerCode + "')";
|
|
|
}
|
|
}
|
|
|
//运营中心编号
|
|
//运营中心编号
|
|
|
if (!string.IsNullOrEmpty(OpCode))
|
|
if (!string.IsNullOrEmpty(OpCode))
|
|
|
{
|
|
{
|
|
|
- condition += " and Id in (select Id from SysAdmin where OpCode='" + OpCode + "')";
|
|
|
|
|
|
|
+ condition += " and UserId in (select UserId from SysAdmin where OpCode='" + OpCode + "')";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(StatusSelect))
|
|
if (!string.IsNullOrEmpty(StatusSelect))
|
|
@@ -178,8 +178,8 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (Status == 1) dic["StatusName"] = "已发货";
|
|
if (Status == 1) dic["StatusName"] = "已发货";
|
|
|
if (Status == 2) dic["StatusName"] = "已驳回";
|
|
if (Status == 2) dic["StatusName"] = "已驳回";
|
|
|
//创客
|
|
//创客
|
|
|
- int OpId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
|
|
|
|
|
- SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.Id == OpId) ?? new SysAdmin();
|
|
|
|
|
|
|
+ int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
|
|
|
|
|
+ SysAdmin sysAdmin = opdb.SysAdmin.FirstOrDefault(m => m.UserId == UserId) ?? new SysAdmin();
|
|
|
dic["MakerName"] = sysAdmin.MakerName;
|
|
dic["MakerName"] = sysAdmin.MakerName;
|
|
|
dic["MakerCode"] = sysAdmin.MakerCode;
|
|
dic["MakerCode"] = sysAdmin.MakerCode;
|
|
|
dic["OpCode"] = sysAdmin.OpCode;
|
|
dic["OpCode"] = sysAdmin.OpCode;
|
|
@@ -814,6 +814,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//修改机具所属仓库
|
|
//修改机具所属仓库
|
|
|
machine.StoreId = tostore.Id;
|
|
machine.StoreId = tostore.Id;
|
|
|
machine.UpdateDate = DateTime.Now;
|
|
machine.UpdateDate = DateTime.Now;
|
|
|
|
|
+
|
|
|
|
|
+ //添加机具所属运营中心
|
|
|
|
|
+ machine.OpId = tostore.UserId;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|