|
@@ -629,7 +629,9 @@ public class GatekeeperOrderService {
|
|
|
resp.setOrderStatusStatistics(buildDefaultStatusStatistics());
|
|
resp.setOrderStatusStatistics(buildDefaultStatusStatistics());
|
|
|
return resp;
|
|
return resp;
|
|
|
}
|
|
}
|
|
|
- resp.setOrderStatusStatistics(calculateStatusStatistics(orderList));
|
|
|
|
|
|
|
+ //过滤山上/山下门卫数据
|
|
|
|
|
+ List<KwtGatekeeperWaybillOrder> filterResult = filterGatekeeper(orderList);
|
|
|
|
|
+ resp.setOrderStatusStatistics(calculateStatusStatistics(filterResult));
|
|
|
return resp;
|
|
return resp;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -668,6 +670,40 @@ public class GatekeeperOrderService {
|
|
|
return defaultList;
|
|
return defaultList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 过滤山上/山下门卫数据:待放行时候区分
|
|
|
|
|
+ * @param gatekeeperOrderPageResult
|
|
|
|
|
+ */
|
|
|
|
|
+ private List<KwtGatekeeperWaybillOrder> filterGatekeeper(List<KwtGatekeeperWaybillOrder> gatekeeperOrderPageResult) {
|
|
|
|
|
+ Long userId = LoginUserHolder.getUserId();
|
|
|
|
|
+ log.info("门卫用户id:{}", userId);
|
|
|
|
|
+ KwsUserResDto kwsUserResDto = remoteSystemService.queryByUserId(userId);
|
|
|
|
|
+ log.info("门卫用户信息:{}", JSON.toJSONString(kwsUserResDto));
|
|
|
|
|
+ if (kwsUserResDto == null) {
|
|
|
|
|
+ throw new BusinessPlatfromException(ErrorCodeEnum.PARAM_ERROR, "用户数据不能为空!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return gatekeeperOrderPageResult.stream()
|
|
|
|
|
+ .filter(order -> {
|
|
|
|
|
+ // status不等于10的订单,不做地磅过滤
|
|
|
|
|
+ if (!Objects.equals(order.getStatus(), 10)) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 地磅为空的数据,山上山下都保留
|
|
|
|
|
+ Long weighbridgeId = order.getWeighbridgeId();
|
|
|
|
|
+ if (weighbridgeId == null) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 山下(邓总):只保留 10100111L
|
|
|
|
|
+ if (Objects.equals(kwsUserResDto.getType(), 1)) {
|
|
|
|
|
+ return weighbridgeId == 10100111L;
|
|
|
|
|
+ }
|
|
|
|
|
+ // 山上:只保留 10100112L 或 10100113L
|
|
|
|
|
+ return weighbridgeId == 10100112L || weighbridgeId == 10100113L;
|
|
|
|
|
+ })
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 计算运单状态统计
|
|
* 计算运单状态统计
|
|
|
* @param orderList
|
|
* @param orderList
|