| 
					
				 | 
			
			
				@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.json.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.json.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.text.SimpleDateFormat; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Calendar; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -31,6 +32,7 @@ import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * 居民近365天无体检记录时,系统自动发送一条体检提醒信息。使用“代办事项通知”模板 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * 代理机制还存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Service 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class PatientPhysicalExaminationService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private PushMsgTask pushMsgTask; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -70,9 +72,11 @@ public class PatientPhysicalExaminationService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (SignFamily signFamilie : signFamilies) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String patientCode = signFamilie.getPatient(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Patient patient = patientDao.findByCode(patientCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (patient == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String url = "huanzhe/html/jiankangtijian.html?openid=" + patient.getOpenid() + "&toUser=" + patient.getCode() + "&toName=" + patient.getName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                json.put("url", url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String mobile = patient.getMobile(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNotBlank(patient.getOpenid())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    json.put("first", first); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -102,7 +106,7 @@ public class PatientPhysicalExaminationService extends BaseService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (flag){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //发送成功保存发送记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    PhysicalExaminationRecords records = new PhysicalExaminationRecords(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    records.setCode(getCode()); 
			 |