New file |
| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.account.entity.Referee; |
| | | import com.dsh.account.model.RefereeList; |
| | | import com.dsh.account.service.IRefereeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 14:28 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class RefereeController { |
| | | |
| | | @Autowired |
| | | private IRefereeService refereeService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取裁判管理列表 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | @PostMapping("/referee/getRefereeList") |
| | | public Map<String, Object> getRefereeList(@RequestBody RefereeList refereeList){ |
| | | return refereeService.getRefereeList(refereeList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加裁判 |
| | | * @param referee |
| | | */ |
| | | @PostMapping("/referee/addReferee") |
| | | public void addReferee(@RequestBody Referee referee){ |
| | | referee.setState(1); |
| | | referee.setCreateTime(new Date()); |
| | | refereeService.save(referee); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | * 添加时间 |
| | | */ |
| | | @TableField("createTime") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.account.entity.Referee; |
| | | import com.dsh.account.model.RefereeList; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 裁判 |
| | |
| | | * @Date 2024/2/8 15:02 |
| | | */ |
| | | public interface RefereeMapper extends BaseMapper<Referee> { |
| | | |
| | | |
| | | /** |
| | | * 获取裁判管理列表数据 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getRefereeList(@Param("item") RefereeList refereeList); |
| | | |
| | | int getRefereeListCount(@Param("item") RefereeList refereeList); |
| | | } |
New file |
| | |
| | | package com.dsh.account.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 14:26 |
| | | */ |
| | | @Data |
| | | public class RefereeList { |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 页码 |
| | | */ |
| | | private Integer offset; |
| | | /** |
| | | * 页条数 |
| | | */ |
| | | private Integer limit; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.account.entity.Referee; |
| | | import com.dsh.account.model.RefereeList; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 39373 |
| | | * @Date 2024/2/8 15:03 |
| | | */ |
| | | public interface IRefereeService extends IService<Referee> { |
| | | |
| | | |
| | | /** |
| | | * 获取裁判管理列表数据 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | Map<String, Object> getRefereeList(RefereeList refereeList); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.account.entity.Referee; |
| | | import com.dsh.account.mapper.RefereeMapper; |
| | | import com.dsh.account.model.RefereeList; |
| | | import com.dsh.account.service.IRefereeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 39373 |
| | |
| | | */ |
| | | @Service |
| | | public class RefereeServiceImpl extends ServiceImpl<RefereeMapper, Referee> implements IRefereeService { |
| | | |
| | | |
| | | /** |
| | | * 获取裁判管理列表数据 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> getRefereeList(RefereeList refereeList) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = this.baseMapper.getRefereeList(refereeList); |
| | | int count = this.baseMapper.getRefereeListCount(refereeList); |
| | | map.put("rows", list); |
| | | map.put("total", count); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.account.mapper.RefereeMapper"> |
| | | |
| | | |
| | | |
| | | <select id="getRefereeList" resultType="map"> |
| | | select |
| | | id, |
| | | name, |
| | | phone, |
| | | CONCAT(province, city) as province, |
| | | state |
| | | from t_referee where state != 3 |
| | | <if test="null != item.name and '' != item.name"> |
| | | and name like CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.phone and '' != item.phone"> |
| | | and phone like CONCAT('%', #{item.phone}, '%') |
| | | </if> |
| | | <if test="null != item.provinceCode and '' != item.provinceCode"> |
| | | and provinceCode = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and provinceCode = #{cityCode} |
| | | </if> |
| | | order by createTime desc limit #{item.offset}, #{item.limit} |
| | | </select> |
| | | |
| | | |
| | | <select id="getRefereeListCount" resultType="int"> |
| | | select |
| | | count(*) |
| | | from t_referee where state != 3 |
| | | <if test="null != item.name and '' != item.name"> |
| | | and name like CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.phone and '' != item.phone"> |
| | | and phone like CONCAT('%', #{item.phone}, '%') |
| | | </if> |
| | | <if test="null != item.provinceCode and '' != item.provinceCode"> |
| | | and provinceCode = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and provinceCode = #{cityCode} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | @ApiOperation(value = "获取世界杯详情【2.0】", tags = {"APP-社区世界杯"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "世界杯id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<WorldCupInfo> getWorldCupInfo(@RequestBody Integer id){ |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(id); |
| | | public ResultUtil<WorldCupInfo> getWorldCupInfo(@RequestBody Integer id, @RequestBody String lon, @RequestBody String lat){ |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(id, lon, lat); |
| | | return ResultUtil.success(worldCupInfo); |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/2/22 10:20 |
| | |
| | | private String intro; |
| | | @ApiModelProperty("富文本") |
| | | private String content; |
| | | @ApiModelProperty("门店信息") |
| | | private List<Map<String, Object>> storeInfos; |
| | | } |
| | |
| | | import com.dsh.communityWorldCup.entity.WorldCup; |
| | | import com.dsh.communityWorldCup.model.*; |
| | | import com.dsh.communityWorldCup.util.ResultUtil; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | WorldCupInfo getWorldCupInfo(Integer id); |
| | | WorldCupInfo getWorldCupInfo(Integer id, String lon, String lat); |
| | | |
| | | |
| | | /** |
| | |
| | | WorldCupPaymentParticipant worldCupPaymentParticipant = this.getById(id); |
| | | Integer worldCupId = worldCupPaymentParticipant.getWorldCupId(); |
| | | WorldCupPayment worldCupPayment = worldCupPaymentService.getById(worldCupPaymentParticipant.getWorldCupPaymentId()); |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(worldCupId); |
| | | WorldCupInfo worldCupInfo = worldCupService.getWorldCupInfo(worldCupId, null, null); |
| | | WorldCup worldCup = worldCupService.getById(worldCupId); |
| | | MyWorldCupInfo myWorldCupInfo = new MyWorldCupInfo(); |
| | | BeanUtils.copyProperties(worldCupInfo, myWorldCupInfo); |
| | |
| | | import com.dsh.communityWorldCup.mapper.WorldCupMapper; |
| | | import com.dsh.communityWorldCup.model.*; |
| | | import com.dsh.communityWorldCup.service.*; |
| | | import com.dsh.communityWorldCup.util.GeodesyUtil; |
| | | import com.dsh.communityWorldCup.util.PayMoneyUtil; |
| | | import com.dsh.communityWorldCup.util.ResultUtil; |
| | | import com.dsh.communityWorldCup.util.UUIDUtil; |
| | | import com.dsh.communityWorldCup.util.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public WorldCupInfo getWorldCupInfo(Integer id) { |
| | | public WorldCupInfo getWorldCupInfo(Integer id, String lon, String lat) { |
| | | WorldCupInfo worldCupInfo = this.baseMapper.getWorldCupInfo(id); |
| | | List<WorldCupStore> worldCupStores = worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("worldCupId", id)); |
| | | JSONArray jsonArray = new JSONArray(); |
| | |
| | | heat += count; |
| | | } |
| | | worldCupInfo.setHeat(heat); |
| | | ArrayList<Map<String, Object>> objects = new ArrayList<>(); |
| | | for (WorldCupStore worldCupStore : worldCupStores) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Store store = storeClient.queryStoreById(worldCupStore.getStoreId()); |
| | | map.put("name", store.getName()); |
| | | |
| | | |
| | | String str = store.getAddress(); |
| | | str = str.substring(str.indexOf("省") + 1); |
| | | |
| | | // 去掉第一个“市”及之前的字符串 |
| | | str = str.substring(str.indexOf("市") + 1); |
| | | |
| | | // 去掉第一个“区”及之前的字符串 |
| | | str = str.substring(str.indexOf("区") + 1); |
| | | |
| | | map.put("address", str); |
| | | map.put("storeLon", store.getLon()); |
| | | map.put("storeLat", store.getLat()); |
| | | map.put("storeCoverDrawing", store.getCoverDrawing()); |
| | | if (ToolUtil.isNotEmpty(lon) && ToolUtil.isNotEmpty(lat)) { |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(lon + "," + lat, store.getLon() + "," + store.getLat()); |
| | | double wgs84 = new BigDecimal(distance.get("WGS84")).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | map.put("distance", wgs84); |
| | | } |
| | | objects.add(map); |
| | | } |
| | | worldCupInfo.setStoreInfos(objects); |
| | | return worldCupInfo; |
| | | } |
| | | |
New file |
| | |
| | | package com.dsh.course.feignClient.communityWorldCup.Model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 裁判 |
| | | * @author 39373 |
| | | * @Date 2024/2/8 14:57 |
| | | */ |
| | | @Data |
| | | public class Referee { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 省名称 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.communityWorldCup.Model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 14:26 |
| | | */ |
| | | @Data |
| | | public class RefereeList { |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String name; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 页码 |
| | | */ |
| | | private Integer offset; |
| | | /** |
| | | * 页条数 |
| | | */ |
| | | private Integer limit; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.communityWorldCup; |
| | | |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.Referee; |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.RefereeList; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 14:24 |
| | | */ |
| | | @FeignClient("mb-cloud-communityWorldCup") |
| | | public interface RefereeClient { |
| | | |
| | | |
| | | /** |
| | | * 获取裁判管理列表 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | @PostMapping("/referee/getRefereeList") |
| | | List<Map<String, Object>> getRefereeList(RefereeList refereeList); |
| | | |
| | | |
| | | /** |
| | | * 添加裁判 |
| | | * @param referee |
| | | */ |
| | | @PostMapping("/referee/addReferee") |
| | | void addReferee(Referee referee); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.Referee; |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.RefereeList; |
| | | import com.dsh.course.feignClient.communityWorldCup.RefereeClient; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import groovy.transform.AutoImplement; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 裁判管理 |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 14:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/referee") |
| | | public class RefereeController { |
| | | |
| | | private String PREFIX = "/system/referee/"; |
| | | |
| | | @Resource |
| | | private RefereeClient refereeClient; |
| | | |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping("") |
| | | public String showList(){ |
| | | return PREFIX + "referee.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表数据 |
| | | * @param refereeList |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/listAll") |
| | | public Object listAll(RefereeList refereeList){ |
| | | return refereeClient.getRefereeList(refereeList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param referee |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/addReferee") |
| | | public ResultUtil addReferee(Referee referee){ |
| | | Region region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getProvinceCode())); |
| | | referee.setProvince(region.getName()); |
| | | region = regionService.getOne(new QueryWrapper<Region>().eq("code", referee.getCityCode())); |
| | | referee.setCity(region.getName()); |
| | | |
| | | refereeClient.addReferee(referee); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |
| | |
| | | Protocol two = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 2)); |
| | | Protocol three = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 3)); |
| | | Protocol four = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 4)); |
| | | Protocol five = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 5)); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | model.addAttribute("four",four); |
| | | model.addAttribute("five",five); |
| | | return PREFIX + "tAgreementDriver.html"; |
| | | } |
| | | |
| | | @RequestMapping("/QrCodeDescription") |
| | | public String QrCodeDescription(Model model){ |
| | | Protocol six = protocolService.getOne(new LambdaQueryWrapper<Protocol>().eq(Protocol::getType, 6)); |
| | | model.addAttribute("six",six); |
| | | return PREFIX + "QrCodeDescription.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
New file |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.guns.modular.system.model.Region; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/3/1 15:26 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/region") |
| | | public class RegionController { |
| | | |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |
| | | |
| | | /** |
| | | * 获取行政区联动 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getRegion") |
| | | public List<Region> getRegion(String pcode){ |
| | | Region code = regionService.getOne(new QueryWrapper<Region>().eq("code", pcode)); |
| | | return regionService.list(new QueryWrapper<Region>().eq("parent_id", code.getId())); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>裁判管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="裁判姓名:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="手机号:" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="provinceCode" > |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cityCode" > |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="Referee.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="Referee.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCompetitionTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/referee/openAddReferee")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="Referee.openAddReferee()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/referee/openEditReferee")){ |
| | | <#button name="编辑" icon="fa-edit" clickFun="Referee.openEditReferee()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/referee/delReferee")){ |
| | | <#button name="删除" icon="fa-edit" clickFun="Referee.delReferee()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/referee/offShelf")){ |
| | | <#button name="冻结" icon="fa-edit" clickFun="Referee.offShelf()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/referee/onShelf")){ |
| | | <#button name="解冻" icon="fa-edit" clickFun="Referee.onShelf()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="RefereeTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/referee/referee.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | ,lang:"en" |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-6"> |
| | | <div class="layui-form-item layui-form-text"> <label class="layui-form-label">注意事项:</label> |
| | | <div class="layui-input-block"> |
| | | <textarea placeholder="请输入内容" class="layui-textarea" id="six">${six.content}</textarea> |
| | | </div> |
| | | </div> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update(${six.id});"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript"> |
| | | |
| | | function update(id){ |
| | | let six = $('#six').val(); |
| | | if (six == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(six,id); |
| | | } |
| | | |
| | | function submitData(content,id) { |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgree/updateAppParam", function(data){ |
| | | Feng.success("编辑成功!"); |
| | | },function(data){ |
| | | Feng.error("编辑失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("context", content); |
| | | ajax.set("id", id); |
| | | ajax.start(); |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">隐私协议</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">运动安全告知书</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">注销账号说明</a></li> |
| | | <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">社区世界杯报名协议</a></li> |
| | | </ul> |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="tab-5" class="tab-pane"> |
| | | <div class="panel-body"> |
| | | <textarea type="text/plain" id="editor_5" style="width:1200px;height:400px;">${five.content}</textarea> |
| | | <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="update_5(${five.id});"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | var editor_2 = null; |
| | | var editor_3 = null; |
| | | var editor_4 = null; |
| | | var editor_5 = null; |
| | | $(function () { |
| | | //初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | editor_2 = UE.getEditor('editor_2'); |
| | | editor_3 = UE.getEditor('editor_3'); |
| | | editor_4 = UE.getEditor('editor_4'); |
| | | editor_5 = UE.getEditor('editor_5'); |
| | | }); |
| | | |
| | | function update_1(id){ |
| | |
| | | } |
| | | submitData(editor_4.getContent(),id); |
| | | } |
| | | function update_5(id){ |
| | | if (editor_5.getContentTxt() == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_5.getContent(),id); |
| | | } |
| | | |
| | | function submitData(content,id) { |
| | | //提交信息 |
| | |
| | | var editor_2 = null; |
| | | var editor_3 = null; |
| | | var editor_4 = null; |
| | | var editor_5 = null; |
| | | $(function () { |
| | | //初始化编辑器 |
| | | editor_1 = UE.getEditor('editor_1'); |
| | | editor_2 = UE.getEditor('editor_2'); |
| | | editor_3 = UE.getEditor('editor_3'); |
| | | editor_4 = UE.getEditor('editor_4'); |
| | | editor_5 = UE.getEditor('editor_5'); |
| | | }); |
| | | |
| | | function update_1(id){ |
| | |
| | | } |
| | | submitData(editor_4.getContent(),id); |
| | | } |
| | | function update_5(id){ |
| | | if (editor_5.getContentTxt() == ""){ |
| | | Feng.error("内容不能为空!"); |
| | | return; |
| | | } |
| | | submitData(editor_5.getContent(),id); |
| | | } |
| | | |
| | | function submitData(content,id) { |
| | | //提交信息 |
New file |
| | |
| | | /** |
| | | * 跨城站点管理管理初始化 |
| | | */ |
| | | var Referee = { |
| | | id: "RefereeTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1, |
| | | picture:"", |
| | | fileUrl:"", |
| | | img:"", |
| | | plan:"", |
| | | goodsPicArray:[], |
| | | validateFields: { |
| | | } |
| | | }; |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | Referee.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '裁判姓名', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '所在省市', field: 'province', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"正常",2:"冻结",3:"删除"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | Referee.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | Referee.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | /** |
| | | * 商户号认证 |
| | | */ |
| | | Referee.openAddReferee = function () { |
| | | let div = '<div class="ibox-content">\n' + |
| | | ' <div class="form-horizontal" id="carInfoForm1">\n' + |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*裁判姓名:</label>\n' + |
| | | ' <div class="col-sm-9" style="display: flex;">\n' + |
| | | ' <input class="form-control" id="addName" placeholder="请输入">\n' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*手机号:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" id="addPhone" placeholder="请输入">' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*所在省:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <select class="form-control" id="addProvince" onchange="Referee.region(\'addCity\', this)"></select>' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group" >\n' + |
| | | ' <label class="col-sm-3 control-label">*所在市:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <select class="form-control" id="addCity"></select>' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>'; |
| | | layer.open({ |
| | | type: 1 |
| | | ,title: '添加裁判' |
| | | ,area: ['390px', '260px'] |
| | | ,shade: 0 |
| | | ,content: div |
| | | ,btn: ['保存', '关闭'] //只是为了演示 |
| | | ,yes: function(){ |
| | | let addName = $('#addName').val(); |
| | | let addPhone = $('#addPhone').val(); |
| | | let addProvince = $('#addProvince').val(); |
| | | let addCity = $('#addCity').val(); |
| | | if(null == addName || '' == addName){ |
| | | Feng.info("裁判姓名不能为空"); |
| | | return |
| | | } |
| | | if(null == addPhone || '' == addPhone){ |
| | | Feng.info("手机号不能为空"); |
| | | return |
| | | } |
| | | if(null == addProvince || '' == addProvince){ |
| | | Feng.info("请选择所在省"); |
| | | return |
| | | } |
| | | if(null == addCity || '' == addCity){ |
| | | Feng.info("请选择所在市"); |
| | | return |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/referee/addReferee", function (res) { |
| | | if(res.code == 200){ |
| | | Feng.success("添加成功"); |
| | | layer.closeAll(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | MgrUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | 'name': addName, |
| | | 'phone': addPhone, |
| | | 'provinceCode': addProvince, |
| | | 'cityCode': addCity |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | ,btn2: function(){ |
| | | layer.closeAll(); |
| | | } |
| | | ,success: function(){ |
| | | Referee.region('addProvince', null); |
| | | } |
| | | ,end: function(){ |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | }; |
| | | /** |
| | | * 商户号认证页面 |
| | | */ |
| | | Referee.openEditReferee = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "编辑裁判", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/referee/proportionAuth/' + Referee.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | Referee.delReferee = function (){ |
| | | if(this.check()){ |
| | | var operation = function(){ |
| | | var userId = MgrUser.seItem.id; |
| | | var ajax = new $ax(Feng.ctxPath + "/mgr/delete", function () { |
| | | if(language==1){ |
| | | Feng.success("删除成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Delete succeeded!"); |
| | | }else { |
| | | Feng.success("Hapus berhasil!"); |
| | | } |
| | | MgrUser.table.refresh(); |
| | | }, function (data) { |
| | | if(language==1){ |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }else if(language==2){ |
| | | Feng.error("Delete failed!" + data.responseJSON.message + "!"); |
| | | }else { |
| | | Feng.error("Hapus gagal!" + data.responseJSON.message + "!"); |
| | | } |
| | | }); |
| | | ajax.set("userId", userId); |
| | | ajax.start(); |
| | | }; |
| | | Feng.confirm("是否删除员工: " + MgrUser.seItem.name + "?",operation); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | Referee.onShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | console.log("查看选中") |
| | | console.log(obj) |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 1; |
| | | |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/referee/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("解冻成功!"); |
| | | Referee.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "解冻失败!"; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 下架 |
| | | */ |
| | | Referee.offShelf = function () { |
| | | if (this.check()){ |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | | state:null |
| | | }; |
| | | selected.forEach(function(obj) { |
| | | var id = obj.id; |
| | | data1.ids.push(id); |
| | | }); |
| | | data1.state = 2; |
| | | $.ajax({ |
| | | url: Feng.ctxPath + "/referee/changeState", |
| | | type: "POST", |
| | | contentType: "application/json", // 设置请求头的 Content-Type |
| | | data: JSON.stringify(data1), // 将数据转换为 JSON 字符串 |
| | | success: function(response) { |
| | | Feng.success("冻结成功!"); |
| | | Referee.search(); |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | var errorMessage = xhr.responseText ? xhr.responseText : "冻结失败!"; |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | Referee.region = function (node, e){ |
| | | let pcode = null; |
| | | if(null != e){ |
| | | pcode = $(e).val(); |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/region/getRegion", function (res) { |
| | | if(res.code == 200){ |
| | | let html = '<option value="">请选择</option>'; |
| | | for (let i = 0; i < res.data.length; i++) { |
| | | html += '<option value="' + res.data.code + '">' + res.data.name + '</option>'; |
| | | } |
| | | $('#' + node).html(html) |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | MgrUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | 'pcode': pcode |
| | | }); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | Referee.close = function() { |
| | | parent.layer.close(window.parent.Referee.layerIndex); |
| | | }; |
| | | |
| | | Referee.search = function () { |
| | | var queryData = {}; |
| | | queryData['userName'] = $("#name").val(); |
| | | queryData['phone'] =$("#phone").val(); |
| | | queryData['provinceCode'] =$("#provinceCode").val(); |
| | | queryData['cityCode'] =$("#cityCode").val(); |
| | | Referee.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | Referee.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | $("#provinceCode").val(""); |
| | | $("#cityCode").val(""); |
| | | Referee.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = Referee.initColumn(); |
| | | var table = new BSTable(Referee.id, "/referee/listAll", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | Referee.table = table.init(); |
| | | }); |
| | |
| | | List<String> condition5 = vo.getType5().getCondition(); |
| | | QueryWrapper<HonorRules> wrapper5 = new QueryWrapper<>(); |
| | | wrapper5.eq("type", type5); |
| | | List<HonorRules> list5 = hrService.list(wrapper4); |
| | | List<HonorRules> list5 = hrService.list(wrapper5); |
| | | for (int i = 0; i < list5.size(); i++) { |
| | | list5.get(i).setCondition(Integer.valueOf(condition5.get(i))); |
| | | } |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/queryProtocol") |
| | | @ApiOperation(value = "获取各种协议", tags = {"用户—登录注册"}) |
| | | @ApiOperation(value = "获取各种协议", tags = {"用户—登录注册,用户—社区世界杯,用户—个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书,4=注销协议)", name = "type", dataType = "int", required = true) |
| | | @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=运动安全公告书,4=注销协议,5=社区世界杯报名协议,6=二维码注意事项配置)", name = "type", dataType = "int", required = true) |
| | | }) |
| | | public ResultUtil<String> queryProtocol(Integer type) { |
| | | try { |