|  | @ -1,5 +1,7 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.hospital.message.service;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.google.j2objc.annotations.AutoreleasePool;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.score.BaseEvaluateDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.message.BaseBannerDO;
 | 
	
	
		
			
				|  | @ -9,8 +11,10 @@ import com.yihu.jw.evaluate.score.dao.BaseEvaluateDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.evaluate.score.dao.BaseEvaluateScoreDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.message.dao.BaseUserMessageDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.message.dao.BaseUserMsgContentDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.Envelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.MixEnvelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.base.BaseRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.hibernate.HibenateUtils;
 | 
	
	
		
			
				|  | @ -44,6 +48,8 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
 | 
	
		
			
				|  |  |     private BaseEvaluateScoreDao baseEvaluateScoreDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private BaseEvaluateDao baseEvaluateDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private BasePatientDao basePatientDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Value("${wechat.id}")
 | 
	
		
			
				|  |  |     private String wxId;
 | 
	
	
		
			
				|  | @ -143,25 +149,32 @@ public class BaseUserMsgService extends BaseJpaService<BaseUserMessageDO, BaseUs
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setId(id);
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setReceiver(map.get("receiver").toString());
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setReceiverName(map.get("receiver_name").toString());
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setSenderName(map.get("sender_name").toString());
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setSenderName(map.get("sender").toString());
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setContent(map.get("content").toString());
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = basePatientDao.findById(map.get("sender").toString());
 | 
	
		
			
				|  |  |             String icon = null;
 | 
	
		
			
				|  |  |             if (null!=patientDO){
 | 
	
		
			
				|  |  |                 icon = patientDO.getPhoto();
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             List<BaseUserMsgContentDO> contentlist=baseUserMsgContentDao.getContentListByID(id);
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setMsgList(contentlist);
 | 
	
		
			
				|  |  |             String updateTime = map.get("update_time").toString();
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setUpdateTime(DateUtil.strToDateLong(updateTime));
 | 
	
		
			
				|  |  |             returnMap.put("contentList",baseUserMsgContentDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //map.put("update_time",DateUtil.dateToStrLong(DateUtil.strToDateLong(updateTime)));
 | 
	
		
			
				|  |  |             List<BaseEvaluateDO> baseEvaluateDO=baseEvaluateDao.findByRelationCode(relationCode);
 | 
	
		
			
				|  |  |             BaseEvaluateScoreDO scoreList =null;
 | 
	
		
			
				|  |  |             if (baseEvaluateDO.size()>0){
 | 
	
		
			
				|  |  |                 String findRC=baseEvaluateDO.get(0).getRelationCode();
 | 
	
		
			
				|  |  |                 BaseEvaluateScoreDO scoreList = baseEvaluateScoreDao.findOne(relationCode);
 | 
	
		
			
				|  |  |                 scoreList= baseEvaluateScoreDao.findOne(relationCode);
 | 
	
		
			
				|  |  |                 if(null!=scoreList){
 | 
	
		
			
				|  |  |                     returnMap.put("everangScore",scoreList);
 | 
	
		
			
				|  |  |                     returnMap.put("scoreList",baseEvaluateDO);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             baseUserMsgContentDO.setSenderName(scoreList.getType()==1?map.get("sender_name").toString():map.get("sender_name").toString().substring(0,1)+"**");
 | 
	
		
			
				|  |  |             returnMap.put("contentList",baseUserMsgContentDO);
 | 
	
		
			
				|  |  |             returnMap.put("patientIcon",icon);
 | 
	
		
			
				|  |  |             returnList.add(returnMap);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, returnList, page, pageSize, count);
 |