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 + "\"}"); }
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"); }
//发送到下一环节 //private string SendToNext(string strSubTaskId) //{ // TMisMonitorSubtaskVo objSubtaskVo = new TMisMonitorSubtaskVo(); // objSubtaskVo.ID = strSubTaskId; // objSubtaskVo.TASK_STATUS = "24"; // objSubtaskVo.TASK_TYPE = "发送"; // bool IsSuccess = new TMisMonitorSubtaskLogic().Edit(objSubtaskVo); //} private string SendToNext(string strTaskId) { string strSubTaskID = Request["strSubTaskID"].ToString(); bool IsSuccess = false; string strMsg = ""; DataTable dt = new DataTable(); dt = new TMisMonitorTaskLogic().SelectSampleTaskForQCQY(strSubTaskID, LogInfo.UserInfo.ID, "sample_result_qccheck", "023", strTaskId); IsSuccess = new TMisMonitorTaskLogic().SetSubTask(dt, "24", "发送"); if (IsSuccess == true) { bool IsAnyscene = false; bool IsFinish = false; //IsAnyscene = new TMisMonitorSubtaskLogic().isExistAnyscene(strTaskId); IsFinish = new 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") { DataTable 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 TMisMonitorTaskLogic().Edit(TMisMonitorTaskVo); } } return(IsSuccess == true ? "{\"result\":\"1\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"0\",\"msg\":\"" + strMsg + "\"}"); }