feat: 新增生产日报报表模块及相关接口(TASK-xxx)
实现完整的生产日报业务功能,包含查询汇总、按日列表、工单明细、设备产出明细接口,配套Mapper、实体类和Controller层代码master
parent
2637ce278a
commit
f785fa3cfd
@ -0,0 +1,64 @@
|
||||
package com.aucma.report.controller;
|
||||
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportDeviceVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportOrderVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportQuery;
|
||||
import com.aucma.report.service.IProductionDailyReportService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产日报Controller。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/report/productionDailyReport")
|
||||
public class ProductionDailyReportController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IProductionDailyReportService productionDailyReportService;
|
||||
|
||||
/**
|
||||
* 查询生产日报汇总。
|
||||
*/
|
||||
@GetMapping("/summary")
|
||||
public AjaxResult summary(ProductionDailyReportQuery query) {
|
||||
return success(productionDailyReportService.getSummary(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询按日汇总列表。
|
||||
*/
|
||||
@GetMapping("/dailyList")
|
||||
public AjaxResult dailyList(ProductionDailyReportQuery query) {
|
||||
return success(productionDailyReportService.getDailyList(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询计划工单明细。
|
||||
*/
|
||||
@GetMapping("/orderList")
|
||||
public TableDataInfo orderList(ProductionDailyReportQuery query) {
|
||||
startPage();
|
||||
List<ProductionDailyReportOrderVo> list = productionDailyReportService.getOrderList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备实际产出明细。
|
||||
*/
|
||||
@GetMapping("/deviceList")
|
||||
public TableDataInfo deviceList(ProductionDailyReportQuery query) {
|
||||
startPage();
|
||||
List<ProductionDailyReportDeviceVo> list = productionDailyReportService.getDeviceList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.aucma.report.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产日报设备产出明细。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
public class ProductionDailyReportDeviceVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private BigDecimal actualQty;
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public BigDecimal getActualQty() {
|
||||
return actualQty;
|
||||
}
|
||||
|
||||
public void setActualQty(BigDecimal actualQty) {
|
||||
this.actualQty = actualQty;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.aucma.report.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产日报计划工单明细。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
public class ProductionDailyReportOrderVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String orderCode;
|
||||
private String materialCode;
|
||||
private String materialName;
|
||||
private String workCenterCode;
|
||||
private String productLineName;
|
||||
private BigDecimal planQty;
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getWorkCenterCode() {
|
||||
return workCenterCode;
|
||||
}
|
||||
|
||||
public void setWorkCenterCode(String workCenterCode) {
|
||||
this.workCenterCode = workCenterCode;
|
||||
}
|
||||
|
||||
public String getProductLineName() {
|
||||
return productLineName;
|
||||
}
|
||||
|
||||
public void setProductLineName(String productLineName) {
|
||||
this.productLineName = productLineName;
|
||||
}
|
||||
|
||||
public BigDecimal getPlanQty() {
|
||||
return planQty;
|
||||
}
|
||||
|
||||
public void setPlanQty(BigDecimal planQty) {
|
||||
this.planQty = planQty;
|
||||
}
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.aucma.report.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产日报每日行数据。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
public class ProductionDailyReportRowVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String reportDate;
|
||||
private Long orderCount;
|
||||
private BigDecimal planQty;
|
||||
private BigDecimal actualQty;
|
||||
private BigDecimal goodQty;
|
||||
private BigDecimal defectQty;
|
||||
private BigDecimal completionRate;
|
||||
private BigDecimal goodRate;
|
||||
private Long producedDeviceCount;
|
||||
|
||||
public String getReportDate() {
|
||||
return reportDate;
|
||||
}
|
||||
|
||||
public void setReportDate(String reportDate) {
|
||||
this.reportDate = reportDate;
|
||||
}
|
||||
|
||||
public Long getOrderCount() {
|
||||
return orderCount;
|
||||
}
|
||||
|
||||
public void setOrderCount(Long orderCount) {
|
||||
this.orderCount = orderCount;
|
||||
}
|
||||
|
||||
public BigDecimal getPlanQty() {
|
||||
return planQty;
|
||||
}
|
||||
|
||||
public void setPlanQty(BigDecimal planQty) {
|
||||
this.planQty = planQty;
|
||||
}
|
||||
|
||||
public BigDecimal getActualQty() {
|
||||
return actualQty;
|
||||
}
|
||||
|
||||
public void setActualQty(BigDecimal actualQty) {
|
||||
this.actualQty = actualQty;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodQty() {
|
||||
return goodQty;
|
||||
}
|
||||
|
||||
public void setGoodQty(BigDecimal goodQty) {
|
||||
this.goodQty = goodQty;
|
||||
}
|
||||
|
||||
public BigDecimal getDefectQty() {
|
||||
return defectQty;
|
||||
}
|
||||
|
||||
public void setDefectQty(BigDecimal defectQty) {
|
||||
this.defectQty = defectQty;
|
||||
}
|
||||
|
||||
public BigDecimal getCompletionRate() {
|
||||
return completionRate;
|
||||
}
|
||||
|
||||
public void setCompletionRate(BigDecimal completionRate) {
|
||||
this.completionRate = completionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodRate() {
|
||||
return goodRate;
|
||||
}
|
||||
|
||||
public void setGoodRate(BigDecimal goodRate) {
|
||||
this.goodRate = goodRate;
|
||||
}
|
||||
|
||||
public Long getProducedDeviceCount() {
|
||||
return producedDeviceCount;
|
||||
}
|
||||
|
||||
public void setProducedDeviceCount(Long producedDeviceCount) {
|
||||
this.producedDeviceCount = producedDeviceCount;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.aucma.report.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产日报汇总数据。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
public class ProductionDailyReportSummaryVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
private Long orderCount;
|
||||
private BigDecimal planQty;
|
||||
private BigDecimal actualQty;
|
||||
private BigDecimal goodQty;
|
||||
private BigDecimal defectQty;
|
||||
private BigDecimal completionRate;
|
||||
private BigDecimal goodRate;
|
||||
private Long producedDeviceCount;
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public Long getOrderCount() {
|
||||
return orderCount;
|
||||
}
|
||||
|
||||
public void setOrderCount(Long orderCount) {
|
||||
this.orderCount = orderCount;
|
||||
}
|
||||
|
||||
public BigDecimal getPlanQty() {
|
||||
return planQty;
|
||||
}
|
||||
|
||||
public void setPlanQty(BigDecimal planQty) {
|
||||
this.planQty = planQty;
|
||||
}
|
||||
|
||||
public BigDecimal getActualQty() {
|
||||
return actualQty;
|
||||
}
|
||||
|
||||
public void setActualQty(BigDecimal actualQty) {
|
||||
this.actualQty = actualQty;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodQty() {
|
||||
return goodQty;
|
||||
}
|
||||
|
||||
public void setGoodQty(BigDecimal goodQty) {
|
||||
this.goodQty = goodQty;
|
||||
}
|
||||
|
||||
public BigDecimal getDefectQty() {
|
||||
return defectQty;
|
||||
}
|
||||
|
||||
public void setDefectQty(BigDecimal defectQty) {
|
||||
this.defectQty = defectQty;
|
||||
}
|
||||
|
||||
public BigDecimal getCompletionRate() {
|
||||
return completionRate;
|
||||
}
|
||||
|
||||
public void setCompletionRate(BigDecimal completionRate) {
|
||||
this.completionRate = completionRate;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodRate() {
|
||||
return goodRate;
|
||||
}
|
||||
|
||||
public void setGoodRate(BigDecimal goodRate) {
|
||||
this.goodRate = goodRate;
|
||||
}
|
||||
|
||||
public Long getProducedDeviceCount() {
|
||||
return producedDeviceCount;
|
||||
}
|
||||
|
||||
public void setProducedDeviceCount(Long producedDeviceCount) {
|
||||
this.producedDeviceCount = producedDeviceCount;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.aucma.report.mapper;
|
||||
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportDeviceVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportOrderVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportQuery;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportRowVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportSummaryVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产日报Mapper。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductionDailyReportMapper {
|
||||
|
||||
/**
|
||||
* 查询生产日报汇总。
|
||||
*/
|
||||
ProductionDailyReportSummaryVo selectSummary(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询按日汇总列表。
|
||||
*/
|
||||
List<ProductionDailyReportRowVo> selectDailyList(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询计划工单明细。
|
||||
*/
|
||||
List<ProductionDailyReportOrderVo> selectOrderList(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询设备实际产出明细。
|
||||
*/
|
||||
List<ProductionDailyReportDeviceVo> selectDeviceList(ProductionDailyReportQuery query);
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.aucma.report.service;
|
||||
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportDeviceVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportOrderVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportQuery;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportRowVo;
|
||||
import com.aucma.report.domain.vo.ProductionDailyReportSummaryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产日报Service接口。
|
||||
*
|
||||
* @author Codex
|
||||
*/
|
||||
public interface IProductionDailyReportService {
|
||||
|
||||
/**
|
||||
* 查询生产日报汇总。
|
||||
*/
|
||||
ProductionDailyReportSummaryVo getSummary(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询按日汇总列表。
|
||||
*/
|
||||
List<ProductionDailyReportRowVo> getDailyList(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询计划工单明细。
|
||||
*/
|
||||
List<ProductionDailyReportOrderVo> getOrderList(ProductionDailyReportQuery query);
|
||||
|
||||
/**
|
||||
* 查询设备产出明细。
|
||||
*/
|
||||
List<ProductionDailyReportDeviceVo> getDeviceList(ProductionDailyReportQuery query);
|
||||
}
|
||||
Loading…
Reference in New Issue