Quellcode durchsuchen

Merge branch 'master' of https://172.16.32.165/lighter/web-server

xiaochan vor 1 Jahr
Ursprung
Commit
886a027471

+ 6 - 0
src/main/java/thyyxxk/webserver/controller/outpatient/triage/RoomScreenController.java

@@ -68,4 +68,10 @@ public class RoomScreenController {
     public ResultVo<List<MessageForPush>> getNextJzList(@RequestBody MessageForPush param) {
         return service.getNextJzList(param);
     }
+
+    @PassToken
+    @GetMapping("/notifyComplete")
+    public void notifyComplete(@RequestParam("serialNo") Integer serialNo) {
+        service.notifyComplete(serialNo);
+    }
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/outpatient/triage/RoomScreenDao.java

@@ -3,6 +3,7 @@ package thyyxxk.webserver.dao.his.outpatient.triage;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.outpatient.mangedoctorinfo.DoctorInfo;
 import thyyxxk.webserver.entity.outpatient.triage.MessageForPush;
@@ -49,4 +50,7 @@ public interface RoomScreenDao {
 
     @Select("select top 1 room_code from zd_triage_room_ip where ip=#{ip}")
     String getRoomCodeByIp(@Param("ip") String ip);
+
+    @Update("update t_triage_notify_relation set notify_datetime=getdate() where serial_no=#{serialNo}")
+    void updateNotifyDatetime(@Param("serialNo") int serialNo);
 }

+ 5 - 0
src/main/java/thyyxxk/webserver/service/outpatient/triage/RoomScreenService.java

@@ -101,4 +101,9 @@ public class RoomScreenService {
         }
         return ResultVoUtil.success(roomCode);
     }
+
+    public void notifyComplete(Integer serialNo) {
+        log.info("通知完毕>>> {}", serialNo);
+        dao.updateNotifyDatetime(serialNo);
+    }
 }

+ 1 - 17
src/main/java/thyyxxk/webserver/service/outpatient/triage/TriageService.java

@@ -236,24 +236,8 @@ public class TriageService {
         messageBody.setSid(notifyRelation.getSocketSid());
         messageBody.setRoomCode(notifyRelation.getRoomCode());
         socketService.sendFloorTriageMessage(messageBody);
-        socketService.sendRoomTriageMessage(messageBody);
         dao.updateNotifyDatetime(param.getSerialNo());
-        // todo 下面这一部分在完成迁移后删除,目前诊室门口小屏还是连的老分诊系统
-        RestTemplate template = new RestTemplate();
-        String result;
-        try {
-            result = template.postForObject(triageNotifyUrl, messageForPush, String.class);
-        } catch (Exception e) {
-            return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
-        }
-        if (param.getAction() == 1) {
-            if (null != result && result.equals("0")) {
-                dao.updateStatus(param.getSerialNo());
-            } else {
-                log.error("消息推送失败,没有找到在线的分诊台连接。{}", messageForPush);
-            }
-        }
-        return ResultVoUtil.success(result);
+        return socketService.sendRoomTriageMessage(messageBody);
     }
 
     private ResultVo<String> notifyVipReq(int serialNo) {