|
|
|
@ -85,7 +85,11 @@ func (s *Rpc) AddBaseOrganization(ctx context.Context, in *BaseOrganizationProto
|
|
|
|
|
}
|
|
|
|
|
if exist {
|
|
|
|
|
reply.Success = false
|
|
|
|
|
reply.Message = "代码已存在,无法创建!"
|
|
|
|
|
if isBuMen {
|
|
|
|
|
reply.Message = "部门代码已存在,无法创建!"
|
|
|
|
|
} else {
|
|
|
|
|
reply.Message = "单位代码已存在,无法创建!"
|
|
|
|
|
}
|
|
|
|
|
return &reply, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -373,7 +377,12 @@ func (s *Rpc) UpdateBaseOrganization(ctx context.Context, in *BaseOrganizationPr
|
|
|
|
|
|
|
|
|
|
if exist {
|
|
|
|
|
reply.Success = false
|
|
|
|
|
reply.Message = "代码已存在,无法修改!"
|
|
|
|
|
if BaseOrganizationDao.IsBuMen(in.OrgId){
|
|
|
|
|
reply.Message = "部门代码已存在,无法修改!"
|
|
|
|
|
}else{
|
|
|
|
|
reply.Message = "部门代码已存在,无法修改!"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return &reply, err
|
|
|
|
|
}
|
|
|
|
|
//2、检查机构名称是否存在,否则在导入人员时,不知道向哪个单位下进行导入
|
|
|
|
|