|  | @ -7,7 +7,9 @@ import com.yihu.jw.dict.dao.DictHospitalDeptDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.dict.service.DictHospitalDeptService;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.mapping.dao.HospitalDeptMappingDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
 | 
	
	
		
			
				|  | @ -75,6 +77,8 @@ public class EntranceService {
 | 
	
		
			
				|  |  |     private String targetSysCode;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DictHospitalDeptDao dictHospitalDeptDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private PatientMappingDao patientMappingDao;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取本地示例返参
 | 
	
	
		
			
				|  | @ -354,10 +358,18 @@ public class EntranceService {
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setRealOrder(realOrder);
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setSerialNo(null != jsonObjectBody.get("REGISTER_SN") ? jsonObjectBody.get("REGISTER_SN").toString() : "");
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setType(1);
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setPatientCode(null != jsonObjectBody.get("PAT_NO") ? jsonObjectBody.get("PAT_NO").toString() : "");
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setPatientName(null != jsonObjectBody.get("UOM") ? jsonObjectBody.get("UOM").toString() : "");
 | 
	
		
			
				|  |  |         //TODO 通过映射表获取居民身份证号e
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setIdcard("");
 | 
	
		
			
				|  |  |         String patNo=null != jsonObjectBody.get("PAT_NO") ? jsonObjectBody.get("PAT_NO").toString() : "";
 | 
	
		
			
				|  |  |         String patientName=null != jsonObjectBody.get("UOM") ? jsonObjectBody.get("UOM").toString() : "";
 | 
	
		
			
				|  |  |         PatientMappingDO patientMappingDo=new PatientMappingDO();
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(patNo)){
 | 
	
		
			
				|  |  |             patientMappingDo=  patientMappingDao.findByMappingCodeAndSource(patNo,"1");
 | 
	
		
			
				|  |  |             patNo=StringUtils.isBlank(patientMappingDo.getPatient())?patNo:patientMappingDo.getPatient();
 | 
	
		
			
				|  |  |             patientName=StringUtils.isBlank(patientMappingDo.getPatientName())?patientName:patientMappingDo.getPatientName();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setPatientCode(patNo);
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setPatientName(patientName);
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setIdcard(patientMappingDo.getIdcard());
 | 
	
		
			
				|  |  |         //TODO 社保卡号
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setSsc("");
 | 
	
		
			
				|  |  |         wlyyPrescriptionVO.setHisDoctorCode(null != jsonObjectBody.get("PRESC_DOC") ? jsonObjectBody.get("PRESC_DOC").toString() : "");
 | 
	
	
		
			
				|  | @ -440,9 +452,16 @@ public class EntranceService {
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setRegisterNo(null == jsonObjectMgsInfo.get("REGISTER_SN") ? "" : jsonObjectMgsInfo.get("REGISTER_SN") + "");
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setDept(null == jsonObjectMgsInfo.get("ADM_SPEC") ? "" : jsonObjectMgsInfo.get("ADM_SPEC") + "");
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setDeptName(null == jsonObjectMgsInfo.get("ADM_SPEC_NAME") ? "" : jsonObjectMgsInfo.get("ADM_SPEC_NAME") + "");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setPatient(null == jsonObjectMgsInfo.get("PAT_NO") ? "" : jsonObjectMgsInfo.get("PAT_NO") + "");
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setPatientName(null == jsonObjectMgsInfo.get("PAT_NAME") ? "" : jsonObjectMgsInfo.get("PAT_NAME") + "");
 | 
	
		
			
				|  |  |                 String patNo=null != jsonObjectMgsInfo.get("PAT_NO") ? jsonObjectMgsInfo.get("PAT_NO").toString() : "";
 | 
	
		
			
				|  |  |                 String patientName=null != jsonObjectMgsInfo.get("PAT_NAME") ? jsonObjectMgsInfo.get("PAT_NAME").toString() : "";
 | 
	
		
			
				|  |  |                 PatientMappingDO patientMappingDo=new PatientMappingDO();
 | 
	
		
			
				|  |  |                 if(StringUtils.isNotBlank(patNo)){
 | 
	
		
			
				|  |  |                     patientMappingDo=  patientMappingDao.findByMappingCodeAndSource(patNo,"1");
 | 
	
		
			
				|  |  |                     patNo=StringUtils.isBlank(patientMappingDo.getPatient())?patNo:patientMappingDo.getPatient();
 | 
	
		
			
				|  |  |                     patientName=StringUtils.isBlank(patientMappingDo.getPatientName())?patientName:patientMappingDo.getPatientName();
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setPatient(patNo);
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setPatientName(patientName);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setDoctor(null == jsonObjectMgsInfo.get("CON_DOC") ? "" : jsonObjectMgsInfo.get("CON_DOC") + "");
 | 
	
		
			
				|  |  |                 wlyyOutpatientVO.setDoctorName(null == jsonObjectMgsInfo.get("CON_DOC_NAME") ? "" : jsonObjectMgsInfo.get("CON_DOC_NAME") + "");
 |