|
|
@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
|
|
|
import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; |
|
|
|
import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; |
|
|
|
|
|
|
|
import com.logpm.distribution.entity.DistributionReservationEntity; |
|
|
|
import com.logpm.distribution.entity.DistributionRetentionScanEntity; |
|
|
|
import com.logpm.distribution.entity.DistributionRetentionScanEntity; |
|
|
|
import com.logpm.distribution.feign.IDistributionLoadscanAbnormalClient; |
|
|
|
import com.logpm.distribution.feign.IDistributionLoadscanAbnormalClient; |
|
|
|
import com.logpm.distribution.feign.IDistributionReservationClient; |
|
|
|
import com.logpm.distribution.feign.IDistributionReservationClient; |
|
|
@ -38,9 +39,13 @@ import com.logpm.warehouse.vo.WarehouseRetentionRecordVO; |
|
|
|
import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; |
|
|
|
import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel; |
|
|
|
import com.logpm.warehouse.vo.WarehouseRetentionScanVO; |
|
|
|
import com.logpm.warehouse.vo.WarehouseRetentionScanVO; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
|
|
|
import org.springblade.common.constant.WorkNodeEnums; |
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
import org.springblade.common.constant.common.IsOrNoConstant; |
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant; |
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalAuditingStatusConstant; |
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalTypeConstant; |
|
|
|
import org.springblade.common.constant.loading.LoadingAbnormalTypeConstant; |
|
|
|
|
|
|
|
import org.springblade.common.enums.BizOperationEnums; |
|
|
|
|
|
|
|
import org.springblade.common.model.NodeFanoutMsg; |
|
|
|
|
|
|
|
import org.springblade.common.model.ReservationVO; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
import org.springblade.core.redis.cache.BladeRedis; |
|
|
|
import org.springblade.core.redis.cache.BladeRedis; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
@ -170,9 +175,47 @@ public class WarehouseRetentionScanServiceImpl extends BaseServiceImpl<Warehouse |
|
|
|
this.save(warehouseRetentionScan); |
|
|
|
this.save(warehouseRetentionScan); |
|
|
|
redis.setEx(AuthUtil.getTenantId() + ":warehouse:" + warehouseRetentionScan.getWarehouseId() + ":orderPackageCode:" + warehouseRetentionScan.getOrderPackageCode()+ ":retentionSave:",warehouseRetentionScan.getTaskCode(),60L*3L); |
|
|
|
redis.setEx(AuthUtil.getTenantId() + ":warehouse:" + warehouseRetentionScan.getWarehouseId() + ":orderPackageCode:" + warehouseRetentionScan.getOrderPackageCode()+ ":retentionSave:",warehouseRetentionScan.getTaskCode(),60L*3L); |
|
|
|
distributionSignforClient.updateIsHaveAbnormalPackage(warehouseRetentionScan.getReservationId()); |
|
|
|
distributionSignforClient.updateIsHaveAbnormalPackage(warehouseRetentionScan.getReservationId()); |
|
|
|
|
|
|
|
NodeFanoutMsg<ReservationVO> nodeFanoutMsg = buildNodeFanoutMsgByRestention(warehouseRetentionScan.getReservationId(),distributionLoadscanAbnormalEntity.getWarehouseId()); |
|
|
|
|
|
|
|
reservationClient.planRetention(nodeFanoutMsg,AuthUtil.getUser()); |
|
|
|
return R.success("操作成功"); |
|
|
|
return R.success("操作成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private NodeFanoutMsg<ReservationVO> buildNodeFanoutMsgByRestention(Long reservationId,Long warehouseId) { |
|
|
|
|
|
|
|
NodeFanoutMsg<ReservationVO> nodeFanoutMsg = new NodeFanoutMsg<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_RETENTION); |
|
|
|
|
|
|
|
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); |
|
|
|
|
|
|
|
nodeFanoutMsg.setOperator(AuthUtil.getNickName()); |
|
|
|
|
|
|
|
nodeFanoutMsg.setOperatorTime(new Date()); |
|
|
|
|
|
|
|
nodeFanoutMsg.setTenantId(AuthUtil.getTenantId()); |
|
|
|
|
|
|
|
ReservationVO reservationVO = getReservationVO(reservationId); |
|
|
|
|
|
|
|
nodeFanoutMsg.setWarehouse(reservationVO.getWarehouseName()); |
|
|
|
|
|
|
|
nodeFanoutMsg.setWarehouseId(warehouseId); |
|
|
|
|
|
|
|
nodeFanoutMsg.setMain(reservationVO); |
|
|
|
|
|
|
|
return nodeFanoutMsg; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ReservationVO getReservationVO(Long reservationId) { |
|
|
|
|
|
|
|
List<DistributionReservationEntity> reservationList = reservationClient.getReservationList(reservationId + ""); |
|
|
|
|
|
|
|
DistributionReservationEntity reservationEntity = reservationList.get(0); |
|
|
|
|
|
|
|
ReservationVO reservationVO = new ReservationVO(); |
|
|
|
|
|
|
|
reservationVO.setReservationCode(reservationEntity.getReservationCode()); |
|
|
|
|
|
|
|
reservationVO.setReservationDate(reservationEntity.getReservationDate()); |
|
|
|
|
|
|
|
reservationVO.setConsignee(reservationEntity.getConsignee()); |
|
|
|
|
|
|
|
reservationVO.setDeliveryAddress(reservationEntity.getDeliveryAddress()); |
|
|
|
|
|
|
|
reservationVO.setDeliveryPhone(reservationEntity.getDeliveryPhone()); |
|
|
|
|
|
|
|
reservationVO.setMallName(reservationEntity.getMallName()); |
|
|
|
|
|
|
|
reservationVO.setStoreName(reservationEntity.getStoreName()); |
|
|
|
|
|
|
|
reservationVO.setWarehouseName(reservationEntity.getWarehouseName()); |
|
|
|
|
|
|
|
reservationVO.setDeliveryType(reservationEntity.getDeliveryType()); |
|
|
|
|
|
|
|
reservationVO.setReservationNum(reservationEntity.getReservationNum()); |
|
|
|
|
|
|
|
reservationVO.setReceivingUnit(reservationEntity.getReceivingUnit()); |
|
|
|
|
|
|
|
reservationVO.setId(reservationEntity.getId()); |
|
|
|
|
|
|
|
reservationVO.setReservationStockListNum(reservationEntity.getReservationStockListNum()); |
|
|
|
|
|
|
|
return reservationVO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R selectWarehouseRetentionRecordNewPage(IPage<WarehouseRetentionScanVO> page, WarehouseRetentionScanDTO warehouseRetentionScan) { |
|
|
|
public R selectWarehouseRetentionRecordNewPage(IPage<WarehouseRetentionScanVO> page, WarehouseRetentionScanDTO warehouseRetentionScan) { |
|
|
|