|
@@ -21,7 +21,7 @@ public interface MzChargeDetailMapper {
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
"select count(*) from (",
|
|
|
- "select patient_id from mz_charge_detail where bill_item_code <![CDATA[<>]]> 'TC' ",
|
|
|
+ "select patient_id from ${tableName} where bill_item_code <![CDATA[<>]]> 'TC' ",
|
|
|
"<when test='mzChargeDetail.payMark!=null'>",
|
|
|
" and pay_mark =#{mzChargeDetail.payMark,jdbcType=CHAR}",
|
|
|
"</when>",
|
|
@@ -152,7 +152,7 @@ public interface MzChargeDetailMapper {
|
|
|
"</when>",
|
|
|
"real_no,sum(( case when convert(decimal(18,2),unit_price)=0.00 then 0.01 else convert(decimal(18,2),unit_price) end )*quantity*drug_win) amount" ,
|
|
|
",sum(( case when convert(decimal(18,2),orig_price)=0.00 then 0.01 else convert(decimal(18,2),orig_price) end )*quantity*drug_win) not_discount_amount ",
|
|
|
- " from mz_charge_detail where bill_item_code <![CDATA[<>]]> 'TC' ",
|
|
|
+ " from ${tableName} where bill_item_code <![CDATA[<>]]> 'TC' ",
|
|
|
"<when test='mzChargeDetail.payMark!=null'>",
|
|
|
" and pay_mark =#{mzChargeDetail.payMark,jdbcType=CHAR}",
|
|
|
"</when>",
|
|
@@ -830,8 +830,8 @@ public interface MzChargeDetailMapper {
|
|
|
* @param times
|
|
|
* @return
|
|
|
*/
|
|
|
- @Select("select top 1 rtrim(warn_dept) warn_dept,rtrim(doctor_code) doctor_code,rtrim(print_flag) print_flag from mz_charge_detail where patient_id = #{patientId} and times = #{times} and warn_dept is not null and doctor_code is not null and warn_dept<> '' and doctor_code<> '' ")
|
|
|
- MzChargeDetail selectWarnDeptAndDoctor(@Param("patientId") String patientId, @Param("times") Integer times);
|
|
|
+ @Select("select top 1 rtrim(warn_dept) warn_dept,rtrim(doctor_code) doctor_code,rtrim(print_flag) print_flag from ${tableName} where patient_id = #{patientId} and times = #{times} and warn_dept is not null and doctor_code is not null and warn_dept<> '' and doctor_code<> '' ")
|
|
|
+ MzChargeDetail selectWarnDeptAndDoctor(@Param("patientId") String patientId, @Param("times") Integer times, @Param("tableName") String tableName);
|
|
|
|
|
|
/**
|
|
|
* 清洗老系统打印发票数据
|