This commit is contained in:
parent
0adc753d86
commit
1485618c2f
|
|
@ -107,7 +107,7 @@ public class RequestReportController extends BaseController {
|
|||
List<WorkReportBean> list = service.getWorkReportList(bean);
|
||||
if (list.size()>0){
|
||||
Sheet departmentSheet1 = exporter.createSheet(s);
|
||||
List<String> departmentHeaders1 = Arrays.asList("序号", "姓名", "职务", "类型", "外出时间", "拟返回时间", "地点", "事由", "是否请示领导同意", "代理主持工作人员", "备注");
|
||||
List<String> departmentHeaders1 = Arrays.asList("序号", "姓名", "职务", "类型", "外出时间", "拟返回时间", "地点", "事由", "是否请示领导同意", "代理主持工作人员", "备注","审批状态");
|
||||
exporter.addHeaderRow(departmentSheet1, departmentHeaders1);
|
||||
List<Map<String, Object>> departmentData1 = new ArrayList<>();
|
||||
for (int i = 0; i < list.size(); i++){
|
||||
|
|
@ -123,6 +123,15 @@ public class RequestReportController extends BaseController {
|
|||
map.put("是否请示领导同意",list.get(i).getIsAgree());
|
||||
map.put("代理主持工作人员",list.get(i).getHostUserId());
|
||||
map.put("备注",list.get(i).getRemark());
|
||||
if (StringHelper.isNotEmpty(list.get(i).getExamineStatus())){
|
||||
if ("1".equals(list.get(i).getExamineStatus())){
|
||||
map.put("审批状态","已通过");
|
||||
} else if ("0".equals(list.get(i).getExamineStatus())){
|
||||
map.put("审批状态","待审核");
|
||||
}
|
||||
} else {
|
||||
map.put("审批状态","");
|
||||
}
|
||||
departmentData1.add(map);
|
||||
}
|
||||
exporter.addDataRows(departmentSheet1, departmentData1,departmentHeaders1);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.system.holiday.controller;
|
||||
|
||||
import com.bonus.common.core.utils.StringHelper;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.utils.poi.MultiSheetExcelExporter;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -165,7 +166,7 @@ public class WorkReportController extends BaseController {
|
|||
|
||||
// 创建第二个sheet:部门信息
|
||||
Sheet departmentSheet = exporter.createSheet("轮休人员");
|
||||
List<String> departmentHeaders = Arrays.asList("序号", "姓名", "职务", "所属部门", "申请时间", "开始时间", "结束时间", "时长(天)");
|
||||
List<String> departmentHeaders = Arrays.asList("序号", "姓名", "职务", "所属部门", "申请时间", "开始时间", "结束时间", "时长(天)","审批状态");
|
||||
exporter.addHeaderRow(departmentSheet, departmentHeaders);
|
||||
List<Map<String, Object>> departmentData = new ArrayList<>();
|
||||
for (int i = 0; i < listLeave.size(); i++) {
|
||||
|
|
@ -178,13 +179,22 @@ public class WorkReportController extends BaseController {
|
|||
map.put("开始时间",listLeave.get(i).getStartDate());
|
||||
map.put("结束时间",listLeave.get(i).getEndDate());
|
||||
map.put("时长(天)",listLeave.get(i).getLeaveDuration());
|
||||
if (StringHelper.isNotEmpty(listLeave.get(i).getExamineStatus())){
|
||||
if ("1".equals(listLeave.get(i).getExamineStatus())){
|
||||
map.put("审批状态","已通过");
|
||||
} else if ("0".equals(listLeave.get(i).getExamineStatus())){
|
||||
map.put("审批状态","待审核");
|
||||
}
|
||||
}else {
|
||||
map.put("审批状态","");
|
||||
}
|
||||
departmentData.add(map);
|
||||
}
|
||||
exporter.addDataRows(departmentSheet, departmentData, departmentHeaders);
|
||||
|
||||
// 创建第3个sheet:部门信息
|
||||
Sheet departmentSheet3 = exporter.createSheet("临时外出人员");
|
||||
List<String> departmentHeaders3 = Arrays.asList("序号", "姓名", "职务", "所属部门", "申请时间", "开始时间", "结束时间", "时长(天)");
|
||||
List<String> departmentHeaders3 = Arrays.asList("序号", "姓名", "职务", "所属部门", "申请时间", "开始时间", "结束时间", "时长(天)","审批状态");
|
||||
exporter.addHeaderRow(departmentSheet3, departmentHeaders3);
|
||||
List<Map<String, Object>> departmentData3 = new ArrayList<>();
|
||||
for (int i = 0; i < listOut.size(); i++) {
|
||||
|
|
@ -197,6 +207,15 @@ public class WorkReportController extends BaseController {
|
|||
map.put("开始时间",listOut.get(i).getStartDate());
|
||||
map.put("结束时间",listOut.get(i).getEndDate());
|
||||
map.put("时长(天)",listOut.get(i).getLeaveDuration());
|
||||
if (StringHelper.isNotEmpty(listOut.get(i).getExamineStatus())){
|
||||
if ("1".equals(listOut.get(i).getExamineStatus())){
|
||||
map.put("审批状态","已通过");
|
||||
} else if ("0".equals(listOut.get(i).getExamineStatus())){
|
||||
map.put("审批状态","待审核");
|
||||
}
|
||||
}else {
|
||||
map.put("审批状态","");
|
||||
}
|
||||
departmentData3.add(map);
|
||||
}
|
||||
exporter.addDataRows(departmentSheet3, departmentData3,departmentHeaders3);
|
||||
|
|
|
|||
|
|
@ -176,6 +176,9 @@
|
|||
<if test="userName!=null and userName!=''">
|
||||
and la.user_name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="examineStatus!=null and examineStatus!=''">
|
||||
and la.examine_status = #{examineStatus}
|
||||
</if>
|
||||
) a
|
||||
where 1=1
|
||||
<if test="leaveTypes!=null and leaveTypes!=''">
|
||||
|
|
|
|||
|
|
@ -218,6 +218,9 @@
|
|||
</if>
|
||||
<if test="userName!=null and userName!=''">
|
||||
and la.user_name like concat('%',#{userName},'%')
|
||||
</if>
|
||||
<if test="examineStatus!=null and examineStatus!=''">
|
||||
and la.examine_status = #{examineStatus}
|
||||
</if>
|
||||
AND la.org_id = #{orgId}
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue