|
|
@@ -22,17 +22,17 @@ public interface ChargeFeeVoMapper {
|
|
|
*/
|
|
|
|
|
|
@Select(" select " +
|
|
|
- " patient_id=max(m.patient_id), " +
|
|
|
- " serial_no =max(m.serial_no), " +
|
|
|
- " total_charge=isnull(max(m.amount),0), " +
|
|
|
- " r.pay_mark," +
|
|
|
- " charge_date=max(r.charge_date)," +
|
|
|
+ " patient_id=m.patient_id, " +
|
|
|
+ " serial_no =m.serial_no, " +
|
|
|
+ " total_charge=isnull(m.amount,0), " +
|
|
|
+ " m.pay_mark," +
|
|
|
+ " charge_date=m.charge_date," +
|
|
|
" r.receipt_bill," +
|
|
|
" receipt_sn=r.receipt_sn , " +
|
|
|
" m.cheque_type, " +
|
|
|
- " m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no where r.pay_id=#{userIdCode} and" +
|
|
|
+ " m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where r.pay_id=#{userIdCode} and" +
|
|
|
" m.dcount_no=0 and m.cheque_type <>'Z' " +
|
|
|
- " group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id,m.contract_id " +
|
|
|
+ " group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
|
|
|
" order by abs(r.receipt_sn),r.receipt_bill")
|
|
|
List<ChargeFeeVo> selectChargeFeeVoUnAccount(@Param("userIdCode") String userIdCode);
|
|
|
|
|
|
@@ -45,19 +45,19 @@ public interface ChargeFeeVoMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select(" select " +
|
|
|
- " patient_id=max(m.patient_id), " +
|
|
|
- " serial_no =max(m.serial_no), " +
|
|
|
- " total_charge=isnull(max(m.amount),0), " +
|
|
|
- " r.pay_mark," +
|
|
|
- " charge_date=max(r.charge_date)," +
|
|
|
+ " patient_id=m.patient_id, " +
|
|
|
+ " serial_no =m.serial_no, " +
|
|
|
+ " total_charge=isnull(m.amount,0), " +
|
|
|
+ " m.pay_mark," +
|
|
|
+ " charge_date=m.charge_date," +
|
|
|
" r.receipt_bill," +
|
|
|
" receipt_sn=r.receipt_sn , " +
|
|
|
" m.cheque_type, " +
|
|
|
- " m.op_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no where " +
|
|
|
+ " m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where " +
|
|
|
" case '1' when #{caseType} then r.charge_date else CONVERT(varchar(100), m.dcount_date, 20) end >=#{beginDate,jdbcType=TIMESTAMP} " +
|
|
|
" and case '1' when #{caseType} then r.charge_date else CONVERT(varchar(100), m.dcount_date, 20) end <=#{endDate,jdbcType=TIMESTAMP} " +
|
|
|
" and m.pay_mark <> 2 and m.cheque_type <>'Z' " +
|
|
|
- " group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id " +
|
|
|
+ " group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
|
|
|
" order by abs(r.receipt_sn),r.receipt_bill")
|
|
|
List<ChargeFeeVo> selectChargeFeeVoCollect(@Param("caseType") String caseType, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
|
|
|
|
|
|
@@ -71,18 +71,18 @@ public interface ChargeFeeVoMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select(" select " +
|
|
|
- " patient_id=max(m.patient_id), " +
|
|
|
- " serial_no =max(m.serial_no), " +
|
|
|
- " total_charge=isnull(max(m.amount),0), " +
|
|
|
- " r.pay_mark," +
|
|
|
- " charge_date=max(r.charge_date)," +
|
|
|
+ " patient_id=m.patient_id, " +
|
|
|
+ " serial_no =m.serial_no, " +
|
|
|
+ " total_charge=isnull(m.amount,0), " +
|
|
|
+ " m.pay_mark," +
|
|
|
+ " charge_date=m.charge_date," +
|
|
|
" r.receipt_bill," +
|
|
|
" receipt_sn=r.receipt_sn , " +
|
|
|
" m.cheque_type, " +
|
|
|
- " m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no where " +
|
|
|
+ " m.op_id,m.contract_id from mz_deposit_file m WITH(NOLOCK) left join mz_receipt_serial r WITH(NOLOCK) on m.serial_no =r.serial_no and m.cheque_type=r.cheque_type where " +
|
|
|
" case '1' when #{caseType} then r.charge_date else m.dcount_date end =#{dcountDate,jdbcType=TIMESTAMP} " +
|
|
|
" and r.pay_mark <> 2 and m.cheque_type <>'Z' " +
|
|
|
- " group by r.receipt_sn,r.receipt_bill,m.cheque_type,r.pay_mark,m.op_id,m.contract_id " +
|
|
|
+ " group by r.receipt_sn,r.receipt_bill,m.cheque_type,m.pay_mark,m.op_id,m.contract_id,m.charge_date,m.patient_id,m.serial_no,isnull(( m.amount ), 0 ) " +
|
|
|
" order by abs(r.receipt_sn),r.receipt_bill")
|
|
|
List<ChargeFeeVo> selectChargeFeeVoReprint(@Param("userIdCode") String userIdCode, @Param("caseType") String caseType, @Param("dcountDate") Date dcountDate);
|
|
|
|