|  | @ -15,7 +15,6 @@ import com.yihu.wlyy.repository.patient.PrenatalInspectorPlanDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.patient.PrenatalInspectorRecordDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.patient.SignFamilyDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.BaseService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.app.sign.FamilyContractService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.third.jw.JwMaternalChildService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.task.PushMsgTask;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.DateUtil;
 | 
	
	
		
			
				|  | @ -79,6 +78,35 @@ public class PrenatalInspectorPreCardService extends BaseService {
 | 
	
		
			
				|  |  |                 String name = patient.getName();
 | 
	
		
			
				|  |  |                 String patientCode = patient.getCode();
 | 
	
		
			
				|  |  |                 plan.getId();
 | 
	
		
			
				|  |  |                 boolean flag = false;
 | 
	
		
			
				|  |  |                 if(StringUtils.isNotBlank(plan.getInspectionCode())){
 | 
	
		
			
				|  |  |                     SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
 | 
	
		
			
				|  |  |                     String hospital = null;
 | 
	
		
			
				|  |  |                     if (signFamily != null) {
 | 
	
		
			
				|  |  |                         hospital = signFamily.getHospital();
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     String response = jwMaternalChildService.getEhrMaternalFirstExamRecord(patient.getIdcard(),hospital);
 | 
	
		
			
				|  |  |                     com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |                     com.alibaba.fastjson.JSONArray data = null;
 | 
	
		
			
				|  |  |                     if (json.getInteger("status") == 200) {
 | 
	
		
			
				|  |  |                         data = json.getJSONObject("data").getJSONArray("DATA");
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     if (data != null && data.size() > 0) {//有建卡信息
 | 
	
		
			
				|  |  |                         for (int i = 0; i < data.size(); i++) {
 | 
	
		
			
				|  |  |                             com.alibaba.fastjson.JSONObject pregnancy = data.getJSONObject(i);
 | 
	
		
			
				|  |  |                             String PREGNANCY_NO = pregnancy.getString("PREGNANCY_NO");//智业产检号
 | 
	
		
			
				|  |  |                             String PREGNANCY_STATUS = pregnancy.getString("PREGNANCY_STATUS");//PREGNANCY_STATUS /*妊娠是否结束,0未结束,1结束*/
 | 
	
		
			
				|  |  |                             if (plan.getInspectionCode().equals(PREGNANCY_NO)&&"1".equals(PREGNANCY_STATUS)) {
 | 
	
		
			
				|  |  |                                 flag = true;
 | 
	
		
			
				|  |  |                             }
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if(flag){
 | 
	
		
			
				|  |  |                     //已经结束妊娠的不提醒
 | 
	
		
			
				|  |  |                     continue;
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 if (StringUtils.isNotBlank(openId)) {
 | 
	
		
			
				|  |  |                     Long day = DateUtil.getDays(plan.getInspectionTime(), DateUtil.getNowDateShort());
 | 
	
		
			
				|  |  |                     JSONObject json = new JSONObject();
 |