| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package storehouse
- import (
- "server/dao/godown"
- "server/model/common/request"
- )
- type ManifestService struct {
- }
- func (ms *ManifestService) QueryAllManifest() ([]godown.Manifest, error) {
- return godown.QueryAllManifest()
- }
- func (ms *ManifestService) QueryManifestList(info request.SearchManifest) (list interface{}, total int64, err error) {
- limit := info.PageInfo.PageSize
- offset := info.PageInfo.PageSize * (info.PageInfo.Page - 1)
- return godown.QueryManifestList(limit, offset, info.Genre, info.Title)
- }
- func (ms *ManifestService) CreateManifest(manifest godown.Manifest) error {
- return manifest.CreateManifest()
- }
- func (ms *ManifestService) UpdateManifest(manifest godown.Manifest) error {
- return manifest.UpdateManifest()
- }
- func (ms *ManifestService) DeleteManifest(id int) error {
- return godown.DeleteManifest(id)
- }
- func (ms *ManifestService) CreateInboundManifest(manifest godown.Manifest) error {
- manifest.ManifestGenre = "入库"
- return godown.CreateInboundManifest(manifest.ManifestGenre, manifest.Title, manifest.Custodian, manifest.Cargos)
- }
- func (ms *ManifestService) CreateOutboundManifest(manifest godown.Manifest) error {
- manifest.ManifestGenre = "出库"
- return godown.CreateOutboundManifest(manifest.ManifestGenre, manifest.Title, manifest.Custodian, manifest.Cargos)
- }
|