/// <summary>
    /// 将任务发送至下一环节
    /// </summary>
    /// <param name="strTaskId">任务ID</param>
    /// <returns></returns>
    public string SendToNext(string strTaskId)
    {
        DataTable objTable = new TMisMonitorResultLogic().geResultChecktItemTypeInfo_QHD(LogInfo.UserInfo.ID, "duty_other_analyse_result", strTaskId, "03", "0", "30");

        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;
            TMisMonitorSubtaskAppVoTemp            = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Details(TMisMonitorSubtaskAppVoTemp);
            string strSubTaskAppId = TMisMonitorSubtaskAppVoTemp.ID;
            i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo TMisMonitorSubtaskAppVo = new i3.ValueObject.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppVo();
            TMisMonitorSubtaskAppVo.ID           = strSubTaskAppId;
            TMisMonitorSubtaskAppVo.RESULT_AUDIT = LogInfo.UserInfo.ID;
            new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskAppLogic().Edit(TMisMonitorSubtaskAppVo);
        }

        bool   isSuccess = false;
        string strMsg    = "";

        isSuccess = new TMisMonitorResultLogic().SendTaskCheckToNextFlow_QY(strTaskId, LogInfo.UserInfo.ID, "03", "30", "50");
        bool IsAnyscene     = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskLogic().isExistAnyscene(strTaskId, "");
        bool IsAnysceneDept = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskLogic().isExistAnysceneDept(strTaskId, "");

        if (IsAnyscene && IsAnysceneDept)
        {
            strMsg = "现场项目结果核录、分析室主任审核";
        }
        else if (IsAnyscene)
        {
            strMsg = "分析室主任审核";
        }
        else if (IsAnysceneDept)
        {
            strMsg = "现场项目结果核录";
        }

        return(isSuccess == true ? "{\"result\":\"1\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"0\",\"msg\":\"" + strMsg + "\"}");
    }
Beispiel #2
0
    private string SendToNext(string strTaskId)
    {
        DataTable objTable = new TMisMonitorResultLogic().geResultChecktItemTypeInfo_QHD(LogInfo.UserInfo.ID, "analysis_result_qccheck", strTaskId, "03", "0", "40");

        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);
        }
        string strMsg = "";

        bool isSuccess = new TMisMonitorResultLogic().SendQcTaskToNextFlowForQy(strTaskId, LogInfo.UserInfo.ID, "09", "analysis_result_check");

        if (isSuccess == true)
        {
            bool IsFinish = false;
            IsFinish = new i3.BusinessLogic.Channels.Mis.Monitor.SubTask.TMisMonitorSubtaskLogic().isFinishSubTask(strTaskId, true);
            if (IsFinish == true)
            {
                i3.ValueObject.Channels.Mis.Monitor.Task.TMisMonitorTaskVo TMisMonitorTaskVo = new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Details(strTaskId);
                TMisMonitorTaskVo.ID          = strTaskId;
                TMisMonitorTaskVo.TASK_STATUS = "09";
                if (TMisMonitorTaskVo.TASK_TYPE == "1")
                {
                    objTable = new TMisMonitorSubtaskLogic().SelectByTable(new TMisMonitorSubtaskVo()
                    {
                        TASK_ID = strTaskId
                    });
                    //如果是环境质量将自动对数据进行填报
                    foreach (DataRow row in objTable.Rows)
                    {
                        string strSubTaskId  = row["ID"].ToString();
                        string strMonitorId  = row["MONITOR_ID"].ToString();
                        string strAskDate    = row["SAMPLE_ASK_DATE"].ToString();
                        string strSampleDate = row["SAMPLE_FINISH_DATE"].ToString();
                        TMisMonitorSubtaskVo TMisMonitorSubtaskVo = new TMisMonitorSubtaskVo();
                        TMisMonitorSubtaskVo.ID                 = strSubTaskId;
                        TMisMonitorSubtaskVo.MONITOR_ID         = strMonitorId;
                        TMisMonitorSubtaskVo.SAMPLE_ASK_DATE    = strAskDate;
                        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 TMisMonitorSubtaskLogic().SetEnvFillData(TMisMonitorSubtaskVo, false, TMisMonitorTaskVo.SAMPLE_SEND_MAN);
                        }
                        if (strMonitorId == "AreaNoise" || strMonitorId == "EnvRoadNoise" || strMonitorId == "FunctionNoise")
                        {
                            new TMisMonitorSubtaskLogic().SetEnvFillData(TMisMonitorSubtaskVo, true, TMisMonitorTaskVo.SAMPLE_SEND_MAN);
                        }
                    }

                    strMsg = "数据填报";
                }
                else
                {
                    if (TMisMonitorTaskVo.REPORT_HANDLE == "")
                    {
                        TMisMonitorTaskVo.REPORT_HANDLE = getNextReportUserID("Report_UserID");
                    }
                    strMsg = "报告办理";
                }
                new i3.BusinessLogic.Channels.Mis.Monitor.Task.TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo);
            }
        }

        return(isSuccess == true ? "{\"result\":\"1\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"0\",\"msg\":\"" + strMsg + "\"}");
    }