PDA设备点巡检 保养相关接口
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Tnb.EquipMgr
|
|||||||
foreach (var item in input.details)
|
foreach (var item in input.details)
|
||||||
{
|
{
|
||||||
await db.Updateable<EqpMaintainRecordD>()
|
await db.Updateable<EqpMaintainRecordD>()
|
||||||
.SetColumns(x => x.repeat_descrip == item["repeat_descrip"])
|
.SetColumnsIF(item.ContainsKey("repeat_descrip"),x => x.repeat_descrip == item["repeat_descrip"])
|
||||||
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
||||||
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
@@ -187,5 +187,32 @@ namespace Tnb.EquipMgr
|
|||||||
|
|
||||||
return PageResult<EquipMaintainRecordQueryOutput>.SqlSugarPageResult(result);
|
return PageResult<EquipMaintainRecordQueryOutput>.SqlSugarPageResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据id获取保养相关信息
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> GetEqpMaintainRecordInfoById(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<EqpMaintainRecordH>()
|
||||||
|
.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();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,5 +162,32 @@ namespace Tnb.EquipMgr
|
|||||||
|
|
||||||
return PageResult<EquipSpotInsRecordQueryOutput>.SqlSugarPageResult(result);
|
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