mitao
2 天以前 a93ad50197f1626a12ba5067639119400542f455
finance-system/src/main/java/com/finance/system/service/impl/TbQuestionServiceImpl.java
@@ -23,6 +23,7 @@
import java.util.Set;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -41,6 +42,8 @@
    private final ISysUserService sysUserService;
    private final AsyncService asyncService;
    @Value("${fdb.quarter}")
    private String quarter;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -48,17 +51,18 @@
        TbQuestion tbQuestion = BeanUtils.copyBean(dto, TbQuestion.class);
        tbQuestion.setType(dto.getType());
        String previousQuarter = DateUtils.getPreviousQuarter();
        previousQuarter = "2024年一季度";
        previousQuarter = quarter;
        tbQuestion.setQuarter(previousQuarter);
        this.save(tbQuestion);
        asyncService.subtractScoreWithFixedRules(dto.getDeptAreaCode());
    }
    @Override
    public void editQuestion(QuestionUpdDTO dto) {
    public void editQuestion(QuestionUpdDTO dto) throws Exception {
        TbQuestion tbQuestion = BeanUtils.copyBean(dto, TbQuestion.class);
        tbQuestion.setType(dto.getType());
        this.updateById(tbQuestion);
        asyncService.subtractScoreWithFixedRules(dto.getDeptAreaCode());
    }
    @Override