PDA设备点巡检 保养相关接口
This commit is contained in:
@@ -162,5 +162,32 @@ namespace Tnb.EquipMgr
|
||||
|
||||
return PageResult<EquipSpotInsRecordQueryOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据id获取点巡检相关信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetEqpSpotInsRecordInfoById(Dictionary<string,string> dic)
|
||||
{
|
||||
string id = dic.ContainsKey("id") ? dic["id"] : "";
|
||||
if (string.IsNullOrEmpty(id)) return null;
|
||||
var db = _repository.AsSugarClient();
|
||||
return await db.Queryable<EqpSpotInsRecordH>()
|
||||
.LeftJoin<EqpEquipment>((a, b) => a.equip_id==b.id)
|
||||
.Where((a, b) => a.id == id)
|
||||
.Select((a, b) => new
|
||||
{
|
||||
id = a.id,
|
||||
equip_id = a.equip_id,
|
||||
equip_code = b.code,
|
||||
equip_name = b.name,
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
result_remark = a.result_remark,
|
||||
result = a.result,
|
||||
status = a.status,
|
||||
}).FirstAsync();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user