mitao
2025-04-14 0852acae13603be95eaaa0b501f3441508ff3fe5
medicalWaste-system/src/main/java/com/sinata/system/service/biz/ScreenService.java
@@ -160,7 +160,7 @@
    /**
     * 各类型医废收集总量
     *
     * @param type
     * @param type 1-按周统计(最近7天),2-按月统计(最近30天)
     * @return
     */
    public TotalCollectWeightByTypeVO totalCollectWeightByType(Integer type) {
@@ -169,13 +169,13 @@
        Date startTime = DateUtils.getNowDate();
        Date endTime = DateUtils.getNowDate();
        if (type.equals(1)) {
            //获取最本周的日期
            vo.setDateList(DateUtils.getAllDatesOfCurrentWeek("MM-dd"));
            startTime = DateUtils.getFirstDayOfCurrentWeekAtMidnight();
            //按周统计,统计最近7天的数据
            vo.setDateList(DateUtils.getAllDatesOfLastNDays("MM-dd", 7));
            startTime = DateUtils.getFirstDayOfLastNDaysAtMidnight(7);
        } else {
            //最近一个月的日期
            vo.setDateList(DateUtils.getAllDatesOfCurrentMonth("MM-dd"));
            startTime = DateUtils.getFirstDayOfCurrentMonthAtMidnight();
            //按月统计,统计最近30天的数据
            vo.setDateList(DateUtils.getAllDatesOfLastNDays("MM-dd", 30));
            startTime = DateUtils.getFirstDayOfLastNDaysAtMidnight(30);
        }
        //查询医废类型
        List<SysDictDataVO> medicalWasteTypeList = sysDictDataService.medicalWasteTypeList();