|  | @ -127,12 +127,12 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |      * @param patientName
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONObject createConsultTalkGroup(String doctor, String doctorName, String hospitalCode, String hospitalName,
 | 
	
		
			
				|  |  |                                        String patient, String patientName, String consult) {
 | 
	
		
			
				|  |  |                                              String patient, String patientName, String consult) {
 | 
	
		
			
				|  |  |         //讨论组建立
 | 
	
		
			
				|  |  |         WlyyTalkGroup talkGroup = new WlyyTalkGroup();
 | 
	
		
			
				|  |  |         SimpleDateFormat dateFormat = new SimpleDateFormat("yyy-MM-dd");
 | 
	
		
			
				|  |  |         String name = patientName + "—咨询(" + dateFormat.format(new Date()) + ")";
 | 
	
		
			
				|  |  |         String groupCode=getCode();
 | 
	
		
			
				|  |  |         String groupCode = getCode();
 | 
	
		
			
				|  |  |         talkGroup.setCode(groupCode);
 | 
	
		
			
				|  |  |         talkGroup.setName(name);
 | 
	
		
			
				|  |  |         talkGroup.setType(1);
 | 
	
	
		
			
				|  | @ -173,8 +173,8 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |         saveTalkGroup(talkGroup, members);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         JSONObject result = new JSONObject(talkGroup);
 | 
	
		
			
				|  |  |         result.put("members",result);
 | 
	
		
			
				|  |  |         result.put("groupCode",groupCode);
 | 
	
		
			
				|  |  |         result.put("members", result);
 | 
	
		
			
				|  |  |         result.put("groupCode", groupCode);
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -188,17 +188,17 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |         JSONObject json = new JSONObject();
 | 
	
		
			
				|  |  |         List<WlyyTalkGroup> groups = discussionGroupDao.findByCodeAndType(consult, 2);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(groups != null && groups.size() > 0){
 | 
	
		
			
				|  |  |         if (groups != null && groups.size() > 0) {
 | 
	
		
			
				|  |  |             json = new JSONObject(groups.get(0));
 | 
	
		
			
				|  |  |             List<WlyyTalkGroupMember> members = discussionGroupMemberDao.findByGroupCode(groups.get(0).getCode());
 | 
	
		
			
				|  |  |             if(members != null){
 | 
	
		
			
				|  |  |             if (members != null) {
 | 
	
		
			
				|  |  |                 JSONArray mArray = new JSONArray();
 | 
	
		
			
				|  |  |                 for(WlyyTalkGroupMember member : members){
 | 
	
		
			
				|  |  |                 for (WlyyTalkGroupMember member : members) {
 | 
	
		
			
				|  |  |                     mArray.put(new JSONObject(member));
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 json.put("members",mArray);
 | 
	
		
			
				|  |  |                 json.put("members", mArray);
 | 
	
		
			
				|  |  |             } else {
 | 
	
		
			
				|  |  |                 json.put("members",new JSONArray());
 | 
	
		
			
				|  |  |                 json.put("members", new JSONArray());
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             return json;
 | 
	
	
		
			
				|  | @ -229,7 +229,7 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |         List<Doctor> doctors = jdbcTemplate.query(sql, new Object[]{doctor, doctor},
 | 
	
		
			
				|  |  |                 new BeanPropertyRowMapper(Doctor.class));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         for(Doctor doc : doctors){
 | 
	
		
			
				|  |  |         for (Doctor doc : doctors) {
 | 
	
		
			
				|  |  |             JSONObject json = new JSONObject(doc);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             if (json.has("password")) {
 | 
	
	
		
			
				|  | @ -369,6 +369,7 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询咨询对应讨论组
 | 
	
		
			
				|  |  |      *
 | 
	
	
		
			
				|  | @ -379,13 +380,15 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |     public List<WlyyTalkGroup> findAllConsultTalkGroup(String consult) throws Exception {
 | 
	
		
			
				|  |  |         List<WlyyTalkGroup> talkGroup = discussionGroupDao.findByConsult(consult);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |        return talkGroup;
 | 
	
		
			
				|  |  |         return talkGroup;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     public WlyyTalkGroup findConsultTalkGroupByType(String consult,int type) throws Exception {
 | 
	
		
			
				|  |  |         WlyyTalkGroup talkGroup = discussionGroupDao.findByConsultAndType(consult,type);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public WlyyTalkGroup findConsultTalkGroupByType(String consult, int type) throws Exception {
 | 
	
		
			
				|  |  |         WlyyTalkGroup talkGroup = discussionGroupDao.findByConsultAndType(consult, type);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return talkGroup;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取医生对应病人的讨论组纪录
 | 
	
		
			
				|  |  |      *
 | 
	
	
		
			
				|  | @ -1116,8 +1119,12 @@ public class TalkGroupService extends BaseService {
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public ConsultTeam findConsultByGroup(String groupCode) {
 | 
	
		
			
				|  |  |         WlyyTalkGroup w=discussionGroupDao.findByCode(groupCode);
 | 
	
		
			
				|  |  |         WlyyTalkGroup w = discussionGroupDao.findByCode(groupCode);
 | 
	
		
			
				|  |  |         return consultTeamDao.findByConsult(w.getConsultCode());
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public WlyyTalkGroupMember findCreateAndDoctor(String create, String doctorCode) {
 | 
	
		
			
				|  |  |         return discussionGroupDao.findCreateAndDoctor(create, doctorCode);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 | 
	
		
			
				|  |  | 
 |