Browse Source

[feat] 品质管理

修改仓库暂收转品质单后端接口方法:新增品质单详情加上条件判断:如果没有插入数据则抛出异常;新增品质单报告加上条件判断:如果没有插入数据则抛出异常;新增品质单不合格分类加上条件判断:如果没有插入数据则抛出异常;
dev
liuxiaoxu 4 months ago
parent
commit
8936cdb068
  1. 15
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

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

@ -601,7 +601,10 @@ public class QualityOrderServiceImpl implements IQualityOrderService
qualityOrderReportUnqualified.setMaterialName(warehouseStorageOrderDetail.getMaterialName());
qualityOrderReportUnqualified.setCreateTime(new Date());
qualityOrderReportUnqualified.setCreateBy(warehouseStorageOrderDetail.getCreateBy());
orderReportUnqualifiedMapper.insertQualityOrderReportUnqualified(qualityOrderReportUnqualified);
int insertQualityOrderReportUnqualifiedResult = orderReportUnqualifiedMapper.insertQualityOrderReportUnqualified(qualityOrderReportUnqualified);
if (insertQualityOrderReportUnqualifiedResult <= 0){
throw new BusinessException("插入品质单不合格分类表失败");
}
}
@ -619,7 +622,10 @@ public class QualityOrderServiceImpl implements IQualityOrderService
qualityOrderReport.setQualityHasqualifiedNum(warehouseStorageOrderDetail.getQualityHasQualifiedNum());
qualityOrderReport.setCreateTime(new Date());
qualityOrderReport.setCreateBy(warehouseStorageOrderDetail.getCreateBy());
orderReportMapper.insertQualityOrderReport(qualityOrderReport);
int insertResult = orderReportMapper.insertQualityOrderReport(qualityOrderReport);
if (insertResult <= 0){
throw new BusinessException("插入品质单报告失败");
}
}
//品质单详情表
@ -653,7 +659,10 @@ public class QualityOrderServiceImpl implements IQualityOrderService
qualityOrderDetail.setQualityHasqualifiedNum(warehouseStorageOrderDetail.getQualityHasQualifiedNum());
qualityOrderDetail.setCreateTime(new Date());
qualityOrderDetail.setCreateBy(warehouseStorageOrderDetail.getCreateBy());
orderDetailMapper.insertQualityOrderDetail(qualityOrderDetail);
int insertResult= orderDetailMapper.insertQualityOrderDetail(qualityOrderDetail);
if (insertResult <= 0){
throw new BusinessException("插入品质单详情失败");
}
}

Loading…
Cancel
Save