|
|
@ -57,15 +57,15 @@ public class MesReportWorkController extends BaseController {
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(MesReportWork mesReportWork) {
|
|
|
|
public TableDataInfo list(MesReportWork mesReportWork) {
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
//默认时间范围T 00:00:00~T+1 00:00:00
|
|
|
|
// //默认时间范围T 00:00:00~T+1 00:00:00
|
|
|
|
if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
|
|
|
|
// if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
|
|
|
|
mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
|
|
|
|
// mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
|
|
|
|
LocalDate date = LocalDate.now();
|
|
|
|
// LocalDate date = LocalDate.now();
|
|
|
|
LocalDate dateEnd = date.plusDays(1);
|
|
|
|
// LocalDate dateEnd = date.plusDays(1);
|
|
|
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
|
|
|
|
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
|
|
|
|
mesReportWork.setCreateTimeEnd(dateEndStr);//end
|
|
|
|
// mesReportWork.setCreateTimeEnd(dateEndStr);//end
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
|
|
|
|
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -77,15 +77,15 @@ public class MesReportWorkController extends BaseController {
|
|
|
|
//@Log(title = "报工报表", businessType = BusinessType.EXPORT)
|
|
|
|
//@Log(title = "报工报表", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, MesReportWork mesReportWork) {
|
|
|
|
public void export(HttpServletResponse response, MesReportWork mesReportWork) {
|
|
|
|
//默认时间范围T 00:00:00~T+1 00:00:00
|
|
|
|
// //默认时间范围T 00:00:00~T+1 00:00:00
|
|
|
|
if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
|
|
|
|
// if(StringUtils.isEmpty(mesReportWork.getCreateTimeStart())){
|
|
|
|
mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
|
|
|
|
// mesReportWork.setCreateTimeStart(DateUtils.getDate()+" 00:00:00");//start
|
|
|
|
LocalDate date = LocalDate.now();
|
|
|
|
// LocalDate date = LocalDate.now();
|
|
|
|
LocalDate dateEnd = date.plusDays(1);
|
|
|
|
// LocalDate dateEnd = date.plusDays(1);
|
|
|
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
|
|
|
|
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
|
|
|
|
mesReportWork.setCreateTimeEnd(dateEndStr);//end
|
|
|
|
// mesReportWork.setCreateTimeEnd(dateEndStr);//end
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
|
|
|
|
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
|
|
|
|
ExcelUtil<MesReportWork> util = new ExcelUtil<MesReportWork>(MesReportWork.class);
|
|
|
|
ExcelUtil<MesReportWork> util = new ExcelUtil<MesReportWork>(MesReportWork.class);
|
|
|
|
util.exportExcel(response, list, "报工报表数据");
|
|
|
|
util.exportExcel(response, list, "报工报表数据");
|
|
|
|