|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.hnac.hzims.operational.duty.controller; |
|
|
|
package com.hnac.hzims.operational.duty.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.util.DateUtils; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
@ -32,7 +31,6 @@ import javax.validation.Valid; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -220,10 +218,21 @@ public class ImsDutyMainController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/exportDuty") |
|
|
|
@GetMapping("/exportDuty") |
|
|
|
@ApiOperation(value = "导出排班计划") |
|
|
|
@ApiOperation(value = "导出排班计划") |
|
|
|
public void exportTemplate(HttpServletResponse response, Integer year, Integer month, Long deptId) throws IOException { |
|
|
|
public void exportTemplate(HttpServletResponse response, String time, Long deptId) throws IOException { |
|
|
|
|
|
|
|
Integer year; |
|
|
|
|
|
|
|
Integer month; |
|
|
|
if (Func.isEmpty(deptId)) { |
|
|
|
if (Func.isEmpty(deptId)) { |
|
|
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
|
|
|
deptId = Long.valueOf(AuthUtil.getDeptId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (Func.isEmpty(time)) { |
|
|
|
|
|
|
|
Date date = new Date(); |
|
|
|
|
|
|
|
year = date.getYear(); |
|
|
|
|
|
|
|
month = date.getMonth()+1; |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
String[] split = time.split("-"); |
|
|
|
|
|
|
|
year=Integer.valueOf(split[0]); |
|
|
|
|
|
|
|
month=Integer.valueOf(split[1]); |
|
|
|
|
|
|
|
} |
|
|
|
List<ImsDutyMainReportExcel> list = imsDutyMainService.getExcelDutyData(year, month, deptId); |
|
|
|
List<ImsDutyMainReportExcel> list = imsDutyMainService.getExcelDutyData(year, month, deptId); |
|
|
|
|
|
|
|
|
|
|
|
String deptName = sysClient.getDeptName(deptId).getData(); |
|
|
|
String deptName = sysClient.getDeptName(deptId).getData(); |
|
|
|