|
@@ -1,6 +1,5 @@
|
|
|
package thyyxxk.webserver.service.zhuyuanyisheng;
|
|
|
|
|
|
-import cn.hutool.core.thread.ThreadUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -13,7 +12,6 @@ import org.apache.ibatis.session.ExecutorType;
|
|
|
import org.apache.ibatis.session.SqlSession;
|
|
|
import org.apache.ibatis.session.SqlSessionFactory;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import thyyxxk.webserver.config.exception.BizException;
|
|
@@ -250,6 +248,7 @@ public class YiZhuLuRuServer {
|
|
|
*/
|
|
|
public ResultVo<Map<String, Object>> confirmOrders(XinZhenYiZhu param) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
+
|
|
|
qw.eq("a.inpatient_no", param.getInpatientNo())
|
|
|
.eq("a.admiss_times", param.getAdmissTimes())
|
|
|
.eq("a.status_flag", "1")
|
|
@@ -257,7 +256,9 @@ public class YiZhuLuRuServer {
|
|
|
// 排除出院带药的医嘱
|
|
|
.ne("isnull(a.self_buy,'0')", "4")
|
|
|
.orderByAsc("a.act_order_no");
|
|
|
+
|
|
|
param.setList(dao.selectOrderNo(qw));
|
|
|
+
|
|
|
List<XinZhenYzActOrder> yiZhuList = param.getList();
|
|
|
if (ListUtil.isBlank(yiZhuList)) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有需要确认的医嘱.");
|
|
@@ -459,6 +460,17 @@ public class YiZhuLuRuServer {
|
|
|
dao.howOftenTheSubPhysicianOrderIsModified(param.getData(), selectSupplyCode);
|
|
|
}
|
|
|
|
|
|
+ QueryWrapper<?> qw = getQueryWrapper(param, data);
|
|
|
+
|
|
|
+ Map<String, Object> successMap = new HashMap<>();
|
|
|
+ successMap.put("code", 200);
|
|
|
+ successMap.put("data", getOrderList(dao.selectOrderNo(qw)));
|
|
|
+
|
|
|
+ return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "添加成功。", successMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotNull
|
|
|
+ private static QueryWrapper<?> getQueryWrapper(XinZhenYiZhu param, XinZhenYzActOrder data) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
|
|
|
qw.eq("a.inpatient_no", param.getInpatientNo());
|
|
@@ -477,19 +489,14 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
|
|
|
qw.orderByAsc("a.act_order_no");
|
|
|
-
|
|
|
- Map<String, Object> successMap = new HashMap<>();
|
|
|
- successMap.put("code", 200);
|
|
|
- successMap.put("data", getOrderList(dao.selectOrderNo(qw)));
|
|
|
-
|
|
|
- return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "添加成功。", successMap);
|
|
|
+ return qw;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 把医嘱模板中的数据插入到 患者的医嘱表中
|
|
|
*
|
|
|
* @param param 参数
|
|
|
- * @return
|
|
|
+ * @return 返回插入的医嘱
|
|
|
*/
|
|
|
public ResultVo<JSONObject> insertTemplateOrder(XinZhenYiZhu param) {
|
|
|
if (StringUtil.isBlank(param.getInpatientNo())) {
|