|
|
|
@ -42,6 +42,7 @@ import org.springblade.common.constant.common.IsOrNoConstant;
|
|
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant; |
|
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalTypeConstant; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.redis.cache.BladeRedis; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
@ -54,6 +55,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -74,6 +76,7 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl<Warehouse
|
|
|
|
|
private IDistributionSignforClient distributionSignforClient; |
|
|
|
|
|
|
|
|
|
private IDistributionLoadscanAbnormalClient distributionLoadscanAbnormalClient; |
|
|
|
|
private BladeRedis redis; |
|
|
|
|
|
|
|
|
|
// private IWarehouseRetentionRecordService retentionRecordService;
|
|
|
|
|
|
|
|
|
@ -141,6 +144,10 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl<Warehouse
|
|
|
|
|
@Override |
|
|
|
|
public R saveEntity(WarehouseRetentionScanEntity warehouseRetentionScan) { |
|
|
|
|
//进行异常新增
|
|
|
|
|
String isLock = redis.get(AuthUtil.getTenantId() + ":warehouse:" + warehouseRetentionScan.getWarehouseId() + ":orderPackageCode:" + warehouseRetentionScan.getOrderPackageCode()+ ":retentionSave:"); |
|
|
|
|
if (!Objects.isNull(isLock)){ |
|
|
|
|
return Resp.scanFail("请勿频繁操作!!!","请勿频繁操作!!!"); |
|
|
|
|
} |
|
|
|
|
DistributionLoadscanAbnormalEntity distributionLoadscanAbnormalEntity = new DistributionLoadscanAbnormalEntity(); |
|
|
|
|
distributionLoadscanAbnormalEntity.setDeliveryListId(warehouseRetentionScan.getDeliveryId()); |
|
|
|
|
distributionLoadscanAbnormalEntity.setReservationId(warehouseRetentionScan.getReservationId()); |
|
|
|
@ -161,6 +168,7 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl<Warehouse
|
|
|
|
|
warehouseRetentionScan.setTaskCode(reservationClient.getRetentionMa()); |
|
|
|
|
warehouseRetentionScan.setAbnormalId(abnormalId); |
|
|
|
|
this.save(warehouseRetentionScan); |
|
|
|
|
redis.setEx(AuthUtil.getTenantId() + ":warehouse:" + warehouseRetentionScan.getWarehouseId() + ":orderPackageCode:" + warehouseRetentionScan.getOrderPackageCode()+ ":retentionSave:",warehouseRetentionScan.getTaskCode(),60L*3L); |
|
|
|
|
distributionSignforClient.updateIsHaveAbnormalPackage(warehouseRetentionScan.getReservationId()); |
|
|
|
|
return R.success("操作成功"); |
|
|
|
|
} |
|
|
|
|