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