Browse Source

修改后台就诊列表

hnsdlyy
ccsens_zhengzhichuan 1 day ago
parent
commit
54242d5f75
  1. 22
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/controller/PmsController.java
  2. 22
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/persist/dao/PmsPatientDao.java
  3. 3
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/IPmsPatientService.java
  4. 6
      ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/impl/PmsPatientServiceImpl.java
  5. 16
      ruisi_java/ruisi-web-admin/src/main/resources/mapper/dao/PmsPatientDao.xml

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

@ -260,8 +260,28 @@ public class PmsController extends BaseController {
dataScope = loginUser.getUser().getRoles().get(0).getDataScope();
}
dto.getParam().setDeptId(loginUser.getDeptId());
List<Long> deptIdList = new ArrayList<>();
if (dto.getParam().getDeptId() == null) {
try {
deptIdList.addAll(sysPowerService.queryPowerDept());
} catch (Exception e) {
log.info("获取当前登录用户部门错误");
// 获取请求携带的令牌
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID);
if (StrUtil.isNotEmpty(deptId)) {
deptIdList.add(Long.parseLong(deptId));
}
}
}else {
deptIdList.add(dto.getParam().getDeptId());
}
startPage(dto);
return JsonResponse.ok(new PageInfo<>(patientService.queryPatientJzList(dto.getParam(), dataScope, loginUser.getUserId(),loginUser.getUsername())));
return JsonResponse.ok(new PageInfo<>(patientService.queryPatientJzList(dto.getParam(), dataScope, loginUser.getUserId(),loginUser.getUsername(), deptIdList)));
}
@ApiOperation("导出患者就诊列表")

22
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/persist/dao/PmsPatientDao.java

@ -14,25 +14,35 @@ public interface PmsPatientDao extends PmsPatientMapper {
List<PmsPatientVo.PatientList> queryPatientList(@Param("param") PmsPatientDto.QueryPatient param,
@Param("dataScope") String dataScope,
@Param("userId") Long userId,
@Param("userName")String userName,
@Param("deptIdList")List<Long> deptIdList);
@Param("userName") String userName,
@Param("deptIdList") List<Long> deptIdList);
PmsPatientVo.PatientInfo queryPatientEvaluationById(@Param("id")Long id);
PmsPatientVo.PatientInfo queryPatientEvaluationById(@Param("id") Long id);
void deleteById(Long id);
void deletePatientAcpByPatientId(Long patientId);
void deletePatientBodyByPatientId(Long patientId);
void deletePatientFamilyIllnessByPatientId(Long patientId);
void deletePatientIllnessHistoryByPatientId(Long patientId);
void deletePatientParentIllnessByPatientId(Long patientId);
void deletePatientPersonalByPatientId(Long patientId);
void batchDeleteByIdCard(@Param("pmsPatientList") List<PmsPatient> pmsPatientList);
void batchInsert(@Param("pmsPatientList") List<PmsPatient> pmsPatientList);
void batchInsertTjbg(@Param("list") List<LdPatientRecord> list);
List<PmsPatientVo.QueryPatientJz> queryPatientJzList(@Param("param") PmsPatientDto.QueryPatientJz param,
@Param("dataScope") String dataScope,
@Param("userId") Long userId,
@Param("userName")String userName);
@Param("dataScope") String dataScope,
@Param("userId") Long userId,
@Param("userName") String userName,
@Param("deptIdList") List<Long> deptIdList);
}

3
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/IPmsPatientService.java

@ -64,7 +64,8 @@ public interface IPmsPatientService {
List<PmsPatientVo.QueryPatientJz> queryPatientJzList(PmsPatientDto.QueryPatientJz param,
String dataScope,
Long userId,
String userName);
String userName,
List<Long> deptIdList);
void exportPatientJz(HttpServletResponse response, PmsPatientDto.QueryPatientJz param, String dataScope, Long userId, String userName) throws IOException;

6
ruisi_java/ruisi-web-admin/src/main/java/com/ccsens/admin/service/impl/PmsPatientServiceImpl.java

@ -2217,8 +2217,8 @@ public class PmsPatientServiceImpl implements IPmsPatientService {
}
@Override
public List<PmsPatientVo.QueryPatientJz> queryPatientJzList(PmsPatientDto.QueryPatientJz param, String dataScope, Long userId, String userName) {
List<PmsPatientVo.QueryPatientJz> queryPatientJzs = patientDao.queryPatientJzList(param, dataScope, SecurityUtils.isAdmin(userId) ? null : userId, userName);
public List<PmsPatientVo.QueryPatientJz> queryPatientJzList(PmsPatientDto.QueryPatientJz param, String dataScope, Long userId, String userName, List<Long> deptIdList) {
List<PmsPatientVo.QueryPatientJz> queryPatientJzs = patientDao.queryPatientJzList(param, dataScope, SecurityUtils.isAdmin(userId) ? null : userId, userName, deptIdList);
if (CollUtil.isNotEmpty(queryPatientJzs)) {
for (PmsPatientVo.QueryPatientJz queryPatientJz : queryPatientJzs) {
//查询就诊
@ -2273,7 +2273,7 @@ public class PmsPatientServiceImpl implements IPmsPatientService {
@Override
public void exportPatientJz(HttpServletResponse response, PmsPatientDto.QueryPatientJz param, String dataScope, Long userId, String userName) throws IOException {
List<PmsPatientVo.QueryPatientJz> queryPatientJzs = queryPatientJzList(param, dataScope, userId, userName);
List<PmsPatientVo.QueryPatientJz> queryPatientJzs = queryPatientJzList(param, dataScope, userId, userName, null);
if (CollUtil.isEmpty(queryPatientJzs)) {
throw new BaseException("没有数据");
}

16
ruisi_java/ruisi-web-admin/src/main/resources/mapper/dao/PmsPatientDao.xml

@ -440,14 +440,20 @@
<if test="param.diagnosisCode != null and param.diagnosisCode != ''">
and b.diagnosis_code like concat('%',#{param.diagnosisCode},'%')
</if>
<if test="userId != null">
<if test="deptIdList != null and deptIdList.size()>0">
<!-- 权限 总测评师和测评师都是本部门及以下 -->
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}
and (uu.dept_id IN
<foreach item="item" collection="deptIdList" open="(" separator="," close=")">
#{item}
</foreach>
or
b.dept_id IN
<foreach item="item" collection="deptIdList" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
</where>
order by b.id desc

Loading…
Cancel
Save