Explorar el Código

退款时判断wifi押金,并打标记

lcl hace 1 año
padre
commit
8049977703
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      Areas/Admin/Controllers/MainServer/OrdersController.cs

+ 12 - 0
Areas/Admin/Controllers/MainServer/OrdersController.cs

@@ -1019,6 +1019,18 @@ namespace MySystem.Areas.Admin.Controllers
                         order.RefundReason = null;
                         order.RefundActAmount = 0;
                     }
+
+                    if(!string.IsNullOrEmpty(order.SnNos) && order.ProductId == 134)
+                    {
+                        int count = (int)order.TotalPrice / 750;
+                        List<string> list = order.SnNos.Split(',').ToList();
+                        IQueryable<PosMachinesTwo> poslist = db.PosMachinesTwo.Where(m => list.Contains(m.PosSn) && m.IsOpAct == 1).Take(count);
+                        foreach(PosMachinesTwo pos in poslist)
+                        {
+                            pos.IsOpAct = 2;
+                        }
+                    }
+
                     db.SaveChanges();
                 }
             }