private string SaveUplodStream(Stream inputStream)
        {
            RepaymentController rc = new RepaymentController();
            JsonResult          jr = new JsonResult();

            OThinker.H3.Controllers.Controllers.ProcessModel.BizObjectSchemaPropertyController property = new OThinker.H3.Controllers.Controllers.ProcessModel.BizObjectSchemaPropertyController();
            DataTable dt = OThinker.H3.Controllers.Controllers.Common.ExcelToDataTable(inputStream);

            List <string> ret   = new List <string>();
            List <string> cfcjh = new List <string>();


            string cf = string.Empty;

            for (int i = dt.Rows.Count - 1; i >= 0; i--)
            {
                string lscjh = dt.Rows[i]["临时车架号"].ToString().Trim();
                string yjcjh = dt.Rows[i]["永久车架号"].ToString().Trim();

                int k = 0;
                // 文档本身车架号是否重复
                for (int j = dt.Rows.Count - 1; j >= 0; j--)
                {
                    if (yjcjh == dt.Rows[j]["永久车架号"].ToString().Trim())
                    {
                        k = k + 1;
                    }
                }
                if (k == 1)
                {
                    ret.Add(lscjh + ";" + yjcjh);
                }
                else
                {
                    cf = cf + yjcjh + ";"; //如果for循环存在重复,就把新旧车架号添加起来
                }
            }
            List <string> cjh = new List <string>();

            foreach (string item in ret)
            {
                string yj = item.Split(';')[1];

                // 验证车架号是否重复 通过数据库
                //rc.CfuCJH();
                string sql   = string.Format(@"select count(1) count from IN_WFS.V_LOAN_STOCK_LIST where VIN_NO = '{0}' ", yj);
                int    count = ExecuteCountSql(dataCode, sql);
                if (count > 0 || string.IsNullOrEmpty(yj) || yj.Length != 17)
                {
                    cf = cf + yj + ";";
                }
                else
                {
                    cjh.Add(item);
                }
            }
            rc.UpdateCJH(cjh.ToArray());//修改车架号成功,车架号添加到新的数组

            return(cf);
        }
        private List <object> SaveUplodStream(Stream inputStream, string schemaCode)
        {
            OThinker.H3.Controllers.Controllers.ProcessModel.BizObjectSchemaPropertyController property = new OThinker.H3.Controllers.Controllers.ProcessModel.BizObjectSchemaPropertyController();
            HttpHelper http = new HttpHelper();

            DataTable     dt  = OThinker.H3.Controllers.Controllers.Common.ExcelToDataTable(inputStream);
            List <object> ret = new List <object>();

            foreach (DataRow row in dt.Rows)
            {
                var paraData = new
                {
                    SchemaCode     = schemaCode,
                    PropertyName   = GetFieldCode(row[0] + string.Empty, row[1] + string.Empty),
                    DisplayName    = row[2] + string.Empty,
                    LogicType      = GetFieldType(row[3] + string.Empty),
                    VirtualField   = (row[5] + string.Empty) == "true" ? true : false,
                    RecordTrail    = (row[6] + string.Empty) == "true" ? true : false,
                    Indexed        = (row[7] + string.Empty) == "true" ? true : false,
                    Searchable     = (row[8] + string.Empty) == "true" ? true : false,
                    DefaultValue   = row[4] + string.Empty,
                    Formula        = "",
                    Global         = "",
                    IsPublished    = false,                                                            //发布了的字段这里是true
                    Property       = "",                                                               //发布了的字段这里对应自身字段编码
                    ParentProperty = GetParentFieldCode(row[0] + string.Empty, row[1] + string.Empty), //主表:创建为空,修改为\自已的编辑;子表中的字段:为子表的编码
                    ObjectID       = ""
                };
                ret.Add(paraData);
                //var result = property.SaveBizObjectSchemaProperty(paraData);
                //var result = http.PostWebRequest("http://" + Request.Url.Authority + "/Portal/BizObjectSchemaProperty/SaveBizObjectSchemaProperty", Newtonsoft.Json.JsonConvert.SerializeObject(paraData));
            }
            //msg.Add(new ImportError { Seq = 1, Error = dt.Rows.Count.ToString() });
            return(ret);
        }