public ActionResult ReassTask(int uploadfileid, int bankproid, int bankid, int tasktype = 0)
        {
            JObject _obj = new JObject();

            _obj.Add("Title", (tasktype == 0) ? "押品拆分" : "押品复估");
            _obj.Add("Status", 0);
            _obj.Add("Count", 0);
            _obj.Add("BankId", bankid);
            _obj.Add("OpeaterId", 1);
            _obj.Add("CreateDateTime", DateTime.Now.ToString());
            if (tasktype == 1)
            {
                _obj.Add("Url1", GetAppSettingValue("ReassUrl1"));
                _obj.Add("Url2", GetAppSettingValue("ReassUrl2"));
            }
            _obj.Add("Url3", GetAppSettingValue("ReassUrl3"));
            _obj.Add("UploadFileId", uploadfileid);
            _obj.Add("BankProjectId", bankproid);
            _obj.Add("UserId", Public.LoginInfo.Id);
            _obj.Add("TaskType", tasktype);
            JObject sendobj = new JObject();

            sendobj.Add("task", Utils.Serialize(_obj));

            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "C", _DATAAddTask, Utils.Serialize(sendobj));
                return(Json(result));
            }
        }
        public ActionResult RiskAnalysis(int type)
        {
            JObject _jobj = new JObject();

            _jobj.Add("pId", 0);
            _jobj.Add("cId", 0);
            _jobj.Add("aId", 0);
            _jobj.Add("cityarrid", CookieHelper.Get("cityarrid"));
            _jobj.Add("itemarrid", CookieHelper.Get("itemarrid"));
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "C", _DATAGetRiskAnalysis, Utils.Serialize(_jobj));
                if (type.Equals(0))
                {
                    return(Json(result));
                }
                else
                {
                    string[]    array = getDownFile(string.Format("{0}.xls", DateTime.Now.ToString("yyyyMMddffffff")));
                    ExcelHelper excel = new ExcelHelper(array[1]);
                    bool        flag  = excel.WorkbookStepAstrideColumnWrite(array[0], Utils
                                                                             .Deserialize <List <JObject> >(Utils.GetJObjectValue(result, "data")));
                    if (flag)
                    {
                        return(Json(new { path = Utils.GetDateTime("yyyy-MM-dd"), name = array[1] }));
                    }
                    else
                    {
                        return(Json(""));
                    }
                }
            }
        }
Exemplo n.º 3
0
        //押品资产价值动态监测-押品分类统计导出
        public ActionResult AssetsCFCountAllDown(string requirement, string start, string end, string requirename)
        {
            string[]       array        = getDownFile(string.Format("{0}.xls", DateTime.Now.ToString("yyyyMMddffffff")));
            List <JObject> _listData    = new List <JObject>();
            List <JObject> _explistData = new List <JObject>();

            using (FxtAPIClient client = new FxtAPIClient())
            {
                string  data = string.Empty;
                JObject obj  = new JObject();
                obj.Add("pId", 0);
                obj.Add("cId", 0);
                obj.Add("aId", 0);
                obj.Add("requirement", requirement);
                obj.Add("start", start);
                obj.Add("end", end);
                obj.Add("type", 1);
                obj.Add("cityarrid", CookieHelper.Get("cityarrid"));
                obj.Add("itemarrid", CookieHelper.Get("itemarrid"));
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "C", _GetCollateralClassification, Utils.Serialize(obj));
                _listData = Utils.Deserialize <List <JObject> >(Utils.GetJObjectValue(result, "data"));
                Dictionary <string, string> selecttypeDic = new Dictionary <string, string>();
                selecttypeDic.Add(requirename, "name");
                selecttypeDic.Add("押品数量", "count");
                selecttypeDic.Add("押品面积", "buildingarea");
                selecttypeDic.Add("原估价值", "oldrate");
                selecttypeDic.Add("现估价值", "rate");
                selecttypeDic.Add("担保金额", "guaranteeprice");
                selecttypeDic.Add("原平均抵押率", "oldavergerates");
                selecttypeDic.Add("现平均抵押率", "avergerates");
                if (_listData != null && _listData.Count > 0)
                {
                    foreach (JObject objitem in _listData)
                    {
                        obj = new JObject();
                        foreach (string seitem in selecttypeDic.Keys)
                        {
                            obj[seitem] = "";
                            if (selecttypeDic.ContainsKey(seitem))
                            {
                                obj[seitem] = objitem[selecttypeDic[seitem]];
                            }
                        }
                        _explistData.Add(obj);
                    }
                }
                data = Utils.Serialize(_explistData);
                ExcelHelper excel = new ExcelHelper(array[1]);
                bool        flag  = excel.WorkbookWrite(array[0], Utils.Deserialize <List <JObject> >(data));
                if (flag)
                {
                    return(Json(new { path = Utils.GetDateTime("yyyy-MM-dd"), name = array[1] }));
                }
                else
                {
                    return(Json(""));
                }
            }
        }
Exemplo n.º 4
0
 //保存文件到服务器
 object fileServerSave(string path, string filename, HttpPostedFileBase file
                       , int proid, int bankselid)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         string        filetype   = Path.GetExtension(file.FileName);
         SysUploadFile uploadFile = new SysUploadFile()
         {
             UserId    = "ddd",
             FilePath  = filename,
             FileType  = filetype,
             FileSize  = file.ContentLength,
             Name      = file.FileName.Replace(filetype, ""),
             Count     = new ExcelHelper(Path.Combine(path, filename)).GetExcelCount(),
             BankProid = proid,
             BankId    = bankselid
         };
         JObject obj = new JObject();
         obj.Add("model", Serialize(uploadFile));
         obj.Add("otype", "C");
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "C", _Uploads, Utils.Serialize(obj)).ToString();
     }
     return(new
     {
         type = result,
         message = file.FileName
     });
 }
Exemplo n.º 5
0
 public ActionResult GetCollateral(int pageIndex, int pageSize, string orderName, string orderType
                                   , int uploadfileid = 0)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject _obj = new JObject();
         _obj.Add("pageSize", pageSize);
         _obj.Add("pageIndex", pageIndex);
         _obj.Add("orderProperty", orderName);
         _obj.Add("orderType", orderType);
         _obj.Add("cityarrid", CookieHelper.Get("cityarrid"));
         _obj.Add("itemarrid", CookieHelper.Get("itemarrid"));
         _obj.Add("uploadfileid", uploadfileid);
         _obj.Add("customerid", Public.LoginInfo.CustomerId);
         _obj.Add("customertype", Public.LoginInfo.CustomerType);
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "C",
                                  _DATAGetDataCollateral, Utils.Serialize(_obj));
         List <DataCollaterals> listC = Utils.Deserialize <List <DataCollaterals> >(Utils.GetJObjectValue(result, "data"));
         if (listC != null)
         {
             return(Json(ResultServerJson(Utils.Serialize(GetDataCollaterals(listC)))));
         }
         return(Json(result));
     }
 }
Exemplo n.º 6
0
        //用户登录
        public ActionResult UserLogin(string userName, string userPwd)
        {
            JObject jobject = new JObject();

            jobject.Add("userName", userName);
            jobject.Add("userPwd", EncryptHelper.TextToPassword(userPwd));
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _UserLogin, Utils.Serialize(jobject));
                UserInfo myuser = Utils.Deserialize <UserInfo>(Utils.GetJObjectValue(result, "data"));
                if (myuser != null && myuser.Id > 0) //登录成功,用户信息保存至session
                {
                    SessionHelper.Add("UserId", myuser.Id);
                    SessionHelper.Add("UserName", myuser.UserName);
                    SessionHelper.Add("TrueName", myuser.TrueName);
                    SessionHelper.Add("FxtCompanyId", myuser.FxtCompanyId);
                    SessionHelper.Add("CustomerId", myuser.CustomerId);
                    SessionHelper.Add("EmailStr", myuser.EmailStr);
                    SessionHelper.Add("Mobile", myuser.Mobile);
                    SessionHelper.Add("CustomerName", myuser.CustomerName);
                    SessionHelper.Add("CustomerType", myuser.CustomerType);
                }
                return(Json(result));
            }
        }
Exemplo n.º 7
0
 //明细查询
 public ActionResult GetCollDetials(string wuyetype, string jianzhutype, string niandaitype,
                                    string daikuantype, string mianjitype, string nianlingtype,
                                    int projectid, int companyid, string start, string end,
                                    int pageIndex, int pageSize)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("pId", 0);
         obj.Add("cId", 0);
         obj.Add("aId", 0);
         obj.Add("houseType", wuyetype);
         obj.Add("buildingType", jianzhutype);
         obj.Add("buildingDate", niandaitype);
         obj.Add("loanAmount", daikuantype);
         obj.Add("buildingArea", mianjitype);
         obj.Add("age", nianlingtype);
         obj.Add("projectid", projectid);
         obj.Add("companyid", companyid);
         obj.Add("start", start);
         obj.Add("end", end);
         obj.Add("pageIndex", pageIndex);
         obj.Add("pageSize", pageSize);
         obj.Add("cityarrid", CookieHelper.Get("cityarrid"));
         obj.Add("itemarrid", CookieHelper.Get("itemarrid"));
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "C", _GetDetials, Utils.Serialize(obj))));
     }
 }
Exemplo n.º 8
0
 //获得银行列表
 public ActionResult GetBankCompany()
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "D", _GetPriviCompanyAllBank, "");
         return(Json(result));
     }
 }
Exemplo n.º 9
0
 public ActionResult Province()
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "D", _GetProvince, "");
         return(Json(result));
     }
 }
Exemplo n.º 10
0
 //获取文件项目列表
 public ActionResult GetAppointCity()
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("customerId", Public.LoginInfo.CustomerId);
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "C", _GetAppointCity, Utils.Serialize(obj)).ToString().ToLower()));
     }
 }
Exemplo n.º 11
0
 public ActionResult GetCodeByCode(int code)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("code", code);
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "D", _GetSYSCodeByCode, Utils.Serialize(obj))));
     }
 }
Exemplo n.º 12
0
 public ActionResult CreateDATAHouse(DataHouse data)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject _obj = new JObject();
         _obj.Add("dataHouse", Utils.Serialize(data));
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "C", _DATAHouseAdd, Utils.Serialize(_obj));
         return(Json(ResultServerJson(result.ToString())));
     }
 }
Exemplo n.º 13
0
 public ActionResult Area(int id)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject _obj = new JObject();
         _obj.Add("cityId", id);
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "D", _GetArea, Utils.Serialize(_obj));
         return(Json(result));
     }
 }
Exemplo n.º 14
0
 public ActionResult UpdateDATCollateral(DataCollateral data)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject _obj = new JObject();
         _obj.Add("dataCollateral", Utils.Serialize(data));
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "C",
                                  _DATADataCollateralUpdate, Utils.Serialize(_obj));
         return(Json(ResultServerJson(result.ToString())));
     }
 }
Exemplo n.º 15
0
 public ActionResult ProjectPurposeCode()
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "D", _GetAllProjectPurposeCode, "");
         JObject jobject = new JObject();
         jobject.Add(new JProperty("data", result));
         return(Json(ResultServerJson(Utils.Serialize(jobject))));
     }
 }
Exemplo n.º 16
0
 public ActionResult GetFileCollateralCount(int fileId)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject _jobject = new JObject();
         _jobject.Add("fileId", fileId);
         result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                  "C", "GetCountCollateralByFileId", Serialize(_jobject));
         return(Json(result));
     }
 }
Exemplo n.º 17
0
 //修改任务状态
 public ActionResult EditTaskStatus(int id, int status)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("status", status);
         obj.Add("id", id);
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "C", _EditTaskStatus, Utils.Serialize(obj)).ToString().ToLower()));
     }
 }
Exemplo n.º 18
0
 public ActionResult CompanySearch(int cityid, string q)
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("cId", cityid);
         obj.Add("name", q);
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "C", _GetCompanyByDataCollateral, Utils.Serialize(obj))));
     }
 }
Exemplo n.º 19
0
        public ActionResult DeleteActiveCustomer(int customerId, int valid)
        {
            JObject jobject = new JObject();

            jobject.Add("customerId", customerId);
            jobject.Add("valid", valid);
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _DeleteActiveCustomer, Serialize(jobject));
                return(Json(result));
            }
        }
Exemplo n.º 20
0
 public FxtAPIClientExtend(FxtAPIClientExtend fxtApi = null)
 {
     if (fxtApi == null)
     {
         this.FxtApi      = new FxtAPIClient();
         this.ExistParent = false;
     }
     else
     {
         this.FxtApi      = fxtApi.FxtApi;
         this.ExistParent = true;
     }
 }
Exemplo n.º 21
0
        public ActionResult ModifyPass(string oldUserPwd, string userPwd)
        {
            JObject jobject = new JObject();

            jobject.Add("id", Public.LoginInfo.Id);//登录用户ID
            jobject.Add("oldUserPwd", EncryptHelper.TextToPassword(oldUserPwd));
            jobject.Add("userPwd", EncryptHelper.TextToPassword(userPwd));
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _ModifyPassword, Serialize(jobject));
                return(Json(result));
            }
        }
Exemplo n.º 22
0
        public ActionResult CheckUserName(int id, string userName)
        {
            JObject jobject = new JObject();

            jobject.Add("id", id);
            jobject.Add("userName", userName);
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _CheckUserName, Serialize(jobject));
                return(Json(Utils.Deserialize <int>(Utils.GetJObjectValue(result, "type")) == 1));//验证字符,需要返回true/false
                //return Json(result);
            }
        }
Exemplo n.º 23
0
        public ActionResult ExcelAllDown()
        {
            string[] array   = getDownFile(string.Format("{0}.xls", DateTime.Now.ToString("yyyyMMddffffff")));
            JObject  jobject = new JObject();

            jobject.Add("cityarrid", CookieHelper.Get("cityarrid"));
            jobject.Add("itemarrid", CookieHelper.Get("itemarrid"));
            List <JObject> _listData = new List <JObject>();

            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "C", _DATAGetAllDataCollateral, Utils.Serialize(jobject));
                string data = string.Empty;
                List <CollateralMonitorDetails> listCMDCollateral =
                    Utils.Deserialize <List <CollateralMonitorDetails> >(Utils.GetJObjectValue(result, "data"));
                foreach (var item in listCMDCollateral)
                {
                    jobject = new JObject();
                    jobject.Add("项目名称", item.BankProjectName);
                    jobject.Add("押品编号", item.Number);
                    jobject.Add("分行", item.Branch);
                    jobject.Add("押品类型", item.PurposeName);
                    jobject.Add("押品名称", item.Name);
                    jobject.Add("面积", item.BuildingArea);
                    jobject.Add("押品地址", item.Address);
                    jobject.Add("省份", item.ProvinceName);
                    jobject.Add("城市", item.CityName);
                    jobject.Add("行政区", item.AreaName);
                    jobject.Add("路", item.Road);
                    jobject.Add("号", item.RoadNumber);
                    jobject.Add("楼盘名", item.ProjectName);
                    jobject.Add("分期", item.Installment);
                    jobject.Add("楼栋", item.BuildingNumber);
                    jobject.Add("楼层", item.FloorNumber);
                    jobject.Add("房号", item.RoomNumber);
                    _listData.Add(jobject);
                }

                ExcelHelper excel = new ExcelHelper(array[1]);
                bool        flag  = excel.WorkbookWrite(array[0], _listData);
                if (flag)
                {
                    return(Json(new { path = Utils.GetDateTime("yyyy-MM-dd"), name = array[1] }));
                }
                else
                {
                    return(Json(""));
                }
            }
        }
Exemplo n.º 24
0
        public ActionResult AddEditCustomer(SysCustomer data)
        {
            JObject jobject = new JObject();

            data.Valid        = 1;
            data.CreateDate   = DateTime.Now;
            data.CreateUserId = Public.LoginInfo.Id;
            jobject.Add("dataCustomer", Utils.Serialize(data));
            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _AddEditCustomer, Serialize(jobject));
                return(Json(result));
            }
        }
Exemplo n.º 25
0
        public ActionResult CheckCustomerName(int customerId, string customerName, int fxtCompanyId)
        {
            JObject jobject = new JObject();

            jobject.Add("customerId", customerId);
            jobject.Add("customerName", customerName);
            jobject.Add("fxtCompanyId", fxtCompanyId);

            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "A", _CheckCustomerName, Utils.Serialize(jobject));
                return(Json(Utils.Deserialize <int>(Utils.GetJObjectValue(result, "type")) == 1));//验证字符,需要返回true/false
            }
        }
Exemplo n.º 26
0
        public ActionResult SearchHouse(string q, int cityId, int bId)
        {
            using (FxtAPIClient client = new FxtAPIClient())
            {
                JObject _obj = new JObject();
                _obj.Add("cId", cityId);
                _obj.Add("bId", bId);
                _obj.Add("hName", q);
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "D", _GetHouseByBuildingIdCityIDAndLikeHouseName, Utils.Serialize(_obj));

                return(Json(result.ToString()));
            }
        }
Exemplo n.º 27
0
        public ActionResult Search(string q, int cityId, int areaId)
        {
            using (FxtAPIClient client = new FxtAPIClient())
            {
                JObject _obj = new JObject();
                _obj.Add("cId", cityId);
                _obj.Add("aId", areaId);
                _obj.Add("pName", q);
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "D", _GetProjectByCityIDAndLikePrjName, Utils.Serialize(_obj));

                return(Json(result.ToString()));
            }
        }
        public ActionResult GetReassessmentMonthNumber(int month, int number)
        {
            JObject _obj = new JObject();

            _obj.Add("id", number);
            _obj.Add("nMonths", month);

            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                         "C", _DATAGetReassessment, Utils.Serialize(_obj));
                return(Json(result));
            }
        }
Exemplo n.º 29
0
        public ActionResult SetCutsomColumnVal(int cid, int type, string data)
        {
            JObject _obj = new JObject();

            _obj.Add("data", data);
            _obj.Add("cid", cid);
            _obj.Add("type", type);

            using (FxtAPIClient client = new FxtAPIClient())
            {
                result = client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey), "C",
                                         _DATUpdateCustomColumnsValue, Utils.Serialize(_obj));
                return(Json(result));
            }
        }
Exemplo n.º 30
0
 //获取任务日志列表
 public ActionResult GetTaskLogList(int pageIndex = 0, int pageSize = 0
                                    , int taskid  = 0, string key   = "")
 {
     using (FxtAPIClient client = new FxtAPIClient())
     {
         JObject obj = new JObject();
         obj.Add("pageIndex", pageIndex);
         obj.Add("pageSize", pageSize);
         obj.Add("taskid", taskid);
         obj.Add("key", key);
         obj.Add("orderProperty", "  id desc ");
         return(Json(client.Entrance(Utils.CommonKey, Utils.GetWcfCode(Utils.CommonKey),
                                     "C", _GetTaskLogList, Utils.Serialize(obj)).ToString().ToLower()));
     }
 }