12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702 |
- 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/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/3276", &JSybController{}, "post:Get3276")
- //beego.Router("/jsyb/3277", &JSybController{}, "post:Get3277")
-
- }
-
- 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[0])
- saveJsLog(result, request_log, "3507", "库存盘点", struct3507[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) Get9001() {
-
- }
- func (c *JSybController) PostOnec() {
- result, inputLog := service.Jsyb1101F()
- fmt.Println(result)
- fmt.Println(inputLog)
-
- }
- func (c *JSybController) Posttwoc() {
- result, request_log := service.Jsyb2201F()
- 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["doctor"].(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["diag_code"].(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"`
- }
-
- 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
-
- }
-
- }
-
- 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) 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
- }
|