From bb344d8e73bf3a6825f21584609649cb5d5042f5 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期一, 05 六月 2023 18:05:37 +0800
Subject: [PATCH] 修改
---
src/main/java/com/boying/controller/OutParkController.java | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/boying/controller/OutParkController.java b/src/main/java/com/boying/controller/OutParkController.java
index adf15a8..673ba49 100644
--- a/src/main/java/com/boying/controller/OutParkController.java
+++ b/src/main/java/com/boying/controller/OutParkController.java
@@ -3,6 +3,7 @@
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.boying.common.R;
import com.boying.common.SystemConfigProperties;
import com.boying.entity.*;
@@ -52,10 +53,23 @@
private StringRedisTemplate redisTemplate;
@PostMapping("/findPage")
- public Object findPage(Page page,OutPark outPark) {
- QueryWrapper<OutPark> wrapper = new QueryWrapper<>();
- wrapper.lambda().orderByDesc(OutPark::getId);
- return R.ok(outParkService.page(page,wrapper));
+ public Object findPage(Page page, String carNo,Long parkId,String payCode,String date) throws ParseException {
+ List<OutPark> list = outParkService.getList(page.getCurrent(), page.getSize(), carNo,parkId,payCode, date);
+ long count = outParkService.getCount(carNo,parkId,payCode, date);
+ for (OutPark record : list) {
+ record.setParkName(parkService.getById(record.getParkId()).getName());
+ if(record.getEnterTime() != null){
+ record.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(record.getTime()).longValue()));
+ }else {
+ record.setTimeStr("鏈彂鐜板叆鍦鸿褰�");
+ }
+ if(record.getImgId() != null){
+ record.setImgPath("/ffzf/fileinfo/showImgById/"+record.getImgId());
+ }
+ }
+ page.setRecords(list);
+ page.setTotal(count);
+ return R.ok(page);
}
//閬撻椄code
@@ -79,7 +93,7 @@
if(outPark.getTime() > 0){
outPark.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(outPark.getTime()).longValue()));
}else {
- outPark.setTimeStr("0");
+ outPark.setTimeStr("涓嶈冻涓�鍒嗛挓");
}
return R.ok(outPark);
}
--
Gitblit v1.9.1