|
@@ -5,6 +5,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
@@ -19,6 +20,7 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.*;
|
|
|
import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.XinZhenYiZhu;
|
|
|
import thyyxxk.webserver.http.websocket.SocketV2;
|
|
|
import thyyxxk.webserver.service.PublicServer;
|
|
|
+import thyyxxk.webserver.service.hutoolcache.ExtraCache;
|
|
|
import thyyxxk.webserver.utils.*;
|
|
|
|
|
|
import java.util.*;
|
|
@@ -33,18 +35,14 @@ import java.util.*;
|
|
|
*/
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
+@RequiredArgsConstructor
|
|
|
public class ShouShuShenQingService {
|
|
|
private final ShouShuShenQingDao dao;
|
|
|
private final PublicServer publicServer;
|
|
|
private final YiZhuLuRuDao yiZhuLuRuDao;
|
|
|
private final SocketV2 socketV2;
|
|
|
+ private final ExtraCache extraCache;
|
|
|
|
|
|
- public ShouShuShenQingService(ShouShuShenQingDao dao, PublicServer publicServer, YiZhuLuRuDao yiZhuLuRuDao, SocketV2 socketV2) {
|
|
|
- this.dao = dao;
|
|
|
- this.publicServer = publicServer;
|
|
|
- this.yiZhuLuRuDao = yiZhuLuRuDao;
|
|
|
- this.socketV2 = socketV2;
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 获取手术的项目 在
|
|
@@ -191,13 +189,26 @@ public class ShouShuShenQingService {
|
|
|
op.setActOrderNo(publicServer.getActOrderNo());
|
|
|
op.setOpTimes(reqNo);
|
|
|
|
|
|
- String msgContent = String.format("手术名称:<span style='color:#409eff'>【%s】</span><br>" +
|
|
|
- "手术时间:<span style='color:#409eff'>【%tF %<tT】</span><br>", op.getOpName(), op.getOpDatetime());
|
|
|
+ Map<String, List<String>> yzZdOrderItemMap = extraCache.getYzZdOrderItemMap();
|
|
|
+
|
|
|
+ if (yzZdOrderItemMap == null) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请联系管理员设置特殊医嘱标识。");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<String> 手术排斥 = yzZdOrderItemMap.get("手术排斥");
|
|
|
+ List<String> 处置医嘱 = yzZdOrderItemMap.get("处置医嘱");
|
|
|
|
|
|
-// socketV2.sendMessageByUserCode();
|
|
|
+
|
|
|
+ if (手术排斥 == null) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请联系管理员设置特殊【手术排斥】医嘱标识。");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (处置医嘱 == null) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请联系管理员设置特殊【处置医嘱】医嘱标识。");
|
|
|
+ }
|
|
|
|
|
|
XinZhenYiZhu patInfo = yiZhuLuRuDao.queryPatientInfo(ss.getInpatientNo(), ss.getAdmissTimes());
|
|
|
- String yzCode = ss.getGenerateRejectedOrders() ? "06054" : "10399";
|
|
|
+ String yzCode = ss.getGenerateRejectedOrders() ? 处置医嘱.get(0) : 手术排斥.get(0);
|
|
|
|
|
|
List<TReqSurgicalDiag> reqSurgicalDiagList = new ArrayList<>();
|
|
|
reqSurgicalDiagList.addAll(surgicalDiagnosisFor(ss.getOpCodeList(), recordId, TReqSurgicalDiag.SURGERY));
|