|
@@ -6,6 +6,7 @@ import thyyxxk.webserver.entity.yibao.dismiss.ActOrderDetail;
|
|
|
import thyyxxk.webserver.entity.yibao.dismiss.NegativeFee;
|
|
|
import thyyxxk.webserver.entity.yibao.dismiss.ReceiptFee;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -121,14 +122,21 @@ public interface DismissDao {
|
|
|
Integer countDisActOrders2(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
|
|
|
@Select("select (select isnull(sum(charge_fee),0) from zy_detail_charge where inpatient_no=#{patNo} " +
|
|
|
- "AND admiss_times=#{times} AND ledger_sn=#{ledgerSn} and isnull(charge_status, '1') <> '1' " +
|
|
|
- "and charge_date>=#{begntime} and charge_date<=#{endtime})-(select isnull(total_charge,0) from zy_ledger_file " +
|
|
|
+ "and admiss_times=#{times} and ledger_sn=#{ledgerSn} and isnull(charge_status, '1') <> '1') - " +
|
|
|
+ "(select isnull(total_charge,0) from zy_ledger_file " +
|
|
|
"where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn})")
|
|
|
- int getFeeOffset(@Param("patNo") String patNo,
|
|
|
+ BigDecimal getFeeOffset(@Param("patNo") String patNo,
|
|
|
@Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn,
|
|
|
- @Param("begntime") Date begntime,
|
|
|
- @Param("endtime") Date endtime);
|
|
|
+ @Param("ledgerSn") int ledgerSn);
|
|
|
+
|
|
|
+ @Select("select isnull(sum(charge_fee),0) from zy_detail_charge where inpatient_no=#{patNo} and " +
|
|
|
+ "admiss_times=#{times} and ledger_sn=#{ledgerSn} and isnull(charge_status, '1') <> '1' and " +
|
|
|
+ "charge_date ${compare} #{timeLimit}")
|
|
|
+ BigDecimal selectOverTimeLimitFee(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times,
|
|
|
+ @Param("ledgerSn") int ledgerSn,
|
|
|
+ @Param("compare") String compare,
|
|
|
+ @Param("timeLimit") Date timeLimit);
|
|
|
|
|
|
@Update("update zy_ledger_file set deposit=(select isnull(sum(depo_amount),0) from zy_deposit_file f with(nolock) " +
|
|
|
"where f.inpatient_no=#{zyh} and f.admiss_times=#{times} and f.ledger_sn=#{ledger} and f.status in ('1','2')) " +
|