|
|
|
@ -16,9 +16,11 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
|
|
|
|
import com.engine.organization.entity.department.po.DepartmentPO;
|
|
|
|
|
import com.engine.organization.entity.hrmresource.po.SearchTemplatePO;
|
|
|
|
|
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
|
|
|
|
import com.engine.organization.entity.staff.po.StaffPO;
|
|
|
|
|
import com.engine.organization.mapper.department.DepartmentMapper;
|
|
|
|
|
import com.engine.organization.mapper.resource.HrmResourceMapper;
|
|
|
|
|
import com.engine.organization.mapper.resource.ResourceMapper;
|
|
|
|
|
import com.engine.organization.mapper.staff.StaffMapper;
|
|
|
|
|
import com.engine.organization.service.ExportCommonService;
|
|
|
|
|
import com.engine.organization.util.HrmI18nUtil;
|
|
|
|
|
import com.engine.organization.util.PageInfoSortUtil;
|
|
|
|
@ -52,6 +54,10 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|
|
|
|
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static StaffMapper getStaffMapper() {
|
|
|
|
|
return MapperProxyFactory.getProxy(StaffMapper.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public XSSFWorkbook resourceExport(List<Long> ids) {
|
|
|
|
@ -273,5 +279,53 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|
|
|
|
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public XSSFWorkbook staffExport(String planId) {
|
|
|
|
|
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
|
|
|
|
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
|
|
|
|
List<Integer> collect = Arrays.stream(planId.split(","))
|
|
|
|
|
.map(String::trim)
|
|
|
|
|
.map(Integer::parseInt)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
List<StaffPO> staffPOS = getStaffMapper().selectByPlanIds(collect);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int language = user.getLanguage();
|
|
|
|
|
String languageStr = String.valueOf(language);
|
|
|
|
|
// 1.工作簿名称
|
|
|
|
|
String sheetName = HrmI18nUtil.getI18nLabel(547733, language, "编制信息档案");
|
|
|
|
|
// 2.表头(后面动态获取)
|
|
|
|
|
List<List<Object>> excelSheetData = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
String[] header = {
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547344, language, "方案"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547293, language, "分部"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547331, language, "部门"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547333, language, "岗位"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547345, language, "编制数"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547346, language, "在编数"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547347, language, "冻结数"),
|
|
|
|
|
HrmI18nUtil.getI18nLabel(547348, language, "缺编状态")
|
|
|
|
|
};
|
|
|
|
|
excelSheetData.add(Arrays.asList(header));
|
|
|
|
|
|
|
|
|
|
//数据
|
|
|
|
|
List<List<Object>> rows = new LinkedList<>();
|
|
|
|
|
// for (DepartmentListDTO vo : dtoList) {
|
|
|
|
|
// List<Object> row = new LinkedList<>();
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getDepartmentName(), languageStr));
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getDepartmentCode(), languageStr));
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getDepartmentMark(), languageStr));
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getSubCompanyName(), languageStr));
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getSupDepName(), languageStr));
|
|
|
|
|
// row.add(Util.formatMultiLang(vo.getBmfzr(), languageStr));
|
|
|
|
|
// row.add(vo.getCanceled() == 0 ? SystemEnv.getHtmlLabelName(547186, language) : SystemEnv.getHtmlLabelName(547608,user.getLanguage()));
|
|
|
|
|
// rows.add(row);
|
|
|
|
|
// }
|
|
|
|
|
excelSheetData.addAll(rows);
|
|
|
|
|
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|