|
@ -47,8 +47,13 @@ public class ServicesAuthAOP {
|
|
|
MethodSignature signature = (MethodSignature)point.getSignature();
|
|
|
ServicesAuth annotation = signature.getMethod().getAnnotation(ServicesAuth.class);
|
|
|
String item = annotation.item();
|
|
|
|
|
|
String patientId = request.getParameter("patientId");
|
|
|
if(StringUtils.isBlank(item)||StringUtils.isBlank(patientId)){
|
|
|
PrintWriter writer=response.getWriter();
|
|
|
writer.write(error(401, "该操作没有权限"));
|
|
|
writer.flush();
|
|
|
return o;
|
|
|
}
|
|
|
List<String> items =servicePackageService.getPatientServiceItems(patientId);
|
|
|
if(!items.contains(item)){
|
|
|
PrintWriter writer=response.getWriter();
|
|
@ -85,16 +90,4 @@ public class ServicesAuthAOP {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public JSONObject getAgent(HttpServletRequest request) {
|
|
|
try {
|
|
|
String userAgent = request.getHeader("userAgent");
|
|
|
if (StringUtils.isEmpty(userAgent)) {
|
|
|
userAgent = request.getHeader("User-Agent");
|
|
|
}
|
|
|
System.out.println("userAgent:" + userAgent);
|
|
|
return new JSONObject(userAgent);
|
|
|
} catch (Exception e) {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
}
|