|
|
@ -310,7 +310,21 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins |
|
|
|
|
|
|
|
|
|
|
|
if (lastRecord.IsNullOrEmpty() || (lastRecord != null && lastRecord.SubmitDate != null) || surveyRecordId == 0) |
|
|
|
if (lastRecord.IsNullOrEmpty() || (lastRecord != null && lastRecord.SubmitDate != null) || surveyRecordId == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
long? feedbackId = null; |
|
|
|
|
|
|
|
if (openClassId != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var feedback = new Ghre_OpenClassFeedback() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
OpenClassId = openClassId, |
|
|
|
|
|
|
|
SurveyId = id, |
|
|
|
|
|
|
|
StaffId = App.User.StaffId, |
|
|
|
|
|
|
|
Source = "Trainee", |
|
|
|
|
|
|
|
EffectiveTime = DateTime.Now, |
|
|
|
|
|
|
|
ExpiryTime = DateTime.MaxValue |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
feedbackId = await Db.Insertable(feedback).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
var record = new Ghre_SurveyRecord() |
|
|
|
var record = new Ghre_SurveyRecord() |
|
|
|
{ |
|
|
|
{ |
|
|
|
//Id = recordId, |
|
|
|
//Id = recordId, |
|
|
@ -320,7 +334,8 @@ public class Ghre_SurveyServices : BaseServices<Ghre_Survey, Ghre_SurveyDto, Ins |
|
|
|
AdjustScore = 0, |
|
|
|
AdjustScore = 0, |
|
|
|
SubmitDate = DateTime.Now, |
|
|
|
SubmitDate = DateTime.Now, |
|
|
|
IsView = false, |
|
|
|
IsView = false, |
|
|
|
OpenClassId = openClassId |
|
|
|
OpenClassId = openClassId, |
|
|
|
|
|
|
|
OpenClassFeedbackId = feedbackId |
|
|
|
}; |
|
|
|
}; |
|
|
|
surveyRecordId = await Db.Insertable(record).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
surveyRecordId = await Db.Insertable(record).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
} |
|
|
|
} |
|
|
|