Selaa lähdekoodia

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

csx 4 vuotta sitten
vanhempi
commit
87d56f8d8c
1 muutettua tiedostoa jossa 17 lisäystä ja 1 poistoa
  1. 17 1
      controllers/zh/zh_his_api_controller.go

+ 17 - 1
controllers/zh/zh_his_api_controller.go Näytä tiedosto

@@ -637,6 +637,17 @@ func (c *ZHHisApiController) GetSettleInfo() {
637 637
 	var is390 int = 0
638 638
 	var is310 int = 0
639 639
 
640
+	if record.ID == 0 {
641
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
642
+		return
643
+
644
+	}
645
+
646
+	if record.InHospitalStatus == 1 && record.OutHospitalStatus == 1 {
647
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHospitalNoExistDataException)
648
+		return
649
+	}
650
+
640 651
 	for _, item := range rf {
641 652
 		if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
642 653
 			insutypes = append(insutypes, item.Insutype)
@@ -836,7 +847,12 @@ func (c *ZHHisApiController) GetUploadInfo() {
836 847
 	roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
837 848
 	record, _ := service.GetInHospitalRecord(in_hospital_id)
838 849
 
839
-	if record.InHospitalStatus == 1 && record.OutHospitalStatus == 1 {
850
+	if record.ID == 0 {
851
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
852
+		return
853
+	}
854
+
855
+	if record.InHospitalStatus == 1 && record.OutHospitalStatus == 0 {
840 856
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHospitalNoExistDataException)
841 857
 		return
842 858
 	}