| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- package controllers
- import (
- // "math"
- // "strconv"
- // "strings"
- "time"
- // "dashoo.cn/backend/api/business/material"
- // "dashoo.cn/utils"
- )
- type HomeController struct {
- BaseController
- }
- type LablePrePrint struct {
- AccCode string
- Name string
- SampleCode string
- BarCode string
- SampleTypeCode string
- SampleTypeName string
- SampleOrgan string
- SampleOrganName string
- SampleSite string
- SampleSiteName string
- SourceId string
- SourceIdCard string
- SourceName string
- InnerCode string
- ReceiveDate time.Time
- ValidityDate time.Time
- ZBack11 string
- ZBack12 string
- ZBack13 string
- ZBack14 string
- ZBack15 string
- ZBack16 string
- ZBack17 string
- ZBack18 string
- ZBack19 string
- ZBack20 string
- ZBack21 string
- ZBack22 string
- ZBack23 string
- ZBack24 string
- ZBack25 string
- ZBack26 string
- ZBack27 string
- ZBack28 string
- ZBack29 string
- ZBack30 string
- ZBack31 string
- ZBack32 string
- ZBack33 string
- ZBack34 string
- ZBack35 string
- ZBack36 string
- ZBack37 string
- ZBack38 string
- ZBack39 string
- ZBack40 string
- ZBack41 string
- ZBack42 string
- ZBack43 string
- ZBack44 string
- ZBack45 string
- ZBack46 string
- ZBack47 string
- ZBack48 string
- ZBack49 string
- ZBack50 string
- ZBack51 string
- ZBack52 string
- ZBack53 string
- ZBack54 string
- ZBack55 string
- ZBack56 string
- ZBack57 string
- ZBack58 string
- ZBack59 string
- ZBack60 string
- }
- //func spreBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // code := params[1]
- // acccode := params[2]
- // where := ""
- // if code != "" {
- // where = where + " Id =" + code + ""
- // }
- // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
- // datas = svc.QuerySampleList(acccode, where)
- // return
- //}
- //func sampleBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // code := params[1]
- // acccode := params[2]
- // where := ""
- // if code != "" {
- // where = where + " Id =" + code + ""
- // }
- // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
- // datas = svc.QuerySampleList(acccode, where)
- // return
- //}
- //func sampleListeprint(param string) (it cellscollection.CellsCollectionDetail, datas []cellscollection.CellsCollectionDetail) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // accode := params[1]
- // detailid := params[2]
- // svc := cellscollection.GetCellscollectionService(utils.DBE)
- // svc.GetEntitysByWhere(accode+CellsCollectionDetailName, "SampleFromItem=2 and PreparationDetailId="+detailid, &datas)
- // return
- //}
- //预录入、已录入、待复存样本条码批量打印
- //func sampleBarcodeprintbatch(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
- // param = Base64Decode(param)
- // fmt.Println("======================", param)
- // params := strings.Split(param, ",")
- // acccode := params[1]
- // codes := params[2]
- // fmt.Println(acccode)
- // fmt.Println(codes)
- // codess := strings.Split(codes, ";")
- // where := ""
- // if len(codess) > 0 {
- // where = where + " Id in ( "
- // for i := 0; i < len(codess); i++ {
- // if codess[i] != "" {
- // if i == len(codess)-1 {
- // where = where + codess[i] + ""
- // } else {
- // where = where + "" + codess[i] + ","
- // }
- // }
- // }
- // where = where + " ) "
- // }
- // svc := samplesinfo.GetSamplesInfoService(utils.DBE)
- // datas = svc.QuerySampleList(acccode, where)
- // return
- //}
- //LIS业务申请条码打印
- //func testApplyBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // ApplyNum := params[1]
- // acccode := params[2]
- // where := ""
- // if ApplyNum != "" {
- // where = where + " a.ApplyNum=" + ApplyNum + ""
- // }
- // svc := lissystem.GetTestTransferService(utils.DBE)
- // datas = svc.TestTransferBarCodePrint(acccode, where)
- // return
- //}
- //物料入库单打印
- //func materialRKprint(param string) (it material.MaterialRKPrintModel, datas []material.MaterialRKPrintModel) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // RKNo := params[1]
- // acccode := params[2]
- // where := ""
- // if RKNo != "" {
- // where = where + " a.RKNo=" + RKNo + ""
- // }
- // svc := material.GetMaterialService(utils.DBE)
- // datas = svc.MaterialRKPrint(acccode, where)
- // return
- //}
- //物料出库单打印
- //func materialCKprint(param string) (it material.MaterialCKPrintModel, datas []material.MaterialCKPrintModel) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // CKNo := params[1]
- // acccode := params[2]
- // where := ""
- // if CKNo != "" {
- // where = where + " a.CKNo=" + CKNo + ""
- // }
- // svc := material.GetMaterialService(utils.DBE)
- // datas = svc.MaterialCKPrint(acccode, where)
- // return
- //}
- //物料盘点单打印
- //func materialPDprint(param string) (it material.MaterialPDPrintModel, datas []material.MaterialPDPrintModel) {
- // param = Base64Decode(param)
- // params := strings.Split(param, ",")
- // PDNo := params[1]
- // acccode := params[2]
- // where := ""
- // if PDNo != "" {
- // where = where + " a.PDNo=" + PDNo + ""
- // }
- // svc := material.GetMaterialService(utils.DBE)
- // datas = svc.MaterialPDPrint(acccode, where)
- // return
- //}
- func (this *HomeController) Printservice() {
- // param := this.Input().Get("param")
- // paramreal := Base64Decode(param)
- // paramreals := strings.Split(paramreal, ",") //参数,表ID,AccCode
- // // funcode := paramreals[0]
- // var item interface{}
- // var cols []PrintColType
- // var multiDatas []PrintData
- // // switch funcode {
- // // case "materialRKprint":
- // // it, itema := materialRKprint(param)
- // // cols = AutoColType(&it)
- // // item = itema
- // // case "materialCKprint":
- // // it, itema := materialCKprint(param)
- // // cols = AutoColType(&it)
- // // item = itema
- // // case "materialPDprint":
- // // it, itema := materialPDprint(param)
- // // cols = AutoColType(&it)
- // // item = itema
- // // }
- // var datas []PrintData
- // if len(multiDatas) <= 0 {
- // var data = PrintData{item, cols}
- // datas = append(datas, data)
- // } else {
- // datas = multiDatas
- // }
- // this.Data["json"] = PrintInfo{datas, []string{"var1", "var2", "var3"}}
- // this.ServeJSON()
- }
|