通达OA流程中心自动发起流程并发送待办提醒

    xiaoxiao2022-07-03  114

    <?php include_once("inc/auth.inc.php"); include_once("inc/utility_all.php"); include_once("inc/utility_org.php"); include_once("inc/utility_file.php"); include_once("inc/header.inc.php"); include_once "inc/utility_flow.php"; include_once "inc/utility_file.php"; include_once "inc/utility_sms1.php"; include_once "inc/workflow/inc/workflow.inc.php"; include_once "inc/flow_engine2.0/inc/engine/TFlowEngine.php"; $HTML_PAGE_TITLE = _("发起流程"); ob_end_clean(); $CUR_YEAR = date("Y"); $CUR_MONTH = date("m"); $CUR_WEEK = date("w"); $CUR_DAY = date("j"); $CUR_DATE = date("Y-m-d H:i:s"); $CUR_TIME = date("H:i:s"); ?> <body class="bodycolor" style=" background-color:#FFF; font-family:微软雅黑,宋体" > <? $user_id="admin"; $FLOW_ID="148"; $createUid = UserId2Uid($user_id); $createUserInfo = GetUserInfoByUID($createUid); $userInfo = array("LOGIN_UID" => $createUserInfo["UID"], "LOGIN_USER_ID" => $createUserInfo["USER_ID"], "LOGIN_USER_NAME" => $createUserInfo["USER_NAME"], "LOGIN_DEPT_ID" => $createUserInfo["DEPT_ID"], "LOGIN_DEPT_ID_OTHER" => $createUserInfo["DEPT_ID_OTHER"], "LOGIN_USER_PRIV" => $createUserInfo["USER_PRIV"], "LOGIN_USER_PRIV_OTHER" => $createUserInfo["USER_PRIV_OTHER"]); $ret = engine\TFlowEngine::newWork(intval($FLOW_ID), "", "", "", NULL, $userInfo); if (0 < $ret) { $RUN_ID = $ret; echo $RUN_ID."<br>"; echo $createUserInfo["USER_ID"]."<br>"; $workRunInfo = engine\TFlowEngine::getWorkRunInfo($RUN_ID, array("RUN_NAME")); $RUN_NAME = $workRunInfo["RUN_NAME"]; echo $RUN_NAME."<br>"; $SMS_CONTENT = _("您有新的待办工作需要处理") . "-" . $RUN_ID . "-" . $RUN_NAME; $REMIND_URL = "approve_center/list/input_form/?RUN_ID=$RUN_ID&FLOW_ID=$FLOW_ID&PRCS_ID=1&FLOW_PRCS=1"; $SMS_MODULE_ID = $RUN_ID . "_1_1"; send_sms($START_TIME, "admin", $createUserInfo["USER_ID"], "11_7", $SMS_CONTENT, $REMIND_URL, $SMS_MODULE_ID); } ?> </body> </html>

     

    最新回复(0)