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