Quellcode durchsuchen

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

csx vor 3 Jahren
Ursprung
Commit
942c3ca730
2 geänderte Dateien mit 25 neuen und 26 gelöschten Zeilen
  1. 3 3
      conf/app.conf
  2. 22 23
      controllers/sg/his_api_controller.go

+ 3 - 3
conf/app.conf Datei anzeigen

45
 
45
 
46
 
46
 
47
 [prod]
47
 [prod]
48
-org_id = 10188
48
+org_id = 10215
49
 mobile_token_expiration_second = 86400
49
 mobile_token_expiration_second = 86400
50
 httpdomain = https://api.xt.kuyicloud.com
50
 httpdomain = https://api.xt.kuyicloud.com
51
 sso_domain = https://sso.kuyicloud.com
51
 sso_domain = https://sso.kuyicloud.com
57
 # gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
57
 # gdyb_url="http://igb.hsa.gdgov.cn/ebus/sz_prd/hsa/hgs/"
58
 #内蒙古
58
 #内蒙古
59
 # gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
59
 # gdyb_url = "http://10.38.23.105:8090/uif-hsaf-med-api/api/medical/service/"
60
-gdyb_paasid = "sg03_prd"
60
+# gdyb_paasid = "sg03_prd"
61
 # gdyb_paasid = "jm_sc_yjyy"
61
 # gdyb_paasid = "jm_sc_yjyy"
62
 #gdyb_paasid="zh_prd_yrojyy"
62
 #gdyb_paasid="zh_prd_yrojyy"
63
 #gdyb_paasid = "sz_prd_yjyy"
63
 #gdyb_paasid = "sz_prd_yjyy"
64
-# gdyb_paasid = "zq_prd_yjyy"
64
+gdyb_paasid = "zq_prd_yjyy"
65
 
65
 
66
 
66
 
67
 
67
 

+ 22 - 23
controllers/sg/his_api_controller.go Datei anzeigen

2934
 	certificates, _ := c.GetInt64("certificates")
2934
 	certificates, _ := c.GetInt64("certificates")
2935
 	medical_care, _ := c.GetInt64("medical_care")
2935
 	medical_care, _ := c.GetInt64("medical_care")
2936
 	birthday := c.GetString("birthday")
2936
 	birthday := c.GetString("birthday")
2937
-	//age, _ := c.GetInt64("age")
2938
 	id_card := c.GetString("id_card")
2937
 	id_card := c.GetString("id_card")
2939
 	register_type, _ := c.GetInt64("register")
2938
 	register_type, _ := c.GetInt64("register")
2940
 	doctor, _ := c.GetInt64("doctor")
2939
 	doctor, _ := c.GetInt64("doctor")
2941
 	department, _ := c.GetInt64("department")
2940
 	department, _ := c.GetInt64("department")
2942
 	gender, _ := c.GetInt64("sex")
2941
 	gender, _ := c.GetInt64("sex")
2943
-	//phone := c.GetString("phone")
2944
 	registration_fee, _ := c.GetFloat("registration_fee")
2942
 	registration_fee, _ := c.GetFloat("registration_fee")
2945
 	medical_expenses, _ := c.GetFloat("medical_expenses")
2943
 	medical_expenses, _ := c.GetFloat("medical_expenses")
2946
 	social_type, _ := c.GetInt64("social_type")
2944
 	social_type, _ := c.GetInt64("social_type")
2947
 	med_type := c.GetString("social_type")
2945
 	med_type := c.GetString("social_type")
2948
-
2949
 	admin_user_id, _ := c.GetInt64("admin_user_id")
2946
 	admin_user_id, _ := c.GetInt64("admin_user_id")
2950
-
2951
 	timeLayout := "2006-01-02"
2947
 	timeLayout := "2006-01-02"
2952
 	loc, _ := time.LoadLocation("Local")
2948
 	loc, _ := time.LoadLocation("Local")
2953
 	birthdays, _ := time.ParseInLocation(timeLayout+" 15:04:05", birthday+" 00:00:00", loc)
2949
 	birthdays, _ := time.ParseInLocation(timeLayout+" 15:04:05", birthday+" 00:00:00", loc)
2967
 	} else {
2963
 	} else {
2968
 		patient, _ = service.GetPatientByIDTwo(adminInfo.CurrentOrgId, id)
2964
 		patient, _ = service.GetPatientByIDTwo(adminInfo.CurrentOrgId, id)
2969
 	}
2965
 	}
2970
-
2971
 	patientPrescription, _ := service.FindPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
2966
 	patientPrescription, _ := service.FindPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
2972
 	if patientPrescription.ID == 0 {
2967
 	if patientPrescription.ID == 0 {
2973
 		patientPrescription, _ = service.FindLastPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
2968
 		patientPrescription, _ = service.FindLastPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
2974
 	}
2969
 	}
2975
-
2976
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminInfo.CurrentOrgId)
2970
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminInfo.CurrentOrgId)
2977
 	if patient.ID == 0 {
2971
 	if patient.ID == 0 {
2978
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
2972
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
3237
 				}
3231
 				}
3238
 
3232
 
3239
 				body, ioErr := ioutil.ReadAll(resp.Body)
3233
 				body, ioErr := ioutil.ReadAll(resp.Body)
3234
+
3240
 				if ioErr != nil {
3235
 				if ioErr != nil {
3241
 					utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
3236
 					utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
3242
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3237
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3243
 					return
3238
 					return
3244
 				}
3239
 				}
3240
+
3245
 				var respJSON map[string]interface{}
3241
 				var respJSON map[string]interface{}
3242
+
3246
 				if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
3243
 				if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
3247
 					utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
3244
 					utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
3248
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3245
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3250
 				}
3247
 				}
3251
 
3248
 
3252
 				respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
3249
 				respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
3250
+
3253
 				result, _ := json.Marshal(respJSON)
3251
 				result, _ := json.Marshal(respJSON)
3254
 
3252
 
3255
 				if err := json.Unmarshal([]byte(result), &resThree10265); err != nil {
3253
 				if err := json.Unmarshal([]byte(result), &resThree10265); err != nil {
3257
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3255
 					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
3258
 					return
3256
 					return
3259
 				}
3257
 				}
3258
+
3260
 				resThree.ErrMsg = resThree10265.ErrMsg
3259
 				resThree.ErrMsg = resThree10265.ErrMsg
3260
+
3261
 				resThree.Output = resThree10265.Output
3261
 				resThree.Output = resThree10265.Output
3262
+
3262
 				resThree.InfRefmsgid = resThree10265.InfRefmsgid
3263
 				resThree.InfRefmsgid = resThree10265.InfRefmsgid
3263
-				infocode, _ = strconv.ParseInt(resThree10265.Infcode, 10, 64)
3264
 
3264
 
3265
+				infocode, _ = strconv.ParseInt(resThree10265.Infcode, 10, 64)
3265
 			} else {
3266
 			} else {
3266
-
3267
 				result, requestLog := service.Gdyb2201(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_id, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName)
3267
 				result, requestLog := service.Gdyb2201(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_id, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, doctor_info.UserName)
3268
 				saveLog(result, requestLog, "2201", "挂号")
3268
 				saveLog(result, requestLog, "2201", "挂号")
3269
-
3270
 				if miConfig.Code == "H15049901371" {
3269
 				if miConfig.Code == "H15049901371" {
3271
 
3270
 
3272
 					if err := json.Unmarshal([]byte(result), &resThree10265); err != nil {
3271
 					if err := json.Unmarshal([]byte(result), &resThree10265); err != nil {
6961
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
6960
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
6962
 
6961
 
6963
 	var user_name string
6962
 	var user_name string
6964
-	user_name = "xxx"
6963
+	user_name = "高慧裕"
6965
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
6964
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
6966
 		"insutype=" + "310" +
6965
 		"insutype=" + "310" +
6967
 		"&clr_type=" + "11" +
6966
 		"&clr_type=" + "11" +
6968
-		"&setl_optins=" + "定点医保中心" +
6969
-		"&stmt_begndate=" + "2021-03-01" +
6970
-		"&stm_enddate=" + "2021-03-31" +
6971
-		"&medfee_sumamt=" + "11521" +
6972
-		"&fund_pay_sumamt=" + "10166.66" +
6967
+		"&setl_optins=" + "441202" +
6968
+		"&stmt_begndate=" + "2022-02-01" +
6969
+		"&stm_enddate=" + "2022-02-28" +
6970
+		"&medfee_sumamt=" + "155812.88" +
6971
+		"&fund_pay_sumamt=" + "151026.03" +
6973
 		"&acct_pay=" + "0" +
6972
 		"&acct_pay=" + "0" +
6974
-		"&fixmedins_setl_cnt=" + "7" +
6973
+		"&fixmedins_setl_cnt=" + "73" +
6975
 		"&fixmedins_code=" + miConfig.Code +
6974
 		"&fixmedins_code=" + miConfig.Code +
6976
 		"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
6975
 		"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
6977
 		"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
6976
 		"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
7016
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
7015
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
7017
 
7016
 
7018
 	var user_name string
7017
 	var user_name string
7019
-	user_name = "张俊杰"
7018
+	user_name = "高慧裕"
7020
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
7019
 	api := "http://127.0.0.1:9532/" + "gdyb/ten?" +
7021
 		"insutype=" + "390" +
7020
 		"insutype=" + "390" +
7022
 		"&clr_type=" + "11" +
7021
 		"&clr_type=" + "11" +
7023
-		"&setl_optins=" + "定点医保中心" +
7024
-		"&stmt_begndate=" + "2021-03-01" +
7025
-		"&stm_enddate=" + "2021-03-31" +
7026
-		"&medfee_sumamt=" + "209318.43" +
7027
-		"&fund_pay_sumamt=" + "188029.12" +
7022
+		"&setl_optins=" + "441202" +
7023
+		"&stmt_begndate=" + "2022-02-01" +
7024
+		"&stm_enddate=" + "2022-02-28" +
7025
+		"&medfee_sumamt=" + "933920.08" +
7026
+		"&fund_pay_sumamt=" + "904130.94" +
7028
 		"&acct_pay=" + "0" +
7027
 		"&acct_pay=" + "0" +
7029
-		"&fixmedins_setl_cnt=" + "48" +
7028
+		"&fixmedins_setl_cnt=" + "396" +
7030
 		"&fixmedins_code=" + miConfig.Code +
7029
 		"&fixmedins_code=" + miConfig.Code +
7031
 		"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
7030
 		"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs +
7032
 		"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +
7031
 		"&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs +