This commit is contained in:
qianhao.xu
2024-03-28 08:52:44 +08:00
parent a5196f42e4
commit 9e6577f17e
2 changed files with 9 additions and 3 deletions

View File

@@ -215,6 +215,7 @@ namespace ZR.Admin.WebApi.Controllers
public IActionResult checkProductionOut(string production_packcode = "", string shipment_num = "")
{
string msg = "可出库";
return ToResponse(new ApiResult(200, msg, true));
}

View File

@@ -257,15 +257,20 @@ namespace ZR.Service.mes.wms
//需求零件数
RequireOutNum = mo.OuthouseNum
}).ToList();
if (stockList != null && stockList.Count > 0)
{
foreach (var stock in stockList)
{
//现有箱数
stock.PackageNum = Context.Queryable<WmGoodsNowProduction>().Where(it => it.Partnumber == stock.Partnumber).Count();
stock.PackageNum = Context.Queryable<WmGoodsNowProduction>()
.Where(it => it.Partnumber == stock.Partnumber).Count();
//现有零件数
int? num = Context.Queryable<WmGoodsNowProduction>().Where(it => it.Partnumber == stock.Partnumber).Sum(it => it.GoodsNumLogic);
int? num = Context.Queryable<WmGoodsNowProduction>()
.Where(it => it.Partnumber == stock.Partnumber)
.Sum(it => it.GoodsNumLogic);
stock.ItemNum = num ?? 0;
}
}