Commit d429aca0 authored by 温志超's avatar 温志超

更新报表

parent 5c639228
...@@ -3,6 +3,7 @@ package com.ximai.mes.report.controller; ...@@ -3,6 +3,7 @@ package com.ximai.mes.report.controller;
import com.ximai.common.annotation.Log; import com.ximai.common.annotation.Log;
import com.ximai.common.core.domain.AjaxResult; import com.ximai.common.core.domain.AjaxResult;
import com.ximai.common.enums.BusinessType; import com.ximai.common.enums.BusinessType;
import com.ximai.mes.report.request.DailyProductionReportRequest;
import com.ximai.mes.report.request.WeeklyProductionReportRequest; import com.ximai.mes.report.request.WeeklyProductionReportRequest;
import com.ximai.mes.report.service.MonthlyProductionReportService; import com.ximai.mes.report.service.MonthlyProductionReportService;
import com.ximai.mes.report.service.WeeklyProductionReportService; import com.ximai.mes.report.service.WeeklyProductionReportService;
...@@ -23,6 +24,19 @@ public class WeeklyProductionReportController { ...@@ -23,6 +24,19 @@ public class WeeklyProductionReportController {
@Autowired @Autowired
WeeklyProductionReportService weeklyProductionReportService; WeeklyProductionReportService weeklyProductionReportService;
@ApiOperation("日产能对比统计:获取周表头")
@PreAuthorize("@ss.hasPermi('mes:pro:dailyProductionReport:get')")
@Log(title = "日产能对比统计:获取周表头", businessType = BusinessType.QUERY)
@GetMapping("/getDatas")
public AjaxResult<List> getDatas(WeeklyProductionReportRequest weeklyProductionReportRequest) {
List data = weeklyProductionReportService.getDatas(weeklyProductionReportRequest);
return AjaxResult.success(data);
}
@ApiOperation("周产能对比统计:统计方式工序") @ApiOperation("周产能对比统计:统计方式工序")
@PreAuthorize("@ss.hasPermi('mes:pro:dailyProductionReport:get')") @PreAuthorize("@ss.hasPermi('mes:pro:dailyProductionReport:get')")
@Log(title = "周产能对比统计:统计方式工序", businessType = BusinessType.QUERY) @Log(title = "周产能对比统计:统计方式工序", businessType = BusinessType.QUERY)
......
...@@ -14,4 +14,6 @@ public interface WeeklyProductionReportService { ...@@ -14,4 +14,6 @@ public interface WeeklyProductionReportService {
List getListByWorkunit(WeeklyProductionReportRequest weeklyProductionReportRequest); List getListByWorkunit(WeeklyProductionReportRequest weeklyProductionReportRequest);
List getListByUser(WeeklyProductionReportRequest weeklyProductionReportRequest); List getListByUser(WeeklyProductionReportRequest weeklyProductionReportRequest);
List getDatas(WeeklyProductionReportRequest weeklyProductionReportRequest);
} }
...@@ -78,6 +78,14 @@ public class WeeklyProductionReportServiceImp implements WeeklyProductionReportS ...@@ -78,6 +78,14 @@ public class WeeklyProductionReportServiceImp implements WeeklyProductionReportS
return returnList; return returnList;
} }
@Override
public List getDatas(WeeklyProductionReportRequest weeklyProductionReportRequest) {
ExceptionUtil.checkTrueThrowException(weeklyProductionReportRequest.getDateWeekly() == null,
"请传入年月份");
List<String> dateList = getWeeks(new Integer(weeklyProductionReportRequest.getDateWeekly().split("-")[0]), new Integer(weeklyProductionReportRequest.getDateWeekly().split("-")[1]));
return dateList;
}
public static List<String> getWeeksInMonth(String dateWeekly) { public static List<String> getWeeksInMonth(String dateWeekly) {
dateWeekly = dateWeekly + "-01"; dateWeekly = dateWeekly + "-01";
......
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