|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|