|
|
@@ -528,19 +528,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
BrandId = Convert.ToInt32(Brand);
|
|
|
|
|
|
- if (BrandId == 1) FromStoreId = 7;
|
|
|
- if (BrandId == 2) FromStoreId = 721;
|
|
|
- if (BrandId == 3) FromStoreId = 697;
|
|
|
- if (BrandId == 4) FromStoreId = 774;
|
|
|
- if (BrandId == 5) FromStoreId = 775;
|
|
|
- if (BrandId == 6) FromStoreId = 871;
|
|
|
- if (BrandId == 7) FromStoreId = 1047;
|
|
|
- if (BrandId == 8) FromStoreId = 4831;
|
|
|
- if (BrandId == 9) FromStoreId = 4832;
|
|
|
- if (BrandId == 10) FromStoreId = 5512;
|
|
|
- if (BrandId == 11) FromStoreId = 5513;
|
|
|
- if (BrandId == 12) FromStoreId = 5907;
|
|
|
- if (BrandId == 13) FromStoreId = 6381;
|
|
|
+ var kqProducts = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
|
|
|
+ FromStoreId = kqProducts.MainStoreId;
|
|
|
+
|
|
|
CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
|
|
|
if (items == null)
|
|
|
{
|
|
|
@@ -560,19 +550,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
int num = Convert.ToInt32(ApplyList[i]["ApplyNum"].ToString());
|
|
|
int BrandIds = Convert.ToInt32(ApplyList[i]["BrandId"].ToString());
|
|
|
- if (BrandIds == 1) FromStoreId = 7;
|
|
|
- if (BrandIds == 2) FromStoreId = 721;
|
|
|
- if (BrandIds == 3) FromStoreId = 697;
|
|
|
- if (BrandIds == 4) FromStoreId = 774;
|
|
|
- if (BrandIds == 5) FromStoreId = 775;
|
|
|
- if (BrandIds == 6) FromStoreId = 871;
|
|
|
- if (BrandIds == 7) FromStoreId = 1047;
|
|
|
- if (BrandIds == 8) FromStoreId = 4831;
|
|
|
- if (BrandIds == 9) FromStoreId = 4832;
|
|
|
- if (BrandId == 10) FromStoreId = 5512;
|
|
|
- if (BrandId == 11) FromStoreId = 5513;
|
|
|
- if (BrandId == 12) FromStoreId = 5907;
|
|
|
- if (BrandId == 13) FromStoreId = 6381;
|
|
|
+ var kqProducts = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds) ?? new KqProducts();
|
|
|
+ FromStoreId = kqProducts.MainStoreId;
|
|
|
+
|
|
|
var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
|
|
|
CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
|
|
|
if (items.Num > num)
|
|
|
@@ -593,19 +573,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string SnNo = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
|
|
|
string Brand = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
|
|
|
BrandId = Convert.ToInt32(Brand);
|
|
|
- if (BrandId == 1) FromStoreId = 7;
|
|
|
- if (BrandId == 2) FromStoreId = 721;
|
|
|
- if (BrandId == 3) FromStoreId = 697;
|
|
|
- if (BrandId == 4) FromStoreId = 774;
|
|
|
- if (BrandId == 5) FromStoreId = 775;
|
|
|
- if (BrandId == 6) FromStoreId = 871;
|
|
|
- if (BrandId == 7) FromStoreId = 1047;
|
|
|
- if (BrandId == 8) FromStoreId = 4831;
|
|
|
- if (BrandId == 9) FromStoreId = 4832;
|
|
|
- if (BrandId == 10) FromStoreId = 5512;
|
|
|
- if (BrandId == 11) FromStoreId = 5513;
|
|
|
- if (BrandId == 12) FromStoreId = 5907;
|
|
|
- if (BrandId == 13) FromStoreId = 6381;
|
|
|
+ var kqProducts = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
|
|
|
+ FromStoreId = kqProducts.MainStoreId;
|
|
|
+
|
|
|
MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
|
|
|
var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId && m.StoreId == FromStoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0) ?? new PosMachinesTwo();
|
|
|
if (pos.BindingState == 1 || pos.ActivationState == 1)
|
|
|
@@ -649,19 +619,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
BrandId = Convert.ToInt32(Brand);
|
|
|
|
|
|
- if (BrandId == 1) FromStoreId = 7;
|
|
|
- if (BrandId == 2) FromStoreId = 721;
|
|
|
- if (BrandId == 3) FromStoreId = 697;
|
|
|
- if (BrandId == 4) FromStoreId = 774;
|
|
|
- if (BrandId == 5) FromStoreId = 775;
|
|
|
- if (BrandId == 6) FromStoreId = 871;
|
|
|
- if (BrandId == 7) FromStoreId = 1047;
|
|
|
- if (BrandId == 8) FromStoreId = 4831;
|
|
|
- if (BrandId == 9) FromStoreId = 4832;
|
|
|
- if (BrandId == 10) FromStoreId = 5512;
|
|
|
- if (BrandId == 11) FromStoreId = 5513;
|
|
|
- if (BrandId == 12) FromStoreId = 5907;
|
|
|
- if (BrandId == 13) FromStoreId = 6381;
|
|
|
+ var kqProducts = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
|
|
|
+ FromStoreId = kqProducts.MainStoreId;
|
|
|
+
|
|
|
tostore = db.StoreHouse.FirstOrDefault(m => m.Sort > 0 && m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status == 1);
|
|
|
SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
|
|
|
if (item == null)
|