package sg import ( "encoding/json" "fmt" "gdyb/controllers" "gdyb/models" "gdyb/service" "gdyb/utils" "github.com/astaxie/beego" "io/ioutil" ) type GdybController struct { controllers.BaseAuthAPIController } func GdybRegistRouters() { beego.Router("/gdyb/1101", &GdybController{}, "get:PostOne") beego.Router("/gdyb/2201", &GdybController{}, "get:PostTwo") beego.Router("/gdyb/2202", &GdybController{}, "get:PostThree") beego.Router("/gdyb/2203", &GdybController{}, "post:PostFour") beego.Router("/gdyb/2204", &GdybController{}, "post:PostFive") beego.Router("/gdyb/six", &GdybController{}, "get:PostSix") beego.Router("/gdyb/2206", &GdybController{}, "get:PostSeven") beego.Router("/gdyb/2207", &GdybController{}, "get:PostEight") beego.Router("/gdyb/2208", &GdybController{}, "get:PostNine") beego.Router("/gdyb/ten", &GdybController{}, "get:PostTen") beego.Router("/gdyb/eleven", &GdybController{}, "get:PostEleven") beego.Router("/gdyb/twelve", &GdybController{}, "get:PostTwelve") beego.Router("/gdyb/5203", &GdybController{}, "get:Post5203") beego.Router("/gdyb/4101", &GdybController{}, "post:Post4101") beego.Router("/gdyb/5301", &GdybController{}, "get:Post5301") } func (c *GdybController) Post5301() { psnNo := c.GetString("psn_no") org_name := c.GetString("org_name") doctor := c.GetString("doctor") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") result := service.Gdyb5301(psnNo,org_name,doctor,fixmedins_code,insuplc_admdvs,mdtrtarea_admvs,secret_key,0) var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } saveLogq(result, "", "5301", "备案") //saveLog(result, "", "4101", "上传明细清单") c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) Post4101() { body, _ := ioutil.ReadAll(c.Ctx.Request.Body) var respJSON map[string]interface{} if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil { utils.ErrorLog("接口返回数据解析JSON失败: %v", err) return } struct4101UserJSONBytes, _ := json.Marshal(respJSON["struct4101"]) var struct4101 service.Struct4101 if err := json.Unmarshal(struct4101UserJSONBytes, &struct4101); err != nil { utils.ErrorLog("解析失败:%v", err) return } ppUserJSONBytes, _ := json.Marshal(respJSON["pp"]) var pp models.PublicParams if err := json.Unmarshal(ppUserJSONBytes, &pp); err != nil { utils.ErrorLog("解析失败:%v", err) return } result, _ := service.Gdyb4101(struct4101, pp.SecretKey, pp.FixmedinsName, pp.OpterName, pp.FixmedinsCode, pp.InsuplcAdmdvs, pp.MdtrtareaAdmvs, 0,0) var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } saveLogq(result, "", "4101", "上传明细清单") //saveLog(result, "", "4101", "上传明细清单") c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } type Result struct { ErrMsg interface{} `json:"err_msg"` InfRefmsgid string `json:"inf_refmsgid"` Infcode int64 `json:"infcode"` Output struct { Baseinfo struct { Age float64 `json:"age"` Brdy string `json:"brdy"` Certno string `json:"certno"` Gend string `json:"gend"` Naty string `json:"naty"` PsnCertType string `json:"psn_cert_type"` PsnName string `json:"psn_name"` PsnNo string `json:"psn_no"` } `json:"baseinfo"` Idetinfo []interface{} `json:"idetinfo"` Iinfo []struct { Balc int64 `json:"balc"` CvlservFlag string `json:"cvlserv_flag"` EmpName string `json:"emp_name"` InsuplcAdmdvs string `json:"insuplc_admdvs"` Insutype string `json:"insutype"` PausInsuDansuplcAdmdvs string `json:"paus_insu_dansuplc_admdvs"` PausInsuDate interface{} `json:"paus_insu_date"` PsnInsuDate string `json:"psn_insu_date"` PsnInsuStas string `json:"psn_insu_stas"` PsnType string `json:"psn_type"` } `json:"iinfo"` } `json:"output"` RefmsgTime string `json:"refmsg_time"` RespondTime string `json:"respond_time"` Signtype interface{} `json:"signtype"` WarnInfo interface{} `json:"warn_info"` } func (c *GdybController) PostOne() { certNo := c.GetString("cert_no") org_name := c.GetString("org_name") doctor := c.GetString("doctor") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") id_card_type, _ := c.GetInt64("id_card_type") card_sn := c.GetString("card_sn") certificates := c.GetString("certificates") psn_name := c.GetString("name") result, inputLog := service.Gdyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn, certificates, psn_name) var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { } else { } var dat2 map[string]interface{} if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil { } else { } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, "log": dat2, }) } func (c *GdybController) PostTwo() { psnNo := c.GetString("psn_no") insutype := c.GetString("insutype") certNo := c.GetString("cert_no") org_name := c.GetString("org_name") operator := c.GetString("operator") ipt_otp_no := c.GetString("ipt_otp_no") dept := c.GetString("dept") fixmedins_code := c.GetString("fixmedins_code") dept_code := c.GetString("dept_code") doctor_id := c.GetString("doctor_id") doctor_name := c.GetString("doctor_name") verify_number := c.GetString("verify_number") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") id_card_type, _ := c.GetInt64("id_card_type") record_time := c.GetString("record_time") result, inputLog := service.Gdyb2201A(psnNo, insutype, certNo, org_name, operator, ipt_otp_no, dept, fixmedins_code, dept_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, doctor_name, record_time, verify_number,0) saveLogq(result, inputLog, "2201", "退号") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { } else { } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostThree() { psnNo := c.GetString("psn_no") mdtrtId := c.GetString("mdtrt_id") iptOtpNo := c.GetString("ipt_otp_no") org_name := c.GetString("org_name") operator := c.GetString("operator") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") fixmedins_code := c.GetString("fixmedins_code") admin_user_id,_ := c.GetInt64("admin_user_id") result, requestLog := service.Gdyb2202(psnNo, mdtrtId, iptOtpNo, org_name, operator, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code,admin_user_id) saveLogq(result, requestLog, "2202", "退号") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { } else { } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostFour() { body, _ := ioutil.ReadAll(c.Ctx.Request.Body) var respJSON map[string]interface{} if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil { utils.ErrorLog("接口返回数据解析JSON失败: %v", err) return } userJSONBytes, _ := json.Marshal(respJSON["config"]) var config []*models.HisXtDiagnoseConfig if err := json.Unmarshal(userJSONBytes, &config); err != nil { utils.ErrorLog("解析失败:%v", err) return } fmt.Println(respJSON["psn_no"].(string)) fmt.Println(respJSON["mdtrt_id"].(string)) psnNo := respJSON["psn_no"].(string) mdtrtId := respJSON["mdtrt_id"].(string) doctor := respJSON["doctor"].(string) department := respJSON["department"].(string) org_name := respJSON["org_name"].(string) med_type := respJSON["med_type"].(string) doctor_id := respJSON["doctor_id"].(string) fixmedins_code := respJSON["fixmedins_code"].(string) sick_code := respJSON["sick_code"].(string) sick_name := respJSON["sick_name"].(string) dept := respJSON["dept"].(string) insuplc_admdvs := respJSON["insuplc_admdvs"].(string) mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string) secret_key := respJSON["secret_key"].(string) begin_time := respJSON["begin_time"].(string) new_doctor_name := respJSON["new_doctor_name"].(string) result, request_log := service.Gdyb2203c(psnNo, mdtrtId, doctor, department, org_name, med_type, doctor_id, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name, dept, config, begin_time,new_doctor_name) saveLogq(result, request_log, "2203", "上传就诊信息") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { } else { } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } type All struct { HisPrescription HisPrescription mdtrt_id string psn_no string } type HisPrescription struct { ID int64 `gorm:"column:id" json:"id" form:"id"` UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"` RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"` PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"` HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"` Status int64 `gorm:"column:status" json:"status" form:"status"` Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"` Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"` Number string `gorm:"column:number" json:"number" form:"number"` Type int64 `gorm:"column:type" json:"type" form:"type"` Doctor int64 `gorm:"column:doctor" json:"doctor" form:"doctor"` Creator int64 `gorm:"column:creator" json:"creator" form:"creator"` Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"` HisDoctorAdviceInfo []*models.HisDoctorAdviceInfo `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"advices"` HisPrescriptionProject []*models.HisPrescriptionProject `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"project"` } func (c *GdybController) PostFive() { body, _ := ioutil.ReadAll(c.Ctx.Request.Body) var respJSON map[string]interface{} if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil { utils.ErrorLog("接口返回数据解析JSON失败: %v", err) return } userJSONBytes, _ := json.Marshal(respJSON["pre"]) var hp []*models.HisPrescription if err := json.Unmarshal(userJSONBytes, &hp); err != nil { utils.ErrorLog("解析失败:%v", err) return } fmt.Println(respJSON["psn_no"].(string)) fmt.Println(respJSON["mdtrt_id"].(string)) fmt.Println(respJSON["chrg_bchno"].(string)) fmt.Println(respJSON["org_name"].(string)) fmt.Println(respJSON["doctor"].(string)) fmt.Println(respJSON["dept"].(string)) fmt.Println(respJSON["fixmedins_code"].(string)) fmt.Println(respJSON["dept_code"].(string)) fmt.Println(respJSON["doctor_id"].(string)) fmt.Println(respJSON["insuplc_admdvs"].(string)) fmt.Println(respJSON["mdtrtarea_admvs"].(string)) fmt.Println(respJSON["secret_key"].(string)) result, requestLog := service.Gdyb2204For441799(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string), respJSON["doctor"].(string), respJSON["dept"].(string), respJSON["fixmedins_code"].(string), respJSON["dept_code"].(string), respJSON["new_doctor_name"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string), respJSON["secret_key"].(string), respJSON["balance_accounts_type"].(string), respJSON["doctor_id"].(string), respJSON["diag_code"].(string)) saveLogq(result, requestLog, "2204", "上传明细") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostSix() { psnNo := c.GetString("psn_no") mdtrtId := c.GetString("mdtrt_id") chrgBchno := c.GetString("chrg_bchno") org_name := c.GetString("org_name") operator := c.GetString("doctor") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") fixmedins_code := c.GetString("fixmedins_code") //fixmedins_code := c.Get("fixmedins_code") admin_user_id, _ := c.GetInt64("admin_user_id") result, requestlog := service.Gdyb2205(psnNo, mdtrtId, chrgBchno, org_name, operator, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code,admin_user_id) saveLogq(result, requestlog, "2205", "上传就诊信息") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostSeven() { psnNo := c.GetString("psn_no") mdtrtId := c.GetString("mdtrt_id") chrgBchno := c.GetString("chrg_bchno") certNo := c.GetString("cert_no") insutype := c.GetString("insutype") total := c.GetString("total") org_name := c.GetString("org_name") operator := c.GetString("operator") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") med_type := c.GetString("med_type") id_card_type, _ := c.GetInt64("id_card_type") certificates, _ := c.GetInt64("certificates") result, log := service.Gdyb2206(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, operator, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, 0, 0, 0, 0, certificates,0) saveLogq(result, log, "2206", "预结算") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostEight() { psnNo := c.GetString("psn_no") mdtrtId := c.GetString("mdtrt_id") chrgBchno := c.GetString("chrg_bchno") certNo := c.GetString("cert_no") insutype := c.GetString("insutype") total := c.GetString("total") org_name := c.GetString("org_name") operator := c.GetString("operator") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") med_type := c.GetString("med_type") id_card_type, _ := c.GetInt64("id_card_type") verify_number := c.GetString("verify_number") acct_used_flag := c.GetString("acct_used_flag") fulamt_ownpay_amt, _ := c.GetFloat("fulamt_ownpay_amt") overlmt_selfpay, _ := c.GetFloat("overlmt_selfpay") preselfpay_amt, _ := c.GetFloat("preselfpay_amt") inscp_scp_amt, _ := c.GetFloat("inscp_scp_amt") result, srcRequest := service.Gdyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, operator, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, 1, acct_used_flag, verify_number,0) saveLogq(result, srcRequest, "2207", "结算") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostNine() { psnNo := c.GetString("psn_no") mdtrtId := c.GetString("mdtrt_id") setlId := c.GetString("setl_id") org_name := c.GetString("org_name") operator := c.GetString("operator") secret_key := c.GetString("secret_key") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") result, srcRequest := service.Gdyb2208(psnNo, mdtrtId, setlId, org_name, operator, secret_key, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs,0) saveLogq(result, srcRequest, "2208", "退费") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostTen() { insutype := c.GetString("insutype") clrType := c.GetString("clr_type") setlOptins := c.GetString("setl_optins") stmtBegndate := c.GetString("stmt_begndate") stmtEnddate := c.GetString("stm_enddate") medfeeSumamt, _ := c.GetFloat("medfee_sumamt", 0) fundPaySumamt, _ := c.GetFloat("fund_pay_sumamt", 0) acctPay, _ := c.GetFloat("acct_pay", 0) fixmedinsSetlCnt, _ := c.GetInt64("fixmedins_setl_cnt", 0) fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") org_name := c.GetString("org_name") doctor := c.GetString("doctor") //doctor := c.Get("doctor") admin_user_id, _ := c.GetInt64("admin_user_id") fmt.Println(insutype) fmt.Println(clrType) fmt.Println(setlOptins) fmt.Println(stmtBegndate) fmt.Println(stmtEnddate) fmt.Println(medfeeSumamt) baseParams := models.BaseParams{ SecretKey: secret_key, FixmedinsCode: fixmedins_code, InsuplcAdmdvs: insuplc_admdvs, MdtrtareaAdmvs: mdtrtarea_admvs, OrgName: org_name, Doctor: doctor, } businessParams := models.BusinessParams{ Insutype: insutype, ClrType: clrType, SetlOptins: setlOptins, StmtBegndate: stmtBegndate, StmtEnddate: stmtEnddate, MedfeeSumamt: medfeeSumamt, FundPaySumamt: fundPaySumamt, AcctPay: acctPay, FixmedinsSetlCnt: fixmedinsSetlCnt, } fmt.Println(baseParams) fmt.Println(businessParams) result := service.Gdyb3201(baseParams, businessParams,admin_user_id) var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) PostEleven() { //fmt.Println("777777666666-----") // //file_byte := c.GetString("file_byte") //file_name := c.GetString("file_name") //fixmedins_code := c.GetString("fixmedins_code") //insuplc_admdvs := c.GetString("insuplc_admdvs") //mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") //secret_key := c.GetString("secret_key") //org_name := c.GetString("org_name") //doctor := c.GetString("doctor") // //baseParams := models.BaseParams{ // SecretKey: secret_key, // FixmedinsCode: fixmedins_code, // InsuplcAdmdvs: insuplc_admdvs, // MdtrtareaAdmvs: mdtrtarea_admvs, // OrgName: org_name, // Doctor: doctor, //} //x := (*[2]uintptr)(unsafe.Pointer(&file_byte)) //h := [3]uintptr{x[0], x[1], x[1]} //bytes := *(*[]byte)(unsafe.Pointer(&h)) //result := service.Gdyb9101(baseParams, file_name, []byte(file_byte)) //var dat map[string]interface{} //if err := json.Unmarshal([]byte(result), &dat); err == nil { // fmt.Println(dat) //} else { // fmt.Println(err) //} //c.ServeSuccessJSON(map[string]interface{}{ // "pre": dat, //}) } func (c *GdybController) PostTwelve() { fileQuryNo := c.GetString("file_qury_no") setlOptins := c.GetString("setl_optins") stmtBegndate := c.GetString("stmt_begndate") stmtEnddate := c.GetString("stm_enddate") medfeeSumamt, _ := c.GetFloat("medfee_sumamt", 0) fundPaySumamt, _ := c.GetFloat("fund_pay_sumamt", 0) fixmedinsSetlCnt, _ := c.GetInt64("fixmedins_setl_cnt", 0) fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") org_name := c.GetString("org_name") doctor := c.GetString("doctor") cashPayamt, _ := c.GetFloat("cash_payamt", 0) baseParams := models.BaseParams{ SecretKey: secret_key, FixmedinsCode: fixmedins_code, InsuplcAdmdvs: insuplc_admdvs, MdtrtareaAdmvs: mdtrtarea_admvs, OrgName: org_name, Doctor: doctor, } businessParams := models.BusinessParams{ FileQuryNo: fileQuryNo, SetlOptins: setlOptins, StmtBegndate: stmtBegndate, StmtEnddate: stmtEnddate, MedfeeSumamt: medfeeSumamt, FundPaySumamt: fundPaySumamt, FixmedinsSetlCnt: fixmedinsSetlCnt, CashPayamt: cashPayamt, } result := service.Gdyb3202(baseParams, businessParams) var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { fmt.Println(dat) } else { fmt.Println(err) } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) } func (c *GdybController) Post5203() { org_name := c.GetString("org_name") operator := c.GetString("doctor") fixmedins_code := c.GetString("fixmedins_code") insuplc_admdvs := c.GetString("insuplc_admdvs") mdtrtarea_admvs := c.GetString("mdtrtarea_admvs") secret_key := c.GetString("secret_key") psn_no := c.GetString("psn_no") mdtrt_id := c.GetString("mdtrt_id") setl_id := c.GetString("setl_id") bp := models.BaseParams{ SecretKey: secret_key, FixmedinsCode: fixmedins_code, InsuplcAdmdvs: insuplc_admdvs, MdtrtareaAdmvs: mdtrtarea_admvs, OrgName: org_name, Doctor: operator, } bps := models.BusinessParams{ PsnNo: psn_no, MdtrtId: mdtrt_id, SetlId: setl_id, } result := service.Gdyb5203(bp, bps) saveLogq(result, "", "5203", "结算单") var dat map[string]interface{} if err := json.Unmarshal([]byte(result), &dat); err == nil { } else { } c.ServeSuccessJSON(map[string]interface{}{ "pre": dat, }) }