|
@@ -155,6 +155,7 @@ public class ProductionReportingServiceImpl extends ServiceImpl<ProductionReport
|
|
|
.eq(ProductionTaskProgress::getTaskId, productionTaskId)
|
|
|
.eq(ProductionTaskProgress::getProcessesId, productionProcessesId)
|
|
|
.setSql("finish_quantity = finish_quantity + " + dto.getQuantity())
|
|
|
+ .setSql("balance_quantity = balance_quantity - " + dto.getQuantity())
|
|
|
.set(BasePo::getUpdateTime, newDateTime)
|
|
|
.set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
);
|
|
@@ -165,6 +166,22 @@ public class ProductionReportingServiceImpl extends ServiceImpl<ProductionReport
|
|
|
ProductInfo productInfo = productInfoService.getById(productionOrderDetail.getProductId());
|
|
|
Assert.notEmpty(productInfo, "查询不到生产产品信息!");
|
|
|
Long technologyId = productInfo.getTechnologyId();
|
|
|
+
|
|
|
+
|
|
|
+ List<Long> nextProcessIds = technologyProcessLineService.listObject(TechnologyProcessLine::getTargetProcessesId, q -> q
|
|
|
+ .eq(TechnologyProcessLine::getTechnologyId, technologyId)
|
|
|
+ .eq(TechnologyProcessLine::getSourceProcessesId, productionProcessesId)
|
|
|
+ .ne(TechnologyProcessLine::getTargetProcessesId, 99)
|
|
|
+ );
|
|
|
+ productionTaskProgressService.update(q -> q
|
|
|
+ .eq(ProductionTaskProgress::getTaskId, productionTaskId)
|
|
|
+ .in(ProductionTaskProgress::getProcessesId, nextProcessIds)
|
|
|
+ .setSql("balance_quantity = balance_quantity + " + dto.getQuantity())
|
|
|
+ .set(BasePo::getUpdateTime, newDateTime)
|
|
|
+ .set(BasePo::getUpdateUser, SecurityUtils.getUserId())
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
|
|
|
long count = technologyProcessLineService.count(q -> q
|
|
|
.eq(TechnologyProcessLine::getTechnologyId, technologyId)
|