抛光,后道,GP12质量报表逻辑变动,看板逻辑变动
This commit is contained in:
@@ -660,9 +660,9 @@ namespace ZR.Service.mes.qc
|
||||
boardData.ProductPolishTotal = boardData.ProductPolishTotal / 3;
|
||||
boardData.ProductSandingTotal = boardData.ProductSandingTotal / 3;
|
||||
boardData.ProductDiscardTotal = boardData.ProductDiscardTotal / 3;
|
||||
// 合格数补正(合格数 = 总合格数 - 门把手 - 倒车雷达)
|
||||
/*boardData.ProductQualifiedTotal = boardData.ProductQualifiedTotal - (boardData.ProductDoorknobQualifiedTotal + boardData.ProductParkingSensorbQualifiedTotal);*/
|
||||
|
||||
// 投入数,合格数补正(合格数 = 总合格数 - 倒车雷达)[倒车雷达不参与合格率统计]
|
||||
boardData.ProductRequireTotal -= boardData.ProductParkingSensorbQualifiedTotal;
|
||||
boardData.ProductQualifiedTotal -= boardData.ProductParkingSensorbQualifiedTotal;
|
||||
if (boardData.ProductRequireTotal > 0)
|
||||
{
|
||||
double passRate =
|
||||
@@ -896,12 +896,14 @@ namespace ZR.Service.mes.qc
|
||||
.Queryable<WmPolishQualityStatistics>()
|
||||
.Where(predicate2)
|
||||
.Sum(it => it.BaofeiTotal) ?? 0;
|
||||
// 合格数修正
|
||||
boardData.PolishQualifiedTotal =
|
||||
boardData.PolishQualifiedTotal - boardData.PolishParkingSensorbQualifiedTotal;
|
||||
boardData.AfterPolishQualifiedTotal =
|
||||
boardData.AfterPolishQualifiedTotal
|
||||
- boardData.AfterPolishParkingSensorbQualifiedTotal;
|
||||
// 合格数修正 去掉倒车雷达
|
||||
boardData.PolishRequireTotal -= boardData.PolishParkingSensorbQualifiedTotal;
|
||||
boardData.PolishQualifiedTotal -= boardData.PolishParkingSensorbQualifiedTotal;
|
||||
|
||||
boardData.AfterPolishQualifiedTotal -=
|
||||
boardData.AfterPolishParkingSensorbQualifiedTotal;
|
||||
boardData.AfterPolishRequireTotal -= boardData.AfterPolishParkingSensorbQualifiedTotal;
|
||||
|
||||
if (boardData.PolishRequireTotal > 0)
|
||||
{
|
||||
double passRate =
|
||||
@@ -911,7 +913,10 @@ namespace ZR.Service.mes.qc
|
||||
if (boardData.AfterPolishRequireTotal > 0)
|
||||
{
|
||||
double passRate =
|
||||
((double)boardData.AfterPolishQualifiedTotal / boardData.AfterPolishRequireTotal) * 100;
|
||||
(
|
||||
(double)boardData.AfterPolishQualifiedTotal
|
||||
/ boardData.AfterPolishRequireTotal
|
||||
) * 100;
|
||||
boardData.AfterPolishQualifiePassRate = passRate.ToString("0") + "%";
|
||||
}
|
||||
return boardData;
|
||||
@@ -1060,16 +1065,15 @@ namespace ZR.Service.mes.qc
|
||||
.Queryable<WmGp12QualityStatistics>()
|
||||
.Where(predicate2)
|
||||
.Sum(it => it.BaofeiTotal) ?? 0;
|
||||
|
||||
boardData.GP12QualifiedTotal =
|
||||
boardData.GP12QualifiedTotal - boardData.GP12ParkingSensorQualifiedTotal;
|
||||
// 倒车雷达去除
|
||||
boardData.GP12QualifiedTotal -= boardData.GP12ParkingSensorQualifiedTotal;
|
||||
boardData.GP12RequireTotal -= boardData.GP12ParkingSensorQualifiedTotal;
|
||||
if (boardData.GP12RequireTotal > 0)
|
||||
{
|
||||
double passRate =
|
||||
((double)boardData.GP12QualifiedTotal / boardData.GP12RequireTotal) * 100;
|
||||
boardData.GP12QualifiePassRate = passRate.ToString("0") + "%";
|
||||
}
|
||||
|
||||
return boardData;
|
||||
}
|
||||
|
||||
@@ -1115,7 +1119,6 @@ namespace ZR.Service.mes.qc
|
||||
.Queryable<WmGoodsNowProduction>()
|
||||
.Where(predicate1)
|
||||
.Count();
|
||||
|
||||
boardData.FinishProductPartOutTotal =
|
||||
Context.Queryable<WmGoodsOutRecord>().Where(predicate2).Sum(it => it.GoodsNumAction)
|
||||
?? 0;
|
||||
@@ -1167,8 +1170,18 @@ namespace ZR.Service.mes.qc
|
||||
query.EndTime != null,
|
||||
it => it.StartTime <= query.EndTime.Value.ToLocalTime()
|
||||
)
|
||||
.And(it=>it.Type == 1)
|
||||
.And(it => it.Type == 1)
|
||||
.ToExpression();
|
||||
boardData.AfterPolishInTotal =
|
||||
Context
|
||||
.Queryable<WmPolishQualityStatistics>()
|
||||
.Where(predicate1)
|
||||
.Sum(it => it.QualifiedNumber) ?? 0;
|
||||
boardData.AfterPolishOutTotal =
|
||||
Context
|
||||
.Queryable<WmPolishQualityStatistics>()
|
||||
.Where(predicate1)
|
||||
.Sum(it => it.RequireNumber) ?? 0;
|
||||
boardData.StatisticsPolishQualifiedTotal =
|
||||
(
|
||||
Context
|
||||
@@ -1182,7 +1195,9 @@ namespace ZR.Service.mes.qc
|
||||
.Where(predicate2)
|
||||
.Sum(it => it.QualifiedNumber) ?? 0
|
||||
);
|
||||
boardData.StatisticsProductAndPolishQualifiedTotal = boardData.StatisticsPolishQualifiedTotal + boardData.ProductQualifiedTotal;
|
||||
boardData.StatisticsProductAndPolishQualifiedTotal =
|
||||
boardData.StatisticsPolishQualifiedTotal + boardData.ProductQualifiedTotal;
|
||||
|
||||
return boardData;
|
||||
}
|
||||
|
||||
|
||||
@@ -3856,8 +3856,8 @@ namespace ZR.Service.mes.qc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO 20241023 不再变动抛光盘点后的数据
|
||||
return 1;
|
||||
// 产线报表生成后自动化操作
|
||||
|
||||
try
|
||||
@@ -3873,7 +3873,7 @@ namespace ZR.Service.mes.qc
|
||||
Quantity = paoguang_by_first + paoguang_final,
|
||||
ActionTime = DateTime.Now.ToLocalTime(),
|
||||
CreatedBy = "包装" + team + "组",
|
||||
Remark = "首检抛光自动入库。来源工单号:[" + workorder_item.ClientWorkorder + "]"
|
||||
Remark = "产线抛光件,自动入库。来源工单号:[" + workorder_item.ClientWorkorder + "]"
|
||||
};
|
||||
wmPolishInventoryService.DoWmPolishWarehousing(warehousingInfo);
|
||||
// 2.成品入一次合格品库
|
||||
|
||||
@@ -119,6 +119,8 @@ namespace ZR.Service.mes.wms
|
||||
throw new Exception("投入数与合格数,抛光总数,打磨数,报废数不符合,请检查");
|
||||
}
|
||||
model.Id = SnowFlakeSingle.instance.NextId().ToString();
|
||||
|
||||
// 抛光品标记
|
||||
if (model.IsPolish)
|
||||
{
|
||||
model.Type = 1;
|
||||
@@ -127,6 +129,7 @@ namespace ZR.Service.mes.wms
|
||||
{
|
||||
model.Type = 0;
|
||||
}
|
||||
// 抛光合格率计算
|
||||
decimal qualifiedRate = 0.0m;
|
||||
if (model.QualifiedNumber != 0)
|
||||
{
|
||||
@@ -140,6 +143,10 @@ namespace ZR.Service.mes.wms
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("插入GP12检测结果记录失败");
|
||||
}
|
||||
// TODO 20241023 不再变动抛光仓库盘点数据
|
||||
Context.Ado.CommitTran();
|
||||
return res0;
|
||||
|
||||
WmOneTimeInventoryService oneTimeService = new();
|
||||
WmPolishInventoryService inventoryService = new();
|
||||
//抛光品重新进入抛光仓库
|
||||
@@ -248,6 +255,15 @@ namespace ZR.Service.mes.wms
|
||||
(decimal)model.QualifiedNumber / model.RequireNumber * 100 ?? 0.0m;
|
||||
}
|
||||
model.QualifiedRate = qualifiedRate;
|
||||
|
||||
if (model.IsPolish)
|
||||
{
|
||||
model.Type = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.Type = 0;
|
||||
}
|
||||
return Update(model, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -145,6 +145,11 @@ namespace ZR.Service.mes.wms
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("插入抛光质检记录失败");
|
||||
}
|
||||
// TODO 20241023 不再变动抛光仓库盘点数据
|
||||
Context.Ado.CommitTran();
|
||||
return res0;
|
||||
|
||||
|
||||
WmPolishInventoryService inventoryService = new();
|
||||
WmOneTimeInventoryService oneTimeService = new();
|
||||
// 合格品检查是否是门把手,是进入成品库(仅出库),不是进入一次合格品库
|
||||
@@ -275,6 +280,14 @@ namespace ZR.Service.mes.wms
|
||||
(decimal)model.QualifiedNumber / model.RequireNumber * 100 ?? 0.0m;
|
||||
}
|
||||
model.QualifiedRate = qualifiedRate;
|
||||
if (model.IsOver)
|
||||
{
|
||||
model.Type = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.Type = 0;
|
||||
}
|
||||
return Update(model, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -118,7 +118,16 @@ namespace ZR.Service.mes.wms
|
||||
throw new Exception("投入数与合格数,打磨数,报废数不符合,请检查");
|
||||
}
|
||||
model.Id = SnowFlakeSingle.instance.NextId().ToString();
|
||||
model.Type = 0;
|
||||
|
||||
if(model.IsOutbound)
|
||||
{
|
||||
model.Type = 1;
|
||||
model.Remark += "[直接出库]";
|
||||
}
|
||||
else
|
||||
{
|
||||
model.Type = 0;
|
||||
}
|
||||
decimal qualifiedRate = 0.0m;
|
||||
if (model.QualifiedNumber != 0)
|
||||
{
|
||||
@@ -134,6 +143,9 @@ namespace ZR.Service.mes.wms
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("插入抛光操作记录失败");
|
||||
}
|
||||
// TODO 20241023 不再变动抛光仓库盘点数据
|
||||
Context.Ado.CommitTran();
|
||||
return res0;
|
||||
WmPolishInventoryService inventoryService = new();
|
||||
WmOneTimeInventoryService oneTimeService = new();
|
||||
//抛光品直接出库到GP12
|
||||
@@ -248,6 +260,14 @@ namespace ZR.Service.mes.wms
|
||||
(decimal)model.QualifiedNumber / model.RequireNumber * 100 ?? 0.0m;
|
||||
}
|
||||
model.QualifiedRate = qualifiedRate;
|
||||
if (model.IsOutbound)
|
||||
{
|
||||
model.Type = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
model.Type = 0;
|
||||
}
|
||||
return Update(model, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user