Exemplo n.º 1
0
        /// <summary>
        /// 获取要复估的押品列表
        /// </summary>
        /// <param name="id">文件ID</param>
        /// <returns></returns>
        public ResultData GetDataCollateral(string id)
        {
            MSSQLADODAL mssqlado = new MSSQLADODAL(Utility.DBFxtLoan);
            string      sql      = string.Format("{0} [Status]=1 and UploadFileId={1}",
                                                 Utility.GetMSSQL_SQL(typeof(DataCollateral), Utility.loan_Data_Collateral), id);

            List <DataCollateral> list = mssqlado.GetList <DataCollateral>(sql);

            if (list.Count() > 0)
            {
                return(Utility.GetObjJson(1, "成功", list));
            }
            return(Utility.GetObjJson(0, ""));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取任务列表
        /// </summary>
        /// <returns></returns>
        public ResultData TaskList()
        {
            MSSQLADODAL mssqlado = new MSSQLADODAL(Utility.DBFxtLoan);
            //获取状态为开始、暂停的任务
            string sql = string.Format("{0} [Status]=0 or [Status]=2",
                                       Utility.GetMSSQL_SQL(typeof(SysTask), Utility.loand_Sys_Task));
            List <TaskToFile> list = mssqlado.GetList <TaskToFile>(sql);

            foreach (var item in list)
            {
                MSSQLADODAL.SetConnection(Utility.DBFxtLoan);
                //文件地址
                SysUploadFile sysUploadFile = CAS.DataAccess.DA.BaseDA
                                              .ExecuteToEntityByPrimaryKey <SysUploadFile>(item.UploadFileId);
                item.FileUrl = sysUploadFile != null ? sysUploadFile.FilePath : "";

                //银行所属项目名称
                SysBankProject sysBankProject = CAS.DataAccess.DA.BaseDA
                                                .ExecuteToEntityByPrimaryKey <SysBankProject>(item.BankProjectId);
                item.BankProjectName = sysBankProject != null ? sysBankProject.ProjectName : "";

                //任务所属用户名称
                SysUser sysUser = CAS.DataAccess.DA.BaseDA
                                  .ExecuteToEntityByPrimaryKey <SysUser>(item.UserId);
                item.UserName = sysUser != null ? sysUser.TrueName : "";

                //公司、银行、评估机构
                SysCustomer sysCustomer = CAS.DataAccess.DA.BaseDA
                                          .ExecuteToEntityByPrimaryKey <SysCustomer>(item.BankId);
                item.BankName = sysCustomer != null ? sysCustomer.CustomerName : "";
            }
            if (list.Count > 0)
            {
                return(Utility.GetObjJson(1, "成功", list));
            }
            return(Utility.GetObjJson(0, ""));
        }