删除不必要代码,优化项目结构;新增量测记录分页查询
This commit is contained in:
parent
1180220b18
commit
80d2d0aa19
|
@ -1,66 +0,0 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationAnswerBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationAnswerVo;
|
||||
import org.dromara.scale.service.ISysEvaluationAnswerService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 量测回答记录
|
||||
*
|
||||
* @author CJW
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/evaluation/answer")
|
||||
public class SysEvaluationAnswerController extends BaseController {
|
||||
|
||||
private final ISysEvaluationAnswerService sysEvaluationAnswerService;
|
||||
|
||||
/**
|
||||
* 查询量测回答记录列表
|
||||
*/
|
||||
// @SaCheckPermission("evaluation:answer:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysEvaluationAnswerVo> list(SysEvaluationAnswerBo bo, PageQuery pageQuery) {
|
||||
// return sysEvaluationAnswerService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出量测回答记录列表
|
||||
*/
|
||||
@SaCheckPermission("evaluation:answer:export")
|
||||
@Log(title = "量测回答记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SysEvaluationAnswerBo bo, HttpServletResponse response) {
|
||||
List<SysEvaluationAnswerVo> list = sysEvaluationAnswerService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "量测回答记录", SysEvaluationAnswerVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取量测回答记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("evaluation:answer:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<SysEvaluationAnswerVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(sysEvaluationAnswerService.queryById(id));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -2,7 +2,6 @@ package org.dromara.scale.controller;
|
|||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
|
@ -13,7 +12,10 @@ import org.dromara.scale.domain.bo.SysEvaluationConclusionBo;
|
|||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
import org.dromara.scale.service.ISysEvaluationConclusionService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -26,19 +28,19 @@ import java.util.List;
|
|||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/evaluationConclusion")
|
||||
@RequestMapping("/scale/evaluation/conclusion")
|
||||
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:query")
|
||||
@GetMapping("/list")
|
||||
public R<List<SysEvaluationConclusionVo>> getList(SysEvaluationConclusionBo bo) {
|
||||
return R.ok(sysEvaluationConclusionService.queryList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出量测结果列表
|
||||
|
@ -51,24 +53,5 @@ public class SysEvaluationConclusionController extends BaseController {
|
|||
ExcelUtil.exportExcel(list, "量测结果", SysEvaluationConclusionVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取量测结果详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:evaluationConclusion:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<SysEvaluationConclusionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(sysEvaluationConclusionService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取量测结果列表
|
||||
*/
|
||||
@SaCheckPermission("scale:evaluationConclusion:query")
|
||||
@GetMapping("/list")
|
||||
public R<List<SysEvaluationConclusionVo>> getList(SysEvaluationConclusionBo bo) {
|
||||
return R.ok(sysEvaluationConclusionService.queryList(bo));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/evaluation/record")
|
||||
@RequestMapping("/scale/evaluation/record")
|
||||
public class SysEvaluationRecordController extends BaseController {
|
||||
|
||||
private final ISysEvaluationRecordService sysEvaluationRecordService;
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 选项信息
|
||||
*
|
||||
* @author jiangzhe
|
||||
* @date 2024-03-29
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/answer")
|
||||
public class SysScaleAnswerController extends BaseController {
|
||||
|
||||
//private final ISysScaleAnswerService sysScaleAnswerService;
|
||||
|
||||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
// @SaCheckPermission("scale:answer:pageList")
|
||||
// @GetMapping("/pageList")
|
||||
// public TableDataInfo<SysScaleAnswerVo> list(SysScaleAnswerBo bo, PageQuery pageQuery) {
|
||||
// return sysScaleAnswerService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 导出选项信息列表
|
||||
*/
|
||||
// @SaCheckPermission("scale:answer:export")
|
||||
// @Log(title = "选项信息", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(SysScaleAnswerBo bo, HttpServletResponse response) {
|
||||
// List<SysScaleAnswerVo> list = sysScaleAnswerService.queryList(bo);
|
||||
// ExcelUtil.exportExcel(list, "选项信息", SysScaleAnswerVo.class, response);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取选项信息详细信息
|
||||
*
|
||||
* @param answerId 主键
|
||||
*/
|
||||
// @SaCheckPermission("scale:answer:query")
|
||||
// @GetMapping("/{answerId}")
|
||||
// public R<SysScaleAnswerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
// @PathVariable Long answerId) {
|
||||
// return R.ok(sysScaleAnswerService.queryById(answerId));
|
||||
// }
|
||||
}
|
|
@ -37,6 +37,8 @@ public class SysEvaluationRecordVo implements Serializable {
|
|||
@ExcelProperty(value = "量表id")
|
||||
private Long scaleId;
|
||||
|
||||
private String scaleName;
|
||||
|
||||
/**
|
||||
* 测评人id
|
||||
*/
|
||||
|
@ -61,7 +63,7 @@ public class SysEvaluationRecordVo implements Serializable {
|
|||
|
||||
|
||||
|
||||
private String scaleName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,5 +20,5 @@ import java.util.List;
|
|||
public interface SysEvaluationConclusionMapper extends BaseMapperPlus<SysEvaluationConclusion, SysEvaluationConclusionVo> {
|
||||
|
||||
|
||||
List<SysEvaluationConclusionVo> selectVoList(@Param(Constants.WRAPPER) Wrapper<SysEvaluationConclusion> queryWrapper);
|
||||
List<SysEvaluationConclusionVo> selectConclusionVoList(@Param(Constants.WRAPPER) Wrapper<SysEvaluationConclusion> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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;
|
||||
|
@ -22,4 +25,6 @@ public interface SysEvaluationRecordMapper extends BaseMapperPlus<SysEvaluationR
|
|||
|
||||
SysScalePublishVo selectPublishByUseRecord(Long recordId);
|
||||
|
||||
Page<SysEvaluationRecordVo> selectRecordVoPage(@Param("page") Page<SysEvaluationRecord> page, @Param(Constants.WRAPPER) Wrapper<SysEvaluationRecord> queryWrapper);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,11 +15,6 @@ import java.util.List;
|
|||
*/
|
||||
public interface ISysEvaluationAnswerService {
|
||||
|
||||
/**
|
||||
* 查询量测回答记录
|
||||
*/
|
||||
SysEvaluationAnswerVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询量测回答记录列表
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationConclusionBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
|
||||
|
@ -15,16 +13,6 @@ import java.util.List;
|
|||
*/
|
||||
public interface ISysEvaluationConclusionService {
|
||||
|
||||
/**
|
||||
* 查询量测结果
|
||||
*/
|
||||
SysEvaluationConclusionVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询量测结果列表
|
||||
*/
|
||||
TableDataInfo<SysEvaluationConclusionVo> queryPageList(SysEvaluationConclusionBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询量测结果列表
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.SysInterveneRecord;
|
||||
import org.dromara.scale.domain.vo.SysInterveneRecordVo;
|
||||
import org.dromara.scale.domain.bo.SysInterveneRecordBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.SysInterveneRecordBo;
|
||||
import org.dromara.scale.domain.vo.SysInterveneRecordVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -42,8 +40,4 @@ public interface ISysInterveneRecordService {
|
|||
*/
|
||||
Boolean updateByBo(SysInterveneRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除干预记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.SysScaleAnswerBo;
|
||||
import org.dromara.scale.domain.vo.QuestionAnswerVo;
|
||||
import org.dromara.scale.domain.vo.SysScaleAnswerVo;
|
||||
|
||||
|
@ -17,23 +14,6 @@ import java.util.Map;
|
|||
*/
|
||||
public interface ISysScaleAnswerService {
|
||||
|
||||
/**
|
||||
* 查询选项信息
|
||||
*/
|
||||
SysScaleAnswerVo queryById(Long answerId);
|
||||
|
||||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
TableDataInfo<SysScaleAnswerVo> queryPageList(SysScaleAnswerBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
List<SysScaleAnswerVo> queryList(SysScaleAnswerBo bo);
|
||||
|
||||
|
||||
|
||||
List<QuestionAnswerVo> queryQuestionAnswerListByScaleId(Long scaleId);
|
||||
|
||||
Map<String, List<SysScaleAnswerVo>> getScaleAnswerMap(Long scaleId);
|
||||
|
|
|
@ -27,14 +27,6 @@ public class SysEvaluationAnswerServiceImpl implements ISysEvaluationAnswerServi
|
|||
|
||||
private final SysEvaluationAnswerMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询量测回答记录
|
||||
*/
|
||||
@Override
|
||||
public SysEvaluationAnswerVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询量测回答记录列表
|
||||
*/
|
||||
|
|
|
@ -2,10 +2,7 @@ package org.dromara.scale.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.SysEvaluationConclusion;
|
||||
import org.dromara.scale.domain.bo.SysEvaluationConclusionBo;
|
||||
import org.dromara.scale.domain.vo.SysEvaluationConclusionVo;
|
||||
|
@ -27,23 +24,6 @@ public class SysEvaluationConclusionServiceImpl implements ISysEvaluationConclus
|
|||
|
||||
private final SysEvaluationConclusionMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询量测结果
|
||||
*/
|
||||
@Override
|
||||
public SysEvaluationConclusionVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询量测结果列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<SysEvaluationConclusionVo> queryPageList(SysEvaluationConclusionBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysEvaluationConclusion> lqw = buildQueryWrapper(bo);
|
||||
Page<SysEvaluationConclusionVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询量测结果列表
|
||||
|
@ -51,7 +31,7 @@ public class SysEvaluationConclusionServiceImpl implements ISysEvaluationConclus
|
|||
@Override
|
||||
public List<SysEvaluationConclusionVo> queryList(SysEvaluationConclusionBo bo) {
|
||||
LambdaQueryWrapper<SysEvaluationConclusion> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
return baseMapper.selectConclusionVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysEvaluationConclusion> buildQueryWrapper(SysEvaluationConclusionBo bo) {
|
||||
|
@ -66,10 +46,4 @@ public class SysEvaluationConclusionServiceImpl implements ISysEvaluationConclus
|
|||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(SysEvaluationConclusion entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi
|
|||
@Override
|
||||
public TableDataInfo<SysEvaluationRecordVo> queryPageList(SysEvaluationRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysEvaluationRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<SysEvaluationRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<SysEvaluationRecordVo> result = baseMapper.selectRecordVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi
|
|||
lqw.eq(bo.getScaleId() != null, SysEvaluationRecord::getScaleId, bo.getScaleId());
|
||||
lqw.eq(bo.getUserId() != null, SysEvaluationRecord::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getBatchNo() != null, SysEvaluationRecord::getBatchNo, bo.getBatchNo());
|
||||
lqw.eq(bo.getStatus() != null, SysEvaluationRecord::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.dromara.system.domain.SysUser;
|
|||
import org.dromara.system.mapper.SysUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -117,14 +116,4 @@ public class SysInterveneRecordServiceImpl implements ISysInterveneRecordService
|
|||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除干预记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if (isValid) {
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,15 +2,10 @@ package org.dromara.scale.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.constant.CacheNames;
|
||||
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.SysScaleAnswer;
|
||||
import org.dromara.scale.domain.SysScaleQuestion;
|
||||
import org.dromara.scale.domain.bo.SysScaleAnswerBo;
|
||||
import org.dromara.scale.domain.vo.QuestionAnswerVo;
|
||||
import org.dromara.scale.domain.vo.SysScaleAnswerVo;
|
||||
import org.dromara.scale.domain.vo.SysScaleQuestionVo;
|
||||
|
@ -40,42 +35,6 @@ public class SysScaleAnswerServiceImpl implements ISysScaleAnswerService {
|
|||
|
||||
private final SysScaleQuestionMapper questionMapper;
|
||||
|
||||
/**
|
||||
* 查询选项信息
|
||||
*/
|
||||
@Override
|
||||
public SysScaleAnswerVo queryById(Long answerId) {
|
||||
return baseMapper.selectVoById(answerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<SysScaleAnswerVo> queryPageList(SysScaleAnswerBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysScaleAnswer> lqw = buildQueryWrapper(bo);
|
||||
Page<SysScaleAnswerVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询选项信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<SysScaleAnswerVo> queryList(SysScaleAnswerBo bo) {
|
||||
LambdaQueryWrapper<SysScaleAnswer> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysScaleAnswer> buildQueryWrapper(SysScaleAnswerBo bo) {
|
||||
//Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysScaleAnswer> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getQuestionId() != null, SysScaleAnswer::getQuestionId, bo.getQuestionId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAnswerOption()), SysScaleAnswer::getAnswerOption, bo.getAnswerOption());
|
||||
lqw.eq(bo.getScore() != null, SysScaleAnswer::getScore, bo.getScore());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@Cacheable(cacheNames = CacheNames.SYS_QUESTION_ANSWER, key = "#scaleId")
|
||||
@Override
|
||||
public List<QuestionAnswerVo> queryQuestionAnswerListByScaleId(Long scaleId) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
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"
|
||||
<select id="selectConclusionVoList" parameterType="org.dromara.scale.domain.bo.SysEvaluationConclusionBo"
|
||||
resultType="org.dromara.scale.domain.vo.SysEvaluationConclusionVo">
|
||||
select ec.*, sf.factor_name, sfr.eval_desc, sfr.eval_propose, sfr.situation
|
||||
from sys_evaluation_conclusion ec
|
||||
|
|
|
@ -16,4 +16,11 @@
|
|||
left join sys_scale_publish sp on er.batch_no = sp.batch_no
|
||||
where er.record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<select id="selectRecordVoPage" resultType="org.dromara.scale.domain.vo.SysEvaluationRecordVo">
|
||||
select er.*, s.scale_name
|
||||
from sys_evaluation_record er
|
||||
left join sys_scale s on s.scale_id = er.scale_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue