adjust after getuk updated
This commit is contained in:
@@ -11,7 +11,7 @@ require (
|
||||
github.com/jackc/pgx/v5 v5.5.5
|
||||
github.com/karincake/apem v0.0.17
|
||||
github.com/karincake/dodol v0.0.1
|
||||
github.com/karincake/getuk v0.1.1
|
||||
github.com/karincake/getuk v0.2.1
|
||||
github.com/karincake/hongkue v0.0.4
|
||||
github.com/karincake/lepet v0.0.1
|
||||
github.com/karincake/risoles v0.0.3
|
||||
|
||||
@@ -79,8 +79,8 @@ github.com/karincake/apem v0.0.17 h1:y3WXCr9GWLFFFH4Qyq/VWlWWpijHh5zpTc3Lm96twa4
|
||||
github.com/karincake/apem v0.0.17/go.mod h1:cQP2sJfDrLRIiwWoaLWw/z8uAya+DWu/FpmYeinMQXM=
|
||||
github.com/karincake/dodol v0.0.1 h1:jUXmJh1r0Ei4fmHPZ6IUkoplW/V9d27L63JEl6zudL0=
|
||||
github.com/karincake/dodol v0.0.1/go.mod h1:2f1NcvkvY0J3GMUkwILNDYVvRUpz0W3lpPp/Ha/Ld24=
|
||||
github.com/karincake/getuk v0.1.1 h1:zygZ9N5tk+sWwiRSo1SmlNwcAdl+qQVxmOG6jbQ7X1g=
|
||||
github.com/karincake/getuk v0.1.1/go.mod h1:NVnvxSGAkQ/xuq99FzWACvY5efyKPLFla1cKB8czm7c=
|
||||
github.com/karincake/getuk v0.2.1 h1:l9qaoSE1ttwzNbGTRNGYn61EZ9/rb/V+TjdY8XPeswU=
|
||||
github.com/karincake/getuk v0.2.1/go.mod h1:NVnvxSGAkQ/xuq99FzWACvY5efyKPLFla1cKB8czm7c=
|
||||
github.com/karincake/hongkue v0.0.4 h1:oWthq6cDg5DvDm1Z3e7mCLOATQf+oAdtHxN9OPnCfA8=
|
||||
github.com/karincake/hongkue v0.0.4/go.mod h1:YVi5Lyh3DE+GRHx2OSODOr7FwvLi8U4idvcPHO7yeag=
|
||||
github.com/karincake/lepet v0.0.1 h1:eq/cwn5BBg0jWZ1c/MmvhFIBma0zBpVs2LwkfDOncy4=
|
||||
|
||||
@@ -19,6 +19,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
OnlyHaveChildren bool `json:"only-have-children"`
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
OnlyHaveChildren bool `json:"only-have-children"`
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.De
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Device{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.DiagnoseSrc{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,15 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.District{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination))
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,15 +53,13 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.DivisionPosition{}).
|
||||
Preload("Division").
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,8 +53,6 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
if input.OnlyHaveChildren {
|
||||
tx = tx.Where(`
|
||||
EXISTS (
|
||||
@@ -70,7 +68,7 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Di
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -47,14 +47,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Et
|
||||
tx = dg.I
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Ethnic{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,8 +53,6 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.In
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
if input.OnlyHaveChildren {
|
||||
tx = tx.Where(`
|
||||
EXISTS (
|
||||
@@ -70,7 +68,7 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.In
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.In
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Installation{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.In
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.InsuranceCompany{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.It
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Item{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -47,14 +47,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.La
|
||||
tx = dg.I
|
||||
}
|
||||
|
||||
plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Language{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Ma
|
||||
}
|
||||
}
|
||||
|
||||
plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Material{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Mc
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.McuSrcCategory{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Mc
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.McuSrc{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Mc
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.McuSubSrc{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Me
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.MedicalActionSrc{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Me
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.MedicineGroup{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Me
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.MedicineMethod{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Me
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Medicine{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Ph
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.PharmacyCompany{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -47,14 +47,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Pr
|
||||
tx = dg.I
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.ProcedureSrc{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,12 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Pr
|
||||
}
|
||||
}
|
||||
|
||||
tx = tx.Debug().
|
||||
tx = tx.
|
||||
Model(&e.Province{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination))
|
||||
// Scopes(gh.Sort(input.Sort))
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,15 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Re
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Regency{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination))
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Sp
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Specialist{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Su
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Subspecialist{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,15 +53,13 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Un
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Unit{}).
|
||||
Preload("Installation").
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,14 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Uo
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Uom{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Order("\"CreatedAt\" DESC")
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -53,15 +53,12 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Vi
|
||||
}
|
||||
}
|
||||
|
||||
tx = plh.SearchCodeOrName(input.Search, tx)
|
||||
|
||||
tx = plh.Sort(input.Sort, tx)
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Village{}).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
Scopes(gh.Paginate(input, &pagination))
|
||||
Scopes(gh.Paginate(input, &pagination)).
|
||||
Scopes(gh.Sort(input.Sort))
|
||||
|
||||
if err := tx.Find(&data).Error; err != nil {
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
|
||||
Reference in New Issue
Block a user