| | |
| | | userPopulation, |
| | | quantityIssued, |
| | | pickUpQuantity, |
| | | auditStatus |
| | | auditStatus, |
| | | publisherType, |
| | | cityManagerId |
| | | from t_coupon |
| | | where auditStatus != 2 |
| | | <if test="name != null"> |
| | |
| | | |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.io.PrintWriter; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletionService; |
| | |
| | | return null; |
| | | } |
| | | } |
| | | @PostMapping("/base/competition/getPeoples") |
| | | @ResponseBody |
| | | public List<CompetitionUser> getPeoples(@RequestBody GetPeopleQuery getPeopleQuery){ |
| | | List<CompetitionUser> list = participantService.getPeoples( |
| | | getPeopleQuery.getId(),getPeopleQuery.getState()); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | map.put("monthsUser",monthsUser); |
| | | |
| | | return map; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | import com.dsh.competition.feignclient.model.CompetitionUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/6 16:51 |
| | | */ |
| | | public interface ParticipantMapper extends BaseMapper<Participant> { |
| | | Page<CompetitionUser> getPeopleFromId(@Param("participantPage") Page<UserCompetition> participantPage, @Param("id") Integer id, @Param("state") Integer state); |
| | | List<CompetitionUser> getPeoples(@Param("id") Integer id, @Param("state") Integer state); |
| | | } |
| | |
| | | void saveParticipant(SaveParticipant saveParticipant) throws Exception; |
| | | |
| | | Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state); |
| | | |
| | | List<CompetitionUser> getPeoples(Integer id, Integer state); |
| | | } |
| | |
| | | public Page<CompetitionUser> getPeopleFromId(Page<UserCompetition> participantPage, Integer id, Integer state) { |
| | | return this.baseMapper.getPeopleFromId(participantPage,id,state); |
| | | } |
| | | |
| | | @Override |
| | | public List<CompetitionUser> getPeoples(Integer id, Integer state) { |
| | | return this.baseMapper.getPeoples(id,state); |
| | | } |
| | | } |
| | |
| | | and t3.payStatus =3 |
| | | </if> |
| | | </select> |
| | | <select id="getPeoples" resultType="com.dsh.competition.feignclient.model.CompetitionUser"> |
| | | select t2.id, t2.name,t2.gender sex,t2.phone ,t2.idcard idCard ,t3.payStatus state |
| | | from t_user_competition t1 left join t_participant t2 on t1.participantId = t2.id |
| | | left join t_payment_competition t3 on t1.paymentCompetitionId = t3.id |
| | | where t1.competitionId =#{id} and t2.id is not null and t3.id is not null |
| | | <if test="state !=null and state !='' and state ==1"> |
| | | and t3.payStatus in (1,2) |
| | | </if> |
| | | <if test="state !=null and state !='' and state ==3"> |
| | | and t3.payStatus =3 |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @PostMapping("/coursePackageDiscount/queryCoursePackageDiscount") |
| | | public List<TCoursePackageDiscount> queryCoursePackageDiscount(@RequestBody Integer coursePackagePaymentConfigId){ |
| | | return coursePackageDiscountService.list(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackagePaymentConfigId", coursePackagePaymentConfigId) |
| | | .eq("auditStatus", 2)); |
| | | ); |
| | | } |
| | | |
| | | |
| | |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==2){ |
| | | type += "续课优惠、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | |
| | | } |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).eq(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().filter(e -> e.getStatus().equals(2)).count(); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList |
| | | (new LambdaQueryWrapper<TCoursePackageDiscount>() |
| | | .eq(TCoursePackageDiscount::getCoursePackageId, |
| | | discountList.getCourseId()) |
| | | .orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().count(); |
| | | if(count>0){ |
| | | discountList.setStatus(2); |
| | | }else { |
| | |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | | type += "会员折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==2){ |
| | | type += "续课优惠、"; |
| | | } |
| | | else if(tCoursePackageDiscounts.get(i).getType()==3){ |
| | | type += "限时折扣、"; |
| | | }else if(tCoursePackageDiscounts.get(i).getType()==4){ |
| | | type += "赠送课时、"; |
| | |
| | | select t1.id,t1.type,t1.status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} |
| | | </foreach> and t1.auditStatus =2 |
| | | </foreach> |
| | | <if test="pCode !=null and pCode !=''"> |
| | | and t2.provinceCode =#{pCode} |
| | | </if> |
| | |
| | | void cancel(Integer id); |
| | | @PostMapping("/base/competition/getPeopleFromId") |
| | | Page<CompetitionUser> getPeopleFromId(GetPeopleQuery getPeopleQuery); |
| | | |
| | | @PostMapping("/base/competition/getPeoples") |
| | | List<CompetitionUser> getPeoples(@RequestBody GetPeopleQuery getPeopleQuery); |
| | | @PostMapping("/base/competition/listUser") |
| | | Page<CompetitionUser> listUser(CompetitionUserQuery competitionUserQuery); |
| | | |
| | |
| | | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | |
| | | private Date endTime; |
| | | /** |
| | | * 扣除课时数 |
| | | */ |
| | | private Integer needNum; |
| | | } |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat(timeFrameStart); |
| | | SimpleDateFormat format1 = new SimpleDateFormat(timeFrameEnd); |
| | | try { |
| | | |
| | | // 判断当日时间是否能享受到折扣 |
| | | String startTime = jsonObject.getString("startTime"); |
| | | String endTime = jsonObject.getString("endTime"); |
| | |
| | | } |
| | | // 判断三个折扣 谁所需支付金额最少 |
| | | double minValue = 0.00; |
| | | |
| | | if (c1 != 0.00 && (c2 == 0.00 || c1 < c2) && (c3 == 0.00 || c1 < c3)) { |
| | | minValue = c1; |
| | | } else if (c2 != 0.00 && (c3 == 0.00 || c2 < c3)) { |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.TOperatorCityService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import com.dsh.guns.modular.system.util.ExcelUtil; |
| | | import com.dsh.guns.modular.system.util.OBSUploadUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import sun.rmi.runtime.Log; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | /** |
| | | * 导出赛事已报名用户列表 |
| | | */ |
| | | |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void exportUserInfo(Integer id, Integer state, HttpServletResponse response) { |
| | | try { |
| | | Competition byId = competitionClient.queryById(id); |
| | | String name = byId.getName(); |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName =name+"报名信息.xls"; |
| | | String[] title = new String[] {"姓名","性别","联系电话","身份证号","状态"}; |
| | | GetPeopleQuery query = new GetPeopleQuery(); |
| | | query.setId(id); |
| | | query.setState(state); |
| | | List<CompetitionUser> list = competitionClient.getPeoples(query); |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | CompetitionUser d = list.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getName(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.nonNull(sex)){ |
| | | if(1 == sex){ |
| | | values[i][1] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][1] = "女"; |
| | | } |
| | | }else { |
| | | values[i][1] = "未知"; |
| | | } |
| | | values[i][2] = d.getPhone(); |
| | | values[i][3] = d.getIdCard(); |
| | | Integer state1 = d.getState(); |
| | | if(1 == state1){ |
| | | values[i][4] = "正常"; |
| | | }else if(2 == state1){ |
| | | values[i][4] = "冻结"; |
| | | }else { |
| | | values[i][4] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | public Object listUser(@PathVariable Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId(new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId |
| | | (new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | package com.dsh.guns.modular.system.controller.code; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.Coupon; |
| | |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.exception.GunsException; |
| | | import com.dsh.guns.core.util.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TOperator; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | private CouponClient client; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | |
| | | /** |
| | | * 优惠券审核列表页 |
| | |
| | | ofSearch.setDistributionMethod(distributionMethod); |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setAuditStatus(auditStatus); |
| | | return client.getCouponExamineListOfSearch(ofSearch); |
| | | List<Map<String, Object>> res = client.getCouponExamineListOfSearch(ofSearch); |
| | | for (Map<String, Object> re : res) { |
| | | if (re.get("publisherType")!=null){ |
| | | |
| | | } |
| | | switch (Integer.valueOf(re.get("publisherType").toString())){ |
| | | case 1: |
| | | // 运营商添加 |
| | | if (re.get("cityManagerId")!=null){ |
| | | TOperator one = operatorService.getOne(new QueryWrapper<TOperator>() |
| | | .eq("id", Integer.valueOf(re.get("cityManagerId").toString()))); |
| | | if (one!=null){ |
| | | User id = userService.getOne(new QueryWrapper<User>().eq("id", one.getUserId())); |
| | | if (id!=null){ |
| | | re.put("account",one.getName()+"-"+id.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | case 2: |
| | | re.put("account","平台"); |
| | | // 平台添加 |
| | | break; |
| | | case 3: |
| | | // 门店添加 |
| | | if (re.get("cityManagerId")!=null){ |
| | | TStore one = storeService.getOne(new QueryWrapper<TStore>() |
| | | .eq("id", Integer.valueOf(re.get("cityManagerId").toString()))); |
| | | if (one!=null){ |
| | | User id = userService.getOne(new QueryWrapper<User>().eq("id", one.getStoreStaffId())); |
| | | if (id!=null){ |
| | | re.put("account",one.getName()+"-"+id.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到报名列表页 |
| | | * @param model |
| | |
| | | model.addAttribute("auditStatus", tCoursePackage.getAuditStatus()); |
| | | |
| | | model.addAttribute("authRemark", tCoursePackage.getAuthRemark()); |
| | | String classStartTime = tCoursePackage.getClassStartTime(); |
| | | String classEndTime = tCoursePackage.getClassEndTime(); |
| | | if (tCoursePackage.getStartTime()!=null) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String dateString = sdf.format(tCoursePackage.getStartTime()); |
| | | String dateString1 = sdf.format(tCoursePackage.getEndTime()); |
| | | model.addAttribute("holi", dateString + " - " + dateString1); |
| | | } |
| | | String[] split1 = classStartTime.split(","); |
| | | String[] split2 = classEndTime.split(","); |
| | | |
| | | model.addAttribute("classTime", tCoursePackage.getClassStartTime() + ":00 - " + tCoursePackage.getClassEndTime() + ":00"); |
| | | List<String> listtime = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i < split1.length; i++) { |
| | | String o = split1[i]+"-"+split2[i]; |
| | | listtime.add(o); |
| | | } |
| | | |
| | | |
| | | model.addAttribute("time1",listtime.remove(0)); |
| | | if (listtime.size()!=0) { |
| | | model.addAttribute("times", listtime); |
| | | } |
| | | model.addAttribute("classTime", |
| | | tCoursePackage.getClassStartTime() + ":00 - " |
| | | + tCoursePackage.getClassEndTime() + ":00"); |
| | | String[] split = tCoursePackage.getClassWeeks().split(";"); |
| | | List<String> list5 = Arrays.asList("周一", "周二", "周三", "周四", "周五", "周六", "周日"); |
| | | List<Map<String, Object>> classWeeks = new ArrayList<>(); |
| | |
| | | model.addAttribute("playPaiCoin", coursePackagePaymentConfig.getPlayPaiCoin() == 0 ? false : true);} |
| | | model.addAttribute("coursePackagePaymentConfig", list4.remove(0)); |
| | | model.addAttribute("coursePackagePaymentConfigs", list4); |
| | | |
| | | Integer type = tCoursePackage.getType(); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "examineCoursePackage_info.html"; |
| | | } |
| | | |
| | |
| | | @ResponseBody |
| | | @PostMapping("/queryCity") |
| | | public List<Map<String, Object>> queryCity(String code){ |
| | | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | String cityCode = null; |
| | |
| | | private CoursePackageDiscountClient coursePackageDiscountClient; |
| | | @RequestMapping("/info") |
| | | public String info( Integer id, Model model) { |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | model.addAttribute("type",tCoursePackage.getType()); |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | return PREFIX + "coursePackageDiscount.html"; |
| | | } |
| | | @RequestMapping("/infoOne") |
| | | public String infoOne( Integer id, Model model) { |
| | | Integer state = courseClient.queryDiscountById(id); |
| | | if(state==1){ |
| | | model.addAttribute("stateStr","待审核"); |
| | | model.addAttribute("state",1); |
| | | }else { |
| | | model.addAttribute("stateStr","未通过"); |
| | | model.addAttribute("state",3); |
| | | } |
| | | |
| | | TCoursePackage tCoursePackage1 = courseClient.queryByDiscountId(id); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(tCoursePackage1.getId()); |
| | | TCoursePackage tCoursePackage = coursePackageService.queryById(id); |
| | | model.addAttribute("item", tCoursePackage); |
| | | List<CoursePackagePaymentConfig> list4 = coursePackagePaymentConfigClient.queryCoursePackagePaymentConfigList(id); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // 拒绝理由 |
| | | StringBuilder reasons = new StringBuilder(""); |
| | | for (CoursePackagePaymentConfig coursePackagePaymentConfig : list4) { |
| | | if(coursePackagePaymentConfig.getCashPayment() == 0){ |
| | | continue; |
| | |
| | | } |
| | | map.put("payment", payment); |
| | | map.put("cashPayment", coursePackagePaymentConfig.getCashPayment()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscountOne(coursePackagePaymentConfig.getId()); |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = coursePackageDiscountClient.queryCoursePackageDiscount(coursePackagePaymentConfig.getId()); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : tCoursePackageDiscounts) { |
| | | if (tCoursePackageDiscount.getAuditStatus()==3){ |
| | | reasons.append(tCoursePackageDiscount.getAuditRemark()+","); |
| | | model.addAttribute("type1",3); |
| | | }else{ |
| | | model.addAttribute("type1",-1); |
| | | } |
| | | } |
| | | map.put("coursePackageDiscount", tCoursePackageDiscounts); |
| | | list.add(map); |
| | | } |
| | | model.addAttribute("role",UserExt.getUser().getObjectType()); |
| | | Integer type1 = tCoursePackage.getType(); |
| | | // 审核状态 |
| | | StringBuilder stringBuilder = new StringBuilder(""); |
| | | |
| | | switch (type1){ |
| | | case 1: |
| | | stringBuilder.append("待审核"); |
| | | break; |
| | | case 2: |
| | | stringBuilder.append("已通过"); |
| | | break; |
| | | case 3: |
| | | stringBuilder.append("未通过"); |
| | | break; |
| | | } |
| | | model.addAttribute("type",stringBuilder); |
| | | |
| | | String string = reasons.toString(); |
| | | if (!string.equals("")){ |
| | | String substring = string.substring(0, string.length() - 1); |
| | | model.addAttribute("reasons", substring); |
| | | }else{ |
| | | model.addAttribute("reasons", ""); |
| | | } |
| | | model.addAttribute("coursePackagePaymentConfig", JSON.toJSONString(list)); |
| | | |
| | | return PREFIX1 + "coursePackageDiscount.html"; |
| | | } |
| | | |
| | |
| | | private IUserService userService; |
| | | |
| | | |
| | | @RequestMapping("/tShop_addDevice/{id}") |
| | | public String addDevice(@PathVariable("id") Integer id,Model model) { |
| | | // 查询门店下的所有场地 |
| | | List<TSite> list = siteService.list(new QueryWrapper<TSite>().eq("storeId", id)); |
| | | // 门店id |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "TShop_add_device.html"; |
| | | } |
| | | @RequestMapping("/addDevice") |
| | | public Object addDevice(Integer id,Integer siteId,String device) { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("space_id",siteId+""); |
| | | map.put("device_id",device); |
| | | map.put("region_id",id.toString()); |
| | | // 添加门禁 |
| | | String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |
| | | return new SuccessTip<>(); |
| | |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map.put("name",site.getName()); |
| | | map.put("space_id",site.getStoreId().toString()); |
| | | map.put("area_id",integer1.toString()); |
| | | String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpaceArea", map); |
| | | |
| | | map.put("space_id",site.getId().toString()); |
| | | map.put("area_id",store.getId().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"); |
| | |
| | | for (String s1 : site.getIds().split(",")) { |
| | | HashMap<String, String> map1 = new HashMap<>(); |
| | | map1.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); |
| | | map1.put("space_id", site.getStoreId() + ""); |
| | | map1.put("space_id", site.getId() + ""); |
| | | map1.put("device_id", s1); |
| | | map1.put("region_id", integer1 + ""); |
| | | map1.put("region_id", store.getId().toString() + ""); |
| | | String s2 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1); |
| | | System.out.println("添加闸机:" + s2); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑场地管理 |
| | | */ |
| | |
| | | |
| | | |
| | | |
| | | System.out.println("---------------------------"+gameConfigList); |
| | | System.out.println("---------------------------"+gameConfigList); |
| | | ballClient.saveConfig( gameConfigList); |
| | | return null; |
| | | } |
| | |
| | | public String yuyueadd(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | String cityCode = null; |
| | | if(objectType == 2){//城市管理员 |
| | | // 获取到这个运营商下面的所有门店 |
| | |
| | | @Override |
| | | public void updateCoursePackage(TCoursePackage coursePackage, String coursePackagePaymentConfig) { |
| | | String holitime = coursePackage.getHolitime(); |
| | | String[] split = holitime.split(" - "); |
| | | String startTime = split[0]; |
| | | String endTime = split[1]; |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse1 = format1.parse(startTime); |
| | | parse1.setHours(0); |
| | | parse1.setMinutes(0); |
| | | parse1.setSeconds(0); |
| | | Date parse2 = format2.parse(endTime); |
| | | parse2.setHours(23); |
| | | parse2.setMinutes(59); |
| | | parse2.setSeconds(59); |
| | | coursePackage.setStartTime(parse1); |
| | | coursePackage.setEndTime(parse2); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | if (holitime!=null){ |
| | | // 如果为空字符串 则默认未修改 |
| | | if (holitime.equals("")){ |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(coursePackage.getId()); |
| | | coursePackage.setStartTime(tCoursePackage.getStartTime()); |
| | | coursePackage.setEndTime(tCoursePackage.getEndTime()); |
| | | }else{ |
| | | String[] split = holitime.split(" - "); |
| | | String startTime = split[0]; |
| | | String endTime = split[1]; |
| | | SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date parse1 = format1.parse(startTime); |
| | | parse1.setHours(0); |
| | | parse1.setMinutes(0); |
| | | parse1.setSeconds(0); |
| | | Date parse2 = format2.parse(endTime); |
| | | parse2.setHours(23); |
| | | parse2.setMinutes(59); |
| | | parse2.setSeconds(59); |
| | | coursePackage.setStartTime(parse1); |
| | | coursePackage.setEndTime(parse2); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | coursePackageClient.updateCoursePackage(coursePackage); |
| | | coursePackagePaymentConfigClient.delCoursePackagePaymentConfig(coursePackage.getId()); |
New file |
| | |
| | | package com.dsh.guns.modular.system.util; |
| | | |
| | | |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | public class ExcelUtil { |
| | | public static HSSFWorkbook getHSSFWorkbook(String sheetName, String[] title, String[][] values, HSSFWorkbook wb) { |
| | | // 第一步,创建一个webbook,对应一个Excel文件 |
| | | if (wb == null) { |
| | | wb = new HSSFWorkbook(); |
| | | } |
| | | // 第二步,在webbook中添加一个sheet,对应Excel文件中的sheet |
| | | HSSFSheet sheet = wb.createSheet(sheetName); |
| | | // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short |
| | | HSSFRow row = sheet.createRow(0); |
| | | // 第四步,创建单元格,并设置值表头 设置表头居中 |
| | | HSSFCellStyle style = wb.createCellStyle(); |
| | | // 创建一个居中格式 |
| | | style.setAlignment((short) 2); |
| | | HSSFCell cell = null; |
| | | // 创建标题 |
| | | for (int i = 0; i < title.length; i++) { |
| | | cell = row.createCell(i); |
| | | cell.setCellType(1); |
| | | cell.setCellValue(title[i]); |
| | | cell.setCellStyle(style); |
| | | } |
| | | if(values!=null){ |
| | | // 创建内容 |
| | | for (int i = 0; i < values.length; i++) { |
| | | row = sheet.createRow(i + 1); |
| | | for (int j = 0; j < values[i].length; j++) { |
| | | row.createCell(j).setCellValue(values[i][j]); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return wb; |
| | | } |
| | | |
| | | public static void setResponseHeader(HttpServletResponse response, String fileName) { |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.addHeader("Pragma", "no-cache"); |
| | | response.addHeader("Cache-Control", "no-cache"); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @if(shiro.hasPermission("/coursePackage/examineCoursePackage")){ |
| | | <#button name="审核" icon="fa-plus" clickFun="ExamineCoursePackage.examineCoursePackage()"/> |
| | | @} |
| | | <#button name="详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | <#button name="查看详情" icon="fa-check-circle" clickFun="ExamineCoursePackage.detailsExamineCoursePackage()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="managerTable"/> |
| | |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="type" value="${type}"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">当前状态:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @if(type==1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*最多预约人数:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*上课时间:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="classStartTime" name="classStartTime" value="${classTime}" placeholder="请选择" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-8"> |
| | | <div class="col-sm-4"> |
| | | @for(obj in classWeeks){ |
| | | <input type="checkbox" name="classWeeks" value="${obj.value}" ${obj.checked ? 'checked' : ''}> ${obj.value} |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="display: flex; align-items: center;" id = "dayTime" > |
| | | <div style="display:flex"> |
| | | <input class="form-control" value="${time1}" id="classStartTime" name="classStartTime" placeholder="请选择" style="width: 200px;" disabled> |
| | | <i class="fa fa-plus-circle" style="font-size: 24px; margin-left: 10px;" onclick="addTime()" disabled></i> |
| | | </div> |
| | | @for(o in times!){ |
| | | <div style="display:flex"> |
| | | <input class="form-control" value="${o}" id="classStartTime" name="classStartTime" placeholder="请选择" style="width: 200px;" disabled> |
| | | <i class="fa fa-trash-o" style="font-size:24px" onclick="removePrice1(this)" disabled></i> |
| | | </div> |
| | | @} |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*扣除课时数:</label> |
| | | <div class="col-sm-4"> |
| | | <input class="form-control" id="needNum" name="name" value="${item.needNum}" readonly> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课包封面:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="hr-line-dashed"></div> |
| | | @if(type == 3){ |
| | | <h3>支付设置</h3> |
| | | @} |
| | | @if(type == 2){ |
| | | <h3>支付设置</h3> |
| | | @} |
| | | @if(type == 1){ |
| | | <h3>课时设置</h3> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付方式:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | |
| | | <input type="checkbox" name="payType" value="2" ${playPaiCoin ? 'checked' : ''}> 玩湃币 |
| | | </div> |
| | | </div> |
| | | @if(type == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*课时有效期:</label> |
| | | <div class="col-sm-4"> |
| | | 购买后 <input id="validDays" name="validDays" type="number" value="${item.validDays}" min="0" placeholder="天数" style="width: 80px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> 天内有效 |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div id="price"> |
| | | <div class="form-group"> |
| | | @if(type == 1){ |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | @} |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${coursePackagePaymentConfig.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | @if(type == 1){ |
| | | <span class="classNumber_span"> |
| | | <input class="classNumber" type="number" |
| | | value="${coursePackagePaymentConfig.classHours}" |
| | | min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | @} |
| | | <span class="cash_span"> |
| | | @if(cashPayment){ |
| | | 现金支付:<input class="cash" type="number" value="${coursePackagePaymentConfig.cashPayment}" min="0" placeholder="请输入金额" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> ¥ |
| | |
| | | </div> |
| | | @for(obj in coursePackagePaymentConfigs){ |
| | | <div class="form-group"> |
| | | @if(type == 1){ |
| | | <label class="col-sm-3 control-label">*课时数:</label> |
| | | @} |
| | | <div class="col-sm-8"> |
| | | <span class="classNumber_span"><input class="classNumber" type="number" value="${obj.classHours}" min="0" placeholder="请输入" style="width: 110px;background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;" readonly> </span> |
| | | <span class="cash_span"> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*审核状态:</label> |
| | | <div class="col-sm-8" style="margin-top: 6px;"> |
| | | <input name="auditStatus" type="radio" value="2" ${auditStatus == 2 ? 'checked' : ''}/> 通过 |
| | | <input name="auditStatus" type="radio" value="2" checked ${auditStatus == 2 ? 'checked' : ''}/> 通过 |
| | | <input name="auditStatus" type="radio" value="3" ${auditStatus == 3 ? 'checked':''}/> 拒绝 |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoursePackageInfo.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="ExamineCoursePackageInfo.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="ExamineCoursePackageInfo.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <#SelectCon id="type" name="折扣类型" > |
| | | <option value="">全部</option> |
| | | <option value="1">会员折扣</option> |
| | | <option value="2">续课优惠</option> |
| | | <option value="3">限时折扣</option> |
| | | <option value="4">赠送课时</option> |
| | | </#SelectCon> |
| | |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <input type="hidden" id="role" value="${role}"> |
| | | <input type="hidden" id="type" value="${type}"> |
| | | <input type="hidden" id="coursePackagePaymentConfig" value='${coursePackagePaymentConfig}'> |
| | | @if(role==2){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">审核状态:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>审核状态:${type}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @if(type==3){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">拒绝理由:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>拒绝理由:</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/coursePackage/coursePackageDiscount.js"></script> |
| | | <script src="${ctxPath}/modular/system/tDiscountAudit/coursePackageDiscount.js"></script> |
| | | <script src="${ctxPath}/modular/system/tDiscount/tDiscount_info.js"></script> |
| | | |
| | | |
| | |
| | | <#SelectCon id="type" name="折扣类型" > |
| | | <option value="">全部</option> |
| | | <option value="1">会员折扣</option> |
| | | <option value="2">续课优惠</option> |
| | | <option value="3">限时折扣</option> |
| | | <option value="4">赠送课时</option> |
| | | </#SelectCon> |
| | |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">当前状态:</label> |
| | | @if(state==1){ |
| | | <div class="col-sm-4" style="margin-top: 6px;color: goldenrod"> |
| | | <span>${stateStr}</span> |
| | | <label class="col-sm-2 control-label">审核状态:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>审核状态:${type}</span> |
| | | </div> |
| | | @} |
| | | @if(state==3){ |
| | | <div class="col-sm-4" style="margin-top: 6px;color: red"> |
| | | <span>${stateStr}</span> |
| | | </div> |
| | | @} |
| | | |
| | | </div> |
| | | </div> |
| | | @if(type1==3){ |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | | <label class="col-sm-2 control-label">拒绝理由:</label> |
| | | <div class="col-sm-4" style="margin-top: 6px;"> |
| | | <span>拒绝理由:${reasons}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <div class="col-sm-2"></div> |
| | | <div class="col-sm-10"> |
| | |
| | | <div id="complimentaryClass"> |
| | | |
| | | </div> |
| | | <div class="form-horizontal"> |
| | | <div class="col-sm-11"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">审核状态:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="r1" value="2" checked> 通过 |
| | | <input type="radio" name="r1" value="3"> 拒绝 |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">拒绝理由:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea id="text" style="width: 460px; height: 138px;"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <select class="form-control" id="province"> |
| | | <select class="form-control" id="province" > |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | |
| | | <option value="">全部</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="userPopulation" name="所属账号" > |
| | | <option value="">全部</option> |
| | | </#SelectCon> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="storeName" name="门店名称" placeholder="请输入门店名称"/> |
| | | </div> |
| | |
| | | <option value="2">兑换商品</option> |
| | | <option value="3">完成课后练习</option> |
| | | <option value="4">观看教学视频</option> |
| | | <option value="5">启动游戏</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | |
| | | @} |
| | | <#button name="免费福利" icon="fa-remove" clickFun="TCompetition.gift()" space="true"/> |
| | | <#button name="首页设置" icon="fa-remove" clickFun="TCompetition.indexSet()" space="true"/> |
| | | <#button name="门禁设置" icon="fa-plus" clickFun="TCompetition.addDevice()" space="true"/> |
| | | |
| | | </div> |
| | | <#table id="TCompetitionTable"/> |
| | | </div> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <input id="id" value="${id}" hidden> |
| | | <div class="form-group" id="cityCode"> |
| | | <label class="col-sm-3 control-label">*选择场地:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="site" name="site" > |
| | | <option value="">选择场地</option> |
| | | @for(i in list){ |
| | | <option value="${i.id}" >${i.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <#input id="device" name="*添加入园闸机" placeholder= "请输入入园闸机id" type="text"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCompetition.addSubmit3()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCompetition.close()"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | @} |
| | |
| | | |
| | | } |
| | | |
| | | let holitime = $('#holitime').val(); |
| | | |
| | | var inputElements = document.querySelectorAll('input[name="classStartTime"]'); |
| | | let classStartTime = JSON.stringify(Array.from(inputElements).map(function(element) { |
| | |
| | | // Feng.error("课时有效期不能为空"); |
| | | // return |
| | | // } |
| | | |
| | | let holitime = $('#holitime').val(); |
| | | let obj = { |
| | | id: id, |
| | | province: province, |
| | |
| | | sort: sort, |
| | | validDays: validDays, |
| | | coursePackagePaymentConfig: JSON.stringify(price), |
| | | holitime:holitime |
| | | holitime:$("#holitime").val() |
| | | } |
| | | |
| | | console.log("======="+obj) |
| | | console.log("看看") |
| | | console.log("======="+holitime) |
| | | console.log(holitime) |
| | | console.log($("#holitime").val()) |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/coursePackage/updateCoursePackage", function (data) { |
| | |
| | | /** |
| | | * 系统管理--用户管理的单例对象 |
| | | */ |
| | | let ExamineCoursePackage = { |
| | | var ExamineCoursePackage = { |
| | | id: "managerTable",//表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | |
| | | ExamineCoursePackage.initColumn = function () { |
| | | let columns = [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省市', field: 'city', align: 'center', valign: 'middle'}, |
| | | {title: '所属门店', field: 'store', align: 'center', valign: 'middle'}, |
| | | {title: '课包种类', field: 'type', align: 'center', valign: 'middle'}, |
| | | {title: '课包类型', field: 'coursePackageType', align: 'center', valign: 'middle'}, |
| | | {title: '课包名称', field: 'name', align: 'center', valign: 'middle'}, |
| | | {title: '最多预约人数', field: 'maxSubscribeNumber', align: 'center', valign: 'middle'}, |
| | | {title: '课程有效期', field: 'validDays', align: 'center', valign: 'middle'}, |
| | | {title: '支付方式', field: 'payType', align: 'center', valign: 'middle'}, |
| | | {title: '排序', field: 'sort', align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'auditStatus', align: 'center', valign: 'middle', |
| | | formatter: function (v) { |
| | | switch (v) { |
| | |
| | | parent.layer.close(window.parent.ExamineCoursePackage.layerIndex); |
| | | }; |
| | | |
| | | |
| | | ExamineCoursePackageInfo.addSubmit = function () { |
| | | |
| | | let auditStatus = $('input[name="auditStatus"]:checked').val();; |
| | | if(typeof auditStatus == "undefined"){ |
| | | Feng.error("请选择审核结果"); |
| | | return |
| | | } |
| | | let authRemark = $('#authRemark').text(); |
| | | let authRemark = $('#authRemark').val(); |
| | | if(3 == auditStatus && '' == authRemark){ |
| | | Feng.error("请输入拒绝理由"); |
| | | return |
| | | } |
| | | let ajax = new $ax(Feng.ctxPath + "/coursePackage/setCoursePackageAuditStatus", function (res) { |
| | | if(res.code == 200){ |
| | | console.log("路径") |
| | | Feng.success("审核成功!"); |
| | | ExamineCoursePackageInfo.close(); |
| | | window.parent.ExamineCoursePackage.table.refresh(); |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | |
| | | * 导出车辆操作 |
| | | */ |
| | | TCompetition.ouTCompetition = function () { |
| | | var operation = function() { |
| | | window.location.href = Feng.ctxPath + "/TCompetition/ouTCompetition"; |
| | | }; |
| | | if(language==1){ |
| | | Feng.confirm("是否确认导出车辆信息?", operation); |
| | | }else if(language==2){ |
| | | Feng.confirm("Are you sure to export vehicle information?", operation); |
| | | }else { |
| | | Feng.confirm("Apakah Anda pasti akan mengekspor informasi kendaraan?", operation); |
| | | } |
| | | } |
| | | var state=$("#state").val() |
| | | var id=$("#id").val() |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/export", function(data){ |
| | | }); |
| | | ajax.set("state",state); |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | }; |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包id', field: 'courseId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'pname', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '所在市', field: 'cname', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDiscount/info?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/tDiscount/info?id=' + this.seItem.courseId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '课包id', field: 'courseId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所在省', field: 'pname', visible: true, align: 'center', valign: 'middle' |
| | | }, |
| | | {title: '所在市', field: 'cname', visible: true, align: 'center', valign: 'middle'}, |
| | |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDiscount/infoOne?id=' + this.seItem.id |
| | | content: Feng.ctxPath + '/tDiscount/infoOne?id=' + this.seItem.courseId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | |
| | | queryData['cityCode'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['shopName'] = $("#shopName").val(); |
| | | queryData['type'] = $("type").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | TCompetition.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | |
| | | TStoreProvince.resetSearch = function () { |
| | | $("#province").val('') |
| | | $("#city").val('') |
| | | $("#account").val('') |
| | | $("#storeName").val('') |
| | | TStoreProvince.search(); |
| | | }; |
| | |
| | | }, |
| | | {title: '积分类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return{1:"赠送积分", 2:"兑换商品",3:"完成课后练习",4:"观看教学视频"}[data] |
| | | return{1:"赠送积分", 2:"兑换商品",3:"完成课后练习",4:"观看教学视频",5:"启动游戏"}[data] |
| | | } |
| | | }, |
| | | {title: '积分明细', field: 'integral', visible: true, align: 'center', valign: 'middle', |
| | |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | | |
| | | function currentTime(timestamp){ |
| | | var time = timestamp + ''; |
| | | if(time.length != 13){ |
| | |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * |
| | | * 点击门店设置门禁 |
| | | */ |
| | | TCompetition.addDevice = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加门禁', |
| | | area: ['50%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tShop/tShop_addDevice/' +TCompetition.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 点击添加车辆管理 |
| | | */ |
| | |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.addSubmit3 = function() { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/addDevice", function(data){ |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }); |
| | | ajax.set("id",$("#id")); |
| | | ajax.set("siteId",$("#site")); |
| | | ajax.set("device",$("#device")); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |