|
|
@ -21,6 +21,8 @@ import com.logpm.trunkline.dto.InComingDTO; |
|
|
|
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; |
|
|
|
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity; |
|
|
|
import com.logpm.trunkline.feign.IInComingClient; |
|
|
|
import com.logpm.trunkline.feign.IInComingClient; |
|
|
|
import com.logpm.trunkline.feign.ITrunklineAdvanceDetailClient; |
|
|
|
import com.logpm.trunkline.feign.ITrunklineAdvanceDetailClient; |
|
|
|
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; |
|
|
|
|
|
|
|
import com.logpm.warehouse.vo.TrayTypeDataVO; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
import org.springblade.common.annotations.ChangeAsync; |
|
|
|
import org.springblade.common.annotations.ChangeAsync; |
|
|
@ -50,6 +52,7 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient; |
|
|
|
private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient; |
|
|
|
private final BladeRedis bladeRedis; |
|
|
|
private final BladeRedis bladeRedis; |
|
|
|
private final IDistributionParcelListClient distributionParcelListClient; |
|
|
|
private final IDistributionParcelListClient distributionParcelListClient; |
|
|
|
|
|
|
|
private final IWarehouseTrayTypeClient warehouseTrayTypeClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -299,8 +302,10 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
selectD.setInWarehouse(1); |
|
|
|
selectD.setInWarehouse(1); |
|
|
|
this.updateById(selectD); |
|
|
|
this.updateById(selectD); |
|
|
|
int a = 0; |
|
|
|
int a = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isBlank(businessSanDTO.getTrayCode())){ |
|
|
|
//记录当前车次的异常件数
|
|
|
|
//记录当前车次的异常件数
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber(); |
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
if (Objects.isNull(o)) { |
|
|
|
if (Objects.isNull(o)) { |
|
|
|
|
|
|
|
|
|
|
@ -322,6 +327,28 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
a = a + 1; |
|
|
|
a = a + 1; |
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
|
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.isNull(o)) { |
|
|
|
|
|
|
|
// 获取托盘上的数量
|
|
|
|
|
|
|
|
TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(businessSanDTO.getTrayCode()); |
|
|
|
|
|
|
|
o = 1; |
|
|
|
|
|
|
|
if(!Objects.isNull(trayTypeDataVO)){ |
|
|
|
|
|
|
|
o=trayTypeDataVO.getOrderlNum(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bladeRedis.setEx(key, o, 60 * 60 * 24L); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
a = (int) o; |
|
|
|
|
|
|
|
a = a + 1; |
|
|
|
|
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Resp.scanSuccess("扫描成功", a + "件"); |
|
|
|
return Resp.scanSuccess("扫描成功", a + "件"); |
|
|
@ -360,6 +387,28 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
t.setInWarehouse(1); |
|
|
|
t.setInWarehouse(1); |
|
|
|
this.updateById(t); |
|
|
|
this.updateById(t); |
|
|
|
int a = 0; |
|
|
|
int a = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtil.isNotBlank(businessSanDTO.getTrayCode())){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String key =RedisKeyConstant.BUSINESS_IN_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
|
|
|
|
Object o = bladeRedis.get(key); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.isNull(o)) { |
|
|
|
|
|
|
|
// 获取托盘上的数量
|
|
|
|
|
|
|
|
TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(businessSanDTO.getTrayCode()); |
|
|
|
|
|
|
|
o = 1; |
|
|
|
|
|
|
|
if(!Objects.isNull(trayTypeDataVO)){ |
|
|
|
|
|
|
|
o=trayTypeDataVO.getOrderlNum(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
bladeRedis.setEx(key, o, 60 * 60 * 24L); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
a = (int) o; |
|
|
|
|
|
|
|
a = a + 1; |
|
|
|
|
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
//记录当前车次的异常件数
|
|
|
|
//记录当前车次的异常件数
|
|
|
|
Object o = bladeRedis.get(RedisKeyConstant.BUSINESS_INEXCE_CARNUMBER + businessSanDTO.getDistrCarNumber()); |
|
|
|
Object o = bladeRedis.get(RedisKeyConstant.BUSINESS_INEXCE_CARNUMBER + businessSanDTO.getDistrCarNumber()); |
|
|
|
String key =RedisKeyConstant.BUSINESS_INEXCE_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
|
String key =RedisKeyConstant.BUSINESS_INEXCE_CARNUMBER + businessSanDTO.getDistrCarNumber()+businessSanDTO.getTrayCode(); |
|
|
@ -383,6 +432,9 @@ public class BusinessPreOrderServiceImpl extends BaseServiceImpl<BusinessPreOrde |
|
|
|
a = a + 1; |
|
|
|
a = a + 1; |
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
bladeRedis.setEx(key, a, 60 * 60 * 24L); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Resp.scanSuccess("扫描成功", "异常" + a + "件"); |
|
|
|
return Resp.scanSuccess("扫描成功", "异常" + a + "件"); |
|
|
|
} |
|
|
|
} |
|
|
|