master
huanghai 5 years ago
parent 917aaa1046
commit 065bc00a66

@ -103,12 +103,6 @@ func (s *Rpc) AddBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg)
//根据身份证号,提取男女,出生日期
_, birthday, xbm := IdCardUtil.GetIdCardNoInfo(in.Sfzjh)
model.Csrq = DateUtil.ConvertDate(birthday)
//如果身份证与传入的性别代码不符
if xbm != in.Xbm {
reply.Success = false
reply.Message = "性别代码与身份证中获取的不一致!"
return &reply, nil
}
model.Xbm = xbm
} else {
model.Csrq = DateUtil.ConvertDate(in.Csrq)
@ -268,12 +262,6 @@ func (s *Rpc) UpdateBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelA
//根据身份证号,提取男女,出生日期
_, birthday, xbm := IdCardUtil.GetIdCardNoInfo(in.Sfzjh)
model.Csrq = DateUtil.ConvertDate(birthday)
//如果身份证与传入的性别代码不符
if xbm != in.Xbm {
reply.Success = false
reply.Message = "性别代码与身份证中获取的不一致!"
return &reply, nil
}
model.Xbm = xbm
} else {
model.Csrq = DateUtil.ConvertDate(in.Csrq)

Loading…
Cancel
Save