...
|
...
|
@@ -30,12 +30,13 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
|
|
}()
|
|
|
newDeviceCollection := &domain.DeviceCollection{
|
|
|
//DeviceCollectionId: createDeviceCollectionCommand.DeviceCollectionId,
|
|
|
WorkShopName: createDeviceCollectionCommand.WorkShopName,
|
|
|
DeviceType: createDeviceCollectionCommand.DeviceType,
|
|
|
StartupStatus: createDeviceCollectionCommand.StartupStatus,
|
|
|
DeviceSn: createDeviceCollectionCommand.DeviceSn,
|
|
|
ComStatus: createDeviceCollectionCommand.ComStatus,
|
|
|
Values: createDeviceCollectionCommand.Values,
|
|
|
WorkShopName: createDeviceCollectionCommand.WorkShopName,
|
|
|
DeviceType: createDeviceCollectionCommand.DeviceType,
|
|
|
StartupStatus: createDeviceCollectionCommand.StartupStatus,
|
|
|
DeviceSn: createDeviceCollectionCommand.DeviceSn,
|
|
|
ComStatus: createDeviceCollectionCommand.ComStatus,
|
|
|
CollectionTime: createDeviceCollectionCommand.CollectionTime,
|
|
|
Values: createDeviceCollectionCommand.Values,
|
|
|
}
|
|
|
var deviceCollectionRepository domain.DeviceCollectionRepository
|
|
|
if value, err := factory.CreateDeviceCollectionRepository(map[string]interface{}{
|
...
|
...
|
@@ -52,7 +53,7 @@ func (deviceCollectionService *DeviceCollectionService) CreateDeviceCollection(c |
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"deviceCollection":deviceCollection,
|
|
|
"deviceCollection": deviceCollection,
|
|
|
}, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -123,7 +124,7 @@ func (deviceCollectionService *DeviceCollectionService) ListDeviceCollection(lis |
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return tool_funs.SimpleWrapGridMap(count,deviceCollections), nil
|
|
|
return tool_funs.SimpleWrapGridMap(count, deviceCollections), nil
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -164,7 +165,7 @@ func (deviceCollectionService *DeviceCollectionService) RemoveDeviceCollection(r |
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"deviceCollection":deviceCollection,
|
|
|
"deviceCollection": deviceCollection,
|
|
|
}, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -209,7 +210,7 @@ func (deviceCollectionService *DeviceCollectionService) UpdateDeviceCollection(u |
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
return map[string]interface{}{
|
|
|
"deviceCollection":deviceCollection,
|
|
|
"deviceCollection": deviceCollection,
|
|
|
}, nil
|
|
|
}
|
|
|
}
|
...
|
...
|
|