diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
index 90c31b08..d8d5d66f 100644
--- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Mvc;
-
+using System.Reflection.Metadata;
using ZR.Admin.WebApi.Extensions;
using ZR.Admin.WebApi.Filters;
using ZR.Model.MES.wms;
@@ -137,7 +137,22 @@ namespace ZR.Admin.WebApi.Controllers
return ToResponse(response);
}
-
+ ///
+ /// 修改库存数量
+ ///
+ ///
+ ///
+ ///
+ [HttpGet("modifyInventoryQuantity")]
+ public IActionResult ModifyInventoryQuantity(string id,int stack_num)
+ {
+ if(string.IsNullOrEmpty(id))
+ {
+ return SUCCESS(null);
+ }
+ var response= _WmGoodsNowProductionService.ModifyInventoryQuantity(id, stack_num);
+ return SUCCESS(response);
+ }
}
diff --git a/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs b/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs
index c1fc9914..b41f83ce 100644
--- a/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs
+++ b/ZR.Service/mes/qc/QcQualityStatisticsFirstService.cs
@@ -63,6 +63,11 @@ namespace ZR.Service.mes.qc
///
public QcQualityStatisticsFirst AddQcQualityStatisticsFirst(QcQualityStatisticsFirst model)
{
+ if(string.IsNullOrEmpty(model.Id))
+ {
+
+ model.Id= SnowFlakeSingle.Instance.NextId().ToString();
+ }
return Context.Insertable(model).ExecuteReturnEntity();
}
diff --git a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
index e611051c..e94849ce 100644
--- a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
+++ b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
@@ -42,5 +42,7 @@ namespace ZR.Service.mes.wms.IService
int UpdateWmGoodsNowProduction(WmGoodsNowProduction parm);
+ int ModifyInventoryQuantity(string id, int stack_num);
+
}
}
diff --git a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
index 0475eb0f..f9cb0245 100644
--- a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
+++ b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
@@ -233,6 +233,19 @@ namespace ZR.Service.mes.wms
//return response;
return Update(model, true);
}
+
+ ///
+ /// 修改实际库存
+ ///
+ ///
+ ///
+ ///
+ public int ModifyInventoryQuantity(string id, int stack_num)
+ {
+ return Context.Updateable()
+ .SetColumns(it => it.GoodsNumAction == stack_num)
+ .Where(it => it.Id == id).ExecuteCommand();
+ }
}