1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178 |
- package js
-
- import (
- "encoding/json"
- "fmt"
- "gdyb/controllers"
- "gdyb/enums"
- "gdyb/models"
- "gdyb/service"
- "gdyb/utils"
- "github.com/astaxie/beego"
- "github.com/axgle/mahonia"
- "github.com/gorilla/websocket"
- "golang.org/x/text/encoding/simplifiedchinese"
- "io/ioutil"
- "log"
- "net/url"
- "os"
- "regexp"
- "strconv"
- "strings"
- "syscall"
- "time"
- "unsafe"
- )
-
- type JSybController struct {
- controllers.BaseAuthAPIController
- }
-
- func JSybRegistRouters() {
-
- beego.Router("/jsyb/1101", &JSybController{}, "get:PostOne")
- beego.Router("/jsyb/1101D", &JSybController{}, "get:PostOneD")
-
- beego.Router("/jsyb/1101c", &JSybController{}, "get:PostOnec")
- beego.Router("/jsyb/2201c", &JSybController{}, "get:Posttwoc")
-
- beego.Router("/jsyb/2201", &JSybController{}, "get:PostTwo")
- beego.Router("/jsyb/2202", &JSybController{}, "get:PostThree")
- beego.Router("/jsyb/2203", &JSybController{}, "post:PostFour")
- beego.Router("/jsyb/2204", &JSybController{}, "post:PostFive")
- beego.Router("/jsyb/2205", &JSybController{}, "get:PostSix")
- beego.Router("/jsyb/2206", &JSybController{}, "get:PostSeven")
- beego.Router("/jsyb/2207", &JSybController{}, "get:PostEight")
- beego.Router("/jsyb/2208", &JSybController{}, "get:PostNine")
- beego.Router("/jsyb/5203", &JSybController{}, "get:PostTen")
- beego.Router("/jsyb/5301", &JSybController{}, "get:Get5301")
- beego.Router("/jsyb/3201", &JSybController{}, "get:Get3201")
- beego.Router("/jsyb/9001", &JSybController{}, "get:Get9001")
- beego.Router("/jsyb/3101", &JSybController{}, "post:Get3101")
- beego.Router("/jsyb/3102", &JSybController{}, "post:Get3102")
- beego.Router("/jsyb/4101", &JSybController{}, "post:Get4101")
- beego.Router("/jsyb/readcard", &JSybController{}, "get:ReadCard")
-
- beego.Router("/jsyb/readcardcharge", &JSybController{}, "get:Readcardcharge")
- beego.Router("/jsyb/readcardchargeother", &JSybController{}, "get:Readcardchargeother")
- beego.Router("/jsyb/readcardface", &JSybController{}, "get:Readcardface")
-
- beego.Router("/jsyb/3260", &JSybController{}, "get:Get3260")
- beego.Router("/jsyb/3261", &JSybController{}, "get:Get3261")
- beego.Router("/jsyb/3262", &JSybController{}, "post:Get3262")
- beego.Router("/jsyb/3263", &JSybController{}, "post:Get3263")
- beego.Router("/jsyb/3264", &JSybController{}, "post:Get3264")
- beego.Router("/jsyb/3265", &JSybController{}, "post:Get3265")
- beego.Router("/jsyb/3266", &JSybController{}, "post:Get3266")
- beego.Router("/jsyb/3267", &JSybController{}, "post:Get3267")
- beego.Router("/jsyb/3268", &JSybController{}, "post:Get3268")
- beego.Router("/jsyb/3269", &JSybController{}, "post:Get3269")
- beego.Router("/jsyb/3270", &JSybController{}, "post:Get3270")
- beego.Router("/jsyb/3271", &JSybController{}, "post:Get3271")
- beego.Router("/jsyb/3272", &JSybController{}, "post:Get3272")
- beego.Router("/jsyb/3273", &JSybController{}, "post:Get3273")
- beego.Router("/jsyb/3274", &JSybController{}, "post:Get3274")
- beego.Router("/jsyb/3275", &JSybController{}, "post:Get3275")
-
- beego.Router("/jsyb/3501", &JSybController{}, "post:Get3501")
- beego.Router("/jsyb/3502", &JSybController{}, "post:Get3502")
- beego.Router("/jsyb/3503", &JSybController{}, "post:Get3503")
- beego.Router("/jsyb/3504", &JSybController{}, "post:Get3504")
- beego.Router("/jsyb/3505", &JSybController{}, "post:Get3505")
- beego.Router("/jsyb/3506", &JSybController{}, "post:Get3506")
- beego.Router("/jsyb/3507", &JSybController{}, "post:Get3507")
- beego.Router("/jsyb/3508", &JSybController{}, "post:Get3508")
- beego.Router("/jsyb/3509", &JSybController{}, "post:Get3509")
- beego.Router("/jsyb/3510", &JSybController{}, "post:Get3510")
- beego.Router("/jsyb/3511", &JSybController{}, "post:Get3511")
- beego.Router("/jsyb/3512", &JSybController{}, "post:Get3512")
- beego.Router("/jsyb/3513", &JSybController{}, "post:Get3513")
-
- beego.Router("/jsyb/1318", &JSybController{}, "get:Get1318")
-
- //beego.Router("/jsyb/3276", &JSybController{}, "post:Get3276")
- //beego.Router("/jsyb/3277", &JSybController{}, "post:Get3277")
-
- }
-
- func (c *JSybController) Get1318() {
- 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- h_code := c.GetString("h_code")
- cainfo := c.GetString("cainfo")
- result, request := service.Jsyb1318(h_code, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, cainfo)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3260() {
- 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
- fmt.Println(org_name)
- fmt.Println(doctor)
-
- fmt.Println(fixmedins_code)
- fmt.Println(insuplc_admdvs)
- fmt.Println(mdtrtarea_admvs)
- fmt.Println(secret_key)
- fmt.Println(url)
- fmt.Println(ak)
- fmt.Println(cainfo)
-
- result, request := service.Jxyb3260(mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3260", "3260", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3261() {
- 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
- setl_mon := c.GetString("month")
- result, request := service.Jxyb3261(setl_mon, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3261", "3261", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) Get3262() {
- 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["datas"])
- var hp []models.FixMonRecDetailFileInTwo
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- fmt.Println(hp)
-
- userJSONBytes2, _ := json.Marshal(respJSON["fund"])
- var fund []models.Fund
- if err := json.Unmarshal(userJSONBytes2, &fund); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3262(setl_mon, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
- saveJsLog(result, request, "3262", "3262", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) Get3263() {
- 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
- }
-
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
-
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3263(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3263", "3263", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3264() {
- 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["solidify_id"])
- var hp []string
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
- result, request := service.Jxyb3264(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
- saveJsLog(result, request, "3264", "3264", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3265() {
- 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["solidify_id"])
- var hp []string
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- result, request := service.Jxyb3265(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
- saveJsLog(result, request, "3265", "3265", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3266() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- stmt_mon := respJSON["setl_mon"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- result, request := service.Jxyb3266(stmt_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3265", "3265", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3267() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
- result, request := service.Jxyb3267(setl_mon, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3267", "3267", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3268() {
-
- 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["datas"])
- var hp []models.FixMonRecDetailFileInTwo
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- userJSONBytes2, _ := json.Marshal(respJSON["fund"])
- var fund []models.Fund
- if err := json.Unmarshal(userJSONBytes2, &fund); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- upld_btch := respJSON["upld_btch"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3268(setl_mon, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, upld_btch, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, hp, fund)
- saveJsLog(result, request, "3268", "3268", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3269() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3269(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3269", "3269", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3270() {
- 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["solidify_id"])
- var hp []string
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- //stmt_mon := respJSON["setl_mon"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3270(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
- saveJsLog(result, request, "3270", "3270", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- func (c *JSybController) Get3271() {
- 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["solidify_id"])
- var hp []string
- if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3271(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo, hp)
- saveJsLog(result, request, "3271", "3271", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3272() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- setl_mon := respJSON["setl_mon"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- result, request := service.Jxyb3272(setl_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3272", "3272", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3273() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- //stmt_mon := respJSON["stmt_mon"].(string)
- setl_mon := respJSON["setl_mon"].(string)
-
- result, request := service.Jxyb3273(setl_mon, stmt_loc, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3273", "3273", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3274() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
- stmt_loc := respJSON["stmt_loc"].(string)
- stmt_mon := respJSON["stmt_mon"].(string)
- fix_fill_dept := respJSON["fix_fill_dept"].(string)
- fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- fix_fill_psn := respJSON["fix_fill_psn"].(string)
- fix_fill_date := respJSON["fix_fill_date"].(string)
- upld_btch := respJSON["upld_btch"].(string)
-
- result, request := service.Jxyb3274(stmt_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3273", "3273", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3275() {
- 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
- }
- org_name := respJSON["org_name"].(string)
- doctor := respJSON["doctor"].(string)
- fixmedins_code := respJSON["fixmedins_code"].(string)
- insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- secret_key := respJSON["secret_key"].(string)
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- cainfo := respJSON["cainfo"].(string)
-
- result, request := service.Jxyb3275(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request, "3275", "3275", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- //func (c *JSybController) Get3276() {
- // org_name := respJSON["org_name"].(string)
- // doctor := respJSON["doctor"].(string)
- // fixmedins_code := respJSON["fixmedins_code"].(string)
- // insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- // mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- // secret_key := respJSON["secret_key"].(string)
- // url := respJSON["url"].(string)
- // ak := respJSON["ak"].(string)
- // cainfo := respJSON["cainfo"].(string)
- // upld_btch := respJSON["upld_btch"].(string)
- // stmt_loc := respJSON["stmt_loc"].(string)
- // stmt_mon := respJSON["stmt_mon"].(string)
- // fix_fill_dept := respJSON["fix_fill_dept"].(string)
- // fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- // fix_fill_psn := respJSON["fix_fill_psn"].(string)
- // fix_fill_date := respJSON["fix_fill_date"].(string)
- // result, request := service.Jxyb3266(stmt_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- // saveJsLog(result, request, "3265", "3265", org_name)
- // var dat2 map[string]interface{}
- // if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- // } else {
- // }
- // var dat map[string]interface{}
- // if err := json.Unmarshal([]byte(result), &dat); err == nil {
- // } else {
- //
- // }
- // c.ServeSuccessJSON(map[string]interface{}{
- // "pre": dat,
- // "request_log": dat2,
- // })
- //
- //}
- //func (c *JSybController) Get3277() {
- // org_name := respJSON["org_name"].(string)
- // doctor := respJSON["doctor"].(string)
- // fixmedins_code := respJSON["fixmedins_code"].(string)
- // insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
- // mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
- // secret_key := respJSON["secret_key"].(string)
- // url := respJSON["url"].(string)
- // ak := respJSON["ak"].(string)
- // cainfo := respJSON["cainfo"].(string)
- // upld_btch := respJSON["upld_btch"].(string)
- // stmt_loc := respJSON["stmt_loc"].(string)
- // stmt_mon := respJSON["stmt_mon"].(string)
- // fix_fill_dept := respJSON["fix_fill_dept"].(string)
- // fix_fill_psn_id := respJSON["fix_fill_psn_id"].(string)
- // fix_fill_psn := respJSON["fix_fill_psn"].(string)
- // fix_fill_date := respJSON["fix_fill_date"].(string)
- // result, request := service.Jxyb3266(stmt_mon, fix_fill_dept, fix_fill_psn_id, fix_fill_psn, fix_fill_date, stmt_loc, upld_btch, mdtrtarea_admvs, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- // saveJsLog(result, request, "3265", "3265", org_name)
- // var dat2 map[string]interface{}
- // if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- // } else {
- // }
- // var dat map[string]interface{}
- // if err := json.Unmarshal([]byte(result), &dat); err == nil {
- // } else {
- //
- // }
- // c.ServeSuccessJSON(map[string]interface{}{
- // "pre": dat,
- // "request_log": dat2,
- // })
- //}
-
- func (c *JSybController) Get3501() {
- 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["struct_3501s"])
- var struct3501 models.Struct3501
- if err := json.Unmarshal(userJSONBytes, &struct3501); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3501(struct3501)
- saveJsLog(result, request_log, "3501", "库存盘点", struct3501.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3502() {
- 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["struct_3502s"])
- var struct3502s models.Struct3502
- if err := json.Unmarshal(userJSONBytes, &struct3502s); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3502(struct3502s)
- saveJsLog(result, request_log, "3502", "库存变更", struct3502s.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3503() {
- 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["struct_3503s"])
- var struct3503 models.Struct3503
- if err := json.Unmarshal(userJSONBytes, &struct3503); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- fmt.Println(struct3503)
-
- result, request_log := service.Jsyb3503(struct3503)
- saveJsLog(result, request_log, "3503", "库存采购", struct3503.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3504() {
- 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["struct_3504s"])
- var struct3504 []models.Struct3504
- if err := json.Unmarshal(userJSONBytes, &struct3504); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3504(struct3504[0])
- saveJsLog(result, request_log, "3504", "库存盘点", struct3504[0].OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3505() {
- 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["struct_3505s"])
- var struct3505 models.Struct3505
- if err := json.Unmarshal(userJSONBytes, &struct3505); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3505(struct3505)
- saveJsLog(result, request_log, "3505", "销售", struct3505.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3506() {
- 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["struct_3506s"])
- var struct3506 models.Struct3506
- if err := json.Unmarshal(userJSONBytes, &struct3506); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3506(struct3506)
- saveJsLog(result, request_log, "3506", "销售退库", struct3506.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3507() {
- 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["struct_3507s"])
- var struct3507 models.Struct3507
- if err := json.Unmarshal(userJSONBytes, &struct3507); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3507(struct3507)
- saveJsLog(result, request_log, "3507", "库存盘点", struct3507.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get3508() {
- 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["struct_3508s"])
- var struct3508 models.Struct3508
- if err := json.Unmarshal(userJSONBytes, &struct3508); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3508(struct3508)
- saveJsLog(result, request_log, "3508", "库存查询", struct3508.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3509() {
- 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["struct_3509s"])
- var struct3509 models.Struct3509
- if err := json.Unmarshal(userJSONBytes, &struct3509); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3509(struct3509)
- saveJsLog(result, request_log, "3509", "库存查询", struct3509.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3510() {
- 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["struct_3510s"])
- var struct3510 models.Struct3510
- if err := json.Unmarshal(userJSONBytes, &struct3510); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3510(struct3510)
- saveJsLog(result, request_log, "3510", "库存盘点", struct3510.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3511() {
- 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["struct_3511s"])
- var struct3511 models.Struct3511
- if err := json.Unmarshal(userJSONBytes, &struct3511); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3511(struct3511)
- saveJsLog(result, request_log, "3511", "库存查询", struct3511.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3512() {
- 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["struct_3512s"])
- var struct3512 models.Struct3512
- if err := json.Unmarshal(userJSONBytes, &struct3512); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3512(struct3512)
- saveJsLog(result, request_log, "3512", "3512查询", struct3512.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
- func (c *JSybController) Get3513() {
- 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["struct_3513s"])
- var struct3513 models.Struct3513
- if err := json.Unmarshal(userJSONBytes, &struct3513); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- result, request_log := service.Jsyb3513(struct3513)
- saveJsLog(result, request_log, "3513", "库存盘点", struct3513.OrgName)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- } else {
- }
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
-
- }
-
- func (c *JSybController) Get9001() {
-
- }
- func (c *JSybController) PostOnec() {
- result, inputLog := service.Jsyb1101F()
- fmt.Println(result)
- fmt.Println(inputLog)
-
- }
- func (c *JSybController) Posttwoc() {
- //result, request_log := service.2201F()
- //saveJsLog(result, request_log, "2201", "挂号", "盐城响水悦达血液透析中心有限公司")
-
- }
- func (c *JSybController) Get5301() {
- psn_no := 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, inputLog := service.Jsyb5301(psn_no, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, cainfo)
- //saveJsLog()
- saveJsLog(result, inputLog, "5301", "查询备案", org_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 *JSybController) 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, inputLog := service.Jsyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn, certificates, url, ak, cainfo)
- fmt.Println(result)
- fmt.Println(inputLog)
- saveJsLog(result, inputLog, "1101", "查询个人信息", org_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 *JSybController) PostOneD() {
- result, inputLog := service.Jsyb1101F()
- fmt.Println(result)
- fmt.Println(inputLog)
- saveJsLog(result, inputLog, "1101", "查询个人信息", "盐城响水悦达血液透析中心有限公司")
- 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 *JSybController) PostTwo() {
- psnNo := c.GetString("psn_no")
- insutype := c.GetString("insutype")
- certNo := c.GetString("cert_no")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- ipt_otp_no := c.GetString("ipt_otp_no")
- dept := c.GetString("dept")
- verify_number := c.GetString("verify_number")
-
- fixmedins_code := c.GetString("fixmedins_code")
-
- dept_code := c.GetString("dept_code")
- doctor_id := c.GetString("doctor_id")
-
- 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- doctor_name := c.GetString("doctor_name")
- cainfo := c.GetString("cainfo")
-
- result, request_log := service.Jsyb2201(psnNo, insutype, certNo, org_name, doctor, ipt_otp_no, dept, fixmedins_code, dept_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, doctor_name, url, ak, verify_number, cainfo)
- saveJsLog(result, request_log, "2201", "挂号", org_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(request_log), &dat2); err == nil {
-
- } else {
-
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) PostThree() {
- psnNo := c.GetString("psn_no")
- mdtrtId := c.GetString("mdtrt_id")
- iptOtpNo := c.GetString("ipt_otp_no")
- org_name := c.GetString("org_name")
- doctor := 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, request_log := service.Jsyb2202(psnNo, mdtrtId, iptOtpNo, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code, url, ak, cainfo)
- saveJsLog(result, request_log, "2202", "退号", org_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(request_log), &dat2); err == nil {
-
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) 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)
-
- url := respJSON["url"].(string)
- ak := respJSON["ak"].(string)
- begin_time := respJSON["begin_time"].(string)
- cainfo := respJSON["cainfo"].(string)
-
- //cainfo := c.GetString("cainfo")
-
- result, request_log, timeStamp := service.Jsyb2203(psnNo, mdtrtId, doctor, department, org_name, med_type, doctor_id, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name, dept, config, url, ak, begin_time, cainfo)
- saveJsLog(result, request_log, "2203", "上传就诊信息", org_name)
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
-
- } else {
-
- }
-
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
-
- } else {
-
- }
-
- var dat3 int64
- if err := json.Unmarshal([]byte(strconv.FormatInt(timeStamp, 10)), &dat3); err == nil {
-
- } else {
-
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- "time_stamp": dat3,
- })
- }
-
- 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 *JSybController) 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("2203A的time_stamp=" + respJSON["time_stamp"].(string))
- result, request_log := service.Jsyb2204(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string),
- respJSON["opter"].(string), respJSON["dept"].(string), respJSON["fixmedins_code"].(string), respJSON["dept_code"].(string), respJSON["doctor_id"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string), respJSON["secret_key"].(string), respJSON["balance_accounts_type"].(string), "", respJSON["url"].(string), respJSON["ak"].(string), respJSON["new_doctor_name"].(string), "", respJSON["cainfo"].(string))
-
- saveJsLog(result, request_log, "2204", "上传明细", respJSON["org_name"].(string))
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
-
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) PostSix() {
- psnNo := c.GetString("psn_no")
- mdtrtId := c.GetString("mdtrt_id")
- chrgBchno := c.GetString("chrg_bchno")
- org_name := c.GetString("org_name")
- doctor := 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, request_log := service.Jsyb2205(psnNo, mdtrtId, chrgBchno, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code, url, ak, cainfo)
- fmt.Println(request_log)
- saveJsLog(result, request_log, "2205", "撤销明细", org_name)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) 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")
- 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")
- med_type := c.GetString("med_type")
- id_card_type, _ := c.GetInt64("id_card_type")
- certificates, _ := c.GetInt64("certificates")
- verify_number := c.GetString("verify_number")
- cainfo := c.GetString("cainfo")
- mdtrt_grp_type := c.GetString("mdtrt_grp_type")
-
- url := c.GetString("url")
- ak := c.GetString("ak")
-
- var result string
- var request_log string
-
- result, request_log = service.Jsyb2206(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, 0, 0, 0, 0, certificates, url, ak, verify_number, cainfo, mdtrt_grp_type)
-
- saveJsLog(result, request_log, "2206", "预结算", org_name)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
-
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) 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")
- 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")
- med_type := c.GetString("med_type")
- id_card_type, _ := c.GetInt64("id_card_type")
- certificates, _ := c.GetInt64("certificates")
-
- 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")
-
- acct_used_flag := c.GetString("acct_used_flag")
-
- url := c.GetString("url")
- ak := c.GetString("ak")
- verify_number := c.GetString("verify_number")
- cainfo := c.GetString("cainfo")
- mdtrt_grp_type := c.GetString("mdtrt_grp_type")
-
- var result string
- var request_log string
- if id_card_type == 4 {
- //_, pBusiCardInfo := GetELeCertInfoSettle(fixmedins_code, "", "")
- //pBusiCardInfo = Remove0000(pBusiCardInfo)
- //var ele ELeData
- //err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- //if err != nil {
- // utils.ErrorLog("解析失败:%v", err)
- //}
- //token := ele.Data.EcCardToken
- //if len(token) > 0 {
- result, request_log = service.Jsyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag, url, ak, verify_number, cainfo, mdtrt_grp_type)
- //}
- } else {
- result, request_log = service.Jsyb2207(psnNo, mdtrtId, chrgBchno, certNo, insutype, total, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, med_type, id_card_type, fulamt_ownpay_amt, overlmt_selfpay, preselfpay_amt, inscp_scp_amt, certificates, acct_used_flag, url, ak, verify_number, cainfo, mdtrt_grp_type)
-
- }
-
- saveJsLog(result, request_log, "2207", "结算", org_name)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
-
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) PostNine() {
- psnNo := c.GetString("psn_no")
- mdtrtId := c.GetString("mdtrt_id")
- setlId := c.GetString("setl_id")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- secret_key := c.GetString("secret_key")
- fixmedins_code := c.GetString("fixmedins_code")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, request_log := service.Jsyb2208(psnNo, mdtrtId, setlId, org_name, doctor, secret_key, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, cainfo)
- saveJsLog(result, request_log, "2208", "退费", org_name)
- fmt.Println(request_log)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) PostTen() {
- psnNo := c.GetString("psn_no")
- mdtrtId := c.GetString("mdtrt_id")
- setlId := c.GetString("setl_id")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- secret_key := c.GetString("secret_key")
- fixmedins_code := c.GetString("fixmedins_code")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- baseParams := models.BaseParams{
- SecretKey: secret_key,
- FixmedinsCode: fixmedins_code,
- InsuplcAdmdvs: insuplc_admdvs,
- MdtrtareaAdmvs: mdtrtarea_admvs,
- OrgName: org_name,
- Doctor: doctor,
- RequestUrl: url,
- AccessKey: ak,
- Cainfo: cainfo,
- }
-
- businessParams := models.BusinessParams{
- PsnNo: psnNo,
- MdtrtId: mdtrtId,
- SetlId: setlId,
- }
-
- result, request_log := service.Jsyb5203(baseParams, businessParams)
- saveJsLog(result, request_log, "5203", "结算单", org_name)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- func (c *JSybController) Get2503() {
- psnNo := c.GetString("psn_no")
- insutype := c.GetString("insutype")
- sick_code := c.GetString("sick_code")
- sick_name := c.GetString("sick_name")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- secret_key := c.GetString("secret_key")
- access_key := c.GetString("access_key")
- fixmedins_code := c.GetString("fixmedins_code")
- org_name := c.GetString("org_name")
- check_time := c.GetString("check_time")
- doctor_id := c.GetString("doctor_id")
- doctor := c.GetString("doctor")
- start_time := c.GetString("start_time")
- end_time := c.GetString("end_time")
- url := c.GetString("url")
- cainfo := c.GetString("cainfo")
-
- service.Jsyb2503(psnNo, insutype, org_name, doctor, fixmedins_code, doctor_id, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_name, sick_code, start_time, end_time, check_time, url, access_key, cainfo)
-
- }
- func (c *JSybController) Get3201() {
- 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")
- url := c.GetString("url")
- ak := c.GetString("ak")
- cainfo := c.GetString("cainfo")
-
- result, request_log := service.Jsyb3201(fixmedinsSetlCnt, acctPay, fundPaySumamt, medfeeSumamt, stmtBegndate, stmtEnddate, setlOptins, clrType, insutype, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, url, ak, secret_key, cainfo)
- saveJsLog(result, request_log, "3201", "对总账", org_name)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request_log), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- type ELeData struct {
- Data struct {
- SiNo string `json:"si_no"`
- SiCardNo string `json:"si_card_no"`
- SiCardIssueArea string `json:"si_card_issue_area"`
- Name string `json:"name"`
- Gender string `json:"gender"`
- IdType string `json:"id_type"`
- IdNo string `json:"id_no"`
- EcCardToken string `json:"ecCardToken"`
- } `json:"data"`
- Code int `json:"code"`
- Message string `json:"message"`
- }
-
- type ELeCertData struct {
- Data struct {
- Extra string `json:"extra"`
- IDNo string `json:"idNo"`
- IDType string `json:"idType"`
- EcToken string `json:"ecToken"`
- InsuOrg string `json:"insuOrg"`
- UserName string `json:"userName"`
- EcIndexNo string `json:"ecIndexNo"`
- Gender string `json:"gender"`
- Birthday string `json:"birthday"`
- Nationality string `json:"nationality"`
- Email string `json:"email"`
- } `json:"data"`
- Code int `json:"code"`
- Message string `json:"message"`
- }
-
- type ELeCertDatathree struct {
- Data struct {
- AuthNo string `json:"authNo"`
- Extra string `json:"extra"`
- IDNo string `json:"idNo"`
- IDType string `json:"idType"`
- EcToken string `json:"ecToken"`
- InsuOrg string `json:"insuOrg"`
- UserName string `json:"userName"`
- EcIndexNo string `json:"ecIndexNo"`
- Gender string `json:"gender"`
- Birthday string `json:"birthday"`
- Nationality string `json:"nationality"`
- Email string `json:"email"`
- } `json:"data"`
- Code int `json:"code"`
- Message string `json:"message"`
- }
-
- type ELeCertDatatwo struct {
- Data struct {
- AuthNo string `json:"authNo"`
- OutBizNo string `json:"outBizNo"`
- } `json:"data"`
- Code int `json:"code"`
- Message string `json:"message"`
- }
-
- func (c *JSybController) Readcardface() {
- fixmedins_code := c.GetString("fixmedins_code")
- secret_key := c.GetString("secret_key")
- ak := c.GetString("ak")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- cainfo := c.GetString("cainfo")
- operator_id := c.GetString("operator_id")
- operator := c.GetString("operator")
-
- fmt.Println(operator_id)
- fmt.Println(operator)
- _, pBusiCardInfo := c.GetELeCertInfoByFace(fixmedins_code, operator_id, operator, "01301")
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- var eletwo ELeCertDatatwo
- json.Unmarshal([]byte(pBusiCardInfo), &eletwo)
-
- _, pBusiCardInfotwo := GetELeCertInfoByFacetwo(fixmedins_code, operator_id, operator, eletwo.Data.AuthNo, eletwo.Data.OutBizNo, "01301")
-
- var ele ELeCertDatathree
- err2 := json.Unmarshal([]byte(pBusiCardInfotwo), &ele)
- if err2 != nil {
- utils.ErrorLog("解析失败:%v", err2)
- }
- token := ele.Data.EcToken
- fmt.Println(token)
- if len(token) > 0 {
- userName := ele.Data.UserName
- fmt.Println(userName)
- userName = Remove0000(userName)
- userName = DeleteExtraSpace(userName)
- fmt.Println(userName)
- enc := mahonia.NewEncoder("gbk")
- fmt.Println(enc.ConvertString(userName))
- result, _ := service.Jsyb1101ForEleCert(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IDNo, userName)
- 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{}{
- "status": "0",
- "card_info": "",
- "busi_card_info": pBusiCardInfotwo,
- "token": token,
- "result": dat,
- "eletwo": pBusiCardInfo,
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
-
- }
-
- func (c *JSybController) Readcardcharge() {
- fixmedins_code := c.GetString("fixmedins_code")
- secret_key := c.GetString("secret_key")
- ak := c.GetString("ak")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- cainfo := c.GetString("cainfo")
- id_card_type := c.GetString("id_card_type")
- operator_id := c.GetString("operator_id")
- operator := c.GetString("operator")
-
- //result, request := service.Jsyb9001(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, 1, url, cainfo, ak)
- //fmt.Println(request)
- //fmt.Println(result)
-
- c.TestGetBasBaseInit(fixmedins_code, secret_key, ak)
- switch id_card_type {
- case "1":
- pCardInfo, pBusiCardInfo := c.GetBasBaseInfo()
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- pCardInfo = Remove0000(pCardInfo)
- fmt.Println(":", ConvertToString(pCardInfo, "gbk", "utf-8"))
-
- fmt.Println(pBusiCardInfo)
- fmt.Println(pCardInfo)
- bas := strings.Split(pCardInfo, "|")
- basNumber := bas[2]
- id_card_no := bas[1]
- card_sn := bas[3]
-
- id_card_type_int, _ := strconv.ParseInt(id_card_type, 10, 64)
-
- if len(pCardInfo) > 0 && len(pBusiCardInfo) > 0 {
- result, _ := service.Jsyb1101A(basNumber, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type_int, card_sn, "1", url, ak, pBusiCardInfo, id_card_no, cainfo)
- 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{}{
- "status": "0",
- "card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "result": dat,
- "type": "1",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "3": //电子社保卡
- _, pBusiCardInfo := c.GetELeInfo(fixmedins_code, operator_id, operator)
- //fmt.Println(pCardInfo)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- //pCardInfo = Remove0000(pCardInfo)
- var ele ELeData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcCardToken
- if len(token) > 0 {
- result, _ := service.Jsyb1101B(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IdNo)
- 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{}{
- "status": "0",
- //"card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- "type": "2",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "4": //电子凭证
- fmt.Println(operator_id)
- fmt.Println(operator)
- _, pBusiCardInfo := c.GetELeCertInfoThree(fixmedins_code, operator_id, operator)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- var ele ELeCertData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcToken
- fmt.Println(token)
- if len(token) > 0 {
- userName := ele.Data.UserName
- fmt.Println(userName)
- userName = Remove0000(userName)
- userName = DeleteExtraSpace(userName)
- fmt.Println(userName)
- enc := mahonia.NewEncoder("gbk")
- fmt.Println(enc.ConvertString(userName))
- result, _ := service.Jsyb1101ForEleCert(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IDNo, userName)
- 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{}{
- "status": "0",
- "card_info": "",
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- }
-
- }
- func (c *JSybController) Readcardchargeother() {
- fixmedins_code := c.GetString("fixmedins_code")
- secret_key := c.GetString("secret_key")
- ak := c.GetString("ak")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- cainfo := c.GetString("cainfo")
- id_card_type := c.GetString("id_card_type")
- operator_id := c.GetString("operator_id")
- operator := c.GetString("operator")
-
- //result, request := service.Jsyb9001(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, 1, url, cainfo, ak)
- //fmt.Println(request)
- //fmt.Println(result)
-
- c.TestGetBasBaseInit(fixmedins_code, secret_key, ak)
- switch id_card_type {
- case "1":
- pCardInfo, pBusiCardInfo := c.GetBasBaseInfo()
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- pCardInfo = Remove0000(pCardInfo)
- fmt.Println(":", ConvertToString(pCardInfo, "gbk", "utf-8"))
-
- fmt.Println(pBusiCardInfo)
- fmt.Println(pCardInfo)
- bas := strings.Split(pCardInfo, "|")
- basNumber := bas[2]
- id_card_no := bas[1]
- card_sn := bas[3]
-
- id_card_type_int, _ := strconv.ParseInt(id_card_type, 10, 64)
-
- if len(pCardInfo) > 0 && len(pBusiCardInfo) > 0 {
- result, _ := service.Jsyb1101A(basNumber, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type_int, card_sn, "1", url, ak, pBusiCardInfo, id_card_no, cainfo)
- 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{}{
- "status": "0",
- "card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "result": dat,
- "type": "1",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "3": //电子社保卡
- _, pBusiCardInfo := c.GetELeInfo(fixmedins_code, operator_id, operator)
- //fmt.Println(pCardInfo)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- //pCardInfo = Remove0000(pCardInfo)
- var ele ELeData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcCardToken
- if len(token) > 0 {
- result, _ := service.Jsyb1101B(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IdNo)
- 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{}{
- "status": "0",
- //"card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- "type": "2",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "4": //电子凭证
- fmt.Println(operator_id)
- fmt.Println(operator)
- _, pBusiCardInfo := c.GetELeCertInfoFour(fixmedins_code, operator_id, operator)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- var ele ELeCertData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcToken
- fmt.Println(token)
- if len(token) > 0 {
- userName := ele.Data.UserName
- fmt.Println(userName)
- userName = Remove0000(userName)
- userName = DeleteExtraSpace(userName)
- fmt.Println(userName)
- enc := mahonia.NewEncoder("gbk")
- fmt.Println(enc.ConvertString(userName))
- result, _ := service.Jsyb1101ForEleCert(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IDNo, userName)
- 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{}{
- "status": "0",
- "card_info": "",
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- }
-
- }
-
- func (c *JSybController) ReadCard() {
- fixmedins_code := c.GetString("fixmedins_code")
- secret_key := c.GetString("secret_key")
- ak := c.GetString("ak")
- org_name := c.GetString("org_name")
- doctor := c.GetString("doctor")
- insuplc_admdvs := c.GetString("insuplc_admdvs")
- mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
- url := c.GetString("url")
- cainfo := c.GetString("cainfo")
- id_card_type := c.GetString("id_card_type")
- operator_id := c.GetString("operator_id")
- operator := c.GetString("operator")
-
- //result, request := service.Jsyb9001(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, 1, url, cainfo, ak)
- //fmt.Println(request)
- //fmt.Println(result)
-
- c.TestGetBasBaseInit(fixmedins_code, secret_key, ak)
- switch id_card_type {
- case "1":
- pCardInfo, pBusiCardInfo := c.GetBasBaseInfo()
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- pCardInfo = Remove0000(pCardInfo)
- fmt.Println(":", ConvertToString(pCardInfo, "gbk", "utf-8"))
-
- fmt.Println(pBusiCardInfo)
- fmt.Println(pCardInfo)
- bas := strings.Split(pCardInfo, "|")
- basNumber := bas[2]
- id_card_no := bas[1]
- card_sn := bas[3]
-
- id_card_type_int, _ := strconv.ParseInt(id_card_type, 10, 64)
-
- if len(pCardInfo) > 0 && len(pBusiCardInfo) > 0 {
- result, _ := service.Jsyb1101A(basNumber, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type_int, card_sn, "1", url, ak, pBusiCardInfo, id_card_no, cainfo)
- 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{}{
- "status": "0",
- "card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "result": dat,
- "type": "1",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "3": //电子社保卡
- _, pBusiCardInfo := c.GetELeInfo(fixmedins_code, operator_id, operator)
- //fmt.Println(pCardInfo)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- //pCardInfo = Remove0000(pCardInfo)
- var ele ELeData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcCardToken
- if len(token) > 0 {
- result, _ := service.Jsyb1101B(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IdNo)
- 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{}{
- "status": "0",
- //"card_info": pCardInfo,
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- "type": "2",
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "4": //电子凭证
- fmt.Println(operator_id)
- fmt.Println(operator)
- _, pBusiCardInfo := c.GetELeCertInfoTwo(fixmedins_code, operator_id, operator)
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- var ele ELeCertData
- err := json.Unmarshal([]byte(pBusiCardInfo), &ele)
- if err != nil {
- utils.ErrorLog("解析失败:%v", err)
- }
- token := ele.Data.EcToken
- fmt.Println(token)
- if len(token) > 0 {
- userName := ele.Data.UserName
- fmt.Println(userName)
- userName = Remove0000(userName)
- userName = DeleteExtraSpace(userName)
- fmt.Println(userName)
- enc := mahonia.NewEncoder("gbk")
- fmt.Println(enc.ConvertString(userName))
- result, _ := service.Jsyb1101ForEleCert(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IDNo, userName)
- 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{}{
- "status": "0",
- "card_info": "",
- "busi_card_info": pBusiCardInfo,
- "token": token,
- "result": dat,
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
- case "5": //电子凭证
- fmt.Println(operator_id)
- fmt.Println(operator)
- _, pBusiCardInfo := c.GetELeCertInfoByFace(fixmedins_code, operator_id, operator, "01101")
- fmt.Println(pBusiCardInfo)
- pBusiCardInfo = Remove0000(pBusiCardInfo)
- var eletwo ELeCertDatatwo
- json.Unmarshal([]byte(pBusiCardInfo), &eletwo)
-
- _, pBusiCardInfotwo := GetELeCertInfoByFacetwo(fixmedins_code, operator_id, operator, eletwo.Data.AuthNo, eletwo.Data.OutBizNo, "01301")
-
- var ele ELeCertDatathree
- err2 := json.Unmarshal([]byte(pBusiCardInfotwo), &ele)
- if err2 != nil {
- utils.ErrorLog("解析失败:%v", err2)
- }
- token := ele.Data.EcToken
- fmt.Println(token)
- if len(token) > 0 {
- userName := ele.Data.UserName
- fmt.Println(userName)
- userName = Remove0000(userName)
- userName = DeleteExtraSpace(userName)
- fmt.Println(userName)
- enc := mahonia.NewEncoder("gbk")
- fmt.Println(enc.ConvertString(userName))
- result, _ := service.Jsyb1101ForEleCert(org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, url, ak, token, cainfo, ele.Data.IDNo, userName)
- 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{}{
- "status": "0",
- "card_info": "",
- "busi_card_info": pBusiCardInfotwo,
- "token": token,
- "result": dat,
- "eletwo": pBusiCardInfo,
- })
- } else {
- c.ServeSuccessJSON(map[string]interface{}{
- "status": "-1",
- })
-
- }
- break
-
- }
-
- }
-
- func (c *JSybController) TestGetBasBaseInit(code string, secret_key string, ak string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- Iinit := DllDef.MustFindProc("Init")
- //miConfig, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
- str := make([]byte, 2048)
- inputData := make(map[string]interface{})
- inputData["IP"] = "10.58.65.240"
- inputData["PORT"] = "8086"
- inputData["TIMEOUT"] = "180"
- inputData["LOG_PATH"] = "C:\\log\\"
-
- //inputData["EC_URL"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
-
- inputData["EC_URL"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
- inputData["CARD_PASSTYPE"] = "1"
- inputData["API_NAME"] = "hssServives"
- inputData["API_VERSION"] = "1.0.0"
- inputData["ACCESS_KEY"] = ak
-
- inputData["SECRETKEY"] = secret_key
- inputData["ORG_ID"] = code
- inputData["EXT"] = ""
- bytesData, _ := json.Marshal(inputData)
- fmt.Println(inputData)
- fmt.Println(bytesData)
-
- ret, _, err := Iinit.Call((uintptr)(unsafe.Pointer(&bytesData[0])), (uintptr)(unsafe.Pointer(&str[0])))
- if ret != 0 {
- fmt.Println("SSCard的报错原因:", err)
- fmt.Println("SSCard的运算结果为:", ret)
- fmt.Println("SSCard的返回结果为:", string(str))
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
- return
- }
- fmt.Println("SSCard的返回结果为:", string(str))
-
- result := int(ret)
- fmt.Println("SSCard的运算结果为1:", result)
- //initFlag = 1
- return
- }
- func (c *JSybController) GetBasBaseInfo() (string, string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- readCard := DllDef.MustFindProc("ReadCardBas")
- fmt.Println(readCard)
- fmt.Println("!!!!!")
- pCardInfo := make([]byte, 2048)
- pBusiCardInfo := make([]byte, 8192)
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- fmt.Println(DeleteExtraSpace(string(pCardInfo)))
- fmt.Println(DeleteExtraSpace(string(pBusiCardInfo)))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pCardInfo)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return DeleteExtraSpace(string(pCardInfo)), DeleteExtraSpace(string(pBusiCardInfo))
- }
-
- func (c *JSybController) GetELeInfo(code string, operator_id string, operator_name string) (string, string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- readCard := DllDef.MustFindProc("EcCardQuery")
- fmt.Println(readCard)
- fmt.Println("!!!!!")
- //pCardInfo := make([]byte, 8192)
- pBusiCardInfo := make([]byte, 8192)
-
- //data := make(map[string]interface{})
- //pData := make(map[string]interface{})
-
- //inputData := make(map[string]interface{})
- //inputData["orgId"] = code
- //inputData["businessType"] = "01101"
- //inputData["operatorId"] = operator_id
- //inputData["operatorName"] = operator_name
- //inputData["officeId"] = "001"
- //inputData["officeName"] = "血透室"
-
- //data["data"] = inputData
- //data["transType"] = "ec.query"
- //data["orgId"] = code
- //bytesData, _ := json.Marshal(data)
- //pCardInfo = bytesData
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- //fmt.Println(DeleteExtraSpace(string(bytesData)))
- fmt.Println(DeleteExtraSpace(string(pBusiCardInfo)))
- //fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return DeleteExtraSpace(""), DeleteExtraSpace(string(pBusiCardInfo))
- }
- func (c *JSybController) GetELeCertInfoFour1(code string, operator_id string, operator_name string) (string, string) {
- DllDef := syscall.MustLoadDLL("NationEcCode.dll")
- readCard := DllDef.MustFindProc("EcQuery")
-
- pCardInfo := make([]byte, 8192)
- pBusiCardInfo := make([]byte, 8192)
- data := make(map[string]interface{})
-
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01301"
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "xuetou"
- data["data"] = inputData
- data["transType"] = "ec.query"
- data["orgId"] = code
- bytesData, _ := json.Marshal(data)
- pCardInfo = bytesData
- pCardInfo = []byte(ConvertByte2String(pCardInfo, GB18030))
-
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return ConvertByte2String([]byte(DeleteExtraSpace(string(bytesData))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pBusiCardInfo))), GB18030)
- }
-
- func (c *JSybController) GetELeCertInfoFour(code string, operator_id string, operator_name string) (string, string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- readCard := DllDef.MustFindProc("GetPersonInfo")
-
- pCardInfo := make([]byte, 8192)
- pBusiCardInfo := make([]byte, 8192)
- data := make(map[string]interface{})
-
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01301"
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "xuetou"
- data["data"] = inputData
- data["transType"] = "ec.query"
- data["orgId"] = code
- bytesData, _ := json.Marshal(data)
- pCardInfo = bytesData
- pCardInfo = []byte(ConvertByte2String(pCardInfo, GB18030))
-
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return ConvertByte2String([]byte(DeleteExtraSpace(string(bytesData))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pBusiCardInfo))), GB18030)
- }
- func (c *JSybController) GetELeCertInfoFour2223(code string, operator_id string, operator_name string) (string, string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- readCard := DllDef.MustFindProc("GetPersonInfo")
-
- pCardInfo := make([]byte, 8192)
- pBusiCardInfo := make([]byte, 8192)
- data := make(map[string]interface{})
-
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01101"
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "xuetou"
- data["data"] = inputData
- data["transType"] = "ec.query"
- data["orgId"] = code
- bytesData, _ := json.Marshal(data)
- pCardInfo = bytesData
- pCardInfo = []byte(ConvertByte2String(pCardInfo, GB18030))
-
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return ConvertByte2String([]byte(DeleteExtraSpace(string(bytesData))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pBusiCardInfo))), GB18030)
- }
-
- func (c *JSybController) GetELeCertInfoByFace(code string, operator_id string, operator_name string, businessType string) (string, string) {
- // WebSocket服务器地址
- serverURL := "ws://127.0.0.1:8899"
-
- // 解析WebSocket服务器地址
- u, err := url.Parse(serverURL)
- if err != nil {
- log.Fatal(err)
- }
-
- // 建立WebSocket连接
- conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
- if err != nil {
- log.Fatal(err)
- }
- defer conn.Close()
- input2 := make(map[string]interface{})
-
- input := make(map[string]interface{})
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["outBizNo"] = time.Now().Unix()
- inputData["businessType"] = businessType
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "血透室"
- inputData["deviceType"] = ""
- input["data"] = inputData
- input["orgId"] = code
- input["transType"] = "cn.nhsa.ec.auth"
- input2["url"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
- input2["indata"] = input
-
- bytesData, _ := json.Marshal(input2)
- err = conn.WriteMessage(websocket.TextMessage, bytesData)
- if err != nil {
- fmt.Println(err)
- }
-
- // 接收消息
- _, receivedMessage, err := conn.ReadMessage()
- if err != nil {
- fmt.Println(err)
- }
-
- return "", string(receivedMessage)
- }
- func GetELeCertInfoByFacetwo(code string, operator_id string, operator_name string, authNo string, outBizNo string, businessType string) (string, string) {
- // // WebSocket服务器地址
- serverURL := "ws://127.0.0.1:8899"
-
- // 解析WebSocket服务器地址
- u, err := url.Parse(serverURL)
- if err != nil {
- log.Fatal(err)
- }
-
- // 建立WebSocket连接
- conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
- if err != nil {
- log.Fatal(err)
- }
- defer conn.Close()
- input2 := make(map[string]interface{})
-
- input := make(map[string]interface{})
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["outBizNo"] = outBizNo
- inputData["authNo"] = authNo
- inputData["businessType"] = businessType
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "血透室"
- inputData["deviceType"] = ""
- input["data"] = inputData
- input["orgId"] = code
- input["transType"] = "cn.nhsa.auth.check"
- input2["url"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
- input2["indata"] = input
-
- bytesData, _ := json.Marshal(input2)
- err = conn.WriteMessage(websocket.TextMessage, bytesData)
- if err != nil {
- fmt.Println(err)
- }
-
- // 接收消息
- _, receivedMessage, err := conn.ReadMessage()
- if err != nil {
- fmt.Println(err)
- }
-
- return "", string(receivedMessage)
- }
-
- func (c *JSybController) GetELeCertInfoTwo(code string, operator_id string, operator_name string) (string, string) {
- // WebSocket服务器地址
- serverURL := "ws://127.0.0.1:8899"
-
- // 解析WebSocket服务器地址
- u, err := url.Parse(serverURL)
- if err != nil {
- log.Fatal(err)
- }
-
- // 建立WebSocket连接
- conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
- if err != nil {
- log.Fatal(err)
- }
- defer conn.Close()
- input2 := make(map[string]interface{})
-
- input := make(map[string]interface{})
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01101"
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "血透室"
- inputData["deviceType"] = ""
- input["data"] = inputData
- input["orgId"] = code
- input["transType"] = "ec.query"
- input2["url"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
- input2["indata"] = input
-
- bytesData, _ := json.Marshal(input2)
- err = conn.WriteMessage(websocket.TextMessage, bytesData)
- if err != nil {
- fmt.Println(err)
- }
-
- // 接收消息
- _, receivedMessage, err := conn.ReadMessage()
- if err != nil {
- fmt.Println(err)
- }
-
- return "", string(receivedMessage)
- }
- func (c *JSybController) GetELeCertInfoThree(code string, operator_id string, operator_name string) (string, string) {
- // WebSocket服务器地址
- serverURL := "ws://127.0.0.1:8899"
-
- // 解析WebSocket服务器地址
- u, err := url.Parse(serverURL)
- if err != nil {
- log.Fatal(err)
- }
-
- // 建立WebSocket连接
- conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
- if err != nil {
- log.Fatal(err)
- }
- defer conn.Close()
- input2 := make(map[string]interface{})
-
- input := make(map[string]interface{})
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01301"
- inputData["operatorId"] = operator_id
- inputData["operatorName"] = operator_name
- inputData["officeId"] = "001"
- inputData["officeName"] = "血透室"
- inputData["deviceType"] = ""
- input["data"] = inputData
- input["orgId"] = code
- input["transType"] = "ec.query"
- input2["url"] = "http://10.58.33.207:10086/localcfc/api/hsecfc/localQrCodeQuery"
- input2["indata"] = input
-
- bytesData, _ := json.Marshal(input2)
- err = conn.WriteMessage(websocket.TextMessage, bytesData)
- if err != nil {
- fmt.Println(err)
- }
-
- // 接收消息
- _, receivedMessage, err := conn.ReadMessage()
- if err != nil {
- fmt.Println(err)
- }
-
- return "", string(receivedMessage)
- }
-
- func GetELeCertInfoSettle(code string, operator_id string, operator_name string) (string, string) {
- DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
- readCard := DllDef.MustFindProc("GetPersonInfo")
-
- pCardInfo := make([]byte, 8192)
- pBusiCardInfo := make([]byte, 8192)
- data := make(map[string]interface{})
-
- inputData := make(map[string]interface{})
- inputData["orgId"] = code
- inputData["businessType"] = "01301"
- inputData["operatorId"] = "1"
- inputData["operatorName"] = "admin"
- inputData["officeId"] = "001"
- inputData["officeName"] = "admin"
- data["data"] = inputData
- data["transType"] = "ec.query"
- data["orgId"] = code
- bytesData, _ := json.Marshal(data)
- pCardInfo = bytesData
- pCardInfo = []byte(ConvertByte2String(pCardInfo, GB18030))
-
- ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&pCardInfo[0])), (uintptr)(unsafe.Pointer(&pBusiCardInfo[0])))
- fmt.Println(ret2)
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(bytesData)), "gbk", "utf-8"))
- fmt.Println(":", ConvertToString(DeleteExtraSpace(string(pBusiCardInfo)), "gbk", "utf-8"))
- if ret2 != 0 {
- return "", ""
- }
- return ConvertByte2String([]byte(DeleteExtraSpace(string(bytesData))), GB18030), ConvertByte2String([]byte(DeleteExtraSpace(string(pBusiCardInfo))), GB18030)
- }
-
- func IntPtr(n int) uintptr {
- return uintptr(n)
- }
-
- func StrPtr(s string) uintptr {
- return uintptr(unsafe.Pointer(syscall.StringBytePtr(s)))
- }
-
- type Charset string
-
- const (
- UTF8 = Charset("UTF-8")
- GB18030 = Charset("GB18030")
- )
-
- func ConvertToString(src string, srcCode string, tagCode string) string {
- srcCoder := mahonia.NewDecoder(srcCode)
- srcResult := srcCoder.ConvertString(src)
- tagCoder := mahonia.NewDecoder(tagCode)
- _, cdata, _ := tagCoder.Translate([]byte(srcResult), true)
- result := string(cdata)
- return result
- }
-
- func DeleteExtraSpace(s string) string {
- //删除字符串中的多余空格,有多个空格时,仅保留一个空格
- s1 := strings.Replace(s, " ", " ", -1) //替换tab为空格
- regstr := "\\s{2,}" //两个及两个以上空格的正则表达式
- reg, _ := regexp.Compile(regstr) //编译正则表达式
- s2 := make([]byte, len(s1)) //定义字符数组切片
- copy(s2, s1) //将字符串复制到切片
- spc_index := reg.FindStringIndex(string(s2)) //在字符串中搜索
- for len(spc_index) > 0 { //找到适配项
- s2 = append(s2[:spc_index[0]+1], s2[spc_index[1]:]...) //删除多余空格
- spc_index = reg.FindStringIndex(string(s2)) //继续在字符串中搜索
- }
- return string(s2)
- }
-
- func Remove0000(s string) string {
- str := make([]rune, 0, len(s))
- for _, v := range []rune(s) {
- if v == 0 {
- continue
- }
- str = append(str, v)
- }
- return string(str)
- }
-
- func saveJsLog(result string, request string, infno string, desc string, org_name string) {
-
- //org_id, _ := beego.AppConfig.Int64("org_id")
- //miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
- dir := org_name + "日志"
- utils.Mkdir(dir)
- month := time.Unix(1557042972, 0).Format("1")
- year := time.Now().Format("2006")
- month = time.Now().Format("01")
- day := time.Now().Format("02")
- hour := time.Now().Format("15")
- min := time.Now().Format("04")
- sec := time.Now().Format("05")
-
- result_time := year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec
-
- file := org_name + "_" + year + month + day + "_log"
- file_name := file + ".txt"
- file_path := org_name + "日志" + "/" + file_name
- exist, _ := utils.PathExists(file_path)
- if exist { //存在
- fmt.Println("存在")
- f, err := os.OpenFile(file_path, os.O_WRONLY, 0644)
- if err != nil {
- fmt.Println("read fail")
- }
- content := "\r\n" + "\r\n" + "\r\n" + result_time + " " + "【 " + desc + infno + "入参" + " 】:" + "\r\n" + request + "\r\n" + result_time + " " + "【 " + desc + infno + "出参" + " 】:" + "\r\n" + result
- n, _ := f.Seek(0, 2)
- _, err = f.WriteAt([]byte(content), n)
-
- } else { //不存在
- fmt.Println("文件不存在,创建文件")
- f, err := os.Create(org_name + "日志" + "/" + file_name)
- defer f.Close()
- if err != nil {
- } else {
- _, err = f.Write([]byte("记录日志"))
- }
- }
-
- }
-
- func (c *JSybController) Get3101() {
- 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
- }
- pdUserJSONBytes, _ := json.Marshal(respJSON["pd"])
- var pd models.PatientDtos
- if err := json.Unmarshal(pdUserJSONBytes, &pd); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fedUserJSONBytes, _ := json.Marshal(respJSON["fed"])
- var fed models.FsiEncounterDtos
- if err := json.Unmarshal(fedUserJSONBytes, &fed); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fddUserJSONBytes, _ := json.Marshal(respJSON["fdd"])
- var fdd []*models.FsiDiagnoseDtos
- if err := json.Unmarshal(fddUserJSONBytes, &fdd); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fodUserJSONBytes, _ := json.Marshal(respJSON["fod"])
- var fod []*models.FsiOrderDtos
- if err := json.Unmarshal(fodUserJSONBytes, &fod); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- fopdUserJSONBytes, _ := json.Marshal(respJSON["fopd"])
- var fopd []*models.FsiOperationDtosData
- if err := json.Unmarshal(fopdUserJSONBytes, &fopd); 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
- }
- request, result := service.Jsyb3101(pd, fed, fdd, fod, fopd, pp, respJSON["trig_scen"].(string))
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- saveJsLog(result, request, "3101", "事前", pp.FixmedinsName)
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
- func (c *JSybController) Get3102() {
- 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
- }
- pdUserJSONBytes, _ := json.Marshal(respJSON["pd"])
- var pd models.PatientDtos
- if err := json.Unmarshal(pdUserJSONBytes, &pd); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fedUserJSONBytes, _ := json.Marshal(respJSON["fed"])
- var fed models.FsiEncounterDtos
- if err := json.Unmarshal(fedUserJSONBytes, &fed); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fddUserJSONBytes, _ := json.Marshal(respJSON["fdd"])
- var fdd []*models.FsiDiagnoseDtos
- if err := json.Unmarshal(fddUserJSONBytes, &fdd); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
-
- fodUserJSONBytes, _ := json.Marshal(respJSON["fod"])
- var fod []*models.FsiOrderDtos
- if err := json.Unmarshal(fodUserJSONBytes, &fod); err != nil {
- utils.ErrorLog("解析失败:%v", err)
- return
- }
- fopdUserJSONBytes, _ := json.Marshal(respJSON["fopd"])
- var fopd []*models.FsiOperationDtosData
- if err := json.Unmarshal(fopdUserJSONBytes, &fopd); 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
- }
-
- request, result := service.Jsyb3102(pd, fed, fdd, fod, fopd, pp, respJSON["trig_scen"].(string))
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- saveJsLog(result, request, "3102", "事后", pp.FixmedinsName)
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- func (c *JSybController) Get4101() {
- 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
- }
- request, result := service.Jsyb4101(struct4101, pp)
- var dat map[string]interface{}
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
- fmt.Println(dat)
- } else {
- fmt.Println(err)
- }
- var dat2 map[string]interface{}
- if err := json.Unmarshal([]byte(request), &dat2); err == nil {
- fmt.Println(dat2)
- } else {
- fmt.Println(err)
- }
- saveJsLog(result, request, "4101", "上传明细清单", pp.FixmedinsName)
- c.ServeSuccessJSON(map[string]interface{}{
- "pre": dat,
- "request_log": dat2,
- })
- }
-
- func ConvertByte2String(byte []byte, charset Charset) string {
-
- var str string
- switch charset {
- case GB18030:
- decodeBytes, _ := simplifiedchinese.GB18030.NewDecoder().Bytes(byte)
- str = string(decodeBytes)
- case UTF8:
- fallthrough
- default:
- str = string(byte)
- }
-
- return str
- }
|