123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652 |
- 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,
- })
- }
|