diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..5e4dc43 Binary files /dev/null and b/dist.zip differ diff --git a/generate/php/app/adminapi/controller/oa/FlowTypeController.php b/generate/php/app/adminapi/controller/oa/FlowTypeController.php deleted file mode 100644 index 35cbcce..0000000 --- a/generate/php/app/adminapi/controller/oa/FlowTypeController.php +++ /dev/null @@ -1,108 +0,0 @@ -dataLists(new FlowTypeLists()); - } - - - /** - * @notes 添加审批类型 - * @return \think\response\Json - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function add() - { - $params = (new FlowTypeValidate())->post()->goCheck('add'); - $result = FlowTypeLogic::add($params); - if (true === $result) { - return $this->success('添加成功', [], 1, 1); - } - return $this->fail(FlowTypeLogic::getError()); - } - - - /** - * @notes 编辑审批类型 - * @return \think\response\Json - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function edit() - { - $params = (new FlowTypeValidate())->post()->goCheck('edit'); - $result = FlowTypeLogic::edit($params); - if (true === $result) { - return $this->success('编辑成功', [], 1, 1); - } - return $this->fail(FlowTypeLogic::getError()); - } - - - /** - * @notes 删除审批类型 - * @return \think\response\Json - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function delete() - { - $params = (new FlowTypeValidate())->post()->goCheck('delete'); - FlowTypeLogic::delete($params); - return $this->success('删除成功', [], 1, 1); - } - - - /** - * @notes 获取审批类型详情 - * @return \think\response\Json - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function detail() - { - $params = (new FlowTypeValidate())->goCheck('detail'); - $result = FlowTypeLogic::detail($params); - return $this->data($result); - } - - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/lists/oa/FlowTypeLists.php b/generate/php/app/adminapi/lists/oa/FlowTypeLists.php deleted file mode 100644 index 8f376d8..0000000 --- a/generate/php/app/adminapi/lists/oa/FlowTypeLists.php +++ /dev/null @@ -1,78 +0,0 @@ - ['type'], - '%like%' => ['title'], - ]; - } - - - /** - * @notes 获取审批类型列表 - * @return array - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function lists(): array - { - return FlowType::where($this->searchWhere) - ->field(['id', 'type', 'title', 'name', 'department_ids', 'status']) - ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) - ->select() - ->toArray(); - } - - - /** - * @notes 获取审批类型数量 - * @return int - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function count(): int - { - return FlowType::where($this->searchWhere)->count(); - } - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/logic/oa/FlowTypeLogic.php b/generate/php/app/adminapi/logic/oa/FlowTypeLogic.php deleted file mode 100644 index e6e2f18..0000000 --- a/generate/php/app/adminapi/logic/oa/FlowTypeLogic.php +++ /dev/null @@ -1,114 +0,0 @@ - $params['type'], - 'title' => $params['title'], - 'name' => $params['name'], - 'department_ids' => $params['department_ids'], - 'status' => $params['status'] - ]); - - 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/01/31 14:15 - */ - public static function edit(array $params): bool - { - Db::startTrans(); - try { - FlowType::where('id', $params['id'])->update([ - 'type' => $params['type'], - 'title' => $params['title'], - 'name' => $params['name'], - 'department_ids' => $params['department_ids'], - 'status' => $params['status'] - ]); - - 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/01/31 14:15 - */ - public static function delete(array $params): bool - { - return FlowType::destroy($params['id']); - } - - - /** - * @notes 获取审批类型详情 - * @param $params - * @return array - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public static function detail($params): array - { - return FlowType::findOrEmpty($params['id'])->toArray(); - } -} \ No newline at end of file diff --git a/generate/php/app/adminapi/validate/oa/FlowTypeValidate.php b/generate/php/app/adminapi/validate/oa/FlowTypeValidate.php deleted file mode 100644 index f401d9e..0000000 --- a/generate/php/app/adminapi/validate/oa/FlowTypeValidate.php +++ /dev/null @@ -1,104 +0,0 @@ - 'require', - 'type' => 'require', - 'title' => 'require', - 'name' => 'require', - 'department_ids' => 'require', - 'status' => 'require', - ]; - - - /** - * 参数描述 - * @var string[] - */ - protected $field = [ - 'id' => 'id', - 'type' => '所属分类', - 'title' => '审批名称', - 'name' => '审批标识', - 'department_ids' => '应用部门', - 'status' => '状态', - ]; - - - /** - * @notes 添加场景 - * @return FlowTypeValidate - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function sceneAdd() - { - return $this->only(['type','title','name','department_ids','status']); - } - - - /** - * @notes 编辑场景 - * @return FlowTypeValidate - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function sceneEdit() - { - return $this->only(['id','type','title','name','department_ids','status']); - } - - - /** - * @notes 删除场景 - * @return FlowTypeValidate - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function sceneDelete() - { - return $this->only(['id']); - } - - - /** - * @notes 详情场景 - * @return FlowTypeValidate - * @author likeadmin - * @date 2024/01/31 14:15 - */ - public function sceneDetail() - { - return $this->only(['id']); - } - -} \ No newline at end of file diff --git a/generate/php/app/common/model/oa/FlowType.php b/generate/php/app/common/model/oa/FlowType.php deleted file mode 100644 index f45b5a4..0000000 --- a/generate/php/app/common/model/oa/FlowType.php +++ /dev/null @@ -1,34 +0,0 @@ - -