diff --git a/application/common/Model/Task.php b/application/common/Model/Task.php index d84caa6..08675ae 100644 --- a/application/common/Model/Task.php +++ b/application/common/Model/Task.php @@ -281,7 +281,7 @@ class Task extends CommonModel 'create_by' => $memberCode, 'assign_to' => $assignTo, 'id_num' => $maxNum + 1, - 'sort' => $maxSort + 500, + 'sort' => $maxSort + 65536, 'project_code' => $projectCode, 'pcode' => $parentCode, 'path' => $path, @@ -484,7 +484,7 @@ class Task extends CommonModel $newSort = (int)($nextTask['sort'] + $nextPreTaskSort) / 2; } else { $maxSort = self::where('stage_code', '=', $toStageCode)->where('done', $done)->max('sort'); - $newSort = $maxSort + 500; + $newSort = $maxSort + 65536; } if ($newSort and $newSort > 50) { $preTask->stage_code = $toStageCode; @@ -505,11 +505,11 @@ class Task extends CommonModel { $taskList = self::where('stage_code', $stageCode)->order('sort asc, id asc')->where('done', $done)->select(); if ($taskList) { - $sort = 500; + $sort = 65536; foreach ($taskList as $task) { $task->sort = $sort; $task->save(); - $sort += 500; + $sort += 65536; } } } @@ -534,7 +534,7 @@ class Task extends CommonModel foreach ($codes as $key => $code) { $task = self::where(['code' => $code])->find(); self::update(['sort' => $sort, 'stage_code' => $stageCode], ['code' => $code]); - $sort += 500; + $sort += 65536; if ($task['stage_code'] != $stageCode) { self::taskHook(getCurrentMember()['code'], $code, 'move', '', '', '', '', '', ['stageName' => $stage['name']]); } diff --git a/application/common/Model/TaskStages.php b/application/common/Model/TaskStages.php index b554c39..7b714fd 100644 --- a/application/common/Model/TaskStages.php +++ b/application/common/Model/TaskStages.php @@ -154,7 +154,7 @@ class TaskStages extends CommonModel 'create_time' => nowTime(), 'code' => createUniqueCode('taskStages'), 'project_code' => $projectCode, - 'sort' => $maxSort + 500, + 'sort' => $maxSort + 65536, 'name' => trim($name), ]; $result = self::create($data)->toArray(); @@ -193,7 +193,7 @@ class TaskStages extends CommonModel $newSort = (int)($nextStage['sort'] + $nextPreStageSort) / 2; } else { $maxSort = self::where('project_code', $projectCode)->max('sort'); - $newSort = $maxSort + 500; + $newSort = $maxSort + 65536; } if ($newSort and $newSort > 50) { self::update(['sort' => $newSort], ['code' => $preCode]); @@ -211,11 +211,11 @@ class TaskStages extends CommonModel { $taskStagesList = self::where('project_code', $projectCode)->order('sort asc, id asc')->select(); if ($taskStagesList) { - $sort = 500; + $sort = 65536; foreach ($taskStagesList as $taskStage) { $taskStage->sort = $sort; - $res = $taskStage->save(); - $sort += 500; + $taskStage->save(); + $sort += 65536; } } }