Sfoglia il codice sorgente

优化住院费用清单查询

lighter 1 anno fa
parent
commit
f03fe77320

+ 1 - 1
pom.xml

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

+ 2 - 1
src/main/java/thyyxxk/webserver/dao/his/inpatient/ChargeListDao.java

@@ -26,7 +26,8 @@ public interface ChargeListDao {
             "rtrim(admiss_dept) as dept,admiss_date as admdate,med_type as medtype, " +
             "admiss_date as begndate,isnull(dis_date,getdate()) as enddate, " +
             "balance=(select ((select isnull(sum(t.depo_amount),0) from zy_deposit_file t where t.inpatient_no=a.inpatient_no " +
-            "and t.admiss_times=a.admiss_times and t.status in (1,2))- " +
+            "and t.admiss_times=a.admiss_times and t.status in (1,2)) + " +
+            "(select sum(e.fund_pay_sumamt) from zy_ledger_file e where e.inpatient_no=#{patNo} and e.admiss_times=#{times}) - " +
             "(select isnull(sum(t.charge_fee),0) from zy_detail_charge t where t.inpatient_no=a.inpatient_no " +
             "and t.admiss_times=a.admiss_times))),a.total_charge as totalCost " +
             "from ${table} a where a.inpatient_no=#{patNo} and a.admiss_times=#{times}")

+ 2 - 1
src/main/java/thyyxxk/webserver/service/inpatient/ChargeListService.java

@@ -44,7 +44,8 @@ public class ChargeListService {
     }
 
     public BriefPatInfo selectBriefPatInfo(PatOverview overview) {
-        BriefPatInfo briefPatInfo = dao.selectBriefPatInfo(overview.getPatNo(), overview.getTimes(), "zy_actpatient");
+        BriefPatInfo briefPatInfo = dao.selectBriefPatInfo(overview.getPatNo(),
+                overview.getTimes(), "zy_actpatient");
         if (null == briefPatInfo) {
             briefPatInfo = dao.selectBriefPatInfo(overview.getPatNo(), overview.getTimes(), "zy_inactpatient");
         }