master
xiaochanghai 6 months ago
parent ca10725b15
commit 4de0c180b3
  1. 15
      Tiobon.Core.Api/Controllers/Authorize/AuthorizeController.cs
  2. 7
      Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs
  3. 4
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs
  4. 8
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -278,6 +278,7 @@ public class AuthorizeController : BaseApiController
try
{
var user = await _ghrs_UserServices.QuerySingleDto(d => d.UserId == Id);
if (user != null)
{
@ -286,9 +287,9 @@ public class AuthorizeController : BaseApiController
new Claim(ClaimTypes.Name, user.UserName.ToString()),
new Claim(JwtRegisteredClaimNames.Jti, user.UserId.ToString()),
new Claim("TenantId", "0"),
new Claim("StaffId", user.UserStaffID.ToString()),
new Claim("StaffName",user.StaffName),
new Claim("StaffNo", user.StaffNo),
new Claim("StaffId",user.UserStaffID !=null? user.UserStaffID.ToString():"0"),
new Claim("StaffName",user.StaffName !=null?user.StaffName:"0"),
new Claim("StaffNo", user.StaffNo !=null?user.StaffNo:"0"),
new Claim(JwtRegisteredClaimNames.Iat, DateTime.Now.DateToTimeStamp()),
new Claim(ClaimTypes.Expiration, DateTime.Now.AddSeconds(_requirement.Expiration.TotalSeconds).ToString())
};
@ -301,6 +302,14 @@ public class AuthorizeController : BaseApiController
return Success<string>(result.token);
}
}
// var sql = @"SELECT A.UserId,
// A.UserName,
// b.StaffNo,
// b.StaffName,
// A.UserStaffID
//FROM Ghrs_User A LEFT JOIN Ghra_Staff b ON A.UserStaffID = b.StaffID
//WHERE A.UserId = 1";
}
catch (Exception E)
{

@ -31,12 +31,7 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course
{
if (await base.AnyAsync(x => x.CourseWareName == entity.CourseWareName && x.VersionNo == entity.VersionNo))
throw new Exception("已存在相同课名称和版本号数据!");
if (entity.CourseIds2.Any())
{
entity.CourseIds = JsonConvert.SerializeObject(entity.CourseIds2);
var courses = await _ghre_CourseServices.Query(x => entity.CourseIds2.Contains(x.Id));
entity.CourseNames = string.Join(",", courses.Select(x => x.CourseName));
}
entity.CourseIds = null;
var result = await base.Add(entity);
entity.Attachments.ForEach(x =>

@ -136,7 +136,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
{
var entity = await QuerySingle(examRecordId);
if (entity != null && entity.ExamId != null)
if (await Db.Queryable<Ghre_Exam>().Where(x => x.Id == entity.ExamId.Value).AnyAsync())
if (await Db.Queryable<Ghre_Exam>().Where(x => x.Id == entity.ExamId.Value && x.Status == "Disabled").AnyAsync())
return ServiceResult.OprateFailed($"该考试已归档,不可进行调整分数!");
var paper = await Db.Queryable<Ghre_ExamPaper>().FirstAsync(x => x.Id == entity.ExamPaperId);
@ -168,7 +168,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
{
var entity = await QuerySingle(examRecordId);
if (entity != null && entity.ExamId != null)
if (await Db.Queryable<Ghre_Exam>().Where(x => x.Id == entity.ExamId.Value).AnyAsync())
if (await Db.Queryable<Ghre_Exam>().Where(x => x.Id == entity.ExamId.Value && x.Status == "Disabled").AnyAsync())
return ServiceResult.OprateFailed($"该考试已归档,不可进行调整分数!");
if (edit.AdjustScore < 0)

@ -2712,8 +2712,8 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1
case "HasInterview":
if (jsonParam.columnValue.ObjToInt() == 1)
{
sql += $" AND (B.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasInterview}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.InterviewFail}')";
sql += $" AND (C.Status = '{DIC_INTERVIEW_ORDER_STATUS.WaitInterview}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasInterview}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.InterviewFail}')";
sql += $" AND (B.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasInterview}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.InterviewFail}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasSendOffer}' OR B.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasOffer}')";
sql += $" AND (C.Status = '{DIC_INTERVIEW_ORDER_STATUS.WaitInterview}' OR C.Status = '{DIC_INTERVIEW_ORDER_STATUS.HasInterview}' OR C.Status = '{DIC_INTERVIEW_ORDER_STATUS.InterviewFail}')";
}
break;
case "WaitSendOffer":
@ -3990,6 +3990,10 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1
dict.Add("TitleID", applyOrder.TitleId);
dict.Add("JobID", applyOrder.JobId);
dict.Add("GradeID", applyOrder.GradeId);
dict.Add("PeriodMasterId", applyOrder.PeriodMasterId);
dict.Add("LegalCompanyID", applyOrder.CompanyId);
dict.Add("Reverse8", applyOrder.ProbationMonths);
//dict.Add("Reverse8", applyOrder.ProbationMonths);
}
if (dict.Count > 0)

Loading…
Cancel
Save