| | |
| | | /** |
| | | * 各类型医废收集总量 |
| | | * |
| | | * @param type |
| | | * @param type 1-按周统计(最近7天),2-按月统计(最近30天) |
| | | * @return |
| | | */ |
| | | public TotalCollectWeightByTypeVO totalCollectWeightByType(Integer type) { |
| | |
| | | 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(); |