|
@@ -164,15 +164,15 @@ public class TaOrgController extends BaseController {
|
164
|
164
|
return ResponseBean.error("企业不存在");
|
165
|
165
|
}
|
166
|
166
|
|
167
|
|
- int nums = iTaUserService.countBy("org_id", id, true);
|
168
|
|
- if (nums > 0) {
|
169
|
|
- return ResponseBean.error("该企业已有员工, 不能编辑");
|
170
|
|
- }
|
171
|
|
-
|
172
|
|
- nums = iTaResumeWorkFormService.countBy("org_id", id, true);
|
173
|
|
- if (nums > 0) {
|
174
|
|
- return ResponseBean.error("该企业已有申报信息, 不能编辑");
|
175
|
|
- }
|
|
167
|
+// int nums = iTaUserService.countBy("org_id", id, true);
|
|
168
|
+// if (nums > 0) {
|
|
169
|
+// return ResponseBean.error("该企业已有员工, 不能编辑");
|
|
170
|
+// }
|
|
171
|
+//
|
|
172
|
+// nums = iTaResumeWorkFormService.countBy("org_id", id, true);
|
|
173
|
+// if (nums > 0) {
|
|
174
|
+// return ResponseBean.error("该企业已有申报信息, 不能编辑");
|
|
175
|
+// }
|
176
|
176
|
|
177
|
177
|
if (StringUtils.isEmpty(taOrg.getOrgName())) {
|
178
|
178
|
return ResponseBean.error("企业名称不能为空");
|
|
@@ -204,6 +204,11 @@ public class TaOrgController extends BaseController {
|
204
|
204
|
return ResponseBean.error("企业不存在");
|
205
|
205
|
}
|
206
|
206
|
|
|
207
|
+ // 当前企业下有员工或者申报信息时, 不允许修改名称
|
|
208
|
+ int num1 = iTaUserService.countBy("org_id", id, true);
|
|
209
|
+ int num2 = iTaResumeWorkFormService.countBy("org_id", id, true);
|
|
210
|
+ taOrg.setCanEditName(num1 + num2 > 0);
|
|
211
|
+
|
207
|
212
|
return ResponseBean.success(taOrg);
|
208
|
213
|
}
|
209
|
214
|
|
|
@@ -230,4 +235,5 @@ public class TaOrgController extends BaseController {
|
230
|
235
|
|
231
|
236
|
return ResponseBean.success(taUser);
|
232
|
237
|
}
|
|
238
|
+
|
233
|
239
|
}
|