Browse Source

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

master
zhenghaoyu 6 days ago
parent
commit
c3fc901c23
  1. 12
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  2. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml
  3. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/MapWarehouseMapper.xml
  4. 14
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java

12
blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java

@ -17,6 +17,7 @@ import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@Service
@AllArgsConstructor
public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
@ -290,6 +292,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
// 干线发车
List<TrunklineCarsLoadScanEntity> allListByWaybillNo = traceCarsLoadScanClient.findAllListByWaybillNo(waybillNo);
log.info( ">> allListByWaybillNo ={}",allListByWaybillNo);
if (allListByWaybillNo != null && !allListByWaybillNo.isEmpty()) {
// 按照 车次号进行分组
Map<String, List<TrunklineCarsLoadScanEntity>> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadCode));
@ -371,7 +374,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
// 获取卸车集合
List<TrunklineCarsLoadScanEntity> collect = trunklineCarsLoadScanEntities.stream().filter(t -> t.getScanStatus().equals("2")).collect(Collectors.toList());
log.info(">>> collect ={}",collect);
if (collect.isEmpty()) {
return null;
}
@ -388,7 +391,9 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
private NodeInfoVO buildTrunklineByLoadCar(List<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, String key) {
// 判断trunklineCarsLoadScanEntities 中 warehouseId 不是null的集合
log.info(">>> trunklineCarsLoadScanEntities ={}",trunklineCarsLoadScanEntities);
List<TrunklineCarsLoadScanEntity> collect = trunklineCarsLoadScanEntities.stream().filter(t -> t.getWarehouseId() != null).collect(Collectors.toList());
log.info(">>> collect ={}",collect);
if (collect.isEmpty()) {
return null;
}
@ -403,7 +408,9 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
private NodeInfoVO buildFristRuKu(Map<String, List<DistributionParcelListEntity>> groupedByWarehouse, String departureWarehouseName, Integer totalCount) {
log.info( " >>> groupedByWarehouse={}",groupedByWarehouse);
log.info(" >>> departureWarehouseName={}",departureWarehouseName);
log.info(" >>> departureWarehouseName={}",totalCount);
if(groupedByWarehouse.isEmpty()){
return null;
}
@ -412,6 +419,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
nodeInfoVO.setOperateName("入库");
nodeInfoVO.setOperateWarehouseName(departureWarehouseName);
List<DistributionParcelListEntity> distributionParcelListEntities = groupedByWarehouse.get(departureWarehouseName);
log.info("入库集合:{}",distributionParcelListEntities);
if(distributionParcelListEntities==null || distributionParcelListEntities.isEmpty()){
return null;
}

1
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/BusinessRatioMapper.xml

@ -17,7 +17,6 @@
where create_time between #{startTime} and #{endTime} and brand is not null and brand != ''
group by brand
order by SUM(total_count) desc
limit 5
</select>
<select id="getAllBrand" resultType="com.logpm.report.vo.largeScreen.BusinessRatio.MapBrandVO">
select

1
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/largeScreen/MapWarehouseMapper.xml

@ -10,6 +10,7 @@
latitude as lat,
longitude as lng
from logpm_platform.logpm_warehouse_warehouse
where is_deleted=0 and name!='职能中心仓' and latitude is not null
</select>
<select id="lineInfolist" resultType="com.logpm.report.vo.largeScreen.MapWarehouse.LineInfoVO">
select

14
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java

@ -56,13 +56,13 @@ public class MapWarehouseServiceImpl implements IMapWarehouseService {
String[] endWarehouseIds = lineInfoVO.getEndWarehouseIds().split(",");
Long endWarehouseId = Long.valueOf(endWarehouseIds[endWarehouseIds.length - 1]);
WarehouseInfoVO warehouseInfo = warehouseInfoMap.get(endWarehouseId);
targetWarehouse.setWarehouseId(endWarehouseId);
targetWarehouse.setWarehouseName(warehouseInfo.getWarehouseName());
targetWarehouse.setLat(warehouseInfo.getLat());
targetWarehouse.setLng(warehouseInfo.getLng());
target.add(targetWarehouse);
if(warehouseInfo!=null){
targetWarehouse.setWarehouseId(endWarehouseId);
targetWarehouse.setWarehouseName(warehouseInfo.getWarehouseName());
targetWarehouse.setLat(warehouseInfo.getLat());
targetWarehouse.setLng(warehouseInfo.getLng());
target.add(targetWarehouse);
}
});
mapWarehouseVO.setTarget(target);

Loading…
Cancel
Save