Browse Source

包件明细导出BUG修复

master
汤建军 9 months ago
parent
commit
b24b8d5c50
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  2. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -929,6 +929,12 @@
<if test="paramMap.warehouseId != null and paramMap.warehouseId != ''">
and ldpl.warehouse_id = #{paramMap.warehouseId}
</if>
<if test="paramMap.warehouseIds != null ">
and ldpl.warehouse_id IN
<foreach collection="paramMap.warehouseIds" item="wItem" index="index" open="(" close=")" separator=",">
#{wItem}
</foreach>
</if>
<if test="paramMap.tenantId != null and paramMap.tenantId != ''">
and ldpl.tenant_id = #{paramMap.tenantId}
</if>

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

@ -677,7 +677,13 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
// 获取当前登录的仓库信息
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
throw new ServiceException("没有仓库信息!");
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()) {
List<Long> warehouseIds = warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
paramMap.put("warehouseIds", warehouseIds);
}
}else {
paramMap.put("warehouseId", myCurrentWarehouse.getId());
}
// 用户勾选数据的ids
Object ids = paramMap.get("ids");
@ -687,7 +693,6 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
String tenantId = AuthUtil.getTenantId();
paramMap.put("warehouseId", myCurrentWarehouse.getId());
paramMap.put("tenantId", tenantId);
List<DistributionParcelListExcel> list = baseMapper.exportDistributionParcelList(paramMap, idArr);

Loading…
Cancel
Save