Example #1
0
    private string SendToNext(string strTaskId)
    {
        bool IsSuccess = new TMisMonitorResultLogic().SendQcTaskToNextFlow(strTaskId, LogInfo.UserInfo.ID, "09", "duty_other_analyse_control");

        if (IsSuccess == true)
        {
            i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVo = new i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo();
            TMisMonitorTaskVo.ID          = strTaskId;
            TMisMonitorTaskVo.TASK_STATUS = "09";
            new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo);
        }
        return(IsSuccess == true ? "1" : "0");
    }
    private string SendToNext(string strTaskId, string strTaskType)
    {
        DataTable objTable = new TMisMonitorResultLogic().geResultChecktItemTypeInfo_QHD(LogInfo.UserInfo.ID, "duty_other_analyse_control", strTaskId, "03,021,02", "2", "50");

        foreach (DataRow row in objTable.Rows)
        {
            string strId = row["ID"].ToString();
            //根据子任务ID获取监测子任务审核表ID
            i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo TMisMonitorSubtaskAppVoTemp = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo();
            TMisMonitorSubtaskAppVoTemp.SUBTASK_ID = strId;
            string strSubTaskAppId = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Details(TMisMonitorSubtaskAppVoTemp).ID;
            i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo TMisMonitorSubtaskAppVo = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo();
            TMisMonitorSubtaskAppVo.ID = strSubTaskAppId;
            TMisMonitorSubtaskAppVo.RESULT_QC_CHECK      = LogInfo.UserInfo.ID;
            TMisMonitorSubtaskAppVo.RESULT_QC_CHECK_DATE = DateTime.Now.ToString();
            new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Edit(TMisMonitorSubtaskAppVo);
        }

        bool IsSuccess = true;

        if (strTaskType != "1")     //非环境质量类的任务
        {
            IsSuccess = new TMisMonitorResultLogic().SendQcTaskToNextFlow(strTaskId, LogInfo.UserInfo.ID, "09", "duty_other_analyse_control");
            if (IsSuccess == true)
            {
                i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVo = new i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo();
                TMisMonitorTaskVo.ID          = strTaskId;
                TMisMonitorTaskVo.TASK_STATUS = "09";
                new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo);
            }
        }
        else //环境质量类
        {
            IsSuccess = new TMisMonitorResultLogic().SendTaskCheckToNextFlow_QHD(strTaskId, LogInfo.UserInfo.ID, "03,021,02", "duty_other_analyse_result", "2", "50", "60", false, "");
            if (IsSuccess == true)
            {
                if (new TMisMonitorResultLogic().isAllSend(strTaskId, "60", false))
                {
                    IsSuccess = new TMisMonitorResultLogic().SendQcTaskToNextFlow(strTaskId, LogInfo.UserInfo.ID, "09", "duty_other_analyse_control");
                    if (IsSuccess == true)
                    {
                        i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVo = new i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo();
                        TMisMonitorTaskVo.ID          = strTaskId;
                        TMisMonitorTaskVo.TASK_STATUS = "09";
                        new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo);
                    }
                }
            }
        }
        return(IsSuccess == true ? "1" : "0");
    }
    private string SendToNext(string strTaskId)
    {
        //记录当前分析环节的发送人
        DataTable objTable = new TMisMonitorResultLogic().geResultChecktItemTypeInfo_QHD(LogInfo.UserInfo.ID, "qc_manager_audit", strTaskId, "03", "0", "60");

        foreach (DataRow row in objTable.Rows)
        {
            string strId = row["ID"].ToString();
            //根据子任务ID获取监测子任务审核表ID
            i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo TMisMonitorSubtaskAppVoTemp = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo();
            TMisMonitorSubtaskAppVoTemp.SUBTASK_ID = strId;
            string strSubTaskAppId = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Details(TMisMonitorSubtaskAppVoTemp).ID;
            i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo TMisMonitorSubtaskAppVo = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo();
            TMisMonitorSubtaskAppVo.ID = strSubTaskAppId;
            TMisMonitorSubtaskAppVo.RESULT_QC_CHECK = LogInfo.UserInfo.ID;
            new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Edit(TMisMonitorSubtaskAppVo);
        }

        //分析环节任务完结状态改变
        bool IsSuccess = new TMisMonitorResultLogic().SendQcTaskToNextFlow(strTaskId, LogInfo.UserInfo.ID, "09", "qc_manager_audit");

        if (IsSuccess == true)
        {
            //如果是环境质量将自动对数据进行填报
            foreach (DataRow row in objTable.Rows)
            {
                string strSubTaskId  = row["ID"].ToString();
                string strMonitorId  = row["MONITOR_ID"].ToString();
                string strSampleDate = row["SAMPLE_FINISH_DATE"].ToString();
                i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskVo TMisMonitorSubtaskVo = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskVo();
                TMisMonitorSubtaskVo.ID                 = strSubTaskId;
                TMisMonitorSubtaskVo.MONITOR_ID         = strMonitorId;
                TMisMonitorSubtaskVo.SAMPLE_FINISH_DATE = strSampleDate;
                if (strMonitorId == "EnvRiver" || strMonitorId == "EnvReservoir" || strMonitorId == "EnvDrinking" || strMonitorId == "EnvDrinkingSource" || strMonitorId == "EnvStbc" || strMonitorId == "EnvMudRiver" || strMonitorId == "EnvPSoild" || strMonitorId == "EnvSoil" || strMonitorId == "EnvAir" || strMonitorId == "EnvSpeed" || strMonitorId == "EnvDust" || strMonitorId == "EnvRain")
                {
                    new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskLogic().SetEnvFillData(TMisMonitorSubtaskVo, false, "");
                }
                if (strMonitorId == "AreaNoise" || strMonitorId == "EnvRoadNoise" || strMonitorId == "FunctionNoise")
                {
                    new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskLogic().SetEnvFillData(TMisMonitorSubtaskVo, true, "");
                }
            }
            if (new TMisMonitorResultLogic().allTaskIsFinish_ZZ(strTaskId, "24", "60"))
            {
                i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVo = new i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo();
                TMisMonitorTaskVo.ID          = strTaskId;
                TMisMonitorTaskVo.TASK_STATUS = "09";
                new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo);

                i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVoTemp = new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Details(strTaskId);
                if (TMisMonitorTaskVoTemp.CONTRACT_TYPE == "05")
                {
                    //根据任务ID获取项目负责人
                    string strProjectId             = TMisMonitorTaskVoTemp.PROJECT_ID;
                    TMisMonitorReportVo objMrUpdate = new TMisMonitorReportVo();
                    objMrUpdate.IF_SEND          = "1";
                    objMrUpdate.REPORT_SCHEDULER = strProjectId;
                    TMisMonitorReportVo objMrWhere = new TMisMonitorReportVo();
                    objMrWhere.TASK_ID = strTaskId;
                    new TMisMonitorReportLogic().Edit(objMrUpdate, objMrWhere);
                }
            }
        }
        return(IsSuccess == true ? "1" : "0");
    }