|
@@ -13,14 +13,13 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.qmrb.system.mq.PickCarProducer;
|
|
|
import com.qmrb.system.pojo.entity.CarPark;
|
|
|
+import com.qmrb.system.pojo.entity.CarParkStoredCard;
|
|
|
import com.qmrb.system.pojo.entity.MyCarPlateNumber;
|
|
|
-import com.qmrb.system.service.IBarnRecordService;
|
|
|
-import com.qmrb.system.service.ICarParkChargingRulesService;
|
|
|
-import com.qmrb.system.service.ICarParkService;
|
|
|
-import com.qmrb.system.service.IMyCarPlateNumberService;
|
|
|
+import com.qmrb.system.service.*;
|
|
|
import org.apache.rocketmq.client.exception.MQBrokerException;
|
|
|
import org.apache.rocketmq.client.exception.MQClientException;
|
|
|
import org.apache.rocketmq.remoting.exception.RemotingException;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -59,6 +58,9 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
|
|
|
@Autowired
|
|
|
private ICarParkService carParkService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICarParkStoredCardService parkStoredCardService;
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
|
private ICarParkChargingRulesService carParkChargingRulesService;
|
|
@@ -121,7 +123,11 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
|
|
|
}
|
|
|
|
|
|
if(record.getBillingStartTime() == null){
|
|
|
- record.setBillingStartTime(record.getInTime());
|
|
|
+ BarnRecordForm form = new BarnRecordForm();
|
|
|
+ form.setInTime(record.getInTime());
|
|
|
+ form.setCarNumber(record.getCarNumber());
|
|
|
+ Date billingStartTime = parkStoredCardService.getBillingStartTime(form);
|
|
|
+ record.setBillingStartTime(billingStartTime);
|
|
|
}
|
|
|
// 计算计费时长
|
|
|
if (record.getOutTime() != null) {
|
|
@@ -205,9 +211,11 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
|
|
|
|
|
|
// 实体转换
|
|
|
BarnRecordForm form = converter.entity2Form(entity);
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if(form.getBillingStartTime() == null){
|
|
|
- form.setBillingStartTime(form.getInTime());
|
|
|
+ Date billingStartTime = parkStoredCardService.getBillingStartTime(form);
|
|
|
+ form.setBillingStartTime(billingStartTime);
|
|
|
}
|
|
|
// 计算计费时长
|
|
|
if (form.getOutTime() != null) {
|