|
@@ -2,9 +2,7 @@ package com.fjhx.form.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.fjhx.form.entity.ProductionReportBo;
|
|
|
-import com.fjhx.form.entity.ProductionReportSelectDto;
|
|
|
-import com.fjhx.form.entity.SaleReportBo;
|
|
|
+import com.fjhx.form.entity.*;
|
|
|
import com.fjhx.form.mapper.ReportMapper;
|
|
|
import com.fjhx.form.service.ReportService;
|
|
|
import com.fjhx.item.service.product.ProductInfoService;
|
|
@@ -13,6 +11,7 @@ import com.fjhx.mes.service.report.ReportLossesDetailsService;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import com.ruoyi.system.service.ISysDeptService;
|
|
|
+import com.ruoyi.system.utils.UserUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -110,4 +109,48 @@ public class ReportServiceImpl implements ReportService {
|
|
|
}
|
|
|
return saleReportBoPage;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<WaitShipmentReportStatisticBo> waitShipmentReportStatistic() {
|
|
|
+ List<WaitShipmentReportStatisticBo> records = reportMapper.waitShipmentReportStatistic();
|
|
|
+
|
|
|
+ //赋值业务员
|
|
|
+ UserUtil.assignmentNickName(records, WaitShipmentReportStatisticBo::getSalesmanId, WaitShipmentReportStatisticBo::setSalesmanName);
|
|
|
+
|
|
|
+ return records;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 已完工未出货报表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Page<WaitShipmentReportBo> waitShipmentReport(ProductionReportSelectDto dto) {
|
|
|
+ IWrapper<Object> wrapper = IWrapper.getWrapper();
|
|
|
+ Page<WaitShipmentReportBo> waitShipmentReportBoPage = reportMapper.waitShipmentReport(dto.getPage(), wrapper);
|
|
|
+ if (ObjectUtil.isEmpty(waitShipmentReportBoPage)) {
|
|
|
+ return waitShipmentReportBoPage;
|
|
|
+ }
|
|
|
+ List<WaitShipmentReportBo> records = waitShipmentReportBoPage.getRecords();
|
|
|
+ for (WaitShipmentReportBo record : records) {
|
|
|
+ //超期修正
|
|
|
+ if (ObjectUtil.isEmpty(record.getOverdueDay()) || record.getOverdueDay() < 0) {
|
|
|
+ record.setOverdueDay(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //赋值业务员
|
|
|
+ UserUtil.assignmentNickName(records, WaitShipmentReportBo::getSalesmanId, WaitShipmentReportBo::setSalesmanName);
|
|
|
+
|
|
|
+ //赋值产品信息
|
|
|
+ productInfoService.attributeAssign(records, WaitShipmentReportBo::getProductId, (item, productInfo) -> {
|
|
|
+ item.setProductCode(productInfo.getCustomCode());
|
|
|
+ item.setProductName(productInfo.getName());
|
|
|
+ item.setProductLength(productInfo.getLength());
|
|
|
+ item.setProductWidth(productInfo.getWidth());
|
|
|
+ item.setProductHeight(productInfo.getHeight());
|
|
|
+ item.setProductColor(productInfo.getColor());
|
|
|
+ });
|
|
|
+
|
|
|
+ return waitShipmentReportBoPage;
|
|
|
+ }
|
|
|
}
|