白坯订单管理

highway
wws 1 year ago
parent 8d24223198
commit 5d0c9936b3

@ -520,7 +520,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
// 创建批次表通用对象
ProOrderWorkorderBatch workBatch = setCommonBatchAttribute();
// 更新母订单信息
proOrder.setQuantitySplit(proOrder.getQuantitySplit() + splitOrderDTO.getSplitNum());
if (splitOrderDTO.getSplitNum() != null) {
proOrder.setQuantitySplit(proOrder.getQuantitySplit() + splitOrderDTO.getSplitNum());
}else {
proOrder.setQuantitySplit(proOrder.getQuantitySplit() + Long.valueOf(proOrder.getAtrr1()));
}
proOrder.setUpdateBy(SecurityContextHolder.getUserName());
proOrder.setUpdateTime(DateUtils.getNowDate());
proOrder.setAtrr1("");
@ -529,9 +533,13 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
// 更新子订单
ProOrder childOrder = new ProOrder();
BeanUtils.copyProperties(proOrder.getChildren().get(0),childOrder);
if (splitOrderDTO.getSplitNum() != null) {
childOrder.setQuantitySplit(childOrder.getQuantitySplit() + splitOrderDTO.getSplitNum());
childOrder.setQuantity(childOrder.getQuantitySplit());
}else {
childOrder.setQuantitySplit(childOrder.getQuantitySplit()+Long.valueOf(childOrder.getAtrr1()));
}
childOrder.setAtrr1("");
childOrder.setQuantitySplit(childOrder.getQuantitySplit() + splitOrderDTO.getSplitNum());
childOrder.setQuantity(childOrder.getQuantitySplit());
childOrder.setUpdateBy(SecurityContextHolder.getUserName());
childOrder.setUpdateTime(DateUtils.getNowDate());
// 更新子订单至数据库
@ -542,6 +550,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
proOrderWorkorder.setQuantitySplit(splitOrderDTO.getSplitNum());
proOrderWorkorder.setUpdateBy(SecurityContextHolder.getUserName());
proOrderWorkorder.setUpdateTime(DateUtils.getNowDate());
proOrderWorkorder.setCarNum(splitOrderDTO.getCarNum());
// 2.将工单信息更新至数据库
if (splitOrderDTO.getProdLineCode() != null) {
proOrderWorkorder.setProdLineCode(splitOrderDTO.getProdLineCode());

Loading…
Cancel
Save