Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
9c2f8b3b72
1 changed files with 17 additions and 1 deletions
  1. 17 1
      controllers/sg/his_api_controller.go

+ 17 - 1
controllers/sg/his_api_controller.go View File

1780
 	registration_fee, _ := c.GetFloat("registration_fee")
1780
 	registration_fee, _ := c.GetFloat("registration_fee")
1781
 	medical_expenses, _ := c.GetFloat("medical_expenses")
1781
 	medical_expenses, _ := c.GetFloat("medical_expenses")
1782
 	social_type, _ := c.GetInt64("social_type")
1782
 	social_type, _ := c.GetInt64("social_type")
1783
+	med_type := c.GetString("social_type")
1784
+
1783
 	admin_user_id, _ := c.GetInt64("admin_user_id")
1785
 	admin_user_id, _ := c.GetInt64("admin_user_id")
1784
 
1786
 
1785
 	timeLayout := "2006-01-02"
1787
 	timeLayout := "2006-01-02"
2011
 				insutype = "310"
2013
 				insutype = "310"
2012
 			}
2014
 			}
2013
 
2015
 
2014
-			//insutype = "390"
2016
+			if len(insutypes) == 2 {
2017
+				insutype = med_type
2018
+			}
2019
+
2015
 			var resThree ResultThree
2020
 			var resThree ResultThree
2016
 			if miConfig.MdtrtareaAdmvs == "421300" {
2021
 			if miConfig.MdtrtareaAdmvs == "421300" {
2017
 				api := "http://192.168.124.4:9532/" + "hbyb/2201?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + Certno + "&ipt_otp_no=" + ipt_otp_no +
2022
 				api := "http://192.168.124.4:9532/" + "hbyb/2201?psn_no=" + PsnNo + "&insutype=" + insutype + "&cert_no=" + Certno + "&ipt_otp_no=" + ipt_otp_no +
2604
 							insutype = "310"
2609
 							insutype = "310"
2605
 						}
2610
 						}
2606
 
2611
 
2612
+						if len(insutypes) == 2 {
2613
+							insutype = strconv.FormatInt(his.SocialType, 64)
2614
+						}
2615
+
2607
 						//insutype = "390"
2616
 						//insutype = "390"
2608
 						if his.IdCardType == 1 {
2617
 						if his.IdCardType == 1 {
2609
 							// cert_no = his.MedicalInsuranceNumber
2618
 							// cert_no = his.MedicalInsuranceNumber
2852
 				insutype = "310"
2861
 				insutype = "310"
2853
 			}
2862
 			}
2854
 
2863
 
2864
+			if len(insutypes) == 2 {
2865
+				insutype = strconv.FormatInt(his.SocialType, 64)
2866
+			}
2867
+
2855
 			//insutype = "390"
2868
 			//insutype = "390"
2856
 			if his.IdCardType == 1 {
2869
 			if his.IdCardType == 1 {
2857
 				// cert_no = his.MedicalInsuranceNumber
2870
 				// cert_no = his.MedicalInsuranceNumber
3963
 					if len(insutypes) == 0 {
3976
 					if len(insutypes) == 0 {
3964
 						insutype = "310"
3977
 						insutype = "310"
3965
 					}
3978
 					}
3979
+					if len(insutypes) == 2 {
3980
+						insutype = strconv.FormatInt(his.SocialType, 64)
3981
+					}
3966
 
3982
 
3967
 					//insutype = "390"
3983
 					//insutype = "390"
3968
 					if his.IdCardType == 1 {
3984
 					if his.IdCardType == 1 {