|
|
@@ -2,16 +2,22 @@
|
|
2
|
2
|
using RMYY_CallCenter_Api.Utility;
|
|
3
|
3
|
using System;
|
|
4
|
4
|
using System.Collections.Generic;
|
|
|
5
|
+using System.IO;
|
|
5
|
6
|
using System.Linq;
|
|
|
7
|
+using System.Net;
|
|
|
8
|
+using System.Text;
|
|
6
|
9
|
using System.Web;
|
|
7
|
10
|
using System.Web.Mvc;
|
|
|
11
|
+using System.Xml;
|
|
8
|
12
|
|
|
9
|
13
|
namespace RMYY_CallCenter_Api.Controllers
|
|
10
|
14
|
{
|
|
|
15
|
+
|
|
11
|
16
|
public class PatientController : BaseController
|
|
12
|
17
|
{
|
|
13
|
18
|
private static string ip = "", port = "";
|
|
14
|
|
- private static string url = $"http://{ip}:{port}/winempi/webapi/";
|
|
|
19
|
+ private static string url = $"http://172.16.0.177:8081/winempi/webapi/";
|
|
|
20
|
+ private static string url1 = "http://172.16.0.197:10045/winempi/webapi/";
|
|
15
|
21
|
public class Patient
|
|
16
|
22
|
{
|
|
17
|
23
|
public string zsyh { set; get; }//主索引号
|
|
|
@@ -31,8 +37,9 @@ namespace RMYY_CallCenter_Api.Controllers
|
|
31
|
37
|
public string ncount { set; get; }//符合查询的数量
|
|
32
|
38
|
}
|
|
33
|
39
|
|
|
34
|
|
-
|
|
35
|
|
- public ActionResult GetModelList(string zsyh,string hzxm,string sfzh,string zlkh,string jzlx,string jzh,string lxdh)
|
|
|
40
|
+ [AllowAnonymous]
|
|
|
41
|
+ public ActionResult GetModelList(string zsyh="",string hzxm="",string sfzh=""
|
|
|
42
|
+ ,string zlkh="",string jzlx="",string jzh="",string lxdh="")
|
|
36
|
43
|
{
|
|
37
|
44
|
Dictionary<string, string> values = new Dictionary<string, string>();
|
|
38
|
45
|
values.Add("zsyh", zsyh);//主索引号
|
|
|
@@ -40,16 +47,29 @@ namespace RMYY_CallCenter_Api.Controllers
|
|
40
|
47
|
values.Add("sfzh", sfzh);//身份证号
|
|
41
|
48
|
values.Add("zlkh", zlkh);//诊疗卡号
|
|
42
|
49
|
values.Add("jzlx", jzlx);//就诊类型
|
|
43
|
|
- values.Add("jzh", jzlx);//就诊号
|
|
|
50
|
+ values.Add("jzh", jzh);//就诊号
|
|
44
|
51
|
values.Add("lxdh", lxdh);//联系电话
|
|
45
|
|
- var responseString = HttpMethods.HttpPost(url + "QueryPatient", values.ToJson(), "application/json;charset=UTF-8");
|
|
46
|
|
- List<Patient> jo =JsonConvert.DeserializeObject<List <Patient>>(responseString);
|
|
47
|
|
- var obj = new
|
|
|
52
|
+ try
|
|
|
53
|
+ {
|
|
|
54
|
+ var responseString = HttpMethods.HttpPost(url1 + "QueryPatient", values.ToJson(), "application/json;charset=UTF-8");
|
|
|
55
|
+ LogHelper.Warn("responseString"+ responseString);
|
|
|
56
|
+ List<Patient> jo = JsonConvert.DeserializeObject<List<Patient>>(responseString);
|
|
|
57
|
+ var obj = new
|
|
|
58
|
+ {
|
|
|
59
|
+ rows = jo
|
|
|
60
|
+ };
|
|
|
61
|
+ return Content(obj.ToJson());
|
|
|
62
|
+ }
|
|
|
63
|
+ catch(Exception e)
|
|
48
|
64
|
{
|
|
49
|
|
- rows = jo
|
|
50
|
|
- };
|
|
51
|
|
- return Content(obj.ToJson());
|
|
|
65
|
+ return Error(e.Message);
|
|
|
66
|
+ }
|
|
|
67
|
+
|
|
52
|
68
|
|
|
53
|
69
|
}
|
|
|
70
|
+
|
|
|
71
|
+
|
|
|
72
|
+
|
|
|
73
|
+
|
|
54
|
74
|
}
|
|
55
|
75
|
}
|