From 849c2335ceaf9f4eebd52fc3430738e4f20681a8 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 14 Nov 2023 18:12:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/dict/DictController.php | 32 +++++ .../controller/task/SchedulingController.php | 131 ++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 app/adminapi/controller/dict/DictController.php create mode 100644 app/adminapi/controller/task/SchedulingController.php diff --git a/app/adminapi/controller/dict/DictController.php b/app/adminapi/controller/dict/DictController.php new file mode 100644 index 00000000..88a6206a --- /dev/null +++ b/app/adminapi/controller/dict/DictController.php @@ -0,0 +1,32 @@ +request->get(['page_no','page_size','type_id']); + $result = curl_post(env('project.worker_domain').'/middleapi/dict_data/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + //获取任务审批类型 + public function getTaskApproveTypeList(): Json + { + $params=$this->request->get(); + $result = curl_post(env('project.worker_domain').'/middleapi/dict_data/getTaskApproveTypeList',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + } \ No newline at end of file diff --git a/app/adminapi/controller/task/SchedulingController.php b/app/adminapi/controller/task/SchedulingController.php new file mode 100644 index 00000000..cadfaf17 --- /dev/null +++ b/app/adminapi/controller/task/SchedulingController.php @@ -0,0 +1,131 @@ +request->get(['page_no','page_size','company_id']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function editMoney(): Json + { + $params=$this->request->post(['id', 'money']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/editMoney',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function edit(): Json + { + $params=$this->request->post(['id', 'status']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/edit',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function detail(): Json + { + $params=$this->request->get(['id']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function plan(): Json + { + $params=$this->request->get(['scheduling_id','start_time','end_time']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_scheduling_plan/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function template(): Json + { + $params=$this->request->get(['company_id','title']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_template/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function addTemplate(): Json + { + $params=$this->request->post(); + $result = curl_post(env('project.worker_domain').'/middleapi/task_template/add',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function editTemplate(): Json + { + $params=$this->request->post(); + $result = curl_post(env('project.worker_domain').'/middleapi/task_template/edit',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function deleteTemplate(): Json + { + $params=$this->request->post(); + $result = curl_post(env('project.worker_domain').'/middleapi/task_template/delete',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function detailTemplate(): Json + { + $params=$this->request->get(['id']); + $result = curl_post(env('project.worker_domain').'/middleapi/task_template/detail',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function approve(): Json + { + $params=$this->request->get(['page_no','page_size','type', 'check_status']); + $result = curl_post(env('project.worker_domain').'/middleapi/approve/lists',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + public function auditApprove(): Json + { + $params=$this->request->post(['id','check_status','remark']); + $result = curl_post(env('project.worker_domain').'/middleapi/approve/audit',$params,$this->reqHeader); + if($result['code'] == 0){ + return $this->fail($result['msg']); + } + return json($result); + } + + + } \ No newline at end of file