master
huanghai 5 years ago
parent 4400bbb871
commit 49a4ac0c0b

@ -1089,17 +1089,17 @@ func getOrgNameMap(bureauId string) (map[string]string, error) {
2020-08-05
*/
func AddTeacherOrgInfo(personIds []string, orgId string, isMain int32, fromSortId int32) (bool, string, error) {
func AddTeacherOrgInfo(personIds []string, orgId string, isMain int32, fromSortId int32) (bool, string, string, error) {
//(1)获取单位ID
list := SqlKit.QueryByIds([]string{orgId}, "t_base_organization")
if len(list) == 0 {
return false, "没有找到指定的部门编号!", nil
return false, "", "没有找到指定的部门编号!", nil
}
bureauId := list[0]["bureau_id"].(string)
//(2)获取单位对应的省码市码县区码主校ID
_, ProvinceCode, CityCode, DistrictCode, mainSchoolId, err := BaseOrganizationDao.GetBureauAdministrativeDivision(bureauId)
if err != nil {
return false, "在查找单位的行政区划关系时出错!", nil
return false, "", "在查找单位的行政区划关系时出错!", nil
}
//(3)删除旧的
DeleteTeacherOrgInfo(personIds, orgId)
@ -1123,11 +1123,12 @@ func AddTeacherOrgInfo(personIds []string, orgId string, isMain int32, fromSortI
model.IsMain = isMain
_, err := db.Insert(model)
if err != nil {
return false, "插入人员部门关系表时失败!", err
return false, "", "插入人员部门关系表时失败!", err
}
fromSortId++
}
return true, "保存成功!", nil
return true, bureauId, "保存成功!", nil
}
/**
@ -1203,3 +1204,60 @@ func GetPersonOrgName(personId string) (string, error) {
return list[0]["org_name"].(string), nil
}
}
/**
2020-08-20
*/
func AddTeacherPosition(personIds []string, bureauId string, PositionIds []string) (bool, string, error) {
//两重循环进行保存
for i := range personIds {
for j := range PositionIds {
model := new(models.TBaseTeacherPosition)
model.Id = CommonUtil.GetUUID()
model.PersonId = personIds[i]
model.BureauId = bureauId
model.PositionId = PositionIds[j]
model.BUse = 1
//插入基本表
_, err := db.Insert(model)
if err != nil {
return false, "保存人员职务信息出错!", err
}
}
}
return true, "保存成功!", nil
}
/**
2020-08-20
*/
func DeleteTeacherPosition(personIds []string, bureauId string) (bool, error) {
for i := range personIds {
sql := `update t_base_teacher_position set b_use=-2 where person_id=? and bureau_id=?`
_, err := db.SQL(sql, personIds[i], bureauId).Execute()
if err != nil {
return false, err
}
}
return true, nil
}
/**
()
2020-08-20
*/
func DeleteTeacherAllPosition(personIds []string) (bool, error) {
for i := range personIds {
sql := `update t_base_teacher_position set b_use=-2 where person_id=?`
_, err := db.SQL(sql, personIds[i]).Execute()
if err != nil {
return false, err
}
}
return true, nil
}

@ -252,6 +252,8 @@ type ModelArg struct {
ActionPersonId string `protobuf:"bytes,30,opt,name=ActionPersonId,proto3" json:"ActionPersonId,omitempty"`
//操作IP
ActionIpAddress string `protobuf:"bytes,31,opt,name=ActionIpAddress,proto3" json:"ActionIpAddress,omitempty"`
//人员职务ID
PositionIds []string `protobuf:"bytes,32,rep,name=PositionIds,proto3" json:"PositionIds,omitempty"`
}
func (x *ModelArg) Reset() {
@ -503,6 +505,13 @@ func (x *ModelArg) GetActionIpAddress() string {
return ""
}
func (x *ModelArg) GetPositionIds() []string {
if x != nil {
return x.PositionIds
}
return nil
}
// 查询参数
type QueryArg struct {
state protoimpl.MessageState
@ -765,7 +774,7 @@ var file_BaseTeacher_proto_rawDesc = []byte{
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a,
0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x96, 0x06, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xb8, 0x06, 0x0a, 0x08, 0x4d, 0x6f, 0x64, 0x65,
0x6c, 0x41, 0x72, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x49, 0x64, 0x49, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
@ -815,83 +824,85 @@ var file_BaseTeacher_proto_rawDesc = []byte{
0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x22, 0xac, 0x01, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x12, 0x12, 0x0a,
0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x72, 0x67, 0x49, 0x64,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a,
0x02, 0x58, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x58, 0x6d, 0x12, 0x26, 0x0a,
0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49,
0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
0x83, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x78, 0x63, 0x65, 0x6c,
0x50, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x45, 0x78, 0x63, 0x65,
0x6c, 0x50, 0x61, 0x74, 0x68, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
0x64, 0x73, 0x41, 0x72, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x09, 0x52, 0x03, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xd2, 0x05, 0x0a, 0x11, 0x42, 0x61,
0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12,
0x47, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65,
0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e,
0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18,
0x20, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
0x64, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x12,
0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x50,
0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x72, 0x67,
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x72, 0x67, 0x49, 0x64, 0x12,
0x0e, 0x0a, 0x02, 0x58, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x58, 0x6d, 0x12,
0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x22, 0x83, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x78, 0x63,
0x65, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x45, 0x78,
0x63, 0x65, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x49, 0x64, 0x73, 0x41, 0x72, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x49, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49,
0x64, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xd2, 0x05, 0x0a, 0x11,
0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67,
0x65, 0x12, 0x47, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63,
0x68, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65,
0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a,
0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e, 0x41, 0x64,
0x64, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42,
0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x49, 0x64, 0x73, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65,
0x6c, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68,
0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
0x48, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68,
0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x1a, 0x17,
0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x10, 0x52, 0x65, 0x76,
0x69, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x12, 0x1b, 0x2e,
0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x42,
0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f,
0x64, 0x65, 0x6c, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x00, 0x12, 0x4e, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x49, 0x64, 0x73, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x00, 0x12, 0x4a, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x2e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x65, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x1d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66,
0x6f, 0x45, 0x78, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41,
0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a,
0x0f, 0x50, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72,
0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42,
0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x10, 0x52, 0x65, 0x76, 0x69, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x12, 0x1b, 0x2e, 0x42, 0x61,
0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52,
0x65, 0x76, 0x69, 0x73, 0x65, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x1d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45,
0x78, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68,
0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72, 0x67,
0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x16, 0x45,
0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
0x45, 0x78, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63,
0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x41, 0x72,
0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x16,
0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x45, 0x78, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61,
0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a,
0x16, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x49, 0x6e,
0x66, 0x6f, 0x45, 0x78, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65,
0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65,
0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x3e,
0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x2e, 0x64, 0x73,
0x6d, 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65,
0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x12, 0x2e, 0x3b, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x00, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50,
0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x45, 0x78, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54,
0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6d, 0x70, 0x6f,
0x72, 0x74, 0x41, 0x72, 0x67, 0x1a, 0x17, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x54, 0x65, 0x61, 0x63,
0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00,
0x42, 0x3e, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x2e,
0x64, 0x73, 0x6d, 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0b, 0x42, 0x61, 0x73, 0x65,
0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x12, 0x2e, 0x3b, 0x42, 0x61, 0x73,
0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x00,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

@ -120,6 +120,8 @@ message ModelArg {
string ActionPersonId = 30;
//IP
string ActionIpAddress = 31;
//ID
repeated string PositionIds = 32;
}
//

@ -159,7 +159,10 @@ func (s *Rpc) AddBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg)
} else {
fromSortId = in.SortId
}
BaseTeacherDao.AddTeacherOrgInfo(personIds, in.OrgId, 1, fromSortId)
_, bureauId, _, _ := BaseTeacherDao.AddTeacherOrgInfo(personIds, in.OrgId, 1, fromSortId)
//记录教师在此单位下的职务信息
BaseTeacherDao.AddTeacherPosition(personIds, bureauId, in.PositionIds)
// 生成教师账号
_, err = SysLoginpersonService.AddLoginperson(2, model.PersonId, model.Xm)
if err != nil {
@ -207,7 +210,8 @@ func (s *Rpc) DeleteBaseTeacher(ctx context.Context, in *BaseTeacherProto.Delete
}
//删除人员所在的部门关系
BaseTeacherDao.DeleteTeacherOrgInfoAll(in.Ids)
//删除人员与职务的关系(全部)
BaseTeacherDao.DeleteTeacherAllPosition(in.Ids)
//记录日志
ms, err := BaseTeacherDao.GetByIds(in.Ids)
if err != nil {
@ -309,6 +313,11 @@ func (s *Rpc) UpdateBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelA
LogUtil.Error(ErrorConst.SqlUpdateError, "执行UpdateBaseTeacher时发生严重错误"+err.Error())
return &reply, err
}
//更新人员与职务的关系
BaseTeacherDao.DeleteTeacherPosition([]string{in.PersonId}, in.BureauId)
BaseTeacherDao.AddTeacherPosition([]string{in.PersonId}, in.BureauId, in.PositionIds)
//记录日志
ms, err := BaseTeacherDao.GetByIds([]string{in.PersonId})
if err != nil {

Loading…
Cancel
Save