Browse Source

修改权限,未测试

lfszyyy
zhangye 3 months ago
parent
commit
33a490fb3d
  1. 7
      .idea/jsLibraryMappings.xml
  2. 6
      package-lock.json
  3. 3
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/PmsPatientDto.java
  4. 3
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/RmsDto.java
  5. 3
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/StatisticsDto.java
  6. 2
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/SysPowerService.java
  7. 2
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/SysDeptServiceImpl.java
  8. 31
      ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/SysPowerServiceImpl.java
  9. 6
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/PmsController.java
  10. 30
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/StatisticsController.java
  11. 2
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java
  12. 27
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/RmsController.java
  13. 30
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/StatisticsController.java
  14. 3
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/persist/dao/RmsDao.java
  15. 2
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/IRmsService.java
  16. 4
      ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java
  17. 2
      ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml
  18. 12
      ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/RmsDao.xml
  19. 3
      web_client/README.md

7
.idea/jsLibraryMappings.xml

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<excludedPredefinedLibrary name="cga_v2/web_admin/node_modules" />
<excludedPredefinedLibrary name="cga_v2/web_client/node_modules" />
</component>
</project>

6
package-lock.json

@ -0,0 +1,6 @@
{
"name": "cga_v2",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}

3
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/PmsPatientDto.java

@ -318,5 +318,8 @@ public class PmsPatientDto {
private String diagnosisCode;
@ApiModelProperty("关键字")
private String searchValue;
@ApiModelProperty("科室id,为了选择科室查看数据用")
private Long ksId;
}
}

3
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/RmsDto.java

@ -121,6 +121,9 @@ public class RmsDto {
private String code;
private Byte needPlan;
@ApiModelProperty("科室id,为了选择科室查看数据用")
private Long ksId;
@ApiModelProperty("每个像素的毫米数")
private BigDecimal mmPerPixel = new BigDecimal("0.1");
}

3
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/domain/dto/StatisticsDto.java

@ -22,6 +22,9 @@ public class StatisticsDto {
private Date endTime;
private Long deptId;
@ApiModelProperty("科室id,为了选择科室查看数据用")
private Long ksId;
}
}

2
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/SysPowerService.java

@ -8,5 +8,5 @@ public interface SysPowerService {
* 查询当前登陆人拥有的权限
* @return 部门ID集合
*/
List<Long> queryPowerDept();
List<Long> queryPowerDept(Long ksId);
}

2
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/SysDeptServiceImpl.java

@ -292,7 +292,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
@Override
public List<SysDept> selectDeptAuth() {
List<Long> longs = powerService.queryPowerDept();
List<Long> longs = powerService.queryPowerDept(null);
if (CollectionUtil.isEmpty(longs)) {
return CollectionUtil.newArrayList(selectDeptById(SecurityUtils.getLoginUser().getHospitalId()));
}

31
ruisi_java/ruisi-system/src/main/java/com/ccsens/system/service/impl/SysPowerServiceImpl.java

@ -1,12 +1,14 @@
package com.ccsens.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.common.core.domain.entity.SysDept;
import com.ccsens.common.core.domain.entity.SysRole;
import com.ccsens.common.core.domain.model.LoginUser;
import com.ccsens.common.utils.SecurityUtils;
import com.ccsens.system.persist.dao.SysPowerDao;
import com.ccsens.system.persist.mapper.SysDeptMapper;
import com.ccsens.system.service.ISysDeptService;
import com.ccsens.system.service.ISysUserService;
import com.ccsens.system.service.SysPowerService;
@ -33,23 +35,38 @@ public class SysPowerServiceImpl implements SysPowerService {
private ISysUserService sysUserService;
@Override
public List<Long> queryPowerDept() {
public List<Long> queryPowerDept(Long ksId) {
List<Long> deptIdList = new ArrayList<>();
//如果传入了科室id,查询这个科室下的所有科室id
if(ObjectUtil.isNotNull(ksId)) {
deptIdList = sysPowerDao.selectAllDept(ksId);
log.info("手动传入的ksId:{} ,查询部门权限: {}", ksId, deptIdList);
return deptIdList.stream().distinct().collect(Collectors.toList());
}
//获取登录用户
LoginUser loginUser = SecurityUtils.getLoginUser();
//如用户是因孚睿思部门的或超管, 返回所有
if (loginUser.getUser().isAdmin() || loginUser.getUser().getHospitalId() == 1) {
//如用户是超管, 返回所有部门id
if (loginUser.getUser().isAdmin()) {
List<SysDept> sysDepts = deptService.selectDeptListNoScope(new SysDept());
log.info("超管查询部门权限: {}", deptIdList);
if (CollectionUtil.isNotEmpty(sysDepts)) {
return sysDepts.stream().map(SysDept::getDeptId).collect(Collectors.toList());
}
deptIdList.add(loginUser.getDeptId());
return deptIdList;
}
List<Long> deptIdList = new ArrayList<>();
//当前所有都是部门及以下
//普通用户,获取当前部门及以下
List<Long> ids = sysPowerDao.selectAllDept(loginUser.getDeptId());
log.info("普通话用户的部门权限: {}", deptIdList);
if (CollectionUtil.isNotEmpty(ids)) {
deptIdList.addAll(ids);
return deptIdList.stream().distinct().collect(Collectors.toList());
}
return deptIdList;
// //获取当前用户的角色
// List<SysRole> roles = loginUser.getUser().getRoles();
@ -92,7 +109,7 @@ public class SysPowerServiceImpl implements SysPowerService {
// }
// }
// }
log.info("用户的部门权限: {}", deptIdList);
return deptIdList.stream().distinct().collect(Collectors.toList());
// log.info("用户的部门权限: {}", deptIdList);
// return deptIdList.stream().distinct().collect(Collectors.toList());
}
}

6
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/PmsController.java

@ -61,7 +61,7 @@ public class PmsController extends BaseController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getParam().getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getParam().getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -232,7 +232,7 @@ public class PmsController extends BaseController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getParam().getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getParam().getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -265,7 +265,7 @@ public class PmsController extends BaseController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getParam().getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getParam().getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌

30
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/StatisticsController.java

@ -50,7 +50,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -74,7 +74,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -98,7 +98,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -122,7 +122,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -146,7 +146,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -170,7 +170,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -194,7 +194,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -218,7 +218,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -242,7 +242,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -266,7 +266,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -290,7 +290,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -314,7 +314,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -338,7 +338,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -362,7 +362,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -386,7 +386,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌

2
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/PmsController.java

@ -79,7 +79,7 @@ public class PmsController extends BaseController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getParam().getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getParam().getKsId()));
} catch (Exception e) {
//处理大屏未登录的情况
log.info("获取当前登录用户部门错误");

27
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/RmsController.java

@ -2,9 +2,11 @@ package com.ccsens.client.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.client.service.IReportInfoService;
import com.ccsens.client.service.IRmsService;
import com.ccsens.common.annotation.Anonymous;
import com.ccsens.common.constant.WebConstant;
import com.ccsens.common.core.controller.BaseController;
import com.ccsens.common.core.domain.BaseDto;
import com.ccsens.common.core.domain.JsonResponse;
@ -13,14 +15,18 @@ import com.ccsens.common.utils.SecurityUtils;
import com.ccsens.system.domain.dto.RmsDto;
import com.ccsens.system.domain.vo.ReportDetailVo;
import com.ccsens.system.domain.vo.RmsVo;
import com.ccsens.system.service.SysPowerService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
@ -44,6 +50,8 @@ public class RmsController extends BaseController {
private IRmsService rmsService;
@Resource
private IReportInfoService reportInfoService;
@Resource
private SysPowerService sysPowerService;
@Anonymous
@ApiOperation(value = "查询报告单详情",notes = "根据测评ID查询报告单详情")
@ -92,15 +100,20 @@ public class RmsController extends BaseController {
public JsonResponse<PageInfo<RmsVo.QueryReportHistoryPatient>> queryReportList(@RequestBody @Validated BaseDto<RmsDto.QueryReportHistory> dto){
log.info("查询报告单列表:{}", dto);
// //获取用户的权限
// LoginUser loginUser = SecurityUtils.getLoginUser();
// //当前默认一个用户只有一个角色
// String dataScope = "5";
// if(CollUtil.isNotEmpty(loginUser.getUser().getRoles())){
// dataScope = loginUser.getUser().getRoles().get(0).getDataScope();
// }
//获取用户的权限
LoginUser loginUser = SecurityUtils.getLoginUser();
//当前默认一个用户只有一个角色
String dataScope = "5";
if(CollUtil.isNotEmpty(loginUser.getUser().getRoles())){
dataScope = loginUser.getUser().getRoles().get(0).getDataScope();
}
List<Long> deptIdList = new ArrayList<>();
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getParam().getKsId()));
startPage(dto);
List<RmsVo.QueryReportHistoryPatient> histories = rmsService.queryReportList(dto.getParam(), SecurityUtils.getUserId(), dataScope);
List<RmsVo.QueryReportHistoryPatient> histories = rmsService.queryReportList(dto.getParam(), SecurityUtils.getUserId(), null, deptIdList);
return JsonResponse.ok(new PageInfo<>(histories));
}

30
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/controller/StatisticsController.java

@ -48,7 +48,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -72,7 +72,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -96,7 +96,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -120,7 +120,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -144,7 +144,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -168,7 +168,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -192,7 +192,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -216,7 +216,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -240,7 +240,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -264,7 +264,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -288,7 +288,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -312,7 +312,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -336,7 +336,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -360,7 +360,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
@ -384,7 +384,7 @@ public class StatisticsController {
List<Long> deptIdList = new ArrayList<>();
if (dto.getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
deptIdList.addAll(sysPowerService.queryPowerDept(dto.getKsId()));
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌

3
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/persist/dao/RmsDao.java

@ -90,7 +90,8 @@ public interface RmsDao {
List<RmsVo.QueryReportHistoryPatient> queryReportList(@Param("dto") RmsDto.QueryReportHistory dto,
@Param("userId") Long userId,
@Param("userName") String username,
@Param("dataScope") String dataScope);
@Param("dataScope") String dataScope,
@Param("deptIdList")List<Long> deptIdList);
List<RmsVo.Search> searchReport(@Param("param") List<RmsDto.Search> param,
@Param("dataScope") String dataScope,

2
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/IRmsService.java

@ -29,7 +29,7 @@ public interface IRmsService {
List<RmsVo.ReportScore> getReportScores(List<RmsVo.ReportScore> reportScores, long reportId);
List<RmsVo.QueryReportHistory> queryReportListByTime(RmsDto.QueryReportHistory dto, Long userId, String dataScope);
List<RmsVo.QueryReportHistoryPatient> queryReportList(RmsDto.QueryReportHistory dto, Long userId, String dataScope);
List<RmsVo.QueryReportHistoryPatient> queryReportList(RmsDto.QueryReportHistory dto, Long userId, String dataScope, List<Long> deptIdList);
Integer updateReportBasic(RmsDto.UpdateReportBasic dto);

4
ruisi_java/ruisi-web-client/src/main/java/com/ccsens/client/service/impl/RmsServiceImpl.java

@ -1670,8 +1670,8 @@ public class RmsServiceImpl implements IRmsService {
}
@Override
public List<RmsVo.QueryReportHistoryPatient> queryReportList(RmsDto.QueryReportHistory dto, Long userId, String dataScope) {
List<RmsVo.QueryReportHistoryPatient> queryReportHistoryPatients = rmsDao.queryReportList(dto, userId, SecurityUtils.getUsername(), dataScope);
public List<RmsVo.QueryReportHistoryPatient> queryReportList(RmsDto.QueryReportHistory dto, Long userId, String dataScope, List<Long> deptIdList) {
List<RmsVo.QueryReportHistoryPatient> queryReportHistoryPatients = rmsDao.queryReportList(dto, userId, SecurityUtils.getUsername(), dataScope, deptIdList);
if (CollUtil.isNotEmpty(queryReportHistoryPatients)) {
queryReportHistoryPatients.forEach(patient -> {
// //查找最后一题信息

2
ruisi_java/ruisi-web-client/src/main/resources/application-dev.yml

@ -11,7 +11,7 @@ spring:
# password: po3OynBO[M3579p6L7)o
url: jdbc:mysql://127.0.0.1:3306/ruisi_cga?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: q7510327
password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭

12
ruisi_java/ruisi-web-client/src/main/resources/mapper/dao/RmsDao.xml

@ -1207,10 +1207,14 @@
pp.idcard like CONCAT('%',#{dto.searchValue},'%')
)
</if>
<!-- 权限 总测评师和测评师都是本部门及以下 -->
and uu.dept_id IN ( SELECT d.dept_id FROM ums_user u LEFT JOIN ums_dept d on (d.dept_id = u.dept_id or FIND_IN_SET(u.dept_id,ancestors))
WHERE user_id = #{userId}
)
<if test="deptIdList != null and deptIdList.size()>0">
and (
uu.dept_id IN
<foreach item="item" collection="deptIdList" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
group by ee.id
order by ee.create_time desc
</select>

3
web_client/README.md

@ -14,6 +14,9 @@ npm run serve
```
npm run build
```
```
npm install --registry=https://registry.npmmirror.com
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

Loading…
Cancel
Save