Browse Source

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

张保健 3 years ago
parent
commit
26a5e1d4b7
3 changed files with 19 additions and 13 deletions
  1. 4 4
      conf/app.conf
  2. 9 3
      controllers/sg/his_api_controller.go
  3. 6 6
      service/gdyb_service.go

+ 4 - 4
conf/app.conf View File

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9532
3
-runmode = dev
3
+runmode = prod
4 4
 
5 5
 #
6 6
 copyrequestbody = true
@@ -44,7 +44,7 @@ appsecret="61ee2e6268497d5aa9de0b0187c39aea"
44 44
 
45 45
 
46 46
 [prod]
47
-org_id = 9919
47
+org_id = 10106
48 48
 mobile_token_expiration_second = 86400
49 49
 httpdomain = https://api.xt.kuyicloud.com
50 50
 sso_domain = https://sso.kuyicloud.com
@@ -53,8 +53,8 @@ front_end_domain = "https://xt.kuyicloud.com/#"
53 53
 #url  = "http://192.168.1.228:17001/szsi-portal/transData"
54 54
 url = "http://192.168.1.88:6666/szsi-portal/transData"
55 55
 gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
56
-gdyb_paasid = "sg03_prd"
57
-#gdyb_paasid = "jm_sc_yjyy"
56
+#gdyb_paasid = "sg03_prd"
57
+gdyb_paasid = "jm_sc_yjyy"
58 58
 #gdyb_paasid = "zh_prd_yjyy"
59 59
 
60 60
 readmysqlhost = shengws1.mysql.rds.aliyuncs.com

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

@@ -1875,10 +1875,16 @@ func (c *HisApiController) GetUploadInfo() {
1875 1875
 
1876 1876
 	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
1877 1877
 	his, _ := service.GetNewHisPatientInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
1878
-	patientPrescription, _ := service.FindHisPatientPrescriptionInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
1878
+	var patientPrescription models.HisPrescriptionInfo
1879
+	patientPrescription, _ = service.FindHisPatientPrescriptionInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
1880
+	if patientPrescription.ID == 0 {
1881
+		patientPrescription, _ = service.FindLastPatientPrescriptionInfo(adminUser.CurrentOrgId, id, recordDateTime)
1882
+	}
1879 1883
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
1880 1884
 	department, _ := service.GetDepartMentDetail(patientPrescription.Departments)
1881 1885
 
1886
+	doctor_info, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, patientPrescription.DoctorId)
1887
+
1882 1888
 	diagnosis_ids := strings.Split(diagnosis_id, ",")
1883 1889
 
1884 1890
 	var config []*models.HisXtDiagnoseConfig
@@ -1892,9 +1898,9 @@ func (c *HisApiController) GetUploadInfo() {
1892 1898
 	if tempOrder.ID == 0 {
1893 1899
 		var result string
1894 1900
 		if miConfig.InsuplcAdmdvs == "440781" { //
1895
-			result = service.Gdyb2203A(his.PsnNo, his.Number, patientPrescription.Doctor, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), patientPrescription.DoctorId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
1901
+			result = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
1896 1902
 		} else {
1897
-			result = service.Gdyb2203(his.PsnNo, his.Number, patientPrescription.Doctor, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), patientPrescription.DoctorId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
1903
+			result = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
1898 1904
 
1899 1905
 		}
1900 1906
 

+ 6 - 6
service/gdyb_service.go View File

@@ -135,12 +135,12 @@ func Gdyb1101(certNo string, org_name string, doctor string, fixmedins_code stri
135 135
 	gdyb_url := beego.AppConfig.String("gdyb_url")
136 136
 	gdyb_paasid := beego.AppConfig.String("gdyb_paasid")
137 137
 
138
-	DllDef := syscall.MustLoadDLL("PbJson.dll")
139
-	Iinit := DllDef.MustFindProc("Iyh_hb_sctr")
140
-	var str3 string
141
-	ret, _, _ := Iinit.Call(StrPtr("1101"), StrPtr(string(bytesData)), StrPtr(str3))
142
-	fmt.Println(ret)
143
-	fmt.Println(str3)
138
+	//DllDef := syscall.MustLoadDLL("PbJson.dll")
139
+	//Iinit := DllDef.MustFindProc("Iyh_hb_sctr")
140
+	//var str3 string
141
+	//ret, _, _ := Iinit.Call(StrPtr("1101"), StrPtr(string(bytesData)), StrPtr(str3))
142
+	//fmt.Println(ret)
143
+	//fmt.Println(str3)
144 144
 
145 145
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/1101"
146 146
 	url := gdyb_url + "1101"