engineering/app/adminapi/controller/zjzx_finance/ZjzxRefundController.php
2024-03-16 13:36:02 +08:00

93 lines
2.3 KiB
PHP

<?php
namespace app\adminapi\controller\zjzx_finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\zjzx_finance\ZjzxRefundLists;
use app\adminapi\logic\zjzx_finance\ZjzxRefundLogic;
use app\adminapi\validate\zjzx_finance\ZjzxRefundValidate;
/**
* 造价咨询--到账台账控制器
* Class ZjzxRefundController
* @package app\adminapi\controller\zjzx_finance
*/
class ZjzxRefundController extends BaseAdminController
{
/**
* @notes 获取造价咨询--到账台账列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/15 17:05
*/
public function lists()
{
return $this->dataLists(new ZjzxRefundLists());
}
/**
* @notes 添加造价咨询--到账台账
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/15 17:05
*/
public function add()
{
$params = (new ZjzxRefundValidate())->post()->goCheck('add');
$result = ZjzxRefundLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(ZjzxRefundLogic::getError());
}
/**
* @notes 编辑造价咨询--到账台账
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/15 17:05
*/
public function edit()
{
$params = (new ZjzxRefundValidate())->post()->goCheck('edit');
$result = ZjzxRefundLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ZjzxRefundLogic::getError());
}
/**
* @notes 删除造价咨询--到账台账
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/15 17:05
*/
public function delete()
{
$params = (new ZjzxRefundValidate())->post()->goCheck('delete');
ZjzxRefundLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取造价咨询--到账台账详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/03/15 17:05
*/
public function detail()
{
$params = (new ZjzxRefundValidate())->goCheck('detail');
$result = ZjzxRefundLogic::detail($params);
return $this->data($result);
}
}