Selaa lähdekoodia

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

csx 4 vuotta sitten
vanhempi
commit
bf368acf76
2 muutettua tiedostoa jossa 11 lisäystä ja 1 poistoa
  1. 7 1
      controllers/sz/sz_his_api_controller.go
  2. 4 0
      enums/error_code.go

+ 7 - 1
controllers/sz/sz_his_api_controller.go Näytä tiedosto

@@ -1691,6 +1691,13 @@ func (c *SZHisApiController) GetSettleInfo() {
1691 1691
 
1692 1692
 	patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
1693 1693
 
1694
+	sick, _ := service.FindSickById(patientPrescription.SickType)
1695
+
1696
+	if sick.ID == 0 {
1697
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamSickTypeWrong)
1698
+		return
1699
+	}
1700
+
1694 1701
 	adminRole_two, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, patientPrescription.DoctorId)
1695 1702
 
1696 1703
 	adminRole, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
@@ -1968,7 +1975,6 @@ func (c *SZHisApiController) GetSettleInfo() {
1968 1975
 			//根据业务的人员信息跟设备读社保卡获取的信息进行匹配,判断是否为同一个人,相同则进行挂号操作,不同则报错
1969 1976
 			tempPatient, _ := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
1970 1977
 			if tempPatient.ID == patient_id {
1971
-				sick, _ := service.FindSickById(patientPrescription.SickType)
1972 1978
 				result_three := service.SzybFY005(doctor_name, doctor_code, miConfig.Code, total, yiliao_number, verifyCode, number, mz_number, version_code, drug_doctor_code, drug_doctor_name, his.MedicalTreatmentType, sick.CountryCode)
1973 1979
 				var dat map[string]interface{}
1974 1980
 				if err := json.Unmarshal([]byte(result_three), &dat); err == nil {

+ 4 - 0
enums/error_code.go Näytä tiedosto

@@ -245,6 +245,8 @@ const ( // ErrorCode
245 245
 	ErrorDoctorLoginFaildParamWrong   = 30004
246 246
 
247 247
 	ErrorNoReadCardException = 30005
248
+
249
+	ErrorCodeParamSickTypeWrong = 30006
248 250
 )
249 251
 
250 252
 var ErrCodeMsgs = map[int]string{
@@ -472,6 +474,8 @@ var ErrCodeMsgs = map[int]string{
472 474
 	ErrorDoctorLoginFaildParamWrong:    "登记失败",
473 475
 
474 476
 	ErrorNoReadCardException: "无法读取除社保卡以外的卡",
477
+
478
+	ErrorCodeParamSickTypeWrong: "医生所开处方的疾病类型不能为空",
475 479
 }
476 480
 
477 481
 type SGJError struct {