一、增加流程定义时可以选择项目
MYOA\webroot\general\system\workflow\flow_type\flow_design\view_list\edit.php
794行
<option value="11" <? if($AUTO_TYPE=="11")echo "selected";?>>按表单字段选择的直属上司</option>
\\10.110.2.210\d$\MYOA\webroot\general\workflow\list\turn\condition.php
765行处增加
}elseif($AUTO_TYPE==11) //根据表单字段的主属上司来处理
{
if(is_numeric($AUTO_USER))
{
$query3 = "SELECT ITEM_DATA from FLOW_RUN_DATA where RUN_ID='$RUN_ID' AND ITEM_ID='$AUTO_USER'";
$cursor3= exequery($connection,$query3);
if($ROW=mysql_fetch_array($cursor3))
$ITEM_DATA = $ROW["ITEM_DATA"];
$APPLY_USER_ID = substr($ITEM_DATA,strpos($ITEM_DATA,"_")-1);
//根据前一节点的直属上司
$query = "select EMP_MANAGECODE from user where user_id ='$APPLY_USER_ID'";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$USER_ID=$ROW["EMP_MANAGECODE"];
$query1 = "SELECT * from USER where USER_ID='$USER_ID'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))
{
$PRCS_NEW_USER_ID=$USER_ID;
$PRCS_NEW_USER_NAME=$ROW["USER_NAME"];
$PRCS_NEW_DEPT_ID=$ROW["DEPT_ID"];
$PRCS_NEW_USER_PRIV=$ROW["USER_PRIV"];
$PRCS_NEW_USER_PRIV_OTHER=$ROW["USER_PRIV_OTHER"];
}
}
$PRCS_OP_USER=$PRCS_NEW_USER_ID;
$PRCS_OP_USER_NAME=$PRCS_NEW_USER_NAME;
$PRCS_USER_AUTO=$PRCS_NEW_USER_ID.",";
$PRCS_USER_NAME=$PRCS_NEW_USER_NAME.",";
/*//检查该发起人是否有经办权限
if($PRCS_DEPT=="ALL_DEPT"||find_id($PRCS_USER,$PRCS_NEW_USER_ID)||find_id($PRCS_DEPT,$PRCS_NEW_DEPT_ID)||find_id($PRCS_PRIV,$PRCS_NEW_USER_PRIV)||priv_other($PRCS_PRIV,$PRCS_NEW_USER_PRIV_OTHER))
{
$PRCS_OP_USER=$PRCS_NEW_USER_ID;
$PRCS_OP_USER_NAME=$PRCS_NEW_USER_NAME;
$PRCS_USER_AUTO=$PRCS_NEW_USER_ID.",";
$PRCS_USER_NAME=$PRCS_NEW_USER_NAME.",";
}*/
}
}
3.在流程定义处保存的地方也要修改
MYOA\webroot\general\system\workflow\flow_type\flow_design\view_list\update.php
的66修改成:
if($AUTO_TYPE==7 || $AUTO_TYPE==11)