| | |
| | | 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.*; |
| | |
| | | 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 |
| | |
| | | if(outPark.getTime() > 0){ |
| | | outPark.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(outPark.getTime()).longValue())); |
| | | }else { |
| | | outPark.setTimeStr("0"); |
| | | outPark.setTimeStr("不足一分钟"); |
| | | } |
| | | return R.ok(outPark); |
| | | } |
| | |
| | | @GetMapping("/statisticParkOrder/count") |
| | | public R statisticParkOrder(String parkIds) { |
| | | Map<String,Object> resultMap = new HashMap<>(); |
| | | if(parkIds != null){ |
| | | if(StringUtils.isNotBlank(parkIds)){ |
| | | String[] split = parkIds.split(","); |
| | | long[] array = Arrays.stream(split).mapToLong(Long::parseLong).toArray(); |
| | | List<Long> parkIdList = new ArrayList<>(); |