k94314517
2025-05-06 2c4ea94474ce8f9eb48b71fb9960a7da45320282
代码初始化
已添加3个文件
已修改13个文件
719 ■■■■■ 文件已修改
server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/InoutRecordCloudController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/admin/response/PCWorkPlatformDataVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/InoutRecordMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/InParkDataDTO.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/GeneralDataVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/HiddenDangerCompanyVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/InParkUserDataVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/InoutRecordService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java 379 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -2,6 +2,7 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.Constants;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.poi.ss.usermodel.*;
@@ -359,7 +360,7 @@
    /**
     * é…ç½®å•元格边框
     */
    private void configCellBorder (CellStyle style) {
    private static void configCellBorder(CellStyle style) {
        style.setBorderTop(BorderStyle.THIN);
        style.setBorderRight(BorderStyle.THIN);
        style.setBorderBottom(BorderStyle.THIN);
@@ -428,4 +429,71 @@
        private Field field;
    }
    /**
     * å¯¼å‡ºåˆ°æŒ‡å®šè¾“出流
     * @param os è¾“出流
     */
    public static void exportList (List<List<String>> dataList ,String sheetName, OutputStream os) {
        SXSSFWorkbook sxssfWorkbook;
        try {
            sxssfWorkbook = new SXSSFWorkbook();
            Sheet sheet = sxssfWorkbook.createSheet(sheetName);
            // åˆ›å»ºåˆ—头
            sheet.createFreezePane(0, 1);
            Row header = sheet.createRow(0);
            CellStyle hstyle = configHeaderCellStatic(sxssfWorkbook);
            for (int i = 0; i < dataList.size(); i++) {
                Cell cell = header.createCell(i);
                cell.setCellValue(dataList.get(i).get(Constants.ZERO));
                // åˆ—宽设置
                sheet.setColumnWidth(i, dataList.get(i).get(Constants.ZERO).length() * 2 * 256);
                // è®¾ç½®åˆ—头单元格
                cell.setCellStyle(hstyle);
            }
            //总行数
            Integer rowSize = dataList.get(Constants.ZERO).size();
            //总列数
            Integer columnSize = dataList.size();
            for (int i = 1; i < rowSize; i++) {
                Row row = sheet.createRow(i);
                for (int j = 0; j < columnSize; j++) {
                    Cell cell = row.createCell(j);
                    cell.setCellValue(dataList.get(j).get(i));
                }
            }
            sxssfWorkbook.write(os);
            os.close();
        } catch (Exception e) {
            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        } finally {
            if (os != null) {
                try {
                    os.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
    private static CellStyle configHeaderCellStatic (SXSSFWorkbook workbook)  {
        CellStyle style = workbook.createCellStyle();
        style.setAlignment(HorizontalAlignment.CENTER);
        style.setVerticalAlignment(VerticalAlignment.CENTER);
        // è®¾ç½®èƒŒæ™¯
        style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
        style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
        // å­—体
        Font font = workbook.createFont();
        font.setFontHeightInPoints((short) 12);
        style.setFont(font);
        // è®¾ç½®è¾¹æ¡†
        configCellBorder(style);
        return style;
    }
}
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -3602,4 +3602,13 @@
        gc.setTime(date);
        return gc.get(2) + 1;
    }
    public static int getNowDayNum(){
        // èŽ·å–Calendar实例
        Calendar calendar = Calendar.getInstance();
        return calendar.get(Calendar.DAY_OF_MONTH);
    }
}
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/InoutRecordCloudController.java
@@ -5,7 +5,10 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.InParkDataDTO;
import com.doumee.dao.business.model.InoutRecord;
import com.doumee.dao.business.vo.GeneralDataVO;
import com.doumee.dao.business.vo.InParkUserDataVO;
import com.doumee.service.business.InoutRecordService;
import com.doumee.service.business.third.model.ApiResponse;
import com.doumee.service.business.third.model.PageData;
@@ -88,4 +91,40 @@
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(inoutRecordService.findById(id));
    }
    @ApiOperation("基础数据")
    @PostMapping("/getInParkUserData")
//    @CloudRequiredPermission("business:inoutrecord:query")
    public ApiResponse<InParkUserDataVO> getInParkUserData (@RequestBody InParkDataDTO inParkDataDTO) {
        return ApiResponse.success(inoutRecordService.getInParkUserData(inParkDataDTO));
    }
    @ApiOperation("占比数据")
    @PostMapping("/getRataList")
//    @CloudRequiredPermission("business:inoutrecord:query")
    public ApiResponse<List<GeneralDataVO>> getRataList (@RequestBody InParkDataDTO inParkDataDTO) {
        return ApiResponse.success(inoutRecordService.getRataList(inParkDataDTO));
    }
    @ApiOperation("报表数据")
    @PostMapping("/getReportList")
//    @CloudRequiredPermission("business:inoutrecord:query")
    public ApiResponse<List<List<String>>> getReportList (@RequestBody InParkDataDTO inParkDataDTO) {
        return ApiResponse.success(inoutRecordService.getReportList(inParkDataDTO));
    }
    @ApiOperation("入园数据分析-导出Excel")
    @PostMapping("/reportExportExcel")
//    @CloudRequiredPermission("business:inoutrecord:query")
    public void reportExportExcel (@RequestBody InParkDataDTO inParkDataDTO, HttpServletResponse response) {
        inoutRecordService.excel(inParkDataDTO,response);
    }
}
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/PlatformCloudController.java
@@ -251,7 +251,6 @@
    public ApiResponse restoreWork (@RequestBody JobOperateDTO jobOperateDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        jobOperateDTO.setLoginUserInfo(getLoginUser(token));
        PlatformJob platformJob = platformJobService.restoreWork(jobOperateDTO);
        platformJobService.cancelInPark(platformJob);
        return ApiResponse.success("操作成功");
    }
server/visits/dmvisit_service/src/main/java/com/doumee/dao/admin/response/PCWorkPlatformDataVO.java
@@ -40,6 +40,9 @@
    @ApiModelProperty(value = "在园长期相关方人数")
    private Long inParkLwUserNum;
    @ApiModelProperty(value = "在园货运车辆司机人数")
    private Long inParkDriverUserNum;
    @ApiModelProperty(value = "相关方入园人次")
    private Integer lwUserInNum;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/InoutRecordMapper.java
@@ -2,11 +2,12 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.InoutRecord;
import com.github.yulichang.base.MPJBaseMapper;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2025/04/28 16:19
 */
public interface InoutRecordMapper extends BaseMapper<InoutRecord> {
public interface InoutRecordMapper extends MPJBaseMapper<InoutRecord> {
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/InParkDataDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.doumee.dao.business.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2024/5/20 14:54
 */
@Data
public class InParkDataDTO {
    @ApiModelProperty(value = "查询类型:0车辆 1人员")
    private Integer type;
    @ApiModelProperty(value = "人车类型:0=人次/车次;1=人员/车辆")
    private Integer isGroupBy;
    @ApiModelProperty(value = "查询日期 å¹´ä»½å…¥ yyyy  æœˆä»½å…¥ yyyy-MM")
    private String dateStr;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/GeneralDataVO.java
@@ -12,9 +12,15 @@
@Data
public class GeneralDataVO{
    @ApiModelProperty(value = "业务主键",hidden = true)
    private Integer id;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "分类")
    private String categoryName;
    @ApiModelProperty(value = "数量")
    private Integer total ;
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/HiddenDangerCompanyVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.doumee.dao.business.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class HiddenDangerCompanyVO {
    @ApiModelProperty(value = "业务主键",hidden = true)
    private Integer id;
    @ApiModelProperty(value = "分类")
    private String categoryName;
    public HiddenDangerCompanyVO(String categoryName, int id) {
        this.categoryName = categoryName;
        this.id = id;
    }
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/InParkUserDataVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package com.doumee.dao.business.vo;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class InParkUserDataVO {
    @ApiModelProperty(value = "今日总数")
    private Integer todayTotal;
    @ApiModelProperty(value = "昨日总数")
    private Integer yesterdayTotal;
    @ApiModelProperty(value = "本周总数")
    private Integer weekTotal;
    @ApiModelProperty(value = "本月总数")
    private Integer monthTotal;
    @ApiModelProperty(value = "本年总数")
    private Integer yearTotal;
    @ApiModelProperty(value = "分类占比 - æ‰‡å½¢å›¾")
    List<GeneralDataVO> rataList;
    @ApiModelProperty(value = "本年累计统计")
    List<GeneralDataVO> cumulativeDataList;
    @ApiModelProperty(value = "年度入园统计排序")
    List<GeneralDataVO> yearSortList;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/InoutRecordService.java
@@ -1,9 +1,13 @@
package com.doumee.service.business;
import com.doumee.dao.business.dto.InParkDataDTO;
import com.doumee.dao.business.model.InoutRecord;
import com.doumee.dao.business.vo.GeneralDataVO;
import com.doumee.dao.business.vo.InParkUserDataVO;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -95,4 +99,12 @@
     * @return long
     */
    long count(InoutRecord inoutRecord);
    InParkUserDataVO getInParkUserData(InParkDataDTO inParkDataDTO);
    List<GeneralDataVO> getRataList(InParkDataDTO inParkDataDTO);
    List<List<String>> getReportList(InParkDataDTO inParkDataDTO);
    void excel(InParkDataDTO inParkDataDTO, HttpServletResponse response);
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarsServiceImpl.java
@@ -355,11 +355,26 @@
    @Override
    public List<Cars> findList(Cars cars) {
        if(Objects.nonNull(cars)
        && Constants.equalsInteger(Constants.ZERO,cars.getType())){
            return this.getGwCar();
        }
        QueryWrapper<Cars> wrapper = new QueryWrapper<>(cars);
        wrapper.lambda().eq(Cars::getIsdeleted,Constants.ZERO);
        return carsMapper.selectList(wrapper);
    }
    public List<Cars> getGwCar(){
        List<Cars> list  = carsMapper.selectJoinList(Cars.class,
                new MPJLambdaWrapper<Cars>().selectAll(Cars.class)
                        .leftJoin(Category.class,Category::getId,Cars::getCateId)
                        .eq(Category::getBizType,Constants.FOUR)
                        .eq(Cars::getIsdeleted,Constants.ZERO)
        );
        return list;
    }
    @Override
    public PageData<Cars> findPage(PageWrap<Cars> pageWrap) {
        IPage<Cars> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/HiddenDangerServiceImpl.java
@@ -10,6 +10,7 @@
import com.doumee.core.exception.BusinessException;
import com.doumee.dao.business.dao.*;
import com.doumee.dao.business.vo.GeneralDataVO;
import com.doumee.dao.business.vo.HiddenDangerCompanyVO;
import com.doumee.dao.business.vo.HiddenDangerDataVO;
import com.doumee.service.business.third.model.LoginUserInfo;
import com.doumee.service.business.third.model.PageData;
@@ -793,33 +794,30 @@
    @Override
    public HiddenDangerDataVO hiddenDangerData(HiddenDanger hiddenDanger){
        HiddenDangerDataVO hiddenDangerDataVO = new HiddenDangerDataVO();
        List<HiddenDanger> hiddenDangerYearList = hiddenDangerMapper.selectJoinList(HiddenDanger.class,
        List<HiddenDanger> hiddenDangerAllList = hiddenDangerMapper.selectJoinList(HiddenDanger.class,
                new MPJLambdaWrapper<HiddenDanger>()
                        .selectAll(HiddenDanger.class)
                .selectAs(HiddenDangerParam::getCompanyId, HiddenDanger::getAreaCompanyId)
                .leftJoin(HiddenDangerParam.class,HiddenDangerParam::getId,HiddenDanger::getAreaId) //隐患区域
                .eq(HiddenDanger::getIsdeleted,Constants.ZERO)
                .eq(Objects.nonNull(hiddenDanger.getStatus()),HiddenDanger::getStatus,hiddenDanger.getStatus())
                        .apply(" ( DATE_FORMAT(CREATE_DATE, '%Y') = DATE_FORMAT(now(), '%Y') ) ")
                        .apply(" ( DATE_FORMAT(t.CREATE_DATE, '%Y') = DATE_FORMAT(now(), '%Y') ) ")
                .ge(Objects.nonNull(hiddenDanger.getQueryStartTime()), HiddenDanger::getCreateDate,hiddenDanger.getQueryStartTime())
                .le(Objects.nonNull(hiddenDanger.getQueryEndTime()),HiddenDanger::getCreateDate,hiddenDanger.getQueryEndTime())
        );
        List<GeneralDataVO> yearDataList = new ArrayList<>();
        if(CollectionUtils.isEmpty(hiddenDangerYearList)){
        if(CollectionUtils.isEmpty(hiddenDangerAllList)){
            return hiddenDangerDataVO;
        }
        for (int i = 1; i <=12 ; i++) {
            GeneralDataVO generalDataVO = new GeneralDataVO();
            generalDataVO.setName(Integer.toString(i));
            generalDataVO.setTotal(hiddenDangerYearList.stream().filter(j->Constants.equalsInteger(Integer.valueOf(generalDataVO.getName()),Integer.valueOf(DateUtil.formatDate(j.getCreateDate(),"MM")))).collect(Collectors.toList()).size());
            generalDataVO.setTotal(hiddenDangerAllList.stream().filter(j->Constants.equalsInteger(Integer.valueOf(generalDataVO.getName()),Integer.valueOf(DateUtil.formatDate(j.getCreateDate(),"MM")))).collect(Collectors.toList()).size());
            generalDataVO.setName(generalDataVO.getName()+"月");
            yearDataList.add(generalDataVO);
        }
        hiddenDangerDataVO.setYearList(yearDataList);
        List<HiddenDanger> hiddenDangerAllList = hiddenDangerYearList.stream().filter(i->DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(DateUtil.formatDate(new Date(),"yyyy-MM-dd"))).collect(Collectors.toList());
        if(CollectionUtils.isEmpty(hiddenDangerAllList)){
            return hiddenDangerDataVO;
        }
        
        
        hiddenDangerDataVO.setTotal(hiddenDangerAllList.size());
@@ -859,22 +857,26 @@
            }
            //全部隐患区域部门数据
            List<Integer> companyIdList =  hiddenDangerAllList.stream().map(i->i.getAreaCompanyId()).collect(Collectors.toList());
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(companyIdList)){
            List<HiddenDangerCompanyVO> hiddenDangerCompanyVOList =  hiddenDangerAllList.stream().map(i->new HiddenDangerCompanyVO(i.getAreaName(),i.getAreaCompanyId())).collect(Collectors.toList());
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(hiddenDangerCompanyVOList)){
                List<GeneralDataVO> companyGeneralDataList = new ArrayList<>();
                Set<Integer> companyIdSetList = new HashSet<>(companyIdList);
                Set<HiddenDangerCompanyVO> companyIdSetList = new HashSet<>(hiddenDangerCompanyVOList);
                List<Company> companyList = companyMapper.selectList(new QueryWrapper<Company>()
                        .lambda().eq(Company::getIsdeleted,Constants.ZERO));
                for (Integer companyId:companyIdSetList) {
                    if(Objects.isNull(companyId)){
                for (HiddenDangerCompanyVO hiddenDangerCompanyVO:companyIdSetList) {
                    if(Objects.isNull(hiddenDangerCompanyVO)
                    || Objects.isNull(hiddenDangerCompanyVO.getId())
                    || StringUtils.isBlank(hiddenDangerCompanyVO.getCategoryName())){
                        continue;
                    }
                    Optional<Company> optionalCompany = companyList.stream().filter(i->Constants.equalsInteger(i.getId(),companyId)).findAny();
                    Optional<Company> optionalCompany = companyList.stream().filter(i->Constants.equalsInteger(i.getId(),hiddenDangerCompanyVO.getId())).findAny();
                    if(optionalCompany.isPresent()){
                        GeneralDataVO generalDataVO = new GeneralDataVO();
                        Company company = optionalCompany.get();
                        Integer total = hiddenDangerAllList.stream().filter(i->Constants.equalsInteger(i.getAreaCompanyId(),company.getId())).collect(Collectors.toList()).size();
                        generalDataVO.setName(company.getName());
                        generalDataVO.setTotal(total);
                        generalDataVO.setCategoryName(hiddenDangerCompanyVO.getCategoryName());
                        companyGeneralDataList.add(generalDataVO);
                    }
                }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java
@@ -1,8 +1,18 @@
package com.doumee.service.business.impl;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.CategoryMapper;
import com.doumee.dao.business.InoutRecordMapper;
import com.doumee.dao.business.dto.InParkDataDTO;
import com.doumee.dao.business.model.Category;
import com.doumee.dao.business.model.InoutRecord;
import com.doumee.dao.business.vo.GeneralDataVO;
import com.doumee.dao.business.vo.InParkUserDataVO;
import com.doumee.service.business.InoutRecordService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -10,11 +20,26 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.PageWrap;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import org.apache.commons.lang.StringUtils;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.text.DecimalFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.stream.Collectors;
/**
 * å‡ºå…¥åœºäººæ¬¡è½¦æ¬¡æ¯æ—¥ç»Ÿè®¡è¡¨Service实现
@@ -26,6 +51,9 @@
    @Autowired
    private InoutRecordMapper inoutRecordMapper;
    @Autowired
    private CategoryMapper categoryMapper;
    @Override
    public Integer create(InoutRecord inoutRecord) {
@@ -172,4 +200,353 @@
        QueryWrapper<InoutRecord> wrapper = new QueryWrapper<>(inoutRecord);
        return inoutRecordMapper.selectCount(wrapper);
    }
    //人员分类  å•独处理人员数据  0劳务访客 1普通访客 2内部员工 3车辆信息 4相关方人员 5货运司机
    private static String[] userTypeList = new String[]{"","普通访客","内部人员","","相关方人员","货运司机"};
    /**
     *  æŸ¥è¯¢åŸºç¡€æ•°æ®
     * @return
     */
    @Override
    public InParkUserDataVO getInParkUserData(InParkDataDTO inParkDataDTO){
        if(Objects.isNull(inParkDataDTO)
        || Objects.isNull(inParkDataDTO.getType())
        || Objects.isNull(inParkDataDTO.getIsGroupBy())
        || (Objects.nonNull(inParkDataDTO.getType())&& !(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE) ))
        || (Objects.nonNull(inParkDataDTO.getIsGroupBy())&& !(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ONE) ))
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //查询本周的开始日期和结束日期
        Long weekStart = LocalDate.now().with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli();
        InParkUserDataVO inParkUserDataVO = new InParkUserDataVO();
        List<InoutRecord> yearList = inoutRecordMapper.selectJoinList(InoutRecord.class,new MPJLambdaWrapper<InoutRecord>()
                .selectAll(InoutRecord.class)
                .eq(InoutRecord::getIsdeleted,Constants.ZERO)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO),InoutRecord::getCarCode)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE),InoutRecord::getMemberPhone)
                .apply(" ( DATE_FORMAT(CREATE_DATE, '%Y') = DATE_FORMAT(now(), '%Y') ) ")
        );
        List<InoutRecord> monthList = yearList.stream().filter(i->DateUtil.formatDate(i.getCreateDate(),"yyyy-MM").equals(DateUtil.formatDate(new Date(),"yyyy-MM"))).collect(Collectors.toList());
        List<InoutRecord> weekList = yearList.stream().filter(i->i.getCreateDate().getTime()>=weekStart).collect(Collectors.toList());
        List<InoutRecord> todayList = weekList.stream().filter(i-> DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(DateUtil.formatDate(new Date(),"yyyy-MM-dd"))).collect(Collectors.toList());
        List<InoutRecord> yesterdayList = yearList.stream().filter(i-> DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(DateUtil.getBeforDay(new Date(),1))).collect(Collectors.toList());
        if(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ZERO)){
            inParkUserDataVO.setYearTotal(yearList.size());
            inParkUserDataVO.setMonthTotal(monthList.size());
            inParkUserDataVO.setTodayTotal(todayList.size());
            inParkUserDataVO.setWeekTotal(weekList.size());
            inParkUserDataVO.setYesterdayTotal(yesterdayList.size());
        }else{
            yearList = this.getListByType(yearList,inParkDataDTO.getType());
            monthList = this.getListByType(monthList,inParkDataDTO.getType());
            weekList = this.getListByType(weekList,inParkDataDTO.getType());
            todayList = this.getListByType(todayList,inParkDataDTO.getType());
            yesterdayList = this.getListByType(yesterdayList,inParkDataDTO.getType());
            inParkUserDataVO.setYearTotal(yearList.size());
            inParkUserDataVO.setMonthTotal(monthList.size());
            inParkUserDataVO.setTodayTotal(todayList.size());
            inParkUserDataVO.setWeekTotal(weekList.size());
            inParkUserDataVO.setYesterdayTotal(yesterdayList.size());
        }
        //处理年度折线图数据
        List<GeneralDataVO> cumulativeDataList = new ArrayList<>();
        for (int i = 1; i <=12 ; i++) {
            GeneralDataVO generalDataVO = new GeneralDataVO();
            generalDataVO.setName(Integer.toString(i));
            generalDataVO.setTotal(yearList.stream().filter(j->Constants.equalsInteger(Integer.valueOf(generalDataVO.getName()),Integer.valueOf(DateUtil.formatDate(j.getCreateDate(),"MM")))).collect(Collectors.toList()).size());
            generalDataVO.setName(generalDataVO.getName()+"月");
            cumulativeDataList.add(generalDataVO);
        }
        inParkUserDataVO.setCumulativeDataList(cumulativeDataList);
        //处理分类数据
        List<GeneralDataVO> yearSortList = new ArrayList<>();
        if(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE)){
            for (int i = 0; i < userTypeList.length; i++) {
                if(StringUtils.isBlank(userTypeList[i])){
                    continue;
                }
                GeneralDataVO generalDataVO = new GeneralDataVO();
                generalDataVO.setName(userTypeList[i]);
                int index = i;
                generalDataVO.setTotal(yearList.stream().filter(j->Constants.equalsInteger(j.getType(), index)).collect(Collectors.toList()).size());
                yearSortList.add(generalDataVO);
            }
        }else{
            List<String> categoryNameList = yearList.stream().filter(i-> StringUtils.isNotBlank(i.getCategoryName())).map(i->i.getCategoryName()).collect(Collectors.toList());
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categoryNameList)){
                Set<String> setList = new HashSet<>(categoryNameList);
                for (String categoryName:setList) {
                    GeneralDataVO generalDataVO = new GeneralDataVO();
                    generalDataVO.setName(categoryName);
                    generalDataVO.setTotal(yearList.stream().filter(j->StringUtils.isNotBlank(j.getCategoryName())&&j.getCategoryName().equals(categoryName)).collect(Collectors.toList()).size());
                    yearSortList.add(generalDataVO);
                }
            }
        }
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(yearSortList)){
            Collections.sort(yearSortList, new Comparator<GeneralDataVO>() {
                @Override
                public int compare(GeneralDataVO o1, GeneralDataVO o2) {
                    // è¿”回值为int类型,大于0表示正序,小于0表示逆序
                    return o2.getTotal() - o1.getTotal();
                }
            });
            inParkUserDataVO.setYearSortList(yearSortList);
        }
        return inParkUserDataVO;
    }
    /**
     * æŸ¥è¯¢å æ¯”数据
     * @return
     */
    @Override
    public List<GeneralDataVO> getRataList(InParkDataDTO inParkDataDTO){
        if(Objects.isNull(inParkDataDTO)
            || Objects.isNull(inParkDataDTO.getType())
            || Objects.isNull(inParkDataDTO.getIsGroupBy())
            || StringUtils.isBlank(inParkDataDTO.getDateStr())
            || (Objects.nonNull(inParkDataDTO.getType())&& !(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE) ))
            || (Objects.nonNull(inParkDataDTO.getIsGroupBy())&& !(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ONE) ))
            || !( Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4) || Constants.equalsInteger(inParkDataDTO.getDateStr().length(),7) )
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        List<GeneralDataVO> rataList = new ArrayList<>();
        List<InoutRecord> yearList = inoutRecordMapper.selectJoinList(InoutRecord.class,new MPJLambdaWrapper<InoutRecord>()
                .selectAll(InoutRecord.class)
                .eq(InoutRecord::getIsdeleted,Constants.ZERO)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO),InoutRecord::getCarCode)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE),InoutRecord::getMemberPhone)
                .apply(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4)," ( DATE_FORMAT(CREATE_DATE, '%Y') =  '"+inParkDataDTO.getDateStr()+"' ) ")
                .apply(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),7)," ( DATE_FORMAT(CREATE_DATE, '%Y-%m') =  '"+inParkDataDTO.getDateStr()+"' ) ")
        );
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(yearList)){
            return rataList;
        }
        if(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ONE)){
            yearList = this.getListByType(yearList,inParkDataDTO.getType());
        }
        if(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE)){
            for (int i = 0; i < userTypeList.length; i++) {
                if(StringUtils.isBlank(userTypeList[i])){
                    continue;
                }
                GeneralDataVO generalDataVO = new GeneralDataVO();
                generalDataVO.setName(userTypeList[i]);
                int index = i;
                generalDataVO.setTotal(yearList.stream().filter(j->Constants.equalsInteger(j.getType(), index)).collect(Collectors.toList()).size());
                generalDataVO.setRata(new BigDecimal(generalDataVO.getTotal().toString()).divide(new BigDecimal(yearList.size()+""),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
                rataList.add(generalDataVO);
            }
        }else{
            List<String> categoryNameList = yearList.stream().filter(i-> StringUtils.isNotBlank(i.getCategoryParentName())).map(i->i.getCategoryParentName()).collect(Collectors.toList());
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categoryNameList)){
                Set<String> setList = new HashSet<>(categoryNameList);
                for (String categoryName:setList) {
                    GeneralDataVO generalDataVO = new GeneralDataVO();
                    generalDataVO.setName(categoryName);
                    generalDataVO.setTotal(yearList.stream().filter(j->StringUtils.isNotBlank(j.getCategoryParentName())&&j.getCategoryName().equals(categoryName)).collect(Collectors.toList()).size());
                    generalDataVO.setRata(new BigDecimal(generalDataVO.getTotal().toString()).divide(new BigDecimal(yearList.size()+""),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal("100")));
                    rataList.add(generalDataVO);
                }
            }
        }
        return rataList;
    }
    @Override
    public List<List<String>> getReportList(InParkDataDTO inParkDataDTO){
        if(Objects.isNull(inParkDataDTO)
                || Objects.isNull(inParkDataDTO.getType())
                || Objects.isNull(inParkDataDTO.getIsGroupBy())
                || StringUtils.isBlank(inParkDataDTO.getDateStr())
                || (Objects.nonNull(inParkDataDTO.getType())&& !(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE) ))
                || (Objects.nonNull(inParkDataDTO.getIsGroupBy())&& !(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ZERO) || Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ONE) ))
                || !( Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4) || Constants.equalsInteger(inParkDataDTO.getDateStr().length(),7) )
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        List<InoutRecord> allList = inoutRecordMapper.selectJoinList(InoutRecord.class,new MPJLambdaWrapper<InoutRecord>()
                .selectAll(InoutRecord.class)
                .eq(InoutRecord::getIsdeleted,Constants.ZERO)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO),InoutRecord::getCarCode)
                .isNotNull(Constants.equalsInteger(inParkDataDTO.getType(),Constants.ONE),InoutRecord::getMemberPhone)
                .apply(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4)," ( DATE_FORMAT(CREATE_DATE, '%Y') =  '"+inParkDataDTO.getDateStr()+"' ) ")
                .apply(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),7)," ( DATE_FORMAT(CREATE_DATE, '%Y-%m') =  '"+inParkDataDTO.getDateStr()+"' ) ")
        );
        List<List<String>>  resultList = new ArrayList<>();
        if(CollectionUtils.isEmpty(allList)){
            return resultList;
        }
        if(Constants.equalsInteger(inParkDataDTO.getIsGroupBy(),Constants.ONE)){
            allList = this.getListByType(allList,inParkDataDTO.getType());
        }
        List<String> dateList = new ArrayList<>();
        //年份
        if(Constants.equalsInteger(inParkDataDTO.getDateStr().length(),4)){
            Integer maxMonth = 12;
            if(Constants.equalsInteger(DateUtil.getNowYearNum(),Integer.valueOf(inParkDataDTO.getDateStr()))){
                maxMonth =  DateUtil.getNowMonthNum();
            }
            for (int i = 1; i <= maxMonth; i++) {
                dateList.add(DateUtil.getNowYearNum()+"-"+ StringUtils.leftPad(i+"",2,"0"));
            }
        }else {
            //日期
            Integer year  = Integer.valueOf(inParkDataDTO.getDateStr().substring(0,4));
            Integer month = Integer.valueOf(inParkDataDTO.getDateStr().substring(5,6));
            Integer today = DateUtil.getNowDayNum();
            YearMonth yearMonth = YearMonth.of(year, month);
            // èŽ·å–è¯¥æœˆçš„æœ€åŽä¸€å¤©
            LocalDate lastDayDate = yearMonth.atEndOfMonth();
            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
            Integer lastDay = Integer.valueOf(lastDayDate.format(formatter));
            if(Constants.equalsInteger(year,DateUtil.getNowYearNum()) && Constants.equalsInteger(month,DateUtil.getNowMonthNum())){
                if(today <  lastDay){
                    lastDay = today;
                }
            }
            for (int i = 1; i <= lastDay; i++) {
                dateList.add(year + "-" + StringUtils.leftPad(month.toString(),2,"0") + "-" + StringUtils.leftPad(lastDay.toString(),2,"0"));
            }
        }
        return this.dealResultData(allList,dateList,inParkDataDTO.getType(),inParkDataDTO.getDateStr());
    }
    public List<List<String>> dealResultData(List<InoutRecord> allList,List<String> dataList ,Integer type,String dateStr){
        List<List<String>>  resultList = new ArrayList<>();
        List<String> totalString = new ArrayList<>();
        totalString.add("日期");
        if(Constants.equalsInteger(type,Constants.ZERO)){
            List<String> categoryNameList = allList.stream().filter(j-> StringUtils.isNotBlank(j.getCategoryName())).map(j->j.getCategoryName()).collect(Collectors.toList());
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(categoryNameList)){
                return resultList;
            }
            Set<String> setList = new HashSet<>(categoryNameList);
            for (String categoryName:setList) {
                totalString.add(categoryName);
            }
            totalString.add("合计");
            resultList.add(totalString);
            Integer total = 0;
            for (String str:dataList) {
                for (String categoryName:setList) {
                    List<String> dataChildList = new ArrayList<>();
                    dataChildList.add(str);
                    if(Constants.equalsInteger(dateStr.length(),4)){
                        Integer childNum = allList.stream().filter(i->categoryName.equals(i.getCategoryName())
                                && DateUtil.formatDate(i.getCreateDate(),"yyyy-MM").equals(str)).collect(Collectors.toList()).size();
                        dataChildList.add(
                                Integer.toString(childNum)
                        );
                        total = total + childNum;
                    }else if(Constants.equalsInteger(dateStr.length(),7)){
                        Integer childNum = allList.stream().filter(i->categoryName.equals(i.getCategoryName())
                                &&DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(str)).collect(Collectors.toList()).size();
                        dataChildList.add(
                                Integer.toString(childNum)
                        );
                        total = total + childNum;
                    }
                    dataChildList.add(Integer.toString(total));
                    resultList.add(dataChildList);
                }
            }
        }else{
            for (int j = 0; j < userTypeList.length; j++) {
                if(StringUtils.isBlank(userTypeList[j])){
                    continue;
                }
                totalString.add(userTypeList[j]);
                totalString.add("合计");
                resultList.add(totalString);
            }
            Integer total = 0;
            for (String str:dataList) {
                for (String typeName:userTypeList) {
                    List<String> dataChildList = new ArrayList<>();
                    dataChildList.add(str);
                    if(Constants.equalsInteger(dateStr.length(),4)){
                        Integer childNum = allList.stream().filter(i->typeName.equals(i.getCategoryName())
                                && DateUtil.formatDate(i.getCreateDate(),"yyyy-MM").equals(str)).collect(Collectors.toList()).size();
                        dataChildList.add(
                                Integer.toString(childNum)
                        );
                        total = total + childNum;
                    }else if(Constants.equalsInteger(dateStr.length(),7)){
                        Integer childNum = allList.stream().filter(i->typeName.equals(i.getCategoryName())
                                &&DateUtil.formatDate(i.getCreateDate(),"yyyy-MM-dd").equals(str)).collect(Collectors.toList()).size();
                        dataChildList.add(
                                Integer.toString(childNum)
                        );
                        total = total + childNum;
                    }
                    dataChildList.add(Integer.toString(total));
                    resultList.add(dataChildList);
                }
            }
        }
        return resultList;
    }
    public List<InoutRecord> getListByType(List<InoutRecord> list,Integer type){
        return Constants.equalsInteger(type,Constants.ONE)?this.getDataByMemberPhoneSize(list):this.getDataByCarCodeSize(list);
    }
    public List<InoutRecord> getDataByMemberPhoneSize(List<InoutRecord> list){
        Map<String, InoutRecord> uniqueByMemberPhone = list.stream()
                .collect(Collectors.toMap(
                        InoutRecord::getMemberPhone,
                        person -> person,
                        (existing, replacement) -> existing
                ));
        List<InoutRecord> uniqueList = new ArrayList<>(uniqueByMemberPhone.values());
        return uniqueList;
    }
    public List<InoutRecord> getDataByCarCodeSize(List<InoutRecord> list){
        Map<String, InoutRecord> uniqueByCarCode = list.stream()
                .collect(Collectors.toMap(
                        InoutRecord::getCarCode,
                        person -> person,
                        (existing, replacement) -> existing
                ));
        List<InoutRecord> uniqueList = new ArrayList<>(uniqueByCarCode.values());
        return uniqueList;
    }
    @Override
    public void excel(InParkDataDTO inParkDataDTO, HttpServletResponse response){
        List<List<String>> data = this.getReportList(inParkDataDTO);
        try {
            String fileName = Constants.equalsInteger(inParkDataDTO.getType(),Constants.ZERO)?"入园车辆统计表_":"入园人员统计表_"+System.currentTimeMillis();
            String encodeFileName = URLEncoder.encode(fileName, Charset.forName("UTF-8").toString()) + ".xlsx";
            response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
            response.setContentType("application/octet-stream");
            response.setHeader("eva-opera-type", "download");
            response.setHeader("eva-download-filename", encodeFileName);
            ExcelExporter.exportList(data, fileName, response.getOutputStream());
        } catch (IOException e) {
            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        }
    }
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -2472,5 +2472,37 @@
    }
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public PlatformJob restoreWork(JobOperateDTO jobOperateDTO){
        if(Objects.isNull(jobOperateDTO)
                || Objects.isNull(jobOperateDTO.getJobId())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId());
        if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.EXCEPTION.getKey())){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,业务状态已流转!");
        }
        Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId());
        if(Objects.isNull(platform)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到月台信息");
        }
        PlatformJob oldPlatformJob = new PlatformJob();
        BeanUtils.copyProperties(platformJob,oldPlatformJob);
        if(Objects.isNull(platformJob.getStartDate())){
            platformJob.setStartDate(new Date());
        }
        platformJob.setStatus(Constants.PlatformJobStatus.WORKING.getKey());
        platformJob.setEditDate(new Date());
        platformJobMapper.updateById(platformJob);
        //存储操作日志
        savePlatformLog(Constants.PlatformJobLogType.WORKING.getKey(),oldPlatformJob,platformJob,
                Constants.PlatformJobLogType.WORKING.getInfo().replace("{data}",platform.getName()));
        return platformJob;
    }
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -128,6 +128,8 @@
    @Autowired
    private InoutDayCountMapper inoutDayCountMapper;
    @Autowired
    private InoutRecordMapper inoutRecordMapper;
    @Autowired
    private CarEventMapper carEventMapper;
    @Autowired
@@ -1809,10 +1811,14 @@
                    .apply(" DATE(TIME_INFO) = CURDATE()  ")
                    .last(" limit 1 ")
            );
            //今日在园人数
            pcWorkPlatformDataVO.setTodayInParkUserNum(
                    retentionList.stream().filter(i->!Constants.equalsInteger(i.getType(),Constants.THREE)).count()
                    inoutRecordMapper.selectCount(new QueryWrapper<InoutRecord>().lambda()
                            .isNotNull(InoutRecord::getMemberPhone)
                            .isNull(InoutRecord::getCarCode)
                            .apply( " DATE(TIME_INFO) = CURDATE() " ))
                    //retentionList.stream().filter(i->!Constants.equalsInteger(i.getType(),Constants.THREE)).count()
            );
            pcWorkPlatformDataVO.setTodayInUserNum(Constants.ZERO);
@@ -1820,8 +1826,13 @@
            //在园长期相关方人数
            pcWorkPlatformDataVO.setInParkLwUserNum(
                    retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO)
                            && Constants.equalsInteger(i.getCompanyType(),Constants.ZERO)).count()
                    inoutRecordMapper.selectCount(new QueryWrapper<InoutRecord>().lambda()
                            .eq(InoutRecord::getMemberType,Constants.TWO)
                            .isNotNull(InoutRecord::getMemberPhone)
                            .isNull(InoutRecord::getCarCode)
                            .apply( " DATE(TIME_INFO) = CURDATE() " ))
//                    retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO)
//                            && Constants.equalsInteger(i.getCompanyType(),Constants.ZERO)).count()
            );
            pcWorkPlatformDataVO.setLwUserInNum(Constants.ZERO);
            pcWorkPlatformDataVO.setLwUserOutNum(Constants.ZERO);
@@ -1829,14 +1840,30 @@
            //在园访客数量
            pcWorkPlatformDataVO.setInParkVisitUserNum(
                    retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&Objects.isNull(i.getCompanyType())).count()
                    inoutRecordMapper.selectCount(new QueryWrapper<InoutRecord>().lambda()
                            .eq(InoutRecord::getMemberType,Constants.ZERO)
                            .isNotNull(InoutRecord::getMemberPhone)
                            .isNull(InoutRecord::getCarCode)
                            .apply( " DATE(TIME_INFO) = CURDATE() " ))
                    //retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&Objects.isNull(i.getCompanyType())).count()
            );
            pcWorkPlatformDataVO.setVisitUserNum(Constants.ZERO);
            pcWorkPlatformDataVO.setSignLevelNum(Constants.ZERO);
            //在园货运车辆司机
            pcWorkPlatformDataVO.setInParkDriverUserNum(inoutRecordMapper.selectCount(new QueryWrapper<InoutRecord>().lambda()
                    .eq(InoutRecord::getMemberType,Constants.THREE)
                    .isNotNull(InoutRecord::getMemberPhone)
                    .isNull(InoutRecord::getCarCode)
                    .apply( " DATE(TIME_INFO) = CURDATE() " )));
            //在园车辆
            pcWorkPlatformDataVO.setTodayInParkCarNum(
                    retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.THREE)).count()
                    inoutRecordMapper.selectCount(new QueryWrapper<InoutRecord>().lambda()
                            .isNotNull(InoutRecord::getCarCode)
                            .isNull(InoutRecord::getMemberPhone)
                            .apply( " DATE(TIME_INFO) = CURDATE() " ))
                    //retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.THREE)).count()
            );
            pcWorkPlatformDataVO.setTodayInCarNum(Constants.ZERO);
            pcWorkPlatformDataVO.setTodayOutCarNum(Constants.ZERO);