123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- package thyyxxk.webserver.dao.his.zhuyuanyiji;
- 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.datamodify.YzActOrder;
- import java.util.List;
- /**
- * <p>
- * 描述: 确认医嘱收费
- * </p>
- *
- * @author xc
- * @date 2021-09-27 11:51
- */
- @Mapper
- public interface QueRenYiZhuShouFeiDao {
- @Select("<script>" +
- "SELECT a.inpatient_no, " +
- " a.admiss_times, " +
- " name =b.name, " +
- " bed_no =b.bed_no, " +
- " ward_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.ward_code), " +
- " b.sex, " +
- " b.admiss_date, " +
- " b.total_charge, " +
- " responce_type , " +
- " responce_type_name=(select rtrim(name) name from zy_zd_responce_type where responce_type = zy_zd_responce_type.code), " +
- " a.ward_code,exec_unit " +
- "FROM yz_zy_patient_fee a ,zy_actpatient b " +
- "where a.charge_status='3' and " +
- "<if test=\"inpatientNo !=null and inpatientNo != '' \"> " +
- "a.inpatient_no = #{inpatientNo} and " +
- "</if>" +
- "<if test=\"admissTimes !=null and admissTimes != '' \">" +
- " a.admiss_times = #{admissTimes} and " +
- "</if>" +
- "<if test=\"execUnit != null and execUnit !='' and execUnit != '3100000'\">" +
- " a.exec_unit = #{execUnit} and " +
- "</if>" +
- "<if test=\"wardCode != null and wardCode !='' \">" +
- " a.ward_code = #{wardCode} and " +
- "</if>" +
- " a.inpatient_no=b.inpatient_no and " +
- " a.admiss_times=b.admiss_times and " +
- " convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
- "group by a.inpatient_no, a.admiss_times, b.name, b.bed_no,a.ward_code,exec_unit,b.sex,b.admiss_date,b.total_charge,responce_type" +
- "</script>")
- IPage<YzActOrder> getXuQueFeiYiZhu(IPage<YzActOrder> page,
- @Param("inpatientNo") String inpatientNo,
- @Param("admissTimes") Integer admissTimes,
- @Param("execUnit") String execUnit,
- @Param("wardCode") String wardCode);
- @Select("<script>" +
- "SELECT a.inpatient_no, " +
- " a.admiss_times, " +
- " a.charge_date, " +
- " a.op_id_code, " +
- " a.charge_code, " +
- " a.infant_flag, " +
- " a.charge_status, " +
- " a.charge_fee, " +
- " a.self_flag, " +
- " a.separate_flag, " +
- " a.suppress_flag, " +
- " a.occ_time, " +
- " a.act_order_no, " +
- " a.dept_code, " +
- " a.ward_code, " +
- " ward_name = (select rtrim(name) name from zd_unit_code where zd_unit_code.code = a.ward_code)," +
- " a.order_count, " +
- " a.pay_self, " +
- " a.exec_unit, " +
- " a.zy_serial_no , " +
- " charge_name=c.name, " +
- " bill_item_code=c.bill_item_zy, " +
- " ledger_sn=b.times_billed, " +
- " name =b.name, " +
- " bed_no =b.bed_no, " +
- " op_flag =isnull(a.op_flag,'0'), " +
- " d.order_name, " +
- " docotr_name=e.name, " +
- " op_id = a.op_id, " +
- " op_date = a.op_date " +
- "FROM yz_zy_patient_fee a ,zy_actpatient b ,zd_charge_item c,yz_act_order d,a_employee_mi e " +
- "where a.charge_status='3' and " +
- " a.inpatient_no = #{inpatientNo} and " +
- " a.admiss_times = #{admissTimes} and " +
- "<if test=\"execUnit != '3100000' \">" +
- " a.exec_unit = #{execUnit} and " +
- "</if>" +
- " a.inpatient_no=b.inpatient_no and " +
- " a.admiss_times=b.admiss_times and " +
- " a.charge_code=c.code and" +
- " a.inpatient_no=d.inpatient_no and " +
- " a.admiss_times=d.admiss_times and" +
- " a.act_order_no=d.act_order_no and" +
- " d.physician*=e.code and" +
- " convert(varchar(20),a.occ_time,23)<=convert(varchar(20),getdate(),23) " +
- "order by charge_name,order_code,charge_code" +
- "</script>")
- List<YzActOrder> getXuQueFeiXiangXiXinXi(@Param("inpatientNo") String inpatientNo,
- @Param("admissTimes") Integer admissTimes,
- @Param("execUnit") String execUnit);
- @Update("<script>" +
- "<foreach collection='list' item='item' separator=';'>" +
- "UPDATE yz_zy_patient_fee " +
- "<set>" +
- " charge_status = #{item.chargeStatus}, op_id = #{code}, op_date = GETDATE() " +
- "</set>" +
- "WHERE occ_time = #{item.occTime} AND act_order_no = #{item.actOrderNo} " +
- "AND inpatient_no = #{inpatientNo} AND admiss_times = #{admissTimes}" +
- "</foreach>" +
- "</script>")
- void baoCunYiZhuQueFei(@Param("inpatientNo") String inpatientNo,
- @Param("admissTimes") Integer admissTimes,
- @Param("list") List<YzActOrder> list,
- @Param("code") String code);
- }
|