陈少旭 1 year ago
parent
commit
538a10da71
1 changed files with 69 additions and 8 deletions
  1. 69 8
      main.go

+ 69 - 8
main.go View File

@@ -3,6 +3,7 @@ package main
3 3
 import (
4 4
 	_ "XT_New/routers"
5 5
 	"XT_New/service"
6
+	"encoding/xml"
6 7
 	"github.com/astaxie/beego"
7 8
 )
8 9
 
@@ -23,14 +24,74 @@ func main() {
23 24
 	//beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 6000
24 25
 	//beego.BConfig.WebConfig.AutoRender = false
25 26
 	//
26
-	//fmt.Println(0 % 4)
27
-	//fmt.Println(1 % 4)
28
-	//fmt.Println(2 % 4)
29
-	//fmt.Println(3 % 4)
30
-	//fmt.Println(4 % 4)
31
-	//fmt.Println(5 % 4)
32
-	//fmt.Println(6 % 4)
33
-	//fmt.Println(7 % 4)
34 27
 
35 28
 	beego.Run()
29
+
30
+}
31
+
32
+type Envelope struct {
33
+	XMLName xml.Name `xml:"soap:Envelope"`
34
+	Soap    string   `xml:"xmlns:soap,attr"`
35
+	Xsi     string   `xml:"xmlns:xsi,attr"`
36
+	Xsd     string   `xml:"xmlns:xsd,attr"`
37
+	Body    Body     `xml:"soap:Body"`
38
+}
39
+
40
+type Body struct {
41
+	XMLName      xml.Name     `xml:"soap:Body"`
42
+	GetReportReq GetReportReq `xml:"GetReportList"`
43
+}
44
+
45
+type GetReportReq struct {
46
+	XMLName       xml.Name `xml:"http://tempuri.org/ GetReportList"`
47
+	Key           string   `xml:"key"`
48
+	BeginDateTime string   `xml:"BeginDateTime"`
49
+	EndDateTime   string   `xml:"EndDateTime"`
50
+	DateType      int      `xml:"DateType"`
51
+	PrintState    int      `xml:"PrintState"`
52
+}
53
+
54
+type EnvelopeTwo struct {
55
+	XMLName xml.Name     `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
56
+	Body    EnvelopeBody `xml:"Body"`
57
+}
58
+
59
+type EnvelopeBody struct {
60
+	GetReportListResponse GetReportListResponse `xml:"GetReportListResponse"`
61
+}
62
+
63
+type GetReportListResponse struct {
64
+	XMLName             xml.Name `xml:"http://tempuri.org/ GetReportListResponse"`
65
+	GetReportListResult string   `xml:"GetReportListResult"`
66
+}
67
+
68
+type ReportData struct {
69
+	Res   int    `json:"Res"`
70
+	Error string `json:"Error"`
71
+	Data  []Data `json:"Data"`
72
+}
73
+
74
+type Data struct {
75
+	RecordID           string `json:"RecordID"`
76
+	PatientName        string `json:"PatientName"`
77
+	Sex                string `json:"Sex"`
78
+	Age                int    `json:"Age"`
79
+	AgeUnit            string `json:"AgeUnit"`
80
+	OfficeName         string `json:"OfficeName"`
81
+	BedCode            string `json:"BedCode"`
82
+	Barcode            string `json:"Barcode"`
83
+	CustomerBarcode    string `json:"CustomerBarcode"`
84
+	SampleCode         string `json:"SampleCode"`
85
+	SampleCategory     string `json:"SampleCategory"`
86
+	SampleDescription  string `json:"SampleDescription"`
87
+	Diagnostics        string `json:"Diagnostics"`
88
+	TakeSampleDateTime string `json:"TakeSampleDateTime"`
89
+	ReceiveDateTime    string `json:"ReceiveDateTime"`
90
+	AuditDateTime      string `json:"AuditDateTime"`
91
+	InspectDate        string `json:"InspectDate"`
92
+	SendDoctor         string `json:"SendDoctor"`
93
+	InspectDoctorName  string `json:"InspectDoctorName"`
94
+	AuditorName        string `json:"AuditorName"`
95
+	Instrument         string `json:"Instrument"`
96
+	Comment            string `json:"Comment"`
36 97
 }