Browse Source

Merge branch 'fix_bug_20231227' into dev

single_db
pref_mail@163.com 1 year ago
parent
commit
e675f4b292
  1. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  2. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  3. 16
      blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -422,7 +422,16 @@
ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name,
ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status,
GROUP_CONCAT( DISTINCT lwtg.tray_code ) trays,
GROUP_CONCAT( DISTINCT lwug.position_code ) allocation
GROUP_CONCAT( DISTINCT lwug.position_code ) allocation,
(select COUNT(ldp.id)
from logpm_distribution_parcel_list ldp
where ldp.stock_article_id = ldsa.id and ldp.order_package_status = 70
) signinQuantity,
sum((
select COUNT(ldl.id)
from logpm_distribution_loadscan ldl
where ldl.package_id = ldpl.id and ldl.signfor_state = 1
)) deliveryQuantity
from logpm_distribution_stock_article ldsa
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -50,6 +50,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.utils.CommonUtil;
@ -847,9 +848,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
IPage<DistributionStockArticleEntity> distributionStockArticleEntityIPage = baseMapper.pageListOwe(page, stockArticleEntity);
distributionStockArticleEntityIPage.getRecords().stream().forEach(i ->{
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.getStockArticleQueryQuantity(i.getId());
/* DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.getStockArticleQueryQuantity(i.getId());
i.setDeliveryQuantity(distributionStockArticleEntity.getDeliveryQuantity());
i.setSigninQuantity(distributionStockArticleEntity.getSigninQuantity());
List<DistributionParcelListEntity> list = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, i.getId())
.eq(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiqianshou.getValue())
);
i.setSigninQuantity(distributionStockArticleEntity.getSigninQuantity() + list.size() );*/
if(i.getIsZero().equals("1")){
//查询托盘
WarehouseTrayGoodsEntity warehouseTrayGoods = new WarehouseTrayGoodsEntity();

16
blade-service/logpm-factory/src/main/java/com/logpm/factory/pan/service/impl/PanFactoryDataServiceImpl.java

@ -392,15 +392,15 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
takeCompany = supplyData.get("takeCompany");
}
OrderDetailEntity orderDetailEntity = orderDetailClient.findByUnitNo(unitNo);
if(Objects.isNull(orderDetailEntity)){
logger.warn("############handleDataToPlatform: 包条信息不存在 unitNo={}",unitNo);
throw new CustomerException(405, "包条信息不存在");
}
Integer oldId = orderDetailEntity.getNowWarehouseId();
// OrderDetailEntity orderDetailEntity = orderDetailClient.findByUnitNo(unitNo);
// if(Objects.isNull(orderDetailEntity)){
// logger.warn("############handleDataToPlatform: 包条信息不存在 unitNo={}",unitNo);
// throw new CustomerException(405, "包条信息不存在");
// }
// Integer oldId = orderDetailEntity.getNowWarehouseId();
// 查询数据对应的仓库名称
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(oldId);
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.findByName(destinationWarehouse);
if(Objects.isNull(basicdataWarehouseEntity)){
logger.warn("############handleDataToPlatform: 仓库信息不存在 destinationWarehouse={}",destinationWarehouse);
throw new CustomerException(405, "仓库信息不存在");
@ -558,7 +558,7 @@ public class PanFactoryDataServiceImpl implements IPanFactoryDataService {
}
//保存包件信息
saveOrderPackage(unitNo, distributionStockArticleEntity, basicdataWarehouseEntity, waybillNoNum,operationTime,oldId);
saveOrderPackage(unitNo, distributionStockArticleEntity, basicdataWarehouseEntity, waybillNoNum,operationTime,basicdataWarehouseEntity.getOldId());
logger.info("#################handleDataToPlatform: 数据处理完成");
} else {

Loading…
Cancel
Save