|
@@ -127,6 +127,8 @@ class ONURESTController extends RESTController
|
|
|
* @Get("/client/{id}/apply/{transition}")
|
|
|
* @View(statusCode=201, serializerEnableMaxDepthChecks=true)
|
|
|
*
|
|
|
+ * https://ftth.client.flowdat.net/api/client/2/apply/active_disable
|
|
|
+ *
|
|
|
* @param Request $request
|
|
|
* @param $id
|
|
|
* @param $transition
|
|
@@ -135,6 +137,7 @@ class ONURESTController extends RESTController
|
|
|
*/
|
|
|
public function clientAction(Request $request, Int $id, String $transition)
|
|
|
{
|
|
|
+
|
|
|
try {
|
|
|
$tenancyService = $this->getTenancyService();
|
|
|
$tenancyService->disableFilter();
|
|
@@ -143,11 +146,9 @@ class ONURESTController extends RESTController
|
|
|
|
|
|
$query = $em->createQuery("
|
|
|
SELECT o FROM FTTHBundle:ONU o
|
|
|
- WHERE o.administrativeState != :transition
|
|
|
- AND o.clientId = :client
|
|
|
+ WHERE o.clientId = :client
|
|
|
")->setParameters([
|
|
|
- 'transition' => $transition,
|
|
|
- 'client' => $id,
|
|
|
+ 'client' => $id
|
|
|
]);
|
|
|
$onus = $query->getResult();
|
|
|
|
|
@@ -155,7 +156,7 @@ class ONURESTController extends RESTController
|
|
|
|
|
|
$cmd_args = [
|
|
|
'entity' => '--entity:FTTHBundle\\Entity\\ONU',
|
|
|
- 'workflow' => '--workflow:administrative_state',
|
|
|
+ 'workflow' => '--workflow:onu_workflow',
|
|
|
'transition' => "--transition:{$transition}",
|
|
|
];
|
|
|
|