|
|
|
@ -204,10 +204,10 @@ public class Ghre_CertificateRuleServices : BaseServices<Ghre_CertificateRule, G |
|
|
|
|
|
|
|
|
|
int? staffId = App.User.StaffId; |
|
|
|
|
long? studyRecordId = null; |
|
|
|
|
|
|
|
|
|
Ghre_Certificate certificate = null; |
|
|
|
|
if (result is null) |
|
|
|
|
{ |
|
|
|
|
var certificate = await Db.Queryable<Ghre_Certificate>().Where(x => x.Id == id).FirstAsync(); |
|
|
|
|
certificate = await Db.Queryable<Ghre_Certificate>().Where(x => x.Id == id).FirstAsync(); |
|
|
|
|
staffId = certificate.StaffId; |
|
|
|
|
studyRecordId = certificate.Reverse1.IsNotEmptyOrNull() ? certificate.Reverse1.ObjToLong() : null; |
|
|
|
|
result = await base.QueryById(certificate.CertificateRuleId); |
|
|
|
@ -256,10 +256,15 @@ public class Ghre_CertificateRuleServices : BaseServices<Ghre_CertificateRule, G |
|
|
|
|
|
|
|
|
|
if (item.certNoRule == "random") |
|
|
|
|
item.text = SnowFlakeSingle.Instance.NextId().ObjToString(); |
|
|
|
|
|
|
|
|
|
if (certificate != null) item.text = certificate.CertificateNo; |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case "AwardDate"://发证日期 |
|
|
|
|
if (item.dateFormat == "YYYY年MM月DD日") |
|
|
|
|
item.text = DateTimeHelper.ConvertToDayString(DateTime.Now); |
|
|
|
|
|
|
|
|
|
if (certificate != null) item.text = DateTimeHelper.ConvertToDayString(certificate.CreateTime); |
|
|
|
|
break; |
|
|
|
|
case "CertificationBody"://颁发机构 |
|
|
|
|
item.text = result.IssueOrgName; |
|
|
|
|