|
@@ -2223,7 +2223,7 @@ public class KwtLogisticsConsignmentService {
|
|
|
public PageDataResult<LogisticsOrderResp> queryLogisticsOrderByPage(QueryLogisticsOrderReq req) {
|
|
public PageDataResult<LogisticsOrderResp> queryLogisticsOrderByPage(QueryLogisticsOrderReq req) {
|
|
|
log.info("分页查询物流订单传递参数信息:{}", JSONObject.toJSONString(req));
|
|
log.info("分页查询物流订单传递参数信息:{}", JSONObject.toJSONString(req));
|
|
|
|
|
|
|
|
- Set<Long> allEnt = getAllEnt(req);
|
|
|
|
|
|
|
+ Set<Long> allEnt = getAllEnt(req.getEntId());
|
|
|
//根据托运单位或者承运单位查询企业
|
|
//根据托运单位或者承运单位查询企业
|
|
|
Set<Long> entList = getEntList(req);
|
|
Set<Long> entList = getEntList(req);
|
|
|
|
|
|
|
@@ -2367,23 +2367,21 @@ public class KwtLogisticsConsignmentService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@NotNull
|
|
@NotNull
|
|
|
- private Set<Long> getAllEnt(QueryLogisticsOrderReq req) {
|
|
|
|
|
|
|
+ private Set<Long> getAllEnt(String entId) {
|
|
|
Set<Long> allEnt = Sets.newHashSet();
|
|
Set<Long> allEnt = Sets.newHashSet();
|
|
|
//根据企业类型查询企业
|
|
//根据企业类型查询企业
|
|
|
- if (StringUtils.isBlank(req.getEntId())){
|
|
|
|
|
- req.setEntId(String.valueOf(LoginUserHolder.getEntId()));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Long enterId = StringUtils.isBlank(entId) ? LoginUserHolder.getEntId() : Long.parseLong(entId);
|
|
|
|
|
|
|
|
- if (StringUtils.isBlank(req.getEntId())){
|
|
|
|
|
|
|
+ if (Objects.isNull(enterId)){
|
|
|
return allEnt;
|
|
return allEnt;
|
|
|
}
|
|
}
|
|
|
- allEnt.add( Long.parseLong(req.getEntId()));
|
|
|
|
|
- EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(Long.parseLong(req.getEntId()));
|
|
|
|
|
|
|
+ allEnt.add( enterId);
|
|
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(enterId);
|
|
|
if (Objects.nonNull(entCacheResDto)) {
|
|
if (Objects.nonNull(entCacheResDto)) {
|
|
|
EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntTreeById(entCacheResDto.getId());
|
|
EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntTreeById(entCacheResDto.getId());
|
|
|
List<EntCacheResDto> child = entCacheResDto1.getChild();
|
|
List<EntCacheResDto> child = entCacheResDto1.getChild();
|
|
|
if (CollectionUtils.isNotEmpty(child)) {
|
|
if (CollectionUtils.isNotEmpty(child)) {
|
|
|
- allEnt.addAll(child.stream().filter(x->x.getEntTypes().contains(req.getEntType())).map(EntCacheResDto::getId).toList());
|
|
|
|
|
|
|
+ allEnt.addAll(child.stream().map(EntCacheResDto::getId).toList());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return allEnt;
|
|
return allEnt;
|
|
@@ -2681,9 +2679,9 @@ public class KwtLogisticsConsignmentService {
|
|
|
public PageDataResult<CapacityVo> pageCapacity(CapacityReq req) {
|
|
public PageDataResult<CapacityVo> pageCapacity(CapacityReq req) {
|
|
|
log.info("查询车辆列表请求:{}", JSON.toJSONString( req));
|
|
log.info("查询车辆列表请求:{}", JSON.toJSONString( req));
|
|
|
Long logOrderId = Long.parseLong(req.getLogOrderId());
|
|
Long logOrderId = Long.parseLong(req.getLogOrderId());
|
|
|
- Long entId = Long.parseLong(req.getEntId());
|
|
|
|
|
|
|
+ Set<Long> allEnt = getAllEnt(req.getEntId());
|
|
|
IPage<KwtLogisticsOrderCirculate> page = logisticsOrderCirculateRepository.queryByPage(req.getPageNum(),
|
|
IPage<KwtLogisticsOrderCirculate> page = logisticsOrderCirculateRepository.queryByPage(req.getPageNum(),
|
|
|
- req.getPageSize(), req.getTruckNo(),entId, logOrderId);
|
|
|
|
|
|
|
+ req.getPageSize(), req.getTruckNo(),allEnt, logOrderId);
|
|
|
List<KwtLogisticsOrderCirculate> records = page.getRecords();
|
|
List<KwtLogisticsOrderCirculate> records = page.getRecords();
|
|
|
|
|
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty( records)){
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty( records)){
|
|
@@ -2712,8 +2710,7 @@ public class KwtLogisticsConsignmentService {
|
|
|
//查询运单信息
|
|
//查询运单信息
|
|
|
Map<Long, List<KwtWaybillOrder>> billOrderIdAndWaybillOrderMap = Maps.newHashMap();
|
|
Map<Long, List<KwtWaybillOrder>> billOrderIdAndWaybillOrderMap = Maps.newHashMap();
|
|
|
if (CollectionUtils.isNotEmpty(billOrderIds)){
|
|
if (CollectionUtils.isNotEmpty(billOrderIds)){
|
|
|
- List<KwtWaybillOrder> waybillOrders = waybillOrderRepository.queryByBillOrderIdsAndEntId(billOrderIds,
|
|
|
|
|
- entId);
|
|
|
|
|
|
|
+ List<KwtWaybillOrder> waybillOrders = waybillOrderRepository.queryByBillOrderIds(billOrderIds);
|
|
|
if (CollectionUtils.isNotEmpty(waybillOrders)){
|
|
if (CollectionUtils.isNotEmpty(waybillOrders)){
|
|
|
billOrderIdAndWaybillOrderMap = waybillOrders.stream().filter(x->Objects.equals(x.getStatus(),
|
|
billOrderIdAndWaybillOrderMap = waybillOrders.stream().filter(x->Objects.equals(x.getStatus(),
|
|
|
CarWaybillEnum.APPROVAL_PASS.getCode()))
|
|
CarWaybillEnum.APPROVAL_PASS.getCode()))
|