|
|
@ -90,31 +90,22 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
sb.append(distributionBusinessPreOrderEntity.getOrderPackageCode()); |
|
|
|
sb.append(distributionBusinessPreOrderEntity.getOrderPackageCode()); |
|
|
|
data.add(distributionBusinessPreOrderEntity); |
|
|
|
data.add(distributionBusinessPreOrderEntity); |
|
|
|
|
|
|
|
|
|
|
|
if(!carNumberList.contains(distributionBusinessPreOrderEntity.getDistrCarNumber())){ |
|
|
|
BusinessSanDTO businessSanDTO = new BusinessSanDTO(); |
|
|
|
carNumberList.add(distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
businessSanDTO.setOrderPackageCode(distributionBusinessPreOrderEntity.getOrderPackageCode()); |
|
|
|
} |
|
|
|
businessSanDTO.setInWarehouseException(0); |
|
|
|
} |
|
|
|
businessSanDTO.setDistrCarNumber(distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
if(carNumberList.size()>1){ |
|
|
|
R r = inOrderWarehourse(businessSanDTO); |
|
|
|
throw new ServiceException("不能同时操作多个车次"); |
|
|
|
if (r.isSuccess()) { |
|
|
|
} |
|
|
|
// 更新成功
|
|
|
|
|
|
|
|
// 更新入库状态
|
|
|
|
BusinessSanDTO businessSanDTO = new BusinessSanDTO(); |
|
|
|
distributionBusinessPreOrderEntity.setInWarehouse(1); |
|
|
|
businessSanDTO.setOrderPackageCode(sb.toString()); |
|
|
|
baseMapper.updateById(distributionBusinessPreOrderEntity); |
|
|
|
businessSanDTO.setInWarehouseException(0); |
|
|
|
Object o = bladeRedis.get(RedisKeyConstant.BUSINESS_IN_CARNUMBER + distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
businessSanDTO.setDistrCarNumber(carNumberList.get(0)); |
|
|
|
if (!Objects.isNull(o)) { |
|
|
|
R r = inOrderWarehourse(businessSanDTO); |
|
|
|
bladeRedis.set(RedisKeyConstant.BUSINESS_IN_CARNUMBER + distributionBusinessPreOrderEntity.getDistrCarNumber(), null); |
|
|
|
if (r.isSuccess()) { |
|
|
|
} |
|
|
|
// 更新成功
|
|
|
|
|
|
|
|
// 更新入库状态
|
|
|
|
|
|
|
|
for (BusinessPreOrderEntity distributionBusinessPreOrderEntity : data) { |
|
|
|
|
|
|
|
distributionBusinessPreOrderEntity.setInWarehouse(1); |
|
|
|
|
|
|
|
baseMapper.updateById(distributionBusinessPreOrderEntity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object o = bladeRedis.get(RedisKeyConstant.BUSINESS_IN_CARNUMBER + distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
|
|
|
|
if (!Objects.isNull(o)) { |
|
|
|
|
|
|
|
bladeRedis.set(RedisKeyConstant.BUSINESS_IN_CARNUMBER + distributionBusinessPreOrderEntity.getDistrCarNumber(), null); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|