change - 发泡MES计划完工数量显示修改

dev
wenjy 1 year ago
parent ba7362f11f
commit 6d509fff5d

@ -64,10 +64,17 @@ namespace Admin.Core.Service
ProductPlanInfo planInfo = null;
try
{
Expression<Func<ProductPlanInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.PlanCode == planCode);
//Expression<Func<ProductPlanInfo, bool>> exp = s1 => true;
//exp = exp.And(x => x.PlanCode == planCode);
//var info = await _dal.QueryAsync(exp);
var info = _dal.Query(x=>x.PlanCode == planCode);
planInfo = await _dal.FirstAsync(exp);
if (info != null)
{
planInfo = info.OrderBy(x => x.CreatedTime).First();
}
logHelper.Info($"根据计划编号{planCode};获取到的计划信息:{planInfo.ToJson()}");
}

@ -122,7 +122,7 @@ namespace Admin.Core.Service.Service_New
foreach (var boxFoamType in boxFoamTypeList)
{
var boxPlanList = _boxFoamPlanServices.Query(x => x.ProductLineCode == productLineCode && x.StationCode == stationCode && x.MaterialCode == boxFoamType && x.PlanAmount > x.CompleteAmount);
var boxPlanList = _boxFoamPlanServices.Query(x => x.ProductLineCode == productLineCode && x.StationCode == stationCode && x.MaterialCode == boxFoamType && x.PlanAmount > x.CompleteAmount && x.ShiftType == 1);
if (boxPlanList != null)
{
if (boxPlanList.Count > 0)

@ -240,12 +240,13 @@ namespace Aucma.Core.BoxFoam.Business
log.Warn("班组切换小时数据记录保存失败");
}
//当班计划班组计划设为0
var planInfoList = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005").Result;
var planInfoList = _boxFoamPlanServices.QueryAsync(x => x.ProductLineCode == "CX_02" && x.StationCode == "1005" && x.ShiftType == 1).Result;
if (planInfoList != null)
{
foreach (var plan in planInfoList)
{
plan.ShiftType = 0;
bool updateFlag = _boxFoamPlanServices.UpdateAsync(plan).Result;
@ -274,7 +275,6 @@ namespace Aucma.Core.BoxFoam.Business
{
log.Warn($"计划:{plan.OrderCode},班组切换标识更新失败");
}
}
}
}

@ -63,6 +63,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
PlanAmount = item.PlanAmount,
ResidueAmount = item.PlanAmount - item.CompleteAmount,
SpliteResidueAmount = item.PlanAmount - residue,
CompleteAmount = item.CompleteAmount,
StartDate = item.BeginTime
});
i++;
@ -95,6 +96,7 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
PlanAmount = item.PlanAmount,
ResidueAmount = item.PlanAmount - item.CompleteAmount,
SpliteResidueAmount = item.PlanAmount - residue,
CompleteAmount = item.CompleteAmount,
StartDate = item.BeginTime
});
i++;

Loading…
Cancel
Save