rk
11 小时以前 44ff584e5dcb3a066d70e4eaaf9f098440a1a5f7
钥匙柜大屏
已修改6个文件
47 ■■■■ 文件已修改
server/system_gateway/src/main/resources/bootstrap-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/bootstrap-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/bootstrap-dev.yml
@@ -7,7 +7,7 @@
      discovery:
        server-addr: http://192.168.0.7:8848 #配置Nacos地址
#        namespace: dmvisit
        namespace: wuhu_visit_dev
        namespace: wuhu_visit_dev1
        username: nacos
        password: nacos
    gateway:
server/system_service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -403,6 +403,25 @@
        }
        return list;
    }
    public static List<String> getBeforDaysByFormat(Date currentDate,Integer days,String format){
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(currentDate);
        Date endDate = currentDate; // 获取当前日期
        calendar.add(Calendar.DAY_OF_YEAR, -days); // 往前推7天
        Date startDate = calendar.getTime(); // 获取推算后的日期
        List<String> list = new ArrayList<>();
        while (startDate.before(endDate)) {
            calendar.add(Calendar.DAY_OF_YEAR, 1); // 获取下一天日期
            startDate = calendar.getTime();
            list.add(DateUtil.dateToString(startDate,format));
            System.out.println(DateUtil.dateToString(startDate,format));
        }
        return list;
    }
    public static List<Date> getDateListBeforDays(Date currentDate,Integer days){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Calendar calendar = Calendar.getInstance();
server/visits/dmvisit_admin/src/main/resources/bootstrap-dev.yml
@@ -16,7 +16,7 @@
      discovery:
        server-addr: http://192.168.0.7:8848 #配置Nacos地址
#        namespace: dmvisit
        namespace: wuhu_visit_dev
        namespace: wuhu_visit_dev1
        username: nacos
        password: nacos
knife4j:
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -758,7 +758,7 @@
    @Override
    public List<InterestedListVO> getCarUseStatistics(Integer type){
        List<String> weekDays = DateUtil.getBeforDays(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15);
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM月dd日");
        MPJLambdaWrapper<CarUseBook> wrapper = new MPJLambdaWrapper<CarUseBook>()
                .selectAll(CarUseBook.class)
                .eq(CarUseBook::getIsdeleted, Constants.ZERO)
@@ -774,10 +774,11 @@
            vo.setNextNum(Constants.ZERO);
            if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(carUseBookList)) {
                vo.setNum(
                        carUseBookList.stream().filter(i->DateUtil.dateToString(i.getCreateDate(),"yyyy-MM-dd").equals(days))
                        carUseBookList.stream().filter(i->DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                                .collect(Collectors.toList()).size()
                );
            }
            list.add(vo);
        }
        return list;
    }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetLogServiceImpl.java
@@ -356,7 +356,7 @@
    @Override
    public List<InterestedListVO> getKeyUseStatistics(Integer type){
        List<String> weekDays = DateUtil.getBeforDays(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15);
        List<String> weekDays = DateUtil.getBeforDaysByFormat(new Date(),Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15,"MM月dd日");
        MPJLambdaWrapper<JkCabinetLog> wrapper = new MPJLambdaWrapper<JkCabinetLog>()
                .selectAll(JkCabinetLog.class)
                .selectAs(Member::getName,JkCabinetLog::getMemberName)
@@ -374,7 +374,7 @@
                .eq(JkCabinetLog::getIsdeleted, Constants.ZERO)
                .eq(JkCabinetLog::getType,Constants.ONE)
                .ne(JkCabinetLog::getKeyStatus,Constants.ZERO)
                .apply("  CREATE_DATE >   CURDATE() - INTERVAL "+(Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15)+" DAY ")
                .apply("  t.CREATE_DATE >   CURDATE() - INTERVAL "+(Objects.isNull(type)||Constants.equalsInteger(type,Constants.ZERO)?7:15)+" DAY ")
                .orderByDesc(JkCabinetLog::getCreateDate);
        List<JkCabinetLog> jkCabinetLogs = jkCabinetLogMapper.selectJoinList(JkCabinetLog.class,wrapper);
        List<InterestedListVO> list = new ArrayList<>();
@@ -386,14 +386,15 @@
            if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(jkCabinetLogs)) {
                vo.setNum(
                        jkCabinetLogs.stream().filter(i->Constants.equalsInteger(i.getKeyStatus(),Constants.TWO)
                                                &&DateUtil.dateToString(i.getCreateDate(),"yyyy-MM-dd").equals(days))
                                                &&DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                                .collect(Collectors.toList()).size()
                );
                vo.setNextNum(jkCabinetLogs.stream().filter(i->Constants.equalsInteger(i.getKeyStatus(),Constants.ONE)
                                &&DateUtil.dateToString(i.getCreateDate(),"yyyy-MM-dd").equals(days))
                                &&DateUtil.dateToString(i.getCreateDate(),"MM月dd日").equals(days))
                        .collect(Collectors.toList()).size());
            }
            list.add(vo);
        }
        return list;
    }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/WarningServiceImpl.java
@@ -384,8 +384,8 @@
        List<WarningEvent> warningEventList = warningEventMapper.selectJoinList(WarningEvent.class,
                new MPJLambdaWrapper<WarningEvent>().
                selectAll(WarningEvent.class)
                .selectAs(Warning::getCode,WarningEvent::getWarningId)
                .leftJoin(Warning.class,Warning::getId,WarningEvent::getWarningCode)
                .selectAs(Warning::getCode,WarningEvent::getWarningCode)
                .leftJoin(Warning.class,Warning::getId,WarningEvent::getWarningId)
                .eq(WarningEvent::getIsdeleted,Constants.ZERO)
                .in(Warning::getCode,Constants.WarningConfig.KEY_TIME_OUT_BACK.getKey(),Constants.WarningConfig.ALARM_TEST.getKey(),Constants.WarningConfig.GRID_TIME_OUT_INFO.getKey())
                .like(Objects.nonNull(type)&&Constants.equalsInteger(Constants.ZERO,type),WarningEvent::getCreateDate,DateUtil.getCurrDate())
@@ -395,15 +395,15 @@
        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(warningEventList)){
            vo.setAlcoholNum(
                    warningEventList.stream().filter(i->StringUtils.isNotBlank(i.getWarningCode())&&
                            i.getWarningCode().equals(Constants.WarningConfig.ALARM_TEST.getKey())).collect(Collectors.toList()).size()
                            i.getWarningCode().equals(Constants.WarningConfig.ALARM_TEST.getKey()+"")).collect(Collectors.toList()).size()
            );
            vo.setUnCloseNum(
                    warningEventList.stream().filter(i->StringUtils.isNotBlank(i.getWarningCode())&&
                            i.getWarningCode().equals(Constants.WarningConfig.GRID_TIME_OUT_INFO.getKey())).collect(Collectors.toList()).size()
                            i.getWarningCode().equals(Constants.WarningConfig.GRID_TIME_OUT_INFO.getKey()+"")).collect(Collectors.toList()).size()
            );
            vo.setTimeOutNum(
                    warningEventList.stream().filter(i->StringUtils.isNotBlank(i.getWarningCode())&&
                            i.getWarningCode().equals(Constants.WarningConfig.KEY_TIME_OUT_BACK.getKey())).collect(Collectors.toList()).size()
                            i.getWarningCode().equals(Constants.WarningConfig.KEY_TIME_OUT_BACK.getKey()+"")).collect(Collectors.toList()).size()
            );
        }