|
|
@@ -175,11 +175,16 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
var ValidAmount = amount.ValidAmount;
|
|
|
var FixedAmount = amount.FixedAmount;
|
|
|
var TempAmount = amount.TempAmount;
|
|
|
- // var LeaderBalanceAmount = amount.LeaderBalanceAmount;
|
|
|
+ var check = db.StoreHouseAmountPromiss.Any(m => m.ToUserId == UserId);
|
|
|
+ decimal PromissAmount = 0;
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ PromissAmount = db.StoreHouseAmountPromiss.Where(m => m.Status == 1 && m.ToUserId == UserId).Sum(m => m.PromissAmount);
|
|
|
+ }
|
|
|
dic["ValidAmount"] = ValidAmount.ToString();//可用额度
|
|
|
dic["FixedAmount"] = FixedAmount.ToString();//固定额度
|
|
|
dic["TempAmount"] = TempAmount.ToString();//临时额度
|
|
|
- // dic["LeaderBalanceAmount"] = LeaderBalanceAmount.ToString();//担保金额
|
|
|
+ dic["PromissAmount"] = PromissAmount.ToString();//担保金额
|
|
|
}
|
|
|
return Json(obj);
|
|
|
}
|
|
|
@@ -272,7 +277,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
RedisDbconn.Instance.Set("StoreForCode:" + No, Id);
|
|
|
}
|
|
|
StoreForName storeForName = db.StoreForName.FirstOrDefault(m => m.Name == data.StoreName);
|
|
|
- if(storeForName == null)
|
|
|
+ if (storeForName == null)
|
|
|
{
|
|
|
db.StoreForName.Add(new StoreForName()
|
|
|
{
|
|
|
@@ -476,7 +481,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
RedisDbconn.Instance.Set("StoreForCode:" + No, Id);
|
|
|
}
|
|
|
StoreForName storeForName = db.StoreForName.FirstOrDefault(m => m.Name == data.StoreName);
|
|
|
- if(storeForName == null)
|
|
|
+ if (storeForName == null)
|
|
|
{
|
|
|
db.StoreForName.Add(new StoreForName()
|
|
|
{
|
|
|
@@ -731,7 +736,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
var user = db.Users.FirstOrDefault(m => m.Id == toStore.UserId) ?? new Users();
|
|
|
var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == toStore.UserId) ?? new UserAccount();
|
|
|
var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
|
|
|
- var fuserMachineData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == userForMakerCode.UserId+ "_" + brandInfo.Id);
|
|
|
+ var fuserMachineData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == userForMakerCode.UserId + "_" + brandInfo.Id);
|
|
|
if (brandInfo.Name.Contains("电签"))
|
|
|
{
|
|
|
amount = 200;
|