...
|
...
|
@@ -225,12 +225,12 @@ func (ptr *PGCommonStatisticsService) ProportionOfSecondLevelStatistics(queryOpt |
|
|
// 车间生产效率统计
|
|
|
func (ptr *PGCommonStatisticsService) WorkshopProductionEfficiencyStatistics(queryOptions map[string]interface{}) (interface{}, error) {
|
|
|
var request = &HourProductiveStatisticsRequest{}
|
|
|
if err := utils.LoadQueryObject(queryOptions, request); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
if request.WorkshopId == 0 {
|
|
|
request.WorkshopId = constant.MANUFACTURE_DEFAULT_WORKSHOPID
|
|
|
}
|
|
|
if err := utils.LoadQueryObject(queryOptions, request); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
workshopRepository, _ := repository.NewWorkshopRepository(ptr.transactionContext)
|
|
|
type record struct {
|
|
|
Oee float64 `json:"oee"`
|
...
|
...
|
@@ -423,12 +423,12 @@ type DeviceInfo struct { |
|
|
// 设备生产效率统计
|
|
|
func (ptr *PGCommonStatisticsService) DeviceProductionEfficiencyStatistics(queryOptions map[string]interface{}) (interface{}, error) {
|
|
|
var request = &HourProductiveStatisticsRequest{}
|
|
|
if err := utils.LoadQueryObject(queryOptions, request); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
if request.WorkshopId == 0 {
|
|
|
request.WorkshopId = constant.MANUFACTURE_DEFAULT_WORKSHOPID
|
|
|
}
|
|
|
if err := utils.LoadQueryObject(queryOptions, request); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
deviceRepository, _ := repository.NewDeviceRepository(ptr.transactionContext)
|
|
|
deviceDailyRunningRecordDao, _ := dao.NewDeviceDailyRunningRecordDao(ptr.transactionContext)
|
...
|
...
|
|