|
@@ -552,9 +552,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
*/
|
|
*/
|
|
|
private void insertSubcontractLogisticsOrderUnit(SubcontractConsignmentDTO bo, Long orderId) {
|
|
private void insertSubcontractLogisticsOrderUnit(SubcontractConsignmentDTO bo, Long orderId) {
|
|
|
EntCacheResDto consignentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getConsignCompanyId()));
|
|
EntCacheResDto consignentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getConsignCompanyId()));
|
|
|
-// .setContactsId(consignentMap.get(Long.parseLong(bo.getConsignCompanyId())).getContactsId())
|
|
|
|
|
EntCacheResDto checkentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getCheckCompanyId()));
|
|
EntCacheResDto checkentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getCheckCompanyId()));
|
|
|
-////.setContactsId(checkentMap.get(Long.parseLong(bo.getCheckCompanyId())).getContactsId())
|
|
|
|
|
KwtLogisticsOrderUnit checkUnit = new KwtLogisticsOrderUnit()
|
|
KwtLogisticsOrderUnit checkUnit = new KwtLogisticsOrderUnit()
|
|
|
.setLOrderId(orderId)
|
|
.setLOrderId(orderId)
|
|
|
.setId(new IdWorker(NumberConstant.ONE).nextId())
|
|
.setId(new IdWorker(NumberConstant.ONE).nextId())
|
|
@@ -699,7 +697,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
KwtLogisticsOrder logisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
KwtLogisticsOrder logisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
.eq(StringUtils.isNotBlank(orderDTO.getLOrderId()), KwtLogisticsOrder::getId, orderDTO.getLOrderId())
|
|
.eq(StringUtils.isNotBlank(orderDTO.getLOrderId()), KwtLogisticsOrder::getId, orderDTO.getLOrderId())
|
|
|
.eq(StringUtils.isNotBlank(orderDTO.getLOrderNo()), KwtLogisticsOrder::getLOrderNo, orderDTO.getLOrderNo())
|
|
.eq(StringUtils.isNotBlank(orderDTO.getLOrderNo()), KwtLogisticsOrder::getLOrderNo, orderDTO.getLOrderNo())
|
|
|
- /*.eq(KwtLogisticsOrder::getEntId, LoginUserHolder.getEntId())*/
|
|
|
|
|
);
|
|
);
|
|
|
if (logisticsOrder == null) {
|
|
if (logisticsOrder == null) {
|
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
@@ -985,7 +982,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
/**车载计算方式*/
|
|
/**车载计算方式*/
|
|
|
Map<String, String> weightDictData = getDictData(DictTypeEnum.WEIGHT_CAR.getType());
|
|
Map<String, String> weightDictData = getDictData(DictTypeEnum.WEIGHT_CAR.getType());
|
|
|
/**签约方式*/
|
|
/**签约方式*/
|
|
|
- Map<String, String> singDictData = getDictData(DictTypeEnum.SIGNING_TYPE.getType());
|
|
|
|
|
|
|
+// Map<String, String> singDictData = getDictData(DictTypeEnum.SIGNING_TYPE.getType());
|
|
|
/**计费方式*/
|
|
/**计费方式*/
|
|
|
Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
|
|
Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
|
|
|
/**结算周期*/
|
|
/**结算周期*/
|
|
@@ -1042,51 +1039,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
allList.addAll(voList);
|
|
allList.addAll(voList);
|
|
|
}
|
|
}
|
|
|
return PageRes.build(pageInfo, allList);
|
|
return PageRes.build(pageInfo, allList);
|
|
|
-// for (String lOrderId : stringList) {
|
|
|
|
|
-// List<SubcontractConsignmentVO> list = logisticsOrderMapper.getSubcontractConsignmentNotPage(lOrderId);
|
|
|
|
|
-// //联查数据
|
|
|
|
|
-// if (CollectionUtils.isNotEmpty(list)) {
|
|
|
|
|
-// for (SubcontractConsignmentVO subcontractConsignmentVO : list) {
|
|
|
|
|
-// //关联父级承运单据号
|
|
|
|
|
-// if (subcontractConsignmentVO.getPid() != null) {
|
|
|
|
|
-// KwtLogisticsOrder kwtLogisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>().eq(KwtLogisticsOrder::getId, subcontractConsignmentVO.getPid()));
|
|
|
|
|
-// if (kwtLogisticsOrder != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setCarrierOrderNo(kwtLogisticsOrder.getLOrderNo());
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// subcontractConsignmentVO.setStatusLabel(LogisticsOrderEnum.getDestination(subcontractConsignmentVO.getStatus()));
|
|
|
|
|
-// if (subcontractConsignmentVO.getPriceType() != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setPriceTypeLabel(priceDictData == null ? null : priceDictData.get(subcontractConsignmentVO.getPriceType()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (subcontractConsignmentVO.getLossUnit() != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setLossUnitLabel(weightDictData == null ? null : weightDictData.get(subcontractConsignmentVO.getLossUnit()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (subcontractConsignmentVO.getGoodsPriceUnit() != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setGoodsPriceUnitLabel(priceDictData == null ? null : priceDictData.get(subcontractConsignmentVO.getGoodsPriceUnit()));
|
|
|
|
|
-// }
|
|
|
|
|
-// //分包托运不需要展示签约方式
|
|
|
|
|
-//// subcontractConsignmentVO.setContractSigningWay(singDictData == null ? null : singDictData.get(subcontractConsignmentVO.getContractSigningWay()));
|
|
|
|
|
-// if (subcontractConsignmentVO.getBillingMode() != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setBillingModeLabel(chargingDictData == null ? null : chargingDictData.get(subcontractConsignmentVO.getBillingMode()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (subcontractConsignmentVO.getSettlementCycle() != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setSettlementCycleLabel(settlementDictData == null ? null : settlementDictData.get(subcontractConsignmentVO.getSettlementCycle()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (subcontractConsignmentVO.getCreateBy() != null) {
|
|
|
|
|
-// UserCacheResDto userCacheResDto = remoteSystemService.queryUserCacheById(Long.parseLong(subcontractConsignmentVO.getCreateBy()));
|
|
|
|
|
-// if (userCacheResDto != null) {
|
|
|
|
|
-// subcontractConsignmentVO.setCreateName(userCacheResDto.getName());
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// subcontractConsignmentVO.setLoadAddressDetail(subcontractConsignmentVO.getLoadCityName() + subcontractConsignmentVO.getLoadAddress());
|
|
|
|
|
-// subcontractConsignmentVO.setUnloadAddressDetail(subcontractConsignmentVO.getUnloadCityName() + subcontractConsignmentVO.getUnloadAddress());
|
|
|
|
|
-// }
|
|
|
|
|
-// allList.addAll(list);
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// List<SubcontractConsignmentVO> returnList = allList.stream().skip((page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
|
|
|
|
-// PageResult build = PageResult.build(page, pageSize, allList.stream().count(), returnList);
|
|
|
|
|
-// return HttpResult.ok(build);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1187,12 +1139,10 @@ public class KwtAcceptCarriageOrderService {
|
|
|
Map<String, String> dictData = commonService.getDictData(DictTypeEnum.TRUCK_TYPE.getType());
|
|
Map<String, String> dictData = commonService.getDictData(DictTypeEnum.TRUCK_TYPE.getType());
|
|
|
for (DriverListVo driverListVo : list) {
|
|
for (DriverListVo driverListVo : list) {
|
|
|
if (!driverListVo.getCirculateId().isEmpty()) {
|
|
if (!driverListVo.getCirculateId().isEmpty()) {
|
|
|
-// driverListVo.setStatus(1);
|
|
|
|
|
driverListVo.setStatusLabel(CarWaybillEnum.PENDING_ORDER.getDestination());
|
|
driverListVo.setStatusLabel(CarWaybillEnum.PENDING_ORDER.getDestination());
|
|
|
}
|
|
}
|
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
|
-// driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
- if (truck.get(driverListVo.getTruckNo()) != null) {
|
|
|
|
|
|
|
+ if (truck.get(driverListVo.getTruckNo()) != null) {
|
|
|
driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
}
|
|
}
|
|
|
if (driverListVo.getTransportStatus() != null) {
|
|
if (driverListVo.getTransportStatus() != null) {
|
|
@@ -1200,8 +1150,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
String truckType = truck.get(driverListVo.getTruckNo()).getTruckType();
|
|
String truckType = truck.get(driverListVo.getTruckNo()).getTruckType();
|
|
|
if (StringUtils.isNotBlank(truckType)) {
|
|
if (StringUtils.isNotBlank(truckType)) {
|
|
|
-// driverListVo.setCarType(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTruckType());
|
|
|
|
|
- driverListVo.setCarType(dictData.get(truckType));
|
|
|
|
|
|
|
+ driverListVo.setCarType(dictData.get(truckType));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1350,13 +1299,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
streamBridge.send("sckw-busSum", com.alibaba.fastjson2.JSON.toJSONString(busSum));
|
|
streamBridge.send("sckw-busSum", com.alibaba.fastjson2.JSON.toJSONString(busSum));
|
|
|
jsonObject.put("status", HttpStatus.SUCCESS_CODE);
|
|
jsonObject.put("status", HttpStatus.SUCCESS_CODE);
|
|
|
jsonObject.put("message", "停止接单成功");
|
|
jsonObject.put("message", "停止接单成功");
|
|
|
-
|
|
|
|
|
-// KwtWaybillOrder waybillOrder = waybillOrderMapper.selectOne(new LambdaUpdateWrapper<KwtWaybillOrder>().eq(KwtWaybillOrder::getId, wOrderId));
|
|
|
|
|
-// if (waybillOrder == null) {
|
|
|
|
|
-// jsonObject.put("status", HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
|
|
|
-// jsonObject.put("message", "单据不存在或者单据异常");
|
|
|
|
|
-// } else {
|
|
|
|
|
-// }
|
|
|
|
|
list.add(jsonObject);
|
|
list.add(jsonObject);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -1802,12 +1744,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
public HttpResult getCancelReason(String id, Integer status) {
|
|
public HttpResult getCancelReason(String id, Integer status) {
|
|
|
Map<String, String> map = logisticsOrderMapper.getRejectReason(id, status);
|
|
Map<String, String> map = logisticsOrderMapper.getRejectReason(id, status);
|
|
|
return HttpResult.ok(map);
|
|
return HttpResult.ok(map);
|
|
|
-// KwtLogisticsOrderTrack track = logisticsOrderTrackMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderTrack>()
|
|
|
|
|
-// .eq(KwtLogisticsOrderTrack::getLOrderId, Long.parseLong(id))
|
|
|
|
|
-// /**.eq(KwtLogisticsOrderTrack::getStatus, LogisticsOrderEnum.SEND_BACK.getCode())*/
|
|
|
|
|
-// .eq(KwtLogisticsOrderTrack::getStatus,status)
|
|
|
|
|
-// );
|
|
|
|
|
-// return HttpResult.ok(track == null ? null : track.getRemark());
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2065,8 +2001,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
, MessageEnum.NEW_LOGISTICS_ORDER, MessageEnum.NEW_CARRIAGE_ORDER
|
|
, MessageEnum.NEW_LOGISTICS_ORDER, MessageEnum.NEW_CARRIAGE_ORDER
|
|
|
, "1"
|
|
, "1"
|
|
|
);
|
|
);
|
|
|
-
|
|
|
|
|
-// System.out.println("承运订单新建订单-消息列表推送 end ");
|
|
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2456,7 +2390,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
/**计量单位*/
|
|
/**计量单位*/
|
|
|
Map<String, String> unitTypeDictData = getDictData(DictTypeEnum.UNIT_TYPE.getType());
|
|
Map<String, String> unitTypeDictData = getDictData(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
/**运价方式*/
|
|
/**运价方式*/
|
|
|
- Map<String, String> priceDictData = getDictData(DictTypeEnum.PRICE_TYPE.getType());
|
|
|
|
|
|
|
+// Map<String, String> priceDictData = getDictData(DictTypeEnum.PRICE_TYPE.getType());
|
|
|
/**计费方式*/
|
|
/**计费方式*/
|
|
|
Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
|
|
Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
|
|
|
/**结算周期*/
|
|
/**结算周期*/
|
|
@@ -2527,7 +2461,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (BusinessException e) {
|
|
} catch (BusinessException e) {
|
|
|
-// throw new RuntimeException(e);
|
|
|
|
|
log.info("查询失败:{},信息:{}", vo.getTOrderId(), e.getMessage(), e);
|
|
log.info("查询失败:{},信息:{}", vo.getTOrderId(), e.getMessage(), e);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2590,14 +2523,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public HttpResult statisticsCarriage(AcceptCarriageOrderQuery query) {
|
|
public HttpResult statisticsCarriage(AcceptCarriageOrderQuery query) {
|
|
|
-// Long entId = LoginUserHolder.getEntId();
|
|
|
|
|
-// Long queryEntId = 0L;
|
|
|
|
|
-// Map<Long, EntCacheResDto> entMap = remoteSystemService.queryEntTreeByIds(Collections.singletonList(entId));
|
|
|
|
|
-// if (entMap == null) {
|
|
|
|
|
-// queryEntId = entId;
|
|
|
|
|
-// } else {
|
|
|
|
|
-// queryEntId = entMap.get(entId).getId();
|
|
|
|
|
-// }
|
|
|
|
|
String type = "2";
|
|
String type = "2";
|
|
|
HttpResult httpResult = statisticsAcceptCarriage(query, type);
|
|
HttpResult httpResult = statisticsAcceptCarriage(query, type);
|
|
|
return httpResult;
|
|
return httpResult;
|
|
@@ -2704,7 +2629,7 @@ public class KwtAcceptCarriageOrderService {
|
|
|
/**结算周期*/
|
|
/**结算周期*/
|
|
|
Map<String, String> settlementDictData = getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
|
|
Map<String, String> settlementDictData = getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
|
|
|
/**签约方式*/
|
|
/**签约方式*/
|
|
|
- Map<String, String> signingWay = getDictData(DictTypeEnum.SIGNING_TYPE.getType());
|
|
|
|
|
|
|
+// Map<String, String> signingWay = getDictData(DictTypeEnum.SIGNING_TYPE.getType());
|
|
|
/**合理损耗单位*/
|
|
/**合理损耗单位*/
|
|
|
Map<String, String> taxRate = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
|
|
Map<String, String> taxRate = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
|
|
|
/**运价方式*/
|
|
/**运价方式*/
|
|
@@ -2738,24 +2663,6 @@ public class KwtAcceptCarriageOrderService {
|
|
|
String unitLabel = unitTypeDictData == null ? vo.getUnit() : (unitTypeDictData.get(vo.getUnit()) == null ? vo.getUnit() : unitTypeDictData.get(vo.getUnit()));
|
|
String unitLabel = unitTypeDictData == null ? vo.getUnit() : (unitTypeDictData.get(vo.getUnit()) == null ? vo.getUnit() : unitTypeDictData.get(vo.getUnit()));
|
|
|
carriageOrderExcelVo.setLoadAmount(carriageOrderExcelVo.getLoadAmount() + unitLabel);
|
|
carriageOrderExcelVo.setLoadAmount(carriageOrderExcelVo.getLoadAmount() + unitLabel);
|
|
|
carriageOrderExcelVo.setUnloadAmount(carriageOrderExcelVo.getUnloadAmount() + unitLabel);
|
|
carriageOrderExcelVo.setUnloadAmount(carriageOrderExcelVo.getUnloadAmount() + unitLabel);
|
|
|
-
|
|
|
|
|
-// if (vo.getTOrderId() != null) {
|
|
|
|
|
-// try {
|
|
|
|
|
-// OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
|
|
|
|
|
-// if (orderDetailRes != null) {
|
|
|
|
|
-// List<UnitInfoDetailRes> unitInfo = orderDetailRes.getUnitInfo();
|
|
|
|
|
-// for (UnitInfoDetailRes detailRes : unitInfo) {
|
|
|
|
|
-// if (String.valueOf(NumberConstant.ONE).equals(detailRes.getUnitType())) {
|
|
|
|
|
-// carriageOrderExcelVo.setShipmentsUnit(detailRes.getFirmName());
|
|
|
|
|
-// } else {
|
|
|
|
|
-// carriageOrderExcelVo.setReceiveGoodsUnit(detailRes.getFirmName());
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
|
-// log.error("tradeOrderInfoService.getOrderDetailById error id:{}.errorMessage:{}",vo.getTOrderId(),e.getMessage(),e);
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
BigDecimal subtract = vo.getCarryingCapacity().subtract(vo.getSubcontractAmount()).subtract(vo.getEntrustAmount());
|
|
BigDecimal subtract = vo.getCarryingCapacity().subtract(vo.getSubcontractAmount()).subtract(vo.getEntrustAmount());
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
carriageOrderExcelVo.setWaitDistributionAmount(subtract == null ? null : df.format(subtract));
|
|
carriageOrderExcelVo.setWaitDistributionAmount(subtract == null ? null : df.format(subtract));
|