|
@@ -2256,9 +2256,10 @@ func (this *ZHHisApiController) GetZHInHospitalUnCheck() {
|
2256
|
2256
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInHospitalNoExistDataException)
|
2257
|
2257
|
return
|
2258
|
2258
|
}
|
2259
|
|
- result, requestLog := service.ZHGdyb2404(record.Number, record.PsnNo, miConfig.SecretKey, miConfig.OrgName, miConfig.Code, role.UserName, record.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
|
2260
|
|
- //saveLog()
|
2261
|
|
- saveLog(result, requestLog, "2404", "入院登记撤销")
|
|
2259
|
+
|
|
2260
|
+ result, requestLog := service.Gdyb2302(record.PsnNo, record.Number, miConfig.OrgName, role.UserName, record.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, miConfig.Code, "0000", 0)
|
|
2261
|
+ //saveLog(result,requestLog,)
|
|
2262
|
+ saveLog(result, requestLog, "2302", "月结退明细")
|
2262
|
2263
|
|
2263
|
2264
|
var dat map[string]interface{}
|
2264
|
2265
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
@@ -2266,8 +2267,10 @@ func (this *ZHHisApiController) GetZHInHospitalUnCheck() {
|
2266
|
2267
|
} else {
|
2267
|
2268
|
fmt.Println(err)
|
2268
|
2269
|
}
|
|
2270
|
+
|
2269
|
2271
|
userJSONBytes, _ := json.Marshal(dat)
|
2270
|
|
- var res ResultEmpty
|
|
2272
|
+
|
|
2273
|
+ var res2 ResultEmpty
|
2271
|
2274
|
var resEmpty10265 ResultEmpty10265
|
2272
|
2275
|
if miConfig.Code == "H15049901371" {
|
2273
|
2276
|
if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
|
|
@@ -2276,31 +2279,73 @@ func (this *ZHHisApiController) GetZHInHospitalUnCheck() {
|
2276
|
2279
|
return
|
2277
|
2280
|
}
|
2278
|
2281
|
Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
|
2279
|
|
- res.Infcode = Infcode
|
2280
|
|
- res.RespondTime = resEmpty10265.RespondTime
|
2281
|
|
- res.ErrMsg = resEmpty10265.ErrMsg
|
2282
|
|
- res.Output = resEmpty10265.Output
|
2283
|
|
- res.WarnMsg = resEmpty10265.WarnMsg
|
|
2282
|
+ res2.Infcode = Infcode
|
|
2283
|
+ res2.RespondTime = resEmpty10265.RespondTime
|
|
2284
|
+ res2.ErrMsg = resEmpty10265.ErrMsg
|
|
2285
|
+ res2.Output = resEmpty10265.Output
|
|
2286
|
+ res2.WarnMsg = resEmpty10265.WarnMsg
|
2284
|
2287
|
} else {
|
2285
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2288
|
+ if err := json.Unmarshal(userJSONBytes, &res2); err != nil {
|
2286
|
2289
|
utils.ErrorLog("解析失败:%v", err)
|
2287
|
2290
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2288
|
2291
|
return
|
2289
|
2292
|
}
|
2290
|
2293
|
}
|
2291
|
2294
|
|
2292
|
|
- if res.Infcode == 0 {
|
2293
|
|
- record.Status = 0
|
2294
|
|
- service.CreateHospitalRecord(&record)
|
|
2295
|
+ if res2.Infcode == 0 {
|
2295
|
2296
|
|
2296
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
2297
|
|
- "msg": "撤销入院成功",
|
2298
|
|
- })
|
|
2297
|
+ result, requestLog := service.ZHGdyb2404(record.Number, record.PsnNo, miConfig.SecretKey, miConfig.OrgName, miConfig.Code, role.UserName, record.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs)
|
|
2298
|
+ //saveLog()
|
|
2299
|
+ saveLog(result, requestLog, "2404", "入院登记撤销")
|
|
2300
|
+
|
|
2301
|
+ var dat map[string]interface{}
|
|
2302
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2303
|
+ fmt.Println(dat)
|
|
2304
|
+ } else {
|
|
2305
|
+ fmt.Println(err)
|
|
2306
|
+ }
|
|
2307
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2308
|
+ var res ResultEmpty
|
|
2309
|
+ var resEmpty10265 ResultEmpty10265
|
|
2310
|
+ if miConfig.Code == "H15049901371" {
|
|
2311
|
+ if err := json.Unmarshal(userJSONBytes, &resEmpty10265); err != nil {
|
|
2312
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2313
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2314
|
+ return
|
|
2315
|
+ }
|
|
2316
|
+ Infcode, _ := strconv.ParseInt(resEmpty10265.Infcode, 10, 64)
|
|
2317
|
+ res.Infcode = Infcode
|
|
2318
|
+ res.RespondTime = resEmpty10265.RespondTime
|
|
2319
|
+ res.ErrMsg = resEmpty10265.ErrMsg
|
|
2320
|
+ res.Output = resEmpty10265.Output
|
|
2321
|
+ res.WarnMsg = resEmpty10265.WarnMsg
|
|
2322
|
+ } else {
|
|
2323
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2324
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2325
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2326
|
+ return
|
|
2327
|
+ }
|
|
2328
|
+ }
|
|
2329
|
+
|
|
2330
|
+ if res.Infcode == 0 {
|
|
2331
|
+ record.Status = 0
|
|
2332
|
+ service.CreateHospitalRecord(&record)
|
|
2333
|
+
|
|
2334
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2335
|
+ "msg": "撤销入院成功",
|
|
2336
|
+ })
|
|
2337
|
+
|
|
2338
|
+ } else {
|
|
2339
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2340
|
+ "failed_code": -10,
|
|
2341
|
+ "msg": res.ErrMsg,
|
|
2342
|
+ })
|
|
2343
|
+ }
|
2299
|
2344
|
|
2300
|
2345
|
} else {
|
2301
|
2346
|
this.ServeSuccessJSON(map[string]interface{}{
|
2302
|
|
- "failed_code": -10,
|
2303
|
|
- "msg": res.ErrMsg,
|
|
2347
|
+ "code": -10,
|
|
2348
|
+ "msg": res2.ErrMsg,
|
2304
|
2349
|
})
|
2305
|
2350
|
}
|
2306
|
2351
|
|