|  | @ -1,6 +1,5 @@
 | 
	
		
			
				|  |  | package com.yihu.wlyy.service.app.sign;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.sun.corba.se.spi.activation.Server;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.address.Country;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.address.Street;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.address.Town;
 | 
	
	
		
			
				|  | @ -33,7 +32,6 @@ import com.yihu.wlyy.service.common.account.PatientService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.system.SystemDictService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.task.PushMsgTask;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.HttpUtil;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
	
		
			
				|  | @ -47,9 +45,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Component;
 | 
	
		
			
				|  |  | import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.sql.*;
 | 
	
		
			
				|  |  | import java.util.*;
 | 
	
		
			
				|  |  | import java.util.Date;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | /**
 | 
	
		
			
				|  |  |  * 网络签约业务处理类
 | 
	
	
		
			
				|  | @ -2489,4 +2485,33 @@ public class SignWebService extends BaseService {
 | 
	
		
			
				|  |  |         String sql = "select w.openid from wlyy_sign_family w ,dm_hospital d where w.hospital=d.`code` and d.town='" + town + "' and w.openid is not null and w.openid !=''";
 | 
	
		
			
				|  |  |         return jdbcTemplate.queryForList(sql, String.class);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取居民服务类型
 | 
	
		
			
				|  |  |      * @param patient
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject getPatientFamilyServer(String patient){
 | 
	
		
			
				|  |  |         JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |         SignFamily signFamily = signFamilyDao.findByPatient(patient);
 | 
	
		
			
				|  |  |         if(signFamily==null){
 | 
	
		
			
				|  |  |             json.put("msg","该居民未签约");
 | 
	
		
			
				|  |  |             return json;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         List<SignFamilyServer> list = signFamilyServerDao.findBySignCodeAndType(signFamily.getCode());
 | 
	
		
			
				|  |  |         JSONArray ja = new JSONArray();
 | 
	
		
			
				|  |  |         if(list!=null&&list.size()>0){
 | 
	
		
			
				|  |  |             json.put("slowDiseasePatient",1);
 | 
	
		
			
				|  |  |             for (SignFamilyServer server:list){
 | 
	
		
			
				|  |  |                 JSONObject js = new JSONObject();
 | 
	
		
			
				|  |  |                 js.put("name",server.getServerTypeName());
 | 
	
		
			
				|  |  |                 js.put("code",server.getServerType());
 | 
	
		
			
				|  |  |                 ja.put(js);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             json.put("slowDiseasePatient",0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         json.put("signFamilyServer",ja);
 | 
	
		
			
				|  |  |         return json;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |