Browse Source

Merge branch 'dev' of huangwenjie/wlyy2.0 into dev

huangwenjie 5 years ago
parent
commit
955477602d

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

@ -11,6 +11,8 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -23,6 +25,8 @@ import org.springframework.web.bind.annotation.*;
@Api(value = "医生端-咨询IM&诊室&导诊台相关接口", description = "医生端-咨询IM&诊室&导诊台相关接口", tags = {"医生端-咨询IM&诊室&导诊台相关接口"})
public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
	
	private static final Logger logger = LoggerFactory.getLogger(DoctorConsultEndpoint.class);
	
	@Autowired
	private ImService imService;
	
@ -104,12 +108,15 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			JSONObject result = new JSONObject();
			synchronized (outpatientCode.intern()){
				
//				//1.调用挂号接口
//				net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
//				String rsCode = (String)rs.get("@RESULT");
//				if(!"0".equals(rsCode)){
//					return failed("挂号失败,无法发起咨询");
//				}
				//1.调用挂号接口
				logger.info("调用挂号接口====START");
				net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
				logger.info("调用挂号接口,rs:"+rs.toString());
				String rsCode = (String)rs.get("@RESULT");
				if(!"0".equals(rsCode)){
					return failed("挂号失败,无法发起咨询");
				}
				logger.info("调用挂号接口====END");
				
				//2.
				result = imService.addPrescriptionConsult(outpatientCode, patientCode,doctorCode,consult,reason,type);