|
@@ -240,7 +240,7 @@ public class OutboundService extends BaseService<Outbound> {
|
|
|
public ResponseResultVO<?> invalid(String id) {
|
|
public ResponseResultVO<?> invalid(String id) {
|
|
|
Outbound outbound = outboundMapper.selectByIdForUpdate(id);
|
|
Outbound outbound = outboundMapper.selectByIdForUpdate(id);
|
|
|
// 如果退货数量不是0,不能作废
|
|
// 如果退货数量不是0,不能作废
|
|
|
- if (!outbound.getReturnQty().equals(new BigDecimal(0))) {
|
|
|
|
|
|
|
+ if (outbound.getReturnQty().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISEXISTS_AFTER_OPERATE.getMessage());
|
|
throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISEXISTS_AFTER_OPERATE.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -269,7 +269,7 @@ public class OutboundService extends BaseService<Outbound> {
|
|
|
.setOutingAmt(orderForUpdate.getOutingAmt().subtract(new BigDecimal(sumOutingAmt)))
|
|
.setOutingAmt(orderForUpdate.getOutingAmt().subtract(new BigDecimal(sumOutingAmt)))
|
|
|
.setOrderId(outbound.getFromId());
|
|
.setOrderId(outbound.getFromId());
|
|
|
// 如果出库中数量为0了,更新状态为待出库
|
|
// 如果出库中数量为0了,更新状态为待出库
|
|
|
- if(orderUpdate.getOutingQty().equals(new BigDecimal(0))){
|
|
|
|
|
|
|
+ if (orderUpdate.getOutingQty().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
orderUpdate.setOutStatus(Constant.OutStatus.DAICHUKU.getName());
|
|
orderUpdate.setOutStatus(Constant.OutStatus.DAICHUKU.getName());
|
|
|
}
|
|
}
|
|
|
orderService.updateByUuid(orderUpdate);
|
|
orderService.updateByUuid(orderUpdate);
|