feat(wms): 新增收货报表统计功能
- 在 IWmsDeliveryPlanService 接口中新增 getReceivingReport 方法 - 在 WmsDeliveryPlanController 控制器中新增 /receivingReport 接口 - 在 WmsDeliveryPlanMapper 中新增收货报表相关查询方法 - 在 WmsDeliveryPlanMapper.xml 中新增收货报表的 SQL 查询语句 - 新增 WmsReceivingReportByTypeVo、WmsReceivingReportResultVo 和 WmsReceivingReportSummaryVo 三个 VO 类用于收货报表数据传输 - 完善了送货报表 SQL 查询逻辑,增加与 wms_delivery_plan 表的关联及 plan_type 过滤条件
This commit is contained in:
@@ -127,6 +127,17 @@ public class WmsDeliveryPlanController extends BaseController {
|
||||
return R.ok(report);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收货报表统计信息(planType=1,对应钢卷待操作actionType=401)
|
||||
*/
|
||||
@GetMapping("/receivingReport")
|
||||
public R<WmsReceivingReportResultVo> getReceivingReport(
|
||||
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime,
|
||||
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) {
|
||||
WmsReceivingReportResultVo report = iWmsDeliveryPlanService.getReceivingReport(startTime, endTime);
|
||||
return R.ok(report);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据计划ID获取可选钢卷列表:计划绑定钢卷 - 明细已绑定钢卷
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 收货报表按类型统计VO
|
||||
*/
|
||||
@Data
|
||||
public class WmsReceivingReportByTypeVo {
|
||||
/**
|
||||
* 类型(品名)
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 待操作记录数量
|
||||
*/
|
||||
private Integer taskCount = 0;
|
||||
|
||||
/**
|
||||
* 钢卷数量
|
||||
*/
|
||||
private Integer coilCount = 0;
|
||||
|
||||
/**
|
||||
* 总重量(吨)
|
||||
*/
|
||||
private BigDecimal totalWeight = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均待操作数量
|
||||
*/
|
||||
private BigDecimal dailyTaskCount = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均钢卷数量
|
||||
*/
|
||||
private BigDecimal dailyCoilCount = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均重量(吨)
|
||||
*/
|
||||
private BigDecimal dailyWeight = BigDecimal.ZERO;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 收货报表结果VO
|
||||
*/
|
||||
@Data
|
||||
public class WmsReceivingReportResultVo {
|
||||
/**
|
||||
* 汇总统计
|
||||
*/
|
||||
private WmsReceivingReportSummaryVo summary;
|
||||
|
||||
/**
|
||||
* 按类型统计明细
|
||||
*/
|
||||
private List<WmsReceivingReportByTypeVo> details;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.klp.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 收货报表汇总统计VO
|
||||
*/
|
||||
@Data
|
||||
public class WmsReceivingReportSummaryVo {
|
||||
/**
|
||||
* 待操作记录数量
|
||||
*/
|
||||
private Integer taskCount = 0;
|
||||
|
||||
/**
|
||||
* 钢卷数量
|
||||
*/
|
||||
private Integer coilCount = 0;
|
||||
|
||||
/**
|
||||
* 总重量(吨)
|
||||
*/
|
||||
private BigDecimal totalWeight = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均待操作数量
|
||||
*/
|
||||
private BigDecimal dailyTaskCount = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均钢卷数量
|
||||
*/
|
||||
private BigDecimal dailyCoilCount = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 日均重量(吨)
|
||||
*/
|
||||
private BigDecimal dailyWeight = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 统计开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 统计结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import com.klp.domain.vo.WmsDeliveryPlanVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import com.klp.domain.vo.WmsDeliveryReportByTypeVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportSummaryVo;
|
||||
import com.klp.domain.vo.WmsReceivingReportByTypeVo;
|
||||
import com.klp.domain.vo.WmsReceivingReportSummaryVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -24,4 +26,10 @@ public interface WmsDeliveryPlanMapper extends BaseMapperPlus<WmsDeliveryPlanMap
|
||||
List<WmsDeliveryReportByTypeVo> selectDeliveryReportByType(@Param("startTime")Date startTime, @Param("endTime")Date endTime);
|
||||
|
||||
WmsDeliveryReportSummaryVo selectDeliveryReportSummary(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
List<WmsReceivingReportByTypeVo> selectReceivingReportByType(@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime);
|
||||
|
||||
WmsReceivingReportSummaryVo selectReceivingReportSummary(@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.domain.vo.WmsDeliveryReportResultVo;
|
||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||
import com.klp.domain.vo.WmsReceivingReportResultVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
@@ -63,4 +64,9 @@ public interface IWmsDeliveryPlanService {
|
||||
|
||||
List<WmsMaterialCoilVo> getSelectableCoilsByPlanId(Long planId);
|
||||
|
||||
/**
|
||||
* 获取收货报表统计信息(包含汇总和按类型统计)
|
||||
*/
|
||||
WmsReceivingReportResultVo getReceivingReport(Date startTime, Date endTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -188,6 +188,19 @@ public class WmsDeliveryPlanServiceImpl implements IWmsDeliveryPlanService {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取收货报表统计信息
|
||||
*/
|
||||
@Override
|
||||
public WmsReceivingReportResultVo getReceivingReport(Date startTime, Date endTime) {
|
||||
WmsReceivingReportResultVo result = new WmsReceivingReportResultVo();
|
||||
WmsReceivingReportSummaryVo summary = baseMapper.selectReceivingReportSummary(startTime, endTime);
|
||||
result.setSummary(summary);
|
||||
List<WmsReceivingReportByTypeVo> details = baseMapper.selectReceivingReportByType(startTime, endTime);
|
||||
result.setDetails(details);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WmsMaterialCoilVo> getSelectableCoilsByPlanId(Long planId) {
|
||||
if (planId == null) {
|
||||
|
||||
Reference in New Issue
Block a user