|
|
@@ -460,7 +460,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Dictionary<string, object> Obj = new Dictionary<string, object>();
|
|
|
List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
|
|
|
List<SendInfo> sendInfos = new List<SendInfo>();
|
|
|
- List<CheckSendInfo> checksendInfo = new List<CheckSendInfo>();
|
|
|
+ List<CheckSendInfo> checksendInfos = new List<CheckSendInfo>();
|
|
|
StoreMachineApply apply = db.StoreMachineApply.FirstOrDefault(m => m.Id == data.Id) ?? new StoreMachineApply();
|
|
|
JsonData ApplyList = JsonMapper.ToObject(apply.SendSn);
|
|
|
decimal ApplyAmount = 0;
|
|
|
@@ -523,18 +523,15 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (BrandId == 7) FromStoreId = 1047;
|
|
|
if (BrandId == 8) FromStoreId = 4831;
|
|
|
if (BrandId == 9) FromStoreId = 4832;
|
|
|
- tostore = db.StoreHouse.FirstOrDefault(m => m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status > -1);
|
|
|
- CheckSendInfo items = checksendInfo.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
|
|
|
+ CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
|
|
|
if (items == null)
|
|
|
{
|
|
|
CheckSendInfo rows = new CheckSendInfo()
|
|
|
{
|
|
|
- FromStoreId = FromStoreId,
|
|
|
- ToStoreId = tostore.Id,
|
|
|
BrandId = BrandId,
|
|
|
Num = 1
|
|
|
};
|
|
|
- checksendInfo.Add(rows);
|
|
|
+ checksendInfos.Add(rows);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -555,8 +552,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (BrandIds == 8) FromStoreId = 4831;
|
|
|
if (BrandIds == 9) FromStoreId = 4832;
|
|
|
var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
|
|
|
- tostore = db.StoreHouse.FirstOrDefault(m => m.UserId == apply.UserId && m.BrandId == BrandIds.ToString() && m.Status > -1);
|
|
|
- CheckSendInfo items = checksendInfo.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandIds) ?? new CheckSendInfo();
|
|
|
+ CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
|
|
|
if (items.Num > num)
|
|
|
{
|
|
|
return "Warning|" + "该条发货记录的" + brandInfo.Name + "发货数量过多!";
|
|
|
@@ -820,8 +816,6 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//检查发货信息实体类
|
|
|
private class CheckSendInfo
|
|
|
{
|
|
|
- public int FromStoreId { get; set; }
|
|
|
- public int ToStoreId { get; set; }
|
|
|
public int BrandId { get; set; }
|
|
|
public int Num { get; set; }
|
|
|
}
|