|  | @ -4,12 +4,16 @@ import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.serializer.SerializerFeature;
 | 
	
		
			
				|  |  | import com.fasterxml.jackson.databind.ObjectMapper;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.dao.label.PatientLabelDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.dao.sign.*;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.service.common.DictService;
 | 
	
		
			
				|  |  | import com.yihu.jw.care.util.ConstantUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.label.PatientLabelDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.care.sign.*;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.PageEnvelop;
 | 
	
	
		
			
				|  | @ -23,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.jdbc.core.BeanPropertyRowMapper;
 | 
	
		
			
				|  |  | import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.Date;
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
	
		
			
				|  | @ -54,6 +59,10 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
 | 
	
		
			
				|  |  |     private CapacityAssessmentLivingAbilityDao CALivingAbilityDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private CapacityAssessmentSocialAbilityDao CASocialAbilityDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private PatientLabelDao patientLabelDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DictService dictService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
	
		
			
				|  | @ -148,6 +157,7 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
 | 
	
		
			
				|  |  |      * @param doctorId
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |     public void capacityAssessment(String jsonData,String doctorId) throws Exception{
 | 
	
		
			
				|  |  |         JSONObject jsonObject = JSONObject.parseObject(jsonData);
 | 
	
		
			
				|  |  |         CapacityAssessmentRecordDO recordDO = objectMapper.readValue(jsonObject.getJSONObject("assessment").toJSONString(), CapacityAssessmentRecordDO.class);
 | 
	
	
		
			
				|  | @ -162,6 +172,15 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
 | 
	
		
			
				|  |  |             recordDO.setServicePackageStatus(0);
 | 
	
		
			
				|  |  |             recordDO.setStatus(0);
 | 
	
		
			
				|  |  |             capacityAssessmentRecordDao.save(recordDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //生成居民标签
 | 
	
		
			
				|  |  |             patientLabelDao.deleteByPatient(recordDO.getPatient());
 | 
	
		
			
				|  |  |             PatientLabelDO patientLabelDO = new PatientLabelDO();
 | 
	
		
			
				|  |  |             patientLabelDO.setCzrq(new Date());
 | 
	
		
			
				|  |  |             patientLabelDO.setLabelType("1");
 | 
	
		
			
				|  |  |             patientLabelDO.setLabelCode(String.valueOf(recordDO.getLevelConclusion()));
 | 
	
		
			
				|  |  |             patientLabelDO.setLabelName(dictService.fingByNameAndCode(ConstantUtil.DICT_SERVICE_TYPE,patientLabelDO.getLabelCode()));
 | 
	
		
			
				|  |  |             patientLabelDao.save(patientLabelDO);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 |