当完成数量等于总数量且完成重量等于总重量时订单状态置为完成
This commit is contained in:
parent
ae816ce7f3
commit
c44edba722
@ -113,6 +113,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
QueryWrapper<OrderInfo> wrapper = new QueryWrapper<>();
|
||||||
wrapper.like(StringUtils.isNotBlank(param.getIdenCardNum()), OrderInfo.IDEN_CARD_NUM, param.getIdenCardNum())
|
wrapper.like(StringUtils.isNotBlank(param.getIdenCardNum()), OrderInfo.IDEN_CARD_NUM, param.getIdenCardNum())
|
||||||
.like(StringUtils.isNotBlank(param.getOrderNo()), OrderInfo.ORDER_NO, param.getOrderNo())
|
.like(StringUtils.isNotBlank(param.getOrderNo()), OrderInfo.ORDER_NO, param.getOrderNo())
|
||||||
|
.in(OrderInfo.STATUS,0,1)
|
||||||
.orderByDesc(OrderInfo.CREATE_TIME);
|
.orderByDesc(OrderInfo.CREATE_TIME);
|
||||||
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
|
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
|
||||||
PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class);
|
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.setWaitQuantity(info.getData().getWaitQuantity());
|
||||||
e.setReProcessQuantity(info.getData().getReProcessQuantity());
|
e.setReProcessQuantity(info.getData().getReProcessQuantity());
|
||||||
e.setReProcessWeight(info.getData().getReProcessWeight());
|
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);
|
return successful(orderInfoVoPageVo);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user