diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 46f93609..922d8fca 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -2092,8 +2092,9 @@ namespace Tnb.ProductionMgr }else if (mo.mo_type == DictConst.PrdMoTypeJC && prdMoTask.is_hand_set_batch==0) { + EqpEquipment equipment = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.eqp_id); ToolMolds toolMolds = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.mold_id); - batch = $"6{toolMolds.mold_code.Substring(toolMolds.mold_code.Length - 4, 2)}{DateTime.Now.ToString("yyMMdd")}"; + batch = $"6{toolMolds.mold_code.Substring(toolMolds.mold_code.Length - 4, 2)}{equipment.code.Substring(equipment.code.Length - 2, 2)}{DateTime.Now.ToString("yyMMdd")}"; await db.Updateable() .SetColumns(x => x.batch == batch) .Where(x => x.id == prdMoTask.id)