home.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. package controllers
  2. import (
  3. // "math"
  4. // "strconv"
  5. // "strings"
  6. "time"
  7. // "dashoo.cn/backend/api/business/material"
  8. // "dashoo.cn/utils"
  9. )
  10. type HomeController struct {
  11. BaseController
  12. }
  13. type LablePrePrint struct {
  14. AccCode string
  15. Name string
  16. SampleCode string
  17. BarCode string
  18. SampleTypeCode string
  19. SampleTypeName string
  20. SampleOrgan string
  21. SampleOrganName string
  22. SampleSite string
  23. SampleSiteName string
  24. SourceId string
  25. SourceIdCard string
  26. SourceName string
  27. InnerCode string
  28. ReceiveDate time.Time
  29. ValidityDate time.Time
  30. ZBack11 string
  31. ZBack12 string
  32. ZBack13 string
  33. ZBack14 string
  34. ZBack15 string
  35. ZBack16 string
  36. ZBack17 string
  37. ZBack18 string
  38. ZBack19 string
  39. ZBack20 string
  40. ZBack21 string
  41. ZBack22 string
  42. ZBack23 string
  43. ZBack24 string
  44. ZBack25 string
  45. ZBack26 string
  46. ZBack27 string
  47. ZBack28 string
  48. ZBack29 string
  49. ZBack30 string
  50. ZBack31 string
  51. ZBack32 string
  52. ZBack33 string
  53. ZBack34 string
  54. ZBack35 string
  55. ZBack36 string
  56. ZBack37 string
  57. ZBack38 string
  58. ZBack39 string
  59. ZBack40 string
  60. ZBack41 string
  61. ZBack42 string
  62. ZBack43 string
  63. ZBack44 string
  64. ZBack45 string
  65. ZBack46 string
  66. ZBack47 string
  67. ZBack48 string
  68. ZBack49 string
  69. ZBack50 string
  70. ZBack51 string
  71. ZBack52 string
  72. ZBack53 string
  73. ZBack54 string
  74. ZBack55 string
  75. ZBack56 string
  76. ZBack57 string
  77. ZBack58 string
  78. ZBack59 string
  79. ZBack60 string
  80. }
  81. //func spreBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
  82. // param = Base64Decode(param)
  83. // params := strings.Split(param, ",")
  84. // code := params[1]
  85. // acccode := params[2]
  86. // where := ""
  87. // if code != "" {
  88. // where = where + " Id =" + code + ""
  89. // }
  90. // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
  91. // datas = svc.QuerySampleList(acccode, where)
  92. // return
  93. //}
  94. //func sampleBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
  95. // param = Base64Decode(param)
  96. // params := strings.Split(param, ",")
  97. // code := params[1]
  98. // acccode := params[2]
  99. // where := ""
  100. // if code != "" {
  101. // where = where + " Id =" + code + ""
  102. // }
  103. // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
  104. // datas = svc.QuerySampleList(acccode, where)
  105. // return
  106. //}
  107. //func sampleListeprint(param string) (it cellscollection.CellsCollectionDetail, datas []cellscollection.CellsCollectionDetail) {
  108. // param = Base64Decode(param)
  109. // params := strings.Split(param, ",")
  110. // accode := params[1]
  111. // detailid := params[2]
  112. // svc := cellscollection.GetCellscollectionService(utils.DBE)
  113. // svc.GetEntitysByWhere(accode+CellsCollectionDetailName, "SampleFromItem=2 and PreparationDetailId="+detailid, &datas)
  114. // return
  115. //}
  116. //预录入、已录入、待复存样本条码批量打印
  117. //func sampleBarcodeprintbatch(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
  118. // param = Base64Decode(param)
  119. // fmt.Println("======================", param)
  120. // params := strings.Split(param, ",")
  121. // acccode := params[1]
  122. // codes := params[2]
  123. // fmt.Println(acccode)
  124. // fmt.Println(codes)
  125. // codess := strings.Split(codes, ";")
  126. // where := ""
  127. // if len(codess) > 0 {
  128. // where = where + " Id in ( "
  129. // for i := 0; i < len(codess); i++ {
  130. // if codess[i] != "" {
  131. // if i == len(codess)-1 {
  132. // where = where + codess[i] + ""
  133. // } else {
  134. // where = where + "" + codess[i] + ","
  135. // }
  136. // }
  137. // }
  138. // where = where + " ) "
  139. // }
  140. // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
  141. // datas = svc.QuerySampleList(acccode, where)
  142. // return
  143. //}
  144. //LIS业务申请条码打印
  145. //func testApplyBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
  146. // param = Base64Decode(param)
  147. // params := strings.Split(param, ",")
  148. // ApplyNum := params[1]
  149. // acccode := params[2]
  150. // where := ""
  151. // if ApplyNum != "" {
  152. // where = where + " a.ApplyNum=" + ApplyNum + ""
  153. // }
  154. // svc := lissystem.GetTestTransferService(utils.DBE)
  155. // datas = svc.TestTransferBarCodePrint(acccode, where)
  156. // return
  157. //}
  158. //物料入库单打印
  159. //func materialRKprint(param string) (it material.MaterialRKPrintModel, datas []material.MaterialRKPrintModel) {
  160. // param = Base64Decode(param)
  161. // params := strings.Split(param, ",")
  162. // RKNo := params[1]
  163. // acccode := params[2]
  164. // where := ""
  165. // if RKNo != "" {
  166. // where = where + " a.RKNo=" + RKNo + ""
  167. // }
  168. // svc := material.GetMaterialService(utils.DBE)
  169. // datas = svc.MaterialRKPrint(acccode, where)
  170. // return
  171. //}
  172. //物料出库单打印
  173. //func materialCKprint(param string) (it material.MaterialCKPrintModel, datas []material.MaterialCKPrintModel) {
  174. // param = Base64Decode(param)
  175. // params := strings.Split(param, ",")
  176. // CKNo := params[1]
  177. // acccode := params[2]
  178. // where := ""
  179. // if CKNo != "" {
  180. // where = where + " a.CKNo=" + CKNo + ""
  181. // }
  182. // svc := material.GetMaterialService(utils.DBE)
  183. // datas = svc.MaterialCKPrint(acccode, where)
  184. // return
  185. //}
  186. //物料盘点单打印
  187. //func materialPDprint(param string) (it material.MaterialPDPrintModel, datas []material.MaterialPDPrintModel) {
  188. // param = Base64Decode(param)
  189. // params := strings.Split(param, ",")
  190. // PDNo := params[1]
  191. // acccode := params[2]
  192. // where := ""
  193. // if PDNo != "" {
  194. // where = where + " a.PDNo=" + PDNo + ""
  195. // }
  196. // svc := material.GetMaterialService(utils.DBE)
  197. // datas = svc.MaterialPDPrint(acccode, where)
  198. // return
  199. //}
  200. func (this *HomeController) Printservice() {
  201. // param := this.Input().Get("param")
  202. // paramreal := Base64Decode(param)
  203. // paramreals := strings.Split(paramreal, ",") //参数,表ID,AccCode
  204. // // funcode := paramreals[0]
  205. // var item interface{}
  206. // var cols []PrintColType
  207. // var multiDatas []PrintData
  208. // // switch funcode {
  209. // // case "materialRKprint":
  210. // // it, itema := materialRKprint(param)
  211. // // cols = AutoColType(&it)
  212. // // item = itema
  213. // // case "materialCKprint":
  214. // // it, itema := materialCKprint(param)
  215. // // cols = AutoColType(&it)
  216. // // item = itema
  217. // // case "materialPDprint":
  218. // // it, itema := materialPDprint(param)
  219. // // cols = AutoColType(&it)
  220. // // item = itema
  221. // // }
  222. // var datas []PrintData
  223. // if len(multiDatas) <= 0 {
  224. // var data = PrintData{item, cols}
  225. // datas = append(datas, data)
  226. // } else {
  227. // datas = multiDatas
  228. // }
  229. // this.Data["json"] = PrintInfo{datas, []string{"var1", "var2", "var3"}}
  230. // this.ServeJSON()
  231. }