|
@@ -1,6 +1,5 @@
|
|
|
package thyyxxk.webserver.service.zhuyuanyisheng;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -175,60 +174,6 @@ public class ShouShuShenQingService {
|
|
|
return ResultVoUtil.success(dao.huoQuShouShuBuWei(StringUtil.isContainChinese(name)));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @Deprecated
|
|
|
- public ResultVo<Map<String, String>> xinZengShouShuShenQing(XinZengShouShu param) {
|
|
|
- if (ListUtil.isBlank(param.getList())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请先选择需要上传的数据。");
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, String> map = new HashMap<>(param.getList().size());
|
|
|
- for (int i = 0; i < param.getList().size(); i++) {
|
|
|
- OpRecord item = param.getList().get(i);
|
|
|
- String error = applyForVerification(item);
|
|
|
- if (StringUtil.notBlank(error)) {
|
|
|
- if (StringUtil.isBlank(item.getOpName())) {
|
|
|
- item.setOpName("添加手术" + i);
|
|
|
- }
|
|
|
- map.put(item.getOpName(), error);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!map.isEmpty()) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.ERROR_MESSAGE, "请修改有错误的手术申请", map);
|
|
|
- }
|
|
|
-
|
|
|
- publicServer.huanZheJieSuan(param.getInpatientNo(), param.getAdmissTimes());
|
|
|
- String userCode = TokenUtil.getInstance().getTokenUserId();
|
|
|
- Integer shenQingCiShu = dao.shouShuShenQingCiShu(param.getInpatientNo(), param.getAdmissTimes());
|
|
|
- List<OpRecord> shenChengYiZhu = new ArrayList<>();
|
|
|
- List<String> content = new ArrayList<>();
|
|
|
- for (OpRecord item : param.getList()) {
|
|
|
- item.setRecordId(publicServer.huoQuShouShuHao());
|
|
|
- item.setActOrderNo(publicServer.getActOrderNo());
|
|
|
- item.setOpTimes(shenQingCiShu += 1);
|
|
|
- // 生成医嘱
|
|
|
- shenChengYiZhu.add(item);
|
|
|
- content.add(String.format("手术名称:<span style='color:#409eff'>【%s】</span><br>" +
|
|
|
- "手术时间:<span style='color:#409eff'>【%tF %<tT】</span><br>", item.getOpName(), item.getOpDatetime()));
|
|
|
- }
|
|
|
- log.info("上传数据:{}", JSON.toJSONString(param));
|
|
|
- XinZhenYiZhu huanZheXinXi = yiZhuLuRuDao.queryPatientInfo(param.getInpatientNo(), param.getAdmissTimes());
|
|
|
- // 生成手术
|
|
|
- generativeSurgery(param, userCode, shenChengYiZhu, huanZheXinXi);
|
|
|
- publicServer.faSongXiaoXi(huanZheXinXi, content, "新增手术", TokenUtil.getInstance().getTokenUserId());
|
|
|
- return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
|
|
|
- }
|
|
|
-
|
|
|
- public void generativeSurgery(XinZengShouShu param, String userCode, List<OpRecord> shenChengYiZhu, XinZhenYiZhu huanZheXinXi) {
|
|
|
- dao.chaRuShouShuYiSheng(param.getList());
|
|
|
- dao.chaRuShouShu(param.getList(), param.getInpatientNo(), param.getName(), param.getAdmissTimes(),
|
|
|
- huanZheXinXi.getDeptCode(), huanZheXinXi.getDeptCode(), userCode, param.getBedNo(), param.getAdmissWard());
|
|
|
- String yzCode = param.getGenerateRejectedOrders() ? "10399" : "06054";
|
|
|
- // 插入医嘱
|
|
|
- dao.chaRuYiZhu(shenChengYiZhu, huanZheXinXi, userCode, param.getExecDept(), yzCode);
|
|
|
- }
|
|
|
-
|
|
|
public ResultVo<String> applicationOpRecord(XinZengShouShu ss) {
|
|
|
String error = applyForVerification(ss.getOpRecord());
|
|
|
if (StringUtil.notBlank(error)) {
|
|
@@ -263,7 +208,7 @@ public class ShouShuShenQingService {
|
|
|
ss.getInpatientNo(),
|
|
|
ss.getName(),
|
|
|
ss.getAdmissTimes(),
|
|
|
- patInfo.getDeptCode(),
|
|
|
+ patInfo.getZkWard(),
|
|
|
patInfo.getDeptCode(),
|
|
|
userCode,
|
|
|
ss.getBedNo(),
|