|
@@ -36,6 +36,7 @@ import com.pj.project.tb_item_type.TbItemType;
|
|
|
import com.pj.project4sp.global.BusinessException;
|
|
|
import com.pj.project4sp.uploadfile.UploadConfig;
|
|
|
import com.pj.utils.cache.RedisUtil;
|
|
|
+import com.pj.utils.sg.AjaxJson;
|
|
|
import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
@@ -84,8 +85,6 @@ public class OpenService {
|
|
|
private TbGoodsService tbGoodsService;
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
public ResultJson checkCarNumber(CheckCarNumberBO checkCarNumberBO) {
|
|
|
String carNo = checkCarNumberBO.getCarNumber();
|
|
|
int inOrOut = checkCarNumberBO.getInOrOut();
|
|
@@ -152,11 +151,16 @@ public class OpenService {
|
|
|
log.error("请求返回【未查询到入场记录】:{}", carNo);
|
|
|
return ResultJson.error("未查询到入场记录");
|
|
|
}
|
|
|
+ Date now = new Date();
|
|
|
+ Date realInTime=tbBusinessCar.getRealInTime();
|
|
|
+ if (now.getTime()/1000-realInTime.getTime()/1000<5){
|
|
|
+ log.error("请求返回【无效离场记录,返回到设备端为:“未查询到入场记录”让其停止轮询】:{}", carNo);
|
|
|
+ return ResultJson.error("无效离场记录");
|
|
|
+ }
|
|
|
if (StrUtil.isNotEmpty(image)) {
|
|
|
StaticLog.error("缓存离场图片,{}", carNo);
|
|
|
IMAGE_CACHE.put(carNo, image);
|
|
|
}
|
|
|
- Date now = new Date();
|
|
|
//判断是否蓝色车牌===免停车费
|
|
|
if (StrUtil.isNotEmpty(tbBusinessCar.getColor())) {
|
|
|
List<TbCarNoColor> freeList = tbCarNoColorService.getFreeColor();
|
|
@@ -179,7 +183,7 @@ public class OpenService {
|
|
|
}
|
|
|
String businessCarId = tbBusinessCar.getId();
|
|
|
//String carNoPrefix = StrUtil.sub(carNo, 0, 1);
|
|
|
- String carType=tbBusinessCar.getCarType();
|
|
|
+ String carType = tbBusinessCar.getCarType();
|
|
|
List<TbBusiness> businessList = tbBusinessService.findOtherBusinessByCarId(businessCarId);
|
|
|
if (businessList.isEmpty()) {//无业务车辆===>计算停车费
|
|
|
//如果已经支付过,则从支付时间算起,重新计算停车费
|