|
|
|
@ -10,12 +10,14 @@ import com.manage.service.*;
|
|
|
|
|
import com.manage.service.cache.Cache;
|
|
|
|
|
import com.manage.service.cache.CacheManager;
|
|
|
|
|
import com.manage.service.ipml.Power_NoticeServiceImpl;
|
|
|
|
|
import com.manage.service.webSocket.WebServer;
|
|
|
|
|
import com.manage.service.webSocket.WsPool;
|
|
|
|
|
import com.manage.util.DateUtils;
|
|
|
|
|
import com.manage.util.ExceptionPrintUtil;
|
|
|
|
|
import com.manage.util.Msg;
|
|
|
|
|
import com.manage.vo.*;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.java_websocket.WebSocket;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
@ -534,9 +536,9 @@ public class FontController {
|
|
|
|
|
/**
|
|
|
|
|
* 根据病案deptcode,查询出所有符合的科主任,数据:用户id,用户名称,科室名称
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("/getUserInfoByDeptCodeForChief")
|
|
|
|
|
@RequestMapping(value = "/getUserInfoByDeptCodeForChief",produces = "text/plain;charset=UTF-8")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String getUserInfoByDeptCodeForChief(String DeptCode) throws Exception{
|
|
|
|
|
public String getUserInfoByDeptCodeForChief(String DeptCode){
|
|
|
|
|
List<Power_User> power_users = power_userMapper.selectAllForChief(DeptCode);
|
|
|
|
|
String result = "";
|
|
|
|
|
for (int i = 0; i < power_users.size(); i++) {
|
|
|
|
@ -548,9 +550,9 @@ public class FontController {
|
|
|
|
|
/**
|
|
|
|
|
* 根据病案deptcode,查询出所有符合的病案室用户,需要用户id,用户名称,科室名称
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("/getUserInfoByDeptCodeForRecordRoom")
|
|
|
|
|
@RequestMapping(value = "/getUserInfoByDeptCodeForRecordRoom",produces = "text/plain;charset=UTF-8")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String getUserInfoByDeptCodeForRecordRoom(String DeptCode) throws Exception{
|
|
|
|
|
public String getUserInfoByDeptCodeForRecordRoom(String DeptCode){
|
|
|
|
|
List<Power_User> power_users = power_userMapper.selectAllForRecordRoom(DeptCode);
|
|
|
|
|
String result = "";
|
|
|
|
|
for (int i = 0; i < power_users.size(); i++) {
|
|
|
|
@ -566,8 +568,7 @@ public class FontController {
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping(value = "/getDoctorNameAndDoctorRoom",produces = "text/plain;charset=UTF-8")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String getDoctorNameAndDoctorRoom(String userId,String deptcode) throws Exception{
|
|
|
|
|
System.out.println(userId+"userId"+deptcode+"deptcode");
|
|
|
|
|
public String getDoctorNameAndDoctorRoom(String userId,String deptcode){
|
|
|
|
|
String name = power_userMapper.selectForDoctorName(userId);
|
|
|
|
|
String room= power_userMapper.selectForDoctorRoom(deptcode);
|
|
|
|
|
String result = room+","+name;
|
|
|
|
@ -579,7 +580,7 @@ public class FontController {
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("/getDoctorDeptcode")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public String getDoctorDeptcode(Integer userId) throws Exception{
|
|
|
|
|
public String getDoctorDeptcode(Integer userId){
|
|
|
|
|
//获取deptId
|
|
|
|
|
String deptId = power_userMapper.selectForDeptId(userId);
|
|
|
|
|
//获取deptcode
|
|
|
|
@ -608,10 +609,6 @@ public class FontController {
|
|
|
|
|
* @Version:
|
|
|
|
|
*
|
|
|
|
|
* 从高明更新至湛江,2021/11/20
|
|
|
|
|
* 修改为向特定用户发送信息
|
|
|
|
|
* 特定用户科主任,病案室
|
|
|
|
|
* 科主任需要判定是否和病案的科室相符,
|
|
|
|
|
* 病案室直接发送未审核数量
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("sendMessage")
|
|
|
|
|
@ResponseBody
|
|
|
|
@ -632,5 +629,25 @@ public class FontController {
|
|
|
|
|
|
|
|
|
|
return Msg.success();
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 从高明更新至湛江,2021/11/20
|
|
|
|
|
* 修改为向特定用户发送信息
|
|
|
|
|
* 特定用户科主任,病案室
|
|
|
|
|
* 科主任需要判定是否和病案的科室相符,
|
|
|
|
|
* 病案室直接发送未审核数量
|
|
|
|
|
*/
|
|
|
|
|
@RequestMapping("sendMessageToOne")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public Msg sendMessageToOne(Message message) throws Exception{
|
|
|
|
|
if(null == message.getUserId()){
|
|
|
|
|
return Msg.fail("消息用户id不能为空");
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isBlank(message.getContent())){
|
|
|
|
|
return Msg.fail("消息内容不能为空");
|
|
|
|
|
}
|
|
|
|
|
WebSocket wsByUser = WsPool.getWsByUser(message.getUserId().toString());
|
|
|
|
|
WsPool.sendMessageToUser(wsByUser,message.getContent());
|
|
|
|
|
return Msg.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|