|
@@ -311,14 +311,15 @@ public class UserController {
|
|
|
//设置列宽 setColumnWidth的第二个参数要乘以256 这个参数的单位是1/256个字符宽度
|
|
|
sheet.setColumnWidth(0, 5 * 256);
|
|
|
sheet.setColumnWidth(1, 10 * 256);
|
|
|
- sheet.setColumnWidth(2, 20 * 256);
|
|
|
+ sheet.setColumnWidth(2, 10 * 256);
|
|
|
sheet.setColumnWidth(3, 20 * 256);
|
|
|
sheet.setColumnWidth(4, 20 * 256);
|
|
|
- sheet.setColumnWidth(5, 10 * 256);
|
|
|
-
|
|
|
+ sheet.setColumnWidth(5, 20 * 256);
|
|
|
sheet.setColumnWidth(6, 10 * 256);
|
|
|
+
|
|
|
sheet.setColumnWidth(7, 10 * 256);
|
|
|
sheet.setColumnWidth(8, 10 * 256);
|
|
|
+ sheet.setColumnWidth(9, 10 * 256);
|
|
|
//设置为居中加粗
|
|
|
HSSFCellStyle headStyle = workbook.createCellStyle();
|
|
|
HSSFFont font = workbook.createFont();
|
|
@@ -335,20 +336,24 @@ public class UserController {
|
|
|
headCell.setCellValue(MessageUtils.message("entry.name"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
headCell = headRow.createCell(2);
|
|
|
+ //headCell.setCellValue("姓名");
|
|
|
+ headCell.setCellValue(MessageUtils.message("entry.No"));
|
|
|
+ headCell.setCellStyle(headStyle);
|
|
|
+ headCell = headRow.createCell(3);
|
|
|
//headCell.setCellValue("角色");
|
|
|
headCell.setCellValue(MessageUtils.message("role.role"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
- headCell = headRow.createCell(3);
|
|
|
+ headCell = headRow.createCell(4);
|
|
|
//headCell.setCellValue("手机号");
|
|
|
headCell.setCellValue(MessageUtils.message("excel.phoneNumber"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
- headCell = headRow.createCell(4);
|
|
|
+ headCell = headRow.createCell(5);
|
|
|
//headCell.setCellValue("部门");
|
|
|
headCell.setCellValue(MessageUtils.message("excel.department"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
int auditIndex = -1;
|
|
|
- if(timeType.getReportAuditType() == 5 || timeType.getReportAuditType() == 6){
|
|
|
- headCell = headRow.createCell(5);
|
|
|
+ if(timeType.getReportAuditType() == 6 || timeType.getReportAuditType() == 7){
|
|
|
+ headCell = headRow.createCell(6);
|
|
|
headCell.setCellValue("直属审核人");
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
auditIndex=0;
|
|
@@ -356,27 +361,27 @@ public class UserController {
|
|
|
|
|
|
int minusIndex = -2;
|
|
|
if (canViewCost) {
|
|
|
- headCell = headRow.createCell(6+auditIndex);
|
|
|
+ headCell = headRow.createCell(7+auditIndex);
|
|
|
//headCell.setCellValue("月薪");
|
|
|
headCell.setCellValue(MessageUtils.message("excel.MonSalary"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
- headCell = headRow.createCell(7+auditIndex);
|
|
|
+ headCell = headRow.createCell(8+auditIndex);
|
|
|
//headCell.setCellValue("时薪");
|
|
|
headCell.setCellValue(MessageUtils.message("excel.hourlyWage"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
minusIndex = 0;
|
|
|
}
|
|
|
|
|
|
- headCell = headRow.createCell(8+minusIndex+auditIndex);
|
|
|
+ headCell = headRow.createCell(9+minusIndex+auditIndex);
|
|
|
//headCell.setCellValue("证书");
|
|
|
headCell.setCellValue(MessageUtils.message("excel.certificate"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
for (int i = 0; i < userCustomList.size(); i++) {
|
|
|
- headCell = headRow.createCell(minusIndex+9+i+auditIndex);
|
|
|
+ headCell = headRow.createCell(minusIndex+10+i+auditIndex);
|
|
|
headCell.setCellValue(userCustomList.get(i).getName());
|
|
|
headCell.setCellStyle(headStyle);
|
|
|
}
|
|
|
- headCell = headRow.createCell(minusIndex+9+userCustomList.size()+auditIndex);
|
|
|
+ headCell = headRow.createCell(minusIndex+10+userCustomList.size()+auditIndex);
|
|
|
//headCell.setCellValue("状态");
|
|
|
headCell.setCellValue(MessageUtils.message("leave.status"));
|
|
|
headCell.setCellStyle(headStyle);
|
|
@@ -415,45 +420,46 @@ public class UserController {
|
|
|
}else {
|
|
|
row.createCell(1).setCellValue(item.getName());
|
|
|
}
|
|
|
- row.createCell(2).setCellValue(item.getRoleName());
|
|
|
- row.createCell(3).setCellValue(item.getPhone());
|
|
|
+ row.createCell(2).setCellValue(item.getJobNumber());
|
|
|
+ row.createCell(3).setCellValue(item.getRoleName());
|
|
|
+ row.createCell(4).setCellValue(item.getPhone());
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
- row.createCell(4).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?" ":item.getCorpwxDeptid())+"$");
|
|
|
+ row.createCell(5).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?" ":item.getCorpwxDeptid())+"$");
|
|
|
}else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
if (item.getDepartmentId() != 0) {
|
|
|
Optional<Department> first = deptList.stream().filter(d -> d.getDepartmentId().equals(item.getDepartmentId())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
Department department =first.get();
|
|
|
- row.createCell(4).setCellValue("$departmentName="+(department.getDdDeptid()==null?" ":department.getDdDeptid())+"$");
|
|
|
+ row.createCell(5).setCellValue("$departmentName="+(department.getDdDeptid()==null?" ":department.getDdDeptid())+"$");
|
|
|
}else {
|
|
|
- row.createCell(4).setCellValue(item.getDepartmentName());
|
|
|
+ row.createCell(5).setCellValue(item.getDepartmentName());
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
- row.createCell(4).setCellValue(item.getDepartmentName());
|
|
|
+ row.createCell(5).setCellValue(item.getDepartmentName());
|
|
|
}
|
|
|
if(timeType.getReportAuditType()==5||timeType.getReportAuditType()==6){
|
|
|
if(item.getSuperiorId()!=null){
|
|
|
Optional<User> first = userList.stream().filter(u ->u.getId().equals(item.getSuperiorId())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
|
|
|
- row.createCell(5).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?" ":first.get().getCorpwxUserid())+"$");
|
|
|
+ row.createCell(6).setCellValue("$userName="+(first.get().getCorpwxUserid()==null?" ":first.get().getCorpwxUserid())+"$");
|
|
|
}else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
- row.createCell(5).setCellValue("$userName="+(first.get().getDingdingUserid()==null?" ":first.get().getDingdingUserid())+"$");
|
|
|
+ row.createCell(6).setCellValue("$userName="+(first.get().getDingdingUserid()==null?" ":first.get().getDingdingUserid())+"$");
|
|
|
}else {
|
|
|
- row.createCell(5).setCellValue(first.get().getName());
|
|
|
+ row.createCell(6).setCellValue(first.get().getName());
|
|
|
}
|
|
|
}else {
|
|
|
- row.createCell(5).setCellValue("");
|
|
|
+ row.createCell(6).setCellValue("");
|
|
|
}
|
|
|
}else {
|
|
|
- row.createCell(5).setCellValue("");
|
|
|
+ row.createCell(6).setCellValue("");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (canViewCost) {
|
|
|
- row.createCell(6+auditIndex).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
|
|
|
- row.createCell(7+auditIndex).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
|
|
|
+ row.createCell(7+auditIndex).setCellValue(item.getMonthCost()==null? 0 : item.getMonthCost().intValue());
|
|
|
+ row.createCell(8+auditIndex).setCellValue(item.getCost() == null?0.0 : item.getCost().doubleValue());
|
|
|
}
|
|
|
List<UserCert> certList = userCertList.stream().distinct().filter(uc -> uc.getUserId().equals(item.getId())).collect(Collectors.toList());
|
|
|
if(certList.size()>0){
|
|
@@ -465,9 +471,9 @@ public class UserController {
|
|
|
s+=certList.get(i).getCertName()+" "+certList.get(i).getCertDate();
|
|
|
}
|
|
|
}
|
|
|
- row.createCell(8+minusIndex+auditIndex).setCellValue(s);
|
|
|
+ row.createCell(9+minusIndex+auditIndex).setCellValue(s);
|
|
|
}else {
|
|
|
- row.createCell(8+minusIndex+auditIndex).setCellValue("");
|
|
|
+ row.createCell(9+minusIndex+auditIndex).setCellValue("");
|
|
|
}
|
|
|
for (int i = 0; i < userCustomList.size(); i++) {
|
|
|
String value="";
|
|
@@ -483,9 +489,9 @@ public class UserController {
|
|
|
case 4:value=item.getPlate5()==null?"":item.getPlate5();
|
|
|
break;
|
|
|
}
|
|
|
- row.createCell(9+i+minusIndex+auditIndex).setCellValue(value);
|
|
|
+ row.createCell(10+i+minusIndex+auditIndex).setCellValue(value);
|
|
|
}
|
|
|
- row.createCell(9+userCustomList.size()+minusIndex+auditIndex).setCellValue(item.getIsActive()==1?MessageUtils.message("excel.normal"):MessageUtils.message("access.deactivated"));
|
|
|
+ row.createCell(10+userCustomList.size()+minusIndex+auditIndex).setCellValue(item.getIsActive()==1?MessageUtils.message("excel.normal"):MessageUtils.message("access.deactivated"));
|
|
|
rowNum++;
|
|
|
}
|
|
|
//生成Excel文件
|