1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package thyyxxk.webserver.dao.his.yibao;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import org.apache.ibatis.annotations.Update;
- import thyyxxk.webserver.entity.yibao.patient.FeeCounteract;
- import thyyxxk.webserver.entity.yibao.patient.NotUploadedFee;
- import java.util.List;
- /**
- * @author dj
- */
- @Mapper
- public interface Routines {
- /**
- * 获取当前患者最大账页号
- *
- * @param inpatientNo 住院号
- * @param admissTimes 住院次数
- * @return 账页号
- */
- @Select("select max(ledger_sn) from zy_ledger_file where " +
- "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes}")
- Integer selectMaxLedgerSn(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
- @Select("select detail_sn,charge_code_mx,charge_amount,charge_fee,charge_date,yb_self_flag, " +
- "yb_code=(select max(national_code) from ${zdTable} where code=charge_code_mx), " +
- "charge_name=(select top 1 rtrim(name) from ${zdTable} where code=charge_code_mx) " +
- "from zy_detail_charge where inpatient_no=#{patNo} and admiss_times=#{times} and " +
- "ledger_sn=#{ledgerSn} and isnull(trans_flag_yb,0)=0 and isnull(infant_flag,0)=0 " +
- "and charge_date<=#{today} and isnull(serial,'') in (#{serial1},#{serial2})")
- IPage<NotUploadedFee> selectNotUploadedFees(IPage<NotUploadedFee> iPage,
- @Param("zdTable") String zdTable,
- @Param("patNo") String patNo,
- @Param("times") int times,
- @Param("ledgerSn") int ledgerSn,
- @Param("today") String today,
- @Param("serial1") String serial1,
- @Param("serial2") String serial2);
- @Select("select detail_sn,charge_code_mx,charge_amount,charge_fee,charge_date,yb_self_flag, " +
- "yb_code=(select max(hnsyb_item_code) from zd_charge_item_hnsgs where hosp_code=charge_code_mx), " +
- "charge_name=(select top 1 rtrim(name) from ${zdTable} where code=charge_code_mx) " +
- "from zy_detail_charge where inpatient_no=#{patNo} and admiss_times=#{times} and " +
- "ledger_sn=#{ledgerSn} and isnull(trans_flag_yb,0)=0 and isnull(infant_flag,0)=0 " +
- "and charge_date<=#{today} and isnull(serial,'') in (#{serial1},#{serial2})")
- IPage<NotUploadedFee> selectInjuryNotUploadedFees(IPage<NotUploadedFee> iPage,
- @Param("zdTable") String zdTable,
- @Param("patNo") String patNo,
- @Param("times") int times,
- @Param("ledgerSn") int ledgerSn,
- @Param("today") String today,
- @Param("serial1") String serial1,
- @Param("serial2") String serial2);
- @Select("select sum(charge_fee) from zy_detail_charge where inpatient_no=#{patNo} and admiss_times=#{times} and " +
- "ledger_sn=#{ledgerSn} and isnull(trans_flag_yb,0)=0 and charge_date<=#{today} and isnull(serial,'') in (#{serial1},#{serial2})")
- String selectSumChargeFee(@Param("patNo") String patNo,
- @Param("times") int times,
- @Param("ledgerSn") int ledgerSn,
- @Param("today") String today,
- @Param("serial1") String serial1,
- @Param("serial2") String serial2);
- }
|