From 4b5624af301dfbdcf54b65dc55aadde1b6a8efd5 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期三, 24 七月 2024 19:55:24 +0800 Subject: [PATCH] bug修改,查询季度写死“2024年一季度” --- finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java b/finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java index a99170e..b217cf3 100644 --- a/finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java +++ b/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); + } } -- Gitblit v1.7.1