|
|
@@ -1,19 +1,3 @@
|
|
|
-/*
|
|
|
- * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
|
|
|
- *
|
|
|
- * Redistribution and use in source and binary forms, with or without
|
|
|
- * modification, are permitted provided that the following conditions are met:
|
|
|
- *
|
|
|
- * Redistributions of source code must retain the above copyright notice,
|
|
|
- * this list of conditions and the following disclaimer.
|
|
|
- * Redistributions in binary form must reproduce the above copyright
|
|
|
- * notice, this list of conditions and the following disclaimer in the
|
|
|
- * documentation and/or other materials provided with the distribution.
|
|
|
- * Neither the name of the dreamlu.net developer nor the names of its
|
|
|
- * contributors may be used to endorse or promote products derived from
|
|
|
- * this software without specific prior written permission.
|
|
|
- * Author: Chill 庄骞 (smallchill@163.com)
|
|
|
- */
|
|
|
package org.springblade.land.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -26,14 +10,8 @@ import io.seata.spring.annotation.GlobalTransactional;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
|
|
|
import org.springblade.client.constant.LandConstant;
|
|
|
-import org.springblade.client.entity.CommonFile;
|
|
|
-import org.springblade.client.entity.CorpsDesc;
|
|
|
-import org.springblade.client.entity.LandDriver;
|
|
|
-import org.springblade.client.entity.Message;
|
|
|
-import org.springblade.client.feign.ICommonFileClient;
|
|
|
-import org.springblade.client.feign.ICorpsDescClient;
|
|
|
-import org.springblade.client.feign.ILandDriverClient;
|
|
|
-import org.springblade.client.feign.IMessageClient;
|
|
|
+import org.springblade.client.entity.*;
|
|
|
+import org.springblade.client.feign.*;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
@@ -51,7 +29,6 @@ import org.springblade.land.mapper.OrderChangeMapper;
|
|
|
import org.springblade.land.mapper.OrderItemMapper;
|
|
|
import org.springblade.land.mapper.OrderMapper;
|
|
|
import org.springblade.land.service.IOrderItemService;
|
|
|
-import org.springblade.land.service.IOrderService;
|
|
|
import org.springblade.land.util.MessageUtil;
|
|
|
import org.springblade.land.vo.OrderItemVO;
|
|
|
import org.springblade.system.entity.Dept;
|
|
|
@@ -96,7 +73,7 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
|
|
|
|
|
|
private final IUserSearchClient userSearchClient;
|
|
|
|
|
|
- private final IOrderService orderService;
|
|
|
+ private final ILandVehicleClient landVehicleClient;
|
|
|
|
|
|
@Override
|
|
|
public IPage<OrderItemVO> selectOrderItemPage(IPage<OrderItemVO> page, OrderItemVO orderItem) {
|
|
|
@@ -357,6 +334,10 @@ public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem
|
|
|
item.setSendTime(new Date());
|
|
|
item.setUpdateUser(AuthUtil.getUserId());
|
|
|
item.setUpdateTime(new Date());
|
|
|
+ if (StringUtils.isNotBlank(orderItem.getPlateNo())) {
|
|
|
+ LandVehicle vehicle = landVehicleClient.selectByPlateNo(orderItem.getPlateNo());
|
|
|
+ item.setOwned(Objects.nonNull(vehicle) ? vehicle.getOwned() : 0);
|
|
|
+ }
|
|
|
baseMapper.updateById(item);
|
|
|
|
|
|
addChange(orderItem.getId(), "派车", 1);
|