|
@@ -173,6 +173,9 @@ public class ProductionSchedulingServiceImpl extends ServiceImpl<ProductionSched
|
|
|
Assert.notEmpty(dto.getSchedulingDate(), "排程日期不能为空");
|
|
|
Assert.notEmpty(dto.getQuantity(), "排程数量不能为空");
|
|
|
|
|
|
+
|
|
|
+ produceOrderDetailService.beginWorkCheck(dto.getTaskId());
|
|
|
+
|
|
|
|
|
|
dto.setCompanyId(SecurityUtils.getCompanyId());
|
|
|
|
|
@@ -193,7 +196,7 @@ public class ProductionSchedulingServiceImpl extends ServiceImpl<ProductionSched
|
|
|
|
|
|
|
|
|
ProductionOrderDetail taskById = produceOrderDetailService.getById(dto.getTaskId());
|
|
|
- Assert.notEmpty(taskById, "查询不到排程信息");
|
|
|
+ Assert.notEmpty(taskById, "查询不到任务信息");
|
|
|
List<ProductionScheduling> psList = this.list(q -> q.eq(ProductionScheduling::getTaskId, dto.getTaskId()).eq(ProductionScheduling::getProcessesId, dto.getProcessesId()));
|
|
|
BigDecimal reduce = BigDecimal.valueOf(psList.stream().map(ProductionScheduling::getQuantity).reduce(Integer::sum).orElse(0));
|
|
|
if (reduce.compareTo(taskById.getQuantity()) > 0) {
|