|
|
@@ -11,6 +11,7 @@ import cn.hnthyy.thmz.entity.his.zy.APatientMi;
|
|
|
import cn.hnthyy.thmz.entity.thmz.Clinic;
|
|
|
import cn.hnthyy.thmz.entity.thmz.TurnToConsultation;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
+import cn.hnthyy.thmz.entity.thmz.UserRoleRelation;
|
|
|
import cn.hnthyy.thmz.enums.ClinicStatusEnum;
|
|
|
import cn.hnthyy.thmz.enums.GenderEnum;
|
|
|
import cn.hnthyy.thmz.enums.PayMarkEnum;
|
|
|
@@ -70,6 +71,8 @@ public class ClinicController {
|
|
|
private UserDeptRelationService userDeptRelationService;
|
|
|
@Autowired
|
|
|
private APatientMiService aPatientMiService;
|
|
|
+ @Autowired
|
|
|
+ private UserRoleRelationService userRoleRelationService;
|
|
|
|
|
|
/**
|
|
|
* 叫号通知
|
|
|
@@ -431,11 +434,14 @@ public class ClinicController {
|
|
|
if (StringUtils.isBlank(clinic.getDoctorCode())) {
|
|
|
User tokenUser = TokenUtil.getUser(httpServletRequest);
|
|
|
List<String> deptNos = userDeptRelationService.queryAllByUserIdCode(tokenUser.getUserIdCode());
|
|
|
- Boolean isYjDept = false;
|
|
|
+ //Boolean isYjDept = false;
|
|
|
+ //管理员看全部
|
|
|
+ List<UserRoleRelation> userRoleRelations = userRoleRelationService.queryByUserId(tokenUser.getId());
|
|
|
+ boolean isGly = userRoleRelations.stream().anyMatch(userRoleRelation -> userRoleRelation.getRoleId().equals(Constants.GLY_ROLE_ID));
|
|
|
//暂时只开放医技可以可以接诊全院患者,不修改历史处方
|
|
|
//isYjDept = checkYjDept(deptNos)!=null;
|
|
|
//医技科室是可以看到全部患者信息,非医技科室需要加查询条件
|
|
|
- if (!isYjDept) {
|
|
|
+ if (!isGly) {
|
|
|
clinic.setDoctorCode(tokenUser.getUserIdCode());
|
|
|
clinic.setDeptCodes(deptNos);
|
|
|
}
|