执行代码清理,修复warning
This commit is contained in:
@@ -14,7 +14,7 @@ using Tnb.BasicData;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.EquipMgr.Entities.Dto;
|
||||
|
||||
namespace Tnb.EquipMgr
|
||||
namespace Tnb.EquipMgr.App
|
||||
{
|
||||
/// <summary>
|
||||
/// app设备维修登记
|
||||
@@ -45,12 +45,12 @@ namespace Tnb.EquipMgr
|
||||
|
||||
private async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string, object> queryJson = !string.IsNullOrEmpty(input.queryJson) ? JsonConvert.DeserializeObject<Dictionary<string, object>>(input.queryJson) : new Dictionary<string, object>();
|
||||
string code = queryJson != null && queryJson.ContainsKey("code") ? queryJson["code"].ToString() : "";
|
||||
string name = queryJson != null && queryJson.ContainsKey("name") ? queryJson["name"].ToString() : "";
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
Dictionary<string, object>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? JsonConvert.DeserializeObject<Dictionary<string, object>>(input.queryJson) : new Dictionary<string, object>();
|
||||
string? code = queryJson != null && queryJson.ContainsKey("code") ? queryJson["code"].ToString() : "";
|
||||
string? name = queryJson != null && queryJson.ContainsKey("name") ? queryJson["name"].ToString() : "";
|
||||
string userId = _userManager.UserId;
|
||||
var result = await db.Queryable<EqpRepairApply>()
|
||||
SqlSugarPagedList<PdaRepairApplyListOutput> result = await db.Queryable<EqpRepairApply>()
|
||||
.LeftJoin<EqpEquipment>((a, b) => a.equip_id == b.id)
|
||||
.LeftJoin<UserEntity>((a, b, c) => a.apply_user_id == c.Id)
|
||||
.LeftJoin<DictionaryTypeEntity>((a, b, c, d) => d.EnCode == DictConst.RepairStatus)
|
||||
@@ -86,27 +86,31 @@ namespace Tnb.EquipMgr
|
||||
/// <param name="dic"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetRepairInfoById(Dictionary<string, string> dic)
|
||||
public async Task<dynamic?> GetRepairInfoById(Dictionary<string, string> dic)
|
||||
{
|
||||
string id = dic.ContainsKey("id") ? dic["id"] : "";
|
||||
if (string.IsNullOrEmpty(id)) return null;
|
||||
var db = _repository.AsSugarClient();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
return await db.Queryable<EqpRepairApply>()
|
||||
.LeftJoin<EqpEquipment>((a, b) => a.equip_id == b.id)
|
||||
.Where((a, b) => a.id == id)
|
||||
.Select((a, b) => new
|
||||
{
|
||||
id = a.id,
|
||||
a.id,
|
||||
a.code,
|
||||
a.name,
|
||||
equip_id = a.equip_id,
|
||||
a.equip_id,
|
||||
equip_code = b.code,
|
||||
equip_name = b.name,
|
||||
expect_complete_time = a.expect_complete_time == null ? "" : a.expect_complete_time.Value.ToString("yyyy-MM-dd"),
|
||||
is_ugent = a.is_ugent,
|
||||
description = a.description,
|
||||
status = a.status,
|
||||
repairer_id = a.repairer_id,
|
||||
a.is_ugent,
|
||||
a.description,
|
||||
a.status,
|
||||
a.repairer_id,
|
||||
}).FirstAsync();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user