diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index 04d01408..1a28b5a3 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -1173,11 +1173,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { if(proOrderWorkorderBatch.getNewBatchQuantity() != null){ Long newBatchQuantity = proOrderWorkorderBatch.getNewBatchQuantity(); - if(m==0 || m== workOrders.size()-1){ + if(m==0){ // 设置子工单数量 batch.setBatchQuantity(newBatchQuantity); }else{ - batch.setBatchQuantity(workOrders.get(m+1).getUmrez() + batch.setBatchQuantity(workOrders.get(m-1).getUmrez() .multiply(new BigDecimal(newBatchQuantity)).longValue()); } } @@ -1219,7 +1219,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { // 设置子工单数量 batch.setNewBatchQuantity(newBatchQuantity); }else{ - batch.setNewBatchQuantity(workOrders.get(m+1).getUmrez() + batch.setNewBatchQuantity(workOrders.get(m-1).getUmrez() .multiply(new BigDecimal(newBatchQuantity)).longValue()); } }