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(); } }