Explorar o código

添加总仓Id,调整机具押金显示问题

DuGuYang %!s(int64=3) %!d(string=hai) anos
pai
achega
efb02162f1

+ 10 - 22
Areas/Admin/Controllers/MainServer/PosMerchantInfoListController.cs

@@ -263,17 +263,11 @@ namespace MySystem.Areas.Admin.Controllers
                 var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
                 var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
 
 
                 //实际押金
                 //实际押金
-                string SeoKeyword = "0";
-                if (!string.IsNullOrEmpty(pos.SeoKeyword))
+                string SeoKeyword = pos.SeoKeyword;
+                var brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
+                if (brand.Id > 0 && brand.SingleDepositApi == 0 && !string.IsNullOrEmpty(SeoKeyword))
                 {
                 {
-                    if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
-                    {
-                        SeoKeyword = (decimal.Parse(pos.SeoKeyword) / 100).ToString();
-                    }
-                    else
-                    {
-                        SeoKeyword = pos.SeoKeyword;
-                    }
+                    SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
                 }
                 }
                 dic["SeoKeyword"] = SeoKeyword;
                 dic["SeoKeyword"] = SeoKeyword;
 
 
@@ -300,11 +294,12 @@ namespace MySystem.Areas.Admin.Controllers
                 {
                 {
                     string KqSnNo = item["KqSnNo"].ToString();
                     string KqSnNo = item["KqSnNo"].ToString();
                     var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
                     var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
+                    var brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
                     if (!string.IsNullOrEmpty(pos.SeoKeyword))
                     if (!string.IsNullOrEmpty(pos.SeoKeyword))
                     {
                     {
-                        if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
+                        if (brand.Id > 0 && brand.SingleDepositApi == 0 && !string.IsNullOrEmpty(pos.SeoKeyword))
                         {
                         {
-                            ReturnAmount += decimal.Parse(pos.SeoKeyword) / 100;
+                            ReturnAmount = (decimal.Parse(pos.SeoKeyword) / 100);
                         }
                         }
                         else
                         else
                         {
                         {
@@ -377,17 +372,10 @@ namespace MySystem.Areas.Admin.Controllers
                 dic.Remove("UserId");
                 dic.Remove("UserId");
 
 
                 //实际押金
                 //实际押金
-                string SeoKeyword = "0";
-                if (!string.IsNullOrEmpty(pos.SeoKeyword))
+                string SeoKeyword = pos.SeoKeyword;
+                if (brand.Id > 0 && brand.SingleDepositApi == 0 && !string.IsNullOrEmpty(SeoKeyword))
                 {
                 {
-                    if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
-                    {
-                        SeoKeyword = (decimal.Parse(pos.SeoKeyword) / 100).ToString();
-                    }
-                    else
-                    {
-                        SeoKeyword = pos.SeoKeyword;
-                    }
+                    SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
                 }
                 }
                 dic["SeoKeyword"] = SeoKeyword;
                 dic["SeoKeyword"] = SeoKeyword;
             }
             }

+ 5 - 1
Areas/Admin/Controllers/MainServer/StoreMachineApplyController.cs

@@ -539,7 +539,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 9) FromStoreId = 4832;
                 if (BrandId == 9) FromStoreId = 4832;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
-                if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 if (items == null)
                 if (items == null)
                 {
                 {
@@ -571,6 +571,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 if (items.Num > num)
                 if (items.Num > num)
@@ -618,6 +619,8 @@ namespace MySystem.Areas.Admin.Controllers
                     if (BrandId == 9) FromStoreId = 4832;
                     if (BrandId == 9) FromStoreId = 4832;
                     if (BrandId == 10) FromStoreId = 5512;
                     if (BrandId == 10) FromStoreId = 5512;
                     if (BrandId == 11) FromStoreId = 5513;
                     if (BrandId == 11) FromStoreId = 5513;
+                    if (BrandId == 12) FromStoreId = 5907;
+                    if (BrandId == 13) FromStoreId = 6381;
                     if (PosSnList.Contains(SnNo))
                     if (PosSnList.Contains(SnNo))
                     {
                     {
                         error += "以下操作失败" + SnNo + ',' + "该机具重复发货" + '\n';
                         error += "以下操作失败" + SnNo + ',' + "该机具重复发货" + '\n';
@@ -658,6 +661,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 tostore = db.StoreHouse.FirstOrDefault(m => m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status > -1 && m.Sort == 0);
                 tostore = db.StoreHouse.FirstOrDefault(m => m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status > -1 && m.Sort == 0);
                 SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
                 SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
                 if (item == null)
                 if (item == null)

+ 14 - 18
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -2552,16 +2552,14 @@ namespace MySystem.Areas.Admin.Controllers
                             var ThirdMakerCode = ""; //次次顶级创客编号
                             var ThirdMakerCode = ""; //次次顶级创客编号
                             var ThirdRealName = ""; //次次顶级创客姓名
                             var ThirdRealName = ""; //次次顶级创客姓名
                             var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
                             var mer = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
-                            if (!string.IsNullOrEmpty(pos.SeoKeyword))
+                            var brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
+                            if (brand.Id > 0 && brand.SingleDepositApi == 0 && !string.IsNullOrEmpty(pos.SeoKeyword))
                             {
                             {
-                                if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
-                                {
-                                    SeoKeyword = (decimal.Parse(pos.SeoKeyword) / 100).ToString();
-                                }
-                                else
-                                {
-                                    SeoKeyword = pos.SeoKeyword;
-                                }
+                                SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
+                            }
+                            else
+                            {
+                                SeoKeyword = pos.SeoKeyword;
                             }
                             }
                             var user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
                             var user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
                             var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == user.Id) ?? new UserAccount();
                             var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == user.Id) ?? new UserAccount();
@@ -2637,16 +2635,14 @@ namespace MySystem.Areas.Admin.Controllers
                             var ThirdMakerCode = ""; //次次顶级创客编号
                             var ThirdMakerCode = ""; //次次顶级创客编号
                             var ThirdRealName = ""; //次次顶级创客姓名
                             var ThirdRealName = ""; //次次顶级创客姓名
                             var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == mer.KqSnNo) ?? new PosMachinesTwo();
                             var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == mer.KqSnNo) ?? new PosMachinesTwo();
-                            if (!string.IsNullOrEmpty(pos.SeoKeyword))
+                            var brand = db.KqProducts.FirstOrDefault(m => m.Id == pos.BrandId) ?? new KqProducts();
+                            if (brand.Id > 0 && brand.SingleDepositApi == 0 && !string.IsNullOrEmpty(pos.SeoKeyword))
                             {
                             {
-                                if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
-                                {
-                                    SeoKeyword = (decimal.Parse(pos.SeoKeyword) / 100).ToString();
-                                }
-                                else
-                                {
-                                    SeoKeyword = pos.SeoKeyword;
-                                }
+                                SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
+                            }
+                            else
+                            {
+                                SeoKeyword = pos.SeoKeyword;
                             }
                             }
                             var user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
                             var user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
                             var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == user.Id) ?? new UserAccount();
                             var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == user.Id) ?? new UserAccount();

+ 4 - 0
Areas/Admin/Controllers/OperateServer/StoreMachineApplyOperateController.cs

@@ -643,6 +643,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 if (items == null)
                 if (items == null)
                 {
                 {
@@ -674,6 +675,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 if (items.Num > num)
                 if (items.Num > num)
@@ -706,6 +708,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 Models.MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new Models.MachineForSnNo();
                 Models.MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new Models.MachineForSnNo();
                 var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId && m.StoreId == FromStoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0) ?? new Models.PosMachinesTwo();
                 var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId && m.StoreId == FromStoreId && m.UserId == 0 && m.BuyUserId == 0 && m.PreUserId == 0) ?? new Models.PosMachinesTwo();
                 if (pos.BindingState == 1 || pos.ActivationState == 1)
                 if (pos.BindingState == 1 || pos.ActivationState == 1)
@@ -774,6 +777,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 tostore = db.StoreHouse.FirstOrDefault(m => m.Sort > 0 && m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status == 1);
                 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);
                 SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
                 if (item == null)
                 if (item == null)

+ 4 - 0
Areas/Admin/Controllers/OperateServer/StoreMachineApplysOperateController.cs

@@ -540,6 +540,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandId);
                 if (items == null)
                 if (items == null)
                 {
                 {
@@ -571,6 +572,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == BrandIds);
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 CheckSendInfo items = checksendInfos.FirstOrDefault(m => m.BrandId == BrandIds) ?? new CheckSendInfo();
                 if (items.Num > num)
                 if (items.Num > num)
@@ -603,6 +605,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
                 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();
                 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)
                 if (pos.BindingState == 1 || pos.ActivationState == 1)
@@ -658,6 +661,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 10) FromStoreId = 5512;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 11) FromStoreId = 5513;
                 if (BrandId == 12) FromStoreId = 5907;
                 if (BrandId == 12) FromStoreId = 5907;
+                if (BrandId == 13) FromStoreId = 6381;
                 tostore = db.StoreHouse.FirstOrDefault(m => m.Sort > 0 && m.UserId == apply.UserId && m.BrandId == BrandId.ToString() && m.Status == 1);
                 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);
                 SendInfo item = sendInfos.FirstOrDefault(m => m.FromStoreId == FromStoreId && m.ToStoreId == tostore.Id && m.BrandId == BrandId);
                 if (item == null)
                 if (item == null)