|
@@ -6,7 +6,6 @@ import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
|
-import com.sckw.core.exception.BusinessException;
|
|
|
|
|
import com.sckw.core.model.constant.Global;
|
|
import com.sckw.core.model.constant.Global;
|
|
|
import com.sckw.core.model.constant.NumberConstant;
|
|
import com.sckw.core.model.constant.NumberConstant;
|
|
|
import com.sckw.core.model.constant.UrlConstants;
|
|
import com.sckw.core.model.constant.UrlConstants;
|
|
@@ -2866,20 +2865,20 @@ public class KwtWaybillOrderV1Service {
|
|
|
* @author zk
|
|
* @author zk
|
|
|
* @date 2024/3/13
|
|
* @date 2024/3/13
|
|
|
**/
|
|
**/
|
|
|
- public HttpResult queryBillOrderInfo(WaybillOrderRequest params) {
|
|
|
|
|
- if (Objects.nonNull( params.getWOrderId())){
|
|
|
|
|
|
|
+ public WaybillOrderDetailVo queryBillOrderInfo(WaybillOrderRequest params) {
|
|
|
|
|
+ if (params.getwOrderId() == null) {
|
|
|
throw new RuntimeException("运单号id不能为空");
|
|
throw new RuntimeException("运单号id不能为空");
|
|
|
}
|
|
}
|
|
|
//运单信息
|
|
//运单信息
|
|
|
- KwtWaybillOrderV1 waybillOrder = waybillOrderV1Dao.selectById(params.getWOrderId());
|
|
|
|
|
|
|
+ KwtWaybillOrderV1 waybillOrder = waybillOrderV1Dao.selectById(params.getwOrderId());
|
|
|
if (waybillOrder == null) {
|
|
if (waybillOrder == null) {
|
|
|
- return HttpResult.error("运单" + params.getWOrderId() + "不存在,请确认!");
|
|
|
|
|
|
|
+ throw new RuntimeException("运单" + params.getwOrderId() + "不存在,请确认!");
|
|
|
}
|
|
}
|
|
|
WaybillOrderDetailVo orderDetailVo = new WaybillOrderDetailVo();
|
|
WaybillOrderDetailVo orderDetailVo = new WaybillOrderDetailVo();
|
|
|
//车队车辆映射关系
|
|
//车队车辆映射关系
|
|
|
RFleetDriverVo fleetByDriveId = remoteFleetService.findFleetByDriveId(waybillOrder.getDriverId());
|
|
RFleetDriverVo fleetByDriveId = remoteFleetService.findFleetByDriveId(waybillOrder.getDriverId());
|
|
|
if (fleetByDriveId == null) {
|
|
if (fleetByDriveId == null) {
|
|
|
- return HttpResult.error("运单:" + params.getWOrderId(), "车辆信息不存在,请确认!");
|
|
|
|
|
|
|
+ throw new RuntimeException("运单:" + params.getwOrderId() + ", 车辆信息不存在,请确认!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//查询车辆信息
|
|
//查询车辆信息
|
|
@@ -2895,10 +2894,10 @@ public class KwtWaybillOrderV1Service {
|
|
|
orderDetailVo.setEntId(waybillOrder.getEntId());
|
|
orderDetailVo.setEntId(waybillOrder.getEntId());
|
|
|
orderDetailVo.setEntName(Optional.ofNullable(entCacheResDto).map(EntCacheResDto::getFirmName).orElse(""));
|
|
orderDetailVo.setEntName(Optional.ofNullable(entCacheResDto).map(EntCacheResDto::getFirmName).orElse(""));
|
|
|
|
|
|
|
|
- //查询定制信息
|
|
|
|
|
|
|
+ //查询位置信息
|
|
|
List<KwtWaybillOrderAddress> orderAddresses = waybillOrderAddressRepository.queryBywOrderIds(Arrays.asList(waybillOrder.getId()));
|
|
List<KwtWaybillOrderAddress> orderAddresses = waybillOrderAddressRepository.queryBywOrderIds(Arrays.asList(waybillOrder.getId()));
|
|
|
if (CollectionUtils.isEmpty(orderAddresses)) {
|
|
if (CollectionUtils.isEmpty(orderAddresses)) {
|
|
|
- return HttpResult.error("运单:" + params.getWOrderId(), "地址信息不存在,请确认!");
|
|
|
|
|
|
|
+ throw new RuntimeException("运单:" + params.getwOrderId() + ", 地址信息不存在,请确认!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Map<Integer, String> addressNameMap = orderAddresses.stream()
|
|
Map<Integer, String> addressNameMap = orderAddresses.stream()
|
|
@@ -2912,6 +2911,6 @@ public class KwtWaybillOrderV1Service {
|
|
|
));
|
|
));
|
|
|
orderDetailVo.setAddresses(addressNameMap);
|
|
orderDetailVo.setAddresses(addressNameMap);
|
|
|
|
|
|
|
|
- return HttpResult.ok(orderDetailVo);
|
|
|
|
|
|
|
+ return orderDetailVo;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|