|
|
|
@ -3,10 +3,14 @@ package com.op.mes.controller;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
|
import com.op.mes.domain.MesDailyReport;
|
|
|
|
|
import com.op.mes.domain.MesProcessReport;
|
|
|
|
|
import com.op.mes.domain.MesReportProduction;
|
|
|
|
|
import com.op.mes.domain.dto.SysFactoryDto;
|
|
|
|
|
import com.op.mes.mapper.MesReportWorkMapper;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -25,7 +29,7 @@ import com.op.common.core.web.controller.BaseController;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.common.core.utils.poi.ExcelUtil;
|
|
|
|
|
import com.op.common.core.web.page.TableDataInfo;
|
|
|
|
|
|
|
|
|
|
import com.op.common.core.utils.poi.ExcelUtilDailyReport;
|
|
|
|
|
/**
|
|
|
|
|
* 报工报表Controller
|
|
|
|
|
*
|
|
|
|
@ -37,7 +41,8 @@ import com.op.common.core.web.page.TableDataInfo;
|
|
|
|
|
public class MesReportWorkController extends BaseController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesReportWorkService mesReportWorkService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesReportWorkMapper mesReportWorkMapper;
|
|
|
|
|
/**
|
|
|
|
|
* 查询报工报表列表
|
|
|
|
|
*/
|
|
|
|
@ -140,7 +145,7 @@ public class MesReportWorkController extends BaseController {
|
|
|
|
|
* 获取产量报表导出
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("mes:production:list")
|
|
|
|
|
@GetMapping("/productionExport")
|
|
|
|
|
@PostMapping("/productionExport")
|
|
|
|
|
public void productionExport(HttpServletResponse response, MesReportProduction mesReportProduction) {
|
|
|
|
|
List<MesReportProduction> list = mesReportWorkService.getProductionList(mesReportProduction);
|
|
|
|
|
ExcelUtil<MesReportProduction> util = new ExcelUtil<MesReportProduction>(MesReportProduction.class);
|
|
|
|
@ -153,10 +158,29 @@ public class MesReportWorkController extends BaseController {
|
|
|
|
|
@RequiresPermissions("mes:dailyReport:list")
|
|
|
|
|
@GetMapping("/getDailyReport")
|
|
|
|
|
public TableDataInfo getDailyReport(MesDailyReport mesDailyReport) {
|
|
|
|
|
|
|
|
|
|
if(!StringUtils.isNotBlank(mesDailyReport.getWorkCenter())){
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
|
List<MesDailyReport> list = mesReportWorkService.getDailyReport(mesDailyReport);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
@RequiresPermissions("mes:dailyReport:list")
|
|
|
|
|
@PostMapping("/getDailyReportExport")
|
|
|
|
|
public void getDailyReportExport(HttpServletResponse response,MesDailyReport mesDailyReport) {
|
|
|
|
|
List<MesDailyReport> list = mesReportWorkService.getDailyReport(mesDailyReport);
|
|
|
|
|
String ymd = DateUtils.parseDateToStr("yyyy-MM-dd",mesDailyReport.getProductDate());
|
|
|
|
|
String titleName = "("+mesReportWorkService.getTitleName(mesDailyReport)+")车间"+ymd+"生产日报表";
|
|
|
|
|
ExcelUtilDailyReport<MesDailyReport> util = new ExcelUtilDailyReport<MesDailyReport>(MesDailyReport.class);
|
|
|
|
|
util.exportExcel(response, list, ymd+"生产日报表",titleName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getWorkcenterList")
|
|
|
|
|
public List<SysFactoryDto> getWorkcenterList(MesDailyReport mesDailyReport) {
|
|
|
|
|
return mesReportWorkService.getWorkcenterList(mesDailyReport);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|