public string Add(int villageid, int room, int hall, int toilet, double minprice, double minarea, int layer,
                          int totallayer, short nature, short directions, short fitment, string villagename, string address, string titles,
                          string smallpath, short imgcount, string shangquan, string county, string remark,
                          string imgs1, short isdel, int sourcefrom, string linkman, string tel, string buildid, string roomid)
        {
            //if (string.IsNullOrEmpty(imgs1))
            //{
            //    return JsonConvert.SerializeObject(new repmsg
            //    {
            //        state = 0,
            //        msg = "请上传房源图片"
            //    });
            //}
            int    userid   = User.userid;
            string addip    = Utils.GetRealIP();
            int    _hid     = 0;
            string keywords = User.keywords;

            //string titless = Common.Utils.replace1(titles, keywords);
            //string remarks = Common.Utils.replace1(remark, keywords);

            using (shhouseEntities ent = new shhouseEntities())
            {
                try
                {
                    ObjectParameter houseid = new ObjectParameter("houseid", typeof(int));
                    ObjectParameter state   = new ObjectParameter("state", typeof(int));
                    ObjectParameter msg     = new ObjectParameter("msg", typeof(string));


                    int i = ent.House_Sale_Add_GR2018(userid, villageid, room, hall, toilet, minprice, minarea, layer, totallayer, nature,
                                                      directions, fitment, villagename, address, titles, smallpath, imgcount,
                                                      shangquan, county, remark, imgs1, addip, isdel, linkman, tel, buildid, roomid,
                                                      sourcefrom, houseid, state, msg);
                    int _state = (int)state.Value;
                    if (_state == 1)
                    {
                        _hid = Convert.ToInt32(houseid.Value);
                        return(JsonConvert.SerializeObject(new repmsg
                        {
                            state = _state,
                            msg = (string)msg.Value,
                            data = (int)houseid.Value
                        }));
                    }
                    else
                    {
                        return(JsonConvert.SerializeObject(new repmsg
                        {
                            state = _state,
                            msg = (string)msg.Value
                        }));
                    }

                    //List<string> imgs = new List<string>();
                    //imgs.AddRange(imgs1.Split(','));
                    //imgs.AddRange(imgs2.Split(','));
                    //房源发布后,去掉oss超时设置
                    //OssHelper.modifymeta(imgs);
                }
                catch (Exception e)
                {
                    return(JsonConvert.SerializeObject(new repmsg
                    {
                        state = 0,
                        msg = "发布失败,请稍后再试"
                    }));
                }
            }
        }