| 
					
				 | 
			
			
				@@ -54,8 +54,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   receipt_sn=r.receipt_sn , " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   m.cheque_type, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   m.op_id from mz_deposit_file  m left join mz_receipt_serial r on m.serial_no =r.serial_no where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "   case '1' when #{caseType} then r.charge_date else  m.dcount_date end >=#{beginDate,jdbcType=TIMESTAMP}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and  case '1' when #{caseType} then r.charge_date else  m.dcount_date end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "   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 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   order by abs(r.receipt_sn),r.receipt_bill") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,8 +80,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   receipt_sn=r.receipt_sn , " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   m.cheque_type, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   m.op_id from mz_deposit_file_b  m left join mz_receipt_serial_b r on m.serial_no =r.serial_no where " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "   case '1' when #{caseType} then r.charge_date else  m.dcount_date end >=#{beginDate,jdbcType=TIMESTAMP}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and  case '1' when #{caseType} then r.charge_date else  m.dcount_date end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "   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 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   order by abs(r.receipt_sn),r.receipt_bill") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -123,13 +123,13 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         mz_receipt_serial.dcount_date " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM mz_receipt_serial " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where  operator_id = #{userIdCode} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "       dcount_date >=#{beginDate,jdbcType=TIMESTAMP} and dcount_date <= #{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "       CONVERT(varchar(100), dcount_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} and CONVERT(varchar(100), dcount_date, 20) <= #{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "union " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "SELECT distinct mzy_reqrec.op_id," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         mzy_reqrec.closing_date " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM mzy_reqrec " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where  op_id =#{userIdCode} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "       closing_date >= #{beginDate,jdbcType=TIMESTAMP} and closing_date <= #{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "       CONVERT(varchar(100), closing_date, 20) >= #{beginDate,jdbcType=TIMESTAMP} and CONVERT(varchar(100), closing_date, 20) <= #{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " order by dcount_date desc") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<DcountDateListVo> selectDcountDateList(@Param("userIdCode") String userIdCode, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -215,8 +215,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         paymode=mzy_reqrec.paymode " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM mzy_reqrec " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   WHERE case when '1'=#{caseType} then 0 else 1 end = dcount_no and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         case when '1'=#{caseType} then op_day else closing_date end >=#{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         case when '1'=#{caseType} then op_day else closing_date end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         case when '1'=#{caseType} then op_day else CONVERT(varchar(100), closing_date, 20) end >=#{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         case when '1'=#{caseType} then op_day else CONVERT(varchar(100), closing_date, 20) end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "group by receipt_bill," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         serial_no," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         patient_id," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -250,8 +250,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         paymode=mzy_reqrec_b.paymode " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM mzy_reqrec_b " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   WHERE case when '1'=#{caseType} then 0 else 1 end = dcount_no and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         case when '1'=#{caseType} then op_day else closing_date end >=#{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         case when '1'=#{caseType} then op_day else closing_date end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         case when '1'=#{caseType} then op_day else CONVERT(varchar(100), closing_date, 20) end >=#{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         case when '1'=#{caseType} then op_day else CONVERT(varchar(100), closing_date, 20) end <=#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " group by receipt_bill," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         serial_no," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         patient_id," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -397,10 +397,10 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and dcount_date=#{dcountDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='beginDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and dcount_date >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), dcount_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='endDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and dcount_date <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), dcount_date, 20) <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='dcountDate == null and beginDate == null and endDate == null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and dcount_no =0 ", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -453,10 +453,10 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and charge_dcount_date=#{dcountDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='beginDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and charge_dcount_date >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), charge_dcount_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='endDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and charge_dcount_date <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), charge_dcount_date, 20) <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='dcountDate == null and beginDate == null and endDate == null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and charge_dcount_no =0 ", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -577,10 +577,10 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and print_closing_date=#{dcountDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='beginDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and print_closing_date >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), print_closing_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='endDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and print_closing_date <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), print_closing_date, 20) <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='dcountDate == null and beginDate == null and endDate == null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and print_dcount_no =0 ", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -668,10 +668,10 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and closing_date=#{dcountDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='beginDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and closing_date >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), closing_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='endDate!=null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " and closing_date <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " and CONVERT(varchar(100), closing_date, 20) <=#{endDate,jdbcType=TIMESTAMP} ", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='dcountDate == null and beginDate == null and endDate == null'>", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and dcount_no =0 ", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -808,7 +808,7 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param endDate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Select("select operator_id from  mz_receipt_serial where dcount_date >=#{beginDate,jdbcType=TIMESTAMP} and dcount_date <=#{endDate,jdbcType=TIMESTAMP} group by operator_id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Select("select operator_id from  mz_receipt_serial where CONVERT(varchar(100), dcount_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} and CONVERT(varchar(100), dcount_date, 20) <=#{endDate,jdbcType=TIMESTAMP} group by operator_id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<String> selectAllOperatorFromReceipt(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -818,7 +818,7 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param endDate 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Select("select op_id from  mzy_reqrec where closing_date >=#{beginDate,jdbcType=TIMESTAMP} and closing_date <=#{endDate,jdbcType=TIMESTAMP} group by op_id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Select("select op_id from  mzy_reqrec where CONVERT(varchar(100), closing_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} and CONVERT(varchar(100), closing_date, 20) <=#{endDate,jdbcType=TIMESTAMP} group by op_id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<String> selectAllOperatorFromReqrec(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -840,8 +840,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "           total_amount=sum((case  when b.cancel_mark in ('0','1') then  b.req_fee + b.clinic_fee + b.oth_fee + isnull(b.bl_fee,0) + isnull(b.ck_fee,0) else 0 end)) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM ${tableName}   b " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "   WHERE " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         (case when 1=0 then b.op_day else b.closing_date end) <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "         (case when 1=0 then b.op_day else b.closing_date end) <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         (case when 1=0 then CONVERT(varchar(100), b.op_day, 20) else CONVERT(varchar(100), b.closing_date, 20) end) <![CDATA[>=]]> #{beginDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "         (case when 1=0 then CONVERT(varchar(100), b.op_day, 20) else CONVERT(varchar(100), b.closing_date, 20) end) <![CDATA[<=]]> #{endDate,jdbcType=TIMESTAMP}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='cashId!=null'>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and b.op_id =#{cashId}" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -873,8 +873,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "       total_amount=sum(case when pay_mark in ('0','1') then amount else 0 end) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " ${tableName} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            " where dcount_date <![CDATA[>=]]> #{beginDate} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "      dcount_date <![CDATA[<=]]> #{endDate}  and pay_mark <![CDATA[<>]]> 2 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            " where CONVERT(varchar(100),dcount_date, 20) <![CDATA[>=]]> #{beginDate} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "      CONVERT(varchar(100),dcount_date, 20) <![CDATA[<=]]> #{endDate}  and pay_mark <![CDATA[<>]]> 2 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='cashId!=null'>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and op_id =#{cashId} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "</when>" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -901,9 +901,9 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "    FROM ${tableName} a, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         (select distinct patient_id,times,receipt_no, serial_no,receipt_sn from ${tableName1} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "          where (case '1' when '0' then charge_date " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "                 else dcount_date end) >= #{beginDate,jdbcType=TIMESTAMP} and  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "                 else CONVERT(varchar(100), dcount_date, 20) end) >= #{beginDate,jdbcType=TIMESTAMP} and  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "                (case '1' when '0' then charge_date " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "                 else dcount_date end) <= #{endDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "                 else CONVERT(varchar(100), dcount_date, 20) end) <= #{endDate,jdbcType=TIMESTAMP} and " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "                (case '1' when '0' then isnull(dcount_no,0) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "                 else 1 end) = isnull(dcount_no,0) ) as b, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "         zd_charge_item c, " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1021,8 +1021,8 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and         case a.charge_bill_code " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  when 'BILL10' then 'BILL01' when 'BILL11' then 'BILL28' when 'BILL12' then 'BILL02' else a.charge_bill_code end *=d.code " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and         isnull(d.audit_code,e.code)=e.code) mzsr  where mzsr.je <![CDATA[<>]]> 0 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and  case '1' when #{caseType} then mzsr.charge_date else  mzsr.dcount_date end <![CDATA[>=]]>#{beginDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and  case '1' when #{caseType} then mzsr.charge_date else  mzsr.dcount_date end <![CDATA[<]]>#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "  and  case '1' when #{caseType} then mzsr.charge_date else  CONVERT(varchar(100), mzsr.dcount_date, 20) end <![CDATA[>=]]>#{beginDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "  and  case '1' when #{caseType} then mzsr.charge_date else  CONVERT(varchar(100), mzsr.dcount_date, 20) end <![CDATA[<]]>#{endDate,jdbcType=TIMESTAMP} " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<when test='patientIds!=null'>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             " and mzsr.patient_id in" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "<foreach item='item' index='index' collection='patientIds' open='(' separator=',' close=')'>" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1056,7 +1056,7 @@ public interface ChargeFeeVoMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param thmzmxsrParamsVo 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Select("select patient_id,SUM(total_charge) total_charge from mz_receipt_serial where charge_dcount_date >=#{beginDate,jdbcType=TIMESTAMP} and  charge_dcount_date <#{endDate,jdbcType=TIMESTAMP}  GROUP BY patient_id order by patient_id desc ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Select("select patient_id,SUM(total_charge) total_charge from mz_receipt_serial where CONVERT(varchar(100), charge_dcount_date, 20) >=#{beginDate,jdbcType=TIMESTAMP} and  CONVERT(varchar(100), charge_dcount_date, 20) <#{endDate,jdbcType=TIMESTAMP}  GROUP BY patient_id order by patient_id desc ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<Map<String,Object>> selectSumAmount(ThmzmxsrParamsVo thmzmxsrParamsVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |