| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | import java.math.BigDecimal; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.StoreStaffClient; |
| | | import com.dsh.course.feignClient.account.model.CityListQuery; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.dsh.course.feignClient.other.SiteLockClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.course.feignClient.other.model.SiteChangeStateVO; |
| | | import com.dsh.course.feignClient.other.model.TSiteDTO; |
| | | import com.dsh.course.feignClient.other.model.TSiteLockDTO; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITSiteService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.HttpRequestUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | |
| | | import groovyjarjarpicocli.CommandLine; |
| | | import net.bytebuddy.asm.Advice; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.aspectj.weaver.ast.Var; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.resource.HttpResource; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.lang.reflect.Type; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | |
| | | |
| | | @Resource |
| | | private StoreConfigService storeConfigService; |
| | | @Resource |
| | | private ITSiteTypeService siteTypeService; |
| | | |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | @Resource |
| | | private SiteClient siteClient; |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | @Resource |
| | | private StoreClient storeClient; |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | @Autowired |
| | | private SiteLockClient siteLockClient; |
| | | |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | * 选择市 返回场地列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getSiteByCity") |
| | | public List<TSite> getSiteByCity(String oneId) { |
| | | if (oneId.equals("")){ |
| | | return siteService.list(new QueryWrapper<TSite>()); |
| | | } |
| | | return siteService.list(new QueryWrapper<TSite>().eq("cityCode",oneId)); |
| | | } |
| | | /** |
| | | * 跳转到场地管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("userType",objectType); |
| | | QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state",1); |
| | | List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | List<TCity> list3 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list3); |
| | | model.addAttribute("siteType",siteType); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",1); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("type",1); |
| | | List<TOperator> list5 = tOperatorService.list(); |
| | | model.addAttribute("list5",list5); |
| | | return PREFIX + "TSite.html"; |
| | | } |
| | | /** |
| | | * 跳转到场地管理首页--查询场地有效期在两个月内的场地信息 |
| | | */ |
| | | @RequestMapping("/expireInsuranceEndTime") |
| | | public String expireInsuranceEndTime(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("userType",objectType); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | // 已有城市管理的省 |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | // 已有城市管理的市 |
| | | ArrayList<String> list2 = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | list1.add(cityManager.getProvince()); |
| | | list2.add(cityManager.getCity()); |
| | | } |
| | | HashSet<String> set = new HashSet<String>(list1); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state",1); |
| | | List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | model.addAttribute("list",set); |
| | | model.addAttribute("siteType",siteType); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("type",2); |
| | | return PREFIX + "TSite.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | * 上/下架 1为上架 2为下架 3为删除 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tShop_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | return PREFIX + "tShop_add.html"; |
| | | @RequestMapping("/changeState") |
| | | @ResponseBody |
| | | public Object changeState(@RequestBody SiteChangeStateVO vo){ |
| | | siteClient.changeState(vo); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 添加锁定场地 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/addSiteLock") |
| | | @ResponseBody |
| | | public Object addSiteLock(@RequestBody TSiteLockDTO dto){ |
| | | // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | // try { |
| | | // dto.setStartTime(simpleDateFormat.parse(dto.getSsTime())); |
| | | // dto.setEndTime(simpleDateFormat.parse(dto.getEeTime())); |
| | | // } catch (ParseException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | |
| | | System.out.println(dto); |
| | | Object o = siteLockClient.addSiteLock(dto); |
| | | return ResultUtil.success(o); |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | * 删除锁定场地 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tShop_update/{id}") |
| | | public String tCityUpdate(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",2); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | model.addAttribute("type",1); |
| | | return PREFIX + "tShop_edit.html"; |
| | | @RequestMapping("/deleteSiteLock/{id}") |
| | | @ResponseBody |
| | | public Object deleteSiteLock(@PathVariable("id") Integer id){ |
| | | siteLockClient.deleteSiteLock(id); |
| | | return ResultUtil.success(); |
| | | } |
| | | @RequestMapping("/tShop_info/{id}") |
| | | public String tCityInfo(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("item",byId); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, byId.getProvinceCode())); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId,one.getId())); |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(10000); |
| | | cityListQuery.setCityCode(byId.getCityCode()); |
| | | Page<TCityManager> list2 = cityClient.list(cityListQuery); |
| | | model.addAttribute("list1",list1); |
| | | model.addAttribute("list2",list2.getRecords()); |
| | | |
| | | /** |
| | | * 根据场地id 获取锁定列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/getSiteLockBySiteId/{id}") |
| | | @ResponseBody |
| | | public Object getSiteLockBySiteId(@PathVariable("id") Integer id){ |
| | | return siteLockClient.getListById(id); |
| | | } |
| | | /** |
| | | * 跳转到场地管理编辑页面 |
| | | */ |
| | | @RequestMapping("/openEditTSite/{id}") |
| | | public String openEditTSite(Model model,@PathVariable("id") Integer id) { |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | // 已有城市管理的省 |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | // 已有城市管理的市 |
| | | for (CityManager cityManager : province) { |
| | | list1.add(cityManager.getProvince()); |
| | | } |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | List<TOperator> list = tOperatorService.list(); |
| | | model.addAttribute("yysList",list); |
| | | |
| | | model.addAttribute("userType",objectType); |
| | | HashSet<String> set = new HashSet<String>(list1); |
| | | QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state",1); |
| | | List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | model.addAttribute("siteType",siteType); |
| | | model.addAttribute("province",set); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("time",byId.getStartTime()+" - "+byId.getEndTime()); |
| | | User byId1 = userMapper.selectById(byId.getStoreStaffId()); |
| | | model.addAttribute("city",byId1); |
| | | TSite site = siteService.getOne(new QueryWrapper<TSite>().eq("id", id)); |
| | | List<CityManager> city = cityManagerClient.getAccount(site.getCity()); |
| | | List<CityManager> city1 = cityManagerClient.getCity(site.getProvince()); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | for (CityManager cityManager : city) { |
| | | strings.add(cityManager.getCity()); |
| | | } |
| | | HashSet<String> set1 = new HashSet<String>(strings); |
| | | List<TStore> stores = new ArrayList<>(); |
| | | // // 先判断 |
| | | // if (objectType ==2 ){ |
| | | // stores= storeClient.getStoreByCityManagerId(objectId); |
| | | // }else if(objectType == 3){ |
| | | // stores= storeClient.getStoreByStoreStaffId(objectId);; |
| | | // }else{ |
| | | // stores = storeClient.getStore(site.getCity()); |
| | | // } |
| | | // 根据门店id 确定是平台还是运营商的 |
| | | TStore byId = storeService.getById(site.getStoreId()); |
| | | if (byId.getType()==1){ |
| | | // 查询平台的门店 |
| | | if (objectType ==2 ){ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("type", 1) |
| | | .eq("operatorId",objectId)); |
| | | }else if (objectType ==2 ){ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("id",objectId)); |
| | | }else{ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("type", 1) |
| | | ); |
| | | } |
| | | }else{ |
| | | // 查询平台的门店 |
| | | if(objectType == 2){ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("type", 2) |
| | | .eq("operatorId",objectId)); |
| | | }else if (objectType == 3){ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("id",objectId)); |
| | | }else{ |
| | | stores = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("state", 1) |
| | | .eq("type", 2) |
| | | ); |
| | | } |
| | | |
| | | } |
| | | List<CityManager> accounts = cityManagerClient.getAccount(site.getCity()); |
| | | model.addAttribute("list",site); |
| | | Date insuranceEndTime = site.getInsuranceEndTime(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd").format(insuranceEndTime); |
| | | model.addAttribute("accounts",accounts); |
| | | model.addAttribute("time",format); |
| | | model.addAttribute("city",set1); |
| | | model.addAttribute("city1",city1); |
| | | model.addAttribute("type",1); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | |
| | | model.addAttribute("stores",stores); |
| | | |
| | | String nextName = site.getNextName(); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | for (String s : nextName.split(",")) { |
| | | strings1.add(s); |
| | | } |
| | | |
| | | if (!strings1.get(0).equals("")){ |
| | | System.out.println("=========执行nextNames===="); |
| | | model.addAttribute("nextNames",strings1);} |
| | | |
| | | ArrayList<String> strings3 = new ArrayList<>(); |
| | | strings3.add("普通场地"); |
| | | strings3.add("智慧场地"); |
| | | model.addAttribute("typeNames",strings3); |
| | | |
| | | String halfNames = site.getHalfName(); |
| | | ArrayList<String> strings2 = new ArrayList<>(); |
| | | String[] split = halfNames.split(","); |
| | | String halfName=null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | if(i==0){ |
| | | halfName = split[0]; |
| | | }else { |
| | | strings2.add(split[i]); |
| | | } |
| | | } |
| | | model.addAttribute("halfNames",strings2); |
| | | model.addAttribute("halfName",halfName); |
| | | |
| | | return PREFIX + "TSite_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到场地锁定页面 |
| | | */ |
| | | @RequestMapping("/lockSite/{id}") |
| | | public String lockSite(Model model,@PathVariable("id") Integer id) { |
| | | DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd hh:mm"); |
| | | List<TSiteLockDTO> listById = siteLockClient.getListById(id); |
| | | for (TSiteLockDTO tSiteLockDTO : listById) { |
| | | tSiteLockDTO.setSsTime(dateformat.format(tSiteLockDTO.getStartTime())); |
| | | tSiteLockDTO.setEeTime(dateformat.format(tSiteLockDTO.getEndTime())); |
| | | } |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("list",listById); |
| | | return PREFIX + "TSite_lock.html"; |
| | | } |
| | | /** |
| | | * 跳转到场地管理详情页面 |
| | | */ |
| | | @RequestMapping("/openInfoTSite/{id}") |
| | | public String openInfoTSite(Model model,@PathVariable("id") Integer id) { |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | // 已有城市管理的省 |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | // 已有城市管理的市 |
| | | for (CityManager cityManager : province) { |
| | | list1.add(cityManager.getProvince()); |
| | | } |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | List<TOperator> list = tOperatorService.list(); |
| | | model.addAttribute("yysList",list); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | model.addAttribute("userType",objectType); |
| | | HashSet<String> set = new HashSet<String>(list1); |
| | | QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state",1); |
| | | List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | model.addAttribute("siteType",siteType); |
| | | model.addAttribute("province",set); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | TSite site = siteService.getOne(new QueryWrapper<TSite>().eq("id", id)); |
| | | List<CityManager> city = cityManagerClient.getAccount(site.getCity()); |
| | | List<CityManager> city1 = cityManagerClient.getCity(site.getProvince()); |
| | | ArrayList<String> strings = new ArrayList<>(); |
| | | for (CityManager cityManager : city) { |
| | | strings.add(cityManager.getCity()); |
| | | } |
| | | HashSet<String> set1 = new HashSet<String>(strings); |
| | | List<Store> stores = new ArrayList<>(); |
| | | if (objectType ==2 ){ |
| | | stores= storeClient.getStoreByCityManagerId(objectId); |
| | | }else if(objectType == 3){ |
| | | stores= storeClient.getStoreByStoreStaffId(objectId);; |
| | | }else{ |
| | | stores = storeClient.getStore(site.getCity()); |
| | | } |
| | | |
| | | ArrayList<String> strings3 = new ArrayList<>(); |
| | | strings3.add("普通场地"); |
| | | strings3.add("智慧场地"); |
| | | model.addAttribute("typeNames",strings3); |
| | | |
| | | |
| | | String nextName = site.getNextName(); |
| | | ArrayList<String> strings1 = new ArrayList<>(); |
| | | for (String s : nextName.split(",")) { |
| | | strings1.add(s); |
| | | } |
| | | System.out.println("========="+strings1); |
| | | System.out.println("====000====="+strings1.get(0)); |
| | | |
| | | if (CollectionUtil.isNotEmpty(strings1)) { |
| | | System.out.println("====执行==="); |
| | | model.addAttribute("nextNames", strings1); |
| | | } |
| | | |
| | | |
| | | String halfNames = site.getHalfName(); |
| | | ArrayList<String> strings2 = new ArrayList<>(); |
| | | String[] split = halfNames.split(","); |
| | | String halfName=null; |
| | | for (int i = 0; i < split.length; i++) { |
| | | if(i==0){ |
| | | halfName = split[0]; |
| | | }else { |
| | | strings2.add(split[i]); |
| | | } |
| | | } |
| | | model.addAttribute("halfNames",strings2); |
| | | model.addAttribute("halfName",halfName); |
| | | |
| | | List<CityManager> accounts = cityManagerClient.getAccount(site.getCity()); |
| | | model.addAttribute("list",site); |
| | | Date insuranceEndTime = site.getInsuranceEndTime(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd").format(insuranceEndTime); |
| | | model.addAttribute("accounts",accounts); |
| | | model.addAttribute("time",format); |
| | | model.addAttribute("city",set1); |
| | | model.addAttribute("city1",city1); |
| | | model.addAttribute("type",0); |
| | | return PREFIX + "tShop_edit.html"; |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("stores",stores); |
| | | return PREFIX + "TSite_edit.html"; |
| | | } |
| | | @RequestMapping("/tShop_gift/{id}") |
| | | public String tCityGift(@PathVariable Integer id, Model model) { |
| | | TStore byId = storeService.getById(id); |
| | | model.addAttribute("welfarePicture",byId.getWelfarePicture()); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_img.html"; |
| | | } |
| | | @RequestMapping("/tShop_indexSet/{id}") |
| | | public String tCityIndexSet(@PathVariable Integer id, Model model) { |
| | | StoreConfig c1 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,1)); |
| | | model.addAttribute("c1",c1); |
| | | StoreConfig c2 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,2)); |
| | | model.addAttribute("c2",c2); |
| | | StoreConfig c3 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,3)); |
| | | model.addAttribute("c3",c3); |
| | | StoreConfig c4 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,4)); |
| | | model.addAttribute("c4",c4); |
| | | StoreConfig c5 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,5)); |
| | | model.addAttribute("c5",c5); |
| | | StoreConfig c6 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,6)); |
| | | model.addAttribute("c6",c6); |
| | | StoreConfig c7 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,7)); |
| | | model.addAttribute("c7",c7); |
| | | StoreConfig c8 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,8)); |
| | | model.addAttribute("c8",c8); |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tShop_imgAll.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/list") |
| | | /** |
| | | * 根据所选门店 获取经营时间 |
| | | */ |
| | | @ResponseBody |
| | | public Object list(String provinceCode, String cityCode , String name, String phone,String shopName) { |
| | | Page<TStoreListVo> page = new PageFactory<TStoreListVo>().defaultPage(); |
| | | List<TStoreListVo> list = storeService.listAll(page,provinceCode,cityCode,name,phone,shopName); |
| | | for (TStoreListVo tStoreListVo : list) { |
| | | TCityManager byId = cityClient.getById(tStoreListVo.getCityManagerId()); |
| | | tStoreListVo.setAccount(byId.getName()+"-"+byId.getPhone()); |
| | | |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | @GetMapping("/getTime/{oneId}") |
| | | public Store getTime(@PathVariable("oneId") String oneId) { |
| | | return storeClient.getTime(oneId); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | /** |
| | | * 场地管理首页 选择省 返回市 |
| | | */ |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | tStore.setState(1); |
| | | User user = new User(); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone)); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setRoleid("2"); |
| | | user.setPhone(userPhone); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | storeService.save(tStore); |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setIsOpen(1); |
| | | storeConfig.setSort(i); |
| | | storeConfig.setType(i); |
| | | storeConfig.setStoreId(tStore.getId()); |
| | | storeConfigs.add(storeConfig); |
| | | } |
| | | storeConfigService.saveBatch(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | @RequestMapping(value = "/getChange") |
| | | public List<Region> getChange(String province) { |
| | | Region name = regionService.getOne(new QueryWrapper<Region>().eq("name", province)); |
| | | return regionService.list(new QueryWrapper<Region>().eq("parent_id", name.getId())); |
| | | } |
| | | |
| | | @RequestMapping(value = "/update") |
| | | /** |
| | | * 添加场地管理 |
| | | */ |
| | | @ResponseBody |
| | | public Object update(TStore tStore,String time,String userName,String userPhone) { |
| | | try { |
| | | TStore byId = storeService.getById(tStore.getId()); |
| | | @RequestMapping(value = "/addSite") |
| | | public ResultUtil addSite(@RequestBody Site site) { |
| | | Store store = storeClient.getStoreById(site.getStoreId()); |
| | | String province = store.getProvince(); |
| | | String provinceCode = store.getProvinceCode(); |
| | | String city = store.getCity(); |
| | | String cityCode = store.getCityCode(); |
| | | Integer cityManagerId = store.getCityManagerId(); |
| | | site.setProvince(province); |
| | | site.setProvinceCode(provinceCode); |
| | | site.setCity(city); |
| | | site.setCityCode(cityCode); |
| | | site.setCityManagerId(cityManagerId); |
| | | site.setInsertTime(new Date()); |
| | | site.setState(1); |
| | | // site.setOperatorId(UserExt.getUser().getObjectId()); |
| | | |
| | | if(ToolUtil.isNotEmpty(tStore.getProvinceCode())) { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getProvinceCode())); |
| | | tStore.setProvince(one.getName()); |
| | | TCity one1 = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, tStore.getCityCode())); |
| | | tStore.setCity(one1.getName()); |
| | | } |
| | | tStore.setStartTime(time.split(" - ")[0]); |
| | | tStore.setEndTime(time.split(" - ")[1]); |
| | | if(ToolUtil.isEmpty(tStore.getCoverDrawing())){ |
| | | tStore.setCoverDrawing(byId.getCoverDrawing()); |
| | | } |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | List<User> users = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getAccount, userPhone).ne(User::getId,tStore.getStoreStaffId())); |
| | | if(users.size()>0){ |
| | | return "5001"; |
| | | } |
| | | user.setAccount(userPhone); |
| | | user.setName(userName); |
| | | user.setPhone(userPhone); |
| | | userMapper.updateById(user); |
| | | storeService.updateById(tStore); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | // 添加场地 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",store.getId().toString()); |
| | | String s = HttpRequestUtil.postRequest |
| | | ("https://port.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | JSONObject jsonObject = JSONObject.parseObject(s); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | String area_id = data.getString("area_id"); |
| | | Integer integer = Integer.valueOf(area_id); |
| | | site.setId(integer); |
| | | Integer integer1 = siteClient.addSite1(site); |
| | | // Integer integer = Integer.valueOf(spaceId); |
| | | |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | | * 编辑场地管理 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateSite") |
| | | public ResultUtil updateSite(@RequestBody Site site) { |
| | | if(site.getInsuranceImg().equals("")){ |
| | | site.setInsuranceImg(null); |
| | | } |
| | | |
| | | TSite byId = siteService.getById(site.getId()); |
| | | |
| | | Store store = storeClient.getStoreById(site.getStoreId()); |
| | | |
| | | String province = store.getProvince(); |
| | | String provinceCode = store.getProvinceCode(); |
| | | String city = store.getCity(); |
| | | String cityCode = store.getCityCode(); |
| | | Integer cityManagerId = store.getCityManagerId(); |
| | | |
| | | site.setProvince(province); |
| | | site.setProvinceCode(provinceCode); |
| | | site.setCity(city); |
| | | site.setCityCode(cityCode); |
| | | site.setCityManagerId(cityManagerId); |
| | | |
| | | site.setInsertTime(new Date()); |
| | | site.setState(1); |
| | | siteClient.addSite(site); |
| | | |
| | | /** |
| | | * 取消闸机输入 新增模块闸机管理 |
| | | */ |
| | | // String ids = byId.getIds(); |
| | | // HashMap<String, String> map = new HashMap<>(); |
| | | // map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // if(StringUtils.hasLength(ids)) { |
| | | // for (String s : ids.split(",")) { |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/deleteDevice/ids/" + s, map); |
| | | // System.out.println(s1); |
| | | // } |
| | | // } |
| | | // if(StringUtils.hasLength( site.getIds())) { |
| | | // for (String s : site.getIds().split(",")) { |
| | | // HashMap<String, String> map1 = new HashMap<>(); |
| | | // map1.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // map1.put("space_id", store.getId() + ""); |
| | | // map1.put("device_id", s); |
| | | // map1.put("region_id", site.getId() + ""); |
| | | // // 添加门禁 |
| | | // String s1 = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | // System.out.println(s1); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 场地管理添加页面选择省 展示市 |
| | | */ |
| | | @RequestMapping(value = "/getCity") |
| | | @ResponseBody |
| | | public List<CityManager> getCity(String province) { |
| | | |
| | | return cityManagerClient.getCity(province); |
| | | } |
| | | /** |
| | | * 查询场地管理列表 |
| | | */ |
| | | @RequestMapping(value= "/listAll") |
| | | @ResponseBody |
| | | public List<TSiteDTO> listAll(String province,String city,String storeName,Integer siteTypeId,String name) { |
| | | // 对象类型 |
| | | Integer type = UserExt.getUser().getObjectType(); |
| | | // 对象类型Id |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | SiteSearchVO vo = new SiteSearchVO(); |
| | | vo.setProvince(province); |
| | | vo.setCity(city); |
| | | vo.setStoreName(storeName); |
| | | vo.setSiteTypeId(siteTypeId); |
| | | vo.setName(name); |
| | | vo.setObjectType(type); |
| | | vo.setObjectId(objectId); |
| | | return siteClient.listAll(vo); |
| | | } |
| | | /** |
| | | * 查询场地管理列表 |
| | | */ |
| | | @RequestMapping(value= "/listExipre") |
| | | @ResponseBody |
| | | public List<TSiteDTO> listExipre(String province,String city,String storeName,Integer siteTypeId,String name,Integer opId) { |
| | | // 对象类型 |
| | | Integer type = UserExt.getUser().getObjectType(); |
| | | // 对象类型Id |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | ExpireSiteSearchVO vo = new ExpireSiteSearchVO(); |
| | | vo.setProvince(province); |
| | | vo.setCity(city); |
| | | vo.setStoreName(storeName); |
| | | vo.setSiteTypeId(siteTypeId); |
| | | vo.setName(name); |
| | | vo.setObjectType(type); |
| | | vo.setObjectId(objectId); |
| | | vo.setOpId(opId); |
| | | List<TSiteDTO> tSiteDTOS = siteClient.listExipre(vo); |
| | | for (TSiteDTO tSiteDTO : tSiteDTOS) { |
| | | Integer storeId = tSiteDTO.getStoreId(); |
| | | TStore byId = storeService.getById(storeId); |
| | | if (byId!=null){ |
| | | if (byId.getType()==1){ |
| | | tSiteDTO.setOperator("平台"); |
| | | }else{ |
| | | TOperator byId1 = tOperatorService.getById(tSiteDTO.getOperatorId()); |
| | | if (byId1!=null) |
| | | tSiteDTO.setOperator(byId1.getName()); |
| | | } |
| | | } |
| | | } |
| | | return tSiteDTOS; |
| | | } |
| | | |
| | | @Autowired |
| | | private TOperatorService tOperatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | /** |
| | | * 跳转到添加场地管理 |
| | | */ |
| | | @RequestMapping("/add") |
| | | public String tCompetitionAdd(Model model) { |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | // 查询这个运营商管理的省 |
| | | TOperator id = tOperatorService.getOne(new QueryWrapper<TOperator>().eq("id", UserExt.getUser().getObjectId())); |
| | | if (id.getType()==1){ |
| | | // 全国 |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | }else{ |
| | | // 找到他管理的省 |
| | | List<TOperatorCity> list = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId", UserExt.getUser().getObjectId()).eq("pid", 0)); |
| | | model.addAttribute("list",list); |
| | | } |
| | | }else{ |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | } |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<Store> stores = new ArrayList<>(); |
| | | if (objectType ==2 ){ |
| | | List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>().eq("operatorId", objectId)); |
| | | model.addAttribute("stores",operatorId); |
| | | }else if(objectType == 3){ |
| | | List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getId, objectId)); |
| | | model.addAttribute("stores",list); |
| | | }else { |
| | | model.addAttribute("stores",storeService.list(new QueryWrapper<TStore>().eq("operatorId", 0))); |
| | | } |
| | | List<TOperator> list = tOperatorService.list(); |
| | | model.addAttribute("yysList",list); |
| | | model.addAttribute("userType",objectType); |
| | | QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("state",1); |
| | | List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | model.addAttribute("siteType",siteType); |
| | | model.addAttribute("province",list); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | |
| | | return PREFIX + "TSite_add.html"; |
| | | |
| | | } |
| | | |
| | | // /** |
| | | // * 跳转到场地管理页面 |
| | | // */ |
| | | // @RequestMapping("/add") |
| | | // public String tCompetitionAdd(Model model) { |
| | | // List<CityManager> province = cityManagerClient.listAll(); |
| | | // // 已有城市管理的省 |
| | | // ArrayList<String> list1 = new ArrayList<>(); |
| | | // // 已有城市管理的市 |
| | | // ArrayList<String> list2 = new ArrayList<>(); |
| | | // for (CityManager cityManager : province) { |
| | | // list1.add(cityManager.getProvince()); |
| | | // list2.add(cityManager.getCity()); |
| | | // } |
| | | // Integer objectType = UserExt.getUser().getObjectType(); |
| | | // Integer objectId = UserExt.getUser().getObjectId(); |
| | | // List<Store> stores = new ArrayList<>(); |
| | | // if (objectType ==2 ){ |
| | | // stores= storeClient.getStoreByCityManagerId(objectId); |
| | | // }else if(objectType == 3){ |
| | | // stores= storeClient.getStoreByStoreStaffId(objectId);; |
| | | // } |
| | | // model.addAttribute("userType",objectType); |
| | | // HashSet<String> set = new HashSet<String>(list1); |
| | | // QueryWrapper<TSiteType> wrapper = new QueryWrapper<>(); |
| | | // wrapper.eq("state",1); |
| | | // List<TSiteType> siteType = siteTypeService.list(wrapper); |
| | | // model.addAttribute("siteType",siteType); |
| | | // model.addAttribute("province",set); |
| | | // model.addAttribute("city",list2); |
| | | // String roleid = UserExt.getUser().getRoleid(); |
| | | // model.addAttribute("role",roleid); |
| | | // model.addAttribute("objectType",objectType); |
| | | // model.addAttribute("objectId",objectId); |
| | | // model.addAttribute("stores",stores); |
| | | // return PREFIX + "tSite_add.html"; |
| | | // } |
| | | |
| | | |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/saveImgAll") |
| | | |
| | | @RequestMapping(value = "/getChangeOne") |
| | | @ResponseBody |
| | | public Object saveImgAll(Integer id,Integer px1,Integer px2,Integer px3,Integer px4,Integer px5,Integer px6,Integer px7,Integer px8, |
| | | String c1,String c2,String c3,String c4,String c5,String c6,String c7,String c8, |
| | | Integer r1,Integer r2,Integer r3,Integer r4,Integer r5,Integer r6,Integer r7,Integer r8) { |
| | | public Object getChangeOne(Integer oneId) { |
| | | try { |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | StoreConfig collect1 = collect(id, px1, r1, c1, 1); |
| | | StoreConfig collect2 = collect(id, px2, r2, c2, 2); |
| | | StoreConfig collect3 = collect(id, px3, r3, c3, 3); |
| | | StoreConfig collect4 = collect(id, px4, r4, c4, 4); |
| | | StoreConfig collect5 = collect(id, px5, r5, c5, 5); |
| | | StoreConfig collect6 = collect(id, px6, r6, c6, 6); |
| | | StoreConfig collect7 = collect(id, px7, r7, c7, 7); |
| | | StoreConfig collect8 = collect(id, px8, r8, c8, 8); |
| | | storeConfigs.add(collect1); |
| | | storeConfigs.add(collect2); |
| | | storeConfigs.add(collect3); |
| | | storeConfigs.add(collect4); |
| | | storeConfigs.add(collect5); |
| | | storeConfigs.add(collect6); |
| | | storeConfigs.add(collect7); |
| | | storeConfigs.add(collect8); |
| | | storeConfigService.updateBatchById(storeConfigs); |
| | | return new SuccessTip<>(); |
| | | return storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",oneId) |
| | | .eq("state",1)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | private StoreConfig collect(Integer id,Integer sort,Integer isOpen,String img,int type){ |
| | | StoreConfig one = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType, type)); |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | } |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |
| | | // 选择市后 获取对应账号 |
| | | @RequestMapping(value = "/accountChangeNext") |
| | | @ResponseBody |
| | | public Object oneChangeNext(String oneId) { |
| | | public Object accountChangeNext(String oneId) { |
| | | |
| | | try { |
| | | CityListQuery cityListQuery = new CityListQuery(); |
| | | cityListQuery.setCityCode(oneId); |
| | | cityListQuery.setOffset(1); |
| | | cityListQuery.setLimit(100000); |
| | | Page<TCityManager> list = cityClient.list(cityListQuery); |
| | | List<TCityManager> records = list.getRecords(); |
| | | for (TCityManager record : records) { |
| | | record.setName(record.getName()+"-"+record.getPhone()); |
| | | } |
| | | return records; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | return cityManagerClient.getAccount(oneId); |
| | | } |
| | | |
| | | |
| | | // 选择账号 获取对应门店 |
| | | @RequestMapping(value = "/getStore") |
| | | @ResponseBody |
| | | public Object getStore(Integer oneId) { |
| | | if (oneId == null){ |
| | | return null; |
| | | } |
| | | List<Store> list = storeClient.getStoreByCityManagerId(oneId); |
| | | if (list.size()==0){ |
| | | return list; |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | // 选择市后 获取对应门店 |
| | | @RequestMapping(value = "/storeChangeNext") |
| | | @ResponseBody |
| | | public Object storeChangeNext(String oneId) { |
| | | if (oneId.equals("")){ |
| | | return null; |
| | | } |
| | | return storeClient.getStore(oneId); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/cancel") |
| | |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/freeze") |
| | | @ResponseBody |
| | | public Object freeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(2); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | @RequestMapping(value = "/unfreeze") |
| | | @ResponseBody |
| | | public Object unfreeze(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | byId.setState(1); |
| | | storeService.updateById(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/pwd") |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | TStore byId = storeService.getById(id); |
| | | User user = userMapper.selectById(byId.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userMapper.updateById(user); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |