linzhijie
2021-04-12 3a8e1524dcf0eeb610d38123d5f0a3ef838379cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.ots.project.exam.service.impl;
 
import cn.hutool.core.collection.CollUtil;
import com.ots.common.enums.LangTypeEnum;
import com.ots.common.enums.ReportTypeEnum;
import com.ots.common.enums.TemplateTypeEnum;
import com.ots.common.utils.DateUtils;
import com.ots.common.utils.StringUtils;
import com.ots.common.utils.Threads;
import com.ots.common.utils.poi.WordUtil;
import com.ots.common.utils.security.ShiroUtils;
import com.ots.common.utils.text.Convert;
import com.ots.framework.config.EssConfig;
import com.ots.project.exam.domain.*;
import com.ots.project.exam.dto.QuestionReport;
import com.ots.project.exam.dto.RelatedParty;
import com.ots.project.exam.dto.WordParam;
import com.ots.project.exam.mapper.EntEmailTemplateMapper;
import com.ots.project.exam.mapper.SysUserExtendMapper;
import com.ots.project.exam.mapper.TExamReportMapper;
import com.ots.project.exam.service.*;
import com.ots.project.system.dict.domain.DictData;
import com.ots.project.system.dict.service.IDictDataService;
import com.ots.project.tool.BarChart;
import com.ots.project.tool.exam.DateTimeUtil;
import com.ots.project.tool.exam.ExamUtil;
import com.ots.project.tool.exam.ImageUtil;
import com.ots.project.tool.exam.JsonUtil;
import com.ots.project.tool.report.CAQ.CAQReport;
import com.ots.project.tool.report.MAQ.MAQReport;
import com.ots.project.tool.report.ReportResultData;
import com.ots.project.tool.report.RuilinMAQ.RuilinMAQReport;
import com.ots.project.tool.report.SAQ.SAQReport;
import com.ots.project.tool.report.reportCalculation.response.ReportAPIResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
 
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
 
/**
 * 邮件内容模板Service业务层处理
 *
 * @author ots
 * @date 2019-12-26
 */
@Service
public class EntEmailTemplateServiceImpl implements IEntEmailTemplateService {
    @Autowired
    private EntEmailTemplateMapper entEmailTemplateMapper;
 
    private static final Logger logger = LoggerFactory.getLogger(Threads.class);
 
    @Override
    public int insertEntEmailTemplate(EntEmailTemplate entEmailTemplate) {
        entEmailTemplate.setCreateTime(DateUtils.getNowDate());
        entEmailTemplate.setCreateBy(String.valueOf(ShiroUtils.getSysUser().getUserId()));
        return entEmailTemplateMapper.updateByPrimaryKeySelective(entEmailTemplate);
    }
 
    @Override
    public EntEmailTemplate getOnly() {
        return entEmailTemplateMapper.getOnly();
    }
}