解决redis缓存读取无法转换long问题;预警列表;其他优化
This commit is contained in:
parent
576fe22d86
commit
dc63151030
|
@ -8,8 +8,6 @@ import org.dromara.common.core.domain.R;
|
|||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationAnswerBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationAnswerVo;
|
||||
|
@ -36,11 +34,11 @@ public class SysEvaluationAnswerController extends BaseController {
|
|||
/**
|
||||
* 查询量测回答记录列表
|
||||
*/
|
||||
@SaCheckPermission("evaluation:answer:pageList")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysEvaluationAnswerVo> list(SysEvaluationAnswerBo bo, PageQuery pageQuery) {
|
||||
return sysEvaluationAnswerService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
// @SaCheckPermission("evaluation:answer:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysEvaluationAnswerVo> list(SysEvaluationAnswerBo bo, PageQuery pageQuery) {
|
||||
// return sysEvaluationAnswerService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出量测回答记录列表
|
||||
|
|
|
@ -8,8 +8,6 @@ import org.dromara.common.core.domain.R;
|
|||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationConclusionBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
|
@ -33,14 +31,14 @@ public class SysEvaluationConclusionController extends BaseController {
|
|||
|
||||
private final ISysEvaluationConclusionService sysEvaluationConclusionService;
|
||||
|
||||
/**
|
||||
* 查询量测结果列表
|
||||
*/
|
||||
@SaCheckPermission("scale:evaluationConclusion:pageList")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysEvaluationConclusionVo> list(SysEvaluationConclusionBo bo, PageQuery pageQuery) {
|
||||
return sysEvaluationConclusionService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
// /**
|
||||
// * 查询量测结果列表
|
||||
// */
|
||||
// @SaCheckPermission("scale:evaluationConclusion:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysEvaluationConclusionVo> list(SysEvaluationConclusionBo bo, PageQuery pageQuery) {
|
||||
// return sysEvaluationConclusionService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出量测结果列表
|
||||
|
|
|
@ -12,8 +12,6 @@ import org.dromara.common.excel.utils.ExcelUtil;
|
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysInterveneRecordBo;
|
||||
import org.dromara.scale.domain.vo.SysInterveneRecordVo;
|
||||
|
@ -40,11 +38,11 @@ public class SysInterveneRecordController extends BaseController {
|
|||
/**
|
||||
* 查询干预记录列表
|
||||
*/
|
||||
@SaCheckPermission("scale:intervene:pageList")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysInterveneRecordVo> list(SysInterveneRecordBo bo, PageQuery pageQuery) {
|
||||
return sysInterveneRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
// @SaCheckPermission("scale:intervene:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysInterveneRecordVo> list(SysInterveneRecordBo bo, PageQuery pageQuery) {
|
||||
// return sysInterveneRecordService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出干预记录列表
|
||||
|
@ -64,8 +62,7 @@ public class SysInterveneRecordController extends BaseController {
|
|||
*/
|
||||
@SaCheckPermission("scale:intervene:query")
|
||||
@GetMapping("/{interveneId}")
|
||||
public R<SysInterveneRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long interveneId) {
|
||||
public R<SysInterveneRecordVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long interveneId) {
|
||||
return R.ok(sysInterveneRecordService.queryById(interveneId));
|
||||
}
|
||||
|
||||
|
@ -99,8 +96,7 @@ public class SysInterveneRecordController extends BaseController {
|
|||
@SaCheckPermission("scale:intervene:remove")
|
||||
@Log(title = "干预记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{interveneIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] interveneIds) {
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] interveneIds) {
|
||||
return toAjax(sysInterveneRecordService.deleteWithValidByIds(List.of(interveneIds), true));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ import org.dromara.common.core.domain.R;
|
|||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysScaleAnswerBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleAnswerVo;
|
||||
|
@ -36,11 +34,11 @@ public class SysScaleAnswerController extends BaseController {
|
|||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
@SaCheckPermission("scale:answer:pageList")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysScaleAnswerVo> list(SysScaleAnswerBo bo, PageQuery pageQuery) {
|
||||
return sysScaleAnswerService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
// @SaCheckPermission("scale:answer:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysScaleAnswerVo> list(SysScaleAnswerBo bo, PageQuery pageQuery) {
|
||||
// return sysScaleAnswerService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出选项信息列表
|
||||
|
|
|
@ -12,8 +12,6 @@ import org.dromara.common.excel.utils.ExcelUtil;
|
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysScaleFactorRangeBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleFactorRangeVo;
|
||||
|
@ -40,11 +38,11 @@ public class SysScaleFactorRangeController extends BaseController {
|
|||
/**
|
||||
* 查询因子分段列表
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleFactorRange:pageList")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysScaleFactorRangeVo> list(SysScaleFactorRangeBo bo, PageQuery pageQuery) {
|
||||
return sysScaleFactorRangeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
// @SaCheckPermission("scale:scaleFactorRange:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysScaleFactorRangeVo> list(SysScaleFactorRangeBo bo, PageQuery pageQuery) {
|
||||
// return sysScaleFactorRangeService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出因子分段列表
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.io.Serializable;
|
|||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 量测结果视图对象 sys_evaluation_conclusion
|
||||
*
|
||||
|
@ -44,6 +43,8 @@ public class SysEvaluationConclusionVo implements Serializable {
|
|||
@ExcelProperty(value = "sys_scale_factor表id")
|
||||
private Long factorId;
|
||||
|
||||
private String factorName;
|
||||
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
|
|
|
@ -54,7 +54,7 @@ public class SysEvaluationRecordVo implements Serializable {
|
|||
@ExcelProperty(value = "td_scale_publish表主键")
|
||||
private Long batchNo;
|
||||
|
||||
private Integer interveneStatus;
|
||||
|
||||
|
||||
private String scaleName;
|
||||
|
||||
|
|
|
@ -38,12 +38,16 @@ public class SysWarnRecordVo implements Serializable {
|
|||
@ExcelProperty(value = "td_scale_publish表主键")
|
||||
private Long batchNo;
|
||||
|
||||
private String sessionName;
|
||||
|
||||
/**
|
||||
* 测评人id
|
||||
*/
|
||||
@ExcelProperty(value = "测评人id")
|
||||
private Long userId;
|
||||
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* 补充说明
|
||||
*/
|
||||
|
@ -56,5 +60,10 @@ public class SysWarnRecordVo implements Serializable {
|
|||
@ExcelProperty(value = "预警时间")
|
||||
private Date warnTime;
|
||||
|
||||
/**
|
||||
* 干预状态
|
||||
*/
|
||||
private Integer interveneStatus;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.scale.domain.SysEvaluationConclusion;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationConclusionBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.scale.domain.SysEvaluationConclusion;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -18,5 +20,5 @@ import java.util.List;
|
|||
public interface SysEvaluationConclusionMapper extends BaseMapperPlus<SysEvaluationConclusion, SysEvaluationConclusionVo> {
|
||||
|
||||
|
||||
List<SysEvaluationConclusionVo> selectVoList(SysEvaluationConclusionBo bo);
|
||||
List<SysEvaluationConclusionVo> selectVoList(@Param(Constants.WRAPPER) Wrapper<SysEvaluationConclusion> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.scale.domain.SysWarnRecord;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationRecordVo;
|
||||
|
@ -17,5 +21,9 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface SysWarnRecordMapper extends BaseMapperPlus<SysWarnRecord, SysWarnRecordVo> {
|
||||
|
||||
Page<SysWarnRecordVo> selectPageWarnList(@Param("page") Page<SysWarnRecord> page, @Param(Constants.WRAPPER) Wrapper<SysWarnRecord> queryWrapper);
|
||||
|
||||
List<SysEvaluationRecordVo> selectEvaluationRecordListByWarnId(Long warnId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ public interface ISysScaleAnswerService {
|
|||
|
||||
List<QuestionAnswerVo> queryQuestionAnswerListByScaleId(Long scaleId);
|
||||
|
||||
Map<Long, List<SysScaleAnswerVo>> getScaleAnswerMap(Long scaleId);
|
||||
Map<String, List<SysScaleAnswerVo>> getScaleAnswerMap(Long scaleId);
|
||||
|
||||
}
|
||||
|
|
|
@ -49,5 +49,5 @@ public interface ISysScaleFactorService {
|
|||
|
||||
List<SysScaleFactorVo> getScaleEvalItemList(Long scaleId);
|
||||
|
||||
Map<Long, List<String>> getQuestionMapByFactor(Long scaleId);
|
||||
Map<String, List<String>> getQuestionMapByFactor(Long scaleId);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ public class SysEvaluationConclusionServiceImpl implements ISysEvaluationConclus
|
|||
*/
|
||||
@Override
|
||||
public List<SysEvaluationConclusionVo> queryList(SysEvaluationConclusionBo bo) {
|
||||
return baseMapper.selectVoList(bo);
|
||||
LambdaQueryWrapper<SysEvaluationConclusion> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysEvaluationConclusion> buildQueryWrapper(SysEvaluationConclusionBo bo) {
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.springframework.stereotype.Service;
|
|||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.dromara.common.satoken.utils.LoginHelper.getLoginUser;
|
||||
|
||||
|
@ -68,11 +67,12 @@ public class SysInterveneRecordServiceImpl implements ISysInterveneRecordService
|
|||
}
|
||||
|
||||
private LambdaQueryWrapper<SysInterveneRecord> buildQueryWrapper(SysInterveneRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
//Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysInterveneRecord> lqw = Wrappers.lambdaQuery();
|
||||
//lqw.eq(bo.getWarnId() != null, SysInterveneRecord::getWarnId, bo.getWarnId());
|
||||
lqw.eq(bo.getUserId() != null, SysInterveneRecord::getUserId, bo.getUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDiagnose()), SysInterveneRecord::getDiagnose, bo.getDiagnose());
|
||||
lqw.eq(bo.getAnnex() != null, SysInterveneRecord::getAnnex, bo.getAnnex());
|
||||
lqw.eq(bo.getCounselorId() != null, SysInterveneRecord::getCounselorId, bo.getCounselorId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,9 +106,9 @@ public class SysScaleAnswerServiceImpl implements ISysScaleAnswerService {
|
|||
}
|
||||
@Cacheable(cacheNames = CacheNames.MAP_SCALE_ANSWER, key = "#scaleId")
|
||||
@Override
|
||||
public Map<Long, List<SysScaleAnswerVo>> getScaleAnswerMap(Long scaleId) {
|
||||
public Map<String, List<SysScaleAnswerVo>> getScaleAnswerMap(Long scaleId) {
|
||||
List<SysScaleAnswerVo> scaleAnswerVos = baseMapper.selectVoList(
|
||||
new LambdaQueryWrapper<SysScaleAnswer>().eq(SysScaleAnswer::getScaleId, scaleId));
|
||||
return scaleAnswerVos.stream().collect(Collectors.groupingBy(SysScaleAnswerVo::getQuestionId));
|
||||
return scaleAnswerVos.stream().collect(Collectors.groupingBy(e -> e.getQuestionId().toString()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,12 +201,12 @@ public class SysScaleFactorServiceImpl implements ISysScaleFactorService {
|
|||
return scaleFactorVos;
|
||||
}
|
||||
@Cacheable(cacheNames = CacheNames.MAP_SCALE_QUESTION, key = "#scaleId")
|
||||
public Map<Long, List<String>> getQuestionMapByFactor(Long scaleId) {
|
||||
public Map<String, List<String>> getQuestionMapByFactor(Long scaleId) {
|
||||
List<SysScaleFactorVo> factorVos = baseMapper.selectVoList(new LambdaQueryWrapper<SysScaleFactor>()
|
||||
.eq(SysScaleFactor::getScaleId, scaleId));
|
||||
Map<Long, List<String>> map = new HashMap<>(factorVos.size());
|
||||
Map<String, List<String>> map = new HashMap<>(factorVos.size());
|
||||
for (SysScaleFactorVo factor : factorVos) {
|
||||
Long factorId = factor.getFactorId();
|
||||
String factorId = factor.getFactorId().toString();
|
||||
List<String> questionIds = factor.getQuestionIds();
|
||||
map.put(factorId, questionIds);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.SysWarnRecord;
|
||||
|
@ -17,7 +16,6 @@ import org.dromara.scale.service.ISysWarnRecordService;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 预警记录Service业务层处理
|
||||
|
@ -45,7 +43,7 @@ public class SysWarnRecordServiceImpl implements ISysWarnRecordService {
|
|||
@Override
|
||||
public TableDataInfo<SysWarnRecordVo> queryPageList(SysWarnRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysWarnRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<SysWarnRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<SysWarnRecordVo> result = baseMapper.selectPageWarnList(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
@ -59,13 +57,9 @@ public class SysWarnRecordServiceImpl implements ISysWarnRecordService {
|
|||
}
|
||||
|
||||
private LambdaQueryWrapper<SysWarnRecord> buildQueryWrapper(SysWarnRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysWarnRecord> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getBatchNo() != null, SysWarnRecord::getBatchNo, bo.getBatchNo());
|
||||
lqw.eq(bo.getUserId() != null, SysWarnRecord::getUserId, bo.getUserId());
|
||||
//lqw.eq(bo.getStatus() != null, SysWarnRecord::getStatus, bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getNote()), SysWarnRecord::getNote, bo.getNote());
|
||||
lqw.eq(bo.getWarnTime() != null, SysWarnRecord::getWarnTime, bo.getWarnTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ public class WebServiceImpl implements IWebService {
|
|||
public Map<String, Object> submitAnswer(SubmitAnswerBo bo) {
|
||||
boolean allowQueryResult = true;
|
||||
Long scaleId = bo.getScaleId();
|
||||
Map<Long, List<SysScaleAnswerVo>> answerMapByQuestion = scaleAnswerService.getScaleAnswerMap(scaleId);
|
||||
Map<String, List<SysScaleAnswerVo>> answerMapByQuestion = scaleAnswerService.getScaleAnswerMap(scaleId);
|
||||
int keySize = answerMapByQuestion.keySet().size();
|
||||
List<SysEvaluationAnswerBo> answerList = bo.getAnswerList();
|
||||
if (ObjectUtil.isEmpty(answerList)) {
|
||||
|
@ -221,8 +221,9 @@ public class WebServiceImpl implements IWebService {
|
|||
|
||||
private List<SysEvaluationConclusionVo> calculateEvaluationResult(Long scaleId, List<SysEvaluationAnswerBo> answerList) {
|
||||
Long recordId = answerList.get(0).getRecordId();
|
||||
Map<Long, List<String>> questionMapByFactor = scaleFactorService.getQuestionMapByFactor(scaleId);
|
||||
Map<Long, List<SysScaleAnswerVo>> answerMapByQuestion = scaleAnswerService.getScaleAnswerMap(scaleId);
|
||||
//暂时使用string解决redis转换问题
|
||||
Map<String, List<String>> questionMapByFactor = scaleFactorService.getQuestionMapByFactor(scaleId);
|
||||
Map<String, List<SysScaleAnswerVo>> answerMapByQuestion = scaleAnswerService.getScaleAnswerMap(scaleId);
|
||||
|
||||
List<SysScaleFactorVo> scaleFactorList = scaleFactorService.getScaleEvalItemList(scaleId);
|
||||
List<SysEvaluationConclusionVo> list = new ArrayList<>(scaleFactorList.size());
|
||||
|
@ -237,14 +238,14 @@ public class WebServiceImpl implements IWebService {
|
|||
evalConclusion.setScore(BigDecimal.ZERO);
|
||||
list.add(evalConclusion);
|
||||
|
||||
List<String> questionNum = questionMapByFactor.get(factorId);
|
||||
List<String> questionNum = questionMapByFactor.get(factorId.toString());
|
||||
List<String> questionIds = new ArrayList<>();
|
||||
|
||||
|
||||
questionNum.forEach(q -> {
|
||||
questionIds.add(q);
|
||||
Long questionId = Long.parseLong(q);
|
||||
List<SysScaleAnswerVo> answerNum = answerMapByQuestion.get(questionId);
|
||||
List<SysScaleAnswerVo> answerNum = answerMapByQuestion.get(questionId.toString());
|
||||
if (!ObjectUtil.isEmpty(answerNum)) {
|
||||
//找出分数最大的选项
|
||||
BigDecimal s = answerNum.stream()
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.scale.mapper.SysEvaluationConclusionMapper">
|
||||
|
||||
<select id="selectVoList" parameterType="org.dromara.scale.domain.bo.SysEvaluationConclusionBo"
|
||||
resultType="org.dromara.scale.domain.vo.SysEvaluationConclusionVo">
|
||||
select ec.*, sfr.eval_desc, sfr.eval_propose, sfr.situation
|
||||
select ec.*, sf.factor_name, sfr.eval_desc, sfr.eval_propose, sfr.situation
|
||||
from sys_evaluation_conclusion ec
|
||||
left join sys_scale_factor sf on sf.factor_id = ec.factor_id
|
||||
left join sys_scale_factor_range sfr on sfr.range_id = ec.factor_range_id
|
||||
where ec.record_id = #{recordId}
|
||||
and ec.status = 1
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -3,14 +3,23 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.scale.mapper.SysWarnRecordMapper">
|
||||
|
||||
<select id="selectPageWarnList" resultType="org.dromara.scale.domain.vo.SysWarnRecordVo">
|
||||
select wr.*, sp.session_name, u.nick_name,u.intervene_status
|
||||
from sys_warn_record wr
|
||||
left join sys_scale_publish sp on sp.batch_no = wr.batch_no
|
||||
left join sys_user u on u.user_id = wr.user_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectEvaluationRecordListByWarnId" resultType="org.dromara.scale.domain.vo.SysEvaluationRecordVo">
|
||||
select er.*,
|
||||
s.scale_name,
|
||||
u.intervene_status
|
||||
s.scale_name
|
||||
from sys_warn_record wr
|
||||
left join sys_evaluation_record er on wr.batch_no = er.batch_no and wr.user_id = er.user_id
|
||||
left join sys_scale s on er.scale_id = s.scale_id
|
||||
left join sys_user u on u.user_id = wr.user_id
|
||||
where wr.warn_id = #{warnId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue