mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-10 18:02:55 +00:00
fix: 更改审批流数据表名
This commit is contained in:
parent
1ad0c3a3ec
commit
ffbd9b1f26
@ -13,7 +13,7 @@ use App\Module\Ihttp;
|
|||||||
use App\Tasks\PushTask;
|
use App\Tasks\PushTask;
|
||||||
use App\Module\BillExport;
|
use App\Module\BillExport;
|
||||||
use App\Models\WebSocketDialog;
|
use App\Models\WebSocketDialog;
|
||||||
use App\Models\WorkflowProcMsg;
|
use App\Models\ApproveProcMsg;
|
||||||
use App\Exceptions\ApiException;
|
use App\Exceptions\ApiException;
|
||||||
use App\Models\UserDepartment;
|
use App\Models\UserDepartment;
|
||||||
use App\Models\WebSocketDialogMsg;
|
use App\Models\WebSocketDialogMsg;
|
||||||
@ -206,7 +206,7 @@ class ApproveController extends AbstractController
|
|||||||
* @apiDescription 需要token身份
|
* @apiDescription 需要token身份
|
||||||
* @apiVersion 1.0.0
|
* @apiVersion 1.0.0
|
||||||
* @apiGroup approve
|
* @apiGroup approve
|
||||||
* @apiName task__complete
|
* @apiName task__complete
|
||||||
*
|
*
|
||||||
* @apiQuery {Number} task_id 流程ID
|
* @apiQuery {Number} task_id 流程ID
|
||||||
* @apiQuery {String} pass 标题 [true-通过,false-拒绝]
|
* @apiQuery {String} pass 标题 [true-通过,false-拒绝]
|
||||||
@ -237,7 +237,7 @@ class ApproveController extends AbstractController
|
|||||||
return Base::retError('审批机器人不存在');
|
return Base::retError('审批机器人不存在');
|
||||||
}
|
}
|
||||||
// 在流程信息关联的用户中查找
|
// 在流程信息关联的用户中查找
|
||||||
$toUser = WorkflowProcMsg::where('proc_inst_id', $process['id'])->get()->toArray();
|
$toUser = ApproveProcMsg::where('proc_inst_id', $process['id'])->get()->toArray();
|
||||||
foreach ($toUser as $val) {
|
foreach ($toUser as $val) {
|
||||||
$dialog = WebSocketDialog::checkUserDialog($botUser, $val['userid']);
|
$dialog = WebSocketDialog::checkUserDialog($botUser, $val['userid']);
|
||||||
if (empty($dialog)) {
|
if (empty($dialog)) {
|
||||||
@ -313,7 +313,7 @@ class ApproveController extends AbstractController
|
|||||||
return Base::retError('审批机器人不存在');
|
return Base::retError('审批机器人不存在');
|
||||||
}
|
}
|
||||||
// 在流程信息关联的用户中查找
|
// 在流程信息关联的用户中查找
|
||||||
$toUser = WorkflowProcMsg::where('proc_inst_id', $process['id'])->get()->toArray();
|
$toUser = ApproveProcMsg::where('proc_inst_id', $process['id'])->get()->toArray();
|
||||||
foreach ($toUser as $val) {
|
foreach ($toUser as $val) {
|
||||||
$dialog = WebSocketDialog::checkUserDialog($botUser, $val['userid']);
|
$dialog = WebSocketDialog::checkUserDialog($botUser, $val['userid']);
|
||||||
if (empty($dialog)) {
|
if (empty($dialog)) {
|
||||||
@ -975,7 +975,7 @@ class ApproveController extends AbstractController
|
|||||||
$msg = WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
$msg = WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
||||||
// 关联信息
|
// 关联信息
|
||||||
if ($action == 'start') {
|
if ($action == 'start') {
|
||||||
$proc_msg = new WorkflowProcMsg();
|
$proc_msg = new ApproveProcMsg();
|
||||||
$proc_msg->proc_inst_id = $process['id'];
|
$proc_msg->proc_inst_id = $process['id'];
|
||||||
$proc_msg->msg_id = $msg['data']->id;
|
$proc_msg->msg_id = $msg['data']->id;
|
||||||
$proc_msg->userid = $toUser['userid'];
|
$proc_msg->userid = $toUser['userid'];
|
||||||
|
|||||||
30
app/Models/ApproveProcMsg.php
Normal file
30
app/Models/ApproveProcMsg.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App\Models\ApproveProcMsg
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string|null $type 信息类型(如:candidate-候选人、participant-参与人、notifier-抄送人)
|
||||||
|
* @property int|null $proc_inst_id 流程实例ID
|
||||||
|
* @property int|null $userid 会员ID
|
||||||
|
* @property int|null $msg_id 消息ID
|
||||||
|
* @property \Illuminate\Support\Carbon|null $created_at
|
||||||
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg newModelQuery()
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg newQuery()
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg query()
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereCreatedAt($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereId($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereMsgId($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereProcInstId($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereType($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereUpdatedAt($value)
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereUserid($value)
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class ApproveProcMsg extends AbstractModel
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* App\Models\WorkflowProcMsg
|
|
||||||
*
|
|
||||||
* @property int $id
|
|
||||||
* @property string|null $type 信息类型(如:candidate-候选人、participant-参与人、notifier-抄送人)
|
|
||||||
* @property int|null $proc_inst_id 流程实例ID
|
|
||||||
* @property int|null $userid 会员ID
|
|
||||||
* @property int|null $msg_id 消息ID
|
|
||||||
* @property \Illuminate\Support\Carbon|null $created_at
|
|
||||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg newModelQuery()
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg newQuery()
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg query()
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereCreatedAt($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereId($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereMsgId($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereProcInstId($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereType($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereUpdatedAt($value)
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|WorkflowProcMsg whereUserid($value)
|
|
||||||
* @mixin \Eloquent
|
|
||||||
*/
|
|
||||||
class WorkflowProcMsg extends AbstractModel
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateWorkflowProcMsgs extends Migration
|
class CreateApproveProcMsgs extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@ -13,8 +13,8 @@ class CreateWorkflowProcMsgs extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
if (!Schema::hasTable('workflow_proc_msgs')) {
|
if (!Schema::hasTable('approve_proc_msgs')) {
|
||||||
Schema::create('workflow_proc_msgs', function (Blueprint $table) {
|
Schema::create('approve_proc_msgs', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->bigInteger('proc_inst_id')->nullable()->default(0)->comment('流程实例ID');
|
$table->bigInteger('proc_inst_id')->nullable()->default(0)->comment('流程实例ID');
|
||||||
$table->bigInteger('userid')->nullable()->default(0)->comment('会员ID');
|
$table->bigInteger('userid')->nullable()->default(0)->comment('会员ID');
|
||||||
@ -31,8 +31,8 @@ class CreateWorkflowProcMsgs extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('workflow_proc_msgs', function (Blueprint $table) {
|
Schema::table('approve_proc_msgs', function (Blueprint $table) {
|
||||||
Schema::dropIfExists('workflow_proc_msgs');
|
Schema::dropIfExists('approve_proc_msgs');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ services:
|
|||||||
|
|
||||||
approve:
|
approve:
|
||||||
container_name: "dootask-approve-${APP_ID}"
|
container_name: "dootask-approve-${APP_ID}"
|
||||||
image: "hitosea2020/go-workflow:latest"
|
image: "hitosea2020/go-approve:latest"
|
||||||
environment:
|
environment:
|
||||||
TZ: "Asia/Shanghai"
|
TZ: "Asia/Shanghai"
|
||||||
MYSQL_HOST: "${DB_HOST}"
|
MYSQL_HOST: "${DB_HOST}"
|
||||||
@ -158,7 +158,7 @@ services:
|
|||||||
MYSQL_DBNAME: "${DB_DATABASE}"
|
MYSQL_DBNAME: "${DB_DATABASE}"
|
||||||
MYSQL_USERNAME: "${DB_USERNAME}"
|
MYSQL_USERNAME: "${DB_USERNAME}"
|
||||||
MYSQL_PASSWORD: "${DB_PASSWORD}"
|
MYSQL_PASSWORD: "${DB_PASSWORD}"
|
||||||
MYSQL_Prefix: "${DB_PREFIX}workflow_"
|
MYSQL_Prefix: "${DB_PREFIX}approve_"
|
||||||
networks:
|
networks:
|
||||||
extnetwork:
|
extnetwork:
|
||||||
ipv4_address: "${APP_IPPR}.11"
|
ipv4_address: "${APP_IPPR}.11"
|
||||||
|
|||||||
@ -370,6 +370,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #ededed;
|
color: #ededed;
|
||||||
|
min-height: 95px;
|
||||||
}
|
}
|
||||||
.approve-col-for{
|
.approve-col-for{
|
||||||
padding:16px;
|
padding:16px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user