/// <summary>
        /// 验证文件是否都上传。
        /// </summary>
        /// <param name="workflowId">流程Id。</param>
        /// <param name="itemCode">项目编号。</param>
        /// <param name="node">节点。</param>
        /// <param name="fileCodes">是否制定验证文件的类型。</param>
        /// <returns>错误信息。</returns>
        protected string FileValidation(string workflowId, string itemCode, WorkFlowNode node, List <string> fileCodes)
        {
            WfNode        nodeInfo      = this.GetNodeInfo(workflowId, ((int)node).ToString());
            List <string> nodeFileCodes = nodeInfo.NodeFileCode.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();

            if (fileCodes == null)
            {
                fileCodes = nodeFileCodes;
            }
            else
            {
                fileCodes = fileCodes.Intersect(nodeFileCodes).ToList();
            }
            string           format    = "\"{0}\"必须上传!";
            StringBuilder    sb        = new StringBuilder();
            List <Item_File> fileInfos = new BusiItemManage().GetItemFile(itemCode, node);

            foreach (var fileInfo in fileInfos)
            {
                fileCodes.Remove(fileInfo.FileCode);
            }
            if (fileCodes.Count != 0)
            {
                foreach (var fileCode in fileCodes)
                {
                    sb.AppendLine(string.Format(format, EnumHelper.GetFieldDescription(typeof(FileCode), int.Parse(fileCode))));
                }
            }
            return(sb.ToString());
        }
        protected string MoneyValidation(string itemCode, string dispalyName, WorkFlowNode node, int xh)
        {
            StringBuilder sb      = new StringBuilder();
            DataTable     dtMoney = new BusiItemManage().GetItemMoneyDt(itemCode, (int)node, xh.ToString());

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtMoney, dispalyName, NotNullFormat));
            condition.Clear();
            condition.Add("ZJZE", dispalyName);
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtMoney, condition, NotNullFormat));

            if (dtMoney.Rows.Count > 0)
            {
                if (FormatMoney(dtMoney.Rows[0]["ZJZE"].ToString()) !=
                    FormatMoney(dtMoney.Rows[0]["fee1"].ToString()) + FormatMoney(dtMoney.Rows[0]["fee2"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["fee3"].ToString()) + FormatMoney(dtMoney.Rows[0]["fee4"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["fee5"].ToString()) + FormatMoney(dtMoney.Rows[0]["fee6"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["fee7"].ToString()) + FormatMoney(dtMoney.Rows[0]["fee8"].ToString()))
                {
                    AppendErrorMessage(sb, "资金总额与来源情况不相符!");
                }

                if (FormatMoney(dtMoney.Rows[0]["ZJZE"].ToString()) !=
                    FormatMoney(dtMoney.Rows[0]["sbgzf"].ToString()) + FormatMoney(dtMoney.Rows[0]["tdpzgcf"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["ntslgcf"].ToString()) + FormatMoney(dtMoney.Rows[0]["dlgcf"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["qtgcf"].ToString()) + FormatMoney(dtMoney.Rows[0]["bkyjf"].ToString()) +
                    FormatMoney(dtMoney.Rows[0]["qtfy"].ToString()))
                {
                    AppendErrorMessage(sb, "资金总额与使用情况不相符!");
                }
            }

            return(sb.ToString());
        }
        public override string Validation(string workflowId, string itemCode, WfResult wfResult)
        {
            StringBuilder sb = new StringBuilder();


            DataTable dtGh = new BusiItemManage_GHYS().QueryData(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtGh, "规划预算基本信息", NotNullFormat));

            DataTable dtGhdw = new BusiItemManage().QueryXmdw(itemCode, ItemCompanyType.GH);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtGhdw, "规划设计单位", NotNullFormat));

            condition.Clear();
            condition.Add("NAME", "规划设计单位-单位名称");
            condition.Add("CODE", "规划设计单位-机构代码");
            condition.Add("LINKPHONE", "规划设计单位-联系电话");
            condition.Add("LINKMAN", "规划设计单位-联系人员");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtGhdw, condition, NotNullFormat));

            AppendErrorMessage(sb, GcxxValidation(itemCode, ItemStage.GuiHua, 1));

            AppendErrorMessage(sb, MoneyValidation(itemCode, "项目预算", WorkFlowNode.GHSJYS, 1));

            AppendErrorMessage(sb, FileValidation(workflowId, itemCode, WorkFlowNode.GHSJYS, null));

            return(sb.ToString());
        }
        /// <summary>
        /// 验证工程监理信息。
        /// </summary>
        /// <param name="workflowId">流程Id。</param>
        /// <param name="itemCode">项目编号。</param>
        /// <returns>错误信息。</returns>
        public string ValidationJl(string workflowId, string itemCode)
        {
            StringBuilder sb = new StringBuilder();

            //验证监理单位。
            DataTable dtJldw = new BusiItemManage().QueryXmdw(itemCode, ItemCompanyType.JL);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtJldw, "工程监理-监理单位", NotNullFormat));
            condition.Clear();
            condition.Add("NAME", "工程监理信息-监理单位-机构名称");
            condition.Add("CODE", "工程监理信息-监理单位-机构代码");
            condition.Add("LINKPHONE", "工程监理信息-监理单位-联系电话");
            condition.Add("LINKMAN", "工程监理信息-监理单位-联系人员");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtJldw, condition, NotNullFormat));

            //验证监理人员。
            DataTable dtJlry = new BusiItemManage_SS().QueryGcjlJlry(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtJlry, "工程监理-监理人员", NotNullFormat));

            //验证监理合同。
            DataTable dtJlht = new BusiItemManage_SS().QueryGcjlJlht(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtJlht, "工程监理-监理合同", NotNullFormat));

            return(sb.ToString());
        }
        protected string GcxxValidation(string itemCode, ItemStage stage, int xh)
        {
            Xm_Gcxx       gcInfo = new BusiItemManage().GetItemGcxx(itemCode, stage, xh.ToString());
            StringBuilder sb     = new StringBuilder();

            if (gcInfo == null)
            {
                sb.AppendLine(string.Format(NotNullFormat, "项目规模"));
                sb.AppendLine(string.Format(NotNullFormat, "成效信息"));
                sb.AppendLine(string.Format(NotNullFormat, "工程量信息"));
            }
            else
            {
                bool gmFlag  = true;
                bool cxFlag  = true;
                bool gclFlag = true;
                foreach (PropertyInfo pi in gcInfo.GetType().GetProperties())
                {
                    if (pi.Name.ToLower().StartsWith("gm"))
                    {
                        if (!string.IsNullOrEmpty(pi.GetValue(gcInfo, null).ToString()))
                        {
                            gmFlag = false;
                        }
                    }
                    if (pi.Name.ToLower().StartsWith("cx"))
                    {
                        if (!string.IsNullOrEmpty(pi.GetValue(gcInfo, null).ToString()))
                        {
                            cxFlag = false;
                        }
                    }
                    if (pi.Name.ToLower().StartsWith("gc"))
                    {
                        if (!string.IsNullOrEmpty(pi.GetValue(gcInfo, null).ToString()))
                        {
                            gclFlag = false;
                        }
                    }
                }
                if (gmFlag)
                {
                    sb.AppendLine(string.Format(NotNullFormat, "项目规模"));
                }
                if (cxFlag)
                {
                    sb.AppendLine(string.Format(NotNullFormat, "成效信息"));
                }
                if (gclFlag)
                {
                    sb.AppendLine(string.Format(NotNullFormat, "工程量信息"));
                }
            }
            return(sb.ToString());
        }
        public string ValidationCddw(string itemCode)
        {
            StringBuilder sb = new StringBuilder();

            //验证承担单位是否填写。
            DataTable dtCddw = new BusiItemManage().QueryXmdw(itemCode, ItemCompanyType.CD);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtCddw, "承担单位信息", NotNullFormat));

            return(sb.ToString());
        }
Exemple #7
0
        public override string Validation(string workflowId, string itemCode, WfResult wfResult)
        {
            StringBuilder sb = new StringBuilder();

            DataTable dtKy = new BusiItemManage_KY().QueryData(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtKy, "可研基本信息", NotNullFormat));
            condition.Clear();
            condition.Add("ITEMNAME", "项目名称");
            condition.Add("XMLX", "项目类型");
            condition.Add("ZJND", "新增费使用年度");
            condition.Add("JSGQ", "建设工期");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtKy, condition, NotNullFormat));

            DataTable dtGis = new BusiItemManage_Gis().QueryData(itemCode, (int)ItemStage.KeYan, 1);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtGis, "Gis基本信息", NotNullFormat));

            condition.Clear();
            condition.Add("ADDRESS", "项目区行政位置");
            condition.Add("QSJD", "大地坐标-起始经度");
            condition.Add("JZJD", "大地坐标-截止经度");
            condition.Add("QSWD", "大地坐标-起始纬度");
            condition.Add("JZWD", "大地坐标-截止纬度");
            condition.Add("GM", "项目建设规模");
            condition.Add("XZGDMJ", "新增耕地面积");
            condition.Add("MONEY", "资金估算");


            condition.Add("TFTBH", "图幅号(图斑号)");
            condition.Add("DLMJ", "地类");
            condition.Add("QSXZMJ", "权属情况");

            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtGis, condition, NotNullFormat));


            DataTable dtKydw = new BusiItemManage().QueryXmdw(itemCode, ItemCompanyType.KY);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtKydw, "可研编制单位", NotNullFormat));
            condition.Clear();
            condition.Add("NAME", "可研编制单位-单位名称");
            condition.Add("CODE", "可研编制单位-机构代码");
            condition.Add("LINKPHONE", "可研编制单位-联系电话");
            condition.Add("LINKMAN", "可研编制单位-联系人员");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtKydw, condition, NotNullFormat));

            AppendErrorMessage(sb, FileValidation(workflowId, itemCode, WorkFlowNode.KY, null));
            return(sb.ToString());
        }
        /// <summary>
        /// 验证招投标。
        /// </summary>
        /// <param name="workflowId">流程Id。</param>
        /// <param name="itemCode">项目编号。</param>
        /// <param name="validationFile">是否验证文件。</param>
        /// <returns>错误信息。</returns>
        public string ValidationZtb(string workflowId, string itemCode, bool validationFile)
        {
            StringBuilder sb = new StringBuilder();

            //验证招投标信息。
            DataTable dtZtb = new BusiItemManage_SS().QueryZtbData(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtZtb, "招投标信息-基本信息", NotNullFormat));
            condition.Clear();
            condition.Add("KBSJ", "招投标信息-开标时间");
            condition.Add("GGSJ", "招投标信息-公告时间");
            condition.Add("KGSJ", "工程进度跟踪-开工时间");
            condition.Add("JGSJ", "工程进度跟踪-完工时间");
            condition.Add("ZBRY", "招投标信息-基本信息-招标人员");
            condition.Add("JBRY", "招投标信息-基本信息-监标人员");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtZtb, condition, NotNullFormat));

            if (validationFile)
            {
                //验证需要的文件是否都已经上传。
                List <string> fileCodes = new List <string>();
                fileCodes.Add(((int)FileCode.标书).ToString());
                fileCodes.Add(((int)FileCode.招标公告).ToString());
                AppendErrorMessage(sb, FileValidation(workflowId, itemCode, WorkFlowNode.ShiShi, fileCodes));
            }

            //验证招标代理机构。
            DataTable dtZbdljg = new BusiItemManage().QueryXmdw(itemCode, ItemCompanyType.ZB);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtZbdljg, "招投标信息-招标代理机构", NotNullFormat));
            condition.Clear();
            condition.Add("NAME", "招投标信息-招标代理机构-机构名称");
            condition.Add("CODE", "招投标信息-招标代理机构-机构代码");
            condition.Add("LINKPHONE", "招投标信息-招标代理机构-联系电话");
            condition.Add("LINKMAN", "招投标信息-招标代理机构-联系人员");
            AppendErrorMessage(sb, dtOperation.ColumnNullCheck(dtZbdljg, condition, NotNullFormat));

            //验证中标情况。
            DataTable dtZbqk = new BusiItemManage_SS().QueryZtbZbqk(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtZbqk, "招投标信息-中标情况", NotNullFormat));

            //验证施工合同。
            DataTable dtSght = new BusiItemManage_SS().QueryZtbSght(itemCode);

            AppendErrorMessage(sb, dtOperation.RowNullCheck(dtSght, "招投标信息-施工合同", NotNullFormat));

            return(sb.ToString());
        }