|
@@ -375,16 +375,16 @@ public interface ChargeFeeVoMapper {
|
|
|
"sum ( amount) zjss," +
|
|
|
"sum ( case when pay_mark ='0' then amount else 0 end ) zjsk," +
|
|
|
"sum ( case when pay_mark <![CDATA[<>]]>'0' then amount else 0 end ) zjtk," +
|
|
|
- "sum ( case when (cheque_type='W' or (cheque_type='E' and op_id ='99999')) then amount else 0 end ) wxzzss," +
|
|
|
- "sum ( case when (cheque_type='W' or (cheque_type='E' and op_id ='99999')) and pay_mark ='0' then amount else 0 end ) wxzzsk," +
|
|
|
- "sum ( case when (cheque_type='M' or (cheque_type='F' and op_id ='99999')) then amount else 0 end ) zfbzzss," +
|
|
|
- "sum ( case when (cheque_type='M' or (cheque_type='F' and op_id ='99999')) and pay_mark ='0' then amount else 0 end ) zfbzzsk," +
|
|
|
- "count ( distinct case when (cheque_type='W' or (cheque_type='E' and op_id ='99999')) and pay_mark ='0' then receipt_sn else null end ) wxzzbs," +
|
|
|
- " count ( distinct case when (cheque_type='W' or (cheque_type='E' and op_id ='99999')) and pay_mark > '0' then receipt_sn else null end ) wxzztfbs," +
|
|
|
- "sum ( case when (cheque_type='W' or (cheque_type='E' and op_id ='99999')) and pay_mark ='1' then amount else 0 end ) wxzztf," +
|
|
|
- "sum ( case when (cheque_type='M' or (cheque_type='F' and op_id ='99999')) and pay_mark ='1' then amount else 0 end ) zfbzztf," +
|
|
|
- "count ( distinct case when (cheque_type='M' or (cheque_type='F' and op_id ='99999')) and pay_mark ='0' then receipt_sn else null end ) zfbzzbs," +
|
|
|
- " count ( distinct case when (cheque_type='M' or (cheque_type='F' and op_id ='99999')) and pay_mark > '0' then receipt_sn else null end ) zfbzztfbs," +
|
|
|
+ "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') then amount else 0 end ) wxzzss," +
|
|
|
+ "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='0' then amount else 0 end ) wxzzsk," +
|
|
|
+ "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') then amount else 0 end ) zfbzzss," +
|
|
|
+ "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0' then amount else 0 end ) zfbzzsk," +
|
|
|
+ "count ( distinct case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) wxzzbs," +
|
|
|
+ " count ( distinct case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark > '0' then receipt_sn else null end ) wxzztfbs," +
|
|
|
+ "sum ( case when ((cheque_type='W' or cheque_type='E') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) wxzztf," +
|
|
|
+ "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) zfbzztf," +
|
|
|
+ "count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) zfbzzbs," +
|
|
|
+ " count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark > '0' then receipt_sn else null end ) zfbzztfbs," +
|
|
|
"count ( distinct case when cheque_type ='1' and pay_mark ='0' then receipt_sn else null end ) xjbs," +
|
|
|
" count ( distinct case when ( cheque_type ='5' or cheque_type ='3' ) and pay_mark ='0' then receipt_sn else null end ) yhsbs," +
|
|
|
" count ( distinct case when cheque_type ='6' and pay_mark ='0' then receipt_sn else null end ) sybbs," +
|
|
@@ -595,60 +595,60 @@ public interface ChargeFeeVoMapper {
|
|
|
@Select({
|
|
|
"<script>",
|
|
|
"SELECT " +
|
|
|
- " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjthhs," +
|
|
|
- " ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjth, " +
|
|
|
- " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end ) xjsshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) + count ( case when times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjsk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjthhs," +
|
|
|
+ " ABS( sum ( case when times <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjsshs," +
|
|
|
" sum ( case when paymode ='1' or paymode is null then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjss, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='3' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))yhksk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) yhkth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='3' then 1 else null end ) yhksshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='3' then 1 else null end ) + count ( case when times <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))yhksk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkthhs," +
|
|
|
+ " ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) yhkth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='3' then 1 else null end ) yhksshs," +
|
|
|
" sum ( case when paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhkss," +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='6' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='6' then 1 else null end )ybkhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybksk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='6' then 1 else null end ) ybkthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybkth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='6' then 1 else null end ) ybksshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='6' then 1 else null end ) + count ( case when times <![CDATA[<]]> 0 and paymode ='6' then 1 else null end )ybkhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybksk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and paymode ='6' then 1 else null end ) ybkthhs," +
|
|
|
+ " ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybkth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='6' then 1 else null end ) ybksshs," +
|
|
|
" sum ( case when paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybkss," +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='F' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='F' then 1 else null end )zfbhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='F' then 1 else null end ) zfbthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='F' then 1 else null end ) zfbsshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='F' then 1 else null end ) + count ( case when times <![CDATA[<]]> 0 and paymode ='F' then 1 else null end )zfbhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbsk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and paymode ='F' then 1 else null end ) zfbthhs," +
|
|
|
+ " ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='F' then 1 else null end ) zfbsshs," +
|
|
|
" sum ( case when paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbss," +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='E' then 1 else null end ) +count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='E' then 1 else null end ) wxsshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='E' then 1 else null end ) +count ( case when times <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxsk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxthhs," +
|
|
|
+ " ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='E' then 1 else null end ) wxsshs," +
|
|
|
" sum ( case when paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxss," +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='Y' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='Y' then 1 else null end ) byjzsshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='Y' then 1 else null end ) + count ( case when times <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzsk, " +
|
|
|
+ " count ( case when times <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzthhs," +
|
|
|
+ " ABS(sum ( case when times <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='Y' then 1 else null end ) byjzsshs," +
|
|
|
" sum ( case when paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzss," +
|
|
|
- " count ( case when cancel_mark ='0' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then 1 else null end ) +count ( case when cancel_mark ='1' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then 1 else null end ) hjhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when cancel_mark ='1' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))hjsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then 1 else null end ) hjthhs," +
|
|
|
- " ABS(sum ( case when cancel_mark ='1' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) hjth, " +
|
|
|
- " count ( case when cancel_mark ='0' and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then 1 else null end ) hjsshs," +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then 1 else null end ) +count ( case when (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then 1 else null end ) hjhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))hjsk, " +
|
|
|
+ " count ( case when (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then 1 else null end ) hjthhs," +
|
|
|
+ " ABS(sum ( case when (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) and times <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) hjth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and (paymode <![CDATA[<]]> 'hospital_z' or paymode is null) then 1 else null end ) hjsshs," +
|
|
|
" sum ( case when paymode <![CDATA[<]]> 'hospital_z' or paymode is null then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) hjss," +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='WX' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzthhs," +
|
|
|
- " ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='WX' then 1 else null end ) wxzzsshs," +
|
|
|
- " sum ( case when paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxzzss, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='ZFB' then 1 else null end ) + count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzhs," +
|
|
|
- " sum ( case when cancel_mark ='0' and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzsk, " +
|
|
|
- " count ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzthhs," +
|
|
|
- " ABS( sum ( case when cancel_mark ='1' and times <![CDATA[<]]> 0 and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzth, " +
|
|
|
- " count ( case when cancel_mark ='0' and paymode ='ZFB' then 1 else null end ) zfbzzsshs," +
|
|
|
- " sum ( case when paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbzzss, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='WX' then 1 else null end ) + count ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzsk, " +
|
|
|
+ " count ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='WX' then 1 else null end ) wxzzthhs," +
|
|
|
+ " ABS( sum ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxzzth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='WX' then 1 else null end ) wxzzsshs," +
|
|
|
+ " sum ( case when op_id='99999' and paymode ='WX' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxzzss, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='ZFB' then 1 else null end ) + count ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzhs," +
|
|
|
+ " sum ( case when times <![CDATA[>]]> 0 and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzsk, " +
|
|
|
+ " count ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzthhs," +
|
|
|
+ " ABS( sum ( case when op_id='99999' and times <![CDATA[<]]> 0 and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbzzth, " +
|
|
|
+ " count ( case when times <![CDATA[>]]> 0 and paymode ='ZFB' then 1 else null end ) zfbzzsshs," +
|
|
|
+ " sum ( case when op_id='99999' and paymode ='ZFB' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbzzss, " +
|
|
|
" sum ( case when isnull ( paymode , '1' ) = 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjejz," +
|
|
|
" sum ( case when isnull ( paymode , '1' ) <![CDATA[<>]]> 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjebhjz," +
|
|
|
" sum ( clinic_fee ) zcsr," +
|