去除aspose破解;系统优化
This commit is contained in:
parent
89d25d13d7
commit
355d5caf8f
6
pom.xml
6
pom.xml
|
@ -307,6 +307,12 @@
|
|||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.luhuiguo</groupId>
|
||||
<artifactId>aspose-words</artifactId>
|
||||
<version>23.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
|
|
Binary file not shown.
|
@ -91,11 +91,8 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aspose.words</groupId>
|
||||
<groupId>com.luhuiguo</groupId>
|
||||
<artifactId>aspose-words</artifactId>
|
||||
<version>15.12.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -113,8 +113,6 @@ public class ScalePublishController extends BaseController {
|
|||
/**
|
||||
* 中止记录
|
||||
*
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("scale:publish:edit")
|
||||
@Log(title = "中止量表发布", businessType = BusinessType.UPDATE)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.dromara.scale.domain.word;
|
||||
|
||||
import com.deepoove.poi.data.ChartMultiSeriesRenderData;
|
||||
import com.deepoove.poi.data.TableRenderData;
|
||||
import lombok.Data;
|
||||
|
||||
|
@ -25,7 +24,7 @@ public class EvaluationRecordWordData {
|
|||
private String scaleName;
|
||||
private String scaleDetails;
|
||||
private TableRenderData factor;
|
||||
private ChartMultiSeriesRenderData radarChart;
|
||||
private WordRadar radar;
|
||||
private List<WordFactor> factors;
|
||||
private String propose;
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package org.dromara.scale.domain.word;
|
||||
|
||||
import com.deepoove.poi.data.ChartMultiSeriesRenderData;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>TODO<p>
|
||||
*
|
||||
* @author cjw
|
||||
* @version V1.0.0
|
||||
* @date 2024/5/29 9:20
|
||||
*/
|
||||
@Data
|
||||
public class WordRadar {
|
||||
private ChartMultiSeriesRenderData radarChart;
|
||||
}
|
|
@ -23,9 +23,10 @@ public interface SysScalePublishMapper extends BaseMapperPlus<SysScalePublish, S
|
|||
Page<EvaluationVo> selectEvaluationVoList(@Param("page") Page<EvaluationVo> page, @Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId, @Param("deptId") Long deptId);
|
||||
|
||||
List<String> selectDeptIdsInUse();
|
||||
|
||||
List<String> selectUserIdsInUse();
|
||||
|
||||
List<EvaluationVo> selectUndoneEvaluationVoList(@Param("batchNo") Long batchNo);
|
||||
List<EvaluationVo> selectUndoneEvaluationVoList(@Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId, @Param("deptId") Long deptId);
|
||||
|
||||
SysScalePublish selectPublishById(@Param("batchNo") Long batchNo);
|
||||
|
||||
|
@ -38,4 +39,7 @@ public interface SysScalePublishMapper extends BaseMapperPlus<SysScalePublish, S
|
|||
int selectCountScalePublish();
|
||||
|
||||
void addCompleteNum(Long batchNo);
|
||||
|
||||
int selectCountScalePublishByScaleId(Long scaleId);
|
||||
|
||||
}
|
||||
|
|
|
@ -115,6 +115,9 @@ public class StatisticServiceImpl implements IStatisticService {
|
|||
Set<String> keys = collect.keySet();
|
||||
List<StatisticFactorVo> data = new ArrayList<>();
|
||||
for (String key : keys) {
|
||||
if ("absent".equals(key)) {
|
||||
continue;
|
||||
}
|
||||
StatisticFactorVo one = new StatisticFactorVo();
|
||||
one.setFactorName(key);
|
||||
List<StatisticFactorVo> factorList = collect.get(key);
|
||||
|
@ -139,6 +142,9 @@ public class StatisticServiceImpl implements IStatisticService {
|
|||
Set<String> keys = collect.keySet();
|
||||
List<StatisticFactorVo> data = new ArrayList<>();
|
||||
for (String key : keys) {
|
||||
if ("absent".equals(key)) {
|
||||
continue;
|
||||
}
|
||||
StatisticFactorVo one = new StatisticFactorVo();
|
||||
one.setFactorName(key);
|
||||
List<StatisticFactorVo> factorList = collect.get(key);
|
||||
|
|
|
@ -39,8 +39,6 @@ public class SysEvaluationConclusionServiceImpl implements ISysEvaluationConclus
|
|||
LambdaQueryWrapper<SysEvaluationConclusion> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getRecordId() != null, SysEvaluationConclusion::getRecordId, bo.getRecordId());
|
||||
lqw.eq(bo.getFactorId() != null, SysEvaluationConclusion::getFactorId, bo.getFactorId());
|
||||
lqw.eq(bo.getScore() != null, SysEvaluationConclusion::getScore, bo.getScore());
|
||||
lqw.eq(bo.getScoreRate() != null, SysEvaluationConclusion::getScoreRate, bo.getScoreRate());
|
||||
lqw.eq(bo.getFactorRangeId() != null, SysEvaluationConclusion::getFactorRangeId, bo.getFactorRangeId());
|
||||
lqw.eq(bo.getStatus() != null, SysEvaluationConclusion::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.dromara.scale.domain.vo.SysScaleVo;
|
|||
import org.dromara.scale.domain.word.EvaluationRecordWordData;
|
||||
import org.dromara.scale.domain.word.WordEvaluationFactor;
|
||||
import org.dromara.scale.domain.word.WordFactor;
|
||||
import org.dromara.scale.domain.word.WordRadar;
|
||||
import org.dromara.scale.mapper.SysEvaluationRecordMapper;
|
||||
import org.dromara.scale.mapper.SysScaleMapper;
|
||||
import org.dromara.scale.service.ISysEvaluationRecordService;
|
||||
|
@ -146,10 +147,12 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi
|
|||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < size; i++) {
|
||||
WordEvaluationFactor answerVo = answerVos.get(i);
|
||||
String factorName = answerVo.getFactorName();
|
||||
double score = answerVo.getScore().doubleValue();
|
||||
StringBuilder range = new StringBuilder();
|
||||
BigDecimal minValue = answerVo.getMinValue();
|
||||
BigDecimal maxValue = answerVo.getMaxValue();
|
||||
String answerScore = answerVo.getScore().toString();
|
||||
boolean minFlag = false;
|
||||
boolean maxFlag = false;
|
||||
if (minValue != null) {
|
||||
|
@ -164,41 +167,49 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi
|
|||
range.append("-");
|
||||
range.append(maxValue.doubleValue());
|
||||
} else {
|
||||
range.append(">=").append(minValue.doubleValue());
|
||||
answerScore = answerScore + "↑";
|
||||
range.append(minValue.doubleValue());
|
||||
}
|
||||
} else {
|
||||
range.append(maxValue.doubleValue()).append("<=");
|
||||
range.append(maxValue.doubleValue());
|
||||
answerScore = answerScore + "↓";
|
||||
}
|
||||
//处理因子得分表格
|
||||
RowRenderData one = Rows.of(answerVo.getFactorName(), answerVo.getQuestionNum().toString(),
|
||||
answerVo.getTotalScore().toString(), answerVo.getScore().toString(), range.toString(), answerVo.getRangeName())
|
||||
RowRenderData one = Rows.of(factorName, answerVo.getQuestionNum().toString(),
|
||||
answerVo.getTotalScore().toString(), answerScore, range.toString(), answerVo.getRangeName())
|
||||
.textFontFamily("宋体").textFontSize(9).center().create();
|
||||
factorTable.addRow(one);
|
||||
//处理测评结果
|
||||
WordFactor wordFactor = new WordFactor();
|
||||
wordFactor.setFactorName(answerVo.getFactorName());
|
||||
wordFactor.setFactorName(factorName);
|
||||
wordFactor.setScore(score);
|
||||
wordFactor.setEvalDesc(answerVo.getEvalDesc());
|
||||
//判断激活,放到首位并添加建议
|
||||
if (answerVo.getStatus() == 1) {
|
||||
factors.addFirst(wordFactor);
|
||||
stringBuilder.append(HtmlUtil.cleanHtmlTag(answerVo.getEvalPropose())).append("\n").append("\n").append("\r");
|
||||
stringBuilder.append("\t").append(factorName).append("——").append(HtmlUtil.cleanHtmlTag(answerVo.getEvalPropose())).append("\n").append("\n").append("\r");
|
||||
} else {
|
||||
factors.add(wordFactor);
|
||||
}
|
||||
if (!"总分".equals(answerVo.getFactorName())) {
|
||||
//雷达图使用
|
||||
strings[i] = answerVo.getFactorName();
|
||||
doubles[i] = score;
|
||||
}
|
||||
}
|
||||
|
||||
wordData.setFactor(factorTable);
|
||||
wordData.setFactors(factors);
|
||||
//处理雷达图
|
||||
if (strings.length >1) {
|
||||
ChartMultiSeriesRenderData chart = Charts
|
||||
.ofMultiSeries(scale.getScaleName(), strings)
|
||||
.addSeries("因子项", doubles)
|
||||
.create();
|
||||
wordData.setRadarChart(chart);
|
||||
WordRadar radar = new WordRadar();
|
||||
radar.setRadarChart(chart);
|
||||
wordData.setRadar(radar);
|
||||
}
|
||||
wordData.setPropose(stringBuilder.toString());
|
||||
ClassPathResource classPathResource = new ClassPathResource("word/personalTemplate.docx");
|
||||
Configure config = Configure.builder()
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
@ -87,6 +88,10 @@ public class SysInterveneRecordServiceImpl implements ISysInterveneRecordService
|
|||
@Override
|
||||
public Boolean insertByBo(SysInterveneRecordBo bo) {
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser sysUser = userMapper.selectById(loginUser.getUserId());
|
||||
if (sysUser.getInterveneStatus() == 0) {
|
||||
throw new ServiceException("此用户状态为无需干预,无法提交干预记录");
|
||||
}
|
||||
SysInterveneRecord add = MapstructUtils.convert(bo, SysInterveneRecord.class);
|
||||
add.setCreateTime(new Date());
|
||||
add.setCounselorId(loginUser.getUserId());
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.dromara.scale.domain.word.WordWarn;
|
|||
import org.dromara.scale.mapper.SysEvaluationRecordMapper;
|
||||
import org.dromara.scale.mapper.SysScaleMapper;
|
||||
import org.dromara.scale.mapper.SysScalePublishMapper;
|
||||
import org.dromara.scale.mapper.SysWarnRecordMapper;
|
||||
import org.dromara.scale.service.ISysScalePublishService;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.dromara.system.domain.vo.SysDeptVo;
|
||||
|
@ -74,8 +73,6 @@ public class SysScalePublishServiceImpl implements ISysScalePublishService {
|
|||
|
||||
private final SysUserMapper userMapper;
|
||||
|
||||
private final SysWarnRecordMapper warnMapper;
|
||||
|
||||
private final ISysConfigService configService;
|
||||
|
||||
/**
|
||||
|
@ -84,7 +81,13 @@ public class SysScalePublishServiceImpl implements ISysScalePublishService {
|
|||
@Override
|
||||
public SysScalePublishVo queryById(Long batchNo) {
|
||||
SysScalePublish publish = baseMapper.selectPublishById(batchNo);
|
||||
return MapstructUtils.convert(publish, SysScalePublishVo.class);
|
||||
SysScalePublishVo sysScalePublishVo = MapstructUtils.convert(publish, SysScalePublishVo.class);
|
||||
if (ObjectUtil.isEmpty(publish.getDeptNames())) {
|
||||
String userIds = publish.getUserIds();
|
||||
List<String> deptNames = deptMapper.findDeptNameByUserIds(userIds);
|
||||
sysScalePublishVo.setDeptNames(deptNames);
|
||||
}
|
||||
return sysScalePublishVo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -281,7 +284,7 @@ public class SysScalePublishServiceImpl implements ISysScalePublishService {
|
|||
|
||||
@Override
|
||||
public List<EvaluationVo> queryUndoneExportList(BaseQueryBo query) {
|
||||
return baseMapper.selectUndoneEvaluationVoList(query.getBatchNo());
|
||||
return baseMapper.selectUndoneEvaluationVoList(query.getBatchNo(), query.getScaleId(), query.getDeptId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.dromara.scale.domain.vo.SysScaleFactorVo;
|
|||
import org.dromara.scale.domain.vo.SysScaleQuestionVo;
|
||||
import org.dromara.scale.mapper.SysScaleAnswerMapper;
|
||||
import org.dromara.scale.mapper.SysScaleMapper;
|
||||
import org.dromara.scale.mapper.SysScalePublishMapper;
|
||||
import org.dromara.scale.mapper.SysScaleQuestionMapper;
|
||||
import org.dromara.scale.service.ISysScaleQuestionService;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
|
@ -46,6 +47,8 @@ public class SysScaleQuestionServiceImpl implements ISysScaleQuestionService {
|
|||
|
||||
private final SysScaleMapper scaleMapper;
|
||||
|
||||
private final SysScalePublishMapper publishMapper;
|
||||
|
||||
/**
|
||||
* 查询量问题内容
|
||||
*/
|
||||
|
@ -86,6 +89,7 @@ public class SysScaleQuestionServiceImpl implements ISysScaleQuestionService {
|
|||
lqw.eq(StringUtils.isNotBlank(bo.getQuestionContent()), SysScaleQuestion::getQuestionContent, bo.getQuestionContent());
|
||||
// lqw.eq(bo.getFactorId() != null, SysScaleQuestion::getFactorId, bo.getFactorId());
|
||||
// lqw.like(StringUtils.isNotBlank(bo.getFactorName()), SysScaleQuestion::getFactorName, bo.getFactorName());
|
||||
lqw.orderByAsc(SysScaleQuestion::getQuestionOrder);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
@ -111,13 +115,17 @@ public class SysScaleQuestionServiceImpl implements ISysScaleQuestionService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean insertByBo(SysScaleQuestionBo bo) {
|
||||
Long scaleId = bo.getScaleId();
|
||||
int i = publishMapper.selectCountScalePublishByScaleId(scaleId);
|
||||
if (i > 0) {
|
||||
throw new ServiceException("此量表已有发布,无法新增问题");
|
||||
}
|
||||
SysScaleQuestion add = MapstructUtils.convert(bo, SysScaleQuestion.class);
|
||||
//validEntityBeforeSave(add);
|
||||
Long scaleId = bo.getScaleId();
|
||||
SysScale sysScale = scaleMapper.selectById(scaleId);
|
||||
Integer questionsNum = sysScale.getQuestionsNum();
|
||||
int count = baseMapper.countQuestionNumByScaleId(scaleId);
|
||||
if (count >= questionsNum - 1) {
|
||||
if (count > questionsNum - 1) {
|
||||
throw new ServiceException("问题数量超过量表的限定数量,请确认后提交");
|
||||
}
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
|
@ -148,6 +156,11 @@ public class SysScaleQuestionServiceImpl implements ISysScaleQuestionService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean updateByBo(SysScaleQuestionBo bo) {
|
||||
Long scaleId = bo.getScaleId();
|
||||
int i = publishMapper.selectCountScalePublishByScaleId(scaleId);
|
||||
if (i > 0) {
|
||||
throw new ServiceException("此量表已有发布,无法修改问题");
|
||||
}
|
||||
SysScaleQuestion update = MapstructUtils.convert(bo, SysScaleQuestion.class);
|
||||
//validEntityBeforeSave(update);
|
||||
scaleAnswerMapper.deleteScaleAnswerByQuestionId(update.getQuestionId());
|
||||
|
@ -173,6 +186,11 @@ public class SysScaleQuestionServiceImpl implements ISysScaleQuestionService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean deleteByBo(SysScaleQuestionBo bo) {
|
||||
Long scaleId = bo.getScaleId();
|
||||
int i = publishMapper.selectCountScalePublishByScaleId(scaleId);
|
||||
if (i > 0) {
|
||||
throw new ServiceException("此量表已有发布,无法删除问题");
|
||||
}
|
||||
Long questionId = bo.getQuestionId();
|
||||
int flag = baseMapper.deleteById(questionId);
|
||||
scaleAnswerMapper.deleteScaleAnswerByQuestionId(questionId);
|
||||
|
|
|
@ -4,6 +4,7 @@ package org.dromara.scale.service.impl;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.enums.UserType;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
|
@ -41,6 +42,7 @@ import static org.dromara.common.satoken.utils.LoginHelper.getLoginUser;
|
|||
* @version V1.0.0
|
||||
* @date 2024/4/15 9:18
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WebServiceImpl implements IWebService {
|
||||
|
@ -296,26 +298,24 @@ public class WebServiceImpl implements IWebService {
|
|||
evalConclusion.setSituationName(SituationEnum.getNameByCode(range.getSituation()));
|
||||
break;
|
||||
}
|
||||
} //else {
|
||||
// logger.error("量表scaleId = {},配置项={} 配置的范围超过1条,但是存在配置范围最大最小值都为null",
|
||||
// evalSubmitAnswerDto.getScaleId(), scaleEvalItem.getId());
|
||||
// throw new EdfRuntimeException("量表配置项有问题,请联系管理员检查!");
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//假如未对应上说明这个量表配置有问题联系管理员
|
||||
if(Objects.isNull(evalConclusion.getFactorRangeId())){
|
||||
throw new ServiceException("量表配置项有问题,请联系管理员检查!");
|
||||
}
|
||||
if (used.contains(evalConclusion.getSituation())) {
|
||||
evalConclusion.setWarnStatus(1);
|
||||
}else {
|
||||
} else {
|
||||
evalConclusion.setWarnStatus(0);
|
||||
}
|
||||
list.add(evalConclusion);
|
||||
}
|
||||
//处理维度问题及status
|
||||
//量表
|
||||
SysScale scaleInfo = scaleMapper.selectById(scaleId);
|
||||
scaleDimension(list, scaleInfo);
|
||||
//保存结果
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package org.dromara.scale.utils;
|
||||
|
||||
import com.aspose.words.Document;
|
||||
import com.aspose.words.License;
|
||||
import com.aspose.words.SaveFormat;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* <p>TODO<p>
|
||||
|
@ -17,16 +15,6 @@ import java.io.InputStream;
|
|||
* @date 2024/5/20 15:03
|
||||
*/
|
||||
public class AsposeUtil {
|
||||
/**
|
||||
* 加载license 用于破解 不生成水印
|
||||
*/
|
||||
@SneakyThrows
|
||||
private static void getLicense() {
|
||||
try (InputStream is = AsposeUtil.class.getClassLoader().getResourceAsStream("License.xml")) {
|
||||
License license = new License();
|
||||
license.setLicense(is);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* word转pdf
|
||||
|
@ -36,7 +24,6 @@ public class AsposeUtil {
|
|||
*/
|
||||
@SneakyThrows
|
||||
public static void wordToPdf(String wordPath, File pdfFile) {
|
||||
getLicense();
|
||||
try (FileOutputStream os = new FileOutputStream(pdfFile)) {
|
||||
Document doc = new Document(wordPath);
|
||||
doc.save(os, SaveFormat.PDF);
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<License>
|
||||
<Data>
|
||||
<Products>
|
||||
<Product>Aspose.Total for Java</Product>
|
||||
<Product>Aspose.Words for Java</Product>
|
||||
</Products>
|
||||
<EditionType>Enterprise</EditionType>
|
||||
<SubscriptionExpiry>20991231</SubscriptionExpiry>
|
||||
<LicenseExpiry>20991231</LicenseExpiry>
|
||||
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
|
||||
</Data>
|
||||
<Signature>
|
||||
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
|
||||
</Signature>
|
||||
</License>
|
|
@ -38,18 +38,16 @@
|
|||
</select>
|
||||
|
||||
<select id="selectStatisticFactor" resultType="org.dromara.scale.domain.vo.StatisticFactorVo">
|
||||
select sf.factor_name as `factorName`,
|
||||
d.dept_name,
|
||||
select IFNULL(sf.factor_name, 'absent') as `factorName`,
|
||||
d.dept_name as `deptName`,
|
||||
parent.dept_name as `parentName`
|
||||
from sys_evaluation_record er
|
||||
left join sys_dept d on d.dept_id = er.dept_id
|
||||
left join sys_dept parent on parent.dept_id = d.parent_id
|
||||
left join sys_evaluation_conclusion ec on ec.record_id = er.record_id
|
||||
from sys_dept parent
|
||||
left join sys_dept d on d.parent_id = parent.dept_id
|
||||
left join sys_evaluation_record er on er.dept_id = d.dept_id
|
||||
left join sys_evaluation_conclusion ec on ec.record_id = er.record_id and ec.warn_status = 1
|
||||
left join sys_scale_factor sf on sf.factor_id = ec.factor_id
|
||||
where er.batch_no = #{batchNo}
|
||||
and er.scale_id = #{scaleId}
|
||||
and er.status = 1
|
||||
and ec.status = 1
|
||||
where er.scale_id = #{scaleId}
|
||||
and er.batch_no = #{batchNo}
|
||||
</select>
|
||||
|
||||
<select id="selectStatisticWarn4All" resultType="org.dromara.scale.domain.vo.StatisticWarnVo">
|
||||
|
|
|
@ -50,9 +50,15 @@
|
|||
from sys_evaluation_record er
|
||||
left join sys_scale s on s.scale_id = er.scale_id
|
||||
left join sys_dept d on d.dept_id = er.dept_id
|
||||
left join sys_user u on u.dept_id = d.dept_id
|
||||
left join sys_user u on u.user_id = er.user_id
|
||||
where er.batch_no = #{batchNo}
|
||||
and er.status = 0
|
||||
<if test="deptId != null">
|
||||
and (FIND_IN_SET(#{deptId}, d.ancestors) OR d.dept_id = #{deptId})
|
||||
</if>
|
||||
<if test="scaleId != null">
|
||||
and er.scale_id = #{scaleId}
|
||||
</if>
|
||||
and er.status <= 0
|
||||
order by d.dept_id
|
||||
</select>
|
||||
|
||||
|
@ -93,9 +99,15 @@
|
|||
from sys_scale_publish
|
||||
</select>
|
||||
|
||||
<select id="addCompleteNum" >
|
||||
<select id="addCompleteNum">
|
||||
update sys_scale_publish
|
||||
set complete_num = complete_num + 1
|
||||
where batch_no = #{batchNo}
|
||||
</select>
|
||||
|
||||
<select id="selectCountScalePublishByScaleId" resultType="int">
|
||||
select count(*)
|
||||
from sys_scale_publish
|
||||
where find_in_set(#{scaleId}, scale_ids)
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Binary file not shown.
|
@ -49,4 +49,6 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
|
|||
|
||||
List<SysDeptVo> findDeptByIds(String deptIds);
|
||||
|
||||
List<String> findDeptNameByUserIds(String userIds);
|
||||
|
||||
}
|
||||
|
|
|
@ -35,4 +35,12 @@
|
|||
FROM sys_dept d
|
||||
WHERE FIND_IN_SET(d.dept_id, #{deptIds})
|
||||
</select>
|
||||
|
||||
<select id="findDeptNameByUserIds" resultType="java.lang.String">
|
||||
select d.dept_name
|
||||
from sys_user u
|
||||
left join sys_dept d on d.dept_id = u.dept_id
|
||||
where find_in_set(user_id, #{userIds})
|
||||
group by d.dept_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue