|
@@ -193,7 +193,7 @@ public class DeliveryPlanServiceImpl extends ServiceImpl<DeliveryPlanDao, Delive
|
|
|
throw new RetException("新发货单号必须小于原发货单号");
|
|
|
}
|
|
|
updateOrderNo = true;
|
|
|
- oldId = this.getIdByOrderNo(req.getNewOrderNo());
|
|
|
+ oldId = this.getIdByOrderNo(req.getNewOrderNo(), model.getSecuritiesId());
|
|
|
|
|
|
}
|
|
|
// 验证是否修改了参数影响拍号冠字号
|
|
@@ -251,8 +251,9 @@ public class DeliveryPlanServiceImpl extends ServiceImpl<DeliveryPlanDao, Delive
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private Integer getIdByOrderNo(String newOrderNo) {
|
|
|
+ private Integer getIdByOrderNo(String newOrderNo, Integer securitiesId) {
|
|
|
LambdaQueryWrapper<DeliveryPlan> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(DeliveryPlan::getSecuritiesId, securitiesId);
|
|
|
queryWrapper.eq(DeliveryPlan::getOrderNo, newOrderNo);
|
|
|
DeliveryPlan model = this.getOne(queryWrapper);
|
|
|
if (model == null) {
|
|
@@ -260,6 +261,7 @@ public class DeliveryPlanServiceImpl extends ServiceImpl<DeliveryPlanDao, Delive
|
|
|
}
|
|
|
// 验证是否有发货的计划
|
|
|
queryWrapper.clear();
|
|
|
+ queryWrapper.eq(DeliveryPlan::getSecuritiesId, securitiesId);
|
|
|
queryWrapper.ge(DeliveryPlan::getId, model.getId());
|
|
|
queryWrapper.eq(DeliveryPlan::getStatus, 2);
|
|
|
long count = this.count(queryWrapper);
|