Browse Source

排班计划导出,入参格式修改

zhongwei
tyty 1 year ago
parent
commit
2d032a5d39
  1. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyMainController.java

@ -1,7 +1,6 @@
package com.hnac.hzims.operational.duty.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.util.DateUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
@ -32,7 +31,6 @@ import javax.validation.Valid;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -220,10 +218,21 @@ public class ImsDutyMainController extends BladeController {
@GetMapping("/exportDuty")
@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)) {
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);
String deptName = sysClient.getDeptName(deptId).getData();

Loading…
Cancel
Save