| 
					
				 | 
			
			
				@@ -1195,37 +1195,21 @@ public interface MzChargeDetailMapper { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param: times 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      **/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Select(" select type='诊疗服务',c.name name,c.office_pos address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "from mz_charge_detail a,zd_charge_item b,zd_unit_code c  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "where patient_id=#{patientId} and times=#{times} and req_no=0  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and a.charge_item_code=b.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and a.exec_dept=c.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and c.office_pos is not null  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and a.exec_dept!='2060500'  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "group by c.name,c.office_pos  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "union all  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "select type='检查',c.name name,d.office_pos address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Select("select (select name from zd_unit_code where code=a.exec_dept)execDept,b.name name,b.exec_address address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "from mz_yj_req a,jc_zd_item b,jc_zd_class c,zd_unit_code d  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where patient_id=#{patientId} and times=#{times}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and a.order_code=b.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and b.class=c.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and a.exec_dept=d.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and d.office_pos is not null  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "group by c.name,a.exec_dept,d.office_pos  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "union all  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "select type='药品',c.group_name name,c.office_pos address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "from mz_charge_detail a,yp_zd_group_name c  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "where patient_id=#{patientId} and times=#{times}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "  and a.group_no=c.group_no  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "group by c.group_name,c.office_pos  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "group by b.name,a.exec_dept,b.exec_address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "union all  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "select type='检验化验',d.name name,(select office_pos from zd_unit_code where code=a.exec_dept) address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "select (select name from zd_unit_code where code=a.exec_dept)execDept,b.name name,b.exec_address address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "from mz_yj_req a,jy_zd_item b,zd_unit_code d  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "where patient_id=#{patientId} and times=#{times}  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and a.order_code=b.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             "  and a.exec_dept=d.code  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "group by a.exec_dept,d.name  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            "order by type,address,name ") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "group by a.exec_dept,b.name,b.exec_address  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            "order by execDept,address,name") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     List<Map<String, Object>> getChargeDetailForGuideCard(@Param("patientId") String patientId, @Param("times") Integer times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @description: 查询优惠后 和 未优惠的金额 
			 |