update
This commit is contained in:
parent
74d261bb28
commit
5c24cd4d2b
@ -13,96 +13,99 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
namespace app\adminapi\controller\marketing;
|
namespace app\adminapi\controller\marketing;
|
||||||
|
|
||||||
|
|
||||||
use app\adminapi\controller\BaseAdminController;
|
use app\adminapi\controller\BaseAdminController;
|
||||||
use app\adminapi\lists\marketing\MarketingBidInfoLists;
|
use app\adminapi\lists\marketing\MarketingBidInfoLists;
|
||||||
use app\adminapi\logic\marketing\MarketingBidInfoLogic;
|
use app\adminapi\logic\marketing\MarketingBidInfoLogic;
|
||||||
use app\adminapi\validate\marketing\MarketingBidInfoValidate;
|
use app\adminapi\validate\marketing\MarketingBidInfoValidate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 市场经营--投标管理--投标信息控制器
|
* 市场经营--投标管理--投标信息控制器
|
||||||
* Class MarketingBidInfoController
|
* Class MarketingBidInfoController
|
||||||
* @package app\adminapi\controller\marketing
|
* @package app\adminapi\controller\marketing
|
||||||
*/
|
*/
|
||||||
class MarketingBidInfoController extends BaseAdminController
|
class MarketingBidInfoController extends BaseAdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取市场经营--投标管理--投标信息列表
|
* @notes 获取市场经营--投标管理--投标信息列表
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/04/12 09:23
|
* @date 2024/04/12 09:23
|
||||||
*/
|
*/
|
||||||
public function lists()
|
public function lists()
|
||||||
{
|
{
|
||||||
return $this->dataLists(new MarketingBidInfoLists());
|
return $this->dataLists(new MarketingBidInfoLists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 添加市场经营--投标管理--投标信息
|
* @notes 添加市场经营--投标管理--投标信息
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/04/12 09:23
|
* @date 2024/04/12 09:23
|
||||||
*/
|
*/
|
||||||
public function add()
|
public function add()
|
||||||
{
|
{
|
||||||
$params = (new MarketingBidInfoValidate())->post()->goCheck('add');
|
$params = (new MarketingBidInfoValidate())->post()->goCheck('add');
|
||||||
$result = MarketingBidInfoLogic::add($params);
|
$result = MarketingBidInfoLogic::add($params);
|
||||||
if (true === $result) {
|
if (true === $result) {
|
||||||
return $this->success('添加成功', [], 1, 1);
|
return $this->success('添加成功', [], 1, 1);
|
||||||
}
|
}
|
||||||
return $this->fail(MarketingBidInfoLogic::getError());
|
return $this->fail(MarketingBidInfoLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 编辑市场经营--投标管理--投标信息
|
* @notes 编辑市场经营--投标管理--投标信息
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/04/12 09:23
|
* @date 2024/04/12 09:23
|
||||||
*/
|
*/
|
||||||
public function edit()
|
public function edit()
|
||||||
{
|
{
|
||||||
$params = (new MarketingBidInfoValidate())->post()->goCheck('edit');
|
$params = (new MarketingBidInfoValidate())->post()->goCheck('edit');
|
||||||
$result = MarketingBidInfoLogic::edit($params);
|
$result = MarketingBidInfoLogic::edit($params);
|
||||||
if (true === $result) {
|
if (true === $result) {
|
||||||
return $this->success('编辑成功', [], 1, 1);
|
return $this->success('编辑成功', [], 1, 1);
|
||||||
}
|
}
|
||||||
return $this->fail(MarketingBidInfoLogic::getError());
|
return $this->fail(MarketingBidInfoLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 删除市场经营--投标管理--投标信息
|
* @notes 删除市场经营--投标管理--投标信息
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/04/12 09:23
|
* @date 2024/04/12 09:23
|
||||||
*/
|
*/
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
$params = (new MarketingBidInfoValidate())->post()->goCheck('delete');
|
$params = (new MarketingBidInfoValidate())->post()->goCheck('delete');
|
||||||
MarketingBidInfoLogic::delete($params);
|
$result = MarketingBidInfoLogic::delete($params);
|
||||||
return $this->success('删除成功', [], 1, 1);
|
if (true === $result) {
|
||||||
}
|
return $this->success('删除成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(MarketingBidInfoLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取市场经营--投标管理--投标信息详情
|
* @notes 获取市场经营--投标管理--投标信息详情
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @author likeadmin
|
* @author likeadmin
|
||||||
* @date 2024/04/12 09:23
|
* @date 2024/04/12 09:23
|
||||||
*/
|
*/
|
||||||
public function detail()
|
public function detail()
|
||||||
{
|
{
|
||||||
$params = (new MarketingBidInfoValidate())->goCheck('detail');
|
$params = (new MarketingBidInfoValidate())->goCheck('detail');
|
||||||
$result = MarketingBidInfoLogic::detail($params);
|
$result = MarketingBidInfoLogic::detail($params);
|
||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -20,6 +20,7 @@
|
|||||||
use app\common\model\dept\Dept;
|
use app\common\model\dept\Dept;
|
||||||
use app\common\model\marketing\MarketingBidEvaluation;
|
use app\common\model\marketing\MarketingBidEvaluation;
|
||||||
use app\common\model\marketing\MarketingBidInfo;
|
use app\common\model\marketing\MarketingBidInfo;
|
||||||
|
use app\common\model\marketing\MarketingBidResult;
|
||||||
use app\common\model\marketing\MarketingBusinessOpportunity;
|
use app\common\model\marketing\MarketingBusinessOpportunity;
|
||||||
use app\common\model\marketing\MarketingCustom;
|
use app\common\model\marketing\MarketingCustom;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -120,6 +121,11 @@
|
|||||||
*/
|
*/
|
||||||
public static function delete(array $params): bool
|
public static function delete(array $params): bool
|
||||||
{
|
{
|
||||||
|
$bid_result = MarketingBidResult::where('bid_info_id', 'in', $params['id'])->findOrEmpty();
|
||||||
|
if (!$bid_result->isEmpty()) {
|
||||||
|
self::setError('此数据关联了投标结果内容,需删除投标结果内容');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return MarketingBidInfo::destroy($params['id']);
|
return MarketingBidInfo::destroy($params['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user