test_user 2 months ago
parent
commit
5aa0f46220
4 changed files with 2193 additions and 2190 deletions
  1. 913 911
      controllers/sg/his_api_controller.go
  2. 1256 1255
      service/auto_create_week_schedules_service.go
  3. 2 2
      service/gdyb_service.go
  4. 22 22
      service/nm_service.go

File diff suppressed because it is too large
+ 913 - 911
controllers/sg/his_api_controller.go


File diff suppressed because it is too large
+ 1256 - 1255
service/auto_create_week_schedules_service.go


+ 2 - 2
service/gdyb_service.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"fmt"
10 10
 	"gdyb/models"
11 11
 
12
-	//"strings"
12
+	"strings"
13 13
 	//"gdyb/utils"
14 14
 	"github.com/astaxie/beego"
15 15
 	"github.com/axgle/mahonia"
@@ -8402,7 +8402,7 @@ func Gzyb3501(struct3501 models.Struct3501, secret_key string) (string, string)
8402 8402
 	// 生成输入报文
8403 8403
 	//inputMessage := SetInputMessage(timestamp, struct3501.OrgName, struct3501.Opter, struct3501.FixmedinsHilistId, struct3501.InsuplcAdmdvs, struct3501.MdtrtareaAdmvs, struct3501.Cainfo,"")
8404 8404
 	sign := GetSignInInfo(struct3501.FixmedinsCode)
8405
-	inputMessage := SetInputMessage(nonce, timestamp, struct3501.OrgName, struct3501.Opter, struct3501.FixmedinsCode, struct3501.InsuplcAdmdvs, struct3501.MdtrtareaAdmvs, sign)
8405
+	inputMessage := SetGZInputMessage(nonce, timestamp, struct3501.OrgName, struct3501.Opter, struct3501.FixmedinsCode, struct3501.InsuplcAdmdvs, struct3501.MdtrtareaAdmvs, sign)
8406 8406
 
8407 8407
 	input := make(map[string]interface{})
8408 8408
 	inputData := make(map[string]interface{})

+ 22 - 22
service/nm_service.go View File

@@ -1341,7 +1341,7 @@ func NMyb3505(struct3505 models.Struct3505, secret_key string) (string,string) {
1341 1341
 	fmt.Println(string(bytesData))
1342 1342
 	if err != nil {
1343 1343
 		fmt.Println(err.Error())
1344
-		return err.Error()
1344
+		return err.Error(),""
1345 1345
 	}
1346 1346
 	reader := bytes.NewReader(bytesData)
1347 1347
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1636,7 +1636,7 @@ func NMyb3509(struct3509 models.Struct3509, secret_key string) (string,string) {
1636 1636
 	fmt.Println(string(bytesData))
1637 1637
 	if err != nil {
1638 1638
 		fmt.Println(err.Error())
1639
-		return err.Error()
1639
+		return err.Error(),""
1640 1640
 	}
1641 1641
 	reader := bytes.NewReader(bytesData)
1642 1642
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1647,7 +1647,7 @@ func NMyb3509(struct3509 models.Struct3509, secret_key string) (string,string) {
1647 1647
 	request, err := http.NewRequest("POST", url, reader)
1648 1648
 	if err != nil {
1649 1649
 		fmt.Println(err.Error())
1650
-		return err.Error()
1650
+		return err.Error(),""
1651 1651
 	}
1652 1652
 
1653 1653
 	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
@@ -1660,12 +1660,12 @@ func NMyb3509(struct3509 models.Struct3509, secret_key string) (string,string) {
1660 1660
 	resp, err := client.Do(request)
1661 1661
 	if err != nil {
1662 1662
 		fmt.Println(err.Error())
1663
-		return err.Error()
1663
+		return err.Error(),""
1664 1664
 	}
1665 1665
 	respBytes, err := ioutil.ReadAll(resp.Body)
1666 1666
 	if err != nil {
1667 1667
 		fmt.Println(err.Error())
1668
-		return err.Error()
1668
+		return err.Error(),""
1669 1669
 	}
1670 1670
 	str := string(respBytes)
1671 1671
 	fmt.Println(str)
@@ -1720,7 +1720,7 @@ func NMyb3510(struct3510 models.Struct3510, secret_key string) (string,string) {
1720 1720
 	fmt.Println(string(bytesData))
1721 1721
 	if err != nil {
1722 1722
 		fmt.Println(err.Error())
1723
-		return err.Error()
1723
+		return err.Error(),""
1724 1724
 	}
1725 1725
 	reader := bytes.NewReader(bytesData)
1726 1726
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1731,7 +1731,7 @@ func NMyb3510(struct3510 models.Struct3510, secret_key string) (string,string) {
1731 1731
 	request, err := http.NewRequest("POST", url, reader)
1732 1732
 	if err != nil {
1733 1733
 		fmt.Println(err.Error())
1734
-		return err.Error()
1734
+		return err.Error(),""
1735 1735
 	}
1736 1736
 
1737 1737
 	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
@@ -1744,16 +1744,16 @@ func NMyb3510(struct3510 models.Struct3510, secret_key string) (string,string) {
1744 1744
 	resp, err := client.Do(request)
1745 1745
 	if err != nil {
1746 1746
 		fmt.Println(err.Error())
1747
-		return err.Error()
1747
+		return err.Error(),""
1748 1748
 	}
1749 1749
 	respBytes, err := ioutil.ReadAll(resp.Body)
1750 1750
 	if err != nil {
1751 1751
 		fmt.Println(err.Error())
1752
-		return err.Error()
1752
+		return err.Error(),""
1753 1753
 	}
1754 1754
 	str := string(respBytes)
1755 1755
 	fmt.Println(str)
1756
-	return str,,string(bytesData)
1756
+	return str,string(bytesData)
1757 1757
 }
1758 1758
 func NMyb3511(struct3511 models.Struct3511, secret_key string) (string,string) {
1759 1759
 	// 生成签名
@@ -1804,7 +1804,7 @@ func NMyb3511(struct3511 models.Struct3511, secret_key string) (string,string) {
1804 1804
 	fmt.Println(string(bytesData))
1805 1805
 	if err != nil {
1806 1806
 		fmt.Println(err.Error())
1807
-		return err.Error()
1807
+		return err.Error(),""
1808 1808
 	}
1809 1809
 	reader := bytes.NewReader(bytesData)
1810 1810
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1815,7 +1815,7 @@ func NMyb3511(struct3511 models.Struct3511, secret_key string) (string,string) {
1815 1815
 	request, err := http.NewRequest("POST", url, reader)
1816 1816
 	if err != nil {
1817 1817
 		fmt.Println(err.Error())
1818
-		return err.Error()
1818
+		return err.Error(),""
1819 1819
 	}
1820 1820
 
1821 1821
 	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
@@ -1828,12 +1828,12 @@ func NMyb3511(struct3511 models.Struct3511, secret_key string) (string,string) {
1828 1828
 	resp, err := client.Do(request)
1829 1829
 	if err != nil {
1830 1830
 		fmt.Println(err.Error())
1831
-		return err.Error()
1831
+		return err.Error(),""
1832 1832
 	}
1833 1833
 	respBytes, err := ioutil.ReadAll(resp.Body)
1834 1834
 	if err != nil {
1835 1835
 		fmt.Println(err.Error())
1836
-		return err.Error()
1836
+		return err.Error(),""
1837 1837
 	}
1838 1838
 	str := string(respBytes)
1839 1839
 	fmt.Println(str)
@@ -1887,7 +1887,7 @@ func NMyb3512(struct3512 models.Struct3512, secret_key string) (string,string) {
1887 1887
 	fmt.Println(string(bytesData))
1888 1888
 	if err != nil {
1889 1889
 		fmt.Println(err.Error())
1890
-		return err.Error()
1890
+		return err.Error(),""
1891 1891
 	}
1892 1892
 	reader := bytes.NewReader(bytesData)
1893 1893
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1898,7 +1898,7 @@ func NMyb3512(struct3512 models.Struct3512, secret_key string) (string,string) {
1898 1898
 	request, err := http.NewRequest("POST", url, reader)
1899 1899
 	if err != nil {
1900 1900
 		fmt.Println(err.Error())
1901
-		return err.Error()
1901
+		return err.Error(),""
1902 1902
 	}
1903 1903
 
1904 1904
 	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
@@ -1911,12 +1911,12 @@ func NMyb3512(struct3512 models.Struct3512, secret_key string) (string,string) {
1911 1911
 	resp, err := client.Do(request)
1912 1912
 	if err != nil {
1913 1913
 		fmt.Println(err.Error())
1914
-		return err.Error()
1914
+		return err.Error(),""
1915 1915
 	}
1916 1916
 	respBytes, err := ioutil.ReadAll(resp.Body)
1917 1917
 	if err != nil {
1918 1918
 		fmt.Println(err.Error())
1919
-		return err.Error()
1919
+		return err.Error(),""
1920 1920
 	}
1921 1921
 	str := string(respBytes)
1922 1922
 	fmt.Println(str)
@@ -1972,7 +1972,7 @@ func NMyb3513(struct3513 models.Struct3513, secret_key string) (string,string) {
1972 1972
 	fmt.Println(string(bytesData))
1973 1973
 	if err != nil {
1974 1974
 		fmt.Println(err.Error())
1975
-		return err.Error()
1975
+		return err.Error(),""
1976 1976
 	}
1977 1977
 	reader := bytes.NewReader(bytesData)
1978 1978
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/5301"
@@ -1983,7 +1983,7 @@ func NMyb3513(struct3513 models.Struct3513, secret_key string) (string,string) {
1983 1983
 	request, err := http.NewRequest("POST", url, reader)
1984 1984
 	if err != nil {
1985 1985
 		fmt.Println(err.Error())
1986
-		return err.Error()
1986
+		return err.Error(),""
1987 1987
 	}
1988 1988
 
1989 1989
 	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
@@ -1996,12 +1996,12 @@ func NMyb3513(struct3513 models.Struct3513, secret_key string) (string,string) {
1996 1996
 	resp, err := client.Do(request)
1997 1997
 	if err != nil {
1998 1998
 		fmt.Println(err.Error())
1999
-		return err.Error()
1999
+		return err.Error(),""
2000 2000
 	}
2001 2001
 	respBytes, err := ioutil.ReadAll(resp.Body)
2002 2002
 	if err != nil {
2003 2003
 		fmt.Println(err.Error())
2004
-		return err.Error()
2004
+		return err.Error(),""
2005 2005
 	}
2006 2006
 	str := string(respBytes)
2007 2007
 	fmt.Println(str)