多语言支持
This commit is contained in:
parent
f51fd4713e
commit
c9b41c98e6
|
|
@ -122,7 +122,7 @@ public class JobBrowserService extends BrowserService {
|
||||||
// 名称
|
// 名称
|
||||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobName");
|
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobName");
|
||||||
// 所属分部
|
// 所属分部
|
||||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "ecCompany", "");
|
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "ecCompany", "");
|
||||||
// 所属部门
|
// 所属部门
|
||||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "ecDepartment", "");
|
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "ecDepartment", "");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,19 +46,19 @@ public class CompListDTO {
|
||||||
/**
|
/**
|
||||||
* 简称
|
* 简称
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
|
@TableTitle(labelId = 547181, title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||||
private String subCompanyName;
|
private String subCompanyName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上级公司
|
* 上级公司
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
|
@TableTitle(labelId = 547410, title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
|
||||||
private String supSubComName;
|
private String supSubComName;
|
||||||
|
|
||||||
private Integer supSubComId;
|
private Integer supSubComId;
|
||||||
|
|
||||||
|
|
||||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||||
private Integer showOrder;
|
private Integer showOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -48,20 +48,20 @@ public class DepartmentListDTO {
|
||||||
/**
|
/**
|
||||||
* 简称
|
* 简称
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "简称", dataIndex = "departmentName", key = "departmentName")
|
@TableTitle(labelId = 547181, title = "简称", dataIndex = "departmentName", key = "departmentName")
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属分部
|
* 所属分部
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||||
private String subCompanyName;
|
private String subCompanyName;
|
||||||
private Integer subCompanyId1;
|
private Integer subCompanyId1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上级部门
|
* 上级部门
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||||
private String supDepName;
|
private String supDepName;
|
||||||
|
|
||||||
private Integer supDepId;
|
private Integer supDepId;
|
||||||
|
|
@ -69,13 +69,13 @@ public class DepartmentListDTO {
|
||||||
/**
|
/**
|
||||||
* 部门负责人
|
* 部门负责人
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
|
@TableTitle(labelId = 547190, title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
|
||||||
private String bmfzr;
|
private String bmfzr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示顺序
|
* 显示顺序
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||||
private Double showOrder;
|
private Double showOrder;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public class SingleDeptTreeVO {
|
||||||
|
|
||||||
private Integer supDepId; //上级部门id
|
private Integer supDepId; //上级部门id
|
||||||
|
|
||||||
@TableTitle(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||||
private String supDepName; //上级部门
|
private String supDepName; //上级部门
|
||||||
|
|
||||||
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipalName", key = "deptPrincipalName")
|
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipalName", key = "deptPrincipalName")
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,6 @@ public class HrmResourceVO {
|
||||||
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
|
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
|
||||||
private String managerName;
|
private String managerName;
|
||||||
|
|
||||||
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||||
private Integer showOrder;
|
private Integer showOrder;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,6 @@ public class ScHrmResourceVO {
|
||||||
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
|
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
|
||||||
private String managerName;
|
private String managerName;
|
||||||
|
|
||||||
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||||
private Integer showOrder;
|
private Integer showOrder;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class JobListDTO {
|
||||||
/**
|
/**
|
||||||
* 所属分部
|
* 所属分部
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||||
private String subCompanyName;
|
private String subCompanyName;
|
||||||
/**
|
/**
|
||||||
* 所属部门
|
* 所属部门
|
||||||
|
|
@ -80,7 +80,7 @@ public class JobListDTO {
|
||||||
/**
|
/**
|
||||||
* 显示顺序
|
* 显示顺序
|
||||||
*/
|
*/
|
||||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||||
private Integer showOrder;
|
private Integer showOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -91,13 +91,13 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
|
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
|
||||||
pageInfos = new PageInfo<>(subList, CompListDTO.class);
|
pageInfos = new PageInfo<>(user, subList, CompListDTO.class);
|
||||||
pageInfos.setTotal(compListDTOS.size());
|
pageInfos.setTotal(compListDTOS.size());
|
||||||
} else {
|
} else {
|
||||||
// 组合list
|
// 组合list
|
||||||
List<CompListDTO> compListDTOS = CompBO.buildCompDTOList(allList, orderType.toString());
|
List<CompListDTO> compListDTOS = CompBO.buildCompDTOList(allList, orderType.toString());
|
||||||
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
|
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
|
||||||
pageInfos = new PageInfo<>(subList, CompListDTO.class);
|
pageInfos = new PageInfo<>(user, subList, CompListDTO.class);
|
||||||
pageInfos.setTotal(compListDTOS.size());
|
pageInfos.setTotal(compListDTOS.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
|
|
||||||
OrganizationWeaTable<CompListDTO> table = new OrganizationWeaTable<>(user, CompListDTO.class);
|
OrganizationWeaTable<CompListDTO> table = new OrganizationWeaTable<>(user, CompListDTO.class);
|
||||||
List<Column> columns = pageInfos.getColumns();
|
List<Column> columns = pageInfos.getColumns();
|
||||||
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", SystemEnv.getHtmlLabelName(v.getLabelId(),user.getLanguage()), v.getKey())).collect(Collectors.toList());
|
||||||
table.setColumns(weaTableColumn);
|
table.setColumns(weaTableColumn);
|
||||||
WeaResultMsg result = new WeaResultMsg(false);
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
result.putAll(table.makeDataResult());
|
result.putAll(table.makeDataResult());
|
||||||
|
|
@ -150,7 +150,7 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
if (CollectionUtils.isNotEmpty(compPOS)) {
|
if (CollectionUtils.isNotEmpty(compPOS)) {
|
||||||
addDisableIds(disableIds, compPOS);
|
addDisableIds(disableIds, compPOS);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supSubComId)), "上级分部不能选择分部本身及其下级分部");
|
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supSubComId)), SystemEnv.getHtmlLabelName(547257,user.getLanguage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
||||||
|
|
@ -182,9 +182,9 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
// 名称
|
// 名称
|
||||||
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "subCompanyDesc");
|
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "subCompanyDesc");
|
||||||
// 简称
|
// 简称
|
||||||
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "subCompanyName");
|
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547181, "subCompanyName");
|
||||||
// 上级公司
|
// 上级公司
|
||||||
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "supSubComId", "");
|
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "supSubComId", "");
|
||||||
|
|
||||||
conditionItems.add(subCompanyCodeItem);
|
conditionItems.add(subCompanyCodeItem);
|
||||||
conditionItems.add(subCompanyDescItem);
|
conditionItems.add(subCompanyDescItem);
|
||||||
|
|
@ -374,8 +374,8 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
public List<SearchConditionGroup> getMoveForm() {
|
public List<SearchConditionGroup> getMoveForm() {
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> condition = new ArrayList<>();
|
List<SearchConditionItem> condition = new ArrayList<>();
|
||||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "转移到", "164", "company", "compBrowser");
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547275, "164", "company", "compBrowser");
|
||||||
compBrowserItem.setHelpfulTip("在不选择分部情况下,默认转移到集团下一级分部!!!");
|
compBrowserItem.setHelpfulTip(SystemEnv.getHtmlLabelName(547258,user.getLanguage()));
|
||||||
condition.add(compBrowserItem);
|
condition.add(compBrowserItem);
|
||||||
addGroups.add(new SearchConditionGroup("", true, condition));
|
addGroups.add(new SearchConditionGroup("", true, condition));
|
||||||
return addGroups;
|
return addGroups;
|
||||||
|
|
@ -393,7 +393,7 @@ public class CompServiceImpl extends Service implements CompService {
|
||||||
if (CollectionUtils.isNotEmpty(compPOS)) {
|
if (CollectionUtils.isNotEmpty(compPOS)) {
|
||||||
addDisableIds(disableIds, compPOS);
|
addDisableIds(disableIds, compPOS);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部");
|
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), SystemEnv.getHtmlLabelName(547259,user.getLanguage()));
|
||||||
|
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("id", companyId.toString());
|
map.put("id", companyId.toString());
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import com.engine.hrm.entity.RuleCodeType;
|
||||||
import com.engine.hrm.service.impl.OrganizationServiceImpl;
|
import com.engine.hrm.service.impl.OrganizationServiceImpl;
|
||||||
import com.engine.organization.component.OrganizationWeaTable;
|
import com.engine.organization.component.OrganizationWeaTable;
|
||||||
import com.engine.organization.entity.TopTab;
|
import com.engine.organization.entity.TopTab;
|
||||||
import com.engine.organization.entity.codesetting.po.CodeRulePO;
|
|
||||||
import com.engine.organization.entity.company.bo.CompBO;
|
import com.engine.organization.entity.company.bo.CompBO;
|
||||||
import com.engine.organization.entity.company.po.CompPO;
|
import com.engine.organization.entity.company.po.CompPO;
|
||||||
import com.engine.organization.entity.department.bo.DepartmentBO;
|
import com.engine.organization.entity.department.bo.DepartmentBO;
|
||||||
|
|
@ -29,7 +28,6 @@ import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||||
import com.engine.organization.enums.LogModuleNameEnum;
|
import com.engine.organization.enums.LogModuleNameEnum;
|
||||||
import com.engine.organization.enums.OperateTypeEnum;
|
import com.engine.organization.enums.OperateTypeEnum;
|
||||||
import com.engine.organization.exception.OrganizationRunTimeException;
|
import com.engine.organization.exception.OrganizationRunTimeException;
|
||||||
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
|
|
||||||
import com.engine.organization.mapper.comp.CompMapper;
|
import com.engine.organization.mapper.comp.CompMapper;
|
||||||
import com.engine.organization.mapper.department.DepartmentMapper;
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||||
import com.engine.organization.mapper.job.JobMapper;
|
import com.engine.organization.mapper.job.JobMapper;
|
||||||
|
|
@ -75,10 +73,6 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JobMapper getJobMapper() {
|
|
||||||
return MapperProxyFactory.getProxy(JobMapper.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
private CompMapper getCompMapper() {
|
private CompMapper getCompMapper() {
|
||||||
return MapperProxyFactory.getProxy(CompMapper.class);
|
return MapperProxyFactory.getProxy(CompMapper.class);
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +84,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).listAll("showOrder");
|
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).listAll("showOrder");
|
||||||
PageInfo<DepartmentPO> pageInfo = new PageInfo<>(departmentPOS);
|
PageInfo<DepartmentPO> pageInfo = new PageInfo<>(departmentPOS);
|
||||||
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS, param.getParentComp());
|
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS, param.getParentComp());
|
||||||
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleDeptTreeVO.class);
|
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleDeptTreeVO.class);
|
||||||
pageInfos.setTotal(pageInfo.getTotal());
|
pageInfos.setTotal(pageInfo.getTotal());
|
||||||
pageInfos.setPageNum(param.getCurrent());
|
pageInfos.setPageNum(param.getCurrent());
|
||||||
pageInfos.setPageSize(param.getPageSize());
|
pageInfos.setPageSize(param.getPageSize());
|
||||||
|
|
@ -103,7 +97,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listAll();
|
List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listAll();
|
||||||
PageInfo<JobPO> pageInfo = new PageInfo<>(jobPOS);
|
PageInfo<JobPO> pageInfo = new PageInfo<>(jobPOS);
|
||||||
List<SingleJobTreeVO> singleDeptTreeVOS = JobBO.buildSingleJobTreeVOS(jobPOS, param.getParentDept());
|
List<SingleJobTreeVO> singleDeptTreeVOS = JobBO.buildSingleJobTreeVOS(jobPOS, param.getParentDept());
|
||||||
PageInfo<SingleJobTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleJobTreeVO.class);
|
PageInfo<SingleJobTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleJobTreeVO.class);
|
||||||
pageInfos.setTotal(pageInfo.getTotal());
|
pageInfos.setTotal(pageInfo.getTotal());
|
||||||
pageInfos.setPageNum(param.getCurrent());
|
pageInfos.setPageNum(param.getCurrent());
|
||||||
pageInfos.setPageSize(param.getPageSize());
|
pageInfos.setPageSize(param.getPageSize());
|
||||||
|
|
@ -150,13 +144,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
||||||
pageInfos = new PageInfo<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
||||||
pageInfos.setTotal(compListDTOS.size());
|
pageInfos.setTotal(compListDTOS.size());
|
||||||
} else {
|
} else {
|
||||||
// 组合list
|
// 组合list
|
||||||
List<DepartmentListDTO> compListDTOS = DepartmentBO.buildDeptDTOList(allList, orderType.toString());
|
List<DepartmentListDTO> compListDTOS = DepartmentBO.buildDeptDTOList(allList, orderType.toString());
|
||||||
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
||||||
pageInfos = new PageInfo<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
||||||
pageInfos.setTotal(compListDTOS.size());
|
pageInfos.setTotal(compListDTOS.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -165,7 +159,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
|
|
||||||
OrganizationWeaTable<DepartmentListDTO> table = new OrganizationWeaTable<>(user, DepartmentListDTO.class);
|
OrganizationWeaTable<DepartmentListDTO> table = new OrganizationWeaTable<>(user, DepartmentListDTO.class);
|
||||||
List<Column> columns = pageInfos.getColumns();
|
List<Column> columns = pageInfos.getColumns();
|
||||||
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", SystemEnv.getHtmlLabelName(v.getLabelId(),user.getLanguage()), v.getKey())).collect(Collectors.toList());
|
||||||
|
|
||||||
table.setColumns(weaTableColumn);
|
table.setColumns(weaTableColumn);
|
||||||
|
|
||||||
|
|
@ -212,7 +206,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||||
addDisableIds(disableIds, deptListByPId);
|
addDisableIds(disableIds, deptListByPId);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), "上级部门不能选择部门本身及其下级部门");
|
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), SystemEnv.getHtmlLabelName(547411,user.getLanguage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, params).sync();
|
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, params).sync();
|
||||||
|
|
@ -235,9 +229,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
// 名称
|
// 名称
|
||||||
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "departmentName");
|
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "departmentName");
|
||||||
// 所属分部
|
// 所属分部
|
||||||
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "subCompanyId1", "");
|
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "subCompanyId1", "");
|
||||||
// 上级部门
|
// 上级部门
|
||||||
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级部门", "4", "supDepId", "");
|
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547189, "4", "supDepId", "");
|
||||||
|
|
||||||
conditionItems.add(departmentCodeItem);
|
conditionItems.add(departmentCodeItem);
|
||||||
conditionItems.add(departmentNameItem);
|
conditionItems.add(departmentNameItem);
|
||||||
|
|
@ -251,16 +245,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, List<MenuBtn>> getHasRight() {
|
public Map<String, List<MenuBtn>> getHasRight() {
|
||||||
MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新增").type("BTN_Addnew").build();
|
MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName(SystemEnv.getHtmlLabelName(547117,user.getLanguage())).type("BTN_Addnew").build();
|
||||||
Map<String, List<MenuBtn>> datasNoBtnColum = MenuBtn.getDatasNoBtnColum(user.getLanguage());
|
Map<String, List<MenuBtn>> datasNoBtnColum = MenuBtn.getDatasNoBtnColum(user.getLanguage());
|
||||||
datasNoBtnColum.get("topMenu").add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("export").menuIcon("icon-coms-export").menuName("全部导出").type("BTN_Export").build());
|
datasNoBtnColum.get("topMenu").add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("export").menuIcon("icon-coms-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_Export").build());
|
||||||
datasNoBtnColum.get("rightMenu").add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("export").menuIcon("icon-coms-export").menuName("全部导出").type("BTN_Export").build());
|
datasNoBtnColum.get("rightMenu").add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("export").menuIcon("icon-coms-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_Export").build());
|
||||||
return datasNoBtnColum;
|
return datasNoBtnColum;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getDeptBaseForm(Map<String, Object> params) {
|
public Map<String, Object> getDeptBaseForm(Map<String, Object> params) {
|
||||||
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
OrganizationAssert.notNull(params.get("viewAttr"), SystemEnv.getHtmlLabelName(547260,user.getLanguage()));
|
||||||
// 2编辑 1查看
|
// 2编辑 1查看
|
||||||
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
||||||
|
|
||||||
|
|
@ -405,7 +399,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
resultMap.put("conditions", groupList);
|
resultMap.put("conditions", groupList);
|
||||||
resultMap.put("id", id);
|
resultMap.put("id", id);
|
||||||
List<TopTab> topTabs = new ArrayList<>();
|
List<TopTab> topTabs = new ArrayList<>();
|
||||||
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title("部门信息").viewCondition("4").build());
|
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title(SystemEnv.getHtmlLabelName(547412,user.getLanguage())).viewCondition("4").build());
|
||||||
resultMap.put("tabInfo", topTabs);
|
resultMap.put("tabInfo", topTabs);
|
||||||
|
|
||||||
Map<String, Object> apiDatas = new HashMap<>();
|
Map<String, Object> apiDatas = new HashMap<>();
|
||||||
|
|
@ -430,9 +424,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
public List<SearchConditionGroup> getCopyForm() {
|
public List<SearchConditionGroup> getCopyForm() {
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> condition = new ArrayList<>();
|
List<SearchConditionItem> condition = new ArrayList<>();
|
||||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "164", "company", "");
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547261, "164", "company", "");
|
||||||
compBrowserItem.setRules("required|string");
|
compBrowserItem.setRules("required|string");
|
||||||
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
|
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, SystemEnv.getHtmlLabelName(547262,user.getLanguage()), "copySubDept");
|
||||||
copySubDeptItem.setDetailtype(2);
|
copySubDeptItem.setDetailtype(2);
|
||||||
condition.add(compBrowserItem);
|
condition.add(compBrowserItem);
|
||||||
condition.add(copySubDeptItem);
|
condition.add(copySubDeptItem);
|
||||||
|
|
@ -450,7 +444,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
public int copyDepartment(DeptCopyParam copyParam) {
|
public int copyDepartment(DeptCopyParam copyParam) {
|
||||||
// 批量复制,后续优化
|
// 批量复制,后续优化
|
||||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||||
OrganizationAssert.notBlank(copyParam.getCompany(), "请指定需要复制的公司/分部");
|
OrganizationAssert.notBlank(copyParam.getCompany(), SystemEnv.getHtmlLabelName(547263,user.getLanguage()));
|
||||||
int insertCount = 0;
|
int insertCount = 0;
|
||||||
// 需复制的部门
|
// 需复制的部门
|
||||||
List<Integer> idList = Arrays.stream(copyParam.getIds().split(",")).map(Integer::parseInt).collect(Collectors.toList());
|
List<Integer> idList = Arrays.stream(copyParam.getIds().split(",")).map(Integer::parseInt).collect(Collectors.toList());
|
||||||
|
|
@ -466,7 +460,6 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
private void recursionCopyDept(Integer originalDeptId, Integer parentDepartmentId, Integer companyId, Double maxShowOrder, String copyJob, String copySubDept, String copySubJob) {
|
private void recursionCopyDept(Integer originalDeptId, Integer parentDepartmentId, Integer companyId, Double maxShowOrder, String copyJob, String copySubDept, String copySubJob) {
|
||||||
// 源部门
|
// 源部门
|
||||||
DepartmentPO deptById = getDepartmentMapper().getDeptById(originalDeptId);
|
DepartmentPO deptById = getDepartmentMapper().getDeptById(originalDeptId);
|
||||||
long timeMillis = System.currentTimeMillis();
|
|
||||||
// 处理自动编号
|
// 处理自动编号
|
||||||
deptById.setDepartmentCode(null);
|
deptById.setDepartmentCode(null);
|
||||||
// 设置上级分部
|
// 设置上级分部
|
||||||
|
|
@ -480,19 +473,6 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
Map<String, Object> syncMap = addEcDepartment(deptById);
|
Map<String, Object> syncMap = addEcDepartment(deptById);
|
||||||
String ecDepartmentID = Util.null2String(syncMap.get("id"));
|
String ecDepartmentID = Util.null2String(syncMap.get("id"));
|
||||||
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecDepartmentID), syncMap.get("message").toString());
|
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecDepartmentID), syncMap.get("message").toString());
|
||||||
// 更新组织架构图
|
|
||||||
// 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(copySubDept)) {
|
if ("1".equals(copySubDept)) {
|
||||||
|
|
@ -509,9 +489,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
public List<SearchConditionGroup> getMergeForm() {
|
public List<SearchConditionGroup> getMergeForm() {
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> condition = new ArrayList<>();
|
List<SearchConditionItem> condition = new ArrayList<>();
|
||||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "合并到部门", "4", "department", "");
|
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547264, "4", "department", "");
|
||||||
deptBrowserItem.setRules("required|string");
|
deptBrowserItem.setRules("required|string");
|
||||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
|
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547265, "mergeName");
|
||||||
mergeNameItem.setRules("required|string");
|
mergeNameItem.setRules("required|string");
|
||||||
|
|
||||||
condition.add(deptBrowserItem);
|
condition.add(deptBrowserItem);
|
||||||
|
|
@ -529,10 +509,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
|
|
||||||
|
|
||||||
// 断言判断
|
// 断言判断
|
||||||
OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并");
|
OrganizationAssert.isFalse(null == targetDepartment, SystemEnv.getHtmlLabelName(547266,user.getLanguage()));
|
||||||
OrganizationAssert.isFalse(mergeParam.getId().equals(targetDepartment.getId()), "所选部门与待合并部门一致,无需操作");
|
OrganizationAssert.isFalse(mergeParam.getId().equals(targetDepartment.getId()), SystemEnv.getHtmlLabelName(547267,user.getLanguage()));
|
||||||
OrganizationAssert.notNull(mergeParam.getDepartment(), "请选择需要合并的部门");
|
OrganizationAssert.notNull(mergeParam.getDepartment(), SystemEnv.getHtmlLabelName(547268,user.getLanguage()));
|
||||||
OrganizationAssert.notBlank(mergeParam.getMergeName(), "请输入合并后的名称");
|
OrganizationAssert.notBlank(mergeParam.getMergeName(), SystemEnv.getHtmlLabelName(547270,user.getLanguage()));
|
||||||
|
|
||||||
// 不可选择合并的数据,本身及子部门
|
// 不可选择合并的数据,本身及子部门
|
||||||
Set<Integer> disableIds = new HashSet<>();
|
Set<Integer> disableIds = new HashSet<>();
|
||||||
|
|
@ -542,7 +522,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||||
addDisableIds(disableIds, deptListByPId);
|
addDisableIds(disableIds, deptListByPId);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), "请勿选择当前部门本身及其子部门");
|
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||||
|
|
||||||
// 查询该部门下一级部门
|
// 查询该部门下一级部门
|
||||||
List<DepartmentPO> firstChildDeptList = getDepartmentMapper().getDeptListByPId(mergeParam.getId());
|
List<DepartmentPO> firstChildDeptList = getDepartmentMapper().getDeptListByPId(mergeParam.getId());
|
||||||
|
|
@ -551,41 +531,24 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
departmentPO.setSupDepId(targetDepartment.getId());
|
departmentPO.setSupDepId(targetDepartment.getId());
|
||||||
departmentPO.setSubCompanyId1(targetDepartment.getSubCompanyId1());
|
departmentPO.setSubCompanyId1(targetDepartment.getSubCompanyId1());
|
||||||
updateEcDepartment(departmentPO);
|
updateEcDepartment(departmentPO);
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(departmentPO.getId()).run();
|
|
||||||
}
|
}
|
||||||
// 查询该部门一级岗位、更新岗位所属分部、所属部门
|
|
||||||
//List<JobPO> firstChildJobList = getJobMapper().listJobsByDepartmentId(mergeParam.getId());
|
|
||||||
//firstChildJobList = firstChildJobList.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
|
||||||
// 批量更新部门、所属分部
|
// 批量更新部门、所属分部
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
String targetEcDeptId = targetDepartment.getId().toString();
|
String targetEcDeptId = targetDepartment.getId().toString();
|
||||||
String mergeEcDeptId = mergeParam.getId().toString();
|
String mergeEcDeptId = mergeParam.getId().toString();
|
||||||
//rs.executeUpdate("update jcl_org_job set parent_comp =?,ec_company =?,parent_dept =?,ec_department =? where ec_department =?", targetDepartment.getSubCompanyId1(), targetDepartment.getSubCompanyId1(), targetDepartment.getId(), targetEcDeptId, mergeParam.getId());
|
|
||||||
// 更新岗位组织架构图
|
|
||||||
//for (JobPO jobPO : firstChildJobList) {
|
|
||||||
// // 刷新组织架构图
|
|
||||||
// new JobTriggerRunnable(jobPO.getId()).run();
|
|
||||||
//}
|
|
||||||
// 更新当前部门下的人员
|
// 更新当前部门下的人员
|
||||||
rs.executeUpdate("update hrmresource set SUBCOMPANYID1 =?,DEPARTMENTID =? where DEPARTMENTID =?", targetDepartment.getSubCompanyId1(), targetEcDeptId, mergeEcDeptId);
|
rs.executeUpdate("update hrmresource set SUBCOMPANYID1 =?,DEPARTMENTID =? where DEPARTMENTID =?", targetDepartment.getSubCompanyId1(), targetEcDeptId, mergeEcDeptId);
|
||||||
//new RecordSet().executeUpdate("update jcl_org_hrmresource set company_id =? ,ec_company = ? ,department_id = ?, ec_department = ?where department_id =?", targetDepartment.getParentComp(), targetDepartment.getEcCompany(), targetDepartment.getId(), targetEcDeptId, mergeParam.getId());
|
|
||||||
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(mergeParam.getId().toString());
|
|
||||||
//// 更新人员组织架构图
|
|
||||||
//for (Long hrmResourceId : hrmResourceIds) {
|
|
||||||
// new HrmResourceTriggerRunnable(hrmResourceId).run();
|
|
||||||
//}
|
|
||||||
// 更新子部门下岗位的所属分部
|
// 更新子部门下岗位的所属分部
|
||||||
for (DepartmentPO departmentPO : firstChildDeptList) {
|
for (DepartmentPO departmentPO : firstChildDeptList) {
|
||||||
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
|
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
|
||||||
forbiddenChildTag(targetDepartment.getSubCompanyId1(), deptList);
|
forbiddenChildTag(targetDepartment.getSubCompanyId1(), deptList);
|
||||||
}
|
}
|
||||||
// 原部门删除
|
|
||||||
// DepartmentPO mergeDepartment = getDepartmentMapper().getDeptById(mergeParam.getId());
|
|
||||||
// 删除部门(先更改原部门名称,释放原部门名称,然后删除)
|
// 删除部门(先更改原部门名称,释放原部门名称,然后删除)
|
||||||
DepartmentPO sourceDepartmentPO = getDepartmentMapper().getDeptById(mergeParam.getId());
|
DepartmentPO sourceDepartmentPO = getDepartmentMapper().getDeptById(mergeParam.getId());
|
||||||
sourceDepartmentPO.setDepartmentName(sourceDepartmentPO.getDepartmentName() + "_被合并");
|
sourceDepartmentPO.setDepartmentName(sourceDepartmentPO.getDepartmentName() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
|
||||||
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + "_被合并");
|
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
|
||||||
updateEcDepartment(sourceDepartmentPO);
|
updateEcDepartment(sourceDepartmentPO);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("id", Util.null2String(mergeParam.getId()));
|
map.put("id", Util.null2String(mergeParam.getId()));
|
||||||
|
|
@ -593,14 +556,12 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
// 删除原部门下的岗位
|
// 删除原部门下的岗位
|
||||||
|
|
||||||
|
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(mergeDepartment).run();
|
|
||||||
// 更新部门合并后名称
|
// 更新部门合并后名称
|
||||||
targetDepartment.setDepartmentName(mergeParam.getMergeName());
|
targetDepartment.setDepartmentName(mergeParam.getMergeName());
|
||||||
targetDepartment.setDepartmentMark(mergeParam.getMergeName());
|
targetDepartment.setDepartmentMark(mergeParam.getMergeName());
|
||||||
updateEcDepartment(targetDepartment);
|
updateEcDepartment(targetDepartment);
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(oldFParentId, targetDepartment.getId()).run();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,8 +569,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
public List<SearchConditionGroup> getMoveForm() {
|
public List<SearchConditionGroup> getMoveForm() {
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> condition = new ArrayList<>();
|
List<SearchConditionItem> condition = new ArrayList<>();
|
||||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择分部", "164", "company", "");
|
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547273, "164", "company", "");
|
||||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "4", "department", "");
|
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547274, "4", "department", "");
|
||||||
|
|
||||||
|
|
||||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||||
|
|
@ -617,7 +578,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
SearchConditionOption deptOption = new SearchConditionOption("1", "部门");
|
SearchConditionOption deptOption = new SearchConditionOption("1", "部门");
|
||||||
selectOptions.add(compOption);
|
selectOptions.add(compOption);
|
||||||
selectOptions.add(deptOption);
|
selectOptions.add(deptOption);
|
||||||
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "转移到", "moveType");
|
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, 547275, "moveType");
|
||||||
moveTypeItem.setDetailtype(3);
|
moveTypeItem.setDetailtype(3);
|
||||||
moveTypeItem.setValue("0");
|
moveTypeItem.setValue("0");
|
||||||
|
|
||||||
|
|
@ -631,47 +592,34 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
@Override
|
@Override
|
||||||
public int moveDepartment(DepartmentMoveParam moveParam) {
|
public int moveDepartment(DepartmentMoveParam moveParam) {
|
||||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||||
OrganizationAssert.notBlank(moveParam.getMoveType(), "请选择转移类型");
|
OrganizationAssert.notBlank(moveParam.getMoveType(), SystemEnv.getHtmlLabelName(547276,user.getLanguage()));
|
||||||
DepartmentPO deptById = getDepartmentMapper().getDeptById(moveParam.getId());
|
DepartmentPO deptById = getDepartmentMapper().getDeptById(moveParam.getId());
|
||||||
// 0:公司/分部 1:部门
|
// 0:公司/分部 1:部门
|
||||||
if ("0".equals(moveParam.getMoveType())) {
|
if ("0".equals(moveParam.getMoveType())) {
|
||||||
Integer company = moveParam.getCompany();
|
Integer company = moveParam.getCompany();
|
||||||
OrganizationAssert.notNull(company, "请选择要转移到的分部");
|
OrganizationAssert.notNull(company, SystemEnv.getHtmlLabelName(547277,user.getLanguage()));
|
||||||
deptById.setSubCompanyId1(company);
|
deptById.setSubCompanyId1(company);
|
||||||
deptById.setSupDepId(null);
|
deptById.setSupDepId(null);
|
||||||
|
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(company.toString(), deptById).run();
|
|
||||||
} else if ("1".equals(moveParam.getMoveType())) {
|
} else if ("1".equals(moveParam.getMoveType())) {
|
||||||
Integer departmentId = moveParam.getDepartment();
|
Integer departmentId = moveParam.getDepartment();
|
||||||
OrganizationAssert.notNull(departmentId, "请选择要转移到的部门");
|
OrganizationAssert.notNull(departmentId, SystemEnv.getHtmlLabelName(547278,user.getLanguage()));
|
||||||
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
|
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
|
||||||
Set<Integer> disableIds = new HashSet<>();
|
Set<Integer> disableIds = new HashSet<>();
|
||||||
disableIds.add(moveParam.getId());
|
disableIds.add(moveParam.getId());
|
||||||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||||
addDisableIds(disableIds, deptListByPId);
|
addDisableIds(disableIds, deptListByPId);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse(disableIds.contains(departmentId), "请勿选择当前部门本身及其子部门");
|
OrganizationAssert.isFalse(disableIds.contains(departmentId), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||||
deptById.setSupDepId(departmentId);
|
deptById.setSupDepId(departmentId);
|
||||||
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(departmentId);
|
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(departmentId);
|
||||||
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
||||||
|
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(Integer.toString(100000000 + department.intValue()), deptById).run();
|
|
||||||
}
|
}
|
||||||
// 更新EC部门
|
// 更新EC部门
|
||||||
updateEcDepartment(deptById);
|
updateEcDepartment(deptById);
|
||||||
|
|
||||||
// 刷新岗位分部
|
|
||||||
//refreshJobComp(deptById.getId(), deptById.getSubCompanyId1());
|
|
||||||
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(deptById.getId());
|
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(deptById.getId());
|
||||||
// 更新当前部门下的人员
|
|
||||||
// new RecordSet().executeUpdate("update hrmresource set SUBCOMPANYID1 =? where DEPARTMENTID = ?", deptById.getSubCompanyId1(), deptById.getId());
|
|
||||||
//// 更新人员组织架构图
|
|
||||||
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(deptById.getId().toString());
|
|
||||||
//for (Long hrmResourceId : hrmResourceIds) {
|
|
||||||
// new HrmResourceTriggerRunnable(hrmResourceId).run();
|
|
||||||
//}
|
|
||||||
forbiddenChildTag(deptById.getSubCompanyId1(), deptList);
|
forbiddenChildTag(deptById.getSubCompanyId1(), deptList);
|
||||||
// 递归更新下级部门、岗位
|
// 递归更新下级部门、岗位
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -695,8 +643,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
String supId = "";
|
String supId = "";
|
||||||
String ftype = "";
|
String ftype = "";
|
||||||
String querySupIdSql;
|
String querySupIdSql;
|
||||||
// OrganizationAssert.isFalse("s".equals(sourceType) && "d".equals(targetType), "分部不能转移到部门下");
|
OrganizationAssert.isFalse("-1".equals(dragPostion), SystemEnv.getHtmlLabelName(547279,user.getLanguage()));
|
||||||
OrganizationAssert.isFalse("-1".equals(dragPostion), "分部、部门不能转移至与集团平级");
|
|
||||||
if ("s".equals(targetType)) {// 分部
|
if ("s".equals(targetType)) {// 分部
|
||||||
querySupIdSql = "select companyId as supComId,supsubcomid as supId,'s' as ftype from hrmsubcompany where id = ?";
|
querySupIdSql = "select companyId as supComId,supsubcomid as supId,'s' as ftype from hrmsubcompany where id = ?";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -713,7 +660,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("id", sourceId);
|
params.put("id", sourceId);
|
||||||
if ("0".equals(dragPostion)) {//内部
|
if ("0".equals(dragPostion)) {//内部
|
||||||
OrganizationAssert.isFalse("d".equals(targetType), "分部不能拖拽至部门下");
|
OrganizationAssert.isFalse("d".equals(targetType), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
|
||||||
if ("c".equals(targetType)) {// 集团下(上级分部为0)
|
if ("c".equals(targetType)) {// 集团下(上级分部为0)
|
||||||
params.put("supsubcomid", "0");
|
params.put("supsubcomid", "0");
|
||||||
} else if ("s".equals(targetType)) {
|
} else if ("s".equals(targetType)) {
|
||||||
|
|
@ -723,7 +670,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
if ("s".equals(targetType)) {// 分部外(平级)
|
if ("s".equals(targetType)) {// 分部外(平级)
|
||||||
params.put("supsubcomid", supId);
|
params.put("supsubcomid", supId);
|
||||||
} else {// 部门外(找上级)
|
} else {// 部门外(找上级)
|
||||||
OrganizationAssert.isFalse("d".equals(ftype), "分部不能拖拽至部门下");
|
OrganizationAssert.isFalse("d".equals(ftype), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
|
||||||
params.put("supsubcomid", supId);
|
params.put("supsubcomid", supId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -732,7 +679,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
List<DepartmentPO> deptListByPId;
|
List<DepartmentPO> deptListByPId;
|
||||||
Set<Integer> disableIds = new HashSet<>();
|
Set<Integer> disableIds = new HashSet<>();
|
||||||
if ("0".equals(dragPostion)) {//内部
|
if ("0".equals(dragPostion)) {//内部
|
||||||
OrganizationAssert.isFalse("c".equals(targetType), "部门不能拖拽至集团下");
|
OrganizationAssert.isFalse("c".equals(targetType), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
|
||||||
if ("s".equals(targetType)) {
|
if ("s".equals(targetType)) {
|
||||||
deptById.setSubCompanyId1(Util.getIntValue(targetId));
|
deptById.setSubCompanyId1(Util.getIntValue(targetId));
|
||||||
deptById.setSupDepId(null);
|
deptById.setSupDepId(null);
|
||||||
|
|
@ -742,14 +689,14 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||||
addDisableIds(disableIds, deptListByPId);
|
addDisableIds(disableIds, deptListByPId);
|
||||||
}
|
}
|
||||||
OrganizationAssert.isFalse("d".equals(targetType) && disableIds.contains(Util.getIntValue(targetId)), "请勿选择当前部门本身及其子部门");
|
OrganizationAssert.isFalse("d".equals(targetType) && disableIds.contains(Util.getIntValue(targetId)), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||||
deptById.setSupDepId(Util.getIntValue(targetId));
|
deptById.setSupDepId(Util.getIntValue(targetId));
|
||||||
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(Util.getIntValue(targetId));
|
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(Util.getIntValue(targetId));
|
||||||
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
|
||||||
}
|
}
|
||||||
} else {//外部
|
} else {//外部
|
||||||
if ("s".equals(targetType)) {
|
if ("s".equals(targetType)) {
|
||||||
OrganizationAssert.isFalse("0".equals(supId), "部门不能拖拽至集团下");
|
OrganizationAssert.isFalse("0".equals(supId), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
|
||||||
deptById.setSubCompanyId1(Util.getIntValue(supId));
|
deptById.setSubCompanyId1(Util.getIntValue(supId));
|
||||||
deptById.setSupDepId(null);
|
deptById.setSupDepId(null);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -785,19 +732,6 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
// 更新EC表部门
|
// 更新EC表部门
|
||||||
updateEcDepartment(departmentPO);
|
updateEcDepartment(departmentPO);
|
||||||
|
|
||||||
// 更新组织架构图
|
|
||||||
// new DepartmentTriggerRunnable(departmentPO.getId()).run();
|
|
||||||
// 刷新岗位所属分部
|
|
||||||
//refreshJobComp(departmentPO.getId(), subCompanyId1);
|
|
||||||
// 更新当前部门下的人员
|
|
||||||
// String ecDepartmentId = EcHrmRelationUtil.getEcDepartmentId(departmentPO.getId().toString());
|
|
||||||
//new RecordSet().executeUpdate("update hrmresource set SUBCOMPANYID1 =? where DEPARTMENTID = ?", ecCompanyId, ecDepartmentId);
|
|
||||||
//new RecordSet().executeUpdate("update jcl_org_hrmresource set company_id =? ,ec_company = ? where department_id =?", parentComp, ecCompanyId, departmentPO.getId());
|
|
||||||
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(departmentPO.getId().toString());
|
|
||||||
//// 更新人员组织架构图
|
|
||||||
//for (Long hrmResourceId : hrmResourceIds) {
|
|
||||||
// new HrmResourceTriggerRunnable(hrmResourceId).run();
|
|
||||||
//}
|
|
||||||
List<DepartmentPO> childList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
|
List<DepartmentPO> childList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
|
||||||
forbiddenChildTag(subCompanyId1, childList);
|
forbiddenChildTag(subCompanyId1, childList);
|
||||||
}
|
}
|
||||||
|
|
@ -859,23 +793,6 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断编号是否重复
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String repeatDetermine(String deptNo) {
|
|
||||||
CodeRulePO codeRuleByType = MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleByType(RuleCodeType.DEPARTMENT.getValue());
|
|
||||||
if (StringUtils.isNotBlank(deptNo)) {
|
|
||||||
deptNo = CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptNo);
|
|
||||||
List<DepartmentPO> list = getDepartmentMapper().listByNo(Util.null2String(deptNo));
|
|
||||||
OrganizationAssert.isEmpty(list, SystemEnv.getHtmlLabelName(547137, user.getLanguage()));
|
|
||||||
} else {
|
|
||||||
OrganizationAssert.isTrue(null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable()), "编号不允许为空");
|
|
||||||
deptNo = autoCreateCompanyNo();
|
|
||||||
}
|
|
||||||
return deptNo;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动编号处理
|
* 自动编号处理
|
||||||
|
|
@ -935,19 +852,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新岗位的所属分部
|
|
||||||
*
|
|
||||||
* @param parentDepartment
|
|
||||||
* @param parentComp
|
|
||||||
*/
|
|
||||||
private void refreshJobComp(Integer parentDepartment, Integer parentComp) {
|
|
||||||
List<JobPO> jobPOS = getJobMapper().listJobsByDepartmentId(parentDepartment);
|
|
||||||
jobPOS = jobPOS.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
|
||||||
if (CollectionUtils.isNotEmpty(jobPOS)) {
|
|
||||||
getJobMapper().updateJobCompany(jobPOS.stream().map(JobPO::getId).collect(Collectors.toList()), parentComp, parentComp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<SearchConditionGroup> getDepartmentConditionGroups(Boolean showAll, Map<String, Object> params) {
|
private List<SearchConditionGroup> getDepartmentConditionGroups(Boolean showAll, Map<String, Object> params) {
|
||||||
List<SearchConditionGroup> groupList = new ArrayList<>();
|
List<SearchConditionGroup> groupList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -169,13 +169,13 @@ public class JobServiceImpl extends Service implements JobService {
|
||||||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||||
pageInfos.setTotal(jobListDTOS.size());
|
pageInfos.setTotal(jobListDTOS.size());
|
||||||
} else {
|
} else {
|
||||||
// 组合list
|
// 组合list
|
||||||
List<JobListDTO> jobListDTOS = JobBO.buildDTOList(allList);
|
List<JobListDTO> jobListDTOS = JobBO.buildDTOList(allList);
|
||||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||||
pageInfos.setTotal(jobListDTOS.size());
|
pageInfos.setTotal(jobListDTOS.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -226,7 +226,7 @@ public class JobServiceImpl extends Service implements JobService {
|
||||||
// 名称
|
// 名称
|
||||||
SearchConditionItem jobTitleNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobTitleName");
|
SearchConditionItem jobTitleNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobTitleName");
|
||||||
// 所属分部
|
// 所属分部
|
||||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "subcompanyid1", "");
|
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "subcompanyid1", "");
|
||||||
// 所属部门
|
// 所属部门
|
||||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "departmentid", "");
|
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "departmentid", "");
|
||||||
// 是否关键岗
|
// 是否关键岗
|
||||||
|
|
@ -307,7 +307,7 @@ public class JobServiceImpl extends Service implements JobService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
||||||
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
OrganizationAssert.notNull(params.get("viewAttr"), SystemEnv.getHtmlLabelName(547260,user.getLanguage()));
|
||||||
|
|
||||||
// 2编辑 1查看
|
// 2编辑 1查看
|
||||||
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
||||||
|
|
@ -546,7 +546,7 @@ public class JobServiceImpl extends Service implements JobService {
|
||||||
customBrowserBean.setHasLeftTree(true);
|
customBrowserBean.setHasLeftTree(true);
|
||||||
customBrowserBean.setLeftToSearchKey("treeKey");
|
customBrowserBean.setLeftToSearchKey("treeKey");
|
||||||
deptBrowserItem.setBrowserConditionParam(customBrowserBean);
|
deptBrowserItem.setBrowserConditionParam(customBrowserBean);
|
||||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
|
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547265, "mergeName");
|
||||||
mergeNameItem.setRules("required|string");
|
mergeNameItem.setRules("required|string");
|
||||||
condition.add(deptBrowserItem);
|
condition.add(deptBrowserItem);
|
||||||
condition.add(mergeNameItem);
|
condition.add(mergeNameItem);
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ import weaver.conn.RecordSet;
|
||||||
import weaver.general.GCONST;
|
import weaver.general.GCONST;
|
||||||
import weaver.general.StringUtil;
|
import weaver.general.StringUtil;
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
@ -128,14 +129,14 @@ public class PersonnelResumeServiceImpl extends Service implements PersonnelResu
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("screening").menuIcon("icon-coms-man").menuName("人员筛选").type("BTN_Screening").build());
|
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("screening").menuIcon("icon-coms-man").menuName("人员筛选").type("BTN_Screening").build());
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("currentExport").menuIcon("icon-coms-export").menuName("导出当前").type("BTN_CurrentExport").build());
|
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("currentExport").menuIcon("icon-coms-export").menuName("导出当前").type("BTN_CurrentExport").build());
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("mergeExport").menuIcon("icon-coms02-coms2-Batch-export").menuName("全部导出(合并)").type("BTN_MergeExport").build());
|
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("mergeExport").menuIcon("icon-coms02-coms2-Batch-export").menuName("全部导出(合并)").type("BTN_MergeExport").build());
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("allExport").menuIcon("icon-coms02-coms2-export").menuName("全部导出").type("BTN_AllExport").build());
|
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("allExport").menuIcon("icon-coms02-coms2-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_AllExport").build());
|
||||||
|
|
||||||
resultMap.put("topMenu", topMenuList);
|
resultMap.put("topMenu", topMenuList);
|
||||||
// 新增
|
// 新增
|
||||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("screening").menuIcon("icon-coms-man").menuName("人员筛选").type("BTN_Screening").build());
|
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("screening").menuIcon("icon-coms-man").menuName("人员筛选").type("BTN_Screening").build());
|
||||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("currentExport").menuIcon("icon-coms-export").menuName("导出当前").type("BTN_CurrentExport").build());
|
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("currentExport").menuIcon("icon-coms-export").menuName("导出当前").type("BTN_CurrentExport").build());
|
||||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("mergeExport").menuIcon("icon-coms02-coms2-Batch-export").menuName("全部导出(合并)").type("BTN_MergeExport").build());
|
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("mergeExport").menuIcon("icon-coms02-coms2-Batch-export").menuName("全部导出(合并)").type("BTN_MergeExport").build());
|
||||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("allExport").menuIcon("icon-coms02-coms2-export").menuName("全部导出").type("BTN_AllExport").build());
|
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("allExport").menuIcon("icon-coms02-coms2-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_AllExport").build());
|
||||||
|
|
||||||
resultMap.put("rightMenu", rightMenuList);
|
resultMap.put("rightMenu", rightMenuList);
|
||||||
return resultMap;
|
return resultMap;
|
||||||
|
|
|
||||||
|
|
@ -233,12 +233,12 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
|
||||||
topMenuList.add(MenuBtn.topMenu_addNew(userLanguage));
|
topMenuList.add(MenuBtn.topMenu_addNew(userLanguage));
|
||||||
// 批量删除
|
// 批量删除
|
||||||
topMenuList.add(MenuBtn.topMenu_batchDelete(userLanguage));
|
topMenuList.add(MenuBtn.topMenu_batchDelete(userLanguage));
|
||||||
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
|
|
||||||
btnDatas.put("topMenu", topMenuList);
|
btnDatas.put("topMenu", topMenuList);
|
||||||
// 新增
|
// 新增
|
||||||
rightMenuList.add(MenuBtn.rightMenu_addNew(userLanguage));
|
rightMenuList.add(MenuBtn.rightMenu_addNew(userLanguage));
|
||||||
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("import").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("import").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
// 日志
|
// 日志
|
||||||
rightMenuList.add(MenuBtn.rightMenu_btnLog(userLanguage));
|
rightMenuList.add(MenuBtn.rightMenu_btnLog(userLanguage));
|
||||||
// 显示列定制
|
// 显示列定制
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public class SequenceServiceImpl extends Service implements SequenceService {
|
||||||
if (file.mkdirs()) {
|
if (file.mkdirs()) {
|
||||||
boolean newFile = excelPathFile.createNewFile();
|
boolean newFile = excelPathFile.createNewFile();
|
||||||
if (!newFile) {
|
if (!newFile) {
|
||||||
throw new IOException(outPutPath + "文件创建失败");
|
throw new IOException(outPutPath + ",File Creation Failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -205,8 +205,8 @@ public class SequenceServiceImpl extends Service implements SequenceService {
|
||||||
@Override
|
@Override
|
||||||
public Map<String, List<MenuBtn>> getHasRight() {
|
public Map<String, List<MenuBtn>> getHasRight() {
|
||||||
Map<String, List<MenuBtn>> commonBtnDatas = MenuBtn.getCommonBtnDatas(user.getLanguage());
|
Map<String, List<MenuBtn>> commonBtnDatas = MenuBtn.getCommonBtnDatas(user.getLanguage());
|
||||||
commonBtnDatas.get("topMenu").add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("importFile").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
commonBtnDatas.get("topMenu").add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("importFile").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
commonBtnDatas.get("rightMenu").add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("importFile").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
commonBtnDatas.get("rightMenu").add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("importFile").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
return commonBtnDatas;
|
return commonBtnDatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -357,8 +357,8 @@ public class StaffServiceImpl extends Service implements StaffService {
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getHasRight() {
|
public Map<String, Object> getHasRight() {
|
||||||
Map<String, List<MenuBtn>> datas = MenuBtn.getCommonBtnDatas(user.getLanguage());
|
Map<String, List<MenuBtn>> datas = MenuBtn.getCommonBtnDatas(user.getLanguage());
|
||||||
datas.get("topMenu").add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
datas.get("topMenu").add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
datas.get("rightMenu").add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("import").menuIcon("icon-coms-leading-in").menuName("批量导入").type("BTN_BatchImport").build());
|
datas.get("rightMenu").add(MenuBtn.builder().isBatch("1").isTop("0").menuFun("import").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||||
Map<String, Object> map = new HashMap<>(datas);
|
Map<String, Object> map = new HashMap<>(datas);
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> selectItems = new ArrayList<>();
|
List<SearchConditionItem> selectItems = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,11 @@ public class OrganizationFormItemUtil {
|
||||||
return select;
|
return select;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SearchConditionItem selectItem(User user, List<SearchConditionOption> selectOptions, int colSpan, int fieldcol,
|
||||||
|
int labelcol, boolean isQuickSearch, int label, String name) {
|
||||||
|
return selectItem(user,selectOptions,colSpan,fieldcol,labelcol,isQuickSearch,SystemEnv.getHtmlLabelName(label,user.getLanguage()),name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checkbox
|
* checkbox
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import com.engine.organization.annotation.TableTitle;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -11,7 +13,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
@EqualsAndHashCode(callSuper=false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
||||||
Class<T> clazz;
|
Class<T> clazz;
|
||||||
|
|
||||||
|
|
@ -25,23 +27,23 @@ public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
||||||
public PageInfo() {
|
public PageInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageInfo(Class<T> clazz) {
|
public PageInfo(User user, Class<T> clazz) {
|
||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
this.columns = buildColumns();
|
this.columns = buildColumns(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageInfo(List<T> list) {
|
public PageInfo(List<T> list) {
|
||||||
super(list);
|
super(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageInfo(List<T> list, Class<T> clazz) {
|
public PageInfo(User user, List<T> list, Class<T> clazz) {
|
||||||
super(list);
|
super(list);
|
||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
this.columns = buildColumns();
|
this.columns = buildColumns(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<Column> buildColumns() {
|
public List<Column> buildColumns(User user) {
|
||||||
if (clazz == null) {
|
if (clazz == null) {
|
||||||
return this.columns;
|
return this.columns;
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +59,7 @@ public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
||||||
String width = annotation.width();
|
String width = annotation.width();
|
||||||
boolean sorter = annotation.sorter();
|
boolean sorter = annotation.sorter();
|
||||||
int labelId = annotation.labelId();
|
int labelId = annotation.labelId();
|
||||||
Column column = Column.builder().sorter(sorter).width(width).labelId(labelId).title(title).dataIndex(dataIndex).key(key).display(display).build();
|
Column column = Column.builder().sorter(sorter).width(width).title(-1 != labelId ? SystemEnv.getHtmlLabelName(labelId, user.getLanguage()) : title).dataIndex(dataIndex).key(key).display(display).build();
|
||||||
columns.add(column);
|
columns.add(column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ public class JobWrapper extends OrganizationWrapper {
|
||||||
public ReturnResult getCopyForm() {
|
public ReturnResult getCopyForm() {
|
||||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||||
List<SearchConditionItem> condition = new ArrayList<>();
|
List<SearchConditionItem> condition = new ArrayList<>();
|
||||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "4", "department", "deptBrowser");
|
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547261, "4", "department", "deptBrowser");
|
||||||
deptBrowserItem.setRules("required|string");
|
deptBrowserItem.setRules("required|string");
|
||||||
condition.add(deptBrowserItem);
|
condition.add(deptBrowserItem);
|
||||||
addGroups.add(new SearchConditionGroup("", true, condition));
|
addGroups.add(new SearchConditionGroup("", true, condition));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue