ソースを参照

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

csx 3 年 前
コミット
4babd0b3bd
共有4 個のファイルを変更した7 個の追加7 個の削除を含む
  1. 1 1
      controllers/sg/gdyb_controller.go
  2. 2 2
      controllers/sg/his_api_controller.go
  3. 1 1
      routers/router.go
  4. 3 3
      service/gdyb_service.go

+ 1 - 1
controllers/sg/gdyb_controller.go ファイルの表示

@@ -118,7 +118,7 @@ func (c *GdybController) PostTwo() {
118 118
 
119 119
 	id_card_type, _ := c.GetInt64("id_card_type")
120 120
 
121
-	result, _ := service.Gdyb2201(psnNo, insutype, certNo, org_name, doctor, ipt_otp_no, dept, fixmedins_code, dept_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type)
121
+	result, _ := service.Gdyb2201(psnNo, insutype, certNo, org_name, doctor, ipt_otp_no, dept, fixmedins_code, dept_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, "")
122 122
 
123 123
 	var dat map[string]interface{}
124 124
 	if err := json.Unmarshal([]byte(result), &dat); err == nil {

+ 2 - 2
controllers/sg/his_api_controller.go ファイルの表示

@@ -1801,7 +1801,7 @@ func (c *HisApiController) GetRegisterInfo() {
1801 1801
 	config, _ := service.GetMedicalInsuranceConfig(adminInfo.CurrentOrgId)
1802 1802
 	roles, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, admin_user_id)
1803 1803
 
1804
-	//doctor_info, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, doctor)
1804
+	doctor_info, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, doctor)
1805 1805
 
1806 1806
 	//就诊结算未完成,不能进行二次挂号
1807 1807
 	his, _ := service.GetHisPatientInfoTwo(adminInfo.CurrentOrgId, patient.ID, recordDateTime)
@@ -1992,7 +1992,7 @@ func (c *HisApiController) GetRegisterInfo() {
1992 1992
 				}
1993 1993
 
1994 1994
 			} else {
1995
-				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)
1995
+				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)
1996 1996
 				saveLog(result, requestLog, "2201", "挂号")
1997 1997
 				if err := json.Unmarshal([]byte(result), &resThree); err != nil {
1998 1998
 					utils.ErrorLog("解析失败:%v", err)

+ 1 - 1
routers/router.go ファイルの表示

@@ -18,7 +18,7 @@ func init() {
18 18
 		AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://localhost:9529", "http://localhost:9531", "http://xt.test.shengws.com", "http://new_mobile.test.sgjyun.com", "https://xt.test.shengws.com", "http://xt.test.sgjyun.com", "https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com", "https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com", "http://mobile.sgjyun.com", "http://mobile.kuyicloud.com"},
19 19
 		//AllowOrigins:     []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://xt.test.shengws.com","https://xt.test.shengws.com", "http://xt.test.sgjyun.com","https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com","https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com","http://mobile.sgjyun.com","http://mobile.kuyicloud.com"},
20 20
 		AllowMethods:     []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
21
-		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission"},
21
+		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission", "Content-Security-Policy"},
22 22
 		ExposeHeaders:    []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
23 23
 		AllowCredentials: true,
24 24
 	}))

+ 3 - 3
service/gdyb_service.go ファイルの表示

@@ -338,7 +338,7 @@ func Gdyb1101A(certNo string, org_name string, doctor string, fixmedins_code str
338 338
 }
339 339
 
340 340
 // 门诊挂号
341
-func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doctor string, ipt_otp_no string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, id_card_type int64) (string, string) {
341
+func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, opera string, ipt_otp_no string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, id_card_type int64, doctor_name string) (string, string) {
342 342
 	// 生成签名
343 343
 	nonce := GetRandomString(32)
344 344
 	timestamp := time.Now().Unix()
@@ -347,7 +347,7 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
347 347
 	timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
348 348
 
349 349
 	// 生成输入报文
350
-	inputMessage := SetInputMessage(nonce, timestamp, org_name, dept, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
350
+	inputMessage := SetInputMessage(nonce, timestamp, org_name, opera, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
351 351
 	input := make(map[string]interface{})
352 352
 	inputData := make(map[string]interface{})
353 353
 	inputMessage["infno"] = "2201"        // 交易编码
@@ -365,7 +365,7 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
365 365
 
366 366
 	inputData["ipt_otp_no"] = ipt_otp_no // 住院/门诊号
367 367
 	inputData["atddr_no"] = doctor_id    // 医师编码
368
-	inputData["dr_name"] = doctor        // 医师姓名
368
+	inputData["dr_name"] = doctor_name   // 医师姓名
369 369
 	inputData["dept_code"] = dept_code   // 科室编码
370 370
 	inputData["dept_name"] = dept        // 科室名称
371 371
 	inputData["caty"] = "A03.06"         // 科别