Browse Source

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

csx 2 years ago
parent
commit
27f3df5ea9
1 changed files with 6 additions and 7 deletions
  1. 6 7
      controllers/sg/his_api_controller.go

+ 6 - 7
controllers/sg/his_api_controller.go View File

5129
 			verify_number = psn_info.VerifyNumber
5129
 			verify_number = psn_info.VerifyNumber
5130
 
5130
 
5131
 		} else if miConfig.MdtrtareaAdmvs == "350500" {
5131
 		} else if miConfig.MdtrtareaAdmvs == "350500" {
5132
-			if id_card_type == 1{
5132
+			if id_card_type == 1 {
5133
 				psn_info, _ := service.GetPsnByPatientId(id)
5133
 				psn_info, _ := service.GetPsnByPatientId(id)
5134
 				PsnNo = psn_info.PsnNo
5134
 				PsnNo = psn_info.PsnNo
5135
 				PsnCertType = psn_info.PsnCertType
5135
 				PsnCertType = psn_info.PsnCertType
5143
 				idetinfoStr = psn_info.Idetinfo
5143
 				idetinfoStr = psn_info.Idetinfo
5144
 				infocode = 0
5144
 				infocode = 0
5145
 				verify_number = psn_info.VerifyNumber
5145
 				verify_number = psn_info.VerifyNumber
5146
-			}else if id_card_type == 2{
5146
+			} else if id_card_type == 2 {
5147
 
5147
 
5148
 				result, requestLog, errMsgLog := service.FJyb1101(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, patient.IdCardNo, certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
5148
 				result, requestLog, errMsgLog := service.FJyb1101(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, patient.IdCardNo, certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
5149
 				fmt.Println(errMsgLog)
5149
 				fmt.Println(errMsgLog)
5150
 				saveLog(result, requestLog, "1101", "人员基本信息获取")
5150
 				saveLog(result, requestLog, "1101", "人员基本信息获取")
5151
 
5151
 
5152
 				if err := json.Unmarshal([]byte(result), &res); err != nil {
5152
 				if err := json.Unmarshal([]byte(result), &res); err != nil {
5153
-						utils.ErrorLog("解析失败:%v", err)
5154
-						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
5155
-						return
5153
+					utils.ErrorLog("解析失败:%v", err)
5154
+					c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
5155
+					return
5156
 				}
5156
 				}
5157
 
5157
 
5158
-
5159
 				PsnNo = res.Output.Baseinfo.PsnNo
5158
 				PsnNo = res.Output.Baseinfo.PsnNo
5160
 				PsnCertType = res.Output.Baseinfo.PsnCertType
5159
 				PsnCertType = res.Output.Baseinfo.PsnCertType
5161
 				Certno = res.Output.Baseinfo.Certno
5160
 				Certno = res.Output.Baseinfo.Certno
5446
 				psn_info, _ := service.GetPsnByPatientId(id)
5445
 				psn_info, _ := service.GetPsnByPatientId(id)
5447
 				var cert_no string
5446
 				var cert_no string
5448
 				if id_card_type == 1 {
5447
 				if id_card_type == 1 {
5449
-					cert_no =
5448
+					cert_no = strings.Split(psn_info.CardInfo, "|")[0]
5450
 				} else {
5449
 				} else {
5451
 					cert_no = strings.Split(psn_info.CardInfo, "|")[1]
5450
 					cert_no = strings.Split(psn_info.CardInfo, "|")[1]
5452
 
5451