点巡检 设备模具保养执行修改
This commit is contained in:
@@ -34,5 +34,19 @@
|
||||
/// 模具状态
|
||||
/// </summary>
|
||||
public string mold_status { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 进度条
|
||||
// /// </summary>
|
||||
// public string progress_bar { get; set; }
|
||||
|
||||
public int? complete_qty { get; set; }
|
||||
|
||||
public int? scheduled_qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 领用设备
|
||||
/// </summary>
|
||||
public string equip_name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,8 +138,11 @@ namespace Tnb.ProductionMgr
|
||||
.InnerJoin<ToolMolds>((a, b) => a.mold_id == b.id)
|
||||
.InnerJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||
.LeftJoin<DictionaryDataEntity>((a,b,c,d)=>d.Id==b.mold_status)
|
||||
.LeftJoin(_db.SqlQueryable<ToolMoldRequisition>("select * from tool_mold_requisition where id in (select max(id) from tool_mold_requisition group by mold_id)"),(a,b,c,d,e)=>b.id==e.mold_id)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>e.equip_id==f.id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f,g)=>e.mo_task_id==g.id)
|
||||
.Where((a, b, c) => a.material_id == materialId)
|
||||
.Select((a, b, c,d) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
|
||||
.Select((a, b, c,d,e,f,g) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
|
||||
{
|
||||
mold_id = b.id,
|
||||
mold_code = b.mold_code,
|
||||
@@ -149,6 +152,9 @@ namespace Tnb.ProductionMgr
|
||||
material_code = c.code,
|
||||
mold_status = d.FullName,
|
||||
available_stations = SqlFunc.Subqueryable<EqpEquipment>().Where(it => it.mold_id == a.id).Count(),
|
||||
equip_name = f.name,
|
||||
complete_qty = SqlFunc.IsNull(g.reported_work_qty, 0) + SqlFunc.IsNull(g.scrap_qty, 0),
|
||||
scheduled_qty = SqlFunc.IsNull(g.scheduled_qty, 0)
|
||||
}).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -137,12 +137,14 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah($"{eqpEquipment.name}未设置原料条码数据采集项");
|
||||
}
|
||||
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().SingleAsync(x => x.id == item.material_id);
|
||||
|
||||
Dictionary<string, string> dicCommand3 = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["DevName"] = eqpDaq.equip_code,
|
||||
["token"] = _eleCtlCfg.token,
|
||||
["TagName"] = eqpDaq.label_name,
|
||||
["Value"] = item.material_id,
|
||||
["Value"] = basMaterial?.code ?? "",
|
||||
};
|
||||
Log.Information($"注塑主控柜{eqpDaq.label_name}更新参数:{JsonConvert.SerializeObject(dicCommand3)}");
|
||||
string responseresult3 =
|
||||
|
||||
Reference in New Issue
Block a user