Browse Source

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

csx 4 years ago
parent
commit
93d13f9fe7
1 changed files with 9 additions and 5 deletions
  1. 9 5
      controllers/sg/his_api_controller.go

+ 9 - 5
controllers/sg/his_api_controller.go View File

2460
 //退款
2460
 //退款
2461
 func (c *HisApiController) Refund() {
2461
 func (c *HisApiController) Refund() {
2462
 	order_id, _ := c.GetInt64("order_id")
2462
 	order_id, _ := c.GetInt64("order_id")
2463
+	admin_user_id, _ := c.GetInt64("admin_user_id")
2464
+
2463
 	number := c.GetString("number")
2465
 	number := c.GetString("number")
2464
 	record_time := c.GetString("record_time")
2466
 	record_time := c.GetString("record_time")
2465
 	patient_id, _ := c.GetInt64("patient_id")
2467
 	patient_id, _ := c.GetInt64("patient_id")
2478
 	var order models.HisOrder
2480
 	var order models.HisOrder
2479
 	order, _ = service.GetHisOrderByID(order_id)
2481
 	order, _ = service.GetHisOrderByID(order_id)
2480
 
2482
 
2483
+	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
2484
+
2481
 	if order.ID == 0 {
2485
 	if order.ID == 0 {
2482
 		order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
2486
 		order, _ = service.GetHisOrderThree(recordDateTime, patient_id, adminUser.CurrentOrgId)
2483
 
2487
 
2488
 
2492
 
2489
 	if config.IsOpen == 1 { //对接了医保,走医保流程
2493
 	if config.IsOpen == 1 { //对接了医保,走医保流程
2490
 		api := "http://127.0.0.1:9532/" + "gdyb/nine?psn_no=" + his.PsnNo +
2494
 		api := "http://127.0.0.1:9532/" + "gdyb/nine?psn_no=" + his.PsnNo +
2491
-			"&mdtrt_id=" + his.Number + "&doctor=" + "张俊杰" + "&setl_id=" + order.SetlId + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2495
+			"&mdtrt_id=" + his.Number + "&doctor=" + roles.UserName + "&setl_id=" + order.SetlId + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2492
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2496
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2493
 		resp, requestErr := http.Get(api)
2497
 		resp, requestErr := http.Get(api)
2494
 		if requestErr != nil {
2498
 		if requestErr != nil {
2513
 		fmt.Println(userJSONBytes)
2517
 		fmt.Println(userJSONBytes)
2514
 
2518
 
2515
 		api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
2519
 		api2 := "http://127.0.0.1:9532/" + "gdyb/six?psn_no=" + his.PsnNo +
2516
-			"&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + "张俊杰" + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2520
+			"&mdtrt_id=" + his.Number + "&chrg_bchno=" + order.Number + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2517
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2521
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2518
 		resp2, requestErr2 := http.Get(api2)
2522
 		resp2, requestErr2 := http.Get(api2)
2519
 		if requestErr2 != nil {
2523
 		if requestErr2 != nil {
2601
 	if config.IsOpen == 1 { //对接了医保,走医保流程
2605
 	if config.IsOpen == 1 { //对接了医保,走医保流程
2602
 
2606
 
2603
 		api3 := "http://127.0.0.1:9532/" + "gdyb/three?psn_no=" + his.PsnNo +
2607
 		api3 := "http://127.0.0.1:9532/" + "gdyb/three?psn_no=" + his.PsnNo +
2604
-			"&mdtrt_id=" + his.Number + "&ipt_otp_no=" + his.IptOtpNo + "&doctor=" + "张俊杰" + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2608
+			"&mdtrt_id=" + his.Number + "&ipt_otp_no=" + his.IptOtpNo + "&doctor=" + roles.UserName + "&org_name=" + miConfig.OrgName + "&fixmedins_code=" + miConfig.Code +
2605
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2609
 			"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey
2606
 		resp3, requestErr3 := http.Get(api3)
2610
 		resp3, requestErr3 := http.Get(api3)
2607
 		if requestErr3 != nil {
2611
 		if requestErr3 != nil {
2755
 	var user_name string
2759
 	var user_name string
2756
 	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
2760
 	role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
2757
 	if role.ID == 0 {
2761
 	if role.ID == 0 {
2758
-		user_name = "张俊杰"
2762
+		user_name = "xxx"
2759
 	} else {
2763
 	} else {
2760
 		user_name = role.UserName
2764
 		user_name = role.UserName
2761
 	}
2765
 	}
2850
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
2854
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
2851
 
2855
 
2852
 	var user_name string
2856
 	var user_name string
2853
-	user_name = "张俊杰"
2857
+	user_name = "xxx"
2854
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
2858
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
2855
 		"insutype=" + "310" +
2859
 		"insutype=" + "310" +
2856
 		"&clr_type=" + "11" +
2860
 		"&clr_type=" + "11" +