|
|
@ -474,7 +474,6 @@ func (s *Rpc) ImportTeacherInfoExcel(ctx context.Context, in *BaseTeacherProto.I
|
|
|
|
return &reply, nil
|
|
|
|
return &reply, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置教师多单位
|
|
|
|
//设置教师多单位
|
|
|
|
func (s *Rpc) SettingTeacherMultipleBureau(ctx context.Context, in *BaseTeacherProto.SettingMultipleBureauArg) (*BaseTeacherProto.Reply, error) {
|
|
|
|
func (s *Rpc) SettingTeacherMultipleBureau(ctx context.Context, in *BaseTeacherProto.SettingMultipleBureauArg) (*BaseTeacherProto.Reply, error) {
|
|
|
|
//异常处理
|
|
|
|
//异常处理
|
|
|
@ -486,7 +485,7 @@ func (s *Rpc) SettingTeacherMultipleBureau (ctx context.Context, in *BaseTeache
|
|
|
|
//rpc响应
|
|
|
|
//rpc响应
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
//将业务逻辑封装到dao层
|
|
|
|
//将业务逻辑封装到dao层
|
|
|
|
success, message, err := BaseTeacherDao.ImportTeacherInfoExcel(in.ExcelPath, in.BureauId, in.ActionPersonId, in.ActionIpAddress)
|
|
|
|
success, message, err := BaseTeacherDao.SettingTeacherMultipleBureau(in)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
reply.Success = false
|
|
|
|
reply.Success = false
|
|
|
|
reply.Message = message
|
|
|
|
reply.Message = message
|
|
|
@ -508,14 +507,18 @@ func (s *Rpc) PageTeacherMultipleBureau (ctx context.Context, in *BaseTeacherPr
|
|
|
|
//rpc响应
|
|
|
|
//rpc响应
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
//将业务逻辑封装到dao层
|
|
|
|
//将业务逻辑封装到dao层
|
|
|
|
success, message, err := BaseTeacherDao.ImportTeacherInfoExcel(in.ExcelPath, in.BureauId, in.ActionPersonId, in.ActionIpAddress)
|
|
|
|
list, count, err := BaseTeacherDao.PageTeacherMultipleBureau(in)
|
|
|
|
|
|
|
|
//错误处理
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
reply.Success = false
|
|
|
|
reply.Success = false
|
|
|
|
reply.Message = message
|
|
|
|
reply.Message = Const.DataBaseActionError
|
|
|
|
return &reply, nil
|
|
|
|
LogUtil.Error(ErrorConst.SqlQueryError, "执行PageTeacherMultipleBureau时发生严重错误:"+err.Error())
|
|
|
|
|
|
|
|
return &reply, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
reply.Success = success
|
|
|
|
reply.Count = count
|
|
|
|
reply.Message = message
|
|
|
|
reply.Success = true
|
|
|
|
|
|
|
|
reply.Message = Const.SuccessDataBaseAction
|
|
|
|
|
|
|
|
reply.List = CommonUtil.SerializeToString(list)
|
|
|
|
return &reply, nil
|
|
|
|
return &reply, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -529,14 +532,9 @@ func (s *Rpc) DeleteTeacherMultipleBureau (ctx context.Context, in *BaseTeacher
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
//rpc响应
|
|
|
|
//rpc响应
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
var reply BaseTeacherProto.Reply
|
|
|
|
//将业务逻辑封装到dao层
|
|
|
|
//调用通用删除命令进行删除
|
|
|
|
success, message, err := BaseTeacherDao.ImportTeacherInfoExcel(in.ExcelPath, in.BureauId, in.ActionPersonId, in.ActionIpAddress)
|
|
|
|
err := SqlKit.DeleteIds("t_base_teacher_org", in.Ids)
|
|
|
|
if err != nil {
|
|
|
|
reply.Success = true
|
|
|
|
reply.Success = false
|
|
|
|
reply.Message = Const.SuccessDataBaseAction
|
|
|
|
reply.Message = message
|
|
|
|
return &reply, err
|
|
|
|
return &reply, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
reply.Success = success
|
|
|
|
|
|
|
|
reply.Message = message
|
|
|
|
|
|
|
|
return &reply, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|