This commit is contained in:
chenbo 2024-02-23 17:07:12 +08:00
parent cda15e3ec7
commit 984f94e48d
4 changed files with 91 additions and 91 deletions

View File

@ -35,7 +35,7 @@ class TaskTypeController extends BaseAdminController
* @notes 获取列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function lists()
{
@ -47,7 +47,7 @@ class TaskTypeController extends BaseAdminController
* @notes 添加
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function add()
{
@ -64,7 +64,7 @@ class TaskTypeController extends BaseAdminController
* @notes 编辑
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function edit()
{
@ -81,7 +81,7 @@ class TaskTypeController extends BaseAdminController
* @notes 删除
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function delete()
{
@ -95,7 +95,7 @@ class TaskTypeController extends BaseAdminController
* @notes 获取详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function detail()
{

View File

@ -33,12 +33,12 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function setSearch(): array
{
return [
'=' => ['num', 'name'],
];
}
@ -50,12 +50,12 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function lists(): array
{
return TaskType::where($this->searchWhere)
->field(['id', 'dataid', 'project', 'num', 'name', 'superior_sort', 'level', 'remarks'])
->field(['id', 'dataid', 'cost_project_id', 'num', 'name', 'superior_sort', 'level', 'remarks'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
@ -67,7 +67,7 @@ class TaskTypeLists extends BaseAdminDataLists implements ListsSearchInterface
* @notes 获取数量
* @return int
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function count(): int
{

View File

@ -34,7 +34,7 @@ class TaskTypeLogic extends BaseLogic
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public static function add(array $params): bool
{
@ -42,7 +42,7 @@ class TaskTypeLogic extends BaseLogic
try {
TaskType::create([
'dataid' => $params['dataid'],
'project' => $params['project'],
'cost_project_id' => $params['cost_project_id'],
'num' => $params['num'],
'name' => $params['name'],
'superior_sort' => $params['superior_sort'],
@ -65,7 +65,7 @@ class TaskTypeLogic extends BaseLogic
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public static function edit(array $params): bool
{
@ -73,7 +73,7 @@ class TaskTypeLogic extends BaseLogic
try {
TaskType::where('id', $params['id'])->update([
'dataid' => $params['dataid'],
'project' => $params['project'],
'cost_project_id' => $params['cost_project_id'],
'num' => $params['num'],
'name' => $params['name'],
'superior_sort' => $params['superior_sort'],
@ -96,7 +96,7 @@ class TaskTypeLogic extends BaseLogic
* @param array $params
* @return bool
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public static function delete(array $params): bool
{
@ -109,7 +109,7 @@ class TaskTypeLogic extends BaseLogic
* @param $params
* @return array
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public static function detail($params): array
{

View File

@ -48,7 +48,7 @@ class TaskTypeValidate extends BaseValidate
* @notes 添加场景
* @return TaskTypeValidate
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function sceneAdd()
{
@ -60,7 +60,7 @@ class TaskTypeValidate extends BaseValidate
* @notes 编辑场景
* @return TaskTypeValidate
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function sceneEdit()
{
@ -72,7 +72,7 @@ class TaskTypeValidate extends BaseValidate
* @notes 删除场景
* @return TaskTypeValidate
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function sceneDelete()
{
@ -84,7 +84,7 @@ class TaskTypeValidate extends BaseValidate
* @notes 详情场景
* @return TaskTypeValidate
* @author likeadmin
* @date 2024/02/22 10:06
* @date 2024/02/23 17:06
*/
public function sceneDetail()
{