k94314517
2025-05-06 2c4ea94474ce8f9eb48b71fb9960a7da45320282
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);