更新管理
This commit is contained in:
parent
537d679f9c
commit
849c2335ce
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace app\adminapi\controller\dict;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use think\response\Json;
|
||||
|
||||
class DictController extends BaseAdminController
|
||||
{
|
||||
//字典列表
|
||||
public function lists(): Json
|
||||
{
|
||||
$params=$this->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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
|
||||
namespace app\adminapi\controller\task;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use think\response\Json;
|
||||
|
||||
class SchedulingController extends BaseAdminController
|
||||
{
|
||||
public function lists(): Json
|
||||
{
|
||||
$params=$this->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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue