|
@@ -1846,7 +1846,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
1846
|
1846
|
|
1847
|
1847
|
} else {
|
1848
|
1848
|
result, requestLog := service.Gdyb1101C(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type, "", certificates)
|
1849
|
|
- saveLog(result, requestLog, "1101")
|
|
1849
|
+ saveLog(result, requestLog, "1101", "人员基本信息获取")
|
1850
|
1850
|
if err := json.Unmarshal([]byte(result), &res); err != nil {
|
1851
|
1851
|
utils.ErrorLog("解析失败:%v", err)
|
1852
|
1852
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -1985,7 +1985,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
1985
|
1985
|
|
1986
|
1986
|
} else {
|
1987
|
1987
|
result, requestLog := service.Gdyb2201(res.Output.Baseinfo.PsnNo, insutype, IdCardNo, miConfig.OrgName, roles.UserName, ipt_otp_no, department.Name, miConfig.Code, department.Number, doctor_id, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, id_card_type)
|
1988
|
|
- saveLog(result, requestLog, "2201")
|
|
1988
|
+ saveLog(result, requestLog, "2201", "挂号")
|
1989
|
1989
|
if err := json.Unmarshal([]byte(result), &res); err != nil {
|
1990
|
1990
|
utils.ErrorLog("解析失败:%v", err)
|
1991
|
1991
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -2211,7 +2211,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2211
|
2211
|
} else {
|
2212
|
2212
|
result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
2213
|
2213
|
}
|
2214
|
|
- saveLog(result, requestLog, "2203")
|
|
2214
|
+ saveLog(result, requestLog, "2203", "上传就诊信息")
|
2215
|
2215
|
var respJSON2 map[string]interface{}
|
2216
|
2216
|
if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
|
2217
|
2217
|
utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
@@ -2363,7 +2363,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2363
|
2363
|
} else {
|
2364
|
2364
|
fmt.Println(err)
|
2365
|
2365
|
}
|
2366
|
|
- saveLog(result, request_log, "2204")
|
|
2366
|
+ saveLog(result, request_log, "2204", "上传费用明细")
|
2367
|
2367
|
userJSONBytes, _ := json.Marshal(dat)
|
2368
|
2368
|
|
2369
|
2369
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
@@ -2596,7 +2596,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2596
|
2596
|
fmt.Println(err)
|
2597
|
2597
|
}
|
2598
|
2598
|
|
2599
|
|
- saveLog(result2, src_resquest, "2207")
|
|
2599
|
+ saveLog(result2, src_resquest, "2207", "结算")
|
2600
|
2600
|
|
2601
|
2601
|
userJSONBytes, _ := json.Marshal(dat)
|
2602
|
2602
|
|
|
@@ -2835,7 +2835,7 @@ func (c *HisApiController) GetUploadInfo() {
|
2835
|
2835
|
fmt.Println(err)
|
2836
|
2836
|
}
|
2837
|
2837
|
|
2838
|
|
- saveLog(result2, src_resquest, "2207")
|
|
2838
|
+ saveLog(result2, src_resquest, "2207", "结算")
|
2839
|
2839
|
|
2840
|
2840
|
userJSONBytes, _ := json.Marshal(dat)
|
2841
|
2841
|
|
|
@@ -3573,7 +3573,7 @@ func (c *HisApiController) GetPreUploadInfo() {
|
3573
|
3573
|
result, requestLog = service.Gdyb2203A(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.ContentCode, sickConfig.ClassName, roles.UserName, config)
|
3574
|
3574
|
} else {
|
3575
|
3575
|
result, requestLog = service.Gdyb2203(his.PsnNo, his.Number, doctor_info.UserName, department.Name, miConfig.OrgName, strconv.FormatInt(reg_type, 10), doctor_info.AdminUserId, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sickConfig.CountryCode, sickConfig.ClassName, roles.UserName, config)
|
3576
|
|
- saveLog(result, requestLog, "2203")
|
|
3576
|
+ saveLog(result, requestLog, "2203", "上传就诊信息")
|
3577
|
3577
|
var respJSON2 map[string]interface{}
|
3578
|
3578
|
if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
|
3579
|
3579
|
utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
@@ -3714,7 +3714,7 @@ func (c *HisApiController) GetPreUploadInfo() {
|
3714
|
3714
|
} else {
|
3715
|
3715
|
fmt.Println(err)
|
3716
|
3716
|
}
|
3717
|
|
- saveLog(result, request_log, "2204")
|
|
3717
|
+ saveLog(result, request_log, "2204", "上传费用明细")
|
3718
|
3718
|
userJSONBytes, _ := json.Marshal(dat)
|
3719
|
3719
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
3720
|
3720
|
utils.ErrorLog("解析失败:%v", err)
|
|
@@ -3933,7 +3933,7 @@ func (c *HisApiController) GetPreUploadInfo() {
|
3933
|
3933
|
} else {
|
3934
|
3934
|
fmt.Println(err)
|
3935
|
3935
|
}
|
3936
|
|
- saveLog(result, request_log, "2206")
|
|
3936
|
+ saveLog(result, request_log, "2206", "预结算")
|
3937
|
3937
|
userJSONBytes, _ := json.Marshal(dat)
|
3938
|
3938
|
|
3939
|
3939
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
@@ -4337,7 +4337,7 @@ func (c *HisApiController) Refund() {
|
4337
|
4337
|
} else {
|
4338
|
4338
|
fmt.Println(err)
|
4339
|
4339
|
}
|
4340
|
|
- saveLog(result, src_resquest, "2208")
|
|
4340
|
+ saveLog(result, src_resquest, "2208", "退费")
|
4341
|
4341
|
userJSONBytes, _ := json.Marshal(dat)
|
4342
|
4342
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
4343
|
4343
|
utils.ErrorLog("解析失败:%v", err)
|
|
@@ -4391,7 +4391,7 @@ func (c *HisApiController) Refund() {
|
4391
|
4391
|
fmt.Println(err)
|
4392
|
4392
|
}
|
4393
|
4393
|
|
4394
|
|
- saveLog(result2, src_request, "2205")
|
|
4394
|
+ saveLog(result2, src_request, "2205", "撤销明细")
|
4395
|
4395
|
|
4396
|
4396
|
userJSONBytes, _ := json.Marshal(dat)
|
4397
|
4397
|
|
|
@@ -6623,7 +6623,7 @@ func saveRegisterLog(result string) {
|
6623
|
6623
|
|
6624
|
6624
|
}
|
6625
|
6625
|
|
6626
|
|
-func saveLog(result string, request string, infno string) {
|
|
6626
|
+func saveLog(result string, request string, infno string, desc string) {
|
6627
|
6627
|
|
6628
|
6628
|
org_id, _ := beego.AppConfig.Int64("org_id")
|
6629
|
6629
|
miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
|
|
@@ -6633,6 +6633,12 @@ func saveLog(result string, request string, infno string) {
|
6633
|
6633
|
year := time.Now().Format("2006")
|
6634
|
6634
|
month = time.Now().Format("01")
|
6635
|
6635
|
day := time.Now().Format("02")
|
|
6636
|
+ hour := time.Now().Format("15")
|
|
6637
|
+ min := time.Now().Format("04")
|
|
6638
|
+ sec := time.Now().Format("05")
|
|
6639
|
+
|
|
6640
|
+ result_time := year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec
|
|
6641
|
+
|
6636
|
6642
|
file := strconv.FormatInt(org_id, 10) + "_" + year + month + day + "_log"
|
6637
|
6643
|
file_name := file + ".txt"
|
6638
|
6644
|
file_path := miConfig.OrgName + "日志" + "/" + file_name
|
|
@@ -6643,7 +6649,7 @@ func saveLog(result string, request string, infno string) {
|
6643
|
6649
|
if err != nil {
|
6644
|
6650
|
fmt.Println("read fail")
|
6645
|
6651
|
}
|
6646
|
|
- content := infno + "\r\n" + "\r\n" + "\r\n" + "\r\n" + request + "\r\n" + "\r\n" + "\r\n" + "\r\n" + result
|
|
6652
|
+ content := "\r\n" + "\r\n" + "\r\n" + result_time + " " + "【 " + desc + infno + "入参" + " 】:" + "\r\n" + request + "\r\n" + result_time + " " + "【 " + desc + infno + "出参" + " 】:" + "\r\n" + result
|
6647
|
6653
|
n, _ := f.Seek(0, 2)
|
6648
|
6654
|
_, err = f.WriteAt([]byte(content), n)
|
6649
|
6655
|
|