Commit 50cc60f1 authored by 李腾威's avatar 李腾威

值班模板模板导出接口传参修改

parent 8e1ad251
...@@ -9,10 +9,12 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl; ...@@ -9,10 +9,12 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RequestPart;
...@@ -168,9 +170,12 @@ public class ExcelController extends BaseController { ...@@ -168,9 +170,12 @@ public class ExcelController extends BaseController {
@ApiOperation(value = "导出值班模板", notes = "导出值班模板") @ApiOperation(value = "导出值班模板", notes = "导出值班模板")
@PostMapping (value = "/duty_template") @PostMapping (value = "/duty_template")
public void dutyCarTemplate(HttpServletResponse response, @RequestParam("beginDate") String beginDate, public void dutyCarTemplate(HttpServletResponse response, @RequestParam("beginDate") String beginDate,
@RequestParam("endDate") String endDate, ExcelDto excelDto, @RequestParam("ids") String ids) { @RequestParam("endDate") String endDate, ExcelDto excelDto, @RequestBody String ids) {
try { try {
excelService.dutyTemplateExport(response, beginDate, endDate, excelDto, ids); if(org.apache.commons.lang3.StringUtils.isNotEmpty(ids)) {
ids = ids.substring(1,ids.length()-1);
excelService.dutyTemplateExport(response, beginDate, endDate, excelDto, ids);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException("系统异常!"); throw new RuntimeException("系统异常!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment