测评端无法获取量表bug修复
This commit is contained in:
parent
f3e56678cb
commit
246267ce70
|
@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/archives")
|
||||
@RequestMapping("/scale/archive")
|
||||
public class ArchiveController {
|
||||
|
||||
private final IArchiveService archiveService;
|
||||
|
@ -29,15 +29,15 @@ public class ArchiveController {
|
|||
/**
|
||||
* 获取用户档案列表
|
||||
*/
|
||||
@SaCheckPermission("scale:archives:list")
|
||||
@SaCheckPermission("scale:archive:list")
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<ArchiveVo> pageList(ArchiveVo vo, PageQuery pageQuery) {
|
||||
return archiveService.queryPageList(vo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 获取用户列表
|
||||
* 获取档案静态列表
|
||||
*/
|
||||
@SaCheckPermission("scale:archives:list")
|
||||
@SaCheckPermission("scale:archive:list")
|
||||
@GetMapping("/statistic/pageList")
|
||||
public TableDataInfo<ArchiveStatisticVo> statisticPageList(Long userId, PageQuery pageQuery) {
|
||||
return archiveService.queryStatisticPageList(userId, pageQuery);
|
||||
|
|
|
@ -19,4 +19,6 @@ public class TimeAxisVo {
|
|||
private String time;
|
||||
|
||||
private String type;
|
||||
|
||||
private Integer situation;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,6 @@ public interface SysScalePublishMapper extends BaseMapperPlus<SysScalePublish, S
|
|||
|
||||
List<String> selectDeptIdsInUse();
|
||||
|
||||
SysScalePublishVo selectUsePublishVoByDeptId(Long deptId);
|
||||
SysScalePublish selectUsePublishByDeptId(Long deptId);
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package org.dromara.scale.service.impl;
|
|||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.enums.UserType;
|
||||
|
@ -78,12 +77,12 @@ public class WebServiceImpl implements IWebService {
|
|||
if (!UserType.STUDENT.getName().equals(userType)) {
|
||||
throw new ServiceException("只有学生账户才能测评");
|
||||
}
|
||||
SysScalePublishVo sysScalePublishVo = publishMapper.selectUsePublishVoByDeptId(deptId);
|
||||
SysScalePublish sysScalePublish = publishMapper.selectUsePublishByDeptId(deptId);
|
||||
|
||||
Long batchNo = sysScalePublishVo.getBatchNo();
|
||||
List<String> scaleIds = sysScalePublishVo.getScaleIds();
|
||||
Long batchNo = sysScalePublish.getBatchNo();
|
||||
String scaleIds = sysScalePublish.getScaleIds();
|
||||
//todo
|
||||
List<SysScaleVo> publishScaleVos = scaleMapper.findSysScaleByIds(StrUtil.join(StrUtil.COMMA, scaleIds));
|
||||
List<SysScaleVo> publishScaleVos = scaleMapper.findSysScaleByIds(scaleIds);
|
||||
List<SysEvaluationRecordVo> recordVos = recordMapper.selectSclaeRecordListByUserAndBatch(userId, batchNo);
|
||||
for (SysScaleVo publishScaleVo : publishScaleVos) {
|
||||
SysOss sysOss = ossMapper.selectById(publishScaleVo.getCover());
|
||||
|
@ -96,6 +95,7 @@ public class WebServiceImpl implements IWebService {
|
|||
}
|
||||
}
|
||||
}
|
||||
SysScalePublishVo sysScalePublishVo = MapstructUtils.convert(sysScalePublish, SysScalePublishVo.class);
|
||||
sysScalePublishVo.setScaleList(publishScaleVos);
|
||||
return sysScalePublishVo;
|
||||
}
|
||||
|
|
|
@ -42,9 +42,10 @@
|
|||
</select>
|
||||
|
||||
<select id="selectStatisticFactor" resultType="org.dromara.scale.domain.vo.StatisticNumVo">
|
||||
select *
|
||||
select
|
||||
from sys_evaluation_record er
|
||||
left join sys_dept d on find_in_set(er.dept_id, d.ancestors)
|
||||
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
|
||||
left join sys_scale_factor_range sfr on sfr.range_id = ec.factor_range_id
|
||||
where er.batch_no = #{batchNo}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
where status = 1
|
||||
</select>
|
||||
|
||||
<select id="selectUsePublishVoByDeptId" resultType="org.dromara.scale.domain.vo.SysScalePublishVo">
|
||||
<select id="selectUsePublishByDeptId" resultType="org.dromara.scale.domain.SysScalePublish">
|
||||
select *
|
||||
from sys_scale_publish
|
||||
where status = 1
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
select wr.warn_id as `id`,
|
||||
CONCAT(DATE_FORMAT(wr.warn_time, '%Y-%m-%d'), ' ', sp.session_name, '的预警') as `name`,
|
||||
wr.warn_time as `time`,
|
||||
'warn' as `type`
|
||||
'warn' as `type`,
|
||||
wr.situation as `situation`
|
||||
from sys_warn_record wr
|
||||
left join sys_scale_publish sp on sp.batch_no = wr.batch_no
|
||||
where wr.user_id = #{userId}
|
||||
|
|
Loading…
Reference in New Issue