Kaynağa Gözat

结算单上传,以及医嘱录入

xiaochan 3 yıl önce
ebeveyn
işleme
8643411e54

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.9.9</version>
+    <version>1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 36 - 2
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/YizhuLuRuController.java

@@ -3,16 +3,17 @@ package thyyxxk.webserver.controller.zhuyuanyizheng;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import thyyxxk.webserver.config.auth.PassToken;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
 import thyyxxk.webserver.entity.zhuyuanyisheng.PatientTemp;
 import thyyxxk.webserver.entity.zhuyuanyisheng.YiZhuFeiYongChaXunTiaoJian;
+import thyyxxk.webserver.entity.zhuyuanyisheng.YiZhuMingChen;
 import thyyxxk.webserver.service.zhuyuanyisheng.YiZhuLuRuServer;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -55,8 +56,41 @@ public class YizhuLuRuController {
     }
 
     @PostMapping("/huoQuYiZhuShuJu")
-    @PassToken
     public ResultVo<IPage<YzActOrder>> huoQuYiZhuShuJu(@RequestBody @Validated YiZhuFeiYongChaXunTiaoJian param) {
         return server.huoQuYiZhuShuJu(param);
     }
+
+    @GetMapping("/huoQuXiangMu")
+    public ResultVo<List<YiZhuMingChen>> huoQuXiangMu(String code) {
+        return server.huoQuXiangMu(code);
+    }
+
+    @GetMapping("/huoQuFeiYongXinXi")
+    public ResultVo<Map<String, Object>> huoQuFeiYongXinXi(@RequestParam("code") String code,
+                                                           @RequestParam("serial") String serial) {
+        return server.huoQuFeiYongXinXi(code, serial);
+    }
+
+    @GetMapping("/huoQuZhuYuanPinLv")
+    public ResultVo<List<GetDropdownBox>> huoQuZhuYuanPinLv(String code) {
+        return server.huoQuZhuYuanPinLv(code);
+    }
+
+    @GetMapping("/huoQuGeiYaoFangShi")
+    public ResultVo<List<GetDropdownBox>> huoQuGeiYaoFangShi(String code) {
+        return server.huoQuGeiYaoFangShi(code);
+    }
+
+    @GetMapping("/huoQuFuYiZhu")
+    public ResultVo<List<GetDropdownBox>> huoQuFuYiZhu(@RequestParam("patNo") String patNo,
+                                                       @RequestParam("times") Integer times) {
+        return server.huoQuFuYiZhu(patNo, times);
+    }
+
+    @GetMapping("/huoQuZhiXinKeShi")
+    public ResultVo<List<GetDropdownBox>> huoQuZhiXinKeShi(String code) {
+        return server.huoQuZhiXinKeShi(code);
+    }
+
+
 }

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -396,7 +396,7 @@ public interface UpIdCollectionDao {
             "<if test=\"referPhysician != null and referPhysician != '' \">" +
             " and b.refer_physician = #{referPhysician} " +
             "</if>" +
-            "<if test=\"hiPaymtd != null \">" +
+            "<if test=\"hiPaymtd != null and hiPaymtd != 0 \">" +
             " and a.hi_paymtd = #{hiPaymtd} " +
             "</if>" +
             "</script>")

+ 2 - 1
src/main/java/thyyxxk/webserver/dao/his/yibao/XiangMuLuRuDao.java

@@ -1089,7 +1089,8 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
             "and order_no = #{orderNo}" +
             "</otherwise>" +
             "</choose>" +
-            "and trans_flag_yb &lt;&gt; 2 and order_no &lt;&gt; 6 and charge_fee &gt; 0 and  charge_amount &gt; 0 and infant_flag = #{infantFlag}" +
+            "and trans_flag_yb &lt;&gt; 2 and order_no &lt;&gt; 6 and charge_fee &gt; 0 and  charge_amount &gt; 0 " +
+            "and infant_flag = #{infantFlag}  " +
             "<if test=\"startTime != null and startTime != '' \">" +
             "and charge_date &gt;= #{startTime} and charge_date &lt;= #{endTime} " +
             "</if>" +

+ 156 - 0
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -7,6 +7,8 @@ import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
 import thyyxxk.webserver.entity.zhuyuanyisheng.HuanZheFeiYong;
+import thyyxxk.webserver.entity.zhuyuanyisheng.YaoPinXinXi;
+import thyyxxk.webserver.entity.zhuyuanyisheng.YiZhuMingChen;
 
 import java.util.List;
 
@@ -223,4 +225,158 @@ public interface YiZhuLuRuDao {
                               @Param("orderName") String orderName);
 
 
+    @Select("SELECT distinct py_code=a.py_code, " +
+            "                d_code =a.d_code, " +
+            "                order_code =a.code, " +
+            "                order_name =a.name, " +
+            "                specification=a.specification, " +
+            "                order_type =case a.infusion_flag " +
+            "                                when '1' then 'i' " +
+            "                                else " +
+            "                                    (case " +
+            "                                         when a.code >= '30000' and a.code < '50000' then 'z' " +
+            "                                         else 'd' end) end, " +
+            "                parent_code=null, " +
+            "                exclu_group_type=null, " +
+            "                discription=case a.infusion_flag " +
+            "                                when '1' then '大输液' " +
+            "                                else (case " +
+            "                                          when a.code >= '30000' and a.code < '50000' then '中药' " +
+            "                                          else '西药  ' end) end + convert(char(10), a.pack_retprice) + '元' + '(医保类别:' + " +
+            "                            ltrim(rtrim(yb_flag_new)) + ';报销比例:' + ltrim(rtrim(yb_bl_new)) + ';医保说明:' + " +
+            "                            ltrim(rtrim(yb_comment_new)) + ')', " +
+            "                serial=a.serial, " +
+            "                group_no=a.group_no, " +
+            "                infusion_flag=a.infusion_flag, " +
+            "                drug_flag =a.drug_flag, " +
+            "                group_name =a.group_name, " +
+            "                pack_size=a.pack_size, " +
+            "                order_class='Y', " +
+            "                spec_pack=a.spec_pack, " +
+            "                jsy_flag =a.jsy_flag, " +
+            "                xnh_flag, " +
+            "                yb_comment, " +
+            "                dosage = a.dosage, " +
+            "                yb_type, " +
+            "                yb_flag_new," +
+            "                father_flag, " +
+            "                manu_name=(select name from yp_zd_manufactory where code *= a.manu_code), " +
+            "                stock_amount=a.stock_amount " +
+            "FROM view_yp_zd_dict_base_yf a with (NOLOCK) " +
+            "WHERE isnull(a.visible_flag_zy, '') <> '1' " +
+            "  and (a.py_code like #{code} or a.name like #{code} or code like #{code}) " +
+            "  and group_no in ('73','11','81')")
+    List<YiZhuMingChen> yiZhuMingChen1(@Param("code") String code);
+
+
+    @Select("SELECT a.py_code, " +
+            "       a.d_code, " +
+            "       a.order_code , " +
+            "       a.order_name, " +
+            "       specification='诊疗项目', " +
+            "       order_type   =operation, " +
+            "       a.parent_code , " +
+            "       a.exclu_group_type, " +
+            "       discription=a.discription + '  ' + a.yb_comment, " +
+            "       serial       ='00', " +
+            "       group_no='00', " +
+            "       infusion_flag='', " +
+            "       drug_flag    ='', " +
+            "       group_name   ='', " +
+            "       pack_size=1, " +
+            "       order_class=a.order_class, " +
+            "       spec_pack='', " +
+            "       jsy_flag     ='', " +
+            "       xnh_flag='', " +
+            "       yb_comment   =null, " +
+            "       dosage='', " +
+            "       yb_type='', " +
+            "       father_flag='0', " +
+            "       manu_name='', " +
+            "       stock_amount=0 " +
+            "FROM yz_order_item a with (NOLOCK) " +
+            "WHERE isnull(a.del_flag, '') <> '1' " +
+            "  and (py_code like #{code} or order_name like #{code} or order_code like #{code}) " +
+            "  and order_code not in (select zy_order_code from jc_zd_item) " +
+            "  and isnull(exec_dept, '') <> '2010000'")
+    List<YiZhuMingChen> yiZhuMingChen2(String code);
+
+
+    @Select("select /* 毒麻标志 */  " +
+            "    drug_flag,  " +
+            "    serial,  " +
+            "    /* 医保自费 */  " +
+            "    self_flag_yb,  " +
+            "    /* 重量 */  " +
+            "    weight,  " +
+            "    /* 重量单位 */  " +
+            "    weigh_unit,  " +
+            "    weigh_unit_name = (select name from yp_zd_unit where code = weigh_unit),  " +
+            "    /*体积*/  " +
+            "    volum,  " +
+            "    /*体积单位*/  " +
+            "    vol_unit,  " +
+            "    vol_unit_name   = (select name from yp_zd_unit where code = vol_unit),  " +
+            "    /*包装体积*/  " +
+            "    pack_size,  " +
+            "    /*包装单位*/  " +
+            "    pack_unit,  " +
+            "    pack_unit_name  = (select name from yp_zd_unit where code = pack_unit),  " +
+            "    /*最小单位*/  " +
+            "    mini_unit,  " +
+            "    mini_unit_name  = (select name from yp_zd_unit where code = mini_unit),  " +
+            "    /* 需要判断医生的权限 在 select doctor_xz_yp from a_employee_mi */  " +
+            "    isnull(yp_level,0) as yp_level, " +
+            "    /*需要皮试*/  " +
+            "   isnull(ps_flag,0) as ps_flag," +
+            "   code as order_code,name as order_name ," +
+            "   frequency as frequCode " +
+            "from yp_zd_dict  " +
+            "where code = #{code}  " +
+            "  and serial = #{serial} " +
+            "  and isnull(del_flag, '') = '' ")
+    YaoPinXinXi huoQuYaoPin(@Param("code") String code,
+                            @Param("serial") String serial);
+
+    @Select("select isnull(doctor_xz_yp,0) from a_employee_mi where code = #{code}")
+    String huoQuYiShenDengJi(String code);
+
+    @Select("select rtrim(supply_code) code,rtrim(supply_name) name " +
+            "from yz_supply_type " +
+            "where ps_flag in ('1', '0')")
+    List<GetDropdownBox> piShiGeiYaoFangShi();
+
+    @Select("select rtrim(code) code, rtrim(comm) name " +
+            "from yz_order_frequency " +
+            "where (code like #{code} or comm like #{code})")
+    List<GetDropdownBox> huoQuZhuYuanPinLv(String code);
+
+
+    @Select("select rtrim(supply_code) code, rtrim(supply_name) name " +
+            "from yz_supply_type " +
+            "where (supply_code like #{code} or supply_name like #{code} or py_code like #{code} )")
+    List<GetDropdownBox> huoQuGeiYaoFangShi(String code);
+
+
+    @Select("SELECT CONVERT(nvarchar(100), CAST(act_order_no AS decimal(11,0))) as code," +
+            "       rtrim(order_name) as name " +
+            "FROM yz_act_order " +
+            "WHERE (inpatient_no = #{patNo}) " +
+            "  AND (admiss_times = #{times}) " +
+            "  AND (isnull(parent_no, 0) = 0) " +
+            "  and status_flag <> '5' " +
+            "  and drug_flag = 'i'")
+    List<GetDropdownBox> huoQuFuYiZhu(@Param("patNo") String patNo,
+                                      @Param("times") Integer times);
+
+    @Select("SELECT a.code code, " +
+            "       a.name name " +
+            "FROM zd_unit_code a, " +
+            "     zd_dept_all b " +
+            "where isnull(a.del_flag, '0') <> '1' " +
+            "  and a.code = b.small_dept " +
+            "  and (a.code like #{code} or a.name like #{code} or py_code like #{code} )")
+    List<GetDropdownBox> huoQuZhiXinKeShi(String code);
+
+
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/datamodify/YzActOrder.java

@@ -272,6 +272,10 @@ public class YzActOrder implements Serializable {
         switch (selfBuy) {
             case "1":
                 return "自备";
+            case "2":
+                return "嘱托";
+            case "3":
+                return "基数药";
             default:
                 return "未知";
         }

+ 72 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/YaoPinXinXi.java

@@ -0,0 +1,72 @@
+package thyyxxk.webserver.entity.zhuyuanyisheng;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 描述: 药品信息
+ * </p>
+ *
+ * @author xc
+ * @date 2022-01-11 09:45
+ */
+@Data
+public class YaoPinXinXi {
+    private String orderCode;
+    private String orderName;
+    /**
+     * 毒麻药标志
+     */
+    private String drugFlag;
+    /**
+     * 医保自费标志
+     */
+    private String selfFlagYb;
+    /**
+     * 重量
+     */
+    private BigDecimal weight;
+    /**
+     * 重量单位
+     */
+    private String weighUnit;
+    private String weighUnitName;
+    /**
+     * 体积
+     */
+    private BigDecimal volum;
+    /**
+     * 体积单位
+     */
+    private String volUnit;
+    private String volUnitName;
+    /**
+     * 包装体积
+     */
+    private BigDecimal packSize;
+    /**
+     * 包装单位
+     */
+    private String packUnit;
+    private String packUnitName;
+    /**
+     * 最小单位
+     */
+    private String miniUnit;
+    private String miniUnitName;
+    /**
+     * 药品等级 需要判断医生的权限 在 select doctor_xz_yp from a_employee_mi
+     */
+    private String ypLevel;
+    /**
+     * 皮试药品
+     */
+    private String psFlag;
+
+    /**
+     * 默认给药方式
+     */
+    private String frequCode;
+}

+ 85 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/YiZhuMingChen.java

@@ -0,0 +1,85 @@
+package thyyxxk.webserver.entity.zhuyuanyisheng;
+
+import lombok.Data;
+import thyyxxk.webserver.utils.StringUtil;
+
+/**
+ * <p>
+ * 描述:搜索医嘱名字
+ * </p>
+ *
+ * @author xc
+ * @date 2022-01-10 15:48
+ */
+@Data
+public class YiZhuMingChen {
+    private String pyCode;
+    private String dCode;
+    private String patternCode;
+    private String patternName;
+    private String orderCode;
+    private String orderName;
+    private String specification;
+    private String orderType;
+    private String parentCode;
+    private String excluGroupType;
+    private String discription;
+    private String serial;
+    private String groupNo;
+    private String infusionFlag;
+    private String drugFlag;
+    private String groupName;
+    private float packSize;
+    private String orderClass;
+    private String specPack;
+    private String jsyFlag;
+    private String xnhFlag;
+    private String ybComment;
+    private String dosage;
+    private String ybType;
+    private String fatherFlag;
+    private String manuName;
+    /**
+     * 库存
+     */
+    private String stockAmount;
+    private String ybFlagNew;
+
+    /**
+     * 毒药
+     *
+     * @return 返回枚举
+     */
+    public String getDrugFlagName() {
+        if (StringUtil.isBlank(drugFlag)) {
+            return "";
+        }
+        switch (drugFlag) {
+            case "1":
+                return "毒性药品";
+            case "2":
+                return "麻醉药品";
+            case "3":
+                return "精神1类";
+            case "4":
+                return "精神2类";
+            case "5":
+                return "高危药品";
+            case "6":
+                return "终止妊娠类";
+            default:
+                return "未知";
+        }
+    }
+
+    public String getInfusionFlagName() {
+        if (StringUtil.isBlank(infusionFlag)) {
+            return "";
+        } else if (infusionFlag.equals("1")) {
+            return "是";
+        }
+        return "";
+    }
+
+
+}

+ 9 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -281,9 +281,9 @@ public class SetlListUpldService {
         // 患者的基本信息
         upldCollection.setSetlinfo(setlinfoUpld);
         // 基金支付信息
-        if (ListUtil.notBlank(amtAndOthAmt)) {
-            amtAndOthAmt.sort(Comparator.comparing(IteminfoUpld::getMedChrgitm));
-        }
+//        if (ListUtil.notBlank(amtAndOthAmt)) {
+//            amtAndOthAmt.sort(Comparator.comparing(IteminfoUpld::getMedChrgitm));
+//        }
         // 计算医保的支付方式
         setlinfoUpld.setHiPaymtd(yiBaoZhiFuFangShi(patNo, times, ledgerSn));
         //  基金支付信息
@@ -475,6 +475,7 @@ public class SetlListUpldService {
             }
             upldSetlListBatch(list);
         } catch (Exception e) {
+            e.printStackTrace();
             log.info("时间范围上传结算单错误:{}", JSON.toJSONString(e));
         }
         return ResultVoUtil.success();
@@ -580,7 +581,11 @@ public class SetlListUpldService {
             inpatientNos.add(item.getPatNo());
             item.setGendName(item.getGend().equals("1") ? "男" : "女");
             if (item.getClrOptinsName() == null) {
-                item.setClrOptinsName(Objects.requireNonNull(Admdvs.get(item.getClrOptins())).getName());
+                if (item.getClrOptins().equals("439900")) {
+                    item.setClrOptinsName("省本级");
+                } else if (item.getClrOptins().equals("430199")) {
+                    item.setClrOptinsName("市本级");
+                }
             }
             Insutype insutype = Insutype.get(item.getInsutype());
             if (null != insutype) {

+ 12 - 6
src/main/java/thyyxxk/webserver/service/yibao/XiangMuLuRuService.java

@@ -638,12 +638,22 @@ public class XiangMuLuRuService {
         execUnit = StringUtil.isBlank(execUnit) ? null : execUnit;
         List<ZyDetailCharge> zhenShuFeiYong = dao.weiGuiZhenShuPiPei(publicServer.getInpatientNo(inpatientNo), admissTimes, ledgerSn, publicServer.getInfantFlag(inpatientNo),
                 chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu);
+
+        if (ListUtil.isBlank(zhenShuFeiYong)) {
+            zhenShuFeiYong.addAll(dao.weiGuiZhenShuPiPei(publicServer.getInpatientNo(inpatientNo), admissTimes, ledgerSn, publicServer.getInfantFlag(inpatientNo),
+                    chargeCodeMx, null, orderNo, startTime, endTime, riQiPaiXu));
+        }
+        if (ListUtil.isBlank(zhenShuFeiYong)) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到该负数费用的对应正数。", dao.genJuBianMaChaZhaoZhenShuFeiYong(publicServer.getInpatientNo(inpatientNo), admissTimes, ledgerSn,
+                    publicServer.getInfantFlag(inpatientNo), chargeCodeMx, startTime, endTime, riQiPaiXu));
+        }
         List<ZyDetailCharge> yuEr = dao.tuiFeiYuEr1(publicServer.getInpatientNo(inpatientNo), admissTimes, ledgerSn, chargeCodeMx, execUnit);
         Map<String, ZyDetailCharge> yuErPiPei = new HashMap<>();
         for (ZyDetailCharge item : yuEr) {
             String key = item.getInpatientNo() + item.getAdmissTimes() + item.getDetailSn() + item.getChargeCodeMx();
             yuErPiPei.put(key, item);
         }
+        // TODO: 2022/1/11 这里需要优化 把计算余额的放到程序里面来计算
         for (int i = 0, len = zhenShuFeiYong.size(); i < len; i++) {
             ZyDetailCharge zy = zhenShuFeiYong.get(i);
             String key = zy.getInpatientNo() + zy.getAdmissTimes() + zy.getDetailSn() + zy.getChargeCodeMx();
@@ -658,10 +668,6 @@ public class XiangMuLuRuService {
                 }
             }
         }
-        if (ListUtil.isBlank(zhenShuFeiYong)) {
-            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到该负数费用的对应正数。", dao.genJuBianMaChaZhaoZhenShuFeiYong(publicServer.getInpatientNo(inpatientNo), admissTimes, ledgerSn,
-                    publicServer.getInfantFlag(inpatientNo), chargeCodeMx, startTime, endTime, riQiPaiXu));
-        }
         return ResultVoUtil.success(zhenShuFeiYong);
     }
 
@@ -707,13 +713,13 @@ public class XiangMuLuRuService {
             chargeAmountSum = chargeAmountSum.add(detailCharge.getChargeAmount());
         }
         if (zhenShuShuJu.size() == 1) {
+            log.info("和:{},原:{}", chargeFeeSum, zy.getChargeFee());
             if (BigUtils.bigDaYu(chargeFeeSum, zy.getChargeFee().negate()) || BigUtils.dengYu(chargeFeeSum, zy.getChargeFee().negate())) {
                 dao.zhiYouYiGeJiuGenXingFuShuLiuShui(zyDetailCharge.getInpatientNo(), zyDetailCharge.getAdmissTimes(), zyDetailCharge.getLedgerSn(), zyDetailCharge.getDetailSn(), zhenShuShuJu.get(0).getDetailSn());
                 publicServer.genXingYuanLiuShuiBiaoZhi(inpatientNo, zyDetailCharge.getAdmissTimes(), zyDetailCharge.getLedgerSn());
                 return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "费用匹配成功。");
             }
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
-                    String.format("负数费用:{%.2f},匹配费用:{%.2f} <br> 负数数量:{%.2f},匹配数量:{%.2f}", zy.getChargeFee().negate(), chargeFeeSum, zy.getChargeAmount().negate(), chargeAmountSum));
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("负数费用:{%.2f},匹配费用:{%.2f} \n 负数数量:{%.2f},匹配数量:{%.2f}", zy.getChargeFee().negate(), chargeFeeSum, zy.getChargeAmount().negate(), chargeAmountSum));
         } else {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "每次只能匹配一条。");
         }

+ 45 - 3
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -12,9 +12,7 @@ import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.datamodify.YzActOrder;
 import thyyxxk.webserver.entity.yibao.ZyActpatient;
 import thyyxxk.webserver.entity.yibao.patient.Patient;
-import thyyxxk.webserver.entity.zhuyuanyisheng.HuanZheFeiYong;
-import thyyxxk.webserver.entity.zhuyuanyisheng.PatientTemp;
-import thyyxxk.webserver.entity.zhuyuanyisheng.YiZhuFeiYongChaXunTiaoJian;
+import thyyxxk.webserver.entity.zhuyuanyisheng.*;
 import thyyxxk.webserver.service.yibao.PatientService;
 import thyyxxk.webserver.utils.*;
 
@@ -142,4 +140,48 @@ public class YiZhuLuRuServer {
         return ResultVoUtil.success(page);
     }
 
+    public ResultVo<List<YiZhuMingChen>> huoQuXiangMu(String code) {
+        code = StringUtil.isContainChinese(code);
+        List<YiZhuMingChen> list = dao.yiZhuMingChen1(code);
+        list.addAll(dao.yiZhuMingChen2(code));
+        EntityStringTrim.beanAttributeValueTrimList(list);
+        return ResultVoUtil.success(list);
+    }
+
+    public ResultVo<Map<String, Object>> huoQuFeiYongXinXi(String code, String serial) {
+        YaoPinXinXi yp = dao.huoQuYaoPin(code, serial);
+        if (yp == null) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到费用信息,该药品可能已经被停用了。");
+        }
+        String yiShenDengJi = dao.huoQuYiShenDengJi(TokenUtil.getTokenUserId());
+        log.info("药品:{},医生等级::{}", JSON.toJSONString(yp), yiShenDengJi);
+        if (BigUtils.bigDaYu(new BigDecimal(yp.getYpLevel()), new BigDecimal(yiShenDengJi))) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "您没有呀权限开此药品。");
+        }
+        Map<String, Object> map = new HashMap<>();
+
+        if (StringUtil.notBlank(yp.getPsFlag()) && yp.getPsFlag().equals("1")) {
+            map.put("piShi", dao.piShiGeiYaoFangShi());
+        }
+        map.put("data", yp);
+        return ResultVoUtil.success(map);
+    }
+
+    public ResultVo<List<GetDropdownBox>> huoQuZhuYuanPinLv(String code) {
+        return ResultVoUtil.success(dao.huoQuZhuYuanPinLv(StringUtil.isContainChinese(code)));
+    }
+
+    public ResultVo<List<GetDropdownBox>> huoQuGeiYaoFangShi(String code) {
+        return ResultVoUtil.success(dao.huoQuGeiYaoFangShi(StringUtil.isContainChinese(code)));
+    }
+
+    public ResultVo<List<GetDropdownBox>> huoQuFuYiZhu(String patNo, Integer times) {
+        log.info("住院号:{},住院次数:{}", patNo, times);
+        return ResultVoUtil.success(dao.huoQuFuYiZhu(patNo, times));
+    }
+
+    public ResultVo<List<GetDropdownBox>> huoQuZhiXinKeShi(String code) {
+        return ResultVoUtil.success(dao.huoQuZhiXinKeShi(StringUtil.isContainChinese(code)));
+    }
+
 }

+ 1 - 1
src/main/resources/application.yml

@@ -8,7 +8,7 @@ spring:
     cache: false
   datasource:
     dynamic:
-      primary: his
+      primary: dev
       strict: false
       datasource:
         his: