mitao
2024-07-24 4b5624af301dfbdcf54b65dc55aadde1b6a8efd5
finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java
@@ -47,7 +47,9 @@
    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());
    }
@@ -89,4 +91,15 @@
        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);
    }
}