当完成数量等于总数量且完成重量等于总重量时订单状态置为完成
This commit is contained in:
förälder
ae816ce7f3
incheckning
c44edba722
@ -113,6 +113,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
||||
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
||||
wrapper.like(StringUtils.isNotBlank(param.getIdenCardNum()), OrderInfo.IDEN_CARD_NUM, param.getIdenCardNum())
|
||||
.like(StringUtils.isNotBlank(param.getOrderNo()), OrderInfo.ORDER_NO, param.getOrderNo())
|
||||
.in(OrderInfo.STATUS,0,1)
|
||||
.orderByDesc(OrderInfo.CREATE_TIME);
|
||||
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
|
||||
PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class);
|
||||
@ -125,6 +126,12 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
||||
e.setWaitQuantity(info.getData().getWaitQuantity());
|
||||
e.setReProcessQuantity(info.getData().getReProcessQuantity());
|
||||
e.setReProcessWeight(info.getData().getReProcessWeight());
|
||||
//当完成数量等于总数量且完成重量等于总重量时订单状态置为2
|
||||
if (e.getQuantity().equals(e.getFinishQuantity())&&e.getWeight().equals(e.getFinishWeight())){
|
||||
OrderInfo orderInfo = orderInfoService.getById(e.getId());
|
||||
orderInfo.setStatus(2);
|
||||
orderInfoService.updateById(orderInfo);
|
||||
}
|
||||
});
|
||||
return successful(orderInfoVoPageVo);
|
||||
}
|
||||
|
Laddar…
Referens i nytt ärende
Block a user