|
|
|
@ -90,31 +90,22 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
|
|
|
|
|
sb.append(distributionBusinessPreOrderEntity.getOrderPackageCode()); |
|
|
|
|
data.add(distributionBusinessPreOrderEntity); |
|
|
|
|
|
|
|
|
|
if(!carNumberList.contains(distributionBusinessPreOrderEntity.getDistrCarNumber())){ |
|
|
|
|
carNumberList.add(distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(carNumberList.size()>1){ |
|
|
|
|
throw new ServiceException("不能同时操作多个车次"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BusinessSanDTO businessSanDTO = new BusinessSanDTO(); |
|
|
|
|
businessSanDTO.setOrderPackageCode(sb.toString()); |
|
|
|
|
businessSanDTO.setOrderPackageCode(distributionBusinessPreOrderEntity.getOrderPackageCode()); |
|
|
|
|
businessSanDTO.setInWarehouseException(0); |
|
|
|
|
businessSanDTO.setDistrCarNumber(carNumberList.get(0)); |
|
|
|
|
businessSanDTO.setDistrCarNumber(distributionBusinessPreOrderEntity.getDistrCarNumber()); |
|
|
|
|
R r = inOrderWarehourse(businessSanDTO); |
|
|
|
|
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; |
|
|
|
@ -329,7 +320,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
|
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+":"+businessSanDTO.getTrayCode(); |
|
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(o)) { |
|
|
|
@ -337,7 +328,8 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
|
|
|
|
|
TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(businessSanDTO.getTrayCode()); |
|
|
|
|
o = 1; |
|
|
|
|
if(!Objects.isNull(trayTypeDataVO)){ |
|
|
|
|
o=trayTypeDataVO.getOrderlNum(); |
|
|
|
|
o=trayTypeDataVO.getTrayNum(); |
|
|
|
|
a= (int) o; |
|
|
|
|
} |
|
|
|
|
bladeRedis.setEx(key, o, 60 * 60 * 24L); |
|
|
|
|
}else{ |
|
|
|
@ -391,7 +383,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotBlank(businessSanDTO.getTrayCode())){ |
|
|
|
|
|
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+":"+businessSanDTO.getTrayCode(); |
|
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
if (Objects.isNull(o)) { |
|
|
|
@ -399,8 +391,9 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde
|
|
|
|
|
TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(businessSanDTO.getTrayCode()); |
|
|
|
|
o = 1; |
|
|
|
|
if(!Objects.isNull(trayTypeDataVO)){ |
|
|
|
|
o=trayTypeDataVO.getOrderlNum(); |
|
|
|
|
o=trayTypeDataVO.getTrayNum(); |
|
|
|
|
} |
|
|
|
|
a= (int) o; |
|
|
|
|
bladeRedis.setEx(key, o, 60 * 60 * 24L); |
|
|
|
|
}else{ |
|
|
|
|
a = (int) o; |
|
|
|
|