| | |
| | | @Transactional |
| | | public synchronized ResultUtil productRedemptionOperation(Integer userIdFormRedis, GoodsExchangeVo exchangeType) { |
| | | System.out.println("exchangeType:--->"); |
| | | |
| | | |
| | | |
| | | ReturnModel returnModel = new ReturnModel(); |
| | | Long returnId = null; |
| | | //如果是兑换优惠卷 |
| | |
| | | public List<ExchangeDetailsResponse> queryExchangeGoodsdetails1(Integer userIdFormRedis, Integer useType, Integer goodType, Integer page, Integer size) { |
| | | List<ExchangeDetailsResponse> detailsResponses = new ArrayList<>(); |
| | | ExchangeDetailsVo integralExchangeDetails = mcClient.getIntegralExchangeDetails(userIdFormRedis); |
| | | |
| | | |
| | | if (ToolUtil.isNotEmpty(integralExchangeDetails.getDetailsResponses())){ |
| | | detailsResponses = integralExchangeDetails.getDetailsResponses(); |
| | | if (ToolUtil.isNotEmpty(useType)){ |
| | |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int totalItems = detailsResponses.size(); |
| | | int startIndex = (page - 1) * size; |
| | | int endIndex = Math.min(startIndex + size, totalItems); |
| | |
| | | List<Integer> rid= stoClient.querySiteIdById(storeIds); |
| | | detailsResponse.setRid(rid); |
| | | } |
| | | |
| | | |
| | | }else if(merchandise.getUseScope()==3){ |
| | | // 指定门店 |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); |
| | | List<PointsMerchandiseStore> list = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>() |
| | | .eq(PointsMerchandiseStore::getPointsMerchandiseId, merchandise.getId())); |
| | | List<Integer> collect = list.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | detailsResponse.setSid(collect); |
| | | if(collect.size()>0){ |
| | | // 获取rid |
| | | List<Integer> rid= stoClient.querySiteIdById(collect); |
| | | detailsResponse.setRid(rid); |
| | | // List<Integer> rid= stoClient.querySiteIdById(collect); |
| | | //detailsResponse.setRid(rid); |
| | | // todo 修改区域id 临时 |
| | | // 根据门店id 写死区域id 后续调整为门票指定多个区域 |
| | | // 以下代码均为临时代码 |
| | | for (Integer integer : collect) { |
| | | ArrayList<Integer> list2 = new ArrayList<>(); |
| | | if (integer==2024){ |
| | | list2.add(32); |
| | | detailsResponse.setRid(list2); |
| | | } |
| | | |
| | | // 临时 根据门票id 指定的区域 |
| | | if (integer==9919){ |
| | | if (pointsMerchandise.getPointsMerchandiseId()==196||pointsMerchandise.getPointsMerchandiseId()==198){ |
| | | // 返回儿童区id |
| | | ArrayList<Integer> list3 = new ArrayList<>(); |
| | | list3.add(44); |
| | | detailsResponse.setRid(list3); |
| | | }else { |
| | | ArrayList<Integer> list3 = new ArrayList<>(); |
| | | list3.add(43); |
| | | detailsResponse.setRid(list3); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (merchandise.getCardType()==1){ |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | if(null != map){ |
| | | String code = map.get("out_trade_no"); |
| | | String trade_no = map.get("trade_no"); |
| | | |
| | | PaymentCompetition paymentCompetition = paymentCompetitionService.getOne(new QueryWrapper<PaymentCompetition>().eq("code", code).eq("payType", 2)); |
| | | if(paymentCompetition.getPayStatus() == 1){ |
| | | paymentCompetition.setAppUserId(null); |
| | |
| | | paymentCompetition.setPayTime(new Date()); |
| | | paymentCompetition.setPayOrderNo(trade_no); |
| | | paymentCompetitionService.updateById(paymentCompetition); |
| | | |
| | | Competition competition = cttService.getById(paymentCompetition.getCompetitionId()); |
| | | competition.setApplicantsNumber(competition.getApplicantsNumber() + 1); |
| | | cttService.updateById(competition); |
| | |
| | | wrapper.lt(Competition::getStartTime,listQuery.getTime().split(" - ")[0]+" 00:00:00"); |
| | | wrapper.gt(Competition::getEndTime,listQuery.getTime().split(" - ")[1]+" 23:59:59"); |
| | | } |
| | | |
| | | if(ToolUtil.isNotEmpty(listQuery.getRegisterCondition())){ |
| | | wrapper.eq(Competition::getRegisterCondition,listQuery.getRegisterCondition()); |
| | | } |
| | | |
| | | wrapper.in(Competition::getStoreId,listQuery.getIds()); |
| | | // 平台查询审核通过的赛事 |
| | | if (listQuery.getObj()==1){ |
| | | wrapper.eq(Competition::getAuditStatus,2); |
| | | } |
| | | // 赛事审核 |
| | | if (listQuery.getObj()==-1){ |
| | | wrapper.ne(Competition::getAuditStatus,2); |
| | | } |
| | | wrapper.in(Competition::getStoreId,listQuery.getIds()); |
| | | wrapper.orderByDesc(Competition::getInsertTime); |
| | | |
| | | Page<Competition> page = cttService.page(competitionPage, wrapper); |
| | | for (Competition record : page.getRecords()) { |
| | | |
| | | // 查询当前赛事有多少人报名了 |
| | | List<UserCompetition> competitionId = ucttService.list(new QueryWrapper<UserCompetition>() |
| | | .eq("competitionId", record.getId())); |
| | |
| | | private Integer state; |
| | | private Integer registerCondition; |
| | | private List<Integer> ids; |
| | | |
| | | // 角色类型 如果是平台1的话 查询审核通过的 如果是运营商查询所有属于 |
| | | private Integer obj; |
| | | } |
| | |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | @Autowired |
| | | private TOrderService orderService; |
| | | |
| | | private final SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm"); |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/base/coursePackagePayment/add") |
| | | public Object addCoursePackagePayment(@RequestBody TCoursePackagePayment packagePayment){ |
| | | |
| | | packagePayment.setInsertTime(new Date()); |
| | | packagePayment.setInsertTime(new Date()); |
| | | Integer studentId = packagePayment.getStudentId(); |
| | |
| | | coursePackageStudent.setAppUserId(packagePayment.getAppUserId()); |
| | | packagePaymentService.save(packagePayment); |
| | | coursePackageStudent.setCoursePackagePaymentId(packagePayment.getId()); |
| | | |
| | | return coursePackageStudentService.save(coursePackageStudent); |
| | | } |
| | | /** |
| | |
| | | for (TCoursePackagePayment tCoursePackagePayment : list1) { |
| | | for (TCoursePackage tCoursePackage : list2) { |
| | | if(tCoursePackagePayment.getCoursePackageId().equals(tCoursePackage.getId())){ |
| | | tCoursePackagePayment.setType(tCoursePackage.getType()); |
| | | tCoursePackagePayment.setType(tCoursePackage.getCoursePackageTypeId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.listOne(userPt); |
| | | int sum = tCoursePackagePayments.stream().mapToInt(TCoursePackagePayment::getTotalClassHours).sum(); |
| | | int sum1 = tCoursePackagePayments.stream().mapToInt(TCoursePackagePayment::getLaveClassHours).sum(); |
| | | // 查询介绍有礼课时数量 |
| | | map.put("allCourse",sum-sum1); |
| | | |
| | | //所有课包 |
| | |
| | | </select> |
| | | |
| | | <select id="listOne" resultType="com.dsh.course.entity.TCoursePackagePayment"> |
| | | select * from t_course_package_payment where appUserId in <foreach collection="ids" separator="," open="(" item="id" close=")">#{id}</foreach> |
| | | select * from t_course_package_payment where appUserId in |
| | | <foreach collection="ids" separator="," open="(" item="id" close=")">#{id}</foreach> |
| | | </select> |
| | | <select id="queryStore" resultType="java.lang.Integer"> |
| | | SELECT |
| | |
| | | private Integer state; |
| | | private Integer registerCondition ; |
| | | private List<Integer> ids; |
| | | |
| | | // 角色类型 如果是平台1的话 查询审核通过的 如果是运营商查询所有属于 |
| | | private Integer obj; |
| | | } |
| | |
| | | import com.dsh.course.dto.StudentSearch; |
| | | import com.dsh.course.dto.TStudentDto; |
| | | import com.dsh.course.feignClient.other.model.Banner; |
| | | import com.dsh.course.feignClient.other.model.GameDataQuery; |
| | | import com.dsh.course.feignClient.other.model.TGameRecord; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.BallQueryDto; |
| | | import com.dsh.guns.modular.system.model.dto.BookingQuery; |
| | |
| | | |
| | | @FeignClient(value = "mb-cloud-other") |
| | | public interface BallClient { |
| | | |
| | | // 数据统计 |
| | | @PostMapping("/student/getData") |
| | | List<TGameRecord> getData(@RequestBody GameDataQuery query); |
| | | // 根据门店ids 获取游戏记录 |
| | | @PostMapping("/game/getGameByStoreIds") |
| | | List<Integer> getGameByStoreIds(@RequestBody List<Integer> storeIds); |
New file |
| | |
| | | package com.dsh.course.feignClient.other.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class GameDataQuery { |
| | | Integer objectId; |
| | | Integer storeId; |
| | | } |
New file |
| | |
| | | package com.dsh.course.feignClient.other.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.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-10-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_game_record") |
| | | public class TGameRecord extends Model<TGameRecord> { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("userId") |
| | | private Integer userId; |
| | | |
| | | @TableField("gameId") |
| | | private Integer gameId; |
| | | |
| | | /** |
| | | * 1玩湃币 2微信 3支付宝 |
| | | */ |
| | | @TableField("payType") |
| | | private Integer payType; |
| | | |
| | | /** |
| | | * 金额 |
| | | */ |
| | | private BigDecimal money; |
| | | |
| | | /** |
| | | * 0待支付 1已支付 |
| | | */ |
| | | private Integer status; |
| | | |
| | | private String number; |
| | | @TableField("orderNo") |
| | | private String orderNo; |
| | | |
| | | private Date time; |
| | | |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.alibaba.druid.sql.visitor.functions.If; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | |
| | | import com.dsh.course.feignClient.account.model.CoachType; |
| | | import com.dsh.course.feignClient.other.model.Site; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.CoachChangeStateVO; |
| | | import com.dsh.guns.modular.system.model.CoachQuery; |
| | | import com.dsh.guns.modular.system.model.Store; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import org.bouncycastle.math.raw.Mod; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | private CoachClient coachClient; |
| | | @Autowired |
| | | private CityManagerClient cityManagerClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private TOperatorCityService operatorCityService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | /** |
| | | * 跳转教练管理首页 |
| | |
| | | */ |
| | | @RequestMapping("/addCoach") |
| | | public String addCoach(Model model) { |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | } |
| | | } |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list1); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | CoachQuery coachQuery = new CoachQuery(); |
| | |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("data",data); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("coachType",list); |
| | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/add") |
| | | public ResultUtil addCoach(@RequestBody Coach coach) { |
| | | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | coach.setCityManagerId(objectId); |
| | |
| | | coachClient.changeState(vo); |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |
| | | * 根据选择的市 查询有哪些运营商管理了所选的市 |
| | | * |
| | | * @return |
| | | */ |
| | | @RequestMapping("/getYys") |
| | | @ResponseBody |
| | | public Object getYys(String pCode,String cCode){ |
| | | // 先获取管理全国的运营商 |
| | | List<TOperator> type = operatorService.list(new QueryWrapper<TOperator>().eq("type", 1)); |
| | | // 根据所选市 查询管理了这个市的运营商 |
| | | // 获取管理指定区域的运营商的ID 然后去重 |
| | | List<Integer> collect = operatorCityService.list(new QueryWrapper<TOperatorCity>()).stream().map(TOperatorCity::getOperatorId) |
| | | .distinct().collect(Collectors.toList()); |
| | | // 遍历 判断当前运营商是否管理了所选市 |
| | | for (Integer integer : collect) { |
| | | // 查询是否管理了省 |
| | | TOperatorCity code = operatorCityService.getOne(new QueryWrapper<TOperatorCity>().eq("code", pCode).eq("operatorId",integer)); |
| | | if (code==null)continue; |
| | | List<TOperatorCity> pid = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("pid", code.getId())); |
| | | // 如果pid长度为0 则说明管理整个省 |
| | | if (pid.size()==0){ |
| | | type.add(operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id",integer))); |
| | | } |
| | | for (TOperatorCity tOperatorCity : pid) { |
| | | if (tOperatorCity.getCode().toString().equals(cCode)){ |
| | | TOperator id = operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id", tOperatorCity.getOperatorId())); |
| | | if (id!=null)type.add(id); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return type; |
| | | } |
| | | |
| | | /** |
| | | * 跳转修改教练页面 |
| | |
| | | CoachQuery coachQuery = new CoachQuery(); |
| | | coachQuery.setId(id); |
| | | List<CoachSerchVO> data = coachClient.listAll(coachQuery); |
| | | List<CityManager> province = cityManagerClient.listAll(); |
| | | Set<String> seenNames = new HashSet<>(); |
| | | List<CityManager> result = new ArrayList<>(); |
| | | List<CityManager> city = new ArrayList<>(); |
| | | for (CityManager cityManager : province) { |
| | | if(!seenNames.contains(cityManager.getProvince())){ |
| | | result.add(cityManager); |
| | | seenNames.add(cityManager.getProvince()); |
| | | List<TCity> list1 = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | // 省 |
| | | model.addAttribute("list",list1); |
| | | // 市 |
| | | Integer code = cityService.getOne(new QueryWrapper<TCity>() |
| | | .eq("code", data.get(0).getProvinceCode())).getId(); |
| | | |
| | | List<TCity> pid = cityService.list(new QueryWrapper<TCity>().eq("parent_id", code)); |
| | | model.addAttribute("city",pid); |
| | | // 获取所选省市下的运营商列表 |
| | | // 先获取管理全国的运营商 |
| | | List<TOperator> type = operatorService.list(new QueryWrapper<TOperator>().eq("type", 1)); |
| | | // 根据所选市 查询管理了这个市的运营商 |
| | | // 获取管理指定区域的运营商的ID 然后去重 |
| | | List<Integer> collect = operatorCityService.list(new QueryWrapper<TOperatorCity>()).stream().map(TOperatorCity::getOperatorId) |
| | | .distinct().collect(Collectors.toList()); |
| | | // 遍历 判断当前运营商是否管理了所选市 |
| | | for (Integer integer : collect) { |
| | | // 查询是否管理了省 |
| | | TOperatorCity code1 = operatorCityService.getOne(new QueryWrapper<TOperatorCity>() |
| | | .eq("code", data.get(0).getProvinceCode()) |
| | | .eq("operatorId",integer) |
| | | ); |
| | | if (code1==null)continue; |
| | | List<TOperatorCity> pid1 = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("pid", code1.getId())); |
| | | // 如果pid长度为0 则说明管理整个省 |
| | | if (pid1.size()==0){ |
| | | type.add(operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id",integer))); |
| | | } |
| | | if(data.get(0).getProvince().equals(cityManager.getProvince())){ |
| | | city.add(cityManager); |
| | | for (TOperatorCity tOperatorCity : pid1) { |
| | | if (tOperatorCity.getCode().toString().equals(data.get(0).getCityCode())){ |
| | | TOperator id1 = operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id", tOperatorCity.getOperatorId())); |
| | | if (id1!=null)type.add(id1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | List<CityManager> accounts = cityManagerClient.getAccount(data.get(0).getCity()); |
| | | List<CoachType> list = coachTypeClient.list(); |
| | | String roleid = UserExt.getUser().getRoleid(); |
| | | model.addAttribute("role",roleid); |
| | | model.addAttribute("data",data.get(0)); |
| | | model.addAttribute("list",result); |
| | | model.addAttribute("city",city); |
| | | model.addAttribute("cityManagers",accounts); |
| | | model.addAttribute("cityManagers",type); |
| | | model.addAttribute("objectType",objectType); |
| | | model.addAttribute("objectId",objectId); |
| | | model.addAttribute("coachType",list); |
| | |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | coachQuery.setOperatorId(objectId); |
| | | } |
| | | |
| | | return coachClient.listAll(coachQuery); |
| | | List<CoachSerchVO> coachSerchVOS = coachClient.listAll(coachQuery); |
| | | for (CoachSerchVO coachSerchVO : coachSerchVOS) { |
| | | Integer cityManagerId = coachSerchVO.getCityManagerId(); |
| | | TOperator byId = operatorService.getById(cityManagerId); |
| | | Integer userId = byId.getUserId(); |
| | | User byId1 = userService.getById(userId); |
| | | coachSerchVO.setNameAndPhone(byId.getName()+""+byId1.getPhone()); |
| | | } |
| | | return coachSerchVOS; |
| | | } |
| | | } |
| | |
| | | import com.dsh.course.feignClient.course.*; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackagePayment; |
| | | import com.dsh.course.feignClient.other.BallClient; |
| | | import com.dsh.course.feignClient.other.SiteClient; |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.feignClient.other.model.GameDataQuery; |
| | | import com.dsh.course.feignClient.other.model.TGameRecord; |
| | | import com.dsh.course.model.MoneyBack; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | |
| | | private CoursePackageClient coursePackageClient; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private BallClient ballClient; |
| | | /** |
| | | * 跳转到平台统计数据页面 |
| | | */ |
| | |
| | | public String index(Model model) { |
| | | Object o = type1(null); |
| | | model.addAttribute("data",o); |
| | | |
| | | |
| | | |
| | | // 教学统计 |
| | | HashMap<String, Object> map = appUserClient.queryUserAge(); |
| | | model.addAttribute("stuData",map); |
| | | |
| | | |
| | | |
| | | return PREFIX + "platformIncome.html"; |
| | | } |
| | | |
| | |
| | | IncomeQuery incomeQuery = new IncomeQuery(); |
| | | // 场地预约记录查询query |
| | | SiteBookingQuery siteBookingQuery = new SiteBookingQuery(); |
| | | // 智慧球场查询query |
| | | GameDataQuery gameDataQuery = new GameDataQuery(); |
| | | // 筛选运营商的是时候使用 |
| | | List<Integer> storeIds = new ArrayList<>(); |
| | | // 根据运营商ID 查询运营商下的所有门店 |
| | |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if (vipPayment.getPayStatus()==1){ |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | if (vipPayment.getState()!=3){ |
| | | temp.setInsertTime(vipPayment.getPayTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | if (vipPayment.getAmount() != null) { |
| | |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | temp.setInsertTime(rechargeRecordsVO.getPayTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | if (rechargeRecordsVO.getPayStatus() ==1){ |
| | | if (rechargeRecordsVO.getState() !=3){ |
| | | incomeVOS.add(temp); |
| | | } |
| | | |
| | | } |
| | | // 报名课程记录 |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | |
| | | } |
| | | } |
| | | // query权限设置 获取运营商下的门店集合 |
| | | |
| | | if (roleType==2){ |
| | | competitionQuery.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | |
| | | if (competition.getPayType()==3 || competition.getPayType()==4){ |
| | | continue; |
| | | } |
| | | if (competition.getState()==3)continue; |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | temp.setInsertTime(competition.getPayTime()); |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | |
| | | List<SiteBooking> siteBookings = siteClient.listAll(siteBookingQuery); |
| | | for (SiteBooking siteBooking : siteBookings) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | if(siteBooking.getStatus()!=3){ |
| | | if(siteBooking.getStatus()==0 || siteBooking.getStatus()==5){ |
| | | continue; |
| | | } |
| | | if (siteBooking.getPayType() ==3 || siteBooking.getPayType() ==4)continue; |
| | | temp.setInsertTime(siteBooking.getPayTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | |
| | | temp.setInsertTime(pointMerchandiseIncomeVo.getInsertTime()); |
| | | if (pointMerchandiseIncomeVo.getCash()!=null){ |
| | | temp.setAmount(pointMerchandiseIncomeVo.getCash()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | // 平台智慧球场 |
| | | if (storeId==null&&operatorId==null){ |
| | | gameDataQuery.setObjectId(0); |
| | | List<TGameRecord> data = ballClient.getData(gameDataQuery); |
| | | for (TGameRecord datum : data) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setAmount(datum.getMoney()); |
| | | temp.setInsertTime(datum.getTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | // 运营商 |
| | | if (operatorId!=null && storeId==null){ |
| | | gameDataQuery.setObjectId(operatorId); |
| | | List<TGameRecord> data = ballClient.getData(gameDataQuery); |
| | | for (TGameRecord datum : data) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setAmount(datum.getMoney()); |
| | | temp.setInsertTime(datum.getTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | // 门店 |
| | | if (storeId!=null){ |
| | | gameDataQuery.setStoreId(storeId); |
| | | List<TGameRecord> data = ballClient.getData(gameDataQuery); |
| | | for (TGameRecord datum : data) { |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setAmount(datum.getMoney()); |
| | | temp.setInsertTime(datum.getTime()); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | // 会员费 |
| | | HashMap<String, Object> map1 = appUserClient.queryFee(queryDataFee); |
| | | Object fee1 = map1.get("fee1"); |
| | | |
| | | map.put("fee1",fee1); |
| | | //玩湃比 |
| | | Object fee2 = map1.get("fee2"); |
| | |
| | | map.put("fee3",map3.get("fee")); |
| | | Object data = map3.get("data"); |
| | | map.put("courseData",data); |
| | | |
| | | |
| | | // 赛事收入 |
| | | Double aDouble1 = competitionClient.queryFee(queryDataFee); |
| | | map.put("fee4",aDouble1); |
| | | |
| | | // 订场 |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | |
| | | if(userIds.size()==0){ |
| | | userIds.add(-1); |
| | | } |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getAppUserId,userIds); |
| | | vipPaymentLambdaQueryWrapper.ne(SiteBooking::getStatus,0); |
| | | vipPaymentLambdaQueryWrapper.ne(SiteBooking::getStatus,5); |
| | | ArrayList<Integer> objects = new ArrayList<>(); |
| | | objects.add(1); |
| | | objects.add(2); |
| | | vipPaymentLambdaQueryWrapper.in(SiteBooking::getPayType,objects); |
| | | List<SiteBooking> list1 = siteBookingService.list(vipPaymentLambdaQueryWrapper); |
| | | List<SiteBooking> list1 = siteBookingService.list(new QueryWrapper<SiteBooking>() |
| | | .ne("status",0) |
| | | .ne("status",5) |
| | | .ne("payType",3) |
| | | .ne("payType",4)); |
| | | double sum = list1.stream().mapToDouble(SiteBooking::getPayMoney).sum(); |
| | | map.put("fee5",sum); |
| | | // 智慧球场查询query |
| | | GameDataQuery gameDataQuery = new GameDataQuery(); |
| | | gameDataQuery.setObjectId(0); |
| | | // 平台智慧球场 |
| | | List<TGameRecord> data1 = ballClient.getData(gameDataQuery); |
| | | double sum1 = data1.stream() |
| | | .map(TGameRecord::getMoney) // 获取每个 TGameRecord 对象的 money 字段 |
| | | .mapToDouble(BigDecimal::doubleValue) // 将 BigDecimal 转换为 double |
| | | .sum(); |
| | | map.put("fee5",sum+sum1); |
| | | |
| | | |
| | | List<Integer> collect = list1.stream().map(SiteBooking::getSiteId).collect(Collectors.toList()); |
| | |
| | | ids.add(-1); |
| | | } |
| | | Page<Competition> page = new PageFactory<Competition>().defaultPage(); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids,0); |
| | | Page<Competition> competitions = competitionClient.listAudit(listQuery); |
| | | for (Competition competition : competitions.getRecords()) { |
| | | for (TStore tStore : list) { |
| | |
| | | model.addAttribute("province",list4); |
| | | } |
| | | model.addAttribute("operator",objectId); |
| | | // 查询当前运营商管理了哪些门店 |
| | | List<TStore> stores = storeService |
| | | .list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())); |
| | | model.addAttribute("stores",stores); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==1) model.addAttribute("operator",0); |
| | | TStore byId = storeService.getById(UserExt.getUser().getObjectId()); |
| | | if (UserExt.getUser().getObjectType()==3) model.addAttribute("operator",byId.getOperatorId()); |
| | | List<TOperator> list2 = tOperatorService.list(); |
| | | model.addAttribute("yysList",list2); |
| | | return PREFIX + "TCompetition_add.html"; |
| | | } |
| | | |
| | |
| | | ids = operatorId; |
| | | } |
| | | Page<Competition> page = new PageFactory<Competition>().defaultPage(); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids); |
| | | ListQuery listQuery = new ListQuery(page.getSize(),page.getCurrent(),provinceCode,cityCode,eventName,time,state,registerCondition,ids,UserExt.getUser().getObjectType()); |
| | | Page<Competition> competitions = competitionClient.list(listQuery); |
| | | List<Competition> records = new ArrayList<>(); |
| | | for (Competition competition : competitions.getRecords()) { |
| | |
| | | @RequestMapping("/getProvinceYys") |
| | | @ResponseBody |
| | | public Object getProvinceYys(Integer operatorId) { |
| | | // 判断当前运营商是管理全国还是指定区域 |
| | | TOperator byId = tOperatorService.getById(operatorId); |
| | | // 说明是管理全国 |
| | | if (byId.getType()==1){ |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | return list; |
| | | }else{ |
| | | // 获取运营商管理的所有省 |
| | | List<TOperatorCity> list = operatorCityService.list(new QueryWrapper<TOperatorCity>().eq("operatorId", operatorId) |
| | | .eq("pid", 0)); |
| | | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | } |
| | | // 运营商根据省筛选市区 |
| | | @RequestMapping("/getCityYys") |
| | |
| | | @ResponseBody |
| | | public Object list(TStore tStore,String time,String userName,String userPhone,String ids,Integer type,Integer yyId,String lat,String lon,String pCode1,String cCode1) { |
| | | try { |
| | | |
| | | |
| | | if(yyId==null || type==1){ |
| | | yyId=0; |
| | | } |
| | |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | tStore.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | | storeService.save(tStore); |
| | | |
| | | user.setObjectId(tStore.getId()); |
| | | userService.updateById(user); |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | |
| | | storeConfigs.add(storeConfig); |
| | | } |
| | | storeConfigService.saveBatch(storeConfigs); |
| | | // 添加场地 |
| | | TSite tSite = new TSite(); |
| | | tSite.setName(tStore.getName()); |
| | | tSite.setStoreId(tStore.getId()); |
| | | tSite.setSign(1); |
| | | siteService.save(tSite); |
| | | |
| | | HashMap<String, String> mapSite = new HashMap<>(); |
| | | mapSite.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | mapSite.put("name",tStore.getName()); |
| | | mapSite.put("space_id",tStore.getId().toString()); |
| | | mapSite.put("area_id",tSite.getId().toString()); |
| | | HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", mapSite); |
| | | // 添加门店 |
| | | HashMap<String, String> map1 = new HashMap<>(); |
| | | map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | |
| | | map1.put("remark",tStore.getIntroduce()); |
| | | map1.put("lat",tStore.getLat()); |
| | | map1.put("lng",tStore.getLon()); |
| | | map1.put("space_id",tStore.getId().toString()); |
| | | String result = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map1); |
| | | System.out.println(result); |
| | | |
| | | |
| | | |
| | | for (String s : tStore.getIds().split(",")) { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",tStore.getId()+""); |
| | | map.put("device_id",s); |
| | | map.put("region_id",tSite.getId().toString()); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | System.out.println(s1); |
| | | } |
| | | |
| | | |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | String space_id = data.getString("space_id"); |
| | | Integer integer = Integer.valueOf(space_id); |
| | | tStore.setId(integer); |
| | | storeService.save(tStore); |
| | | System.err.println(tStore); |
| | | // HashMap<String, String> mapSite = new HashMap<>(); |
| | | // mapSite.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // mapSite.put("name",tStore.getName()); |
| | | // mapSite.put("space_id",tStore.getId().toString()); |
| | | // mapSite.put("area_id",tSite.getId().toString()); |
| | | // HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", mapSite); |
| | | // for (String s : tStore.getIds().split(",")) { |
| | | // HashMap<String, String> map = new HashMap<>(); |
| | | // map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | // map.put("space_id",tStore.getId()+""); |
| | | // map.put("device_id",s); |
| | | // map.put("region_id",tSite.getId().toString()); |
| | | // // 添加门禁 |
| | | // String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | // System.out.println(s1); |
| | | // } |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | site.setInsertTime(new Date()); |
| | | site.setState(1); |
| | | site.setOperatorId(UserExt.getUser().getObjectId()); |
| | | Integer integer1 = siteClient.addSite(site); |
| | | |
| | | |
| | | // 添加场地 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",store.getId().toString()); |
| | | map.put("area_id",integer1.toString()); |
| | | String s = HttpRequestUtil.postRequest |
| | | ("https://try.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.addSite(site); |
| | | // Integer integer = Integer.valueOf(spaceId); |
| | | if(StringUtils.hasLength( site.getIds())) { |
| | | for (String s1 : site.getIds().split(",")) { |
| | |
| | | @TableName("t_store") |
| | | @Data |
| | | public class TStore { |
| | | @TableId(type = IdType.AUTO) |
| | | @TableId(type = IdType.INPUT) |
| | | private Integer id; |
| | | @TableField("name") |
| | | private String name; |
| | |
| | | $("#t1").val("") |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | $("#page").val("") |
| | | $("#type").val("") |
| | | $("#pageId").val("") |
| | | }else { |
| | | $("#t1").show() |
| | | $("#t2").show() |
| | |
| | | |
| | | |
| | | function updateOne(e) { |
| | | console.log("看看选择页面") |
| | | console.log($('#page option:selected').text()) |
| | | if ($('#page option:selected').text()=="门店列表"){ |
| | | var page= $('#page option:selected').text(); |
| | | if (page=="门店列表" || page=="主页" || page=="充值中心"){ |
| | | $("#t3").hide(); |
| | | $("#t2").hide(); |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | $("#type").val("") |
| | | $("#pageId").val("") |
| | | } |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/typeChangeOne", function(data){ |
| | |
| | | console.log("=-======0000") |
| | | $("#t2").val("") |
| | | $("#t2").hide() |
| | | $("#type").val("") |
| | | |
| | | } |
| | | }); |
| | | if (oneId==2 || oneId==25|| oneId==27){ |
| | | $("#t3").val("") |
| | | $("#t3").hide() |
| | | |
| | | $("#pageId").val("") |
| | | } |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | |
| | | if (oneId!="详情"&&oneId!="指定商品"&&oneId!="指定折扣"){ |
| | | $("#t3").hide() |
| | | $("#t3").val("") |
| | | $("#pageId").val("") |
| | | |
| | | }else{ |
| | | $("#t3").show() |
| | |
| | | } |
| | | } |
| | | window.onload = function() { |
| | | if ($('#model option:selected').text()=="不跳转"){ |
| | | $("#t1").hide(); |
| | | $("#t2").hide(); |
| | | $("#t3").hide(); |
| | | $("#page").val("") |
| | | $("#type").val("") |
| | | $("#pageId").val("") |
| | | } |
| | | |
| | | var temp = $("#turnId").val(); |
| | | var res= document.getElementById("imgPX"); |
| | | res.innerHTML ="推荐像素:780x472px"; |
| | | if (temp==""){ |
| | | $("#t3").hide(); |
| | | $("#t3").val("") |
| | | $("#pageId").val("") |
| | | } |
| | | // 查看跳转页面 有没有跳转类型 |
| | | var page = $('#page option:selected').text(); |
| | | if (page=="门店列表" || page=="主页" || page=="充值中心" ){ |
| | | $("#t2").hide(); |
| | | $("#t3").hide(); |
| | | $("#t2").val("") |
| | | $("#t3").val("") |
| | | $("#type").val("") |
| | | $("#pageId").val("") |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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"> |
| | | <div class="form-group"> |
| | | <div class="col-sm-10"> |
| | | <h2>营收数据1</h2> |
| | | <h2>营收数据</h2> |
| | | </br> |
| | | <div id = "money1" style="width: 1500px" > |
| | | <span id="totalIncome">总营收:</span> |
| | |
| | | <script src="${ctxPath}/modular/system/dataStatistics/echarts.min.js"></script> |
| | | <script src="${ctxPath}/static/js/plugins/switchery/switchery.js"></script> |
| | | <script> |
| | | function search1() { |
| | | var time = $("#beginTime").val(); |
| | | var ajax9 = new $ax(Feng.ctxPath + "/data/type1", function(data){ |
| | | |
| | | }); |
| | | ajax9.set("time",time); |
| | | ajax9.start(); |
| | | } |
| | | var ans = []; |
| | | var weekX = ["1周","2周","3周","4周"]; |
| | | var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]; |
| | |
| | | var myChart1 = echarts.init(document.getElementById('refund')); |
| | | |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | |
| | | |
| | | var ajax3 = new $ax(Feng.ctxPath + "/data/backPt", function(data){ |
| | | $("#back1").text(data.thisYear); |
| | | $("#back2").text(data.thisMonth); |
| | |
| | | ajax4.start(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | option7 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度耗课数量', '月度耗课数量', '周度耗课数量', '日度耗课数量'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度耗课数量', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330] |
| | | }, |
| | | { |
| | | name: '月度耗课数量', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160] |
| | | }, |
| | | { |
| | | name: '周度耗课数量', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188] |
| | | }, |
| | | { |
| | | name: '日度耗课数量', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160] |
| | | } |
| | | ] |
| | | }; |
| | | myChart.on('legendselectchanged', obj => { |
| | | var options = myChart.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | |
| | | } |
| | | myChart6.setOption(options, true) |
| | | }); |
| | | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/stuPt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allUser").text(data.allUser) |
| | | |
| | | option6 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | }); |
| | | ajax2.start() |
| | | myChart6.setOption(option6); |
| | | } |
| | | |
| | | |
| | | function ptCourse() { |
| | | console.log("调用") |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | myChart7.on('legendselectchanged', obj => { |
| | | var options = myChart7.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | console.log("看看选择") |
| | | console.log(obj.name) |
| | | if (obj.name == '年度耗课数量') { |
| | | console.log("看看年度轴") |
| | | options.xAxis[0].data = yearX |
| | | console.log(yearX) |
| | | } else if (obj.name == '月度耗课数量') { |
| | | console.log("看看月度轴") |
| | | options.xAxis[0].data = monthX |
| | | console.log(monthX) |
| | | }else if (obj.name == '周度耗课数量') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度耗课数量') { |
| | | console.log("看看日度轴") |
| | | options.xAxis[0].data = dataX |
| | | console.log(dataX) |
| | | } |
| | | myChart7.setOption(options, true) |
| | | }); |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | option7 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | |
| | | name: '周度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | data: data.weekData |
| | | }, |
| | | { |
| | | name: '日度耗课数', |
| | |
| | | ] |
| | | }; |
| | | }); |
| | | console.log("调用") |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | myChart7.on('legendselectchanged', obj => { |
| | | var options = myChart7.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | console.log("看看选择") |
| | | console.log(obj.name) |
| | | if (obj.name == '年度耗课数') { |
| | | console.log("看看年度轴") |
| | | options.xAxis[0].data = yearX |
| | | console.log(yearX) |
| | | } else if (obj.name == '月度耗课数') { |
| | | console.log("看看月度轴") |
| | | options.xAxis[0].data = monthX |
| | | console.log(monthX) |
| | | }else if (obj.name == '周度耗课数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度耗课数') { |
| | | console.log("看看日度轴") |
| | | options.xAxis[0].data = dataX |
| | | console.log(dataX) |
| | | } |
| | | myChart7.setOption(options, true) |
| | | }); |
| | | ajax2.start() |
| | | myChart7.setOption(option7); |
| | | } |
| | | |
| | | function ptCourse() { |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){ |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | console.log("周度") |
| | | console.log(data.weekData) |
| | | option7 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度耗课数', '月度耗课数', '周度耗课数', '日度耗课数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度耗课数: true, |
| | | 月度耗课数: false, |
| | | 周度耗课数: false, |
| | | 日度耗课数: false |
| | | }, |
| | | }, |
| | | 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: data.yearData |
| | | }, |
| | | { |
| | | name: '月度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.weekData |
| | | }, |
| | | { |
| | | name: '日度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | console.log("调用") |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | myChart7.on('legendselectchanged', obj => { |
| | | var options = myChart7.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | console.log("看看选择") |
| | | console.log(obj.name) |
| | | if (obj.name == '年度耗课数') { |
| | | console.log("看看年度轴") |
| | | options.xAxis[0].data = yearX |
| | | console.log(yearX) |
| | | } else if (obj.name == '月度耗课数') { |
| | | console.log("看看月度轴") |
| | | options.xAxis[0].data = monthX |
| | | console.log(monthX) |
| | | }else if (obj.name == '周度耗课数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度耗课数') { |
| | | console.log("看看日度轴") |
| | | options.xAxis[0].data = dataX |
| | | console.log(dataX) |
| | | } |
| | | myChart7.setOption(options, true) |
| | | }); |
| | | |
| | | |
| | | ajax2.start() |
| | | myChart7.setOption(option7); |
| | | } |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input hidden id="role" value="${role}"> |
| | | @if(objectType==1){ |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TSite.oneChange()"> |
| | | <option value="">请选择省</option> |
| | | @for(obj in list){ |
| | | <option style="width: 300px" value="${obj.provinceCode}">${obj.province}</option> |
| | | <option style="width: 300px" value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(objectType==1){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*所属账号:</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="pCode" name="pCode" onchange="TSite.oneChange()"> |
| | | @for(obj in list){ |
| | | <option value="${obj.provinceCode}" ${obj.province == data.province ? 'selected=selected' : ''}>${obj.province}</option> |
| | | <option value="${obj.code}" ${obj.code == data.provinceCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | <div class="col-sm-9"> |
| | | <select style="width: 300px" class="form-control" id="cCode" name="cCode" onchange="TSite.oneChangeNext(this)"> |
| | | @for(obj in city){ |
| | | <option value="${obj.cityCode}" ${obj.city == data.city ? 'selected=selected' : ''}>${obj.city}</option> |
| | | <option value="${obj.code}" ${obj.code == data.cityCode ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | |
| | | </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="name" value="${data.name}" placeholder="请输入姓名" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*生日:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | let id = "${pictures}" |
| | | let obj = [] |
| | | $(function() { |
| | | var id = "${pictures}" |
| | | }) |
| | | var id = "${pictures}" |
| | | var obj = [] |
| | | var vue2 = new Vue({ |
| | | el: '#app1', |
| | | props: { |
| | |
| | | }); |
| | | }, |
| | | changeImg(){ |
| | | console.log("看看id") |
| | | console.log(id) |
| | | var i = id.split(",") |
| | | console.log("看看后端返回的图片") |
| | | console.log(i.length) |
| | | console.log(i) |
| | | for (let j = 0; j <i.length; j++) { |
| | | let obj={ |
| | | fileName:i[j], |
| | |
| | | response:i[j], |
| | | } |
| | | this.imageUrl2.push(obj) |
| | | console.log("看看res") |
| | | console.log(obj.response); |
| | | TSite.goodsPicArray.push(obj.response) |
| | | } |
| | | console.log(this.imageUrl2) |
| | | }, |
| | | }, |
| | | created() { |
| | | this.changeImg() |
| | | TSite.goodsPicArray = this.imageUrl2 |
| | | console.log("看看执行") |
| | | var temp = [] |
| | | for (let i = 0; i < TSite.goodsPicArray.length; i++) { |
| | | temp.push(TSite.goodsPicArray[i].response) |
| | | } |
| | | TSite.goodsPicArray = temp; |
| | | console.log("赋值") |
| | | console.log(TSite.goodsPicArray) |
| | | }, |
| | | }); |
| | |
| | | <div class="ibox-title"> |
| | | <h5>赛事管理</h5> |
| | | </div> |
| | | |
| | | <input hidden id="type" value="${type}"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | |
| | | |
| | | @if(type==1){ |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label" id="yys1">所属运营商:</label> |
| | | <label class="col-sm-3 control-label">*门店类型:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="type" value="1" onclick="updateType(1)" checked > 平台门店 |
| | | <input type="radio" name="type" value="2" onclick="updateType(2)" id="radio1" > 运营商门店 |
| | | </div> |
| | | </div> |
| | | <div id="yys" hidden> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属运营商:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="account" name="account" onchange="TCarInfoDlg.oneChange3(this)"> |
| | | <option value="">选择运营商</option> |
| | |
| | | <option value="${i.id}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | <input type="checkbox" value="0" name="pt" id="pt" onchange="TCarInfoDlg.oneChangeYys(this)">平台</input> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="provinceCode"> |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange9(this)"> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(type==2){ |
| | | <div class="form-group" id="provinceCode"> |
| | | </div> |
| | | |
| | | <div id="yys1"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">所在省:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange9(this)"> |
| | | <select class="form-control" id="pCode1" name="pCode" onchange="TCarInfoDlg.oneChange9(this)"> |
| | | <option value="">选择省</option> |
| | | @for(i in province){ |
| | | @for(i in list){ |
| | | <option value="${i.code}">${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="cityCode"> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">举办市:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="cCode" name="cCode" onchange="TCarInfoDlg.oneChangeNext9(this)"> |
| | | <select class="form-control" id="cCode1" name="cCode" onchange="TCarInfoDlg.oneChangeNext(this)"> |
| | | <option value="">选择市</option> |
| | | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | @} |
| | | @if(type==1){ |
| | | <div class="form-group" id="shop"> |
| | |
| | | <label class="col-sm-3 control-label">举办门店:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="shopId" name="shopId" multiple> |
| | | |
| | | <option value="">选择门店</option> |
| | | @for(i in stores){ |
| | | <option value="${i.id}" >${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">支付方式:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="checkbox" onclick="updateType(1,this)"> 现金支付 |
| | | <input type="checkbox" onclick="updateType(2,this)"> 玩湃币支付 |
| | | <input type="checkbox" onclick="updateType(3,this)"> 课时支付 |
| | | <input type="checkbox" onclick="updateType1(1,this)"> 现金支付 |
| | | <input type="checkbox" onclick="updateType1(2,this)"> 玩湃币支付 |
| | | <input type="checkbox" onclick="updateType1(3,this)"> 课时支付 |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | }else { |
| | | $("#payType1").hide(); |
| | | } |
| | | $("#yys").hide(); |
| | | $("#yys1").show(); |
| | | $("#pCode1").val(""); |
| | | $("#cCode1").val(""); |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | |
| | | } |
| | | if(e==2){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType2").show(); |
| | | }else { |
| | | $("#payType2").hide(); |
| | | } |
| | | $("#yys").show(); |
| | | $("#yys1").hide(); |
| | | $("#pCode1").val(""); |
| | | $("#cCode1").val(""); |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | |
| | | } |
| | | } |
| | | function updateType1(e,o) { |
| | | if(e==1){ |
| | | if($(o).is(":checked")){ |
| | | $("#payType1").show(); |
| | | }else { |
| | | $("#payType1").hide(); |
| | | } |
| | | } |
| | | if(e==2){ |
| | | if($(o).is(":checked")){ |
| | |
| | | methods: { |
| | | handleAvatarSuccess(res, file) { |
| | | file.url =file.response |
| | | TCarInfoDlg.goodsPicArray.push(file); |
| | | TCarInfoDlg.goodsPicArray.push(res); |
| | | console.log(TCarInfoDlg.goodsPicArray) |
| | | }, |
| | | changeImg(){ |
| | | var i = id.split(",") |
| | | for (let j = 0; j <i.length; j++) { |
| | | let obj={ |
| | | fileName:i[j], |
| | | uuid:i[j], |
| | | url:i[j], |
| | | response:i[j], |
| | | } |
| | | this.imageUrl2.push(obj) |
| | | |
| | | } |
| | | console.log( this.imageUrl2,111) |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | | const isLt2M = file.size / 1024 / 1024 < 10; |
| | |
| | | TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => { |
| | | return item.uid != file.uid; |
| | | }); |
| | | |
| | | }, |
| | | changeImg(){ |
| | | var i = id.split(",") |
| | | for (let j = 0; j <i.length; j++) { |
| | | let obj={ |
| | | fileName:i[j], |
| | | uuid:i[j], |
| | | url:i[j], |
| | | response:i[j], |
| | | } |
| | | this.imageUrl2.push(obj) |
| | | } |
| | | console.log( this.imageUrl2,111) |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | // 场地管理首页 选择对应的省市 |
| | | // 传1是场地管理首页 传2是场地管理添加页面 |
| | | TSite.oneChange = function () { |
| | | var province = $('#pCode option:selected').text(); |
| | | var province = $('#pCode').val(); |
| | | var citySelect = document.getElementById("cCode"); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getCity", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.cityCode+"'>"+v.city+"</option>"; |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | |
| | | $("#cCode").innerHTML = '<option value="">请先选择省/市</option>'; |
| | | } |
| | | |
| | | ajax.set("province",province); |
| | | ajax.set("oneId",province); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | TSite.oneChangeNext = function (e) { |
| | | var oneId=$(e).val(); |
| | | var city = $('#cCode option:selected').text(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/accountChangeNext", function(data){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoach/getYys", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择账号</option>'; |
| | | $.each(data, function(k,v) { |
| | |
| | | $("#account").empty().append(content); |
| | | } |
| | | }); |
| | | |
| | | ajax.set("pCode",$("#pCode").val()); |
| | | ajax.set("cCode",$("#cCode").val()); |
| | | ajax.start(); |
| | | if (oneId === ""){ |
| | | $("#account").innerHTML = '<option style="width: 300px" value="">请先选择省/市</option>'; |
| | | |
| | | } |
| | | ajax.set("oneId",city); |
| | | ajax.start(); |
| | | |
| | | // var ajax1 = new $ax(Feng.ctxPath + "/tSite/storeChangeNext", function(data){ |
| | | // if(data!=null && data.length !== 0){ |
| | | // var content='<option value="">选择门店</option>'; |
| | | // $.each(data, function(k,v) { |
| | | // content += "<option style='width: 300px' value='"+v.id+"'>"+v.name+"</option>"; |
| | | // }); |
| | | // $("#store").empty().append(content); |
| | | // }else { |
| | | // storeSelect.innerHTML = '<option value="">当前所选市没有门店</option>'; |
| | | // } |
| | | // }); |
| | | // ajax1.set("oneId",oneId); |
| | | // ajax1.start(); |
| | | }; |
| | | |
| | | /** |
| | |
| | | var em = "";// 门店经营结束时间:分钟 |
| | | |
| | | TSite.addSubmit = function(){ |
| | | |
| | | |
| | | var data = { |
| | | id:null, |
| | | province:"", |
| | |
| | | temp = temp+","+TSite.goodsPicArray[i]; |
| | | } |
| | | data.certificateImg = temp |
| | | |
| | | if ($("#objectType").val()==1){ |
| | | if($("#pCode").val()==''){ |
| | | Feng.info("请选择省") |
| | | return; |
| | |
| | | if($("#account").val()=='' ){ |
| | | Feng.info("请选择账号") |
| | | return; |
| | | } |
| | | } |
| | | if($("#coachTypeId").val()=='' ){ |
| | | Feng.info("请选择教练类型") |
| | |
| | | }); |
| | | }; |
| | | TSite.editSubmit = function(){ |
| | | |
| | | |
| | | var data = { |
| | | id:null, |
| | | province:"", |
| | |
| | | data.graduateSchool = $('#graduateSchool').val() |
| | | data.diploma = $('#img').val() |
| | | data.certificate = $('#certificate').val() |
| | | |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var temp = "" |
| | | |
| | | for (let i = 0; i < TSite.goodsPicArray.length; i++) { |
| | | console.log("循环") |
| | | console.log(TSite.goodsPicArray[i][`fileName`]) |
| | | temp = temp+","+TSite.goodsPicArray[i][`fileName`]; |
| | | console.log(TSite.goodsPicArray[i]) |
| | | temp = temp+","+TSite.goodsPicArray[i]; |
| | | } |
| | | data.certificateImg = temp |
| | | |
| | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | |
| | | var type = $("#type").val() |
| | | TCompetition.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'province', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | {title: '所在省', field: 'province', visible: type==2?false:true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '所在市', field: 'city', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在市', field: 'city', visible: type==2?false:true, align: 'center', valign: 'middle'}, |
| | | {title: '举办门店', field: 'storeName', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | }, |
| | | {title: '赛事名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | |
| | | return {1:"未开始",2:"已开始",3:"已结束",4:"已取消"}[data] |
| | | } |
| | | }, |
| | | {title: '审核状态', field: 'auditStatus', visible: type==2?true:false, align: 'center', valign: 'middle',width:'8%', |
| | | formatter:function (data) { |
| | | return {1:"待审核",2:"已通过",3:"已拒绝"}[data] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | function currentTime(timestamp){ |
| | |
| | | } |
| | | |
| | | TCarInfoDlg.oneChange9 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var elementById = document.getElementById("pt"); |
| | | |
| | | var elementById = document.getElementById("radio1"); |
| | | var operatorId; |
| | | if (elementById !== null) { |
| | | console.log(elementById) |
| | | operatorId = $("#account").val() |
| | | if (elementById.checked){ |
| | | operatorId = 0 |
| | | }else{ |
| | | operatorId = $("#account").val() |
| | | }else{ |
| | | operatorId = 0 |
| | | } |
| | | } |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | |
| | | * 提交添加 |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var pCode = $("#pCode").val(); |
| | | var pCode; |
| | | var cCode; |
| | | var elementById = document.getElementById("radio1"); |
| | | console.log("看看标签") |
| | | console.log(elementById) |
| | | if (elementById!=null){ |
| | | if (!elementById.checked){ |
| | | console.log("选中平台") |
| | | console.log($("#pCode1").val()) |
| | | console.log($("#cCode1").val()) |
| | | // 选中平台赛事 |
| | | pCode = $("#pCode1").val(); |
| | | if($("#pCode1").val()==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | cCode = $("#cCode1").val(); |
| | | if($("#cCode1").val()==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | }else{ |
| | | console.log("选中运营商") |
| | | console.log($("#pCode").val()) |
| | | console.log($("#cCode").val()) |
| | | // 选中运营商赛事 |
| | | pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | | return; |
| | | } |
| | | var cCode = $("#cCode").val(); |
| | | cCode = $("#cCode").val(); |
| | | if(cCode==""){ |
| | | Feng.info("请选择市"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var shopId = $("#shopId").val(); |
| | | |
| | | if(shopId==""){ |
| | |
| | | |
| | | |
| | | TCarInfoDlg.oneChangeYys = function(e){ |
| | | |
| | | var oneId= $("input[name='pt']:checked").val() |
| | | |
| | | console.log("===========oneId=========="+oneId) |
| | | var oneId= $(e).val() |
| | | var SelectValue=""; |
| | | if(oneId=='0' ){ |
| | | oneId=0 |
| | | console.log("隐藏") |
| | | $("#yys1").hide(); |
| | | $("#t1").hide(); |
| | | $("#account").hide(); |
| | | }else{ |
| | | console.log("展示") |
| | | $("#yys1").show(); |
| | | $("#t1").show(); |
| | | $("#account").show(); |
| | | } |
| | | // var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ |
| | |
| | | ajax.start(); |
| | | |
| | | |
| | | if (typeof(oneId) == "undefined"){ |
| | | if (oneId == "1"){ |
| | | console.log("===============") |
| | | |
| | | var button = document.getElementById("account"); |
| | | button.removeAttribute("disabled"); |
| | | |
| | |
| | | import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; |
| | | import com.dsh.other.feignclient.model.AdvertisementQuery; |
| | | import com.dsh.other.model.BannerVo; |
| | | import com.dsh.other.model.dto.siteDto.GameDataQuery; |
| | | import com.dsh.other.service.*; |
| | | import com.dsh.other.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @Autowired |
| | | private TGameRecordService gameRecordService; |
| | | |
| | | // 数据统计 |
| | | @ResponseBody |
| | | @PostMapping("/student/getData") |
| | | public List<TGameRecord> getData(@RequestBody GameDataQuery query){ |
| | | if (query.getStoreId()==null){ |
| | | // 获取到游戏ids |
| | | List<Integer> gameIds = gameService.list(new QueryWrapper<Game>().eq("operationId", query.getObjectId())) |
| | | .stream().map(Game::getId).collect(Collectors.toList()); |
| | | // 根据游戏ids查询智慧球场支付记录 |
| | | List<TGameRecord> list = gameRecordService.list(new QueryWrapper<TGameRecord>().in("gameId", gameIds) |
| | | .eq("status", 1) |
| | | .ne("payType", 3) |
| | | .ne("payType", 4)); |
| | | return list; |
| | | }else{ |
| | | List<Integer> gameIds = gameService.list(new QueryWrapper<Game>().eq("storeId", query.getStoreId())) |
| | | .stream().map(Game::getId).collect(Collectors.toList()); |
| | | List<TGameRecord> list = gameRecordService.list(new QueryWrapper<TGameRecord>().in("gameId", gameIds) |
| | | .eq("status", 1).eq("payType", 1).eq("payType", 2)); |
| | | return list; |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/webStudentList") |
| | | public List<Game> list(@RequestBody BallQueryDto ballQueryDto){ |
| | |
| | | @RequestMapping("/base/site/addSiteBooking") |
| | | public Object addSiteBooking(@RequestBody SiteBooking siteBooking){ |
| | | if(siteBooking.getId()!= null ){ |
| | | |
| | | return siteBookingService.updateById(siteBooking); |
| | | }else { |
| | | return siteBookingService.save(siteBooking); |
| | |
| | | map.put("siteType",siteType.getName()); |
| | | map.put("shopName",byId1.getName()); |
| | | map.put("shopAddress",byId1.getAddress()); |
| | | |
| | | map.put("name",site.getName()); |
| | | |
| | | |
| | | |
| | | List<Integer> ids = getIds(byId.getSiteId()); |
| | | byId.setStorePhone(byId1.getPhone()); |
| | | |
| | | //拼接开始结束时间 |
| | | Date startTime = byId.getStartTime(); |
| | | Date endTime = byId.getEndTime(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | |
| | | String startTimeString = sdf.format(startTime); |
| | | String endTimeString = sdf.format(endTime); |
| | | |
| | | String result = startTimeString + "-" + endTimeString.substring(11); |
| | | byId.setTimes(result); |
| | | |
| | | |
| | | |
| | | |
| | | byId.setSid(Arrays.asList(storeId)); |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getStoreId, storeId).eq(Site::getSign, 1)); |
| | | List<Site> list = siteService.list(new LambdaQueryWrapper<Site>() |
| | | .eq(Site::getStoreId, storeId) |
| | | .eq(Site::getSign, 1)); |
| | | List<Integer> collect = list.stream().map(Site::getId).collect(Collectors.toList()); |
| | | byId.setRid(collect); |
| | | map.put("data",byId); |
| | | |
| | | |
| | | map.put("ids",ids); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |
New file |
| | |
| | | package com.dsh.other.model.dto.siteDto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class GameDataQuery { |
| | | Integer objectId; |
| | | Integer storeId; |
| | | } |