update
This commit is contained in:
parent
ab2a6931bb
commit
4aa0d392ef
@ -42,4 +42,11 @@ class ProjectSalaryDetailController extends BaseAdminController
|
|||||||
return $this->dataLists(new ProjectSalaryDetailLists());
|
return $this->dataLists(new ProjectSalaryDetailLists());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
$params = (new ProjectSalaryDetailValidate())->post()->goCheck('delete');
|
||||||
|
ProjectSalaryDetailLogic::delete($params);
|
||||||
|
return $this->success('删除成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -59,7 +59,8 @@ class ProjectSalaryPaymentController extends BaseAdminController
|
|||||||
return $this->fail(ProjectSalaryPaymentLogic::getError());
|
return $this->fail(ProjectSalaryPaymentLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit() {
|
public function edit()
|
||||||
|
{
|
||||||
$params = (new ProjectSalaryPaymentValidate())->post()->goCheck('edit');
|
$params = (new ProjectSalaryPaymentValidate())->post()->goCheck('edit');
|
||||||
$result = ProjectSalaryPaymentLogic::edit($params);
|
$result = ProjectSalaryPaymentLogic::edit($params);
|
||||||
if (true === $result) {
|
if (true === $result) {
|
||||||
@ -68,6 +69,16 @@ class ProjectSalaryPaymentController extends BaseAdminController
|
|||||||
return $this->fail(ProjectSalaryPaymentLogic::getError());
|
return $this->fail(ProjectSalaryPaymentLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
$params = (new ProjectSalaryPaymentValidate())->post()->goCheck('delete');
|
||||||
|
$result = ProjectSalaryPaymentLogic::delete($params);
|
||||||
|
if (true === $result) {
|
||||||
|
return $this->success('删除成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
return $this->fail(ProjectSalaryPaymentLogic::getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取工资付款详情
|
* @notes 获取工资付款详情
|
||||||
|
@ -15,15 +15,10 @@
|
|||||||
namespace app\adminapi\logic\project;
|
namespace app\adminapi\logic\project;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\build\BuildPlan;
|
use app\common\logic\BaseLogic;
|
||||||
use app\common\model\build\BuildReport;
|
|
||||||
use app\common\model\build\BuildReportDetail;
|
|
||||||
use app\common\model\project\Project;
|
use app\common\model\project\Project;
|
||||||
use app\common\model\project\ProjectAttendanceDetail;
|
|
||||||
use app\common\model\project\ProjectPersonnel;
|
|
||||||
use app\common\model\project\ProjectSalaryDetail;
|
use app\common\model\project\ProjectSalaryDetail;
|
||||||
use app\common\model\project\ProjectSalaryPayment;
|
use app\common\model\project\ProjectSalaryPayment;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
@ -113,6 +108,16 @@ class ProjectSalaryPaymentLogic extends BaseLogic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function delete(array $params): bool
|
||||||
|
{
|
||||||
|
$detail = ProjectSalaryDetail::where('salary_payment_id', 'in', $params['id'])->findOrEmpty();
|
||||||
|
if (!$detail->isEmpty()) {
|
||||||
|
self::setError('此数据关联了工资明细内容,需删除工资明细内容');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return ProjectSalaryPayment::destroy($params['id']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 获取工资付款详情
|
* @notes 获取工资付款详情
|
||||||
|
Loading…
x
Reference in New Issue
Block a user