子表信息可以传ids查询
This commit is contained in:
@@ -1791,6 +1791,7 @@ namespace Tnb.ProductionMgr
|
|||||||
defective_item = dItem.defective_item,
|
defective_item = dItem.defective_item,
|
||||||
defective_item_qty = dItem.defective_item_qty,
|
defective_item_qty = dItem.defective_item_qty,
|
||||||
create_id = _userManager.UserId,
|
create_id = _userManager.UserId,
|
||||||
|
create_time = DateTime.Now,
|
||||||
scrap_qty = input.scrap_qty
|
scrap_qty = input.scrap_qty
|
||||||
};
|
};
|
||||||
destDefects.Add(defect);
|
destDefects.Add(defect);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ using Mapster;
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
@@ -245,6 +246,33 @@ namespace JNPF.VisualDev
|
|||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据ids获取详情.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="modelId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("DataChanges")]
|
||||||
|
public async Task<dynamic> GetDetails(Dictionary<string,string> dic)
|
||||||
|
{
|
||||||
|
List<string> ids = dic.ContainsKey("ids") ? JsonConvert.DeserializeObject<List<string>>(dic["ids"]) : new List<string>();
|
||||||
|
string modelId = dic.ContainsKey("modelId") ? dic["modelId"] : "";
|
||||||
|
List<dynamic> result = new List<dynamic>();
|
||||||
|
if (ids != null && ids.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var id in ids)
|
||||||
|
{
|
||||||
|
var data = await GetDetails(id, modelId);
|
||||||
|
if (data != null)
|
||||||
|
{
|
||||||
|
result.Add(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user