|
@@ -17,6 +17,7 @@ import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.SaveInquiryVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -37,6 +38,12 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
@Autowired
|
|
|
@Qualifier("inquiryDetailServiceImpl")
|
|
|
private InquiryDetailServiceImpl inquiryDetailService;
|
|
|
+ @Value("${nali.apiUrl}")
|
|
|
+ private String apiUrl;
|
|
|
+ @Value("${nali.appKey}")
|
|
|
+ private String appKey;
|
|
|
+ @Value("${nali.appSecret}")
|
|
|
+ private String appSecret;
|
|
|
|
|
|
public SaveInquiryDTO saveInquiry(SaveInquiryVO saveInquiryVO) {
|
|
|
SaveInquiryDTO saveInquiryDTO = new SaveInquiryDTO();
|
|
@@ -65,9 +72,6 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
private String getUrl(SaveInquiryVO saveInquiryVO) {
|
|
|
String retUrl = null;
|
|
|
try {
|
|
|
- String apiUrl = "http://116.62.170.131:8096/openapi-devtest/gateway";
|
|
|
- String appKey = "ngari5e34e52511dc394f";
|
|
|
- String appSecret = "11dc394fc05518c1";
|
|
|
String encodingAesKey = "";
|
|
|
Client client = new Client(apiUrl, appKey, appSecret, encodingAesKey);
|
|
|
Response response = client.execute(getltcs(saveInquiryVO));
|
|
@@ -99,8 +103,9 @@ public class InquiryInfoFacade extends InquiryInfoServiceImpl {
|
|
|
body.put("doctorId", Integer.parseInt(saveInquiryVO.getDoctorId()));
|
|
|
body.put("mpiId", saveInquiryVO.getMpiId());
|
|
|
body.put("appId", saveInquiryVO.getAppId());
|
|
|
- body.put("diagnosis", saveInquiryVO.getDiagnosis());
|
|
|
-
|
|
|
+ if (saveInquiryVO.getDepartment().equals("全科")){
|
|
|
+ body.put("diagnosis", saveInquiryVO.getDiagnosis());
|
|
|
+ }
|
|
|
bodyList.add(body);
|
|
|
|
|
|
//X-Service-Id对应的值
|