pg_common_statistics_service.go
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package domainService
import (
"fmt"
pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/utils"
)
const (
// 时段产能统计
HourProductiveStatistics = "HourProductiveStatistics"
)
type PGCommonStatisticsService struct {
transactionContext *pgTransaction.TransactionContext
}
func (ptr *PGCommonStatisticsService) CommonStatistics(actionType, queryOptions map[string]interface{}) (interface{}, error) {
switch actionType {
}
return nil, nil
}
// 时段产能-统计 (传串设备)
func (ptr *PGCommonStatisticsService) HourProductiveStatistics(queryOptions map[string]interface{}) (interface{}, error) {
var request = &HourProductiveStatisticsRequest{}
if err := utils.LoadQueryObject(queryOptions, &request); err != nil {
return nil, err
}
return nil, nil
}
type HourProductiveStatisticsRequest struct {
CompanyId int `json:"companyId" valid:"Required"`
OrgId int `json:"orgId" valid:"Required"`
WorkshopId int `json:"workshopId" valid:"Required"`
}
func NewPGCommonStatisticsService(transactionContext *pgTransaction.TransactionContext) (*PGCommonStatisticsService, error) {
if transactionContext == nil {
return nil, fmt.Errorf("transactionContext参数不能为nil")
} else {
return &PGCommonStatisticsService{
transactionContext: transactionContext,
}, nil
}
}