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