提交 ae758136 authored 作者: huyufan's avatar huyufan

取消运单日志

上级 6d2d2360
......@@ -56,6 +56,7 @@ public enum OrderChildLogEnum {
OWNER(1, "货主"),
PLATFORM(2, "承运"),
DRIVER(3, "司机"),
ARTIFICIAL(4, "客服"),
;
......
......@@ -15,6 +15,7 @@ import com.clx.performance.model.OrderChild;
import com.clx.performance.model.OrderGoods;
import com.clx.performance.param.pc.OrderCancelParam;
import com.clx.performance.service.IntegralMqService;
import com.clx.performance.service.OrderChildLogService;
import com.clx.performance.service.OrderChildService;
import com.clx.performance.service.OrderGoodsTruckBindService;
import com.clx.performance.service.breakcontract.BreakContractSettlementOwnerService;
......@@ -59,6 +60,8 @@ public class OrderCancelComponent implements InitializingBean {
private final IntegralMqService integralMqService;
private final OrderChildLogService orderChildLogService;
public void ownerProcess(OrderCancelParam param) {
String orderNo = param.getOrderNo();
List<OrderGoods> orderGoodsList = null;
......@@ -122,6 +125,10 @@ public class OrderCancelComponent implements InitializingBean {
//释放车辆
driverService.updateOrderStatus(orderChild.getDriverUserNo(), DriverInfoEnum.DriverStatus.NO.getCode(), orderChild.getTruckId(), 1);
childNoList.add(orderChild.getChildNo());
orderChildLogService.saveOrderChildLog(orderChild.getChildNo(),
OrderChildEnum.Status.OWNER_CANCEL.getCode(), OrderChildEnum.Status.OWNER_CANCEL.getName(),
OrderChildLogEnum.CreateType.OWNER.getCode(), 0L, OrderChildLogEnum.CreateType.OWNER.getMsg()
);
}
Map<String, List<OrderChild>> orderChildMap = new HashMap<>();
......
......@@ -21,6 +21,7 @@ import com.clx.performance.model.OrderGoods;
import com.clx.performance.param.pc.OrderCancelParam;
import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OrderCancelService;
import com.clx.performance.service.OrderChildLogService;
import com.clx.performance.service.OrderGoodsTruckBindService;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.breakcontract.BreakContractSettlementOwnerService;
......@@ -73,6 +74,8 @@ public class OrderCancelServiceImpl implements OrderCancelService {
private final OrderCancelComponent orderCancelComponent;
private final OrderChildLogService orderChildLogService;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -122,6 +125,10 @@ public class OrderCancelServiceImpl implements OrderCancelService {
//释放车辆
driverService.updateOrderStatus(orderChild.getDriverUserNo(), DriverInfoEnum.DriverStatus.NO.getCode(), orderChild.getTruckId(), 1);
childNoList.add(orderChild.getChildNo());
orderChildLogService.saveOrderChildLog(orderChild.getChildNo(),
OrderChildEnum.Status.PLATFORM_CANCEL.getCode(), OrderChildEnum.Status.PLATFORM_CANCEL.getName(),
OrderChildLogEnum.CreateType.PLATFORM.getCode(), 0L, OrderChildLogEnum.CreateType.PLATFORM.getMsg()
);
}
if (CollectionUtil.isNotEmpty(childNoList)) {
......@@ -696,6 +703,11 @@ public class OrderCancelServiceImpl implements OrderCancelService {
orderChildDao.updateEntityByKey(update);
orderCancelComponent.backFillTonnageForArtificial(orderChild.getOrderGoodsNo(), orderChild.getWeight());
orderChildLogService.saveOrderChildLog(orderChild.getChildNo(),
OrderChildEnum.Status.ARTIFICIAL_CANCEL.getCode(), OrderChildEnum.Status.ARTIFICIAL_CANCEL.getName(),
OrderChildLogEnum.CreateType.ARTIFICIAL.getCode(), 0L, OrderChildLogEnum.CreateType.ARTIFICIAL.getMsg()
);
}
@Override
......
......@@ -30,10 +30,7 @@ import com.clx.performance.param.app.OrderGoodsListPageParam;
import com.clx.performance.param.pc.OrderGoodsCancelParam;
import com.clx.performance.param.pc.UpdateEditOrderGoodsParam;
import com.clx.performance.param.pc.UpdateOrderGoodsPriceParam;
import com.clx.performance.service.IntegralMqService;
import com.clx.performance.service.OrderChildService;
import com.clx.performance.service.OrderGoodsLogService;
import com.clx.performance.service.OrderGoodsService;
import com.clx.performance.service.*;
import com.clx.performance.struct.OrderGoodsStruct;
import com.clx.performance.vo.app.OrderGoodsAPPVO;
import com.clx.performance.vo.feign.OrderGoodsFeignVO;
......@@ -104,6 +101,8 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
private final IntegralMqService integralMqService;
private final OrderChildLogService orderChildLogService;
@Override
public OrderGoodsVO getOrderGoodsInfoByOrderGoodsNoForPC(String orderGoodsNo) {
OrderGoodsVO orderGoodsVO = orderGoodsDao.getOrderGoodsInfoByOrderGoodsNoForPC(orderGoodsNo).map(orderGoodsStruct::convert).get();
......@@ -526,6 +525,10 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
driverService.updateOrderStatus(orderChild.getDriverUserNo(), DriverInfoEnum.DriverStatus.NO.getCode(), orderChild.getTruckId(), 1);
childNoList.add(orderChild.getChildNo());
sum = sum.add(orderChild.getWeight());
orderChildLogService.saveOrderChildLog(orderChild.getChildNo(),
OrderChildEnum.Status.OWNER_CANCEL.getCode(), OrderChildEnum.Status.OWNER_CANCEL.getName(),
OrderChildLogEnum.CreateType.OWNER.getCode(), 0L, OrderChildLogEnum.CreateType.OWNER.getMsg()
);
}
orderChildDao.batchUpdateOrderChildStatus(
OrderChildEnum.Status.PLATFORM_CANCEL.getCode(), "系统取消",
......@@ -573,6 +576,10 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
driverService.updateOrderStatus(orderChild.getDriverUserNo(), DriverInfoEnum.DriverStatus.NO.getCode(), orderChild.getTruckId(), 1);
childNoList.add(orderChild.getChildNo());
sum = sum.add(orderChild.getWeight());
orderChildLogService.saveOrderChildLog(orderChild.getChildNo(),
OrderChildEnum.Status.OWNER_CANCEL.getCode(), OrderChildEnum.Status.OWNER_CANCEL.getName(),
OrderChildLogEnum.CreateType.OWNER.getCode(), 0L, OrderChildLogEnum.CreateType.OWNER.getMsg()
);
}
orderChildDao.batchUpdateOrderChildStatus(
OrderChildEnum.Status.PLATFORM_CANCEL.getCode(),"系统取消",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论