Parcourir la source

工单+订单相关功能

whitefang il y a 1 an
Parent
commit
960f26bf33

+ 108 - 0
app/adminapi/controller/orders/RechargeOrderController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\orders;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\orders\RechargeOrderLists;
+use app\adminapi\logic\orders\RechargeOrderLogic;
+use app\adminapi\validate\orders\RechargeOrderValidate;
+
+
+/**
+ * RechargeOrder控制器
+ * Class RechargeOrderController
+ * @package app\adminapi\controller\orders
+ */
+class RechargeOrderController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function lists()
+    {
+        return $this->dataLists(new RechargeOrderLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function add()
+    {
+        $params = (new RechargeOrderValidate())->post()->goCheck('add');
+        $result = RechargeOrderLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(RechargeOrderLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function edit()
+    {
+        $params = (new RechargeOrderValidate())->post()->goCheck('edit');
+        $result = RechargeOrderLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(RechargeOrderLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function delete()
+    {
+        $params = (new RechargeOrderValidate())->post()->goCheck('delete');
+        RechargeOrderLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function detail()
+    {
+        $params = (new RechargeOrderValidate())->goCheck('detail');
+        $result = RechargeOrderLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 108 - 0
app/adminapi/controller/works/IssueWorkController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\works;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\works\IssueWorkLists;
+use app\adminapi\logic\works\IssueWorkLogic;
+use app\adminapi\validate\works\IssueWorkValidate;
+
+
+/**
+ * IssueWork控制器
+ * Class IssueWorkController
+ * @package app\adminapi\controller\works
+ */
+class IssueWorkController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists()
+    {
+        return $this->dataLists(new IssueWorkLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function add()
+    {
+        $params = (new IssueWorkValidate())->post()->goCheck('add');
+        $result = IssueWorkLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(IssueWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function edit()
+    {
+        $params = (new IssueWorkValidate())->post()->goCheck('edit');
+        $result = IssueWorkLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(IssueWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function delete()
+    {
+        $params = (new IssueWorkValidate())->post()->goCheck('delete');
+        IssueWorkLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function detail()
+    {
+        $params = (new IssueWorkValidate())->goCheck('detail');
+        $result = IssueWorkLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 108 - 0
app/adminapi/controller/works/ReturnWorkController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\works;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\works\ReturnWorkLists;
+use app\adminapi\logic\works\ReturnWorkLogic;
+use app\adminapi\validate\works\ReturnWorkValidate;
+
+
+/**
+ * ReturnWork控制器
+ * Class ReturnWorkController
+ * @package app\adminapi\controller\works
+ */
+class ReturnWorkController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists()
+    {
+        return $this->dataLists(new ReturnWorkLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function add()
+    {
+        $params = (new ReturnWorkValidate())->post()->goCheck('add');
+        $result = ReturnWorkLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(ReturnWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function edit()
+    {
+        $params = (new ReturnWorkValidate())->post()->goCheck('edit');
+        $result = ReturnWorkLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(ReturnWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function delete()
+    {
+        $params = (new ReturnWorkValidate())->post()->goCheck('delete');
+        ReturnWorkLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function detail()
+    {
+        $params = (new ReturnWorkValidate())->goCheck('detail');
+        $result = ReturnWorkLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 108 - 0
app/adminapi/controller/works/ServiceWorkController.php

@@ -0,0 +1,108 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+
+namespace app\adminapi\controller\works;
+
+
+use app\adminapi\controller\BaseAdminController;
+use app\adminapi\lists\works\ServiceWorkLists;
+use app\adminapi\logic\works\ServiceWorkLogic;
+use app\adminapi\validate\works\ServiceWorkValidate;
+
+
+/**
+ * ServiceWork控制器
+ * Class ServiceWorkController
+ * @package app\adminapi\controller\works
+ */
+class ServiceWorkController extends BaseAdminController
+{
+
+
+    /**
+     * @notes 获取列表
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists()
+    {
+        return $this->dataLists(new ServiceWorkLists());
+    }
+
+
+    /**
+     * @notes 添加
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function add()
+    {
+        $params = (new ServiceWorkValidate())->post()->goCheck('add');
+        $result = ServiceWorkLogic::add($params);
+        if (true === $result) {
+            return $this->success('添加成功', [], 1, 1);
+        }
+        return $this->fail(ServiceWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 编辑
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function edit()
+    {
+        $params = (new ServiceWorkValidate())->post()->goCheck('edit');
+        $result = ServiceWorkLogic::edit($params);
+        if (true === $result) {
+            return $this->success('编辑成功', [], 1, 1);
+        }
+        return $this->fail(ServiceWorkLogic::getError());
+    }
+
+
+    /**
+     * @notes 删除
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function delete()
+    {
+        $params = (new ServiceWorkValidate())->post()->goCheck('delete');
+        ServiceWorkLogic::delete($params);
+        return $this->success('删除成功', [], 1, 1);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @return \think\response\Json
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function detail()
+    {
+        $params = (new ServiceWorkValidate())->goCheck('detail');
+        $result = ServiceWorkLogic::detail($params);
+        return $this->data($result);
+    }
+
+
+}

+ 77 - 0
app/adminapi/lists/orders/RechargeOrderLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\orders;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\orders\RechargeOrder;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * RechargeOrder列表
+ * Class RechargeOrderLists
+ * @package app\adminapi\listsorders
+ */
+class RechargeOrderLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['sn', 'work_id', 'user_id', 'payment_type', 'pay_sn', 'pay_way', 'pay_status', 'pay_time', 'order_terminal', 'transaction_id', 'refund_status', 'refund_transaction_id', 'adress', 'create_time', 'update_time'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function lists(): array
+    {
+        return RechargeOrder::where($this->searchWhere)
+            ->field(['id', 'sn', 'work_id', 'user_id', 'payment_type', 'pay_sn', 'pay_way', 'pay_status', 'pay_time', 'order_total', 'order_amount', 'order_terminal', 'transaction_id', 'refund_status', 'refund_transaction_id', 'adress', 'create_time', 'update_time'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function count(): int
+    {
+        return RechargeOrder::where($this->searchWhere)->count();
+    }
+
+}

+ 77 - 0
app/adminapi/lists/works/IssueWorkLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\works;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\works\IssueWork;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * IssueWork列表
+ * Class IssueWorkLists
+ * @package app\adminapi\listsworks
+ */
+class IssueWorkLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['work_sn', 'service_work_id', 'master_worker_id', 'issue_approval', 'complaint_status', 'responsible', 'complaint_details', 'finished_time', 'approval_admin_id', 'approval_time', 'create_time', 'update_time'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists(): array
+    {
+        return IssueWork::where($this->searchWhere)
+            ->field(['id', 'work_sn', 'service_work_id', 'master_worker_id', 'issue_approval', 'complaint_status', 'responsible', 'complaint_details', 'complaint_images', 'finished_time', 'approval_admin_id', 'approval_time', 'create_time', 'update_time'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function count(): int
+    {
+        return IssueWork::where($this->searchWhere)->count();
+    }
+
+}

+ 77 - 0
app/adminapi/lists/works/ReturnWorkLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\works;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\works\ReturnWork;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * ReturnWork列表
+ * Class ReturnWorkLists
+ * @package app\adminapi\listsworks
+ */
+class ReturnWorkLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['work_sn', 'service_work_id', 'issue_work_id', 'return_work_status', 'dispatch_time', 'appointment_time', 'finished_time', 'master_worker_id', 'create_time', 'update_time'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists(): array
+    {
+        return ReturnWork::where($this->searchWhere)
+            ->field(['id', 'work_sn', 'service_work_id', 'issue_work_id', 'return_work_status', 'dispatch_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'create_time', 'update_time'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function count(): int
+    {
+        return ReturnWork::where($this->searchWhere)->count();
+    }
+
+}

+ 77 - 0
app/adminapi/lists/works/ServiceWorkLists.php

@@ -0,0 +1,77 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\lists\works;
+
+
+use app\adminapi\lists\BaseAdminDataLists;
+use app\common\model\works\ServiceWork;
+use app\common\lists\ListsSearchInterface;
+
+
+/**
+ * ServiceWork列表
+ * Class ServiceWorkLists
+ * @package app\adminapi\listsworks
+ */
+class ServiceWorkLists extends BaseAdminDataLists implements ListsSearchInterface
+{
+
+
+    /**
+     * @notes 设置搜索条件
+     * @return \string[][]
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function setSearch(): array
+    {
+        return [
+            '=' => ['work_sn', 'real_name', 'mobile', 'address', 'title', 'category_type', 'goods_category_ids', 'goods_category_id', 'base_service_fee', 'service_fee', 'work_status', 'service_status', 'dispatch_time', 'receive_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'worker_amount', 'create_time', 'update_time'],

+        ];
+    }
+
+
+    /**
+     * @notes 获取列表
+     * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function lists(): array
+    {
+        return ServiceWork::where($this->searchWhere)
+            ->field(['id', 'work_sn', 'real_name', 'mobile', 'address', 'title', 'category_type', 'goods_category_ids', 'goods_category_id', 'base_service_fee', 'service_fee', 'work_status', 'service_status', 'dispatch_time', 'receive_time', 'appointment_time', 'finished_images', 'finished_time', 'master_worker_id', 'worker_amount', 'create_time', 'update_time'])
+            ->limit($this->limitOffset, $this->limitLength)
+            ->order(['id' => 'desc'])
+            ->select()
+            ->toArray();
+    }
+
+
+    /**
+     * @notes 获取数量
+     * @return int
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function count(): int
+    {
+        return ServiceWork::where($this->searchWhere)->count();
+    }
+
+}

+ 134 - 0
app/adminapi/logic/orders/RechargeOrderLogic.php

@@ -0,0 +1,134 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\orders;
+
+
+use app\common\model\orders\RechargeOrder;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * RechargeOrder逻辑
+ * Class RechargeOrderLogic
+ * @package app\adminapi\logic\orders
+ */
+class RechargeOrderLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            RechargeOrder::create([
+                'sn' => $params['sn'],
+                'work_id' => $params['work_id'],
+                'user_id' => $params['user_id'],
+                'payment_type' => $params['payment_type'],
+                'pay_sn' => $params['pay_sn'],
+                'pay_way' => $params['pay_way'],
+                'pay_status' => $params['pay_status'],
+                'pay_time' => strtotime($params['pay_time']),
+                'order_total' => $params['order_total'],
+                'order_amount' => $params['order_amount'],
+                'order_terminal' => $params['order_terminal'],
+                'transaction_id' => $params['transaction_id'],
+                'refund_status' => $params['refund_status'],
+                'refund_transaction_id' => $params['refund_transaction_id'],
+                'adress' => $params['adress'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            RechargeOrder::where('id', $params['id'])->update([
+                'sn' => $params['sn'],
+                'work_id' => $params['work_id'],
+                'user_id' => $params['user_id'],
+                'payment_type' => $params['payment_type'],
+                'pay_sn' => $params['pay_sn'],
+                'pay_way' => $params['pay_way'],
+                'pay_status' => $params['pay_status'],
+                'pay_time' => strtotime($params['pay_time']),
+                'order_total' => $params['order_total'],
+                'order_amount' => $params['order_amount'],
+                'order_terminal' => $params['order_terminal'],
+                'transaction_id' => $params['transaction_id'],
+                'refund_status' => $params['refund_status'],
+                'refund_transaction_id' => $params['refund_transaction_id'],
+                'adress' => $params['adress'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public static function delete(array $params): bool
+    {
+        return RechargeOrder::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public static function detail($params): array
+    {
+        return RechargeOrder::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 126 - 0
app/adminapi/logic/works/IssueWorkLogic.php

@@ -0,0 +1,126 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\works;
+
+
+use app\common\model\works\IssueWork;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * IssueWork逻辑
+ * Class IssueWorkLogic
+ * @package app\adminapi\logic\works
+ */
+class IssueWorkLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            IssueWork::create([
+                'work_sn' => $params['work_sn'],
+                'service_work_id' => $params['service_work_id'],
+                'master_worker_id' => $params['master_worker_id'],
+                'issue_approval' => $params['issue_approval'],
+                'complaint_status' => $params['complaint_status'],
+                'responsible' => $params['responsible'],
+                'complaint_details' => $params['complaint_details'],
+                'complaint_images' => $params['complaint_images'],
+                'finished_time' => strtotime($params['finished_time']),
+                'approval_admin_id' => $params['approval_admin_id'],
+                'approval_time' => strtotime($params['approval_time']),
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            IssueWork::where('id', $params['id'])->update([
+                'work_sn' => $params['work_sn'],
+                'service_work_id' => $params['service_work_id'],
+                'master_worker_id' => $params['master_worker_id'],
+                'issue_approval' => $params['issue_approval'],
+                'complaint_status' => $params['complaint_status'],
+                'responsible' => $params['responsible'],
+                'complaint_details' => $params['complaint_details'],
+                'complaint_images' => $params['complaint_images'],
+                'finished_time' => strtotime($params['finished_time']),
+                'approval_admin_id' => $params['approval_admin_id'],
+                'approval_time' => strtotime($params['approval_time']),
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function delete(array $params): bool
+    {
+        return IssueWork::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function detail($params): array
+    {
+        return IssueWork::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 122 - 0
app/adminapi/logic/works/ReturnWorkLogic.php

@@ -0,0 +1,122 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\works;
+
+
+use app\common\model\works\ReturnWork;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * ReturnWork逻辑
+ * Class ReturnWorkLogic
+ * @package app\adminapi\logic\works
+ */
+class ReturnWorkLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            ReturnWork::create([
+                'work_sn' => $params['work_sn'],
+                'service_work_id' => $params['service_work_id'],
+                'issue_work_id' => $params['issue_work_id'],
+                'return_work_status' => $params['return_work_status'],
+                'dispatch_time' => $params['dispatch_time'],
+                'appointment_time' => $params['appointment_time'],
+                'finished_images' => $params['finished_images'],
+                'finished_time' => $params['finished_time'],
+                'master_worker_id' => $params['master_worker_id'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            ReturnWork::where('id', $params['id'])->update([
+                'work_sn' => $params['work_sn'],
+                'service_work_id' => $params['service_work_id'],
+                'issue_work_id' => $params['issue_work_id'],
+                'return_work_status' => $params['return_work_status'],
+                'dispatch_time' => $params['dispatch_time'],
+                'appointment_time' => $params['appointment_time'],
+                'finished_images' => $params['finished_images'],
+                'finished_time' => $params['finished_time'],
+                'master_worker_id' => $params['master_worker_id'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function delete(array $params): bool
+    {
+        return ReturnWork::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function detail($params): array
+    {
+        return ReturnWork::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 142 - 0
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -0,0 +1,142 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\logic\works;
+
+
+use app\common\model\works\ServiceWork;
+use app\common\logic\BaseLogic;
+use think\facade\Db;
+
+
+/**
+ * ServiceWork逻辑
+ * Class ServiceWorkLogic
+ * @package app\adminapi\logic\works
+ */
+class ServiceWorkLogic extends BaseLogic
+{
+
+
+    /**
+     * @notes 添加
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function add(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            ServiceWork::create([
+                'work_sn' => $params['work_sn'],
+                'real_name' => $params['real_name'],
+                'mobile' => $params['mobile'],
+                'address' => $params['address'],
+                'title' => $params['title'],
+                'category_type' => $params['category_type'],
+                'goods_category_ids' => $params['goods_category_ids'],
+                'goods_category_id' => $params['goods_category_id'],
+                'base_service_fee' => $params['base_service_fee'],
+                'service_fee' => $params['service_fee'],
+                'work_status' => $params['work_status'],
+                'service_status' => $params['service_status'],
+                'dispatch_time' => strtotime($params['dispatch_time']),
+                'receive_time' => strtotime($params['receive_time']),
+                'appointment_time' => strtotime($params['appointment_time']),
+                'finished_images' => $params['finished_images'],
+                'finished_time' => strtotime($params['finished_time']),
+                'master_worker_id' => $params['master_worker_id'],
+                'worker_amount' => $params['worker_amount'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 编辑
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function edit(array $params): bool
+    {
+        Db::startTrans();
+        try {
+            ServiceWork::where('id', $params['id'])->update([
+                'work_sn' => $params['work_sn'],
+                'real_name' => $params['real_name'],
+                'mobile' => $params['mobile'],
+                'address' => $params['address'],
+                'title' => $params['title'],
+                'category_type' => $params['category_type'],
+                'goods_category_ids' => $params['goods_category_ids'],
+                'goods_category_id' => $params['goods_category_id'],
+                'base_service_fee' => $params['base_service_fee'],
+                'service_fee' => $params['service_fee'],
+                'work_status' => $params['work_status'],
+                'service_status' => $params['service_status'],
+                'dispatch_time' => strtotime($params['dispatch_time']),
+                'receive_time' => strtotime($params['receive_time']),
+                'appointment_time' => strtotime($params['appointment_time']),
+                'finished_images' => $params['finished_images'],
+                'finished_time' => strtotime($params['finished_time']),
+                'master_worker_id' => $params['master_worker_id'],
+                'worker_amount' => $params['worker_amount'],
+            ]);
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            self::setError($e->getMessage());
+            return false;
+        }
+    }
+
+
+    /**
+     * @notes 删除
+     * @param array $params
+     * @return bool
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function delete(array $params): bool
+    {
+        return ServiceWork::destroy($params['id']);
+    }
+
+
+    /**
+     * @notes 获取详情
+     * @param $params
+     * @return array
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public static function detail($params): array
+    {
+        return ServiceWork::findOrEmpty($params['id'])->toArray();
+    }
+}

+ 110 - 0
app/adminapi/validate/orders/RechargeOrderValidate.php

@@ -0,0 +1,110 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\orders;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * RechargeOrder验证器
+ * Class RechargeOrderValidate
+ * @package app\adminapi\validate\orders
+ */
+class RechargeOrderValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'sn' => 'require',
+        'work_id' => 'require',
+        'user_id' => 'require',
+        'payment_type' => 'require',
+        'pay_way' => 'require',
+        'pay_status' => 'require',
+        'order_total' => 'require',
+        'order_amount' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'sn' => '订单编号',
+        'work_id' => '服务工单ID',
+        'user_id' => '用户ID',
+        'payment_type' => '支付类型',
+        'pay_way' => '支付方式',
+        'pay_status' => '支付状态',
+        'order_total' => '订单原价',
+        'order_amount' => '支付金额',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return RechargeOrderValidate
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['sn','work_id','user_id','payment_type','pay_way','pay_status','order_total','order_amount']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return RechargeOrderValidate
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','sn','work_id','user_id','payment_type','pay_way','pay_status','order_total','order_amount']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return RechargeOrderValidate
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return RechargeOrderValidate
+     * @author likeadmin
+     * @date 2024/07/10 14:53
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 104 - 0
app/adminapi/validate/works/IssueWorkValidate.php

@@ -0,0 +1,104 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\works;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * IssueWork验证器
+ * Class IssueWorkValidate
+ * @package app\adminapi\validate\works
+ */
+class IssueWorkValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'work_sn' => 'require',
+        'master_worker_id' => 'require',
+        'issue_approval' => 'require',
+        'responsible' => 'require',
+        'complaint_details' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'work_sn' => '工单编号',
+        'master_worker_id' => '师傅',
+        'issue_approval' => '投诉审核状态',
+        'responsible' => '定责',
+        'complaint_details' => '投诉详情',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return IssueWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['work_sn','master_worker_id','issue_approval','responsible','complaint_details']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return IssueWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','work_sn','master_worker_id','issue_approval','responsible','complaint_details']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return IssueWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return IssueWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 106 - 0
app/adminapi/validate/works/ReturnWorkValidate.php

@@ -0,0 +1,106 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\works;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * ReturnWork验证器
+ * Class ReturnWorkValidate
+ * @package app\adminapi\validate\works
+ */
+class ReturnWorkValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'work_sn' => 'require',
+        'return_work_status' => 'require',
+        'dispatch_time' => 'require',
+        'appointment_time' => 'require',
+        'finished_time' => 'require',
+        'master_worker_id' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'work_sn' => '工单编号',
+        'return_work_status' => '返修工单状态',
+        'dispatch_time' => '派单时间',
+        'appointment_time' => '预约上门时间',
+        'finished_time' => '结单时间',
+        'master_worker_id' => '师傅',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return ReturnWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['work_sn','return_work_status','dispatch_time','appointment_time','finished_time','master_worker_id']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return ReturnWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','work_sn','return_work_status','dispatch_time','appointment_time','finished_time','master_worker_id']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return ReturnWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return ReturnWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 126 - 0
app/adminapi/validate/works/ServiceWorkValidate.php

@@ -0,0 +1,126 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\adminapi\validate\works;
+
+
+use app\common\validate\BaseValidate;
+
+
+/**
+ * ServiceWork验证器
+ * Class ServiceWorkValidate
+ * @package app\adminapi\validate\works
+ */
+class ServiceWorkValidate extends BaseValidate
+{
+
+     /**
+      * 设置校验规则
+      * @var string[]
+      */
+    protected $rule = [
+        'id' => 'require',
+        'work_sn' => 'require',
+        'mobile' => 'require',
+        'address' => 'require',
+        'title' => 'require',
+        'category_type' => 'require',
+        'goods_category_ids' => 'require',
+        'goods_category_id' => 'require',
+        'base_service_fee' => 'require',
+        'service_fee' => 'require',
+        'work_status' => 'require',
+        'service_status' => 'require',
+        'dispatch_time' => 'require',
+        'receive_time' => 'require',
+        'appointment_time' => 'require',
+        'finished_time' => 'require',
+        'master_worker_id' => 'require',

+    ];
+
+
+    /**
+     * 参数描述
+     * @var string[]
+     */
+    protected $field = [
+        'id' => 'id',
+        'work_sn' => '工单编号',
+        'mobile' => '手机号',
+        'address' => '客户地址',
+        'title' => '工单名称',
+        'category_type' => '服务类别',
+        'goods_category_ids' => '服务类目',
+        'goods_category_id' => '服务产品',
+        'base_service_fee' => '基础服务费',
+        'service_fee' => '服务费用',
+        'work_status' => '工单状态',
+        'service_status' => '订单服务状态',
+        'dispatch_time' => '派单时间',
+        'receive_time' => '领单时间',
+        'appointment_time' => '预约上门时间',
+        'finished_time' => '结单时间',
+        'master_worker_id' => '师傅',

+    ];
+
+
+    /**
+     * @notes 添加场景
+     * @return ServiceWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneAdd()
+    {
+        return $this->only(['work_sn','mobile','address','title','category_type','goods_category_ids','goods_category_id','base_service_fee','service_fee','work_status','service_status','dispatch_time','receive_time','appointment_time','finished_time','master_worker_id']);
+    }
+
+
+    /**
+     * @notes 编辑场景
+     * @return ServiceWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneEdit()
+    {
+        return $this->only(['id','work_sn','mobile','address','title','category_type','goods_category_ids','goods_category_id','base_service_fee','service_fee','work_status','service_status','dispatch_time','receive_time','appointment_time','finished_time','master_worker_id']);
+    }
+
+
+    /**
+     * @notes 删除场景
+     * @return ServiceWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDelete()
+    {
+        return $this->only(['id']);
+    }
+
+
+    /**
+     * @notes 详情场景
+     * @return ServiceWorkValidate
+     * @author likeadmin
+     * @date 2024/07/10 15:06
+     */
+    public function sceneDetail()
+    {
+        return $this->only(['id']);
+    }
+
+}

+ 34 - 0
app/common/model/orders/RechargeOrder.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\orders;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * RechargeOrder模型
+ * Class RechargeOrder
+ * @package app\common\model\orders
+ */
+class RechargeOrder extends BaseModel
+{
+    
+    protected $name = 'recharge_order';
+    
+
+    
+}

+ 34 - 0
app/common/model/works/IssueWork.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\works;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * IssueWork模型
+ * Class IssueWork
+ * @package app\common\model\works
+ */
+class IssueWork extends BaseModel
+{
+    
+    protected $name = 'issue_work';
+    
+
+    
+}

+ 34 - 0
app/common/model/works/ReturnWork.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\works;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * ReturnWork模型
+ * Class ReturnWork
+ * @package app\common\model\works
+ */
+class ReturnWork extends BaseModel
+{
+    
+    protected $name = 'return_work';
+    
+
+    
+}

+ 34 - 0
app/common/model/works/ServiceWork.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | likeadmin快速开发前后端分离管理后台(PHP版)
+// +----------------------------------------------------------------------
+// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
+// | 开源版本可自由商用,可去除界面版权logo
+// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
+// | github下载:https://github.com/likeshop-github/likeadmin
+// | 访问官网:https://www.likeadmin.cn
+// | likeadmin团队 版权所有 拥有最终解释权
+// +----------------------------------------------------------------------
+// | author: likeadminTeam
+// +----------------------------------------------------------------------
+
+namespace app\common\model\works;
+
+
+use app\common\model\BaseModel;
+
+
+
+/**
+ * ServiceWork模型
+ * Class ServiceWork
+ * @package app\common\model\works
+ */
+class ServiceWork extends BaseModel
+{
+    
+    protected $name = 'service_work';
+    
+
+    
+}