|
|
|
@ -1018,6 +1018,16 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult> UpdateStatus(long[] ids, string status) |
|
|
|
|
{ |
|
|
|
|
string sql = $@"SELECT A.RoleId, B.RoleNo, B.RoleName
|
|
|
|
|
FROM Ghrs_UserRole A LEFT JOIN Ghrs_Role B ON A.RoleId = B.RoleId |
|
|
|
|
WHERE A.UserID = {App.User.ID} |
|
|
|
|
AND A.IsEnable = 1 |
|
|
|
|
AND B.IsEnable = 1 |
|
|
|
|
AND B.RoleNo ='TrainingExamCancelRelease'";
|
|
|
|
|
var toolbarRoles = DbAccess.QueryList<ToolbarRole>(sql); |
|
|
|
|
if (!toolbarRoles.Any()) |
|
|
|
|
return ServiceResult.OprateFailed("暂无取消发布权限!"); |
|
|
|
|
|
|
|
|
|
if (status != "Released" && status != "Disabled" && status != "Draft") |
|
|
|
|
throw new Exception("无效的状态"); |
|
|
|
|
|
|
|
|
|