|
|
|
@ -24,14 +24,12 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient; |
|
|
|
|
import com.logpm.distribution.bean.Resp; |
|
|
|
|
import com.logpm.distribution.config.RedissonConfig; |
|
|
|
|
import com.logpm.distribution.dto.app.StockupDTO; |
|
|
|
|
import com.logpm.distribution.entity.*; |
|
|
|
|
import com.logpm.distribution.mapper.DistributionStockListMapper; |
|
|
|
|
import com.logpm.distribution.service.*; |
|
|
|
|
import com.logpm.distribution.vo.*; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity; |
|
|
|
|
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient; |
|
|
|
@ -40,6 +38,7 @@ import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.redisson.api.RLock; |
|
|
|
|
import org.springblade.common.constant.DictBizConstant; |
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.constant.stockup.StockupStatusConstant; |
|
|
|
@ -51,16 +50,13 @@ import org.springblade.core.tool.api.R;
|
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.system.cache.DictBizCache; |
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
|
|
|
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
|
|
|
|
import org.springframework.transaction.TransactionDefinition; |
|
|
|
|
import org.springframework.transaction.TransactionException; |
|
|
|
|
import org.springframework.transaction.TransactionStatus; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -150,7 +146,6 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
log.info("#################pageList: 查询备货ID不能为空"); |
|
|
|
|
return R.fail(401, "查询备货ID不能为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = distributionStockupService.selectHomeStockupPage(stockupDTO); |
|
|
|
|
return R.data(map); |
|
|
|
|
} |
|
|
|
@ -242,6 +237,9 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
// Boolean aBoolean = distributionStockupService.getClientStockupTray(reservationId, vo.getAllocationId());
|
|
|
|
|
// Boolean aBoolean = distributionReservationPackageService.selectClientStockupState(reservationId, vo.getStockArticleId());
|
|
|
|
|
// vo.setTrayLean(aBoolean);
|
|
|
|
|
if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.getPallet().contains(",") && !vo.isCompleteStact() && ObjectUtils.isNotNull( vo.getAllocationId()) ) { |
|
|
|
|
vo.setTrayLean(true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
map.put("planNum", planNum); |
|
|
|
|
map.put("scanNum", scanNum); |
|
|
|
@ -283,7 +281,7 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
Integer orderStatus = stockupDTO.getOrderStatus();//1 客户订单 2库存品
|
|
|
|
|
Integer status = stockupDTO.getStatus();//0未完成 1已完成
|
|
|
|
|
Long allocationId = stockupDTO.getAllocationId(); //货位
|
|
|
|
|
Long trayId = Long.valueOf(stockupDTO.getTrayId()); //托盘Id
|
|
|
|
|
// Long trayId = Long.valueOf(stockupDTO.getTrayId()); //托盘Id
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isNull(stockupId)) { |
|
|
|
|
log.warn("##############orderInfo: 备货任务ID为空 allocation={}", stockupId); |
|
|
|
@ -451,6 +449,14 @@ public class DistributionStockupAppController extends BladeController {
|
|
|
|
|
//手动
|
|
|
|
|
// TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
|
|
|
|
|
// try{
|
|
|
|
|
//设置lockey
|
|
|
|
|
String lockKey = stockupDTO.getPacketBarCode()+stockupDTO.getStockupId(); |
|
|
|
|
RLock lock = new RedissonConfig().redisson().getLock(lockKey); |
|
|
|
|
if(lock.isLocked()){ |
|
|
|
|
String audioValue2 = DictBizCache.getValue(DictBizConstant.PDA_AUDIO, "2"); |
|
|
|
|
return Resp.scanFail("重复扫描!", audioValue2); |
|
|
|
|
} |
|
|
|
|
lock.lock(5, TimeUnit.SECONDS); |
|
|
|
|
if (scanType == 1) { |
|
|
|
|
//包件扫描
|
|
|
|
|
String orderCode = stockupDTO.getOrderCode();//订单自编号
|
|
|
|
|