feat(wms): 重构发货报表统计功能
- 修改发货报表返回结构,支持汇总和按类型统计 - 新增WmsDeliveryReportResultVo用于封装报表结果 - 新增WmsDeliveryReportSummaryVo用于汇总统计 - 新增WmsDeliveryReportByTypeVo用于按类型统计 - 调整Mapper层SQL查询逻辑,分离汇总与明细查询 - 更新Controller层接口返回类型 - 优化Service层实现,组装新的报表数据结构
This commit is contained in:
@@ -6,7 +6,7 @@ import com.klp.domain.vo.WmsDeliveryPlanVo;
|
||||
import com.klp.domain.bo.WmsDeliveryPlanBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.domain.vo.WmsDeliveryReportVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportResultVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
@@ -50,7 +50,13 @@ public interface IWmsDeliveryPlanService {
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取发货计划统计信息
|
||||
*/
|
||||
List<WmsDeliveryPlanStatisticsVo> getDeliveryPlanStatistics(Long planId);
|
||||
|
||||
List<WmsDeliveryReportVo> getDeliveryReport(Date startTime, Date endTime);
|
||||
/**
|
||||
* 获取发货报表统计信息(包含汇总和按类型统计)
|
||||
*/
|
||||
WmsDeliveryReportResultVo getDeliveryReport(Date startTime, Date endTime);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.domain.vo.WmsDeliveryPlanStatisticsVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportByTypeVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportResultVo;
|
||||
import com.klp.domain.vo.WmsDeliveryReportSummaryVo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.domain.bo.WmsDeliveryPlanBo;
|
||||
@@ -124,9 +126,19 @@ public class WmsDeliveryPlanServiceImpl implements IWmsDeliveryPlanService {
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 报表统计信息列表
|
||||
* @return 报表统计信息(包含汇总和按类型统计)
|
||||
*/
|
||||
public List<WmsDeliveryReportVo> getDeliveryReport(Date startTime, Date endTime) {
|
||||
return baseMapper.selectDeliveryReport(startTime, endTime);
|
||||
public WmsDeliveryReportResultVo getDeliveryReport(Date startTime, Date endTime) {
|
||||
WmsDeliveryReportResultVo result = new WmsDeliveryReportResultVo();
|
||||
|
||||
// 获取汇总数据
|
||||
WmsDeliveryReportSummaryVo summary = baseMapper.selectDeliveryReportSummary(startTime, endTime);
|
||||
result.setSummary(summary);
|
||||
|
||||
// 获取按钢卷类型分类的数据
|
||||
List<WmsDeliveryReportByTypeVo> details = baseMapper.selectDeliveryReportByType(startTime, endTime);
|
||||
result.setDetails(details);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user