فهرست منبع

修复急门诊转入的小问题,以及存取模板的问题。

xiaochan 4 سال پیش
والد
کامیت
1f07094c92

+ 6 - 5
src/main/java/thyyxxk/webserver/dao/his/yibao/TransferInOfExpensesDao.java

@@ -75,26 +75,27 @@ public interface TransferInOfExpensesDao {
             "        b.receipt_sn=#{serialNo} and " +
             "        a.charge_item_code=c.code and " +
             "        isnull(a.group_no,'00')='00' " +
-            "union all " +
+            "union " +
             "select patient_name =rtrim(a.name), " +
             "       item_name = (select name from yp_zd_dict where yp_zd_dict.code=c.charge_code and yp_zd_dict.serial=c.serial),/*c.drugname,*/ " +
             "       charge_amount = a.quantity, " +
             "       self_flag=a.self_flag, " +
             "       separate_flag =  (select separate_flag from yp_zd_dict where yp_zd_dict.code=c.charge_code and yp_zd_dict.serial=c.serial), " +
             "       suppress_flag =  (select suprice_flag from yp_zd_dict where yp_zd_dict.code=c.charge_code and yp_zd_dict.serial=c.serial), " +
-            "       charge_code = a.charge_item_code, " +
+            "       charge_code =  (select charge_code from zy_bill_item where zy_bill_item.code = e.bill_item_zy), " +
             "       charge_code_mx = a.charge_item_code, " +
             "       serial = a.serial, " +
             "       group_no = a.group_no, " +
             "       price = a.unit_price, " +
-            "       charge_fee=a.unit_price * a.quantity * isnull(a.drug_win,1), " +
+            "       charge_fee= Convert(decimal(18,2),a.unit_price * a.quantity * isnull(a.drug_win,1)) , " +
             "       check_flag='0', " +
             "       warn_dept =a.warn_dept, " +
             "       doctor_code = a.doctor_code, " +
             "       bill_item_code = rtrim(a.bill_item_code), " +
             "       exec_dept = a.exec_dept " +
-            "from ${tableName} a,mz_receipt_serial b,yp_base_yf c " +
+            "from ${tableName} a,mz_receipt_serial b,yp_base_yf c ,view_yp_zd_dict e " +
             "where a.patient_id = b.patient_id and " +
+            " e.code = a.charge_item_code and a.serial = e.serial and" +
             "        a.times = b.times and " +
             "        a.receipt_no = b.receipt_no and " +
             "        a.serial_no= b.serial_no and " +
@@ -180,7 +181,7 @@ public interface TransferInOfExpensesDao {
             "gen_time,charge_code_mx,serial,doctor_code,trans_flag_yb,refer_physician,consult_physician,exec_unit,zy_serial_no) VALUES " +
             "<foreach collection='list' item='fee' separator=',' open='' close=''>" +
             "(#{info.inpatientNo}, #{info.admissTimes}, #{info.ledgerSn}, #{fee.detailSn}, getDate(), #{info.staffId}, " +
-            "#{fee.chargeCode}, 0, 2, #{fee.chargeAmount}, cast(#{fee.chargeFee,jdbcType=DECIMAL} as decimal(14,5)), #{info.ward}, #{info.dept}, 6, " +
+            "#{fee.chargeCode}, 0, 2, #{fee.chargeAmount}, cast(#{fee.chargeFee,jdbcType=DECIMAL} as decimal(14,5)), #{info.zkWard}, #{info.dept}, 6, " +
             "'',getDate(), #{fee.chargeCodeMx},#{fee.serial},#{fee.doctorCode},0,#{info.referPhysician}," +
             "#{info.consultPhysician},#{info.reqExecUnit},#{info.zySerialNo})" +
             "</foreach>" +

+ 1 - 2
src/main/java/thyyxxk/webserver/entity/yibao/ZyActpatient.java

@@ -38,7 +38,6 @@ public class ZyActpatient implements Serializable {
      */
     private Integer admissTimes;
 
-
     /**
      * name
      */
@@ -158,7 +157,7 @@ public class ZyActpatient implements Serializable {
     /**
      * totalCharge
      */
-    private Double totalCharge;
+    private BigDecimal totalCharge;
 
     /**
      * charge1

+ 1 - 1
src/main/java/thyyxxk/webserver/service/PublicServer.java

@@ -56,7 +56,6 @@ public class PublicServer {
     public int getInfantFlag(String inpatientNo) {
         int infantFlag = 0;
         if (inpatientNo.contains("$")) {
-            inpatientNo = inpatientNo.split("\\$")[0];
             infantFlag = 1;
         }
         return infantFlag;
@@ -72,4 +71,5 @@ public class PublicServer {
     public Integer getMaxDetailSn(String inpatientNo, Integer admissTimes) {
         return transferInOfExpensesDao.getMaxDetailSn(inpatientNo, admissTimes);
     }
+
 }

+ 1 - 1
src/main/java/thyyxxk/webserver/service/yibao/TransferInOfExpensesService.java

@@ -149,7 +149,7 @@ public class TransferInOfExpensesService {
         // 同时计算 出患者的总金额 以及 费用的类型
         for (MzChargeDetail mzChargeDetail : list) {
             ZyDetailCharge pojo = new ZyDetailCharge();
-            pojo.setChargeAmount(BigDecimal.valueOf(mzChargeDetail.getChargeAmount()));
+            pojo.setChargeAmount(BigDecimal.valueOf(mzChargeDetail.getChargeAmount()).multiply(mzChargeDetail.getChargeFee()));
             pojo.setAmount(mzChargeDetail.getChargeFee());
             pojo.setBillItemCode(mzChargeDetail.getBillItemCode());
             zyDetailCharges.add(pojo);

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

@@ -348,15 +348,17 @@ public class XiangMuLuRuService {
         zyDetailCharge.setOpIdCode(TokenUtil.getTokenUserId());
 
         for (ZyDetailCharge detailCharge : zyDetailCharge.getList()) {
-            if (detailCharge.getBillItemCode().equals("001") || detailCharge.getBillItemCode().equals("002")) {
-                detailCharge.setSerial("01");
-                detailCharge.setGroupNo("73");
-            } else if (zyDetailCharge.getBillItemCode().equals("028")) {
-                zyDetailCharge.setSerial("01");
-                zyDetailCharge.setChargeCode("BILL28");
-            } else {
-                //  Serial 00 项目标志 01 药品标志
-                detailCharge.setSerial("00");
+            if (StringUtil.notBlank(zyDetailCharge.getBillItemCode())) {
+                if (detailCharge.getBillItemCode().equals("001") || detailCharge.getBillItemCode().equals("002")) {
+                    detailCharge.setSerial("01");
+                    detailCharge.setGroupNo("73");
+                } else if (zyDetailCharge.getBillItemCode().equals("028")) {
+                    zyDetailCharge.setSerial("01");
+                    zyDetailCharge.setChargeCode("BILL28");
+                } else {
+                    //  Serial 00 项目标志 01 药品标志
+                    detailCharge.setSerial("00");
+                }
             }
         }
         // 在创建新的模板之前 需要先删除 原来的
@@ -368,6 +370,8 @@ public class XiangMuLuRuService {
 
     /**
      * 医嘱退费匹配
+     * 第一次匹配使用 收费日期,数量,项目编码,医嘱号,账页号 来进行匹配
+     * 第二次匹配使用,数量,项目编码,账页号,执行科室来进行匹配的
      *
      * @param inpatientNo 住院号
      * @param admissTimes 住院次数
@@ -468,17 +472,24 @@ public class XiangMuLuRuService {
                                 "<br />如: 收了9条费用,但是一次性退了 9 条,这样现在是不允许,需要一条一条退。", getYiZhuFeiYongFuShu.size(),
                         getYiZhuFeiYongFuShu.size() - piPei.size()));
             }
-            return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, String.format("医嘱退费匹配,共有【%d】条,匹配成功【%d】条,*.。(๑・∀・๑)*.。",
+            return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, String.format("医嘱退费匹配,共有<span style='color:teal'>【%d】</span>条,匹配成功【%d】条,*.。(๑・∀・๑)*.。",
                     getYiZhuFeiYongFuShu.size(), piPei.size()));
         } else {
             if (getYiZhuFeiYongFuShu.size() > 0) {
-                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("有<span style='color:red'>【%d】</span>条匹配失败,可能原因退多了" +
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, String.format("共有<span style='color:teal'>【%d】</span>条匹配失败,可能原因退多了" +
                         "<br />如: 收了9条费用,但是一次性退了 9 条,这样现在是不允许,需要一条一条退。", getYiZhuFeiYongFuShu.size()));
             }
-            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "该患者没有可以匹配的医嘱退费|д・)っ");
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "该患者没有可以匹配的医嘱退费 |д・)っ");
         }
     }
 
+    /**
+     * 此处删除模板 这个模板是录入住院费用的 模板
+     *
+     * @param patterName 模板名称
+     * @param opIdCode   创建模板人的姓名
+     * @return 返回提示
+     */
     public ResultVo<String> shanChuMuBan(String patterName, String opIdCode) {
         log.info("删除项目模板 ==》操作人:{},模板名称:{}", TokenUtil.getTokenUserId(), patterName);
         dao.delMuBan(patterName, opIdCode);