分配员工改成多选

This commit is contained in:
2024-06-19 16:29:44 +08:00
parent 7c3e39e104
commit fe8aee0bda
3 changed files with 7 additions and 3 deletions

View File

@@ -3354,11 +3354,12 @@ namespace Tnb.ProductionMgr
[HttpPost]
public async Task<string> BindUser(Dictionary<String,String> input)
{
string id = input.GetOrDefault("id");
string ids = input.GetOrDefault("ids");
string[] idList = ids.Split(",");
string workerId = input.GetOrDefault("worker_id");
int row = await _db.Updateable<PrdMoTask>()
.SetColumns(x => x.worker_id == workerId)
.Where(x => x.id == id)
.Where(x => idList.Contains(x.id))
.ExecuteCommandAsync();
return row>0 ? "分配成功" : "分配失败";
}