Browse Source

Merge remote-tracking branch 'origin/pre-production'

master
zhenghaoyu 1 week ago
parent
commit
c4221c5d15
  1. 19
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  2. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  3. 2
      blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java
  4. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

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

@ -5841,9 +5841,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//订制品 //订制品
if (!packageEntityList.isEmpty() && packageEntityList.size() > 0) { if (!packageEntityList.isEmpty() && packageEntityList.size() > 0) {
packageFlag = packageEntityList.stream().allMatch(a->OrderPackageStockupStatusConstant.yibeihu.getValue().equals(a.getOrderPackageStockupStatus())); packageFlag = packageEntityList.stream().allMatch(a->OrderPackageStockupStatusConstant.yibeihu.getValue().equals(a.getOrderPackageStockupStatus()));
}else { } else {
packageFlag = true; packageFlag = true;
} }
}else {
packageFlag = true;
} }
//库存品 //库存品
if (!inventoryList.isEmpty() && inventoryList.size() > 0) { if (!inventoryList.isEmpty() && inventoryList.size() > 0) {
@ -5862,7 +5864,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
zeroFlag = true; zeroFlag = true;
} }
} }
}else { } else {
zeroFlag = true; zeroFlag = true;
} }
DistributionStockupEntity distributionStockupEntity = new DistributionStockupEntity(); DistributionStockupEntity distributionStockupEntity = new DistributionStockupEntity();
@ -6334,7 +6336,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (!stockListId.equals(disStockListDetailEntity.getStockListId())){ if (!stockListId.equals(disStockListDetailEntity.getStockListId())){
//对已有计划进行减少 //对已有计划进行减少
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(f -> !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0); DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(f -> !Objects.equals(f.getQuantity(), f.getRealityQuantity())).collect(Collectors.toList()).get(0);
deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); int updateNum = deliveryDetails.getQuantity() - 1;
if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) {
deliveryDetails.setStockStatus("3");
}
deliveryDetails.setQuantity(updateNum);
distributionDeliveryDetailsService.updateById(deliveryDetails); distributionDeliveryDetailsService.updateById(deliveryDetails);
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1); distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, 1);
distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1); distributionStockListMapper.updateInventoryQuantityOccupied(distributionStockListEntity.getId(), 1);
@ -6353,6 +6359,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
disStockListDetailEntity.setStockPackageCode(one.getCode()); disStockListDetailEntity.setStockPackageCode(one.getCode());
disStockListDetailEntity.setStockType(InventoryStockTypeStatusConstant.shengcheng.getValue()); disStockListDetailEntity.setStockType(InventoryStockTypeStatusConstant.shengcheng.getValue());
disStockListDetailEntity.setStockListId(distributionStockListEntity.getId()); disStockListDetailEntity.setStockListId(distributionStockListEntity.getId());
disStockListDetailService.updateById(disStockListDetailEntity);
distributionStockListService.updateById(distributionStockListEntity); distributionStockListService.updateById(distributionStockListEntity);
distributionStockListMapper.updateInventoryQuantityOccupied(disStockListDetailEntity.getStockListId(), disStockListDetailEntity.getNum()); distributionStockListMapper.updateInventoryQuantityOccupied(disStockListDetailEntity.getStockListId(), disStockListDetailEntity.getNum());
distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, num); distributionStockListMapper.decreaseStockListQuantityOccupied(stockListId, num);
@ -6360,7 +6367,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distrilbutionBillLadingService.maintenanceStockListStockup(reservationId, stockListId, myCurrentWarehouse.getId()); distrilbutionBillLadingService.maintenanceStockListStockup(reservationId, stockListId, myCurrentWarehouse.getId());
//对原计划进行减少 //对原计划进行减少
DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(r -> !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0); DistributionDeliveryDetailsEntity deliveryDetails = distributionDeliveryDetailsEntities.stream().filter(r -> !Objects.equals(r.getQuantity(), r.getRealityQuantity())).collect(Collectors.toList()).get(0);
deliveryDetails.setQuantity(deliveryDetails.getQuantity() - 1); int updateNum = deliveryDetails.getQuantity() - 1;
if (Objects.equals(updateNum,deliveryDetails.getRealityQuantity())) {
deliveryDetails.setStockStatus("3");
}
deliveryDetails.setQuantity(updateNum);
distributionDeliveryDetailsService.updateById(deliveryDetails); distributionDeliveryDetailsService.updateById(deliveryDetails);
} }
} }

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -3355,7 +3355,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda() List<DisStockListDetailEntity> listed = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, i.getId()) .eq(DisStockListDetailEntity::getReservationId, i.getId())
.eq(DisStockListDetailEntity::getSku, i.getSku()) .eq(DisStockListDetailEntity::getSku, i.getSku())
.eq(DisStockListDetailEntity::getStockListId, i.getStockListId())
.ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue())
); );
if (Func.isNotEmpty(listed)) { if (Func.isNotEmpty(listed)) {

2
blade-service/logpm-factory-data/logpm-factory-data-jinpai/src/main/java/com/logpm/factorydata/jinpai/service/impl/DeliveryNoteServiceImpl.java

@ -260,7 +260,7 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl<DeliveryNoteMapper,
// 如果有数量没有包条码,则生成系统包条 // 如果有数量没有包条码,则生成系统包条
if (CollUtil.isEmpty(boxCodes)) { if (CollUtil.isEmpty(boxCodes)) {
for (int i = 0; i < Convert.toInt(orderInfoVO.getGoodsNumber()); i++) { for (int i = 0; i < Convert.toInt(orderInfoVO.getGoodsNumber()); i++) {
boxCodes.add(orderInfoVO.getCustomItemNo() + "-" + (i + 1)); boxCodes.add(orderInfoVO.getCustomOrderNo() + orderInfoVO.getCustomItemNo() + "-" + (i + 1));
} }
} }
int size = boxCodes.size(); int size = boxCodes.size();

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

@ -16,6 +16,7 @@
*/ */
package com.logpm.warehouse.service.impl; package com.logpm.warehouse.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -305,6 +306,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
if (ObjectUtils.isNotNull(stockArticleEntity)) { if (ObjectUtils.isNotNull(stockArticleEntity)) {
detailEntity.setMarketName(stockArticleEntity.getMallName()); detailEntity.setMarketName(stockArticleEntity.getMallName());
} }
}else{
detailEntity.setMarketName(i.getMallName());
} }
detailEntity.setIncomingBatch(i.getOrderCode()); detailEntity.setIncomingBatch(i.getOrderCode());
return detailEntity; return detailEntity;
@ -843,6 +846,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}", 45); log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> tag {}", 45);
try{
Long taskID; Long taskID;
if (ObjectUtils.isNotNull(i.getId())) { if (ObjectUtils.isNotNull(i.getId())) {
taskID = i.getId(); taskID = i.getId();
@ -977,6 +981,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
detailEntityList.add(questDetail); detailEntityList.add(questDetail);
} }
}catch (Exception e){
log.error("######系统异常",e);
throw new CustomerException(405,e.getMessage());
}
} }
@ -2940,7 +2948,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
questDetail.setMarketNames(marketNames); questDetail.setMarketNames(marketNames);
List<QuestDetailEntity> questDetailEntityList = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetail); List<QuestDetailEntity> questDetailEntityList = baseMapper.selectQuestDetailList(taskSearchDTO.getQuestNum(), questDetail);
if (questDetailEntityList.isEmpty() || ObjectUtils.isNull(questDetailEntityList) || ObjectUtils.isNull(questDetailEntityList.get(0).getQuestId())) { if (CollUtil.isEmpty(questDetailEntityList)) {
// 需要判读这个盘点任务 是否存在绑定的商场 // 需要判读这个盘点任务 是否存在绑定的商场
R<Object> extracted = extracted(questId, questDetail); R<Object> extracted = extracted(questId, questDetail);
@ -2950,8 +2958,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
// 需要去业务系统上进行查询信息 // 需要去业务系统上进行查询信息
List<DistributionParcelListEntity> byPacketBarCode = distributionParcelListClient.findByPacketBarCode(questDetail.getOrderPackageCode()); List<DistributionParcelListEntity> byPacketBarCode = distributionParcelListClient.findByPacketBarCode(questDetail.getOrderPackageCode());
// DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(questDetail.getOrderPackageCode(), warehouseId);
if (ObjectUtils.isEmpty(byPacketBarCode)) { if (CollUtil.isEmpty(byPacketBarCode)) {
return R.fail(5000, "包件信息不存在!!"); return R.fail(5000, "包件信息不存在!!");
} else { } else {
for (DistributionParcelListEntity distributionParcelListEntity : byPacketBarCode) { for (DistributionParcelListEntity distributionParcelListEntity : byPacketBarCode) {

Loading…
Cancel
Save