|
@@ -3,11 +3,8 @@ package thyyxxk.webserver.dao.his.zhuyuanyiji;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
-import thyyxxk.webserver.entity.datamodify.ZyDetailCharge;
|
|
|
import thyyxxk.webserver.entity.yibao.ZyActpatient;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
/**
|
|
|
* <p>
|
|
|
* 描述:住院以及费用录入
|
|
@@ -55,94 +52,8 @@ public interface YiJiFeiYongLuRuDao {
|
|
|
@Param("tableName") String tableName,
|
|
|
@Param("admissTimes") Integer admissTimes);
|
|
|
|
|
|
-
|
|
|
- @Select("<script>" +
|
|
|
- "SELECT a.admiss_times, " +
|
|
|
- " a.inpatient_no, " +
|
|
|
- " a.ledger_sn, " +
|
|
|
- " a.detail_sn, " +
|
|
|
- " a.charge_date, " +
|
|
|
- " a.op_id_code, " +
|
|
|
- " a.charge_code, " +
|
|
|
- " a.charge_fee, " +
|
|
|
- " a.charge_status , " +
|
|
|
- " bill_item_code=b.bill_item_zy, " +
|
|
|
- " charge_name=b.name, " +
|
|
|
- " spec=c.specification, " +
|
|
|
- " a.charge_code_mx, " +
|
|
|
- " a.serial, " +
|
|
|
- " price=0.0000, " +
|
|
|
- " amount=a.charge_amount, " +
|
|
|
- " a.exec_unit, " +
|
|
|
- " a.ward_code, " +
|
|
|
- " self_flag=isnull(a.self_flag,0), " +
|
|
|
- " suppress_flag=a.suppress_flag, " +
|
|
|
- " group_no='00', " +
|
|
|
- " separate_flag=a.separate_flag, " +
|
|
|
- " ope_flag=a.ope_flag, " +
|
|
|
- " drugname=c.name, " +
|
|
|
- " ybcomment=c.yb_comment, " +
|
|
|
- " a.yb_self_flag, " +
|
|
|
- " doctor_code " +
|
|
|
- "FROM zy_detail_charge a ,zd_charge_item b,yp_zd_dict c " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and " +
|
|
|
- " a.admiss_times=#{admissTimes} and " +
|
|
|
- " a.charge_code=b.code and " +
|
|
|
- "<if test=\"chargeCode != null and chargeCode != '' \">" +
|
|
|
- " a.charge_code = #{chargeCode} and " +
|
|
|
- "</if>" +
|
|
|
- " a.order_no = 0 and " +
|
|
|
- " c.code= a.charge_code_mx and " +
|
|
|
- " a.serial=c.serial and a.charge_code like 'BILL%' " +
|
|
|
- "<if test=\"dept != 3100000\"> " +
|
|
|
- " and a.exec_unit=#{dept} " +
|
|
|
- "</if>" +
|
|
|
- "union " +
|
|
|
- "SELECT a.admiss_times, " +
|
|
|
- " a.inpatient_no, " +
|
|
|
- " a.ledger_sn, " +
|
|
|
- " a.detail_sn, " +
|
|
|
- " a.charge_date, " +
|
|
|
- " a.op_id_code, " +
|
|
|
- " a.charge_code, " +
|
|
|
- " a.charge_fee, " +
|
|
|
- " a.charge_status , " +
|
|
|
- " bill_item_code=b.bill_item_zy, " +
|
|
|
- " charge_name=b.name, " +
|
|
|
- " spec=b.charge_unit, " +
|
|
|
- " a.charge_code_mx, " +
|
|
|
- " a.serial, " +
|
|
|
- " price=0.0000, " +
|
|
|
- " amount=a.charge_amount, " +
|
|
|
- " a.exec_unit, " +
|
|
|
- " a.ward_code, " +
|
|
|
- " self_flag=a.self_flag, " +
|
|
|
- " suppress_flag=a.suppress_flag, " +
|
|
|
- " group_no='00', " +
|
|
|
- " separate_flag=a.separate_flag, " +
|
|
|
- " ope_flag=a.ope_flag, " +
|
|
|
- " drugname=b.name, " +
|
|
|
- " ybcomment='', " +
|
|
|
- " ybzf=a.yb_self_flag, " +
|
|
|
- " doctor_code " +
|
|
|
- "FROM zy_detail_charge a ,zd_charge_item b " +
|
|
|
- "where a.inpatient_no=#{inpatientNo} and " +
|
|
|
- " a.admiss_times=#{admissTimes} and " +
|
|
|
- " a.charge_code=b.code and " +
|
|
|
- " a.order_no = 0 and " +
|
|
|
- "<if test=\"chargeCode != null and chargeCode != '' \">" +
|
|
|
- " a.charge_code = #{chargeCode} and " +
|
|
|
- "</if>" +
|
|
|
- " a.charge_code not like 'BILL%' " +
|
|
|
- "<if test=\"dept != 3100000\"> " +
|
|
|
- " and a.exec_unit=#{dept} " +
|
|
|
- "</if>" +
|
|
|
- "</script>")
|
|
|
- List<ZyDetailCharge> getHuanZheFeiYong(@Param("inpatientNo") String inpatientNo,
|
|
|
- @Param("admissTimes") Integer admissTimes,
|
|
|
- @Param("dept") String dept,
|
|
|
- @Param("chargeCode") String chargeCode);
|
|
|
-
|
|
|
+ @Select("select max(admiss_times) from zy_inactpatient where inpatient_no = #{inpatientNo} ")
|
|
|
+ Integer maxAdmissTimes(@Param("inpatientNo") String inpatientNo);
|
|
|
|
|
|
@Select("select settle_type from zy_ledger_file where " +
|
|
|
"inpatient_no = #{inpatientNo} and admiss_times = #{admissTimes} " +
|