Prechádzať zdrojové kódy

眼科医院接诊不需要挂号

huangwenjie 5 rokov pred
rodič
commit
4f90f8d4f4

+ 18 - 11
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -34,6 +34,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
@ -84,6 +85,9 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	public BasePatientDao basePatientDao;
	public BasePatientDao basePatientDao;
	@Autowired
	@Autowired
	private WxTemplateService wxTemplateService;
	private WxTemplateService wxTemplateService;
	
	@Value("${wechat.id}")
	private String wxId;
	
	
	
	
@ -174,18 +178,21 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			JSONObject result = new JSONObject();
			JSONObject result = new JSONObject();
			synchronized (outpatientCode.intern()){
			synchronized (outpatientCode.intern()){
				
				
				//1.调用挂号接口
				logger.info("调用挂号接口====START");
				net.sf.json.JSONObject res = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
				String rsCode = (String)res.get("@RESULT");
				if("0".equals(rsCode)||"-2".equals(rsCode)){
					//挂号成功,已经挂号
				}else{
					String mes = (String)res.get("@MSG");
					failed(mes);
				if(!"xm_ykyy_wx".equals(wxId)){//中山医院-心脏中心需要挂号
					//1.调用挂号接口
					logger.info("调用挂号接口====START");
					net.sf.json.JSONObject res = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
					
					String rsCode = (String)res.get("@RESULT");
					if("0".equals(rsCode)||"-2".equals(rsCode)){
						//挂号成功,已经挂号
					}else{
						String mes = (String)res.get("@MSG");
						failed(mes);
					}
					logger.info("调用挂号接口====END");
				}
				}
				logger.info("调用挂号接口====END");
				
				
				
				//2.
				//2.
				result = imService.addPrescriptionConsult(outpatientCode, patientCode,doctorCode,consult,reason,type);
				result = imService.addPrescriptionConsult(outpatientCode, patientCode,doctorCode,consult,reason,type);