hbyb_controller.go 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. package hb
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "gdyb/controllers"
  6. "gdyb/models"
  7. "gdyb/service"
  8. "gdyb/utils"
  9. "github.com/astaxie/beego"
  10. "io/ioutil"
  11. )
  12. type HBybController struct {
  13. controllers.BaseAuthAPIController
  14. }
  15. func HbybRegistRouters() {
  16. beego.Router("/hbyb/1101", &HBybController{}, "get:PostOne")
  17. beego.Router("/hbyb/2201", &HBybController{}, "get:PostTwo")
  18. beego.Router("/hbyb/2202", &HBybController{}, "get:PostThree")
  19. beego.Router("/hbyb/2203", &HBybController{}, "post:PostFour")
  20. beego.Router("/hbyb/2204", &HBybController{}, "post:PostFive")
  21. beego.Router("/hbyb/2205", &HBybController{}, "get:PostSix")
  22. beego.Router("/hbyb/2206", &HBybController{}, "get:PostSeven")
  23. beego.Router("/hbyb/2207", &HBybController{}, "get:PostEight")
  24. beego.Router("/hbyb/2208", &HBybController{}, "get:PostNine")
  25. beego.Router("/hbyb/5203", &HBybController{}, "get:PostTen")
  26. beego.Router("/hbyb/2001", &HBybController{}, "get:Post2001")
  27. beego.Router("/hbyb/3202", &HBybController{}, "post:Post3202a")
  28. beego.Router("/hbyb/4101", &HBybController{}, "post:Post4101")
  29. }
  30. func (c *HBybController) Post3202a() {
  31. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  32. var respJSON map[string]interface{}
  33. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  34. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  35. return
  36. }
  37. userJSONBytes, _ := json.Marshal(respJSON["bps"])
  38. var bps []*models.BusinessParamsTwo
  39. if err := json.Unmarshal(userJSONBytes, &bps); err != nil {
  40. utils.ErrorLog("解析失败:%v", err)
  41. return
  42. }
  43. var baseParams models.BaseParams
  44. baseParams.InsuplcAdmdvs = respJSON["insuplc_admdvs"].(string)
  45. baseParams.MdtrtareaAdmvs = respJSON["mdtrtarea_admvs"].(string)
  46. baseParams.OrgName = respJSON["org_name"].(string)
  47. baseParams.Doctor = respJSON["doctor"].(string)
  48. baseParams.FixmedinsCode = respJSON["fixmedins_code"].(string)
  49. result := service.Hbyb3202a(baseParams, bps)
  50. var dat map[string]interface{}
  51. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  52. fmt.Println(dat)
  53. } else {
  54. fmt.Println(err)
  55. }
  56. c.ServeSuccessJSON(map[string]interface{}{
  57. "pre": dat,
  58. })
  59. }
  60. func (c *HBybController) Post4101() {
  61. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  62. var respJSON map[string]interface{}
  63. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  64. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  65. return
  66. }
  67. userJSONBytes, _ := json.Marshal(respJSON["struct4101"])
  68. var struct4101 service.Struct4101
  69. if err := json.Unmarshal(userJSONBytes, &struct4101); err != nil {
  70. utils.ErrorLog("解析失败:%v", err)
  71. return
  72. }
  73. result, inputLog := service.Hbyb4101(struct4101, respJSON["secret_key"].(string), respJSON["org_name"].(string), respJSON["opera"].(string), respJSON["code"].(string), respJSON["insuplc_admdvs"].(string), respJSON["mdtrtarea_admvs"].(string))
  74. var dat map[string]interface{}
  75. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  76. } else {
  77. }
  78. var dat2 map[string]interface{}
  79. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  80. } else {
  81. }
  82. c.ServeSuccessJSON(map[string]interface{}{
  83. "pre": dat,
  84. "log": dat2,
  85. })
  86. }
  87. func (c *HBybController) Post2001() {
  88. org_name := c.GetString("org_name")
  89. doctor := c.GetString("doctor")
  90. fixmedins_code := c.GetString("fixmedins_code")
  91. insuplc_admdvs := c.GetString("insuplc_admdvs")
  92. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  93. secret_key := c.GetString("secret_key")
  94. psn_no := c.GetString("psn_no")
  95. insutype := c.GetString("insutype")
  96. med_type := c.GetString("med_type")
  97. result, inputLog := service.Hbyb2001(secret_key, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, psn_no, insutype, med_type)
  98. fmt.Println(result)
  99. fmt.Println(inputLog)
  100. var dat map[string]interface{}
  101. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  102. } else {
  103. }
  104. var dat2 map[string]interface{}
  105. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  106. } else {
  107. }
  108. c.ServeSuccessJSON(map[string]interface{}{
  109. "pre": dat,
  110. "log": dat2,
  111. })
  112. }
  113. func (c *HBybController) PostOne() {
  114. certNo := c.GetString("cert_no")
  115. org_name := c.GetString("org_name")
  116. doctor := c.GetString("doctor")
  117. fixmedins_code := c.GetString("fixmedins_code")
  118. insuplc_admdvs := c.GetString("insuplc_admdvs")
  119. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  120. secret_key := c.GetString("secret_key")
  121. id_card_type, _ := c.GetInt64("id_card_type")
  122. card_sn := c.GetString("card_sn")
  123. certificates := c.GetString("certificates")
  124. fmt.Println(certNo)
  125. fmt.Println(org_name)
  126. fmt.Println(doctor)
  127. fmt.Println(fixmedins_code)
  128. fmt.Println(insuplc_admdvs)
  129. fmt.Println(mdtrtarea_admvs)
  130. fmt.Println(secret_key)
  131. fmt.Println(id_card_type)
  132. fmt.Println(card_sn)
  133. fmt.Println(certificates)
  134. result, inputLog := service.Hbyb1101(certNo, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, id_card_type, card_sn, certificates)
  135. fmt.Println(result)
  136. fmt.Println(inputLog)
  137. var dat map[string]interface{}
  138. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  139. } else {
  140. }
  141. var dat2 map[string]interface{}
  142. if err := json.Unmarshal([]byte(inputLog), &dat2); err == nil {
  143. } else {
  144. }
  145. c.ServeSuccessJSON(map[string]interface{}{
  146. "pre": dat,
  147. "log": dat2,
  148. })
  149. }
  150. func (c *HBybController) PostTwo() {
  151. psnNo := c.GetString("psn_no")
  152. insutype := c.GetString("insutype")
  153. certNo := c.GetString("cert_no")
  154. org_name := c.GetString("org_name")
  155. doctor := c.GetString("doctor")
  156. ipt_otp_no := c.GetString("ipt_otp_no")
  157. dept := c.GetString("dept")
  158. fixmedins_code := c.GetString("fixmedins_code")
  159. opter := c.GetString("opter")
  160. dept_code := c.GetString("dept_code")
  161. doctor_id := c.GetString("doctor_id")
  162. doctor_name := c.GetString("doctor_name")
  163. insuplc_admdvs := c.GetString("insuplc_admdvs")
  164. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  165. secret_key := c.GetString("secret_key")
  166. id_card_type, _ := c.GetInt64("id_card_type")
  167. result, _ := service.Hbyb2201(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, opter, doctor_name)
  168. var dat map[string]interface{}
  169. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  170. //fmt.Println(dat["status"])
  171. } else {
  172. }
  173. c.ServeSuccessJSON(map[string]interface{}{
  174. "pre": dat,
  175. })
  176. }
  177. func (c *HBybController) PostThree() {
  178. psnNo := c.GetString("psn_no")
  179. mdtrtId := c.GetString("mdtrt_id")
  180. iptOtpNo := c.GetString("ipt_otp_no")
  181. org_name := c.GetString("org_name")
  182. doctor := c.GetString("doctor")
  183. insuplc_admdvs := c.GetString("insuplc_admdvs")
  184. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  185. secret_key := c.GetString("secret_key")
  186. fixmedins_code := c.GetString("fixmedins_code")
  187. result, requestLog := service.Hbyb2202(psnNo, mdtrtId, iptOtpNo, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code)
  188. var dat map[string]interface{}
  189. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  190. } else {
  191. }
  192. c.ServeSuccessJSON(map[string]interface{}{
  193. "pre": dat,
  194. "request_log": requestLog,
  195. })
  196. }
  197. func (c *HBybController) PostFour() {
  198. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  199. var respJSON map[string]interface{}
  200. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  201. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  202. return
  203. }
  204. userJSONBytes, _ := json.Marshal(respJSON["config"])
  205. var config []*models.HisXtDiagnoseConfig
  206. if err := json.Unmarshal(userJSONBytes, &config); err != nil {
  207. utils.ErrorLog("解析失败:%v", err)
  208. return
  209. }
  210. psnNo := respJSON["psn_no"].(string)
  211. mdtrtId := respJSON["mdtrt_id"].(string)
  212. opter := respJSON["opter"].(string)
  213. org_name := respJSON["org_name"].(string)
  214. med_type := respJSON["med_type"].(string)
  215. doctor_id := respJSON["doctor_id"].(string)
  216. doctor_name := respJSON["doctor_name"].(string)
  217. department := respJSON["department"].(string)
  218. fixmedins_code := respJSON["fixmedins_code"].(string)
  219. insuplc_admdvs := respJSON["insuplc_admdvs"].(string)
  220. mdtrtarea_admvs := respJSON["mdtrtarea_admvs"].(string)
  221. secret_key := respJSON["secret_key"].(string)
  222. sick_code := respJSON["sick_code"].(string)
  223. sick_name := respJSON["sick_name"].(string)
  224. dept := respJSON["dept"].(string)
  225. begin_time := respJSON["begin_time"].(string)
  226. result, request_log := service.Hbyb2203(psnNo, mdtrtId, dept, department, org_name, med_type, doctor_id, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name, dept, config, begin_time, doctor_name, opter)
  227. fmt.Println(request_log)
  228. var dat map[string]interface{}
  229. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  230. } else {
  231. }
  232. c.ServeSuccessJSON(map[string]interface{}{
  233. "pre": dat,
  234. })
  235. }
  236. type All struct {
  237. HisPrescription HisPrescription
  238. mdtrt_id string
  239. psn_no string
  240. }
  241. type HisPrescription struct {
  242. ID int64 `gorm:"column:id" json:"id" form:"id"`
  243. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  244. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  245. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  246. HisPatientId int64 `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
  247. Status int64 `gorm:"column:status" json:"status" form:"status"`
  248. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  249. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  250. Number string `gorm:"column:number" json:"number" form:"number"`
  251. Type int64 `gorm:"column:type" json:"type" form:"type"`
  252. Doctor int64 `gorm:"column:doctor" json:"doctor" form:"doctor"`
  253. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  254. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  255. HisDoctorAdviceInfo []*models.HisDoctorAdviceInfo `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"advices"`
  256. HisPrescriptionProject []*models.HisPrescriptionProject `gorm:"ForeignKey:PatientId,RecordDate,PrescriptionId;AssociationForeignKey:PatientId,RecordDate,ID" json:"project"`
  257. }
  258. func (c *HBybController) PostFive() {
  259. body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
  260. var respJSON map[string]interface{}
  261. if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
  262. utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
  263. return
  264. }
  265. userJSONBytes, _ := json.Marshal(respJSON["pre"])
  266. var hp []*models.HisPrescription
  267. if err := json.Unmarshal(userJSONBytes, &hp); err != nil {
  268. utils.ErrorLog("解析失败:%v", err)
  269. return
  270. }
  271. fmt.Println(respJSON["psn_no"].(string))
  272. fmt.Println(respJSON["mdtrt_id"].(string))
  273. fmt.Println(respJSON["chrg_bchno"].(string))
  274. fmt.Println(respJSON["org_name"].(string))
  275. fmt.Println(respJSON["doctor"].(string))
  276. fmt.Println(respJSON["doctor_id"].(string))
  277. fmt.Println(respJSON["dept"].(string))
  278. fmt.Println(respJSON["fixmedins_code"].(string))
  279. fmt.Println(respJSON["dept_code"].(string))
  280. fmt.Println(respJSON["balance_accounts_type"].(string))
  281. fmt.Println("1111111")
  282. fmt.Println(respJSON["opter"].(string))
  283. fmt.Println(respJSON["insuplc_admdvs"].(string))
  284. fmt.Println(respJSON["mdtrtarea_admvs"].(string))
  285. fmt.Println(respJSON["secret_key"].(string))
  286. result, requestLog := service.Hbyb2204(respJSON["psn_no"].(string), respJSON["mdtrt_id"].(string), hp, respJSON["chrg_bchno"].(string), respJSON["org_name"].(string),
  287. 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["opter"].(string))
  288. var dat map[string]interface{}
  289. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  290. fmt.Println(dat)
  291. } else {
  292. fmt.Println(err)
  293. }
  294. var dat2 map[string]interface{}
  295. if err := json.Unmarshal([]byte(requestLog), &dat2); err == nil {
  296. fmt.Println(dat2)
  297. } else {
  298. fmt.Println(err)
  299. }
  300. c.ServeSuccessJSON(map[string]interface{}{
  301. "pre": dat,
  302. "request_log": requestLog,
  303. })
  304. }
  305. func (c *HBybController) PostSix() {
  306. psnNo := c.GetString("psn_no")
  307. mdtrtId := c.GetString("mdtrt_id")
  308. chrgBchno := c.GetString("chrg_bchno")
  309. org_name := c.GetString("org_name")
  310. doctor := c.GetString("doctor")
  311. insuplc_admdvs := c.GetString("insuplc_admdvs")
  312. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  313. secret_key := c.GetString("secret_key")
  314. fixmedins_code := c.GetString("fixmedins_code")
  315. result, requestlog := service.Hbyb2205(psnNo, mdtrtId, chrgBchno, org_name, doctor, insuplc_admdvs, mdtrtarea_admvs, secret_key, fixmedins_code)
  316. fmt.Println(requestlog)
  317. var dat map[string]interface{}
  318. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  319. fmt.Println(dat)
  320. } else {
  321. fmt.Println(err)
  322. }
  323. c.ServeSuccessJSON(map[string]interface{}{
  324. "pre": dat,
  325. })
  326. }
  327. func (c *HBybController) PostSeven() {
  328. psnNo := c.GetString("psn_no")
  329. mdtrtId := c.GetString("mdtrt_id")
  330. chrgBchno := c.GetString("chrg_bchno")
  331. certNo := c.GetString("cert_no")
  332. insutype := c.GetString("insutype")
  333. total := c.GetString("total")
  334. org_name := c.GetString("org_name")
  335. doctor := c.GetString("doctor")
  336. fixmedins_code := c.GetString("fixmedins_code")
  337. insuplc_admdvs := c.GetString("insuplc_admdvs")
  338. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  339. secret_key := c.GetString("secret_key")
  340. med_type := c.GetString("med_type")
  341. id_card_type, _ := c.GetInt64("id_card_type")
  342. certificates, _ := c.GetInt64("certificates")
  343. result, requestlog := service.Hbyb2206(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)
  344. fmt.Println(requestlog)
  345. var dat map[string]interface{}
  346. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  347. fmt.Println(dat)
  348. } else {
  349. fmt.Println(err)
  350. }
  351. c.ServeSuccessJSON(map[string]interface{}{
  352. "pre": dat,
  353. })
  354. }
  355. func (c *HBybController) PostEight() {
  356. psnNo := c.GetString("psn_no")
  357. mdtrtId := c.GetString("mdtrt_id")
  358. chrgBchno := c.GetString("chrg_bchno")
  359. certNo := c.GetString("cert_no")
  360. insutype := c.GetString("insutype")
  361. total := c.GetString("total")
  362. org_name := c.GetString("org_name")
  363. doctor := c.GetString("doctor")
  364. fixmedins_code := c.GetString("fixmedins_code")
  365. insuplc_admdvs := c.GetString("insuplc_admdvs")
  366. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  367. secret_key := c.GetString("secret_key")
  368. med_type := c.GetString("med_type")
  369. id_card_type, _ := c.GetInt64("id_card_type")
  370. certificates, _ := c.GetInt64("certificates")
  371. fulamt_ownpay_amt, _ := c.GetFloat("fulamt_ownpay_amt")
  372. overlmt_selfpay, _ := c.GetFloat("overlmt_selfpay")
  373. preselfpay_amt, _ := c.GetFloat("preselfpay_amt")
  374. inscp_scp_amt, _ := c.GetFloat("inscp_scp_amt")
  375. acct_used_flag, _ := c.GetInt64("acct_used_flag")
  376. result, srcRequest := service.Hbyb2207(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)
  377. var dat map[string]interface{}
  378. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  379. fmt.Println(dat)
  380. } else {
  381. fmt.Println(err)
  382. }
  383. var dat2 map[string]interface{}
  384. if err := json.Unmarshal([]byte(srcRequest), &dat2); err == nil {
  385. fmt.Println(dat2)
  386. } else {
  387. fmt.Println(err)
  388. }
  389. c.ServeSuccessJSON(map[string]interface{}{
  390. "pre": dat,
  391. "pre2": dat2,
  392. })
  393. }
  394. func (c *HBybController) PostNine() {
  395. psnNo := c.GetString("psn_no")
  396. mdtrtId := c.GetString("mdtrt_id")
  397. setlId := c.GetString("setl_id")
  398. org_name := c.GetString("org_name")
  399. doctor := c.GetString("doctor")
  400. secret_key := c.GetString("secret_key")
  401. fixmedins_code := c.GetString("fixmedins_code")
  402. insuplc_admdvs := c.GetString("insuplc_admdvs")
  403. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  404. result, src_request := service.Hbyb2208(psnNo, mdtrtId, setlId, org_name, doctor, secret_key, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
  405. fmt.Println(src_request)
  406. var dat map[string]interface{}
  407. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  408. fmt.Println(dat)
  409. } else {
  410. fmt.Println(err)
  411. }
  412. c.ServeSuccessJSON(map[string]interface{}{
  413. "pre": dat,
  414. })
  415. }
  416. func (c *HBybController) PostTen() {
  417. psnNo := c.GetString("psn_no")
  418. mdtrtId := c.GetString("mdtrt_id")
  419. setlId := c.GetString("setl_id")
  420. org_name := c.GetString("org_name")
  421. doctor := c.GetString("doctor")
  422. med_type := c.GetString("med_type")
  423. secret_key := c.GetString("secret_key")
  424. fixmedins_code := c.GetString("fixmedins_code")
  425. insuplc_admdvs := c.GetString("insuplc_admdvs")
  426. mdtrtarea_admvs := c.GetString("mdtrtarea_admvs")
  427. baseParams := models.BaseParams{
  428. SecretKey: secret_key,
  429. FixmedinsCode: fixmedins_code,
  430. InsuplcAdmdvs: insuplc_admdvs,
  431. MdtrtareaAdmvs: mdtrtarea_admvs,
  432. OrgName: org_name,
  433. Doctor: doctor,
  434. }
  435. businessParams := models.BusinessParams{
  436. PsnNo: psnNo,
  437. MdtrtId: mdtrtId,
  438. SetlId: setlId,
  439. }
  440. result := service.Hbyb5203(baseParams, businessParams, med_type)
  441. var dat map[string]interface{}
  442. if err := json.Unmarshal([]byte(result), &dat); err == nil {
  443. fmt.Println(dat)
  444. } else {
  445. fmt.Println(err)
  446. }
  447. c.ServeSuccessJSON(map[string]interface{}{
  448. "pre": dat,
  449. })
  450. }