|
@@ -372,6 +372,8 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
string SwapSnExpand = apply.SwapSnExpand;
|
|
string SwapSnExpand = apply.SwapSnExpand;
|
|
|
if (!string.IsNullOrEmpty(SwapSnExpand))
|
|
if (!string.IsNullOrEmpty(SwapSnExpand))
|
|
|
{
|
|
{
|
|
|
|
|
+ StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == apply.StoreId) ?? new StoreHouse();
|
|
|
|
|
+
|
|
|
string key = function.MD5_16(apply.UserId + apply.OrderExpand);
|
|
string key = function.MD5_16(apply.UserId + apply.OrderExpand);
|
|
|
string[] list = SwapSnExpand.TrimEnd('\n').Split('\n');
|
|
string[] list = SwapSnExpand.TrimEnd('\n').Split('\n');
|
|
|
if (apply.Sort > 0)
|
|
if (apply.Sort > 0)
|
|
@@ -438,6 +440,9 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(apply) + "#cut#" + Newtonsoft.Json.JsonConvert.SerializeObject(order) + "#cut#" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "机具申请订单取消日志");
|
|
function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(apply) + "#cut#" + Newtonsoft.Json.JsonConvert.SerializeObject(order) + "#cut#" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "机具申请订单取消日志");
|
|
|
db.MachineApply.Remove(apply);
|
|
db.MachineApply.Remove(apply);
|
|
|
db.Orders.Remove(order);
|
|
db.Orders.Remove(order);
|
|
|
|
|
+
|
|
|
|
|
+ //恢复仓库申请订单数量
|
|
|
|
|
+ store.ApplyNum -= list.Length;
|
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|