25 private $messageGenerator;
30 private $caseRepository;
35 private $commentsHistoryUpdater;
40 private $orderGridUpdater;
45 private $orderStateService;
63 $this->messageGenerator = $messageGenerator;
65 $this->commentsHistoryUpdater = $commentsHistoryUpdater;
66 $this->orderGridUpdater = $orderGridUpdater;
67 $this->orderStateService = $orderStateService;
81 if (empty(
$case->getEntityId()) || empty(
$case->getCaseId())) {
86 $previousDisposition =
$case->getGuaranteeDisposition();
88 $orderHistoryComment = $this->messageGenerator->generate(
$data);
90 $this->orderGridUpdater->update(
$case->getOrderId());
91 $this->commentsHistoryUpdater->addComment(
$case, $orderHistoryComment);
92 if (
$case->getGuaranteeDisposition() !== $previousDisposition) {
93 $this->orderStateService->updateByCase(
$case);
95 }
catch (\Exception $e) {
114 $methodName =
'set' . ucfirst($key);
115 if (!in_array($key, $notResolvedKeys) && method_exists(
$case, $methodName)) {
call_user_func($callable, $param)
update(CaseInterface $case, array $data)
__construct(GeneratorInterface $messageGenerator, CaseRepositoryInterface $caseRepository, CommentsHistoryUpdater $commentsHistoryUpdater, OrderGridUpdater $orderGridUpdater, OrderStateService $orderStateService)