批次编辑升级2

master
zhaoxiaolin 8 months ago
parent 4c42e02780
commit 0c0184020a

@ -1173,11 +1173,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
if(proOrderWorkorderBatch.getNewBatchQuantity() != null){ if(proOrderWorkorderBatch.getNewBatchQuantity() != null){
Long newBatchQuantity = proOrderWorkorderBatch.getNewBatchQuantity(); Long newBatchQuantity = proOrderWorkorderBatch.getNewBatchQuantity();
if(m==0 || m== workOrders.size()-1){ if(m==0){
// 设置子工单数量 // 设置子工单数量
batch.setBatchQuantity(newBatchQuantity); batch.setBatchQuantity(newBatchQuantity);
}else{ }else{
batch.setBatchQuantity(workOrders.get(m+1).getUmrez() batch.setBatchQuantity(workOrders.get(m-1).getUmrez()
.multiply(new BigDecimal(newBatchQuantity)).longValue()); .multiply(new BigDecimal(newBatchQuantity)).longValue());
} }
} }
@ -1219,7 +1219,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
// 设置子工单数量 // 设置子工单数量
batch.setNewBatchQuantity(newBatchQuantity); batch.setNewBatchQuantity(newBatchQuantity);
}else{ }else{
batch.setNewBatchQuantity(workOrders.get(m+1).getUmrez() batch.setNewBatchQuantity(workOrders.get(m-1).getUmrez()
.multiply(new BigDecimal(newBatchQuantity)).longValue()); .multiply(new BigDecimal(newBatchQuantity)).longValue());
} }
} }

Loading…
Cancel
Save