|
@@ -2,9 +2,7 @@ package thyyxxk.webserver.dao.his.yibao;
|
|
|
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
-import thyyxxk.webserver.entity.yibao.dismiss.ActOrderDetail;
|
|
|
-import thyyxxk.webserver.entity.yibao.dismiss.NegativeFee;
|
|
|
-import thyyxxk.webserver.entity.yibao.dismiss.ReceiptFee;
|
|
|
+import thyyxxk.webserver.entity.yibao.dismiss.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
@@ -153,14 +151,9 @@ public interface DismissDao {
|
|
|
@Param("times") Integer times, @Param("ledgerSn") int ledgerSn);
|
|
|
|
|
|
@Insert("insert into zy_ledger_file_yb (inpatient_no,admiss_times,ledger_sn,total_cost,tczf,grzhzf,dbzf,xjzf," +
|
|
|
- "full_self_pay,part_self_pay,hospital_pay) values (#{patNo},#{times},#{ledgerSn},#{fee0},#{fee1},#{fee2}, " +
|
|
|
- "#{fee3},#{fee4},#{fullSelfPay},#{partSelfPay},#{hospitalPay})")
|
|
|
- int writeYbSettleTable(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times, @Param("ledgerSn") int ledgerSn,
|
|
|
- @Param("fee0") String fee0, @Param("fee1") String fee1, @Param("fee2") String fee2,
|
|
|
- @Param("fee3") String fee3, @Param("fee4") String fee4,
|
|
|
- @Param("fullSelfPay") String fullSelfPay, @Param("partSelfPay") String partSelfPay,
|
|
|
- @Param("hospitalPay") String hospitalPay);
|
|
|
+ "full_self_pay,part_self_pay,hospital_pay) values (#{inpatientNo},#{admissTimes},#{ledgerSn},#{totalCost}," +
|
|
|
+ "#{tczf},#{grzhzf},#{dbzf},#{xjzf},#{fullSelfPay},#{partSelfPay},#{hospitalPay})")
|
|
|
+ int insertZyLedgerFileYb(MedinsSettleFee settleFee);
|
|
|
|
|
|
@Update("update zy_ledger_file set charge_yb=1 where inpatient_no=#{patNo} and " +
|
|
|
"admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
@@ -187,42 +180,22 @@ public interface DismissDao {
|
|
|
@Select("select max(infant_flag) FROM zy_detail_charge WHERE inpatient_no=#{patNo} and admiss_times=#{times}")
|
|
|
int hasInfant(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
|
|
|
- @Update("update zy_ledger_file set account_date=#{dismissDate},settle_type='1',balance=0," +
|
|
|
- "last_balance=total_charge,settle=deposit-total_charge,ward_code=#{wardCode}," +
|
|
|
- "dept_code=#{deptCode},op_id_code=#{codeRs},responce_type='01',charge_yb=0 from zy_ledger_file " +
|
|
|
- "where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- int updateZifeiCostStatus(@Param("patNo") String patNo, @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn, @Param("wardCode") String wardCode,
|
|
|
- @Param("deptCode") String deptCode, @Param("codeRs") String codeRs,
|
|
|
- @Param("dismissDate") Date dismissDate);
|
|
|
-
|
|
|
- @Select("select case when isnull(xjzf,0)!=0 then xjzf else (total_cost-tczf-grzhzf) end from zy_ledger_file_yb " +
|
|
|
- "where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- String selectMedinsCashPay(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn);
|
|
|
+ @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,dept_code=#{deptCode}," +
|
|
|
+ "last_balance=total_charge,settle=deposit-total_charge,ward_code=#{wardCode},op_id_code=#{staffId}," +
|
|
|
+ "responce_type='01',charge_yb=0,fund_pay_sumamt=0,acct_pay=0 from zy_ledger_file " +
|
|
|
+ "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
|
|
|
+ int updateZifeiCostStatus(MedinsSettleFee settleFee);
|
|
|
|
|
|
- @Update("update zy_ledger_file set account_date=#{dismissDate},settle_type='1',balance=0,last_balance=#{cash}, " +
|
|
|
- "settle=(deposit-#{cash}),ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{codeRs},charge_yb=0 " +
|
|
|
- "where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- int updateCostStatusWithoutInfant(@Param("patNo") String patNo, @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn, @Param("wardCode") String wardCode,
|
|
|
- @Param("deptCode") String deptCode, @Param("codeRs") String codeRs,
|
|
|
- @Param("dismissDate") Date dismissDate, @Param("cash") String cash);
|
|
|
-
|
|
|
- @Select("select tczf from zy_ledger_file_yb where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- String selectMedinsFundPay(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn);
|
|
|
+ @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0,last_balance=#{xjzf}, " +
|
|
|
+ "settle=(deposit-#{xjzf}),ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId},charge_yb=0 " +
|
|
|
+ "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
|
|
|
+ int updateCostStatusWithoutInfant(MedinsSettleFee settleFee);
|
|
|
|
|
|
- @Update("update zy_ledger_file set account_date=#{dismissDate},settle_type='1',balance=0, " +
|
|
|
- "last_balance=(total_charge-#{fund}),settle=(deposit-total_charge+#{fund}), " +
|
|
|
- "ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{codeRs}, " +
|
|
|
- "charge_yb=0 where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- int updateCostStatusWithInfant(@Param("patNo") String patNo, @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn, @Param("wardCode") String wardCode,
|
|
|
- @Param("deptCode") String deptCode, @Param("codeRs") String codeRs,
|
|
|
- @Param("dismissDate") Date dismissDate, @Param("fund") String fund);
|
|
|
+ @Update("update zy_ledger_file set account_date=#{zjdzDatetime},settle_type='1',balance=0, " +
|
|
|
+ "last_balance=(total_charge-#{tczf}),settle=(deposit-total_charge+#{tczf}), " +
|
|
|
+ "ward_code=#{wardCode},dept_code=#{deptCode},op_id_code=#{staffId}, " +
|
|
|
+ "charge_yb=0 where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and ledger_sn=#{ledgerSn}")
|
|
|
+ int updateCostStatusWithInfant(MedinsSettleFee settleFee);
|
|
|
|
|
|
@Update("update zy_detail_charge set charge_status=3 where charge_status=2 and " +
|
|
|
"inpatient_no=#{patNo} AND admiss_times=#{times} AND ledger_sn=#{ledgerSn}")
|
|
@@ -330,10 +303,10 @@ public interface DismissDao {
|
|
|
@Update("update a_patient_mi set hic_no=#{hicNew} where inpatient_no=#{zyh}")
|
|
|
void updateHic(@Param("zyh") String zyh, @Param("hicNew") String hicNew);
|
|
|
|
|
|
- @Select("select med_type as code, mdtrt_id as name from t_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
- PureCodeName selectMdtrtId(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times,
|
|
|
- @Param("ledgerSn") int ledgerSn);
|
|
|
+ @Select("select mdtrt_id,med_type from t_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
+ BriefMdtrtInfo selectMdtrtId(@Param("patNo") String patNo,
|
|
|
+ @Param("times") Integer times,
|
|
|
+ @Param("ledgerSn") int ledgerSn);
|
|
|
|
|
|
@Select("select serial_no from t_injury_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
String selectInjurySerialNo(@Param("patNo") String patNo,
|