|  | @ -308,20 +308,15 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |                     "   OR t1.doctor_health = ? " +
 | 
	
		
			
				|  |  |                     "  ) " +
 | 
	
		
			
				|  |  |                     "  AND t1. STATUS > 0 " +
 | 
	
		
			
				|  |  |                     "  AND t1.admin_team_code = ?" +
 | 
	
		
			
				|  |  |                     " ) f " +
 | 
	
		
			
				|  |  |                     "WHERE " +
 | 
	
		
			
				|  |  |                     " f. CODE = s.sign_code " +
 | 
	
		
			
				|  |  |                     " AND s.server_type ='"+labelCode+"' ";
 | 
	
		
			
				|  |  |                     "  AND t1.admin_team_code = ?" ;
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(diseaseCondition)){
 | 
	
		
			
				|  |  |                 sql = sql + " AND p.diseaseCondition = ?";
 | 
	
		
			
				|  |  |                 args = new Object[]{doctor, doctor, teamCode,diseaseCondition};
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 args = new Object[]{doctor, doctor, teamCode};
 | 
	
		
			
				|  |  |                 sql = sql + " AND p.disease_condition ="+diseaseCondition;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             sql = sql + " ORDER BY " +
 | 
	
		
			
				|  |  |                     " f.ptOpenid DESC";
 | 
	
		
			
				|  |  |             sql = sql +" ) f " +
 | 
	
		
			
				|  |  |                     "WHERE " +
 | 
	
		
			
				|  |  |                     " f. CODE = s.sign_code " +
 | 
	
		
			
				|  |  |                     " AND s.server_type ='"+labelCode+"'  ORDER BY f.ptOpenid DESC";
 | 
	
		
			
				|  |  |             args = new Object[]{doctor, doctor, teamCode};
 | 
	
		
			
				|  |  |         } else {
 | 
	
		
			
				|  |  |             if (labelCode.equals("0")) {
 | 
	
		
			
				|  |  |                 sql = "SELECT " +
 | 
	
	
		
			
				|  | @ -361,13 +356,14 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |         signList = jdbcTemplate.queryForList(sql, args);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //查询患者设备绑定情况
 | 
	
		
			
				|  |  |         String _pdsql = "select user,sum(category_code) deviceType FROM wlyy_patient_device GROUP BY user";
 | 
	
		
			
				|  |  |         String _pdsql = "select user,floor(sum(category_code)) deviceType FROM wlyy_patient_device GROUP BY user";
 | 
	
		
			
				|  |  |         List<Map<String,Object>> patientCodeDeviceTypes =  jdbcTemplate.queryForList(_pdsql);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(!patientCodeDeviceTypes.isEmpty()){
 | 
	
		
			
				|  |  |             for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
 | 
	
		
			
				|  |  |                 String user = String.valueOf(patientCodeDeviceType.get("user"));
 | 
	
		
			
				|  |  |                 String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
 | 
	
		
			
				|  |  |                 System.out.println(user+sum);
 | 
	
		
			
				|  |  |                 patientDeviceTypeMap.put(user,sum);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -3642,7 +3638,7 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |                     "  AND t1. STATUS > 0 " +
 | 
	
		
			
				|  |  |                     "  AND t1.admin_team_code = ?";
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(diseaseCondition)){
 | 
	
		
			
				|  |  |                 sql = sql + " AND p.diseaseCondition = ?";
 | 
	
		
			
				|  |  |                 sql = sql + " AND p.disease_condition = ?";
 | 
	
		
			
				|  |  |                 args = new Object[]{teamCode,diseaseCondition};
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 args = new Object[]{teamCode};
 | 
	
	
		
			
				|  | @ -3710,6 +3706,7 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |             for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
 | 
	
		
			
				|  |  |                 String user = String.valueOf(patientCodeDeviceType.get("user"));
 | 
	
		
			
				|  |  |                 String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
 | 
	
		
			
				|  |  |                 System.out.println(user+sum);
 | 
	
		
			
				|  |  |                 patientDeviceTypeMap.put(user,sum);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -4149,6 +4146,7 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |             for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
 | 
	
		
			
				|  |  |                 String user = String.valueOf(patientCodeDeviceType.get("user"));
 | 
	
		
			
				|  |  |                 String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
 | 
	
		
			
				|  |  |                 System.out.println(user+sum);
 | 
	
		
			
				|  |  |                 patientDeviceTypeMap.put(user,sum);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -4360,6 +4358,7 @@ public class SignPatientLabelInfoService extends BaseService {
 | 
	
		
			
				|  |  |             for (Map<String,Object> patientCodeDeviceType : patientCodeDeviceTypes) {
 | 
	
		
			
				|  |  |                 String user = String.valueOf(patientCodeDeviceType.get("user"));
 | 
	
		
			
				|  |  |                 String sum = String.valueOf(patientCodeDeviceType.get("deviceType"));
 | 
	
		
			
				|  |  |                 System.out.println(user+sum);
 | 
	
		
			
				|  |  |                 patientDeviceTypeMap.put(user,sum);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 |