Browse Source

[fix]

品质管理 品质单
去除品质单service方法中有关字段;
dev
王晓迪 3 days ago
parent
commit
539ca9d539
  1. 44
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

44
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

@ -11,6 +11,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.erp.domain.ErpDevelopModifyorder;
import com.ruoyi.erp.mapper.ErpDevelopModifyorderMapper;
import com.ruoyi.quality.domain.*;
import com.ruoyi.quality.domain.VO.QualityOrderReportVO;
import com.ruoyi.quality.mapper.*;
import com.ruoyi.quality.service.IQualityOrderReportService;
import com.ruoyi.warehouse.domain.WarehouseStorageOrder;
@ -167,8 +168,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
Integer qualityUnqualifiedNumSum = 0;
// 检查thisArrivedNum是否含有null值
boolean hasThisArrivedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getThisArrivedNum() == null);
// 检查qualityQualifiedNum是否含有null值
boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream()
@ -178,9 +177,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityUnqualifiedNum() == null);
if (hasThisArrivedNumNull) {
throw new BusinessException("存在本次到货数为空,请检查!");
}
if (hasQualityQualifiedNumNull) {
throw new BusinessException("存在品质合格数为空,请检查!");
}
@ -188,9 +184,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
throw new BusinessException("存在品质不合格数为空,请检查!");
}
// 计算各个字段的总和
thisArrivedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getThisArrivedNum)
.sum();
qualityQualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityQualifiedNum)
@ -410,7 +404,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
storageOrderDetail.setMaterialProcessMethod(detail.getMaterialProcessMethod());
storageOrderDetail.setMaterialUnit(detail.getMaterialUnit());
storageOrderDetail.setMakeTotal(detail.getMakeTotal());
storageOrderDetail.setActualArriveNum(detail.getActualArriveNum());
storageOrderDetail.setActualArriveNum(detail.getQualityQualifiedNum());
storageOrderDetail.setQualityQualifiedNum(detail.getQualityQualifiedNum());
storageOrderDetail.setQualityHasQualifiedNum(detail.getQualityHasqualifiedNum());
storageOrderDetail.setRefundsExchangesNum(detail.getQualityUnqualifiedNum());
@ -616,8 +610,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
Integer qualityUnqualifiedNumSum = 0;
// 检查thisArrivedNum是否含有null值
boolean hasThisArrivedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getThisArrivedNum() == null);
// 检查qualityQualifiedNum是否含有null值
boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream()
@ -627,9 +620,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityUnqualifiedNum() == null);
if (hasThisArrivedNumNull) {
throw new BusinessException("存在本次到货数为空,请检查!");
}
if (hasQualityQualifiedNumNull) {
throw new BusinessException("存在品质已合格数为空,请检查!");
}
@ -637,9 +628,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
throw new BusinessException("存在品质不合格数为空,请检查!");
}
// 计算各个字段的总和
thisArrivedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getThisArrivedNum)
.sum();
qualityQualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityQualifiedNum)
@ -730,8 +718,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
Integer qualityUnqualifiedNumSum = 0;
// 检查thisArrivedNum是否含有null值
boolean hasThisArrivedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getThisArrivedNum() == null);
// 检查qualityQualifiedNum是否含有null值
boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream()
@ -741,9 +727,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityUnqualifiedNum() == null);
if (hasThisArrivedNumNull) {
throw new BusinessException("存在本次到货数为空,请检查!");
}
if (hasQualityQualifiedNumNull) {
throw new BusinessException("存在品质已合格数为空,请检查!");
}
@ -751,9 +734,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
throw new BusinessException("存在品质不合格数为空,请检查!");
}
// 计算各个字段的总和
thisArrivedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getThisArrivedNum)
.sum();
qualityQualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityQualifiedNum)
@ -880,8 +860,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
Integer qualityUnqualifiedNumSum = 0;
// 检查thisArrivedNum是否含有null值
boolean hasThisArrivedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getThisArrivedNum() == null);
// 检查qualityQualifiedNum是否含有null值
boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream()
@ -891,9 +869,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream()
.anyMatch(item -> item.getQualityUnqualifiedNum() == null);
if (hasThisArrivedNumNull) {
throw new BusinessException("存在本次到货数为空,请检查!");
}
if (hasQualityQualifiedNumNull) {
throw new BusinessException("存在品质已合格数为空,请检查!");
}
@ -901,9 +876,6 @@ public class QualityOrderServiceImpl implements IQualityOrderService
throw new BusinessException("存在品质不合格数为空,请检查!");
}
// 计算各个字段的总和
thisArrivedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getThisArrivedNum)
.sum();
qualityQualifiedNumSum = qualityOrderDetailList.stream()
.mapToInt(QualityOrderDetail::getQualityQualifiedNum)
@ -969,12 +941,12 @@ public class QualityOrderServiceImpl implements IQualityOrderService
//品质单报告表
private void insertQualityOrderReportByWarehouseStorageOrder(WarehouseStorageOrderDetail warehouseStorageOrderDetail,String qualityOrderCode) {
QualityOrderReport qualityOrderReport = new QualityOrderReport();
QualityOrderReportVO qualityOrderReport = new QualityOrderReportVO();
//插入品质单报告开始品质单
qualityOrderReport.setSupplierCode(warehouseStorageOrderDetail.getSupplierCode());
qualityOrderReport.setQualityOrderCode(qualityOrderCode);
//暂时生成品质单本来应该是实际到货数 prd有误暂时这样处理
qualityOrderReport.setActualArriveNum(warehouseStorageOrderDetail.getActualArriveNum());
qualityOrderReport.setCheckNum(warehouseStorageOrderDetail.getActualArriveNum());
qualityOrderReport.setSupplierName(warehouseStorageOrderDetail.getSupplierName());
qualityOrderReport.setMaterialNo(warehouseStorageOrderDetail.getMaterialNo());
qualityOrderReport.setMaterialName(warehouseStorageOrderDetail.getMaterialName());
@ -1009,7 +981,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
qualityOrderDetail.setMaterialUnit(warehouseStorageOrderDetail.getMaterialUnit());
qualityOrderDetail.setMaterialType(warehouseStorageOrderDetail.getMaterialType());
//暂时生成品质单本来应该是实际到货数 prd有误暂时这样处理
qualityOrderDetail.setActualArriveNum(warehouseStorageOrderDetail.getActualArriveNum());
qualityOrderDetail.setCheckNum(warehouseStorageOrderDetail.getActualArriveNum());
qualityOrderDetail.setSupplierCode(warehouseStorageOrderDetail.getSupplierCode());
qualityOrderDetail.setSupplierName(warehouseStorageOrderDetail.getSupplierName());
qualityOrderDetail.setSupplierAddress(warehouseStorageOrderDetail.getSupplierAddress());

Loading…
Cancel
Save