| | |
| | | .setDate(checkScoreIndexDTO.getDate()) |
| | | .setQuarter(checkScoreIndexDTO.getQuarter()); |
| | | scoreIndexDTO.setParams(checkScoreIndexDTO.getParams()); |
| | | |
| | | scoreIndexDTO.setExamineTag(checkScore.getExamineTag()); |
| | | //获当月份 |
| | | if(StringUtils.isEmpty(scoreIndexDTO.getDate()) && CollectionUtils.isEmpty(checkScoreIndexDTO.getQuarter())){ |
| | | //如果查询条件不含参数,查询积分对应创建时间 |
| | |
| | | @Override |
| | | public void exportIndex(HttpServletResponse response,CheckScore checkScoreDTO) throws IOException { |
| | | String date = checkScoreDTO.getDate(); |
| | | Integer examineTag = null; |
| | | //如果请求参数时间为空,查这条记录的时间 |
| | | if(StringUtils.isEmpty(checkScoreDTO.getDate()) && CollectionUtils.isEmpty(checkScoreDTO.getQuarter())){ |
| | | CheckScore checkScore = getById(checkScoreDTO.getId()); |
| | | Date createTime = checkScore.getCreateTime(); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM"); |
| | | date = formatter.format(createTime); |
| | | examineTag = checkScore.getExamineTag(); |
| | | } |
| | | |
| | | /** 导三张sheet */ |
| | |
| | | CheckIndexCar checkIndexCar = new CheckIndexCar(); |
| | | checkIndexCar.setDate(date); |
| | | checkIndexCar.setQuarter(checkScoreDTO.getQuarter()); |
| | | if(examineTag!=null) { |
| | | checkIndexCar.setExamineTag(Short.parseShort(examineTag + "")); |
| | | } |
| | | List<CheckIndexCar> checkIndexCars = indexCarService.selectCheckIndexCarList(checkIndexCar); |
| | | ExcelExp e1 = new ExcelExp("车辆考核指标数据",checkIndexCars,CheckIndexCar.class); |
| | | //人脸 |
| | | CheckIndexFace checkIndexFace = new CheckIndexFace(); |
| | | checkIndexFace.setDate(date); |
| | | checkIndexFace.setQuarter(checkScoreDTO.getQuarter()); |
| | | if(examineTag!=null) { |
| | | checkIndexFace.setExamineTag(Short.parseShort(examineTag + "")); |
| | | } |
| | | List<CheckIndexFace> checkIndexFaces = indexFaceService.selectCheckIndexFaceList(checkIndexFace); |
| | | ExcelExp e2 = new ExcelExp("人脸考核指标数据",checkIndexFaces,CheckIndexFace.class); |
| | | //视频 |
| | | CheckIndexVideo checkIndexVideo = new CheckIndexVideo(); |
| | | checkIndexVideo.setDate(date); |
| | | checkIndexVideo.setQuarter(checkScoreDTO.getQuarter()); |
| | | if(examineTag!=null) { |
| | | checkIndexVideo.setExamineTag(Short.parseShort(examineTag + "")); |
| | | } |
| | | List<CheckIndexVideo> checkIndexVideos = indexVideoService.selectCheckIndexVideoList(checkIndexVideo); |
| | | ExcelExp e3 = new ExcelExp("视频考核指标数据",checkIndexVideos,CheckIndexVideo.class); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> home() { |
| | | return baseMapper.home(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> calculate(String category) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | Date endDate = calendar.getTime(); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | Date startDate = calendar.getTime(); |
| | | return scoreMapper.calculate(startDate, endDate, category); |
| | | } |
| | | |
| | | // /** |
| | | // * 新增考核积分 |