排产工单排序
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using JinianNet.JNTemplate;
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Newtonsoft.Json;
|
||||
@@ -99,29 +100,24 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 对当前的,排产工单排序
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
/// <param name="parameter">列表参数,一个是工单ID,一个是排序号</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("sortschedule")]
|
||||
public IActionResult SortSchedule([FromBody] List<ProWorkorderSortDTO> parameter)
|
||||
{
|
||||
int sum = 0;
|
||||
foreach (ProWorkorderSortDTO item in parameter)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(item.id))
|
||||
{
|
||||
int data = proWorkorderService.SortWorkorderSchedule(item.id, item.order);
|
||||
sum += data;
|
||||
}
|
||||
}
|
||||
|
||||
//JsonElement t = (JsonElement)parameter;
|
||||
//JsonElement.
|
||||
//parameter.Adapt(t);
|
||||
//string t = parameter["listKeyValue"];
|
||||
//Dictionary<string, string> KV_ID_Sort = new Dictionary<string, string>();
|
||||
|
||||
|
||||
//JArray ja = (JArray)JsonConvert.DeserializeObject(t);
|
||||
//foreach (JToken item in ja.ToList())
|
||||
//{
|
||||
// KV_ID_Sort.Add(item["id"].ToString(), item["value"].ToString());
|
||||
//}
|
||||
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", 1));
|
||||
return ToResponse(new ApiResult(200, "success", sum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user