Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -1156,9 +1156,28 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
foreach(PrdMoTask item in list)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.worker_id))
|
||||
// if (string.IsNullOrEmpty(item.worker_id))
|
||||
// {
|
||||
// throw Oops.Bah("请先分配员工");
|
||||
// }
|
||||
|
||||
if (item.scheduling_class_type == "1")
|
||||
{
|
||||
throw Oops.Bah("请先分配员工");
|
||||
if (string.IsNullOrEmpty(item.dayshift_worker_id) ||
|
||||
string.IsNullOrEmpty(item.nightshift_worker_id))
|
||||
{
|
||||
throw Oops.Bah("请先分配员工");
|
||||
}
|
||||
}else if (item.scheduling_class_type == "2")
|
||||
{
|
||||
if (string.IsNullOrEmpty(item.dayshift_worker_id) ||
|
||||
string.IsNullOrEmpty(item.nightshift_worker_id) ||
|
||||
string.IsNullOrEmpty(item.dayshiftafter_worker_id) ||
|
||||
string.IsNullOrEmpty(item.nightshiftafter_worker_id)
|
||||
)
|
||||
{
|
||||
throw Oops.Bah("请先分配员工");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1214,6 +1233,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
foreach (PrdMoTask? task in prdTaskList.Where(p => p.mo_task_status == "ToBeStarted").ToList())
|
||||
{
|
||||
ToolMolds toolMolds = await _db.Queryable<ToolMolds>().SingleAsync(x=>x.id==task.mold_id);
|
||||
TriggerPlanEntity entity = new()
|
||||
{
|
||||
materialid = task.material_id,
|
||||
@@ -1221,6 +1241,8 @@ namespace Tnb.ProductionMgr
|
||||
workid = task.workstation_id,
|
||||
triggerevent = EnumTriggerEvent.开工首件检,
|
||||
plan_check_type = WmsWareHouseConst.SHOUJIAN_ID,
|
||||
mo_task_code = task.mo_task_code,
|
||||
newpronum = toolMolds?.mold_cavity
|
||||
};
|
||||
await _qcCheckPlanService.CreateTask(entity);
|
||||
}
|
||||
@@ -1921,11 +1943,12 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
isCheckFlag = true;
|
||||
|
||||
}else if (wmsCarryH.is_check==EnumCheckConclusion.检验中.ParseToInt().ToString())
|
||||
{
|
||||
return "检验中,请稍后提报";
|
||||
}
|
||||
|
||||
|
||||
if ( wmsCarryH.is_check != EnumCheckConclusion.待检.ParseToInt().ToString())
|
||||
{
|
||||
throw Oops.Bah("提交失败,载具状态不是待检");
|
||||
}
|
||||
|
||||
#endregion
|
||||
_ = prdMoTask.reported_work_qty == null
|
||||
@@ -3808,6 +3831,7 @@ namespace Tnb.ProductionMgr
|
||||
.Where(x => x.id == moTaskId)
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
ToolMolds toolMolds = await _db.Queryable<ToolMolds>().SingleAsync(x=>x.id==task.mold_id);
|
||||
TriggerPlanEntity entity = new()
|
||||
{
|
||||
materialid = task.material_id,
|
||||
@@ -3815,6 +3839,7 @@ namespace Tnb.ProductionMgr
|
||||
workid = task.workstation_id,
|
||||
triggerevent = EnumTriggerEvent.末检质检方案,
|
||||
mo_task_code = task.mo_task_code,
|
||||
newpronum = toolMolds?.mold_cavity
|
||||
};
|
||||
|
||||
await _qcCheckPlanService.CreateTask(entity);
|
||||
|
||||
@@ -617,7 +617,7 @@ namespace Tnb.QcMgr
|
||||
check_type = entity.check_type,
|
||||
batch = entity.batch
|
||||
};
|
||||
if (entity.triggerevent == EnumTriggerEvent.零部件最终检验)
|
||||
if (entity.triggerevent == EnumTriggerEvent.零部件最终检验 || entity.triggerevent == EnumTriggerEvent.开工首件检 || entity.triggerevent==EnumTriggerEvent.末检质检方案 )
|
||||
{
|
||||
qcCheckExecH.checknum = entity.newpronum.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user