1
This commit is contained in:
@@ -54,16 +54,19 @@ namespace Tnb.TaskScheduler.Listener
|
||||
|
||||
var DictionaryType = await repository.AsSugarClient().Queryable<DictionaryTypeEntity>().Where(p => p.FullName == "质检状态").FirstAsync();
|
||||
var DictionaryData = await repository.AsSugarClient().Queryable<DictionaryDataEntity>().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "待执行").FirstAsync();
|
||||
var time = DateTime.Now;
|
||||
foreach (var PrdMoTask in PrdMoTasks)
|
||||
{
|
||||
|
||||
QcCheckExecH qcCheckExecH = new QcCheckExecH();
|
||||
qcCheckExecH.id = SnowflakeIdHelper.NextId();
|
||||
qcCheckExecH.checktype = PlanH.checktype;
|
||||
qcCheckExecH.status = DictionaryData.Id;
|
||||
qcCheckExecH.tasktime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
qcCheckExecH.tasktime = time.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
qcCheckExecH.materialid = PrdMoTask.material_id;
|
||||
qcCheckExecH.processid = PrdMoTask.process_id;
|
||||
qcCheckExecH.workid = PrdMoTask.workstation_id;
|
||||
qcCheckExecH.create_time = time;
|
||||
var ExecDs = new List<QcCheckExecD>();
|
||||
foreach (var PlanD in PlanDs)
|
||||
{
|
||||
@@ -80,6 +83,7 @@ namespace Tnb.TaskScheduler.Listener
|
||||
QcCheckExecD.custom = PlanD.custom;
|
||||
QcCheckExecD.typeid = PlanD.typeid;
|
||||
QcCheckExecD.itemid = PlanD.itemid;
|
||||
QcCheckExecD.create_time = time;
|
||||
ExecDs.Add(QcCheckExecD);
|
||||
}
|
||||
await repository.AsSugarClient().Insertable(qcCheckExecH).ExecuteCommandAsync();
|
||||
|
||||
Reference in New Issue
Block a user