cloud-server-activity/src/main/java/com/dsh/activity/controller/CouponController.java
@@ -754,8 +754,19 @@ coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); break; case 2: coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); coupon.setCash(dataVo.getRequiredCash()); if (dataVo.getRequiredCash() != null){ coupon.setCash(dataVo.getRequiredCash()); }else{ coupon.setCash(BigDecimal.ZERO); } if (dataVo.getRequiredPoints() != null){ coupon.setIntegral(BigDecimal.valueOf(dataVo.getRequiredPoints())); }else{ coupon.setIntegral(BigDecimal.ZERO); } break; case 3: coupon.setCash(dataVo.getRequiredCash()); cloud-server-activity/src/main/java/com/dsh/activity/controller/HuiminController.java
@@ -391,10 +391,10 @@ if (new Date().after(start) && new Date().before(end)) { // Date date1 = new Date(); jsonObject2.put("start_time", simpleDateFormat1.format( date1)); jsonObject2.put("start_time", date1.getTime()/ 1000); date1.setTime(date1.getTime() + 30 * 1000); if (start.before(end)) { jsonObject2.put("end_time", simpleDateFormat1.format( date1)); jsonObject2.put("end_time", date1.getTime()/ 1000); jsonArray.add(jsonObject2); } } @@ -405,8 +405,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -418,8 +418,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -429,13 +429,15 @@ TStudent tStudent = tStudents.stream().filter(e -> e.getId().equals(Integer.valueOf(payHuimin.getStudentId().split(",")[0]))).findFirst().orElse(null); if (tStudent!=null){ huiminCardVO1.setStudentName(tStudent.getName()); String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+payHuimin.getId()+"}"; // String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+payHuimin.getId()+"}"; String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 +"}"; huiminCardVO1.setQrCode(temp); }else{ huiminCardVO1.setStudentName(""); String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+payHuimin.getId()+"}"; // String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+payHuimin.getId()+"}"; String temp = "{\"id\":"+payHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 +"}"; huiminCardVO1.setQrCode(temp); } huiminCardVOS.add(huiminCardVO1); @@ -564,10 +566,10 @@ if (new Date().after(start) && new Date().before(end)) { // Date date1 = new Date(); jsonObject2.put("start_time", simpleDateFormat1.format( date1)); jsonObject2.put("start_time", date1.getTime()/ 1000); date1.setTime(date1.getTime() + 30 * 1000); if (start.before(end)) { jsonObject2.put("end_time", simpleDateFormat1.format( date1)); jsonObject2.put("end_time", date1.getTime()/ 1000); jsonArray.add(jsonObject2); } } @@ -578,8 +580,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -590,8 +592,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -697,10 +699,10 @@ if (new Date().after(start) && new Date().before(end)) { // Date date1 = new Date(); jsonObject2.put("start_time", simpleDateFormat1.format( date1)); jsonObject2.put("start_time", date1.getTime()/ 1000); date1.setTime(date1.getTime() + 30 * 1000); if (start.before(end)) { jsonObject2.put("end_time", simpleDateFormat1.format( date1)); jsonObject2.put("end_time", date1.getTime()/ 1000); jsonArray.add(jsonObject2); } } @@ -711,8 +713,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -723,8 +725,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -732,11 +734,13 @@ TStudent tStudent = tStudents.stream().filter(e -> e.getId().equals(studentId)).findFirst().orElse(null); if (tStudent!=null){ huiminCardStudentVO.setStudentName(tStudent.getName()); String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; // String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tStudent.getId() + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 +"}"; huiminCardStudentVO.setQrCode(temp); }else{ huiminCardStudentVO.setStudentName(""); String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; // String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + 0 + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 +"}"; huiminCardStudentVO.setQrCode(temp); } @@ -965,10 +969,10 @@ if (new Date().after(start) && new Date().before(end)) { // Date date1 = new Date(); jsonObject2.put("start_time", simpleDateFormat1.format( date1)); jsonObject2.put("start_time", date1.getTime()/ 1000); date1.setTime(date1.getTime() + 30 * 1000); if (start.before(end)) { jsonObject2.put("end_time", simpleDateFormat1.format( date1)); jsonObject2.put("end_time", date1.getTime()/ 1000); jsonArray.add(jsonObject2); } } @@ -979,8 +983,8 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } @@ -991,14 +995,15 @@ JSONObject jsonObject3 = new JSONObject(); Date date1 = new Date(); date1.setTime(date1.getTime() - 300 * 1000); jsonObject3.put("end_time", simpleDateFormat1.format( date1)); jsonObject3.put("start_time", simpleDateFormat1.format( date1)); jsonObject3.put("end_time", date1.getTime()/ 1000); jsonObject3.put("start_time", date1.getTime()/ 1000); jsonArray.add(jsonObject3); } } String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tPayHuimin.getStudentId().split(",")[0] + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; // String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tPayHuimin.getStudentId().split(",")[0] + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 + ",\"codeType\":"+4+"\"dataId\":"+tPayHuimin.getId()+"}"; String temp = "{\"id\":"+tPayHuimin.getId() + ","+"\"sid\":" + sid.toJSONString() + "," + "\"rid\":" + rid + "," + "\"uid\":\"" + tPayHuimin.getStudentId().split(",")[0] + "\"," + "\"time\":" + jsonArray.toJSONString() + ",\"type\":" + 2 +"}"; myHuiminCardDetailVO.setQrCode(temp); myHuiminCardDetailVO.setCardId(tPayHuimin.getCardId()); myHuiminCardDetailVO.setHuiminCard(byId); @@ -1014,6 +1019,7 @@ } } /** * 获取添加人员、选择人员说明文案 */ cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java
@@ -354,7 +354,9 @@ } model.addAttribute("halfNames",strings2); model.addAttribute("halfName",halfName); // 显式传递运营商ID和是否可预约字段,确保回显正确 model.addAttribute("operatorId", site.getOperatorId()); model.addAttribute("reservation", site.getReservation()); // 添加价格配置相关字段 TSite fullSite = siteService.getById(id); model.addAttribute("targetAudience", fullSite.getTargetAudience()); @@ -466,6 +468,11 @@ model.addAttribute("objectType",objectType); model.addAttribute("objectId",objectId); model.addAttribute("stores",stores); // 显式传递运营商ID和是否可预约字段,确保回显正确 model.addAttribute("operatorId", site.getOperatorId()); model.addAttribute("reservation", site.getReservation()); model.addAttribute("targetAudience", site.getTargetAudience()); model.addAttribute("walkinCapacity", site.getWalkinCapacity()); return PREFIX + "TSite_edit.html"; } /** cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java
@@ -898,73 +898,80 @@ } System.out.println("========strings1=====" + strings1); //时间段 List<String> strings = new ArrayList<>(); // List<SiteBooking> siteBookings = siteClient.listBooks(book.getSiteId()); List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", book.getSiteId()).like("times", split1[0].substring(0, 10))); System.out.println("=======siteBookings======" + siteBookings); for (SiteBooking siteBooking : siteBookings) { String[] split = siteBooking.getTimes().split(";"); for (String s : split) { String convertedValue = s.substring(11); strings.add(convertedValue); } } System.out.println("======strings=======" + strings); ////时间段 // List<String> strings = new ArrayList<>(); //// List<SiteBooking> siteBookings = siteClient.listBooks(book.getSiteId()); // List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", book.getSiteId()).like("times", split1[0].substring(0, 10))); // System.out.println("=======siteBookings======" + siteBookings); // for (SiteBooking siteBooking : siteBookings) { // String[] split = siteBooking.getTimes().split(";"); // for (String s : split) { // // String convertedValue = s.substring(11); // strings.add(convertedValue); // } // // } // System.out.println("======strings=======" + strings); List<OrderDto> timeRanges = new ArrayList<>(); TSite site = siteService.getById(book.getSiteId()); System.out.println("================" + site); String appointmentStartTime = site.getAppointmentStartTime(); String appointmentEndTime = site.getAppointmentEndTime(); //生成用于比较日期是否超过的当前日期 LocalDate currentDate = LocalDate.now(); LocalDate parsedDate = LocalDate.parse(split1[0].substring(0, 10), DateTimeFormatter.ISO_DATE); boolean isAfterCurrentDate = parsedDate.isBefore(currentDate); System.out.println("是否超过当前日期" + isAfterCurrentDate); String currentTime = appointmentStartTime; while (currentTime.compareTo(appointmentEndTime) < 0) { String nextTime = getNextTime(currentTime); String timeRange = currentTime + "-" + nextTime; OrderDto orderDto = new OrderDto(); orderDto.setTime(timeRange); LocalTime currentTime1 = LocalTime.now(); LocalTime targetTime = LocalTime.parse(currentTime); boolean hasExceeded = currentTime1.isAfter(targetTime); //是否超过当前时间 if (hasExceeded) { orderDto.setState(0); } //是否已经预定 if (strings.contains(timeRange)) { orderDto.setState(0); } //日期是否超过 if (isAfterCurrentDate) { orderDto.setState(0); } //是否是当前场地当前日期预定的 if (strings1.contains(timeRange)) { orderDto.setState(1); } timeRanges.add(orderDto); currentTime = nextTime; } // String appointmentStartTime = site.getAppointmentStartTime(); // String appointmentEndTime = site.getAppointmentEndTime(); // //生成用于比较日期是否超过的当前日期 // LocalDate currentDate = LocalDate.now(); // LocalDate parsedDate = LocalDate.parse(split1[0].substring(0, 10), DateTimeFormatter.ISO_DATE); // boolean isAfterCurrentDate = parsedDate.isBefore(currentDate); // System.out.println("是否超过当前日期" + isAfterCurrentDate); // String currentTime = appointmentStartTime; // while (currentTime.compareTo(appointmentEndTime) < 0) { // String nextTime = getNextTime(currentTime); // // // String timeRange = currentTime + "-" + nextTime; // OrderDto orderDto = new OrderDto(); // orderDto.setTime(timeRange); // // LocalTime currentTime1 = LocalTime.now(); // LocalTime targetTime = LocalTime.parse(currentTime); // // boolean hasExceeded = currentTime1.isAfter(targetTime); // //是否超过当前时间 // if (hasExceeded) { // orderDto.setState(0); // } // //是否已经预定 // if (strings.contains(timeRange)) { // orderDto.setState(0); // } // //日期是否超过 // if (isAfterCurrentDate) { // orderDto.setState(0); // } // //是否是当前场地当前日期预定的 // if (strings1.contains(timeRange)) { // orderDto.setState(1); // } // timeRanges.add(orderDto); // currentTime = nextTime; // } System.out.println("-------------" + timeRanges); model.addAttribute("timeRanges", timeRanges); System.out.println("======timeRanges========" + timeRanges); Integer objectType = UserExt.getUser().getObjectType(); model.addAttribute("province", book.getProvince()); String yuyueTime = ""; if (strings1.size()>1){ String start = strings1.get(0).split("-")[0]; String end = strings1.get(strings1.size()-1).split("-")[1]; yuyueTime = start +"-"+end; }else{ yuyueTime = strings1.get(0); } model.addAttribute("yuyueTime", yuyueTime); model.addAttribute("city", book.getCity()); model.addAttribute("store", storeService.getById(book.getStoreId()).getName()); model.addAttribute("siteName", siteService.getById(book.getSiteId()).getName()); @@ -1522,6 +1529,7 @@ String money = siteBooking.getMoney(); String[] moneys = money.split(","); siteBooking.setPayMoney(Double.valueOf(moneys[0])); siteBooking.setMoney(money); // 查询当前预约人是否是会员 String phone = siteBooking.getPhone(); String booker = siteBooking.getBooker(); cloud-server-management/src/main/java/com/dsh/guns/modular/system/service/impl/TSiteServiceImpl.java
@@ -101,6 +101,7 @@ List<TSitePrice> sitePrice = itSitePriceService.list(tSitePriceLambdaQueryWrapper); SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); for (TSitePrice tSitePrice : sitePrice) { QuerySiteTimes querySiteTimes = new QuerySiteTimes(); querySiteTimes.setTime(tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3) + "-" + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3)); @@ -113,6 +114,9 @@ String temp = tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3) + "-" + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); String timePriceStart = day + " " + tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3); String timePriceEnd = day + " " + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); Date now = new Date(); Date start = simpleDateFormat1.parse(timePriceStart); Date end = simpleDateFormat1.parse(timePriceEnd); // 已经预约了 判断是散客模式还是订场模式 Integer flag = 0; // 散客预约人数 @@ -124,6 +128,8 @@ String[] split = timeRange.split("-"); String bookingStart = day + " " + split[0]; String bookingEnd = day + " " + split[1]; if (!isTimePeriodsIntersect(timePriceStart, timePriceEnd, bookingStart, bookingEnd)) { // 不相交 } else { @@ -136,23 +142,34 @@ } count++; } } if (querySiteTimes.getSelectable() == 1&&end.before(now)){ querySiteTimes.setSelectable(0); } querySiteTimes.setSelectCount(count); if (flag == 0) { if (flag == 0 && querySiteTimes.getSelectable() == 1) { // 当前时间段还没有预约 Integer walkinCapacity = site.getWalkinCapacity(); // 计算散客预约人数和最大散客容纳数 System.err.println("预约人数" + count); System.err.println("最大散客容纳数" + walkinCapacity); if (walkinCapacity <= count) { // 不可预约 也不能散客 System.err.println("不可预约 也不能散客"); querySiteTimes.setSelectable(0); querySiteTimes.setIsReserve(0); if (targetAudience==1 && walkinCapacity!=0){ // 不可预约 System.err.println("不可预约 也不能散客"); querySiteTimes.setSelectable(0); querySiteTimes.setIsReserve(0); }else{ // 不能散客 System.err.println("不可预约 也不能散客"); querySiteTimes.setSelectable(0); querySiteTimes.setIsReserve(0); } }else{ if (targetAudience==2){ // 散客只能预约当前时间段 Date now = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String nowStr = simpleDateFormat.format(now); // 判断当前时间有没有在timePriceStart和timePriceEnd之间 cloud-server-management/src/main/webapp/WEB-INF/view/system/ball/yuyue_info.html
@@ -84,21 +84,8 @@ <div class="form-group"> <label class="col-sm-3 control-label">*预约时间段:</label> <div class="col-sm-5" id="ttt1" disabled=""> <div class="layui-btn-group" id="ttt2"> </div> <div class="layui-btn-group" id="ttt3"> @for(obj in timeRanges){ <button disabled name="has" type="button" ${obj.state == 0 ? "class = 'layui-btn layui-btn-primary' disabled style='background-color: red'" : obj.state == 1 ? "class = 'layui-btn layui-btn-primary green-button'" : "class = 'layui-btn layui-btn-primary'"} onclick="toggleColor(this)">${obj.time}</button> <!-- <button type="button" ${obj.state == 0 ? "class = 'layui-btn layui-btn-primary' disabled style='background-color: red'" : "class = 'layui-btn layui-btn-primary' "} onclick="toggleColor(this)">${obj.time}</button>--> <!-- <button type="button" ${obj.state == 0 ? "class = 'layui-btn layui-btn-primary green-button'" : "class = 'layui-btn layui-btn-primary'"} onclick="toggleColor(this)">${obj.time}</button>--> @} </div> <div class="col-sm-4"> <input class="form-control" id="yuyueTime" name="yuyueTime" type="text" value="${yuyueTime}" disabled > </div> </div> cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_add.html
@@ -313,14 +313,16 @@ <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </label> <div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%"> <!-- 修改 #selectedCode 中的 el-upload 组件,添加 :before-upload 属性 --> <el-upload :limit="5" ref="upload" class="avatar-uploader" action="/tCouponManage/uploadPic" list-type="picture-card" accept="." :on-success="handleAvatarSuccess" :on-remove="handleRemove"> :on-remove="handleRemove" :before-upload="beforeUpload"> <i class="el-icon-plus"></i> </el-upload> <el-dialog :visible.sync="dialogVisible"> @@ -518,6 +520,27 @@ dialogVisible: false }, methods: { beforeUpload(file) { // 检查当前已上传的文件数量 const currentFiles = this.$refs.upload ? this.$refs.upload.fileList.length : 0; console.log("数量"+currentFiles) console.log(TSite.goodsPicArray.length) // 如果已达到限制数量,则阻止上传并显示提示 if (TSite.goodsPicArray.length>=5) { this.$message.warning('最多只能上传5张图片!'); return false; } // 检查文件大小 const isLt2M = file.size / 1024 / 1024 < 10; if (!isLt2M) { this.$message.error('上传图片大小不能超过 10MB!'); return false; } return true; }, handleAvatarSuccess(res, file) { TSite.goodsPicArray.push(file); }, cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html
@@ -238,8 +238,8 @@ <div class="form-horizontal" id="carInfoForm"> <input id="type_" value="${list.ishalf}" hidden> <input id="reservation" value="${reservation!''}" hidden> <input id="operatorIdValue" value="${operatorId!''}" hidden> <input id="reservation" value="${reservation}" hidden> <input id="operatorIdValue" value="${operatorId}" hidden> <input id="objectType" value="${objectType}" hidden> <input type="hidden" id="siteId" value="${list.id}"> <input type="hidden" id="targetAudience" value="${targetAudience}"> cloud-server-management/src/main/webapp/static/modular/system/ball/ball_info.js
@@ -61,6 +61,8 @@ let codeTime = $('#codeTime').val(); let type = $('#type').val(); let holitime = $('#holitime').val(); let cash = $('#cash').val(); let play = $('#play').val(); // let classStartTime = JSON.stringify($('#classStartTime').val()); @@ -179,7 +181,8 @@ validDays: validDays, coursePackagePaymentConfig: JSON.stringify(price), type:type, holitime:holitime holitime:holitime, money:cash+","+play } //提交信息 cloud-server-management/src/main/webapp/static/modular/system/ball/yuyue_info.js
@@ -49,7 +49,8 @@ // 获取入场方式 var targetAudience = $('input[name="targetAudience"]:checked').val() || 1; var type = $('input[name="type"]:checked').val() || 1; // 获取半场名称 var halfId = document.getElementById("half"); var halfName = halfId && halfId.options[halfId.selectedIndex] ? halfId.options[halfId.selectedIndex].text : ""; @@ -166,8 +167,10 @@ ajax.set("id", $('#siteId').val()); ajax.set("day", $('#time').val()); ajax.set("targetAudience", targetAudience); if(halfName && halfName != "") { console.log("类型") console.log(type) if(type==2 && halfName && halfName != "") { ajax.set("halfName", halfName); } if(siteName && siteName != "") { cloud-server-other/src/main/java/com/dsh/other/controller/CodeCallBackController.java
@@ -27,7 +27,7 @@ /** * 硬件开门后回调 是否可进场检查接口 sid门店id rid场地id */ @PostMapping("/verify") @GetMapping("/verify") public ResultUtil verify(Integer codeType,Integer dataId, Integer rid, Integer sid) { System.err.println("硬件开门后回调 校验是否可入场"); System.err.println("codeType:"+codeType); cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -272,6 +272,7 @@ } List<TSitePrice> sitePrice = sitePriceService.list(tSitePriceLambdaQueryWrapper); SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); for (TSitePrice tSitePrice : sitePrice) { QuerySiteTimes querySiteTimes = new QuerySiteTimes(); @@ -285,6 +286,9 @@ String temp = tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3) + "-" + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); String timePriceStart = day + " " + tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3); String timePriceEnd = day + " " + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3); Date now = new Date(); Date start = simpleDateFormat1.parse(timePriceStart); Date end = simpleDateFormat1.parse(timePriceEnd); // 已经预约了 判断是散客模式还是订场模式 Integer flag = 0; // 散客预约人数 @@ -310,7 +314,7 @@ } } querySiteTimes.setSelectCount(count); if (flag == 0) { if (flag == 0 && querySiteTimes.getSelectable() == 1) { // 当前时间段还没有预约 Integer walkinCapacity = site.getWalkinCapacity(); // 计算散客预约人数和最大散客容纳数 @@ -324,7 +328,6 @@ }else{ if (targetAudience==2){ // 散客只能预约当前时间段 Date now = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String nowStr = simpleDateFormat.format(now); // 判断当前时间有没有在timePriceStart和timePriceEnd之间 @@ -608,7 +611,7 @@ siteBooking.setState(1); siteBooking.setTargetAudience(reservationSite.getTargetAudience()); siteBooking.setInsertTime(new Date()); siteBooking.setMoney(money+","+playCoin); siteBooking.setNextName(reservationSite.getNextName()); siteBooking.setIsHalf(reservationSite.getIsHalf()); siteBooking.setHalfName(reservationSite.getHalfName()); cloud-server-other/src/main/java/com/dsh/other/util/PayMoneyUtil.java
@@ -54,7 +54,8 @@ private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 private String callbackPath = "https://online.daowepark.com:443/other";//支付回调网关地址 // private String callbackPath = "https://online.daowepark.com:443/other";//支付回调网关地址 private String callbackPath = "https://y6cgd7wo3ooa.guyubao.com/other";//支付回调网关地址 private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径