|
|
|
@ -409,12 +409,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
List<SearchConditionItem> condition = new ArrayList<>();
|
|
|
|
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "164", "company", "");
|
|
|
|
|
compBrowserItem.setRules("required|string");
|
|
|
|
|
SearchConditionItem isCheckItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制岗位信息", "copyJob");
|
|
|
|
|
isCheckItem.setDetailtype(2);
|
|
|
|
|
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
|
|
|
|
|
copySubDeptItem.setDetailtype(2);
|
|
|
|
|
condition.add(compBrowserItem);
|
|
|
|
|
condition.add(isCheckItem);
|
|
|
|
|
condition.add(copySubDeptItem);
|
|
|
|
|
addGroups.add(new SearchConditionGroup("", true, condition));
|
|
|
|
|
return addGroups;
|
|
|
|
@ -464,15 +461,15 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|
|
|
|
//TODO new DepartmentTriggerRunnable(deptById.getId()).run();
|
|
|
|
|
|
|
|
|
|
// 复制当前部门岗位信息
|
|
|
|
|
if ("1".equals(copyJob)) {
|
|
|
|
|
List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listJobsByDepartmentId(originalDeptId);
|
|
|
|
|
jobPOS = jobPOS.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
|
|
|
|
Integer maxJobOrder = MapperProxyFactory.getProxy(JobMapper.class).getMaxShowOrder();
|
|
|
|
|
if (maxJobOrder == null) {
|
|
|
|
|
maxJobOrder = 0;
|
|
|
|
|
}
|
|
|
|
|
recursionCopyJob(jobPOS, companyId, Integer.parseInt(ecDepartmentID), null, maxJobOrder, timeMillis);
|
|
|
|
|
}
|
|
|
|
|
//if ("1".equals(copyJob)) {
|
|
|
|
|
// List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listJobsByDepartmentId(originalDeptId);
|
|
|
|
|
// jobPOS = jobPOS.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
|
|
|
|
// Integer maxJobOrder = MapperProxyFactory.getProxy(JobMapper.class).getMaxShowOrder();
|
|
|
|
|
// if (maxJobOrder == null) {
|
|
|
|
|
// maxJobOrder = 0;
|
|
|
|
|
// }
|
|
|
|
|
// recursionCopyJob(jobPOS, companyId, Integer.parseInt(ecDepartmentID), null, maxJobOrder, timeMillis);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
// 是否复制子部门信息
|
|
|
|
|
if ("1".equals(copySubDept)) {
|
|
|
|
|