package controllers import ( "XT_New/service" "github.com/astaxie/beego" ) type SupplyOrderApiController struct { BaseAuthAPIController } func SupplyOrderApiRegistRouters() { beego.Router("/api/supply/getinitorder", &SupplyOrderApiController{}, "get:GetInitOrder") } func (this *SupplyOrderApiController) GetInitOrder() { orgId := this.GetAdminUserInfo().CurrentOrgId //获取药品库数据 baseList, _ := service.GetSupplyDrugList(orgId) goodList, _ := service.GetSupplyGoodList(orgId) manufactuerList, _ := service.GetAllManufacturerList(orgId) goodTypeList, _ := service.GetAllGoodType(orgId) supplyList, _ := service.GetSupplierList(orgId) var drugType = "药品类型" drugTypeParent, _ := service.GetDrugDataConfig(0, drugType) drugTypeList, _ := service.GetParentDataConfig(drugTypeParent.ID, orgId) this.ServeSuccessJSON(map[string]interface{}{ "drugList": baseList, "goodList": goodList, "manufactuerList": manufactuerList, "goodTypeList": goodTypeList, "drugTypeList": drugTypeList, "supplyList": supplyList, }) return }