From f72138f2b540bd3ef4495f705d7abbe8729617a4 Mon Sep 17 00:00:00 2001 From: liuwf Date: Fri, 8 Mar 2024 19:46:52 +0800 Subject: [PATCH] . --- Aucma.Scada.Business/InStoreTaskHandle.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Aucma.Scada.Business/InStoreTaskHandle.cs b/Aucma.Scada.Business/InStoreTaskHandle.cs index 24980d7e..d737b5ba 100644 --- a/Aucma.Scada.Business/InStoreTaskHandle.cs +++ b/Aucma.Scada.Business/InStoreTaskHandle.cs @@ -128,13 +128,15 @@ namespace Aucma.Scada.Business // 更新库存 if(tempSpace.spaceStock!=spaceInfo.spaceStock || tempSpace.onRouteAmount != spaceInfo.onRouteAmount) { - if (spaceInfo.spaceCode.Contains("4")) - { - Console.WriteLine("RealUpdateSpaceInfoByPlc2 " + JsonChange.Instance.ModeToJson(spaceInfo)); - } // Console.WriteLine("RealUpdateSpaceInfoByPlc1 " + JsonChange.Instance.ModeToJson(spaceInfo)); spaceInfo.spaceStock = tempSpace.spaceStock; spaceInfo.onRouteAmount = tempSpace.onRouteAmount; + if(spaceInfo.spaceStock==0 && spaceInfo.onRouteAmount == 0) + { + // 清空型号供新型号使用 + spaceInfo.materialType = null; + spaceInfo.typeNameA = null; + } // Console.WriteLine("RealUpdateSpaceInfoByPlc2 "+JsonChange.Instance.ModeToJson(spaceInfo)); _spaceInfoService.UpdateSpaceInfo(spaceInfo); }