| | |
| | | jsonArray.add(jsonObject2); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | } |
| | | else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (!jsonArray.isEmpty()) { |
| | | huiminCardVO1.setEndTime(simpleDateFormat.format(payHuimin.getEndTime())); |
| | |
| | | Date start = DateUtil.parse(s1, "yyyy-MM-dd HH:mm:ss"); |
| | | Date end = DateUtil.parse(e1, "yyyy-MM-dd HH:mm:ss"); |
| | | if (new Date().after(start) && new Date().before(end)) { |
| | | // |
| | | // |
| | | Date date1 = new Date(); |
| | | jsonObject2.put("start_time", simpleDateFormat1.format( date1)); |
| | | date1.setTime(date1.getTime() + 30 * 1000); |
| | |
| | | jsonArray.add(jsonObject2); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Date date1 = new Date(); |
| | | date1.setTime(date1.getTime() - 300 * 1000); |
| | | jsonObject.put("end_time", simpleDateFormat1.format( date1)); |
| | | jsonObject.put("start_time", simpleDateFormat1.format( date1)); |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject); |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (!jsonArray.isEmpty()) { |
| | | // 将学员加入 |
| | |
| | | jsonArray.add(jsonObject2); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Date date1 = new Date(); |
| | | date1.setTime(date1.getTime() - 300 * 1000); |
| | | jsonObject.put("end_time", simpleDateFormat1.format( date1)); |
| | | jsonObject.put("start_time", simpleDateFormat1.format( date1)); |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject); |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | TStudent tStudent = tStudents.stream().filter(e -> e.getId().equals(studentId)).findFirst().orElse(null); |
| | | if (tStudent!=null){ |
| | |
| | | jsonArray.add(jsonObject2); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject3); |
| | | } |
| | | } |
| | | }else{ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | Date date1 = new Date(); |
| | | date1.setTime(date1.getTime() - 300 * 1000); |
| | | jsonObject.put("end_time", simpleDateFormat1.format( date1)); |
| | | jsonObject.put("start_time", simpleDateFormat1.format( date1)); |
| | | if (jsonArray.isEmpty()){ |
| | | // 返回过期的二维码 保证开门失败即可 |
| | | 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)); |
| | | |
| | | jsonArray.add(jsonObject); |
| | | 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()+"}"; |