Explorar el Código

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

csx hace 3 años
padre
commit
e86878d871
Se han modificado 2 ficheros con 26 adiciones y 6 borrados
  1. 20 0
      controllers/sg/his_api_controller.go
  2. 6 6
      main.go

+ 20 - 0
controllers/sg/his_api_controller.go Ver fichero

4127
 							psn_info, _ := service.GetPsnByPatientId(his.PatientId)
4127
 							psn_info, _ := service.GetPsnByPatientId(his.PatientId)
4128
 							psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
4128
 							psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
4129
 
4129
 
4130
+							//psn_info, _ := service.GetPsnByPatientId(id)
4131
+							bas := strings.Split(psn_info.CardInfo, "|")
4132
+
4133
+							if his.IdCardType == 1 {
4134
+								cert_no = bas[2]
4135
+							} else {
4136
+								cert_no = bas[1]
4137
+							}
4138
+
4139
+							//psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
4140
+
4130
 							api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
4141
 							api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
4131
 								his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
4142
 								his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
4132
 								"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
4143
 								"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
4480
 				psn_info, _ := service.GetPsnByPatientId(his.PatientId)
4491
 				psn_info, _ := service.GetPsnByPatientId(his.PatientId)
4481
 				psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
4492
 				psn_info.VerifyNumber = strings.Replace(psn_info.VerifyNumber, "+", "%2B", -1)
4482
 
4493
 
4494
+				//psn_info, _ := service.GetPsnByPatientId(id)
4495
+				bas := strings.Split(psn_info.CardInfo, "|")
4496
+
4497
+				if his.IdCardType == 1 {
4498
+					cert_no = bas[2]
4499
+				} else {
4500
+					cert_no = bas[1]
4501
+				}
4502
+
4483
 				api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
4503
 				api := "http://192.168.3.111:9532/" + "jsyb/2207?psn_no=" + his.PsnNo + "&mdtrt_id=" +
4484
 					his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
4504
 					his.Number + "&chrg_bchno=" + chrg_bchno + "&org_name=" + miConfig.OrgName +
4485
 					"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +
4505
 					"&doctor=" + roles.UserName + "&fixmedins_code=" + miConfig.Code +

+ 6 - 6
main.go Ver fichero

5
 	"fmt"
5
 	"fmt"
6
 	"gdyb/models"
6
 	"gdyb/models"
7
 	_ "gdyb/routers"
7
 	_ "gdyb/routers"
8
-	//"gdyb/service"
8
+	"gdyb/service"
9
 
9
 
10
 	//"gdyb/service"
10
 	//"gdyb/service"
11
 	"github.com/astaxie/beego"
11
 	"github.com/astaxie/beego"
17
 )
17
 )
18
 
18
 
19
 func init() {
19
 func init() {
20
-	//service.ConnectDB()
21
-	//org_id, _ := beego.AppConfig.Int64("org_id")
22
-	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
23
-	//CreateLog(miConfig)
24
-	//UploadLog(miConfig)
20
+	service.ConnectDB()
21
+	org_id, _ := beego.AppConfig.Int64("org_id")
22
+	miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
23
+	CreateLog(miConfig)
24
+	UploadLog(miConfig)
25
 
25
 
26
 }
26
 }
27
 func main() {
27
 func main() {