| 
					
				 | 
			
			
				@ -710,11 +710,12 @@ public class SignPatientLabelInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Calendar today = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    Calendar startDate = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sql = "select count(DISTINCT patient) count" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    sql = "select count(DISTINCT t1.patient) count" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            " from " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "     wlyy_sign_family " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            " where (doctor = ? or doctor_health = ?) and status > 0 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            (teamCode > 0 ? " and admin_team_code = ? " : ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "     wlyy_sign_family t1," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            "     wlyy_patient t3 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            " where t1.patient = t3.code AND (t1.doctor = ? or t1.doctor_health = ?) and t1.status > 0 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            (teamCode > 0 ? " and t1.admin_team_code = ? " : ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (label.getLabelCode().equals("1")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        int week = today.get(Calendar.DAY_OF_WEEK) - 2; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -745,12 +746,14 @@ public class SignPatientLabelInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        sql = " SELECT " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     count(DISTINCT t1.patient) count" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_sign_family t1 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_sign_family t1  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " left join " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "    (select l.patient,l.label,l.label_type,l.label_name from wlyy_sign_family f left join wlyy_sign_patient_label_info l on f.patient = l.patient where (f.doctor = '" + doctor + "' or f.doctor_health = '" + doctor + "') and f.status > 0 and l.label_type = ? and l.status = 1) t2 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " on t1.patient = t2.patient " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     ,wlyy_patient t3 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " WHERE" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     t2.patient is null " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t1.patient = t3.code "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND (t1.doctor = ? or t1.doctor_health = ?)" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t1.status > 0 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                (teamCode > 0 ? "    AND t1.admin_team_code = ? " : ""); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -765,9 +768,11 @@ public class SignPatientLabelInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     count(DISTINCT t1.patient) count" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_sign_family t1, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_sign_patient_label_info t2 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_sign_patient_label_info t2, " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     wlyy_patient t3 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                " WHERE" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     t1.patient = t2.patient " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t1.patient = t3.code "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t2.label = ? " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t2.label_type = ? " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                "     AND t2.status = 1 " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -792,7 +797,7 @@ public class SignPatientLabelInfoService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("amount", amount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                int focusAmount = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += labelType.equals("5") ? " AND LENGTH(TRIM(IFNULL(openid,''))) > 0 " : " AND LENGTH(TRIM(IFNULL(t1.openid,''))) > 0 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sql += labelType.equals("5") ? " AND LENGTH(TRIM(IFNULL(t3.openid,''))) > 0 " : " AND LENGTH(TRIM(IFNULL(t3.openid,''))) > 0 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<Map<String, Object>> focusCount = jdbcTemplate.queryForList(sql, args); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (focusCount != null && focusCount.size() > 0 && focusCount.get(0).containsKey("count")) { 
			 |