| | |
| | | public void addQuestion(QuestionDTO dto) throws Exception { |
| | | TbQuestion tbQuestion = BeanUtils.copyBean(dto, TbQuestion.class); |
| | | tbQuestion.setType(dto.getType()); |
| | | tbQuestion.setQuarter(DateUtils.getNowQuarter()); |
| | | String previousQuarter = DateUtils.getPreviousQuarter(); |
| | | previousQuarter = "2024年一季度"; |
| | | tbQuestion.setQuarter(previousQuarter); |
| | | this.save(tbQuestion); |
| | | asyncService.subtractScoreWithFixedRules(dto.getDeptAreaCode()); |
| | | } |
| | |
| | | |
| | | return questionVOPageDTO; |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Long id) { |
| | | TbQuestion question = this.getById(id); |
| | | try { |
| | | asyncService.subtractScoreWithFixedRules(question.getDeptAreaCode()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | this.removeById(id); |
| | | } |
| | | } |