1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Dynamic;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
@@ -112,5 +113,30 @@ namespace Tnb.EquipMgr
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
}
|
||||
public async Task<dynamic> GetTools()
|
||||
{
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>();
|
||||
dic.Add("26149307089941", "在库");
|
||||
dic.Add("26149309121045", "生产");
|
||||
dic.Add("26149311082005", "保养");
|
||||
dic.Add("26149314425877", "报废");
|
||||
dic.Add("26149312750101", "外协");
|
||||
dic.Add("26149320818965", "维修");
|
||||
List<dynamic> result = new();
|
||||
var ToolMolds = await _db.Queryable<ToolMolds>().ToListAsync();
|
||||
foreach (var tool in ToolMolds)
|
||||
{
|
||||
dynamic info = new ExpandoObject();
|
||||
info.mold_code=tool.mold_code;
|
||||
info.mold_name = tool.mold_name;
|
||||
info.mold_status= dic.Where(p=>p.Key==tool.mold_status).Any()? dic.Where(p => p.Key == tool.mold_status).First().Value:"";
|
||||
info.warehosue_id=tool.warehosue_id;
|
||||
info.location_id=tool.location_id;
|
||||
|
||||
result.Add(info);
|
||||
}
|
||||
|
||||
return ToolMolds;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user