|
@@ -4,6 +4,7 @@ import cn.hutool.extra.spring.SpringUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -23,6 +24,7 @@ import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.RoleCode;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.SheetOverview;
|
|
|
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
|
|
|
+import thyyxxk.webserver.entity.datamodify.SelectV2;
|
|
|
import thyyxxk.webserver.entity.datamodify.YzActOrder;
|
|
|
import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
|
|
|
import thyyxxk.webserver.entity.dictionary.CodeName;
|
|
@@ -794,16 +796,30 @@ public class YiZhuLuRuServer {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取医嘱频率
|
|
|
+ *
|
|
|
+ * @return 返回频率
|
|
|
+ */
|
|
|
public ResultVo<List<GetDropdownBox>> getFrequency() {
|
|
|
return ResultVoUtil.success(dao.selectFrequency());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 获取频率
|
|
|
+ * @return 给药方式
|
|
|
+ */
|
|
|
+ public ResultVo<List<SelectV2>> getSupplyType() {
|
|
|
+ return ResultVoUtil.success(dao.selectSupplyType());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取频率 准备不要了
|
|
|
*
|
|
|
* @param code 五笔,拼音,中文,编码
|
|
|
* @return 返回对应的数据
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public ResultVo<List<GetDropdownBox>> huoQuZhuYuanPinLv(String code) {
|
|
|
return ResultVoUtil.success(dao.huoQuZhuYuanPinLv("%" + code.toUpperCase() + "%"));
|
|
|
}
|
|
@@ -814,14 +830,11 @@ public class YiZhuLuRuServer {
|
|
|
* @param code 五笔,拼音,中文,编码
|
|
|
* @return 返回对应的数据
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public ResultVo<List<GetDropdownBox>> huoQuGeiYaoFangShi(String code) {
|
|
|
return ResultVoUtil.success(dao.huoQuGeiYaoFangShi(StringUtil.isContainChinese(code)));
|
|
|
}
|
|
|
|
|
|
- public ResultVo<List<GetDropdownBox>> getCostFreeDosing(String code) {
|
|
|
- return ResultVoUtil.success(dao.getCostFreeDosing(StringUtil.isContainChinese(code)));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取执行科室
|
|
|
*
|
|
@@ -1550,7 +1563,7 @@ public class YiZhuLuRuServer {
|
|
|
return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
|
|
|
}
|
|
|
|
|
|
- public ResultVo<String> copyTheDoctorSOrder(BigDecimal orderNo) {
|
|
|
+ public ResultVo<String> copyTheDoctorSOrder(BigDecimal orderNo, String deptCode) {
|
|
|
QueryWrapper<?> qw = new QueryWrapper<>();
|
|
|
qw.eq("a.act_order_no", orderNo);
|
|
|
List<XinZhenYzActOrder> yiZhuList = dao.selectOrderNo(qw);
|
|
@@ -1565,10 +1578,12 @@ public class YiZhuLuRuServer {
|
|
|
revertToTheDefaultState(fatherOrder, us, null);
|
|
|
|
|
|
List<XinZhenYzActOrder> addOrderList = new ArrayList<>();
|
|
|
+ setCopyExecUnit(fatherOrder, deptCode);
|
|
|
addOrderList.add(fatherOrder);
|
|
|
|
|
|
if (ListUtil.notBlank(childOrderList)) {
|
|
|
childOrderList.forEach(item -> {
|
|
|
+ setCopyExecUnit(item, deptCode);
|
|
|
revertToTheDefaultState(item, us, fatherOrder.getActOrderNo());
|
|
|
addOrderList.add(item);
|
|
|
});
|
|
@@ -1576,7 +1591,13 @@ public class YiZhuLuRuServer {
|
|
|
|
|
|
XinZhenYiZhu patInfo = dao.queryPatientInfo(fatherOrder.getInpatientNo(), fatherOrder.getAdmissTimes());
|
|
|
getThis().insertATemplate(addOrderList, patInfo);
|
|
|
- return ResultVoUtil.success();
|
|
|
+ return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "复制成功。");
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setCopyExecUnit(XinZhenYzActOrder v, String dept) {
|
|
|
+ if (StringUtil.notBlank(dept)) {
|
|
|
+ v.setExecUnit(dept);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|