Pārlūkot izejas kodu

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

csx 4 gadus atpakaļ
vecāks
revīzija
eae204cec6
2 mainītis faili ar 13 papildinājumiem un 9 dzēšanām
  1. 13 7
      controllers/sz/sz_his_api_controller.go
  2. 0 2
      routers/router.go

+ 13 - 7
controllers/sz/sz_his_api_controller.go Parādīt failu

940
 			ress = append(ress, &res)
940
 			ress = append(ress, &res)
941
 		} else {
941
 		} else {
942
 			isSuccess = false
942
 			isSuccess = false
943
-			//结算报错
944
 			errlog := &models.HisOrderError{
943
 			errlog := &models.HisOrderError{
945
 				UserOrgId:  adminUser.CurrentOrgId,
944
 				UserOrgId:  adminUser.CurrentOrgId,
946
 				Ctime:      time.Now().Unix(),
945
 				Ctime:      time.Now().Unix(),
953
 				Stage:      4,
952
 				Stage:      4,
954
 			}
953
 			}
955
 			service.CreateErrMsgLog(errlog)
954
 			service.CreateErrMsgLog(errlog)
956
-
957
 			c.ServeSuccessJSON(map[string]interface{}{
955
 			c.ServeSuccessJSON(map[string]interface{}{
958
 				"failed_code": -10,
956
 				"failed_code": -10,
959
 				"msg":         res.Transreturnmessage,
957
 				"msg":         res.Transreturnmessage,
960
 			})
958
 			})
961
-
962
-			//c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
963
 			return
959
 			return
964
 		}
960
 		}
965
 		//设置变量,根据变量的值来判断上传是否成功
961
 		//设置变量,根据变量的值来判断上传是否成功
966
 	}
962
 	}
967
-
968
 	if isSuccess == true {
963
 	if isSuccess == true {
969
-
970
 		order := &models.HisOrder{
964
 		order := &models.HisOrder{
971
 			UserOrgId:           adminUser.CurrentOrgId,
965
 			UserOrgId:           adminUser.CurrentOrgId,
972
 			HisPatientId:        0,
966
 			HisPatientId:        0,
1046
 		}
1040
 		}
1047
 		service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
1041
 		service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
1048
 		service.UpDatePrescriptionInfoNumber(adminUser.CurrentOrgId, patient_id, chrg_bchno, recordDateTime)
1042
 		service.UpDatePrescriptionInfoNumber(adminUser.CurrentOrgId, patient_id, chrg_bchno, recordDateTime)
1049
-
1050
 		var total float64
1043
 		var total float64
1051
 		for _, item := range prescriptions {
1044
 		for _, item := range prescriptions {
1052
 			if item.Type == 1 { //药品
1045
 			if item.Type == 1 { //药品
1124
 						"msg": "结算成功",
1117
 						"msg": "结算成功",
1125
 					})
1118
 					})
1126
 				} else {
1119
 				} else {
1120
+					//结算报错
1121
+					errlog := &models.HisOrderError{
1122
+						UserOrgId:  adminUser.CurrentOrgId,
1123
+						Ctime:      time.Now().Unix(),
1124
+						Mtime:      time.Now().Unix(),
1125
+						Number:     chrg_bchno,
1126
+						ErrMsg:     res.Transreturnmessage,
1127
+						Status:     1,
1128
+						PatientId:  patient_id,
1129
+						RecordTime: recordDateTime,
1130
+						Stage:      6,
1131
+					}
1132
+					service.CreateErrMsgLog(errlog)
1127
 					c.ServeSuccessJSON(map[string]interface{}{
1133
 					c.ServeSuccessJSON(map[string]interface{}{
1128
 						"failed_code": -10,
1134
 						"failed_code": -10,
1129
 						"msg":         res.Transreturnmessage,
1135
 						"msg":         res.Transreturnmessage,

+ 0 - 2
routers/router.go Parādīt failu

2
 
2
 
3
 import (
3
 import (
4
 	"gdyb/controllers/sg"
4
 	"gdyb/controllers/sg"
5
-	//"gdyb/controllers/sg"
6
-	//"gdyb/controllers/sz"
7
 
5
 
8
 	//"gdyb/controllers/sz"
6
 	//"gdyb/controllers/sz"
9
 	//"gdyb/controllers/sz"
7
 	//"gdyb/controllers/sz"