111
This commit is contained in:
@@ -215,6 +215,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
public IActionResult checkProductionOut(string production_packcode = "", string shipment_num = "")
|
public IActionResult checkProductionOut(string production_packcode = "", string shipment_num = "")
|
||||||
{
|
{
|
||||||
string msg = "可出库";
|
string msg = "可出库";
|
||||||
|
|
||||||
return ToResponse(new ApiResult(200, msg, true));
|
return ToResponse(new ApiResult(200, msg, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ namespace ZR.Service.mes.wms
|
|||||||
public List<WmMaterialQuery_print> Queryoutoder_matrials(string shipment_num)
|
public List<WmMaterialQuery_print> Queryoutoder_matrials(string shipment_num)
|
||||||
{
|
{
|
||||||
|
|
||||||
List<WmMaterialQuery_print> stockList = Context.Queryable<WmMaterialOutorder>()
|
List<WmMaterialQuery_print> stockList = Context.Queryable<WmMaterialOutorder>()
|
||||||
.LeftJoin<WmMaterial>((mo, m) => mo.FkMaterialId == m.Id)
|
.LeftJoin<WmMaterial>((mo, m) => mo.FkMaterialId == m.Id)
|
||||||
.Where(mo => mo.FkOutorderId == shipment_num)
|
.Where(mo => mo.FkOutorderId == shipment_num)
|
||||||
.Select((mo, m) => new WmMaterialQuery_print()
|
.Select((mo, m) => new WmMaterialQuery_print()
|
||||||
@@ -257,15 +257,20 @@ namespace ZR.Service.mes.wms
|
|||||||
//需求零件数
|
//需求零件数
|
||||||
RequireOutNum = mo.OuthouseNum
|
RequireOutNum = mo.OuthouseNum
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
if (stockList != null && stockList.Count > 0)
|
if (stockList != null && stockList.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (var stock in stockList)
|
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;
|
stock.ItemNum = num ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user