|
|
@@ -1,11 +1,12 @@
|
|
|
package com.sckw.transport.service;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.sckw.contract.api.RemoteContractService;
|
|
|
import com.sckw.contract.api.model.dto.res.ContractCommonInfoResDto;
|
|
|
import com.sckw.core.common.enums.NumberConstant;
|
|
|
-import com.sckw.core.common.enums.StringConstant;
|
|
|
import com.sckw.core.exception.BusinessException;
|
|
|
import com.sckw.core.model.enums.CarWaybillEnum;
|
|
|
import com.sckw.core.model.enums.LogisticsOrderEnum;
|
|
|
@@ -22,6 +23,8 @@ import com.sckw.fleet.api.RemoteFleetService;
|
|
|
import com.sckw.fleet.api.model.vo.RTruckVo;
|
|
|
import com.sckw.mongo.enums.BusinessTypeEnum;
|
|
|
import com.sckw.mongo.model.SckwLogisticsOrder;
|
|
|
+import com.sckw.order.api.dubbo.TradeOrderInfoService;
|
|
|
+import com.sckw.order.api.model.CompleteLogisticsOrderParam;
|
|
|
import com.sckw.product.api.dubbo.GoodsInfoService;
|
|
|
import com.sckw.stream.model.SckwBusSum;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
@@ -38,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cloud.stream.function.StreamBridge;
|
|
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
@@ -54,6 +58,9 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class ConsignOrderService {
|
|
|
|
|
|
+ @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
|
|
|
+ TradeOrderInfoService tradeOrderInfoService;
|
|
|
+
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
RemoteSystemService remoteSystemService;
|
|
|
@DubboReference(version = "1.0.0", group = "design", check = false)
|
|
|
@@ -520,7 +527,7 @@ public class ConsignOrderService {
|
|
|
List<Integer> statusList = new ArrayList<>();
|
|
|
statusList.add(CarWaybillEnum.COMPLETION_UNLOADING.getCode());
|
|
|
statusList.add(CarWaybillEnum.APPROVAL_PASS.getCode());
|
|
|
- List<OrderCarDTO> list = kwtWaybillOrderMapper.selectWaybillOrderCarListGroupByTruckNo(stringList, statusList,orderDto.getPage() - 1, orderDto.getPageSize());
|
|
|
+ List<OrderCarDTO> list = kwtWaybillOrderMapper.selectWaybillOrderCarListGroupByTruckNo(stringList, statusList, orderDto.getPage() - 1, orderDto.getPageSize());
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
List<String> stringLists = list.stream().map(OrderCarDTO::getTruckNo).collect(Collectors.toList());
|
|
|
Map<String, RTruckVo> truck = remoteFleetService.findTruck(stringLists);
|
|
|
@@ -548,9 +555,10 @@ public class ConsignOrderService {
|
|
|
/**
|
|
|
* 托运订单-完结订单
|
|
|
*
|
|
|
- * @param orderFinishDTO 页面传递数据dto
|
|
|
+ * @param orderFinishDTO
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public HttpResult commitConsignOrderFinish(OrderFinishDTO orderFinishDTO) {
|
|
|
/** 订单完结 物流运单状态为【待派车】、【运输中】可操作*/
|
|
|
/**完结拦截 必须车辆运单无正在运输中的单据才能完结 状态有 待接单之后已核弹之前的状态 都不能完结*/
|
|
|
@@ -561,7 +569,7 @@ public class ConsignOrderService {
|
|
|
KwtLogisticsOrder logisticsOrder = kwtLogisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
.eq(KwtLogisticsOrder::getId, id));
|
|
|
if (logisticsOrder == null) {
|
|
|
- throw new RuntimeException("托运订单-完结订单-物流单据不存在!");
|
|
|
+ throw new BusinessException("采购订单-完结订单-物流单据不存在!");
|
|
|
}
|
|
|
if (logisticsOrder.getLoadAmount().compareTo(orderFinishDTO.getLoadAmount()) > 0) {
|
|
|
throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
|
@@ -569,49 +577,247 @@ public class ConsignOrderService {
|
|
|
/**订单状态验证*/
|
|
|
if (!LogisticsOrderEnum.WAIT_DELIVERY.getStatus().equals(String.valueOf(logisticsOrder.getStatus()))
|
|
|
&& !LogisticsOrderEnum.IN_TRANSIT.getStatus().equals(String.valueOf(logisticsOrder.getStatus()))) {
|
|
|
- throw new RuntimeException("当前运单并不属于【待派车】,【运输中】状态");
|
|
|
+ throw new BusinessException("当前运单并不属于【待派车】,【运输中】状态");
|
|
|
+ }
|
|
|
+ //验证当前物流订单是否还存在进行的车辆运单
|
|
|
+ boolean flag = judgmentWaybillOrderIsFinish(id);
|
|
|
+ if (flag) {
|
|
|
+ throw new BusinessException("您现在有车辆运单正在执行中,该订单目前不可完结,请先将运单执行完毕");
|
|
|
+ }
|
|
|
+ //修改单据本身数据
|
|
|
+ BigDecimal ignoreAmount = logisticsOrder.getAmount().subtract(logisticsOrder.getTotalLoadAmount());
|
|
|
+ logisticsOrder.setTotalLoadAmount(orderFinishDTO.getLoadAmount());
|
|
|
+ logisticsOrder.setTotalUnloadAmount(orderFinishDTO.getUnloadAmount());
|
|
|
+ logisticsOrder.setStatus(LogisticsOrderEnum.HAVE_FINISHED.getCode());
|
|
|
+ logisticsOrder.setUpdateTime(new Date());
|
|
|
+ logisticsOrder.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ logisticsOrder.setIgnoreAmount(ignoreAmount);
|
|
|
+ kwtLogisticsOrderMapper.updateById(logisticsOrder);
|
|
|
+ //获取物流订单下的子单
|
|
|
+ /**完结订单-对应物流订单下子订单都要进行完结*/
|
|
|
+ List<KwtLogisticsOrder> kwtLogisticsOrders = kwtLogisticsOrderMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
+ .eq(KwtLogisticsOrder::getDelFlag, NumberConstant.ZERO)
|
|
|
+ .apply(id != null, "FIND_IN_SET ('" + id + "', pids)").ne(KwtLogisticsOrder::getId, id));
|
|
|
+ /**找到该订单下所有的物流订单**/
|
|
|
+ //需要修改的mongodb数据
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
+ if (!org.springframework.util.CollectionUtils.isEmpty(kwtLogisticsOrders)) {
|
|
|
+ //修改单据状态
|
|
|
+// List<Long> ids = kwtLogisticsOrders.stream().map(KwtLogisticsOrder::getId).collect(Collectors.toList());
|
|
|
+ //修改单据剩余运输量
|
|
|
+ kwtLogisticsOrders.forEach(kwtLogisticsOrder -> {
|
|
|
+ BigDecimal subtract = kwtLogisticsOrder.getAmount().subtract(kwtLogisticsOrder.getTotalLoadAmount());
|
|
|
+ updateLogisticOrderAndTrack(kwtLogisticsOrder.getId(), orderFinishDTO, subtract);
|
|
|
+ //新增mongodb要修改的数据
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("id", kwtLogisticsOrder.getId());
|
|
|
+ map.put("ignoreAmount", subtract);
|
|
|
+ list.add(map);
|
|
|
+// updateMongoDbByLogisticsOrder(kwtLogisticsOrder.getId(), orderFinishDTO, subtract);
|
|
|
+ });
|
|
|
}
|
|
|
- /**完结拦截*/
|
|
|
+ /**是否是一级订单,是->推送至贸易,否,数据推送至物流订单上级*/
|
|
|
+ if (logisticsOrder.getPid() == null) {
|
|
|
+ //数据推送至贸易订单
|
|
|
+ CompleteLogisticsOrderParam tradeOrder = new CompleteLogisticsOrderParam();
|
|
|
+ //获取实际装货量-实际卸货量
|
|
|
+ Map<String, BigDecimal> map = kwtLogisticsOrderMapper.countAmountByTradeOrderId(logisticsOrder.getTOrderId());
|
|
|
+ //获取是否订单已经全部处理完成
|
|
|
+ List<Integer> statusList = new ArrayList<>();
|
|
|
+ statusList.add(LogisticsOrderEnum.TO_BE_PLANNED.getCode());
|
|
|
+ statusList.add(LogisticsOrderEnum.PENDING_ORDER.getCode());
|
|
|
+ statusList.add(LogisticsOrderEnum.WAIT_DELIVERY.getCode());
|
|
|
+ statusList.add(LogisticsOrderEnum.IN_TRANSIT.getCode());
|
|
|
+ List<KwtLogisticsOrder> logisticsOrders = kwtLogisticsOrderMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
+ .eq(KwtLogisticsOrder::getTOrderId, logisticsOrder.getTOrderId())
|
|
|
+ .in(KwtLogisticsOrder::getStatus, statusList));
|
|
|
+ if (org.springframework.util.CollectionUtils.isEmpty(logisticsOrders)) {
|
|
|
+ tradeOrder.setIsAllComplete(true);
|
|
|
+ }
|
|
|
+ tradeOrder.setTOrderId(logisticsOrder.getTOrderId());
|
|
|
+ tradeOrder.setActualLoadAmount(map.get("totalLoadAmount"));
|
|
|
+ tradeOrder.setActualUnloadAmount(map.get("totalUnloadAmount"));
|
|
|
+ tradeOrder.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ tradeOrder.setUpdateByName(LoginUserHolder.getUserName());
|
|
|
+ HttpResult httpResult = tradeOrderInfoService.completeLogisticsOrder(tradeOrder);
|
|
|
+ if (httpResult.getCode() != HttpStatus.SUCCESS_CODE) {
|
|
|
+ log.info("贸易订单手动完结订单异常,传递信息:{},返回信息:{}", JSONObject.toJSONString(tradeOrder), JSONObject.toJSONString(httpResult));
|
|
|
+ throw new BusinessException("单据完结出现错误!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //修改mongodb的数据
|
|
|
+ updateMongoDbByLogisticsOrder(logisticsOrder.getId(), orderFinishDTO, ignoreAmount);
|
|
|
+ if (!CollectionUtils.isEmpty(list) && list.size() > 0) {
|
|
|
+ for (Map<String, Object> map : list) {
|
|
|
+ updateMongoDbByLogisticsOrder(Long.parseLong(map.get("id").toString()), orderFinishDTO, new BigDecimal(map.get("ignoreAmount").toString()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return HttpResult.ok("托运订单-完结订单成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 物流订单完结订单-修改物流表+新增物流状态记录
|
|
|
+ *
|
|
|
+ * @param lOrderId
|
|
|
+ * @param orderFinishDTO
|
|
|
+ * @param ignoreAmount
|
|
|
+ */
|
|
|
+ private void updateLogisticOrderAndTrack(Long lOrderId, OrderFinishDTO orderFinishDTO, BigDecimal ignoreAmount) {
|
|
|
+ Integer code = LogisticsOrderEnum.HAVE_FINISHED.getCode();
|
|
|
+ kwtLogisticsOrderMapper.update(null, new LambdaUpdateWrapper<KwtLogisticsOrder>()
|
|
|
+ .set(KwtLogisticsOrder::getStatus, code)
|
|
|
+ .set(KwtLogisticsOrder::getUpdateBy, LoginUserHolder.getUserId())
|
|
|
+ .set(KwtLogisticsOrder::getIgnoreAmount, ignoreAmount)
|
|
|
+ .set(KwtLogisticsOrder::getUpdateTime, new Date())
|
|
|
+ .eq(KwtLogisticsOrder::getId, lOrderId)
|
|
|
+ );
|
|
|
+ KwtLogisticsOrderTrack track = kwtLogisticsOrderTrackMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderTrack>()
|
|
|
+ .eq(KwtLogisticsOrderTrack::getLOrderId, lOrderId).eq(KwtLogisticsOrderTrack::getStatus, code)
|
|
|
+ );
|
|
|
+ if (track != null) {
|
|
|
+ kwtLogisticsOrderTrackMapper.update(null, new LambdaUpdateWrapper<KwtLogisticsOrderTrack>()
|
|
|
+ .set(KwtLogisticsOrderTrack::getUpdateBy, LoginUserHolder.getUserId())
|
|
|
+ .set(KwtLogisticsOrderTrack::getUpdateTime, new Date())
|
|
|
+ .set(KwtLogisticsOrderTrack::getRemark, orderFinishDTO.getRemark())
|
|
|
+ .eq(KwtLogisticsOrderTrack::getId, track.getId())
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ KwtLogisticsOrderTrack orderTrack = new KwtLogisticsOrderTrack();
|
|
|
+ orderTrack.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
+ orderTrack.setLOrderId(lOrderId);
|
|
|
+ orderTrack.setRemark(orderFinishDTO.getRemark());
|
|
|
+ orderTrack.setStatus(code);
|
|
|
+ orderTrack.setCreateBy(LoginUserHolder.getUserId());
|
|
|
+ orderTrack.setCreateTime(new Date());
|
|
|
+ orderTrack.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ orderTrack.setUpdateTime(new Date());
|
|
|
+ orderTrack.setDelFlag(NumberConstant.ZERO);
|
|
|
+ kwtLogisticsOrderTrackMapper.insert(orderTrack);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 验证当前物流订单是否存在未完结的车辆运单
|
|
|
+ *
|
|
|
+ * @param id 对应物流订单id
|
|
|
+ */
|
|
|
+ private boolean judgmentWaybillOrderIsFinish(String id) {
|
|
|
+ boolean flag = false;
|
|
|
List<Integer> statusList = new ArrayList<>();
|
|
|
+ statusList.add(CarWaybillEnum.PENDING_ORDER.getCode());
|
|
|
statusList.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
|
|
|
statusList.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
|
|
|
statusList.add(CarWaybillEnum.WAIT_LOADING.getCode());
|
|
|
statusList.add(CarWaybillEnum.COMPLETION_LOADING.getCode());
|
|
|
statusList.add(CarWaybillEnum.WAIT_UNLOADING.getCode());
|
|
|
statusList.add(CarWaybillEnum.COMPLETION_UNLOADING.getCode());
|
|
|
+ statusList.add(CarWaybillEnum.APPROVAL_PASS.getCode());
|
|
|
int count = kwtWaybillOrderMapper.selectDataByLorderId(id, statusList);
|
|
|
if (count > NumberConstant.ZERO) {
|
|
|
- throw new RuntimeException("检测您现在有运单正在执行中,该订单目前不可完结,请先将运单执行完毕");
|
|
|
+ flag = true;
|
|
|
}
|
|
|
- /**完结订单-对应物流订单下子订单都要进行完结*/
|
|
|
- List<KwtLogisticsOrder> kwtLogisticsOrders = kwtLogisticsOrderMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
- .in(KwtLogisticsOrder::getPids, Long.parseLong(orderFinishDTO.getId())));
|
|
|
- if (CollectionUtils.isNotEmpty(kwtLogisticsOrders)) {
|
|
|
- for (KwtLogisticsOrder kwtLogisticsOrder : kwtLogisticsOrders) {
|
|
|
- String[] split = kwtLogisticsOrder.getPids().split(StringConstant.COMMA);
|
|
|
- if (split.length > NumberConstant.ONE) {
|
|
|
- for (String s : split) {
|
|
|
- if (String.valueOf(kwtLogisticsOrder.getId()).equals(s)) {
|
|
|
- //本身订单
|
|
|
- //只存在当前订单无分包订单
|
|
|
- /**单据完结修改状态以及数据*/
|
|
|
- updateDataByItself(logisticsOrder, orderFinishDTO);
|
|
|
- } else {
|
|
|
- //修改分包后的订单-代表存在分包订单
|
|
|
- /**单据完结修改状态以及数据*/
|
|
|
- updateDataBySubset(orderFinishDTO, s);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- //只存在当前订单无分包订单
|
|
|
- /**单据完结修改状态以及数据*/
|
|
|
- updateDataByItself(logisticsOrder, orderFinishDTO);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return HttpResult.ok("承运订单-分包托运完结订单成功");
|
|
|
+ return flag;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据物流订单修改mongodb数据
|
|
|
+ *
|
|
|
+ * @param id 物流订单id
|
|
|
+ * @param orderFinishDTO
|
|
|
+ * @param ignoreAmount 剩余量
|
|
|
+ */
|
|
|
+ private void updateMongoDbByLogisticsOrder(Long id, OrderFinishDTO orderFinishDTO, BigDecimal ignoreAmount) {
|
|
|
+ //更新mongodb
|
|
|
+ SckwLogisticsOrder lOrder = new SckwLogisticsOrder();
|
|
|
+ lOrder.set_id(id);
|
|
|
+ lOrder.setLOrderId(id);
|
|
|
+ lOrder.setStatus(LogisticsOrderEnum.HAVE_FINISHED.getStatus());
|
|
|
+ lOrder.setUpdateTime(new Date());
|
|
|
+ lOrder.setUpdateBy(LoginUserHolder.getUserId());
|
|
|
+ lOrder.setUpdateByName(LoginUserHolder.getUserName());
|
|
|
+ lOrder.setTotalLoadAmount(orderFinishDTO.getLoadAmount());
|
|
|
+ lOrder.setTotalUnloadAmount(orderFinishDTO.getUnloadAmount());
|
|
|
+ lOrder.setIgnoreAmount(ignoreAmount);
|
|
|
+ //rabbitMq业务汇总数据发送/消费对象
|
|
|
+ SckwBusSum busSum = new SckwBusSum();
|
|
|
+ //业务汇总类型
|
|
|
+ busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
|
|
|
+ //操作对象(1新增/2修改/3替换数据)
|
|
|
+ busSum.setMethod(2);
|
|
|
+ //业务汇总数据对象
|
|
|
+ busSum.setObject(lOrder);
|
|
|
+ busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
|
|
|
+ busSum.setMethod(NumberConstant.TWO);
|
|
|
+ streamBridge.send("sckw-busSum", JSON.toJSONString(busSum));
|
|
|
}
|
|
|
|
|
|
+// /**
|
|
|
+// * 托运订单-完结订单
|
|
|
+// *
|
|
|
+// * @param orderFinishDTO 页面传递数据dto
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// public HttpResult commitConsignOrderFinish(OrderFinishDTO orderFinishDTO) {
|
|
|
+// /** 订单完结 物流运单状态为【待派车】、【运输中】可操作*/
|
|
|
+// /**完结拦截 必须车辆运单无正在运输中的单据才能完结 状态有 待接单之后已核弹之前的状态 都不能完结*/
|
|
|
+// /**完结订单-对应物流订单下子订单都要进行完结*/
|
|
|
+// /**完结订单 不做页面填写数量与数据库数量进行计算验证-直接获取页面填写数据进行保存处理*/
|
|
|
+// //物流订单id
|
|
|
+// String id = orderFinishDTO.getId();
|
|
|
+// KwtLogisticsOrder logisticsOrder = kwtLogisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
+// .eq(KwtLogisticsOrder::getId, id));
|
|
|
+// if (logisticsOrder == null) {
|
|
|
+// throw new RuntimeException("托运订单-完结订单-物流单据不存在!");
|
|
|
+// }
|
|
|
+// if (logisticsOrder.getLoadAmount().compareTo(orderFinishDTO.getLoadAmount()) > 0) {
|
|
|
+// throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
|
+// }
|
|
|
+// /**订单状态验证*/
|
|
|
+// if (!LogisticsOrderEnum.WAIT_DELIVERY.getStatus().equals(String.valueOf(logisticsOrder.getStatus()))
|
|
|
+// && !LogisticsOrderEnum.IN_TRANSIT.getStatus().equals(String.valueOf(logisticsOrder.getStatus()))) {
|
|
|
+// throw new RuntimeException("当前运单并不属于【待派车】,【运输中】状态");
|
|
|
+// }
|
|
|
+// /**完结拦截*/
|
|
|
+// List<Integer> statusList = new ArrayList<>();
|
|
|
+// statusList.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
|
|
|
+// statusList.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
|
|
|
+// statusList.add(CarWaybillEnum.WAIT_LOADING.getCode());
|
|
|
+// statusList.add(CarWaybillEnum.COMPLETION_LOADING.getCode());
|
|
|
+// statusList.add(CarWaybillEnum.WAIT_UNLOADING.getCode());
|
|
|
+// statusList.add(CarWaybillEnum.COMPLETION_UNLOADING.getCode());
|
|
|
+// int count = kwtWaybillOrderMapper.selectDataByLorderId(id, statusList);
|
|
|
+// if (count > NumberConstant.ZERO) {
|
|
|
+// throw new RuntimeException("检测您现在有运单正在执行中,该订单目前不可完结,请先将运单执行完毕");
|
|
|
+// }
|
|
|
+// /**完结订单-对应物流订单下子订单都要进行完结*/
|
|
|
+// List<KwtLogisticsOrder> kwtLogisticsOrders = kwtLogisticsOrderMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
+// .in(KwtLogisticsOrder::getPids, Long.parseLong(orderFinishDTO.getId())));
|
|
|
+// if (CollectionUtils.isNotEmpty(kwtLogisticsOrders)) {
|
|
|
+// for (KwtLogisticsOrder kwtLogisticsOrder : kwtLogisticsOrders) {
|
|
|
+// String[] split = kwtLogisticsOrder.getPids().split(StringConstant.COMMA);
|
|
|
+// if (split.length > NumberConstant.ONE) {
|
|
|
+// for (String s : split) {
|
|
|
+// if (String.valueOf(kwtLogisticsOrder.getId()).equals(s)) {
|
|
|
+// //本身订单
|
|
|
+// //只存在当前订单无分包订单
|
|
|
+// /**单据完结修改状态以及数据*/
|
|
|
+// updateDataByItself(logisticsOrder, orderFinishDTO);
|
|
|
+// } else {
|
|
|
+// //修改分包后的订单-代表存在分包订单
|
|
|
+// /**单据完结修改状态以及数据*/
|
|
|
+// updateDataBySubset(orderFinishDTO, s);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// //只存在当前订单无分包订单
|
|
|
+// /**单据完结修改状态以及数据*/
|
|
|
+// updateDataByItself(logisticsOrder, orderFinishDTO);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return HttpResult.ok("承运订单-分包托运完结订单成功");
|
|
|
+// }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 托运订单-完结订单-修改本身数据
|