|
|
|
@ -41,7 +41,7 @@ FROM Ghre_Request A |
|
|
|
|
if (!string.IsNullOrWhiteSpace(trainStaffId)) |
|
|
|
|
{ |
|
|
|
|
x.TrainStaffIds = JsonHelper.JsonToObj<List<int>>(trainStaffId); |
|
|
|
|
var TrainStaffIds = JsonHelper.JsonToObj<List<long?>>(trainStaffId); |
|
|
|
|
var TrainStaffIds = JsonHelper.JsonToObj<List<int?>>(trainStaffId); |
|
|
|
|
sponsorIds.AddRange(TrainStaffIds); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -117,7 +117,12 @@ FROM Ghre_Request A |
|
|
|
|
throw new Exception("培训对象数量须和需求人数保持一致!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else entity.RequestNum = 1; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
entity.RequestNum = 1; |
|
|
|
|
entity.TrainStaffId = $"[{entity.ApplicantId}]"; |
|
|
|
|
} |
|
|
|
|
var id = await base.Add(entity); |
|
|
|
|
|
|
|
|
|
var sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghre_Request WHERE Id !='{id}'"; |
|
|
|
@ -130,6 +135,9 @@ FROM Ghre_Request A |
|
|
|
|
public override async Task<bool> Update(long Id, EditGhre_RequestInput entity) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (entity.TrainStaffIds.IsNotEmptyOrNull()) |
|
|
|
|
entity.TrainStaffId = JsonHelper.ObjToJson(entity.TrainStaffIds); |
|
|
|
|
else entity.TrainStaffId = null; |
|
|
|
|
if (entity.RequestSource == "Dept") |
|
|
|
|
{ |
|
|
|
|
if (await QueryCompanyCode() == "Ushio") |
|
|
|
@ -143,10 +151,11 @@ FROM Ghre_Request A |
|
|
|
|
throw new Exception("培训对象数量须和需求人数保持一致!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else entity.RequestNum = 1; |
|
|
|
|
if (entity.TrainStaffIds.IsNotEmptyOrNull()) |
|
|
|
|
entity.TrainStaffId = JsonHelper.ObjToJson(entity.TrainStaffIds); |
|
|
|
|
else entity.TrainStaffId = null; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
entity.RequestNum = 1; |
|
|
|
|
entity.TrainStaffId = $"[{entity.ApplicantId}]"; |
|
|
|
|
} |
|
|
|
|
return await base.Update(Id, entity, null, ["Status"]); |
|
|
|
|
} |
|
|
|
|
public async Task<ServiceResult<long>> InsertByStatus(InsertGhre_RequestInput insertModel, string status) |
|
|
|
|