|
|
@ -21,6 +21,7 @@ import (
|
|
|
|
"dsBaseRpc/Utils/PinYinUtil"
|
|
|
|
"dsBaseRpc/Utils/PinYinUtil"
|
|
|
|
"dsBaseRpc/Utils/SqlKit"
|
|
|
|
"dsBaseRpc/Utils/SqlKit"
|
|
|
|
"dsBaseRpc/models"
|
|
|
|
"dsBaseRpc/models"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
type Rpc struct{} //服务对象
|
|
|
|
type Rpc struct{} //服务对象
|
|
|
@ -31,7 +32,12 @@ func (s *Rpc) GetBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg)
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
//通用获取单条
|
|
|
|
//通用获取单条
|
|
|
|
list := SqlKit.QueryByIds([]string{in.PersonId}, "t_base_teacher")
|
|
|
|
list := SqlKit.QueryByIds([]string{in.PersonId}, "t_base_teacher")
|
|
|
|
|
|
|
|
//处理从教年月
|
|
|
|
|
|
|
|
if len(list)>0{
|
|
|
|
|
|
|
|
if list[0]["csrq"].(time.Time).Year()==1900{
|
|
|
|
|
|
|
|
list[0]["csrq"]=""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
//将结果序列化
|
|
|
|
//将结果序列化
|
|
|
|
reply.Success = true
|
|
|
|
reply.Success = true
|
|
|
|
reply.Count = 1
|
|
|
|
reply.Count = 1
|
|
|
@ -263,7 +269,7 @@ func (s *Rpc) UpdateBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelA
|
|
|
|
model.Xm = in.Xm
|
|
|
|
model.Xm = in.Xm
|
|
|
|
model.Xmpy = PinYinUtil.PinYin(in.Xmpy)
|
|
|
|
model.Xmpy = PinYinUtil.PinYin(in.Xmpy)
|
|
|
|
model.Cym = in.Cym
|
|
|
|
model.Cym = in.Cym
|
|
|
|
//身份证件类型码
|
|
|
|
//身份证件类型
|
|
|
|
model.Sfzjlxm = in.Sfzjlxm
|
|
|
|
model.Sfzjlxm = in.Sfzjlxm
|
|
|
|
model.Sfzjh = in.Sfzjh
|
|
|
|
model.Sfzjh = in.Sfzjh
|
|
|
|
//如果是身份证
|
|
|
|
//如果是身份证
|
|
|
|