|
|
|
@ -280,13 +280,14 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult> SubmitESSData(long id, Ghre_SurveyExtend input) |
|
|
|
|
public async Task<ServiceResult> SubmitESSData(long id, Ghre_SurveyExtend input, long? openClassId = null) |
|
|
|
|
{ |
|
|
|
|
var entity = await base.QueryById(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lastRecord = await Db.Queryable<Ghre_SurveyRecord>() |
|
|
|
|
.Where(x => x.StaffId == App.User.StaffId && x.SurveyId == id) |
|
|
|
|
.WhereIF(openClassId != null, x => x.OpenClassId == openClassId) |
|
|
|
|
.FirstAsync(); |
|
|
|
|
var surveyRecordId = lastRecord?.Id; |
|
|
|
|
await Db.Updateable<Ghre_SurveyRecord>() |
|
|
|
@ -318,7 +319,8 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins |
|
|
|
|
Score = 0, |
|
|
|
|
AdjustScore = 0, |
|
|
|
|
SubmitDate = DateTime.Now, |
|
|
|
|
IsView = false |
|
|
|
|
IsView = false, |
|
|
|
|
OpenClassId = openClassId |
|
|
|
|
}; |
|
|
|
|
surveyRecordId = await Db.Insertable(record).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
|
} |
|
|
|
|