Browse Source

只看当前住院的次数,不管最大。

xiaochan 3 years ago
parent
commit
6736078570

+ 8 - 2
src/main/java/thyyxxk/webserver/dao/his/PublicDao.java

@@ -106,11 +106,17 @@ public interface PublicDao {
             "when (select count(1) from yz_inact_order where inpatient_no= a.inpatient_no and admiss_times= a.admiss_times " +
             "and status_flag > '2' and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973')) > 0 " +
             "then 1 else 0 end  ), " +
-            "bed_no,total_charge,balance from zy_patient a where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes}")
+            "bed_no,total_charge,balance from zy_actpatient a where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes}")
     ZyActpatient getHuanZheJiBenXinXi(@Param("inpatientNo") String inpatientNo,
                                       @Param("admissTimes") Integer admissTimes);
 
-    @Select("select max(admiss_times) from zy_patient where inpatient_no = #{inpatientNo} ")
+    /**
+     * 只用当前在院的次数就可以了
+     *
+     * @param inpatientNo 住院号
+     * @return 返回信息
+     */
+    @Select("select max(admiss_times) from zy_actpatient where inpatient_no = #{inpatientNo} ")
     Integer getAdmissTimes(@Param("inpatientNo") String inpatientNo);
 
     @Select("select inpatient_no,admiss_times,ledger_sn,detail_sn,charge_code_mx,sum(charge_fee) yi_tui_fei from (       " +

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

@@ -968,7 +968,7 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
     void yiZhuTuiFeiGenXingZhiXingKeShi(@Param("inpatientNo") String inpatientNo,
                                         @Param("admissTimes") Integer admissTimes,
                                         @Param("ledger") Integer ledger,
-                                        @Param("list") List<ZyDetailCharge> map);
+                                        @Param("list") List<ZyDetailCharge> genXingDeZhiXinKeShi);
 
     @Update("update zy_detail_charge set exec_unit = ward_code  where inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +
             "and len(order_no) > 2 and exec_unit is null  and charge_fee < 0 ")
@@ -976,7 +976,6 @@ public interface XiangMuLuRuDao extends BaseMapper<ZyDetailCharge> {
                                   @Param("admissTimes") Integer admissTimes,
                                   @Param("ledger") Integer ledger);
 
-
     @Select("select b.code from zy_detail_charge a, yp_zd_dict b " +
             "where order_no <> 6 and trans_flag_yb not in (1,2)  and charge_code like 'BILL%' " +
             "  and  isnull(b.national_code,'') = '' and inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} and ledger_sn = #{ledger} " +

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

@@ -85,7 +85,6 @@ public class XiangMuLuRuService {
             page.setRecords(dao.huanZheYaoPinFeiYong(param.getCurrentPage(), param.getPageSize(), param.getInpatientNo(), param.getAdmissTimes(), ledgerSn, param.getChargeCode(), infantFlag,
                     param.getStartTime(), param.getEndTime(), param.getOrderNo(), param.getDept(), param.getRiQiPaiXu(), param.getTuiFeiFlag()));
         }
-
         if (ListUtil.isBlank(page.getRecords())) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有查询到符合费用。");
         }