Parcourir la source

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

csx il y a 4 ans
Parent
révision
d7e9c9d53c
3 fichiers modifiés avec 13 ajouts et 5 suppressions
  1. 2 2
      conf/app.conf
  2. 7 3
      controllers/sg/his_api_controller.go
  3. 4 0
      service/his_service.go

+ 2 - 2
conf/app.conf Voir le fichier

@@ -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 = 9504
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

+ 7 - 3
controllers/sg/his_api_controller.go Voir le fichier

@@ -1644,6 +1644,7 @@ func (c *HisApiController) GetRegisterInfo() {
1644 1644
 		return
1645 1645
 	}
1646 1646
 	config, _ := service.GetMedicalInsuranceConfig(adminInfo.CurrentOrgId)
1647
+	roles, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, admin_user_id)
1647 1648
 
1648 1649
 	if config.IsOpen == 1 {
1649 1650
 		api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + patient.IdCardNo + "&org_name=" + miConfig.OrgName + "&doctor=" + patientPrescription.Doctor + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&certificates=" + strconv.FormatInt(certificates, 10)
@@ -1777,7 +1778,7 @@ func (c *HisApiController) GetRegisterInfo() {
1777 1778
 			api := "http://127.0.0.1:9532/" + "gdyb/two?cert_no=" + IdCardNo + "&insutype=" +
1778 1779
 				insutype + "&psn_no=" + res.Output.Baseinfo.PsnNo +
1779 1780
 				"&org_name=" + miConfig.OrgName + "&doctor=" + patientPrescription.Doctor + "&ipt_otp_no=" + ipt_otp_no +
1780
-				"&dept=" + department.Name + "&fixmedins_code=" + miConfig.Code + "&dept_code=" + department.Number + "&doctor_id=" + doctor_id + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
1781
+				"&dept=" + roles.UserName + "&fixmedins_code=" + miConfig.Code + "&dept_code=" + department.Number + "&doctor_id=" + doctor_id + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
1781 1782
 			resp, requestErr := http.Get(api)
1782 1783
 			if requestErr != nil {
1783 1784
 				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
@@ -1835,7 +1836,8 @@ func (c *HisApiController) GetRegisterInfo() {
1835 1836
 			his.UserOrgId = adminInfo.CurrentOrgId
1836 1837
 			his.Ctime = time.Now().Unix()
1837 1838
 			his.Mtime = time.Now().Unix()
1838
-			his.Status = 1
1839
+			his.Status = 0
1840
+			service.CreateHisPatientTwo(&his)
1839 1841
 
1840 1842
 			lists, _ := service.GetHisPatientInfoList(adminInfo.CurrentOrgId, patient.ID, recordDateTime)
1841 1843
 			if len(lists) == 1 {
@@ -1893,7 +1895,9 @@ func (c *HisApiController) GetRegisterInfo() {
1893 1895
 					return
1894 1896
 
1895 1897
 				} else {
1896
-					service.CreateHisPatientTwo(&his)
1898
+					his.Status = 1
1899
+					service.UpdateHisPatientStatus(&his)
1900
+
1897 1901
 					c.ServeSuccessJSON(map[string]interface{}{
1898 1902
 						"his_info": his,
1899 1903
 					})

+ 4 - 0
service/his_service.go Voir le fichier

@@ -1189,3 +1189,7 @@ func GetDeviceNumberByID(bed_id int64, org_id int64) (device_number models.Devic
1189 1189
 	err = readDb.Model(&models.DeviceNumber{}).Where("id = ? AND org_id = ?", bed_id, org_id).First(&device_number).Error
1190 1190
 	return
1191 1191
 }
1192
+
1193
+func UpdateHisPatientStatus(his *models.VMHisPatient) {
1194
+	writeDb.Save(&his)
1195
+}