Browse Source

修改多个托盘备货

training
caoyizhong 1 year ago
parent
commit
6dfc3e1a48
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  3. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -214,8 +214,8 @@ public class DistributionStockupAppController extends BladeController {
List<DistributionStockupOrderListVO> collect = list.stream().filter(i -> {
// if (ObjectUtils.isNotNull(i.getTrayId()) && !i.getPallet().contains(",") && !i.isCompleteStact() && ObjectUtils.isNotNull( i.getAllocationId()) ) {
if (ObjectUtils.isNotNull(i.getTrayId()) && !i.getPallet().contains(",") && !i.isCompleteStact()) {
i.setTrayLean(distributionStockupService.getTrayBoot(i));
if (ObjectUtils.isNotNull(i.getTrayId()) && !i.isCompleteStact()) {
i.setTrayLean(distributionStockupService.getTrayBoot(i,stockupDTO.getTypeService()));
}
return true;
}).collect(Collectors.toList());
@ -257,7 +257,7 @@ public class DistributionStockupAppController extends BladeController {
// if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.getPallet().contains(",") && !vo.isCompleteStact() && ObjectUtils.isNotNull( vo.getAllocationId()) ) {
if (ObjectUtils.isNotNull(vo.getTrayId()) && !vo.isCompleteStact() ) {
//有没有可用整托配货的数据
vo.setTrayLean(distributionStockupService.getTrayBoot(vo));
vo.setTrayLean(distributionStockupService.getTrayBoot(vo,stockupDTO.getTypeService()));
}
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -235,5 +235,5 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @param vo
* @return
*/
boolean getTrayBoot(DistributionStockupOrderListVO vo);
boolean getTrayBoot(DistributionStockupOrderListVO vo,String type);
}

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -50,6 +50,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
@ -873,6 +874,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if( ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){
wu.setPallet(wu.getPallet()+","+i.getPallet());
}
//托盘信息
if( ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){
wu.setTrayId(wu.getTrayId()+","+i.getTrayId());
}
//订单自编号信息
if(ObjectUtils.isNotNull(i.getOrderCode()) && !wu.getOrderCode().contains(i.getOrderCode())){
wu.setOrderCode(wu.getOrderCode()+","+i.getOrderCode());
@ -948,6 +953,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){
y.setTrayId(y.getTrayId()+","+p.getTrayId());
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getPallet()) && !y.getPallet().contains(p.getPallet())){
y.setPallet(y.getPallet()+","+p.getPallet());
}
//订单自编号信息
@ -1025,6 +1034,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//t托盘信息
if(ObjectUtils.isNotNull(y.getTrayId()) && ObjectUtils.isNotNull(p.getTrayId()) && !y.getTrayId().contains(p.getTrayId())){
y.setTrayId(y.getTrayId()+","+p.getTrayId());
}
//托盘信息
if(ObjectUtils.isNotNull(y.getPallet()) && ObjectUtils.isNotNull(p.getPallet()) && !y.getPallet().contains(p.getPallet())){
y.setPallet(y.getPallet()+","+p.getPallet());
}
//订单自编号信息
@ -1087,6 +1100,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//托盘信息
if(ObjectUtils.isNotNull(wu.getTrayId()) && ObjectUtils.isNotNull(i.getTrayId()) && !wu.getTrayId().contains(i.getTrayId())){
wu.setTrayId(wu.getTrayId()+","+i.getTrayId());
}
//托盘信息
if(ObjectUtils.isNotNull(wu.getPallet()) && ObjectUtils.isNotNull(i.getPallet()) && !wu.getPallet().contains(i.getPallet())){
wu.setPallet(wu.getPallet()+","+i.getPallet());
}
//订单自编号信息
@ -1739,7 +1756,8 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(trayIdList.isEmpty()){
return Resp.scanFail("托盘信息错误!!!", "托盘信息错误!!!");
}
trayIdList.forEach(t -> {
List<WarehouseTrayGoodsEntity> trayIdListCode = trayIdList.stream().filter(i -> i.getTrayCode().equals(stockupDTO.getTrayBarCode())).collect(Collectors.toList());
trayIdListCode.forEach(t -> {
boolean b = finalList.stream().anyMatch(l -> l.getParcelListId().equals(t.getAssociationId()));
if (b) {
finalList.stream().forEach(i -> {
@ -1758,11 +1776,13 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail("备货失败!有其他包件无法整托", "备货失败!有其他包件无法整托");
} else {
List<DistributionStockEntity> list1 = new ArrayList<>();
AtomicBoolean f = new AtomicBoolean(false);
AtomicBoolean f = new AtomicBoolean(false); //是否下架
AtomicBoolean fa = new AtomicBoolean(false); //是否有包件
voList.forEach(i -> {
//查询是否已备货
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getParcelListId());
if(ObjectUtils.isNotNull(byId) && !byId.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue())){
fa.set(true);
DistributionStockEntity distributionStock = new DistributionStockEntity();
//修改包件备货状态
@ -1813,7 +1833,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
list1.add(distributionStock);
}
});
if(!f.get()){
if(!fa.get()){
return Resp.scanSuccess("当前托盘已完成备货!!","当前托盘已完成备货!!");
}
if(!f.get() ){
Long warehouseId ;
if(one.getStockUpType().equals("3")){
DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingMapper.selectById(stockupDTO.getReservationId());
@ -2674,12 +2697,14 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
* @return
*/
@Override
public boolean getTrayBoot(DistributionStockupOrderListVO vo) {
public boolean getTrayBoot(DistributionStockupOrderListVO vo,String type) {
// BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<WarehouseTrayGoodsEntity> trayIdList = warehouseTrayGoodsClient.getTrayIdList(vo.getTrayId(), vo.getPallet());
AtomicBoolean f = new AtomicBoolean(true);
trayIdList.stream().collect(Collectors.groupingBy(WarehouseTrayGoodsEntity::getTrayId)).
forEach((k,v) ->{
List<Long> di = new ArrayList<>();
// List<Long> di = new ArrayList<>();
// AtomicReference<Integer> s = new AtomicReference<>(0); //已扫数量
v.stream().forEach( i ->{
DistributionParcelListEntity byId = distributionParcelListService.getById(i.getAssociationId());
if(!vo.getStockArticleId().contains(byId.getStockArticleId().toString())){

Loading…
Cancel
Save