|
|
|
@ -230,6 +230,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
stockEntity.setStockupArea(distributionStocks.getStockupArea()); //自编码
|
|
|
|
|
stockEntity.setStockupId(distributionStocks.getStockupId()); //自编码
|
|
|
|
|
stockEntity.setType(1); |
|
|
|
|
stockEntity.setStockQuantity(1); |
|
|
|
|
stockEntity.setOutboundType(byId1.getTypeService());//类型
|
|
|
|
|
list.add(stockEntity); |
|
|
|
|
//修改备货状态
|
|
|
|
@ -237,10 +238,15 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
parcelListEntity.setId(Long.parseLong(i)); |
|
|
|
|
parcelListEntity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.yibeihu.getValue()); |
|
|
|
|
distributionParcelListService.updateById(parcelListEntity); |
|
|
|
|
// distributionStockService.list(Wrappers.<S>query().lambda().eq());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
if(ObjectUtils.isNotNull(distributionStocks.getStockupType()) && distributionStocks.getStockupType().equals("ZT")){ |
|
|
|
|
//修改备货状态
|
|
|
|
|
//修改备货状态 自提
|
|
|
|
|
getUpdateOrderState(distributionStocks.getStockupId(),3 ); |
|
|
|
|
}else{ |
|
|
|
|
//修改备货状态
|
|
|
|
@ -258,9 +264,11 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
@Override |
|
|
|
|
public void getUpdateOrderState(Long pageId,int type) { |
|
|
|
|
switch (type){ |
|
|
|
|
case 1: //订单
|
|
|
|
|
DistributionStockVO distributionStockVO = baseMapper.selectParcelList(pageId); |
|
|
|
|
if(ObjectUtils.isNotNull(distributionStockVO) && ObjectUtils.isNotNull(distributionStockVO.getScanned())){ |
|
|
|
|
case 1: //修改订单备货状态
|
|
|
|
|
DistributionStockVO distributionStockVO = baseMapper.selectParcelList(pageId); //查询有多少待备货的包件
|
|
|
|
|
Optional<DistributionStockVO> stockVOptional = Optional.ofNullable(distributionStockVO); |
|
|
|
|
if(stockVOptional.isPresent()){ |
|
|
|
|
//已经备货完成
|
|
|
|
|
if(distributionStockVO.getScanned() == 0){ |
|
|
|
|
//修改
|
|
|
|
|
DistributionStockArticleEntity distributionStockArticle = new DistributionStockArticleEntity(); |
|
|
|
@ -274,18 +282,18 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
DistributionStockVO distributionStockVO1 = baseMapper.selectStockupInfo(pageId); |
|
|
|
|
//查询库存品
|
|
|
|
|
DistributionDeliveryDetailsVO distributionOrder = distributionDeliveryDetailsService.selectOrderCount(pageId); |
|
|
|
|
if(ObjectUtils.isNotNull(distributionStockVO1.getScanned()) && distributionStockVO1.getScanned() == 0 ){ |
|
|
|
|
if(ObjectUtils.isNotNull(distributionStockVO1.getScanned()) && distributionStockVO1.getScanned() == 0 ){ //已扫数为o
|
|
|
|
|
//修改备货任务
|
|
|
|
|
if(ObjectUtils.isNotNull(distributionOrder)){ |
|
|
|
|
int i = ObjectUtils.isNotNull(distributionOrder.getEsauNum()) ? distributionOrder.getEsauNum() : 0; |
|
|
|
|
int ii = ObjectUtils.isNotNull(distributionOrder.getWholeNum()) ? distributionOrder.getWholeNum() : 0; |
|
|
|
|
if(i == ii){ |
|
|
|
|
//查询库存品
|
|
|
|
|
getUpdateStockup(pageId); |
|
|
|
|
//查询备货状态
|
|
|
|
|
getUpdateStockup(pageId,2); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
//查询库存品
|
|
|
|
|
getUpdateStockup(pageId); |
|
|
|
|
//查询备货状态
|
|
|
|
|
getUpdateStockup(pageId,2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
@ -301,11 +309,14 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
int ii = ObjectUtils.isNotNull(distributionSelf.getWholeNum()) ? distributionSelf.getWholeNum() : 0; |
|
|
|
|
if(i == ii){ |
|
|
|
|
//修改备货任务
|
|
|
|
|
getUpdateStockup(pageId); |
|
|
|
|
getUpdateStockup(pageId,2); |
|
|
|
|
}else{ |
|
|
|
|
//没有完成
|
|
|
|
|
getUpdateStockup(pageId,1); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
//修改备货任务
|
|
|
|
|
getUpdateStockup(pageId); |
|
|
|
|
getUpdateStockup(pageId,2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -315,10 +326,23 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
private void getUpdateStockup(Long pageId){ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 修改备货状态 |
|
|
|
|
* @param pageId |
|
|
|
|
* @param type |
|
|
|
|
*/ |
|
|
|
|
private void getUpdateStockup(Long pageId,int type){ |
|
|
|
|
DistributionStockupEntity distributionStockupEntity = new DistributionStockupEntity(); |
|
|
|
|
distributionStockupEntity.setId(pageId); |
|
|
|
|
distributionStockupEntity.setStockupStatus(StockupStatusConstant.yibeihuo.getValue()); |
|
|
|
|
switch (type){ |
|
|
|
|
case 1: //备货中
|
|
|
|
|
distributionStockupEntity.setStockupStatus(StockupStatusConstant.beihuozhong.getValue()); |
|
|
|
|
break; |
|
|
|
|
case 2: // 已备货
|
|
|
|
|
distributionStockupEntity.setStockupStatus(StockupStatusConstant.yibeihuo.getValue()); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
distributionStockupMapper.updateById(distributionStockupEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|