| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | /** |
| | | * 添加类型 type = 1 平台 type=2 运营商 type=3门店 |
| | | */ |
| | | @TableField("insertType") |
| | | private Integer insertType; |
| | | /** |
| | | * 添加人id平台管理员id 运营商id |
| | | */ |
| | | @TableField("addUserId") |
| | | private Integer addUserId; |
| | | } |
| | |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.JsonMappingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.MalformedURLException; |
| | | import java.net.ProtocolException; |
| | | import java.net.URL; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private ISiteBookingService siteBookingService; |
| | | |
| | | |
| | | |
| | | @RequestMapping("/listAll") |
| | | @ResponseBody |
| | | public Object list(String spaceId,String type,String date,String cityCode){ |
| | | if(spaceId==null){ |
| | | spaceId=""; |
| | | } |
| | | if(type==null){ |
| | | type="y"; |
| | | } |
| | | if(date==null){ |
| | | date=""; |
| | | } |
| | | if(cityCode==null){ |
| | | cityCode=""; |
| | | } |
| | | String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/cityGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; |
| | | URL url1 = null; |
| | | try { |
| | | url1 = new URL(apiUrl1); |
| | | HttpURLConnection connection1 = (HttpURLConnection) url1.openConnection(); |
| | | connection1.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode1 = connection1.getResponseCode(); |
| | | if (responseCode1 == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader1 = new BufferedReader(new InputStreamReader(connection1.getInputStream())); |
| | | String line1; |
| | | StringBuilder response1 = new StringBuilder(); |
| | | while ((line1 = reader1.readLine()) != null) { |
| | | response1.append(line1); |
| | | } |
| | | reader1.close(); |
| | | // 处理响应数据 |
| | | String data1 = response1.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper1 = new ObjectMapper(); |
| | | CityGameOne res1 = objectMapper1.readValue(data1, CityGameOne.class); |
| | | List<CityGameDataOne> data2 = res1.getData(); |
| | | return data2; |
| | | } |
| | | } catch (ProtocolException e) { |
| | | e.printStackTrace(); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } catch (MalformedURLException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | /** |
| | | * 跳转到充值记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | try { |
| | | // 年度数据 |
| | | // 创建 HttpClient 实例 |
| | | HttpClient httpClient = HttpClients.createDefault(); |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/gameList"); |
| | | // 设置请求体数据 |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&sutu_id=1001"; |
| | | |
| | | StringEntity entity = new StringEntity(postData, ContentType.APPLICATION_FORM_URLENCODED); |
| | | httpPost.setEntity(entity); |
| | | // 执行请求 |
| | | HttpResponse response = httpClient.execute(httpPost); |
| | | // 处理响应 |
| | | HttpEntity responseEntity = response.getEntity(); |
| | | if (responseEntity != null) { |
| | | String responseData = EntityUtils.toString(responseEntity); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | GameList res = objectMapper.readValue(responseData, GameList.class); |
| | | List<GameListData> list = res.getData(); |
| | | model.addAttribute("games",list); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | List<String> strings = new ArrayList<>(); |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>()); |
| | | List<TSite> result = new ArrayList<>(); |
| | |
| | | model.addAttribute("sites",list); |
| | | return PREFIX + "GameData.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取激战球场统计 |
| | | */ |
| | |
| | | // 创建 POST 请求 |
| | | HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/getBatterData"); |
| | | // 设置请求体数据 |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&date_type=y"; |
| | | String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id="+""+"&date_type=y"; |
| | | |
| | | StringEntity entity = new StringEntity(postData, ContentType.APPLICATION_FORM_URLENCODED); |
| | | httpPost.setEntity(entity); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 获取SUTU智慧球门统计 |
| | | */ |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 获取SUTU智慧球门统计 |
| | | */ |
| | | @RequestMapping("/listSUTU1") |
| | | @ResponseBody |
| | | public Object listSUTU1() { |
| | | public Object listSUTU1(String gameId, String time, String spaceId, String cityCode) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=1&date_type=d&date=2021-02"; |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + "y" + "&date=" + "" + "&space_id=" + spaceId + "&city_code=" + cityCode; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | String data = response.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | SUTU res = objectMapper.readValue(data, SUTU.class); |
| | | SUTUOne res = objectMapper.readValue(data, SUTUOne.class); |
| | | // 场地总入场人数 |
| | | String totalNum = res.getData().getTotal_num(); |
| | | List<SUTUData> list = res.getData().getList(); |
| | | List<String> games = new ArrayList<>(); |
| | | for (SUTUData sutuData : list) { |
| | | games.add(sutuData.getGame_name()); |
| | | List<SUTUDataOne> list = res.getData().getList(); |
| | | List<String> years = new ArrayList<>(); |
| | | for (SUTUDataOne sutuDataOne : list) { |
| | | years.add(sutuDataOne.getDate()); |
| | | } |
| | | result.put("data1",list); |
| | | result.put("games",games); |
| | | result.put("years", years); |
| | | String monthUrl = ""; |
| | | // 月度 |
| | | if (!time.contains("-")) { |
| | | monthUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + "m" + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; |
| | | } else { |
| | | monthUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + "d" + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; |
| | | } |
| | | URL url1 = new URL(monthUrl); |
| | | HttpURLConnection connection1 = (HttpURLConnection) url1.openConnection(); |
| | | connection1.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode1 = connection1.getResponseCode(); |
| | | if (responseCode1 == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader1 = new BufferedReader(new InputStreamReader(connection1.getInputStream())); |
| | | String line1; |
| | | StringBuilder response1 = new StringBuilder(); |
| | | while ((line1 = reader1.readLine()) != null) { |
| | | response1.append(line1); |
| | | } |
| | | reader1.close(); |
| | | // 处理响应数据 |
| | | String data1 = response1.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper1 = new ObjectMapper(); |
| | | SUTUOne res1 = objectMapper1.readValue(data1, SUTUOne.class); |
| | | List<SUTUDataOne> list2 = res1.getData().getList(); |
| | | List<String> monthOrDays = new ArrayList<>(); |
| | | for (SUTUDataOne sutuDataOne : list2) { |
| | | monthOrDays.add(sutuDataOne.getDate()); |
| | | } |
| | | result.put("data2", list2); |
| | | result.put("monthOrDays", monthOrDays); |
| | | return result; |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | System.out.println("请求失败: " + responseCode1); |
| | | } |
| | | } |
| | | return result; |
| | | } catch (ProtocolException e) { |
| | | e.printStackTrace(); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } catch (MalformedURLException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取跨城赛统计 |
| | | */ |
| | | @RequestMapping("/cityGame") |
| | | @ResponseBody |
| | | public Object cityGame() { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/getCityGameCount"; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | | // 发送请求并获取响应 |
| | | int responseCode = connection.getResponseCode(); |
| | | if (responseCode == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
| | | String line; |
| | | StringBuilder response = new StringBuilder(); |
| | | while ((line = reader.readLine()) != null) { |
| | | response.append(line); |
| | | } |
| | | reader.close(); |
| | | // 处理响应数据 |
| | | String data = response.toString(); |
| | | // 使用Jackson库将JSON字符串转换为Java对象 |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | CityGame res = objectMapper.readValue(data, CityGame.class); |
| | | // 场地总入场人数 |
| | | String totalNum = ""; |
| | | for (CityGameData datum : res.getData()) { |
| | | totalNum = datum.getTotal_num(); |
| | | } |
| | | result.put("totalNum", totalNum); |
| | | |
| | | |
| | | return result; |
| | | } |
| | | } |
| | | catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | @RequestMapping("/addAppUser") |
| | | @ResponseBody |
| | | public Object addAppUser(@RequestBody TAppUser appUser){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | appUser.setInsertType(objectType); |
| | | appUser.setAddUserId(UserExt.getUser().getId()); |
| | | Object o = appUserClient.addAppUser1(appUser); |
| | | return o; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class CityGame { |
| | | private int code; |
| | | private String message; |
| | | private List<CityGameData> data; |
| | | private String nextUrl; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class CityGameData { |
| | | private String total_num; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class CityGameDataOne { |
| | | private int account_id; |
| | | private int score; |
| | | private String nickname; |
| | | private String avatar; |
| | | private String rank; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class CityGameOne { |
| | | private int code; |
| | | private String message; |
| | | private List<CityGameDataOne> data; |
| | | private String nextUrl; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class GameList { |
| | | private int code; |
| | | private String message; |
| | | private List<GameListData> data; |
| | | private String nextUrl; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取游戏列表 |
| | | */ |
| | | @Data |
| | | public class GameListData { |
| | | private int id; |
| | | private String name; |
| | | private String icon; |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class SUTUDataOne { |
| | | private String count; |
| | | private String date; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 获取激战球场接口数据 |
| | | */ |
| | | @Data |
| | | public class SUTUOne { |
| | | private int code; |
| | | private String message; |
| | | private SUTUOne.Data data; |
| | | private String nextUrl; |
| | | @lombok.Data |
| | | public static class Data { |
| | | private String total_num; |
| | | private List<SUTUDataOne> list; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | <#button name="查看详情" icon="fa-search" clickFun="TSite.openInfo()" space="true"/> |
| | | <#button name="上架" icon="fa-check" clickFun="TSite.onShelf()" space="true"/> |
| | | <#button name="下架" icon="fa-remove" clickFun="TSite.offShelf()" space="true"/> |
| | | <#button name="基础页面配置" icon="fa-remove" clickFun="TSite.basic()" space="true"/> |
| | | <#button name="福利页面配置" icon="fa-remove" clickFun="TSite.benefits()" space="true"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | |
| | | <input hidden id="roleType" value="${roleType}"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*我的券包:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="cover3" name="" avatarImg="${c3}"/><span>推荐像素:780x560px</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*线上商城:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="cover4" name="" avatarImg="${c4}"/><span >推荐像素:780x560px</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*本周福利:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="cover5" name="" avatarImg="${c5}"/><span>推荐像素:616x402px</span> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*今日免费:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <#avatar id="cover6" name="" avatarImg="${c6}"/><span>推荐像素:616x402px</span> |
| | | </div> |
| | | </div> |
| | | <#avatar id="cover3" name="*我的券包(推荐像素:780x560px):" avatarImg="${c3}"/><span></span> |
| | | <#avatar id="cover4" name="*线上商城(推荐像素:780x560px):" avatarImg="${c4}"/><span ></span> |
| | | <#avatar id="cover5" name="*本周福利(推荐像素:616x402px):" avatarImg="${c5}"/><span></span> |
| | | <#avatar id="cover6" name="*今日免费(推荐像素:616x402px):" avatarImg="${c6}"/><span></span> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addBenefits()"/> |
| | | <#button btnCss="danger" name="关闭" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/> |
| | | </div> |
| | |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <!-- <div style="height: 50px;box-sizing: border-box;background:#f3f3f4;line-height: 50px;border:1px solid;margin-bottom: 20px;width: auto">--> |
| | | <!-- <div id="div1" class='table1' onclick="getContent(1)" style="border-right: 1px solid #333;background-color: rgb(26, 179, 148);color: white;">无学员配置</div>--> |
| | | <!-- <div id="div2" class='table1' onclick="getContent(2)" style="border-right: 1px solid #333;">成为会员</div>--> |
| | | <!-- <div id="div3" class='table1' onclick="getContent(3)" style="border-right: 1px solid #333;">启动页配置</div>--> |
| | | <!-- </div>--> |
| | | <div class="row" id="content1" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <label class="col-sm-3 control-label">*无学员配置:</label> |
| | | <div class="form-group" style="display: flex;"> |
| | | <#avatar id="cover1" name="" avatarImg="${c1}"/> |
| | | <span>推荐像素:宽度780px</span> |
| | | <#avatar id="cover1" name="*无学员配置(推荐像素:宽度780px):" avatarImg="${c1}"/> |
| | | <#avatar id="cover2" name="*成为会员(推荐像素:宽度780px):" avatarImg="${c2}" /> |
| | | <#avatar id="cover7" name="*启动页配置(推荐像素:宽度780px):" avatarImg="${c7}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="row" id="content2" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <label class="col-sm-3 control-label">*成为会员:</label> |
| | | <div class="form-group" style="display: flex;"> |
| | | <#avatar id="cover2" name="" avatarImg="${c2}" /> |
| | | <span>推荐像素:宽度780px</span> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="row" id="content3" style="margin-left: 100px;"> |
| | | <div class="col-sm-11"> |
| | | <label class="col-sm-3 control-label">*启动页配置:</label> |
| | | <div class="form-group" style="display: flex;"> |
| | | <#avatar id="cover7" name="" avatarImg="${c7}"/> |
| | | <span>推荐像素:宽度780px</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TSite.addConfig()"/> |
| | |
| | | @} |
| | | </select> |
| | | |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="Search()"/> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <div class="row" id="t1" style="margin-left: 100px;"> |
| | |
| | | <label class="col-sm-3 control-label">*游戏类型:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="games" name="site"> |
| | | <option value="">全部</option> |
| | | <option style="width: 300px" value="1">方块球王</option> |
| | | <option style="width: 300px" value="2">社区小球王</option> |
| | | <option style="width: 300px" value="3">玩湃熊之力</option> |
| | | <option style="width: 300px" value="4">绿茵密码</option> |
| | | <option style="width: 300px" value="5">镜像阵容</option> |
| | | <option style="width: 300px" value="6">涨姿势</option> |
| | | @for(obj in games){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="Search1()"/> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <div class="row" id="t2" style="margin-left: 100px;"> |
| | |
| | | <div class="row" id="content3" style="margin-left: 100px;"> |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选城市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 200px" class="form-control" id="yearOrMonth3" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <option value="y">年度</option> |
| | | <option value="m">月度</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选内容:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | | <input style="width: 300px" class="form-control" id="con3" placeholder="请输入年份或者月份" type="text"> |
| | | <input style="width: 200px" class="form-control" id="con3" placeholder="请输入年份或者月份" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*筛选城市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode3" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <select style="width: 200px" class="form-control" id="cCode3" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <option value="">全球</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.cityCode}">${obj.city}</option> |
| | | <option style="width: 200px" value="${obj.cityCode}">${obj.city}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选场地:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="site3" name="site"> |
| | | <select style="width: 200px" class="form-control" id="site3" name="site"> |
| | | <option value="">全球</option> |
| | | @for(obj in sites){ |
| | | <option style="width: 300px" value="${obj.id}">${obj.name}</option> |
| | | <option style="width: 200px" value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCompetition.search3()"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TSite.search3()"/> |
| | | </div> |
| | | <#table id="TSiteTable"/> |
| | | </div> |
| | | <div class="row" id="content4" style="margin-left: 100px;"> |
| | | <div class="col-sm-11" style="display: flex"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*筛选城市:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 200px" class="form-control" id="yearOrMonth4" name="cCode" onchange="getStoreByCity1(this)"> |
| | | <option value="y">年度</option> |
| | | <option value="m">月度</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*筛选内容:</label> |
| | | <div class="col-sm-9" style="display: flex;"> |
| | |
| | | var SUTU=[]; |
| | | // SUTU智慧球场数据 |
| | | var SUTUData1=[]; |
| | | var years=[]; |
| | | var data1=[]; |
| | | var data2=[]; |
| | | var monthOrDays=[]; |
| | | function Search1() { |
| | | var ajax = new $ax(Feng.ctxPath + "/gameData/listSUTU1", function(resp){ |
| | | data2=[]; |
| | | data1=[]; |
| | | var d1 = resp.data1; |
| | | var d2 = resp.data2; |
| | | years = resp.years; |
| | | monthOrDays = resp.monthOrDays; |
| | | for (let i = 0; i <d1.length; i++) { |
| | | data1.push(d1[i].count); |
| | | } |
| | | for (let i = 0; i <d2.length; i++) { |
| | | data2.push(d2[i].count); |
| | | } |
| | | console.log("看看data1") |
| | | console.log(data1) |
| | | console.log("看看data2") |
| | | console.log(data2) |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度', '月度'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度: true, |
| | | 月度: false, |
| | | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: years |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data1 |
| | | }, |
| | | { |
| | | name: '月度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:data2 |
| | | } |
| | | ] |
| | | }; |
| | | var myChart4 = echarts.init(document.getElementById('number1')); |
| | | myChart4.setOption(option4); |
| | | }) |
| | | ajax.set("gameId",$("#games").val()) |
| | | ajax.set("time",$("#con1").val()) |
| | | ajax.set("spaceId",$("#site").val()) |
| | | ajax.set("cityCode",$("#cCode").val()) |
| | | ajax.start(); |
| | | var myChart4 = echarts.init(document.getElementById('number1')); |
| | | var options = myChart4.getOption() |
| | | options.series[0].data = data1 |
| | | options.series[1].data = data2 |
| | | }; |
| | | function BatterData() { |
| | | var ajax = new $ax(Feng.ctxPath + "/gameData/list", function(resp){ |
| | | var mDataList= resp.mDataList; |
| | |
| | | ] |
| | | }; |
| | | }); |
| | | if ($("#stores").val() == ""){ |
| | | ajax.set("storeId",0) |
| | | }else{ |
| | | ajax.set("storeId",$("#stores").val()); |
| | | } |
| | | ajax.start(); |
| | | } |
| | | function SUTUData() { |
| | |
| | | getContent(1); |
| | | BatterData(); |
| | | SUTUData(); |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度', '月度'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度: true, |
| | | 月度: false, |
| | | Search1(); |
| | | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1,3,6,8,9,5] |
| | | }, |
| | | { |
| | | name: '月度', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:[1,2,3,4,5,6,6,5,4,3,2,1] |
| | | // data: [month[0][0],month[0][1], month[0][2], month[0][3], month[0][4], |
| | | // month[0][5], month[0][6], month[0][7], month[0][8], month[0][9], month[0][10], month[0][11]] |
| | | } |
| | | ] |
| | | }; |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | var myChart = echarts.init(document.getElementById('number')); |
| | | |
| | |
| | | var options = myChart4.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度') { |
| | | options.xAxis[0].data = yearX |
| | | options.xAxis[0].data = years |
| | | } else if (obj.name == '月度') { |
| | | options.xAxis[0].data = monthX |
| | | options.xAxis[0].data = monthOrDays |
| | | } |
| | | myChart4.setOption(options, true) |
| | | }); |
| | | // 使用刚指定的配置项和数据显示图表。 |
| | | myChart.setOption(option); |
| | | myChart2.setOption(option2); |
| | | myChart4.setOption(option4); |
| | | |
| | | |
| | | var myChart3 = echarts.init(document.getElementById('gameTotal')); |
| | | myChart3.setOption(option3); |
| | |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'number', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '序号', field: 'account_id', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'nickname', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '成绩', field: 'score', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'number', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'name', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '序号', field: 'account_id', visible:true, align: 'center', valign: 'middle'}, |
| | | {title: '昵称', field: 'nickname', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '成绩', field: 'score', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | |
| | | |
| | | TSite.search3 = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#con3").val(); |
| | | queryData['city'] = $("#cCode3").val(); |
| | | queryData['siteTypeId'] = $("#site3").val(); |
| | | queryData['type'] = $("#yearOrMonth3").val(); |
| | | queryData['date'] = $("#con3").val(); |
| | | queryData['cityCode'] = $("#cCode3").val(); |
| | | queryData['spaceId'] = $("#site3").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | TSite1.search4 = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#con4").val(); |
| | | queryData['city'] = $("#cCode4").val(); |
| | | queryData['siteTypeId'] = $("#site4").val(); |
| | | queryData['type'] = $("#yearOrMonth4").val(); |
| | | queryData['date'] = $("#con4").val(); |
| | | queryData['cityCode'] = $("#cCode4").val(); |
| | | queryData['spaceId'] = $("#site4").val(); |
| | | TSite.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/tSite/listAll", defaultColunms); |
| | | var table = new BSTable(TSite.id, "/gameData/listAll", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | |
| | | var defaultColunms1 = TSite1.initColumn(); |
| | | var table1 = new BSTable(TSite1.id, "/tSite/listAll", defaultColunms1); |
| | | var table1 = new BSTable(TSite1.id, "/gameData/listAll", defaultColunms1); |
| | | table1.setPaginationType("client"); |
| | | TSite1.table = table1.init(); |
| | | }); |