|  | @ -97,7 +97,7 @@ public class SignFamilyServiceService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         jo.put("status", 1);//执行成功
 | 
	
		
			
				|  |  |         jo.put("all", patients.size());//未成功的患者
 | 
	
		
			
				|  |  |         jo.put("success", patients.size()-errorPatient.size());//成功的患者
 | 
	
		
			
				|  |  |         jo.put("success", patients.size() - errorPatient.size());//成功的患者
 | 
	
		
			
				|  |  |         jo.put("errorPatients", errorPatient);//未成功的患者
 | 
	
		
			
				|  |  |         return jo;
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -177,6 +177,31 @@ public class SignFamilyServiceService {
 | 
	
		
			
				|  |  |         return jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper(ServiceItem.class));
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询患者的服务
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      * @param patientCode
 | 
	
		
			
				|  |  |      * @param serviceCode
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public Service getPatientService(String patientCode, String serviceCode) {
 | 
	
		
			
				|  |  |         StringBuffer sql = new StringBuffer("SELECT " +
 | 
	
		
			
				|  |  |                 "  s.* " +
 | 
	
		
			
				|  |  |                 "FROM " +
 | 
	
		
			
				|  |  |                 "  wlyy_sign_family_service fs, " +
 | 
	
		
			
				|  |  |                 "  wlyy_service s " +
 | 
	
		
			
				|  |  |                 "WHERE " +
 | 
	
		
			
				|  |  |                 "  s.del = 1 " +
 | 
	
		
			
				|  |  |                 "AND fs.service_code = s.`code` " +
 | 
	
		
			
				|  |  |                 "AND fs.patient = '" + patientCode + "' ");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if (!StringUtils.isEmpty(serviceCode)) {
 | 
	
		
			
				|  |  |             sql.append(" and fs.service_code= '" + serviceCode + "' ");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<Service> ss = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper(Service.class));
 | 
	
		
			
				|  |  |         return ss.get(0);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private SignFamily getSignFamily(String patient) {
 | 
	
		
			
				|  |  |         String sql = "select count(s.id) num,s.code from wlyy_sign_family s where s.patient='" + patient + "' and s.`status`>0 and s.expenses_status=1  ";
 | 
	
	
		
			
				|  | @ -203,7 +228,7 @@ public class SignFamilyServiceService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         jo.put("status", 1);//执行成功
 | 
	
		
			
				|  |  |         jo.put("all", patients.size());//未成功的患者
 | 
	
		
			
				|  |  |         jo.put("success", patients.size()-errorPatient.size());//成功的患者
 | 
	
		
			
				|  |  |         jo.put("success", patients.size() - errorPatient.size());//成功的患者
 | 
	
		
			
				|  |  |         jo.put("errorPatients", errorPatient);//未成功的患者
 | 
	
		
			
				|  |  |         return jo;
 | 
	
		
			
				|  |  |     }
 | 
	
	
		
			
				|  | @ -317,4 +342,6 @@ public class SignFamilyServiceService {
 | 
	
		
			
				|  |  |         List<String> patients = jdbcTemplate.queryForList(sql, String.class);
 | 
	
		
			
				|  |  |         return patientsDeleteService(patients, serviceCode);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |