|  | @ -21,6 +21,7 @@ import com.yihu.jw.entity.care.securitymonitoring.BaseEmergencyWarnLogDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.message.SystemMessageDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.message.dao.SystemMessageDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.ResponseContant;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.PageEnvelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
	
		
			
				|  | @ -184,11 +185,16 @@ public class PatientMessageService {
 | 
	
		
			
				|  |  |      * @param safe_area
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @Transactional(rollbackFor =Exception.class )
 | 
	
		
			
				|  |  |     public void ConfirmFences(String msgId,String safe_area){
 | 
	
		
			
				|  |  |     public JSONObject ConfirmFences(String msgId,String safe_area){
 | 
	
		
			
				|  |  |         JSONObject result = new JSONObject();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         SystemMessageDO systemMessageDO = systemMessageDao.findOne(msgId);
 | 
	
		
			
				|  |  |         if (systemMessageDO!=null){
 | 
	
		
			
				|  |  |             systemMessageDao.save(systemMessageDO);
 | 
	
		
			
				|  |  |         if ("1".equals(systemMessageDO.getData())){
 | 
	
		
			
				|  |  |             result.put(ResponseContant.resultFlag,ResponseContant.fail);
 | 
	
		
			
				|  |  |             result.put(ResponseContant.resultMsg,"已有家属确认管理,无需再次确认!");
 | 
	
		
			
				|  |  |             return result;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<PatientSafeAreaDO> patientSafeAreaDOs = patientSafeAreaDao.findByPatient2(systemMessageDO.getRelationCode());
 | 
	
		
			
				|  |  |         PatientSafeAreaDO patientSafeAreaDO = null;
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -196,7 +202,9 @@ public class PatientMessageService {
 | 
	
		
			
				|  |  |             patientSafeAreaDO = patientSafeAreaDOs.get(0);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             return;
 | 
	
		
			
				|  |  |             result.put(ResponseContant.resultFlag,ResponseContant.fail);
 | 
	
		
			
				|  |  |             result.put(ResponseContant.resultMsg,"居民未绑定防走失设备!");
 | 
	
		
			
				|  |  |             return result;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(safe_area)&&null != patientSafeAreaDO){
 | 
	
		
			
				|  |  |             patientSafeAreaDO.setSafeAreaGz(safe_area);
 | 
	
	
		
			
				|  | @ -211,5 +219,8 @@ public class PatientMessageService {
 | 
	
		
			
				|  |  |         //修改数据
 | 
	
		
			
				|  |  |         patientSafeAreaConfirmDao.manageByPatient(patientSafeAreaDO.getPatient());
 | 
	
		
			
				|  |  |         systemMessageDao.readByTypeAndRelationCode("44",patientSafeAreaDO.getPatient(),"1");
 | 
	
		
			
				|  |  |         result.put(ResponseContant.resultFlag,ResponseContant.success);
 | 
	
		
			
				|  |  |         result.put(ResponseContant.resultMsg,"已确认");
 | 
	
		
			
				|  |  |         return result;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |