| | |
| | | LogHelper.Write(Level.Error, "获取政策列表数据 GetSubsidyDataListAPi查询", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | } |
| | | } |
| | | int totalCount = _sub.GetSubsidyDataCount(Keyword, City, Region); |
| | | int totalCount = _sub.GetSubsidyDataCount(Keyword, City, City+Region); |
| | | int totalPage = (int)Math.Ceiling((double)totalCount / PageSize); |
| | | List<SubsidyDataPage> totalData = _sub.GetSubsidyDataList(PageNumber, PageSize, Keyword, City, Region); |
| | | return new PaginatedResult<SubsidyDataPage>(totalData, totalCount, totalPage); |
| | |
| | | { |
| | | using (IDbConnection connection = new MySqlConnection(connectionString)) |
| | | { |
| | | var sql = $"SELECT id,projecttitle,subsidyurl,policyrewards,projecttype,platform,startdate,deadline from subsidydata WHERE platform IN (SELECT department FROM departmentdata WHERE region IN ('{City}','{Region}')) "; |
| | | var sql = $"SELECT * FROM subsidydata WHERE (region ='国家级' or region = '{City}' or region = '{Region}') "; |
| | | if (!string.IsNullOrEmpty(Keyword)) |
| | | { |
| | | sql += $" and projecttitle like '%{Keyword.Trim()}%' "; |
| | |
| | | { |
| | | using (IDbConnection connection = new MySqlConnection(connectionString)) |
| | | { |
| | | var sql = $"SELECT COUNT(*) from subsidydata WHERE platform IN (SELECT department FROM departmentdata WHERE region IN ('{City}','{Region}')) "; |
| | | var sql = $"SELECT COUNT(*) from subsidydata WHERE (region ='国家级' or region = '{City}' or region = '{Region}') "; |
| | | if (!string.IsNullOrEmpty(Keyword)) |
| | | { |
| | | sql += $" and projecttitle like '%{Keyword.Trim()}%' "; |