some progres in rep service

This commit is contained in:
babak alizadeh 2024-06-03 12:30:18 +03:30
parent fb90cab19f
commit f71147a127
9 changed files with 649 additions and 427 deletions

View file

@ -136,4 +136,10 @@ class UiGeneralController extends AbstractController
return $this->render('general/woocommerce.html.twig',); return $this->render('general/woocommerce.html.twig',);
} }
#[Route('/front/apps/repservice', name: 'general_apps_repservice')]
public function general_apps_repservice(EntityManagerInterface $entityManager): Response
{
return $this->render('general/repservice.html.twig',);
}
} }

View file

@ -14,6 +14,7 @@ use App\Service\registryMGR;
use App\Entity\PlugRepserviceOrder; use App\Entity\PlugRepserviceOrder;
use App\Entity\PlugRepserviceOrderState; use App\Entity\PlugRepserviceOrderState;
use App\Service\Explore; use App\Service\Explore;
use App\Service\Jdate;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@ -57,6 +58,8 @@ class PlugRepserviceController extends AbstractController
!array_key_exists('person', $params) || !array_key_exists('person', $params) ||
!array_key_exists('serial', $params) || !array_key_exists('serial', $params) ||
!array_key_exists('motaleghat', $params) || !array_key_exists('motaleghat', $params) ||
!array_key_exists('color', $params) ||
!array_key_exists('model', $params) ||
!array_key_exists('date', $params) !array_key_exists('date', $params)
) )
return $this->json($extractor->paramsNotSend()); return $this->json($extractor->paramsNotSend());
@ -92,6 +95,8 @@ class PlugRepserviceController extends AbstractController
$order->setCommodity($commodity); $order->setCommodity($commodity);
$order->setPerson($person); $order->setPerson($person);
$order->setDate($params['date']); $order->setDate($params['date']);
$order->setModel($params['model']);
$order->setColor($params['color']);
$order->setDes($params['des']); $order->setDes($params['des']);
$order->setMotaleghat($params['motaleghat']); $order->setMotaleghat($params['motaleghat']);
$order->setPelak($params['pelak']); $order->setPelak($params['pelak']);
@ -131,7 +136,7 @@ class PlugRepserviceController extends AbstractController
} }
#[Route('/api/plug/repservice/order/state/change', name: 'app_plug_repservice_order_state_change')] #[Route('/api/plug/repservice/order/state/change', name: 'app_plug_repservice_order_state_change')]
public function app_plug_repservice_order_state_change(Provider $provider, registryMGR $registryMGR, SMS $sms, Log $log, EntityManagerInterface $entityManagerInterface, Access $access, Request $request, Extractor $extractor): JsonResponse public function app_plug_repservice_order_state_change(Jdate $jdate,Provider $provider, registryMGR $registryMGR, SMS $sms, Log $log, EntityManagerInterface $entityManagerInterface, Access $access, Request $request, Extractor $extractor): JsonResponse
{ {
$acc = $access->hasRole('plugRepservice'); $acc = $access->hasRole('plugRepservice');
if (!$acc) if (!$acc)
@ -163,6 +168,10 @@ class PlugRepserviceController extends AbstractController
return $this->json($extractor->notFound()); return $this->json($extractor->notFound());
} }
$order->setState($state); $order->setState($state);
//set dateout if proccess finish
if($state->getCode() == 'getback'){
$order->setDateOut($jdate->jdate('Y-n-d',time()));
}
$entityManagerInterface->persist($order); $entityManagerInterface->persist($order);
$entityManagerInterface->flush(); $entityManagerInterface->flush();
$log->insert('افزونه تعمیرکاران', ' وضعیت کالا با کد ' . $order->getCode() . ' به ' . $state->getLabel() . ' تغییر یافت. ', $this->getUser(), $acc['bid']->getId()); $log->insert('افزونه تعمیرکاران', ' وضعیت کالا با کد ' . $order->getCode() . ' به ' . $state->getLabel() . ' تغییر یافت. ', $this->getUser(), $acc['bid']->getId());
@ -214,7 +223,7 @@ class PlugRepserviceController extends AbstractController
$orders = $entityManagerInterface->getRepository(PlugRepserviceOrder::class)->findBy([ $orders = $entityManagerInterface->getRepository(PlugRepserviceOrder::class)->findBy([
'bid' => $acc['bid'] 'bid' => $acc['bid']
]); ],['code'=>'DESC']);
return $this->json($this->ExploreOrders($orders)); return $this->json($this->ExploreOrders($orders));
} }
@ -229,7 +238,8 @@ class PlugRepserviceController extends AbstractController
foreach ($items as $item) { foreach ($items as $item) {
$res[] = [ $res[] = [
'code' => $item->getCode(), 'code' => $item->getCode(),
'label' => $item->getLabel() 'label' => $item->getLabel(),
'checked'=>false
]; ];
} }
return $this->json($res); return $this->json($res);
@ -245,21 +255,8 @@ class PlugRepserviceController extends AbstractController
$item = $entityManager->getRepository(PlugRepserviceOrder::class)->findOneBy(['bid' => $acc['bid'], 'code' => $code]); $item = $entityManager->getRepository(PlugRepserviceOrder::class)->findOneBy(['bid' => $acc['bid'], 'code' => $code]);
if (!$item) if (!$item)
throw $this->createNotFoundException(); throw $this->createNotFoundException();
$temp = [
'update' => $item->getCode(), return $this->json($this->ExploreOrder($item));
'date'=>$item->getDate(),
'des'=>$item->getDes(),
'person'=>Explore::ExplorePerson($item->getPerson()),
'pelak'=>$item->getPelak(),
'serial'=>$item->getSerial(),
'motaleghat'=>$item->getMotaleghat(),
'commodity'=>Explore::ExploreCommodity($item->getCommodity()),
'sms'=>true
];
if($item->getPerson()->getMobile() == null || $item->getPerson()->getMobile() == ''){
$temp['sms'] = false;
}
return $this->json($temp);
} }
#[Route('/api/repservice/order/remove/{code}', name: 'app_plug_repservice_order_remove')] #[Route('/api/repservice/order/remove/{code}', name: 'app_plug_repservice_order_remove')]
@ -282,6 +279,7 @@ class PlugRepserviceController extends AbstractController
{ {
$temp = [ $temp = [
'id' => $item->getId(), 'id' => $item->getId(),
'update' => $item->getCode(),
'code' => $item->getCode(), 'code' => $item->getCode(),
'person' => Explore::ExplorePerson($item->getPerson()), 'person' => Explore::ExplorePerson($item->getPerson()),
'commodity' => Explore::ExploreCommodity($item->getCommodity()), 'commodity' => Explore::ExploreCommodity($item->getCommodity()),
@ -295,8 +293,14 @@ class PlugRepserviceController extends AbstractController
'code' => $item->getState()->getCode(), 'code' => $item->getState()->getCode(),
'label' => $item->getState()->getLabel() 'label' => $item->getState()->getLabel()
], ],
'sms' => true 'dateOut'=>$item->getDateOut(),
'model'=>$item->getModel(),
'color'=>$item->getColor(),
'sms'=>true,
]; ];
if($item->getPerson()->getMobile() == null || $item->getPerson()->getMobile() == ''){
$temp['sms'] = false;
}
return $temp; return $temp;
} }

View file

@ -57,6 +57,15 @@ class PlugRepserviceOrder
#[ORM\Column(length: 255, nullable: true)] #[ORM\Column(length: 255, nullable: true)]
private ?string $motaleghat = null; private ?string $motaleghat = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $model = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $color = null;
#[ORM\Column(length: 50, nullable: true)]
private ?string $dateOut = null;
public function getId(): ?int public function getId(): ?int
{ {
return $this->id; return $this->id;
@ -217,4 +226,40 @@ class PlugRepserviceOrder
return $this; return $this;
} }
public function getModel(): ?string
{
return $this->model;
}
public function setModel(?string $model): static
{
$this->model = $model;
return $this;
}
public function getColor(): ?string
{
return $this->color;
}
public function setColor(?string $color): static
{
$this->color = $color;
return $this;
}
public function getDateOut(): ?string
{
return $this->dateOut;
}
public function setDateOut(?string $dateOut): static
{
$this->dateOut = $dateOut;
return $this;
}
} }

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,105 @@
{% extends "base.html.twig" %}
{% block title %}افزونه مدیریت تعمیرگاه)تعمیرکاران)
{% endblock %}
{% block body %}
<main
id="main-container p-0 m-0">
<!-- Hero -->
<div class="bg-image" style="background-image: url('/img/plugins/repservice.png');">
<div class="bg-black-75">
<div class="content content-top content-full text-center">
<h1 class="text-white">
<i class="fa fa-shop"></i>
</h1>
<h1 class="fw-bold text-white mt-5 mb-3">افزونه مدیریت تعمیرگاه</h1>
<h2 class="h3 fw-normal text-white-75 mb-5">
افزونه تعمیرکاران یکپارچه طراحی شد تا تمام نیازهای شما را در مدیریت تعمیرگاه و فروشگاه تان را بصورت کامل رفع
کند.
</h2>
<a to="#">
<span class="badge rounded-pill bg-primary fs-base px-3 py-2 me-2 m-1">
<i class="fa fa-user-circle me-1"></i>
خرید در بازار حسابیکس
</span>
</a>
<br>
<i class="fa fa-arrow-down text-white"></i>
</div>
</div>
</div>
<!-- END Hero -->
<!-- Page Content -->
<div class="container-fluid">
<div class="row justify-content-center">
<div
class="col-sm-11 py-2">
<!-- Story -->
<article class="story justify-content-between">
<div class="rounded-3 bg-white p-3 mb-3">
<div class="row">
<div class="col-sm-12 col-md-6">
<h3 class="text-primary mt-0">
افزونه مدیریت تعمیرگاه(تعمیرکاران)
</h3>
<p>
افزونه تعمیرکاران بهترین انتخاب برای مدیریت انواع مراکز تعمیر و خدمات و همچنین فروشگاه های در حال توسعه است؛ چرا که افزونه تعمیرکاران نیازی به نصب ندارد, همیشه با موبایل و کامپیوتر در دسترس است و رابط کاربری بسیار آسانی دارد و از همه مهمتر تمام نیازهای تعمیرگاه و فروشگاه را در قالب یک نرم افزار پشتیبانی می‌کند.
مناسب تمامی تعمیرگاه های تلفن همراه، کامپیوتر، خودرو، بردهای الکترونیکی، لوازم برقی، وسایل صوتی تصویری، یخچال فریزر، تلویزیون و…
</p>
</div>
<div class="col-sm-12 col-md-6">
<img class="img-fluid" src="/img/plugins/repservice.jpg"/>
</div>
</div>
<h2 class="text-primary">امکانات:</h2>
<ul>
<li>
صدور قبض های پذیرش تعمیرگاه قابل چاپ و پیامکی
</li>
<li>
بدون نیاز به خرید سرشماره پیامک خدماتی
</li>
<li>
گزارشات کامل از دستگاه های ورودی و خروجی تعمیرگاه
</li>
<li>
ثبت قبض های پذیرش بصورت آنلاین با گوشی
</li>
<li>
ارسال پیامک خودکار به تعمیرکار موقع ثبت پذیرش دستگاه تعمیری
</li>
<li>
مشاهده لیست دستگاه های تعمیری
</li>
<li>
درج سریال/پلاک دستگاه های تعمیری درقبض پذیرش
</li>
<li>
ارسال پیامک خودکار هنگام تغییر وضعیت دستگاه به آماده تحویل
</li>
<li>
مشاهده فاکتور تعمیرگاه بصورت آنلاین بصورت پیامکی
</li>
<li>
قابلیت چاپ قبض تعمیرگاه
</li>
<li>
قابلیت ارایه خروجی اکسل از تمام گزارشات تعمیرگاه
</li>
<li>
یکپارچه با
حسابیکس
و بسته حسابداری پیشرفته
</li>
</ul>
</div>
</article>
<!-- END Story -->
</div>
</div>
</div>
<!-- END Page Content -->
</main>
{% endblock %}

View file

@ -1,142 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<urlset <urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 <!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url>
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com --> <loc>https://hesabix.ir/</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/</loc> <priority>1.00</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>1.00</priority> <url>
</url> <loc>https://hesabix.ir/front/faq</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/faq</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/blog/home</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/blog/home</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/about</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/about</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/contact</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/contact</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/terms</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/terms</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/privacy</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/privacy</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/open-source</loc>
<url> <lastmod>2023-10-20T11:24:11+00:00</lastmod>
<loc>https://hesabix.ir/front/open-source</loc> <priority>0.80</priority>
<lastmod>2023-10-20T11:24:11+00:00</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/general</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/general</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/help/api</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/api</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/update-list</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/update-list</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/person</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/person</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/commodity</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/commodity</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/banks</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/banks</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/buy</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/buy</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/sell</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/sell</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/reports</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/reports</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/help/guide/settings</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/help/guide/settings</loc> <priority>0.64</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/front/features/setup</loc>
<url> <lastmod>2023-11-10T16:17:43+00:00</lastmod>
<loc>https://hesabix.ir/front/features/setup</loc> <priority>0.80</priority>
<lastmod>2023-11-10T16:17:43+00:00</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/features/user_management</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/features/user_management</loc> <priority>0.80</priority>
<lastmod>2023-11-10T16:17:43+00:00</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/features/buy_sell</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/features/buy_sell</loc> <priority>0.80</priority>
<lastmod>2023-11-10T16:17:43+00:00</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/apps/woocommerce</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/front/apps/woocommerce</loc> <priority>0.80</priority>
<lastmod>2023-11-10T16:17:43+00:00</lastmod> </url>
<priority>0.80</priority> <url>
</url> <loc>https://hesabix.ir/front/apps/repservice</loc>
<url> <lastmod>{{ timeNow }}</lastmod>
<loc>https://hesabix.ir/login</loc> <priority>0.80</priority>
<lastmod>{{ timeNow }}</lastmod> </url>
<priority>0.64</priority> <url>
</url> <loc>https://hesabix.ir/login</loc>
{% for blog in blogs %} <lastmod>{{ timeNow }}</lastmod>
<url> <priority>0.64</priority>
<loc>{{ absolute_url(path('general_blog_post',{'url':blog.url})) }}</loc> </url>
<lastmod>{{ blog.dateSubmit | date('c') }}</lastmod> {% for blog in blogs %}
<priority>0.80</priority> <url>
</url> <loc>{{ absolute_url(path('general_blog_post',{'url':blog.url})) }}</loc>
{% endfor %} <lastmod>{{ blog.dateSubmit | date('c') }}</lastmod>
{% for doc in docs %} <priority>0.80</priority>
<url> </url>
<loc>{{ absolute_url(path('general_help_api',{'id':doc.id})) }}</loc> {% endfor %}
<lastmod>{% if doc.dateSubmit is null %}{{ timeNow }}{% else %}{{ doc.dateSubmit | date('c') }}{% endif %}</lastmod> {% for doc in docs %}
<priority>0.80</priority> <url>
</url> <loc>{{ absolute_url(path('general_help_api',{'id':doc.id})) }}</loc>
{% endfor %} <lastmod>
</urlset> {% if doc.dateSubmit is null %}
{{ timeNow }}
{% else %}
{{ doc.dateSubmit | date('c') }}
{% endif %}
</lastmod>
<priority>0.80</priority>
</url>
{% endfor %}
</urlset>

View file

@ -58,7 +58,7 @@
{{bid.name}} {{bid.name}}
</p> </p>
<address>آدرس : <address>آدرس :
استان استان
{{bid.ostan}} {{bid.ostan}}
شهرستان شهرستان
{{bid.shahrestan}} {{bid.shahrestan}}
@ -86,7 +86,7 @@
{{ person.nikename }} {{ person.nikename }}
</p> </p>
<address>آدرس : <address>آدرس :
استان استان
{{person.ostan}} {{person.ostan}}
شهرستان شهرستان
{{person.shahr}} {{person.shahr}}
@ -124,10 +124,21 @@
<div class="fs-sm fw-semibold text-muted mb-2"> <div class="fs-sm fw-semibold text-muted mb-2">
تاریخ: تاریخ:
{{order.date}}</div> {{order.date}}</div>
<div class="fs-sm fw-semibold text-muted mb-2">
تاریخ تحویل:
{{order.dateOut}}</div>
<p class="text-muted mb-2"> <p class="text-muted mb-2">
شرح: شرح:
{{order.des}} {{order.des}}
</p> </p>
<p class="text-muted mb-2">
مدل:
{{order.model}}
</p>
<p class="text-muted mb-2">
رنگ:
{{order.color}}
</p>
<p class="text-muted mb-2"> <p class="text-muted mb-2">
متعلقات: متعلقات:
{{order.motaleghat}} {{order.motaleghat}}
@ -141,7 +152,7 @@
{{order.pelak}} {{order.pelak}}
</p> </p>
<div> <div>
<span class="text-info">وضعیت</span> <span class="text-info">وضعیت</span>
<span class="badge bg-success">{{order.state.label}}</span> <span class="badge bg-success">{{order.state.label}}</span>
</div> </div>
</div> </div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB