| | |
| | | dataAnalysisDto.setBeginDate(startDate.atTime(LocalTime.MIN).format(dateTimeFormatter)); |
| | | dataAnalysisDto.setEndDate(endDate.atTime(LocalTime.MAX).format(dateTimeFormatter)); |
| | | } |
| | | // if (StrUtil.isNotBlank(dataAnalysisDto.getBeginDate()) && StrUtil.isNotBlank(dataAnalysisDto.getEndDate())) { |
| | | // return dataAnalysisMapper.getRawPassRateByBarChartByDay(dataAnalysisDto); |
| | | // } else |
| | | // if (dataAnalysisDto.getDateType().equals("1")) { |
| | | //// // 获取本周的开始时间(周一 00:00:00) |
| | | //// DateTime beginOfWeek = DateUtil.beginOfWeek(now); |
| | | //// // 获取本周的结束时间(周日 23:59:59) |
| | | //// // 获取本周的结束时间(周日 23:59:59) |
| | | //// DateTime endOfWeek = DateUtil.endOfWeek(now); |
| | | //// dataAnalysisDto.setBeginDate(DateUtil.format(beginOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | //// dataAnalysisDto.setEndDate(DateUtil.format(endOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | // List<Map<String, Object>> maps = dataAnalysisMapper.getRawPassRateByBarChartByWeek(dataAnalysisDto); |
| | | // return maps; |
| | | // } else |
| | | if (Arrays.asList("1","2").contains(dataAnalysisDto.getDateType())) { |
| | | // // 获取当前月的开始时间(每月1号 00:00:00) |
| | | // DateTime beginOfMonth = DateUtil.beginOfMonth(now); |
| | | // // 获取当前月的结束时间(本月最后一天 23:59:59) |
| | | // DateTime endOfMonth = DateUtil.endOfMonth(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | if (Arrays.asList("1","2").contains(dataAnalysisDto.getDateType())) { |
| | | List<Map<String, Object>> maps = dataAnalysisMapper.getRawPassRateByBarChartByDay(dataAnalysisDto); |
| | | return maps; |
| | | } else if (dataAnalysisDto.getDateType().equals("3")) { |
| | | // // 获取当前年的开始时间(每年1月1日 00:00:00) |
| | | // DateTime beginOfYear = DateUtil.beginOfYear(now); |
| | | // // 获取当前年的结束时间(每年12月31日 23:59:59) |
| | | // DateTime endOfYear = DateUtil.endOfYear(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | List<Map<String, Object>> maps = dataAnalysisMapper.getRawPassRateByBarChartByYear(dataAnalysisDto); |
| | | return maps; |
| | | } |
| | |
| | | dataAnalysisDto.setBeginDate(startDate.atTime(LocalTime.MIN).format(dateTimeFormatter)); |
| | | dataAnalysisDto.setEndDate(endDate.atTime(LocalTime.MAX).format(dateTimeFormatter)); |
| | | } |
| | | // DateTime now = DateUtil.date(); |
| | | // if (StrUtil.isNotBlank(dataAnalysisDto.getBeginDate()) && StrUtil.isNotBlank(dataAnalysisDto.getEndDate())) { |
| | | // |
| | | // } else |
| | | // if (dataAnalysisDto.getDateType().equals("1")) { |
| | | // // 获取本周的开始时间(周一 00:00:00) |
| | | // DateTime beginOfWeek = DateUtil.beginOfWeek(now); |
| | | // // 获取本周的结束时间(周日 23:59:59) |
| | | // DateTime endOfWeek = DateUtil.endOfWeek(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | // } else if (dataAnalysisDto.getDateType().equals("2")) { |
| | | // // 获取当前月的开始时间(每月1号 00:00:00) |
| | | // DateTime beginOfMonth = DateUtil.beginOfMonth(now); |
| | | // // 获取当前月的结束时间(本月最后一天 23:59:59) |
| | | // DateTime endOfMonth = DateUtil.endOfMonth(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | // } else if (dataAnalysisDto.getDateType().equals("3")) { |
| | | // // 获取当前年的开始时间(每年1月1日 00:00:00) |
| | | // DateTime beginOfYear = DateUtil.beginOfYear(now); |
| | | // // 获取当前年的结束时间(每年12月31日 23:59:59) |
| | | // DateTime endOfYear = DateUtil.endOfYear(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | // } |
| | | return dataAnalysisMapper.getRawPassRateByCake(dataAnalysisDto); |
| | | } |
| | | |
| | |
| | | dataAnalysisDto.setBeginDate(startDate.atTime(LocalTime.MIN).format(dateTimeFormatter)); |
| | | dataAnalysisDto.setEndDate(endDate.atTime(LocalTime.MAX).format(dateTimeFormatter)); |
| | | } |
| | | // if (StrUtil.isNotBlank(dataAnalysisDto.getBeginDate()) && StrUtil.isNotBlank(dataAnalysisDto.getEndDate())) { |
| | | // |
| | | // } else if (dataAnalysisDto.getDateType().equals("1")) { |
| | | // // 获取本周的开始时间(周一 00:00:00) |
| | | // DateTime beginOfWeek = DateUtil.beginOfWeek(now); |
| | | // // 获取本周的结束时间(周日 23:59:59) |
| | | // DateTime endOfWeek = DateUtil.endOfWeek(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfWeek, "yyyy-MM-dd HH:mm:ss")); |
| | | // } else if (dataAnalysisDto.getDateType().equals("2")) { |
| | | // // 获取当前月的开始时间(每月1号 00:00:00) |
| | | // DateTime beginOfMonth = DateUtil.beginOfMonth(now); |
| | | // // 获取当前月的结束时间(本月最后一天 23:59:59) |
| | | // DateTime endOfMonth = DateUtil.endOfMonth(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfMonth, "yyyy-MM-dd HH:mm:ss")); |
| | | // } else if (dataAnalysisDto.getDateType().equals("3")) { |
| | | // // 获取当前年的开始时间(每年1月1日 00:00:00) |
| | | // DateTime beginOfYear = DateUtil.beginOfYear(now); |
| | | // // 获取当前年的结束时间(每年12月31日 23:59:59) |
| | | // DateTime endOfYear = DateUtil.endOfYear(now); |
| | | // dataAnalysisDto.setBeginDate(DateUtil.format(beginOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | // dataAnalysisDto.setEndDate(DateUtil.format(endOfYear, "yyyy-MM-dd HH:mm:ss")); |
| | | // } |
| | | |
| | | return dataAnalysisMapper.getMaterialPropTable(dataAnalysisDto); |
| | | } |
| | | |