|
|
@@ -54,6 +54,10 @@ public class TriageService {
|
|
|
this.sendWxInfoService = sendWxInfoService;
|
|
|
}
|
|
|
|
|
|
+ public String getBigScreenFooter() {
|
|
|
+ return dao.getBigScreenFooter();
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<Map<String, Object>> getUnTriagedPatients(Integer currentPage, Integer pageSize) {
|
|
|
String[] depts = StringUtil.triageDeptString2Array(dao.selectChosenDepts(TokenUtil.getInstance().getTokenUserId()));
|
|
|
if (depts.length == 0) {
|
|
|
@@ -116,7 +120,7 @@ public class TriageService {
|
|
|
return ResultVoUtil.success(list);
|
|
|
}
|
|
|
|
|
|
- public ResultVo<List<FloorScreen>> getBigScreenData(Boolean fullName) {
|
|
|
+ public ResultVo<List<FloorScreen>> getBigScreenData() {
|
|
|
String[] depts = StringUtil.triageDeptString2Array(dao.selectChosenDepts(TokenUtil.getInstance().getTokenUserId()));
|
|
|
if (depts.length == 0) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请先前往【科室设置】分配分诊科室!");
|
|
|
@@ -132,6 +136,7 @@ public class TriageService {
|
|
|
fl.setDoctorTitle(item.getDoctorTitle());
|
|
|
fl.setDoctorName(item.getDoctorName());
|
|
|
fl.setRoomNo(item.getRoomNo());
|
|
|
+ fl.setRoomCode(item.getRoomCode());
|
|
|
List<MzfzPatientOrder> temp = new ArrayList<>();
|
|
|
temp.add(item);
|
|
|
fl.setPatients(temp);
|
|
|
@@ -191,7 +196,17 @@ public class TriageService {
|
|
|
room.getDeptCode(), room.getRoomCode(), room.getDoctorCode(),
|
|
|
room.getPatientNum(), room.getFuzhenFlag(), room.getSerialNo());
|
|
|
dao.deleteNotifyRelation(room.getSerialNo());
|
|
|
- dao.insertNotifyRelation(room.getSerialNo(), TokenUtil.getInstance().getTokenUserId(), room.getRoomCode());
|
|
|
+ dao.insertNotifyRelation(room.getSerialNo(), room.getTriageStaff(), room.getRoomCode());
|
|
|
+
|
|
|
+ MessageForPush messageForPush = dao.selectMessageForPush(room.getSerialNo());
|
|
|
+ messageForPush.setAction(4);
|
|
|
+ messageForPush.setBlurName(StringUtil.desensitizeName(messageForPush.getName()));
|
|
|
+ final String msg = JSON.toJSONString(messageForPush);
|
|
|
+ ApiMessageBody messageBody = new ApiMessageBody(msg);
|
|
|
+ messageBody.setSid(room.getTriageStaff());
|
|
|
+ messageBody.setRoomCode(room.getRoomCode());
|
|
|
+ socketService.sendFloorTriageMessage(messageBody);
|
|
|
+
|
|
|
return ResultVoUtil.success("分诊成功。");
|
|
|
}
|
|
|
|
|
|
@@ -207,9 +222,26 @@ public class TriageService {
|
|
|
public ResultVo<Integer> cancelTriage(Integer serialNo) {
|
|
|
Integer ret = dao.cancelTriage(serialNo);
|
|
|
dao.deleteNotifyRelation(serialNo);
|
|
|
+ MessageForPush messageForPush = new MessageForPush();
|
|
|
+ messageForPush.setAction(5);
|
|
|
+ messageForPush.setSerialNo(serialNo);
|
|
|
+ final String msg = JSON.toJSONString(messageForPush);
|
|
|
+ ApiMessageBody messageBody = new ApiMessageBody(msg);
|
|
|
+ messageBody.setSid(TokenUtil.getInstance().getTokenUserId());
|
|
|
+ socketService.sendFloorTriageMessage(messageBody);
|
|
|
return ResultVoUtil.success(ret);
|
|
|
}
|
|
|
|
|
|
+ public String refreshBigScreenData() {
|
|
|
+ MessageForPush messageForPush = new MessageForPush();
|
|
|
+ messageForPush.setAction(3);
|
|
|
+ final String msg = JSON.toJSONString(messageForPush);
|
|
|
+ ApiMessageBody messageBody = new ApiMessageBody(msg);
|
|
|
+ messageBody.setSid(TokenUtil.getInstance().getTokenUserId());
|
|
|
+ socketService.sendFloorTriageMessage(messageBody);
|
|
|
+ return "OK";
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<Map<String, Object>> getAllPatients(String searchContent, Integer currentPage, Integer pageSize) {
|
|
|
String[] depts = StringUtil.triageDeptString2Array(dao.selectChosenDepts(TokenUtil.getInstance().getTokenUserId()));
|
|
|
if (depts.length == 0) {
|
|
|
@@ -254,6 +286,7 @@ public class TriageService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有找到此患者的分诊信息!");
|
|
|
}
|
|
|
messageForPush.setAction(param.getAction());
|
|
|
+ messageForPush.setBlurName(StringUtil.desensitizeName(messageForPush.getName()));
|
|
|
String text = String.format("请%s号%s,到%s%s号诊室就诊。", messageForPush.getFzNo(), messageForPush.getName(),
|
|
|
messageForPush.getDeptName(), messageForPush.getRoomNo());
|
|
|
log.info("消息推送>>> {}\n{}", messageForPush, text);
|