添加档案管理
This commit is contained in:
parent
1d331eddae
commit
da2688abd2
|
@ -0,0 +1,37 @@
|
||||||
|
package org.dromara.scale.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.system.domain.bo.SysUserBo;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
import org.dromara.system.service.ISysUserService;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>TODO<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/4/26 15:38
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/scale/archives")
|
||||||
|
public class ArchivesController {
|
||||||
|
|
||||||
|
private final ISysUserService userService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("scale:archives:list")
|
||||||
|
@GetMapping("/pageList")
|
||||||
|
public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) {
|
||||||
|
return userService.selectPageUserList(user, pageQuery);
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,14 +29,14 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/evaluation/conclusion")
|
@RequestMapping("/scale/evaluation/conclusion")
|
||||||
public class SysEvaluationConclusionController extends BaseController {
|
public class EvaluationConclusionController extends BaseController {
|
||||||
|
|
||||||
private final ISysEvaluationConclusionService sysEvaluationConclusionService;
|
private final ISysEvaluationConclusionService sysEvaluationConclusionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取量测结果列表
|
* 获取量测结果列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("evaluation:conclusion:query")
|
@SaCheckPermission("evaluation:conclusion:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<List<SysEvaluationConclusionVo>> getList(SysEvaluationConclusionBo bo) {
|
public R<List<SysEvaluationConclusionVo>> getList(SysEvaluationConclusionBo bo) {
|
||||||
return R.ok(sysEvaluationConclusionService.queryList(bo));
|
return R.ok(sysEvaluationConclusionService.queryList(bo));
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/evaluation/record")
|
@RequestMapping("/scale/evaluation/record")
|
||||||
public class SysEvaluationRecordController extends BaseController {
|
public class EvaluationRecordController extends BaseController {
|
||||||
|
|
||||||
private final ISysEvaluationRecordService sysEvaluationRecordService;
|
private final ISysEvaluationRecordService sysEvaluationRecordService;
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/intervene")
|
@RequestMapping("/scale/intervene")
|
||||||
public class SysInterveneRecordController extends BaseController {
|
public class InterveneRecordController extends BaseController {
|
||||||
|
|
||||||
private final ISysInterveneRecordService sysInterveneRecordService;
|
private final ISysInterveneRecordService sysInterveneRecordService;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/info")
|
@RequestMapping("/scale/info")
|
||||||
public class SysScaleController extends BaseController {
|
public class ScaleController extends BaseController {
|
||||||
|
|
||||||
private final ISysScaleService sysScaleService;
|
private final ISysScaleService sysScaleService;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/factor")
|
@RequestMapping("/scale/factor")
|
||||||
public class SysScaleFactorController extends BaseController {
|
public class ScaleFactorController extends BaseController {
|
||||||
|
|
||||||
private final ISysScaleFactorService sysScaleFactorService;
|
private final ISysScaleFactorService sysScaleFactorService;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/scaleFactorRange")
|
@RequestMapping("/scale/scaleFactorRange")
|
||||||
public class SysScaleFactorRangeController extends BaseController {
|
public class ScaleFactorRangeController extends BaseController {
|
||||||
|
|
||||||
private final ISysScaleFactorRangeService sysScaleFactorRangeService;
|
private final ISysScaleFactorRangeService sysScaleFactorRangeService;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/publish")
|
@RequestMapping("/scale/publish")
|
||||||
public class SysScalePublishController extends BaseController {
|
public class ScalePublishController extends BaseController {
|
||||||
|
|
||||||
private final ISysScalePublishService sysScalePublishService;
|
private final ISysScalePublishService sysScalePublishService;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public class SysScalePublishController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 获取量测进度
|
* 获取量测进度
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("evaluation:record:query")
|
@SaCheckPermission("publish:evaluation:pageList")
|
||||||
@GetMapping("/evaluation/pageList")
|
@GetMapping("/evaluation/pageList")
|
||||||
public TableDataInfo<EvaluationVo> getEvaluationList(BaseQueryBo query, PageQuery pageQuery) {
|
public TableDataInfo<EvaluationVo> getEvaluationList(BaseQueryBo query, PageQuery pageQuery) {
|
||||||
return sysScalePublishService.getEvaluationList(query, pageQuery);
|
return sysScalePublishService.getEvaluationList(query, pageQuery);
|
|
@ -33,7 +33,7 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/question")
|
@RequestMapping("/scale/question")
|
||||||
public class SysScaleQuestionController extends BaseController {
|
public class ScaleQuestionController extends BaseController {
|
||||||
|
|
||||||
private final ISysScaleQuestionService sysScaleQuestionService;
|
private final ISysScaleQuestionService sysScaleQuestionService;
|
||||||
|
|
|
@ -34,14 +34,14 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/scale/warn")
|
@RequestMapping("/scale/warn")
|
||||||
public class SysWarnController extends BaseController {
|
public class WarnController extends BaseController {
|
||||||
|
|
||||||
private final ISysWarnRecordService sysWarnRecordService;
|
private final ISysWarnRecordService sysWarnRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询预警记录列表
|
* 查询预警记录列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("warn:record:list")
|
@SaCheckPermission("warn:record:pageList")
|
||||||
@GetMapping("/pageList")
|
@GetMapping("/pageList")
|
||||||
public TableDataInfo<SysWarnRecordVo> list(SysWarnRecordBo bo, PageQuery pageQuery) {
|
public TableDataInfo<SysWarnRecordVo> list(SysWarnRecordBo bo, PageQuery pageQuery) {
|
||||||
return sysWarnRecordService.queryPageList(bo, pageQuery);
|
return sysWarnRecordService.queryPageList(bo, pageQuery);
|
|
@ -0,0 +1,48 @@
|
||||||
|
package org.dromara.scale.domain.vo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>档案<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/4/26 15:51
|
||||||
|
*/
|
||||||
|
public class ArchivesVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户昵称
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门ID
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户性别(0男 1女 2未知)
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号码
|
||||||
|
*/
|
||||||
|
private String phonenumber;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package org.dromara.scale.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ArchivesMapper {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package org.dromara.scale.service;
|
||||||
|
|
||||||
|
public interface IArchivesService {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package org.dromara.scale.service.impl;
|
||||||
|
|
||||||
|
import org.dromara.scale.service.IArchivesService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>TODO<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/4/26 15:46
|
||||||
|
*/
|
||||||
|
public class ArchivesServiceImpl implements IArchivesService {
|
||||||
|
}
|
|
@ -87,8 +87,6 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||||
*/
|
*/
|
||||||
SysUserVo selectUserByEmail(String email);
|
SysUserVo selectUserByEmail(String email);
|
||||||
|
|
||||||
List<SysUserVo> selectUserListByDeptId(Long deptId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户
|
* 通过用户ID查询用户
|
||||||
*
|
*
|
||||||
|
@ -115,10 +113,10 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||||
})
|
})
|
||||||
int updateById(@Param(Constants.ENTITY) SysUser user);
|
int updateById(@Param(Constants.ENTITY) SysUser user);
|
||||||
|
|
||||||
|
List<SysUserVo> selectStudentListByDeptId(Long deptId);
|
||||||
int updatePasswordBatchById(List<SysUserVo> list);
|
int updatePasswordBatchById(List<SysUserVo> list);
|
||||||
|
|
||||||
|
|
||||||
List<SysUser> selectStudentListByDeptIds(String deptIds);
|
List<SysUser> selectStudentListByDeptIds(String deptIds);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.constant.CacheNames;
|
import org.dromara.common.core.constant.CacheNames;
|
||||||
import org.dromara.common.core.constant.UserConstants;
|
import org.dromara.common.core.constant.UserConstants;
|
||||||
|
import org.dromara.common.core.enums.UserType;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.service.UserService;
|
import org.dromara.common.core.service.UserService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
@ -62,6 +63,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<SysUserVo> selectPageUserList(SysUserBo user, PageQuery pageQuery) {
|
public TableDataInfo<SysUserVo> selectPageUserList(SysUserBo user, PageQuery pageQuery) {
|
||||||
|
user.setUserType(UserType.STUDENT.getUserType());
|
||||||
Page<SysUserVo> page = baseMapper.selectPageUserList(pageQuery.build(), this.buildQueryWrapper(user));
|
Page<SysUserVo> page = baseMapper.selectPageUserList(pageQuery.build(), this.buildQueryWrapper(user));
|
||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
@ -550,7 +552,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserPassWordExportVo> selectUserpassWordListByDept(Long deptId) {
|
public List<SysUserPassWordExportVo> selectUserpassWordListByDept(Long deptId) {
|
||||||
List<SysUserVo> sysUserVos = baseMapper.selectUserListByDeptId(deptId);
|
List<SysUserVo> sysUserVos = baseMapper.selectStudentListByDeptId(deptId);
|
||||||
List<SysUserPassWordExportVo> exportList = new ArrayList<>();
|
List<SysUserPassWordExportVo> exportList = new ArrayList<>();
|
||||||
for (SysUserVo sysUserVo : sysUserVos) {
|
for (SysUserVo sysUserVo : sysUserVos) {
|
||||||
String password = PasswordGenerator.generateDefaultPassword();
|
String password = PasswordGenerator.generateDefaultPassword();
|
||||||
|
|
|
@ -169,10 +169,11 @@
|
||||||
and u.user_id = #{userId}
|
and u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUserListByDeptId" parameterType="Long" resultMap="SysUserResult">
|
<select id="selectStudentListByDeptId" parameterType="Long" resultMap="SysUserResult">
|
||||||
<include refid="selectUserVo"/>
|
<include refid="selectUserVo"/>
|
||||||
where u.del_flag = '0'
|
where u.del_flag = '0'
|
||||||
and u.dept_id = #{deptId}
|
and u.dept_id = #{deptId}
|
||||||
|
and user_type = 'student'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updatePasswordBatchById" parameterType="java.util.List">
|
<update id="updatePasswordBatchById" parameterType="java.util.List">
|
||||||
|
@ -182,7 +183,6 @@
|
||||||
WHERE user_id = #{item.userId}
|
WHERE user_id = #{item.userId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectStudentListByDeptIds" resultType="org.dromara.system.domain.SysUser">
|
<select id="selectStudentListByDeptIds" resultType="org.dromara.system.domain.SysUser">
|
||||||
select u.*
|
select u.*
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
|
|
Loading…
Reference in New Issue