/// <summary> /// 构建监测结果汇总表 /// </summary> protected string CreateResultTotalTable() { //任务ID string strTaskId = !string.IsNullOrEmpty(Request.QueryString["strTaskId"].ToString()) ? Request.QueryString["strTaskId"].ToString() : ""; //样品编号 string strSampleCode = string.Empty; if (Request.Params.AllKeys.Contains("strSampleCode") && !string.IsNullOrEmpty(Request.QueryString["strSampleCode"].ToString())) { strSampleCode = Request.QueryString["strSampleCode"].ToString(); } //监测类型 string strMonitorId = string.Empty; if (Request.Params.AllKeys.Contains("strMonitorId") && !string.IsNullOrEmpty(Request.QueryString["strMonitorId"].ToString())) { strMonitorId = Request.QueryString["strMonitorId"].ToString(); } //动态生成列名 string strPreColumnName = "样品编号,地点,时间,样品种类"; //动态生成列名编码 string strPreColumnName_Src = "SAMPLE_CODE,SAMPLE_NAME,SAMPLE_FINISH_DATE,MONITOR_TYPE_NAME"; if (!string.IsNullOrEmpty(strTaskId)) { //行转列 前数据表 DataTable dtResultTotal = new TMisMonitorResultLogic().getTotalItemInfoByTaskID(strTaskId, strSampleCode, strMonitorId); //过滤过质控样 DataRow[] drResultTotal = dtResultTotal.Select(" QC_TYPE='0'"); //行转列 后数据表 DataTable dtNew = getDatatable("", strPreColumnName, strPreColumnName_Src, drResultTotal.CopyToDataTable()); return(DataTableToJsonUnsureCol(dtNew, "")); } return(""); }
/// <summary> /// 创建原因:根据子任务ID和监测项目ID返回当前项目的原始记录表基础数据 /// 创建人:胡方扬 /// 创建日期:2013-07-09 /// </summary> /// <returns></returns> public string getBaseInfor() { TMisMonitorDustinforVo objDust = new TMisMonitorDustinforVo(); objDust.SUBTASK_ID = strSubTask_Id; objDust.ITEM_ID = strItem_Id; DataTable objDt = new TMisMonitorDustinforLogic().SelectByTable(objDust); int iCount = 0; if (objDt.Rows.Count > 0) { iCount = objDt.Rows.Count; } else { TMisMonitorResultVo objResultVo = new TMisMonitorResultVo(); objResultVo.SAMPLE_ID = new TMisMonitorResultLogic().Details(strSubTask_Id).SAMPLE_ID; objResultVo.REMARK_5 = "Poll"; DataTable dtResult = new TMisMonitorResultLogic().SelectByTable(objResultVo); //烟尘、粉尘、二氧化硫、氮氧化物、油烟:000001827,000001945 000000114,000000108 000000135 DataRow[] drResult = dtResult.Select("ITEM_ID not in('000001827','000001945','000000114','000000108','000000135')"); for (int i = 0; i < drResult.Length; i++) { objDust = new TMisMonitorDustinforVo(); objDust.SUBTASK_ID = drResult[i]["ID"].ToString(); objDt = new TMisMonitorDustinforLogic().SelectByTable(objDust); if (objDt.Rows.Count > 0) { break; } } } return(LigerGridDataToJson(objDt, iCount)); }
protected void ReturnAllTaskStep() { //任务对象 TMisMonitorTaskVo objTask = new TMisMonitorTaskLogic().Details(this.TASK_ID.Value); //子任务信息 TMisMonitorSubtaskVo objSubTask = new TMisMonitorSubtaskLogic().Details(new TMisMonitorSubtaskVo() { TASK_ID = this.TASK_ID.Value, MONITOR_ID = this.dllMonitor.SelectedValue }); //样品信息 TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(new TMisMonitorSampleInfoVo() { SUBTASK_ID = objSubTask.ID, QC_TYPE = "0" }); //样品结果信息 DataTable dtResult = new TMisMonitorResultLogic().SelectResultAndAppWithSubtaskID(objSubTask.ID); //校阅 //委托书对象 TMisContractVo objContract = new TMisContractLogic().Details(objTask.CONTRACT_ID); //预约表 TMisContractPlanVo objPlan = new TMisContractPlanLogic().Details(new TMisContractPlanVo() { CONTRACT_ID = objContract.ID }); //预约频次表(已预约未办理数) TMisContractPointFreqVo objPointFreq = new TMisContractPointFreqLogic().Details(new TMisContractPointFreqVo() { CONTRACT_ID = objContract.ID }); //自送样预约数(已预约未办理数) TMisContractSamplePlanVo objSamplePlan = new TMisContractSamplePlanLogic().Details(new TMisContractSamplePlanVo() { CONTRACT_ID = objContract.ID, }); #region 暂行的定制生成任务追踪方法 页面HTML构建 //定义已处理DIV样式 string strDivHas = "<div style='width:150px;height:auto;background-color:#5a8f5a;text-align: center;vertical-align: middle;'>{0}</div>"; //定义待处理DIV样式 string strDivWait = "<div style='width:150px;height:auto;background-color:#de9a1d;text-align: center;vertical-align: middle;'>{0}</div>"; //定义特殊处理DIV样式 //string strDivSepecial = "<div style='width:100px;height:50px;background-color:#e34323;text-align: center;vertical-align: middle;'>{0}</div"; //定义未处理DIV样式 //string strDivNo = "<div style='width:100px;height:50px;background-color:#a9a9a9;text-align: center;vertical-align: middle;'>{0}</div>"; #region 办理人 //采样负责人 string strSampleManager = GetSampleManager(objSubTask.SAMPLING_MANAGER_ID); //交接人 string strSampleAccept = GetDefaultOrFirstDutyUser("sample_allocation_sheet", this.dllMonitor.SelectedValue); //采样任务分配人 string strSampleSender = GetDefaultOrFirstDutyUser("duty_other_sampling", this.dllMonitor.SelectedValue); //采样后质控人 string strQcEnd = GetDefaultOrFirstDutyUser("sample_qc_end", this.dllMonitor.SelectedValue); //分析任务分配人 string strAnalyseSender = GetDefaultOrFirstDutyUser("duty_other_analyse", this.dllMonitor.SelectedValue); //校核人 string strAnalyseChecker = GetDefaultOrFirstDutyUser("duty_other_audit ", this.dllMonitor.SelectedValue); //复核人 string strAnalyseAgainChecker = GetDefaultOrFirstDutyUser("duty_other_analyse_result", this.dllMonitor.SelectedValue); //审核人 string strQcChecker = GetDefaultOrFirstDutyUser("duty_other_analyse_control", this.dllMonitor.SelectedValue); #endregion Table table1 = new Table(); table1.CssClass = "tMain"; TableRow row1 = new TableRow();//委托流程连接 TableCell cell1 = new TableCell(); cell1.Text = string.Format(strDivHas, "委托流程"); row1.Cells.Add(cell1); table1.Rows.Add(row1); //是否已预约 if (!string.IsNullOrEmpty(objPointFreq.ID)) { if (objPointFreq.IF_PLAN == null)//未预约 { table1 = GetCommonRow(table1, strDivWait, "采样预约", ""); this.divSample.Controls.Add(table1); return; } else if (objPointFreq.IF_PLAN == "0")//已预约未办理 { table1 = GetCommonRow(table1, strDivHas, "采样预约", ""); } } //自送样 预约 if (objSamplePlan.IF_PLAN == "0")//未预约 { table1 = GetCommonRow(table1, strDivWait, "送样预约", ""); this.divSample.Controls.Add(table1); return; } else if (objSamplePlan.IF_PLAN == "1")//已预约 { table1 = GetCommonRow(table1, strDivWait, "送样预约", ""); this.divSample.Controls.Add(table1); return; } else if (objSamplePlan.IF_PLAN == "2")//预约办理 { table1 = GetCommonRow(table1, strDivHas, "送样预约", ""); } //是否预约办理 if (objPlan.ID != "") { if (objPlan.HAS_DONE == "1")//已办理 { table1 = GetCommonRow(table1, strDivHas, "预约办理", strSampleSender); } else if (objPlan.HAS_DONE == "0" || string.IsNullOrEmpty(objPlan.HAS_DONE)) { table1 = GetCommonRow(table1, strDivWait, "预约办理", strSampleSender); this.divSample.Controls.Add(table1); return; } } //是否采样 if (objSubTask.TASK_STATUS == "02") { table1 = GetCommonRow(table1, strDivWait, "采样", strSampleManager); } //样品交接 if (objSubTask.TASK_STATUS == "021") { if (!string.IsNullOrEmpty(objPlan.ID)) { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); } table1 = GetCommonRow(table1, strDivWait, "样品交接", strSampleAccept); } //分析任务分配 DataRow[] dr1 = dtResult.Select(" RESULT_STATUS='01'");//过滤过分析分配环节任务 //分析结果录入 DataRow[] dr2 = dtResult.Select(" RESULT_STATUS='20'"); //数据审核 DataRow[] dr3 = dtResult.Select(" RESULT_STATUS='30'"); //分析室主任审核 DataRow[] dr4 = dtResult.Select(" RESULT_STATUS='40'"); //技术室主任审核 DataRow[] dr5 = dtResult.Select(" RESULT_STATUS='50'"); if (objSubTask.TASK_STATUS == "03") { if (dr1.Length > 0)//环节在分析任务分配 { if (!string.IsNullOrEmpty(objPlan.ID)) { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); } table1 = GetCommonRow(table1, strDivHas, "样品交接", strSampleAccept); table1 = GetCommonRow(table1, strDivWait, "分析任务分配", strAnalyseSender); } else { if (!string.IsNullOrEmpty(objPlan.ID)) { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); } table1 = GetCommonRow(table1, strDivHas, "样品交接", strSampleAccept); table1 = GetCommonRow(table1, strDivHas, "分析任务分配", strAnalyseSender); table1 = GetResultRow(table1, strDivHas, strDivWait, "分析结果录入", dtResult); if (dr2.Length > 0) //结果提交不完全时 { if (dr5.Length > 0) //流程已到技术室审核环节(最后环节) { table1 = GetCommonRow(table1, strDivWait, "数据审核", strAnalyseChecker); table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", strAnalyseAgainChecker); table1 = GetCommonRow(table1, strDivWait, "技术室主任审核", strQcChecker); } else { if (dr4.Length > 0)//流程仅到分析室审核 { table1 = GetCommonRow(table1, strDivWait, "数据审核", strAnalyseChecker); table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", strAnalyseAgainChecker); } else { if (dr3.Length > 0)//流程仅到数据审核 { table1 = GetCommonRow(table1, strDivWait, "数据审核", strAnalyseChecker); } } } } else//结果提交完全时 { if (dr3.Length > 0)//数据审核不完全 { table1 = GetCommonRow(table1, strDivWait, "数据审核", strAnalyseChecker); } else { table1 = GetCommonRow(table1, strDivHas, "数据审核", strAnalyseChecker); } if (dr4.Length > 0)//分析审核不完全 { table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", strAnalyseAgainChecker); } else if (dr3.Length == 0)//已经全部发送 { table1 = GetCommonRow(table1, strDivHas, "分析室主任审核", strAnalyseAgainChecker); } if (dr5.Length > 0) //流程已到技术室审核环节(最后环节) { if (objSubTask.TASK_STATUS == "09" && objTask.TASK_STATUS == "09") //分析流程完成 { table1 = GetCommonRow(table1, strDivHas, "技术室主任审核", strQcChecker); } else { table1 = GetCommonRow(table1, strDivWait, "技术室主任审核", strQcChecker); } } } } } else if (objTask.TASK_STATUS == "09" && objSubTask.TASK_STATUS == "09")//报告 { if (!string.IsNullOrEmpty(objPlan.ID)) { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); } table1 = GetCommonRow(table1, strDivHas, "样品交接", strSampleAccept); table1 = GetCommonRow(table1, strDivHas, "分析任务分配", strAnalyseSender); table1 = GetResultRow(table1, strDivHas, strDivWait, "分析结果录入", dtResult); table1 = GetCommonRow(table1, strDivHas, "数据审核", strAnalyseChecker); table1 = GetCommonRow(table1, strDivHas, "分析室主任审核", strAnalyseAgainChecker); table1 = GetCommonRow(table1, strDivHas, "技术室主任审核", strQcChecker); table1.Rows.Add(GetFollowRow()); TableRow row = new TableRow();//报告流程连接 TableCell cell = new TableCell(); // cell.Text = string.Format(strDivHas, "<a href='#' onclick='ShowReport(" + this.TASK_ID.Value + ");'>报告流程</a>"); cell.Text = string.Format(strDivHas, "报告流程"); row.Cells.Add(cell); table1.Rows.Add(row); } this.divSample.Controls.Add(table1); #endregion }
protected void ReturnAllTaskStep() { //任务对象 TMisMonitorTaskVo objTask = new TMisMonitorTaskLogic().Details(this.TASK_ID.Value); //子任务信息 TMisMonitorSubtaskVo objSubTask = new TMisMonitorSubtaskLogic().Details(new TMisMonitorSubtaskVo() { TASK_ID = this.TASK_ID.Value, MONITOR_ID = this.dllMonitor.SelectedValue }); //样品信息 TMisMonitorSampleInfoVo objSample = new TMisMonitorSampleInfoLogic().Details(new TMisMonitorSampleInfoVo() { SUBTASK_ID = objSubTask.ID, QC_TYPE = "0" }); //样品结果信息 DataTable dtResult = new TMisMonitorResultLogic().SelectResultAndAppWithSubtaskID(objSubTask.ID); //校阅 //委托书对象 TMisContractVo objContract = new TMisContractLogic().Details(objTask.CONTRACT_ID); //预约表 TMisContractPlanVo objPlan = new TMisContractPlanLogic().Details(new TMisContractPlanVo() { CONTRACT_ID = objContract.ID }); //预约频次表(已预约未办理数) int intIsPlanNoDo = new TMisContractPointFreqLogic().GetSelectResultCount(new TMisContractPointFreqVo() { CONTRACT_ID = objContract.ID, IF_PLAN = "0" }); #region 暂行的定制生成任务追踪方法 页面HTML构建 //定义已处理DIV样式 string strDivHas = "<div style='width:150px;height:50px;background-color:#5a8f5a;text-align: center;vertical-align: middle;'>{0}</div>"; //定义待处理DIV样式 string strDivWait = "<div style='width:150px;height:50px;background-color:#de9a1d;text-align: center;vertical-align: middle;'>{0}</div>"; //定义特殊处理DIV样式 //string strDivSepecial = "<div style='width:100px;height:50px;background-color:#e34323;text-align: center;vertical-align: middle;'>{0}</div"; //定义未处理DIV样式 //string strDivNo = "<div style='width:100px;height:50px;background-color:#a9a9a9;text-align: center;vertical-align: middle;'>{0}</div>"; Table table1 = new Table(); table1.CssClass = "tMain"; TableRow row1 = new TableRow();//委托流程连接 TableCell cell1 = new TableCell(); cell1.Text = string.Format(strDivHas, "<a href='#' onclick='ShowContract();'>委托流程</a>"); row1.Cells.Add(cell1); table1.Rows.Add(row1); //是否已预约 if (intIsPlanNoDo > 0) { table1 = GetCommonRow(table1, strDivHas, "采样预约", ""); } else { table1 = GetCommonRow(table1, strDivWait, "采样预约", ""); this.divSample.Controls.Add(table1); return; } //是否预约办理 if (objPlan.HAS_DONE == "1")//已办理 { table1 = GetCommonRow(table1, strDivHas, "预约办理", ""); } else { table1 = GetCommonRow(table1, strDivWait, "预约办理", ""); this.divSample.Controls.Add(table1); return; } //采样负责人 string strSampleManager = GetSampleManager(objSubTask.SAMPLING_MANAGER_ID); //交接人 string strSampleAccept = string.Empty; DataTable dtSampleAccept = new TSysUserDutyLogic().SelectUserDuty("sample_allocation_sheet", this.dllMonitor.SelectedValue); if (dtSampleAccept.Rows.Count > 0) { strSampleAccept = GetSampleManager(dtSampleAccept.Rows[0]["USERID"].ToString()); } //是否采样 if (objSubTask.TASK_STATUS == "02") { table1 = GetCommonRow(table1, strDivWait, "采样", strSampleManager); } //样品交接 if (objSubTask.TASK_STATUS == "021") { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); table1 = GetCommonRow(table1, strDivWait, "样品交接", strSampleAccept); } //分析任务分配 DataRow[] dr1 = dtResult.Select(" RESULT_STATUS='01'");//过滤过分析分配环节任务 //分析结果录入 DataRow[] dr2 = dtResult.Select(" RESULT_STATUS='20'"); //数据审核 DataRow[] dr3 = dtResult.Select(" RESULT_STATUS='30'"); //分析室主任审核 DataRow[] dr4 = dtResult.Select(" RESULT_STATUS='40'"); //技术室主任审核 DataRow[] dr5 = dtResult.Select(" RESULT_STATUS='50'"); if (objSubTask.TASK_STATUS == "03") { if (dr1.Length > 0)//环节在分析任务分配 { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); table1 = GetCommonRow(table1, strDivHas, "样品交接", strSampleAccept); table1 = GetCommonRow(table1, strDivWait, "分析任务分配", ""); } else { table1 = GetCommonRow(table1, strDivHas, "采样", strSampleManager); table1 = GetCommonRow(table1, strDivHas, "样品交接", strSampleAccept); table1 = GetCommonRow(table1, strDivHas, "分析任务分配", ""); table1 = GetResultRow(table1, strDivHas, strDivWait, "分析结果录入", dtResult); if (dr2.Length > 0) //结果提交不完全时 { if (dr5.Length > 0) //流程已到技术室审核环节(最后环节) { table1 = GetCommonRow(table1, strDivWait, "数据审核", ""); table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", ""); table1 = GetCommonRow(table1, strDivWait, "技术室主任审核", ""); } else { if (dr4.Length > 0)//流程仅到分析室审核 { table1 = GetCommonRow(table1, strDivWait, "数据审核", ""); table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", ""); } else { if (dr3.Length > 0)//流程仅到数据审核 { table1 = GetCommonRow(table1, strDivWait, "数据审核", ""); } } } } else//结果提交完全时 { if (dr3.Length > 0)//数据审核不完全 { table1 = GetCommonRow(table1, strDivWait, "数据审核", ""); } else { table1 = GetCommonRow(table1, strDivHas, "数据审核", ""); } if (dr4.Length > 0)//分析审核不完全 { table1 = GetCommonRow(table1, strDivWait, "分析室主任审核", ""); } else { table1 = GetCommonRow(table1, strDivHas, "分析室主任审核", ""); } if (dr5.Length > 0) //流程已到技术室审核环节(最后环节) { if (objSubTask.TASK_STATUS == "09" && objTask.TASK_STATUS == "09") //分析流程完成 { table1 = GetCommonRow(table1, strDivHas, "技术室主任审核", ""); TableRow row = new TableRow();//委托流程连接 TableCell cell = new TableCell(); cell.Text = string.Format(strDivHas, "<a href='#' onclick='ShowReport();'>报告流程</a>"); row.Cells.Add(cell); table1.Rows.Add(row); } else { table1 = GetCommonRow(table1, strDivWait, "技术室主任审核", ""); } } } } } this.divSample.Controls.Add(table1); #endregion }
public static string btnSendClick(string strSubtaskID, string strSourceID, string strUserID, string strAttribute) { bool isSuccess = true; string strMsg = ""; TMisMonitorSubtaskVo objSubtask = new TMisMonitorSubtaskLogic().Details(strSubtaskID); string strTaskID = objSubtask.TASK_ID; #region//判断是否存在样品没有设置项目的情况 TMisMonitorSampleInfoVo SampleInfoVo = new TMisMonitorSampleInfoVo(); SampleInfoVo.SUBTASK_ID = strSubtaskID; List <TMisMonitorSampleInfoVo> list = new List <TMisMonitorSampleInfoVo>(); list = new TMisMonitorSampleInfoLogic().SelectByObject(SampleInfoVo, 0, 0); for (int i = 0; i < list.Count; i++) { TMisMonitorResultVo ResultVo = new TMisMonitorResultVo(); ResultVo.SAMPLE_ID = list[i].ID; ResultVo = new TMisMonitorResultLogic().SelectByObject(ResultVo); if (ResultVo.ID.Length == 0) { isSuccess = false; strMsg = "样品[" + list[i].SAMPLE_NAME + "]还没设置监测项目"; break; } } if (isSuccess == false) { return("[{result:'0',msg:'" + strMsg + "'}]"); } #endregion DataTable dtSampleItem = new TMisMonitorResultLogic().SelectSampleItemWithSubtaskID(strSubtaskID); #region//判断现场监测项目是否填写结果值 DataRow[] drSampleItem = dtSampleItem.Select("IS_ANYSCENE_ITEM='0'"); for (int i = 0; i < drSampleItem.Length; i++) { if (drSampleItem[i]["ITEM_RESULT"].ToString().Length == 0) { isSuccess = false; strMsg = "现场项目[" + drSampleItem[i]["ITEM_NAME"].ToString() + "]还没填写结果值,请检查!"; break; } } if (isSuccess == false) { return("[{result:'0',msg:'" + strMsg + "'}]"); } #endregion TMisMonitorSubtaskAppVo objSubAppSet = new TMisMonitorSubtaskAppVo(); //if (objSubtask.MONITOR_ID == "000000004" || objSubtask.MONITOR_ID == "000000005") if (objSubtask.MONITOR_ID == "000000005") { objSubtask.TASK_STATUS = "022";//噪声、辐射现场监测项目进行 现场项目审核流程 objSubtask.REMARK1 = objSubtask.ID; } else { objSubtask.TASK_STATUS = "021";//其它进行样品交接环节 strMsg = "样品交接"; } //子任务所有项目都属于现场项目,跳过分析环节 DataTable dtSampleDept = new TMisMonitorResultLogic().SelectSampleDeptWithSubtaskID(strSubtaskID); if (dtSampleDept.Rows.Count == 0)//全是现场项目 { objSubtask.TASK_STATUS = "022"; objSubtask.REMARK1 = objSubtask.ID; strMsg = "现场监测结果复核"; //设置现场复核人 objSubAppSet.SAMPLING_CHECK = strUserID; } objSubAppSet.REMARK1 = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); //采样时间 TMisMonitorSubtaskAppVo objSubAppWhere = new TMisMonitorSubtaskAppVo(); objSubAppWhere.SUBTASK_ID = strSubtaskID; new TMisMonitorSubtaskAppLogic().Edit(objSubAppSet, objSubAppWhere); //update by ssz QY 现场项目信息需要另外发送任务 if (dtSampleItem.Rows.Count > 0 && dtSampleDept.Rows.Count > 0)//存在 非现场项目和现场项目 { TMisMonitorSubtaskVo objSampleSubtask = new TMisMonitorSubtaskVo(); CopyObject(objSubtask, objSampleSubtask); objSampleSubtask.ID = GetSerialNumber("t_mis_monitor_subtaskId"); objSampleSubtask.REMARK1 = objSubtask.ID; objSampleSubtask.TASK_STATUS = "022"; //创建一个新的任务 对现场项目流程 new TMisMonitorSubtaskLogic().Create(objSampleSubtask); //设置现场复核人 TMisMonitorSubtaskAppVo objSubApp = new TMisMonitorSubtaskAppVo(); objSubApp.ID = GetSerialNumber("TMisMonitorSubtaskAppID"); objSubApp.SUBTASK_ID = objSampleSubtask.ID; objSubApp.SAMPLING_CHECK = strUserID; objSubApp.REMARK1 = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); //采样时间 new TMisMonitorSubtaskAppLogic().Create(objSubApp); strMsg = "样品交接、现场监测结果复核"; } isSuccess = new TMisMonitorSubtaskLogic().Edit(objSubtask); //根据子任务ID把该任务下所有分析类现场监测项目的结果状态改为:00 new TMisMonitorResultLogic().setSampleItemWithSubtaskID(strSubtaskID); #region 任务全部完成,修改任务表状态(注释) int iStatus = 0; objSubtask = new TMisMonitorSubtaskVo(); objSubtask.TASK_ID = strTaskID; DataTable dtTask = new TMisMonitorSubtaskLogic().SelectByTable(objSubtask); for (int j = 0; j < dtTask.Rows.Count; j++) { if (dtTask.Rows[j]["TASK_STATUS"].ToString() != "022") { iStatus += 1; } } if (iStatus == 0) { TMisMonitorTaskVo objTask = new TMisMonitorTaskVo(); objTask.ID = strTaskID; objTask.TASK_STATUS = "09"; new TMisMonitorTaskLogic().Edit(objTask); } #endregion //现场信息 TMisMonitorSampleSkyVo objSampleSky = new TMisMonitorSampleSkyVo(); for (int i = 0; i < strAttribute.Split('-').Length; i++) { if (strAttribute.Split('-')[i].Contains("|")) { objSampleSky.SUBTASK_ID = strSubtaskID; objSampleSky.WEATHER_ITEM = strAttribute.Split('-')[i].Split('|')[0]; objSampleSky = new TMisMonitorSampleSkyLogic().Details(objSampleSky); objSampleSky.WEATHER_INFO = strAttribute.Split('-')[i].Split('|')[1]; objSampleSky.SUBTASK_ID = strSubtaskID; objSampleSky.WEATHER_ITEM = strAttribute.Split('-')[i].Split('|')[0]; if (objSampleSky.ID.Length > 0) { isSuccess = new TMisMonitorSampleSkyLogic().Edit(objSampleSky); } else { objSampleSky.ID = GetSerialNumber("TMisMonitorSampleSky"); isSuccess = new TMisMonitorSampleSkyLogic().Create(objSampleSky); } } } return(isSuccess == true ? "[{result:'1',msg:'" + strMsg + "'}]" : "[{result:'0',msg:'" + strMsg + "'}]"); }