l
chenfeng 7 months ago
parent f683087111
commit 29cc2eb5e0
  1. 31
      src/main/java/com/cjy/back/ybsjAppointment/controller/YbsjyAppointmentRecordController.java
  2. 2
      src/main/java/com/cjy/back/ybsjAppointment/dao/YbsjyAppointmentRecordMapper.java
  3. 8
      src/main/java/com/cjy/back/ybsjAppointment/dao/YbsjyAppointmentRecordMapper.xml
  4. 12
      src/main/java/com/cjy/back/ybsjAppointment/entity/vo/GetAppointmentRecordVO.java
  5. 11
      src/main/java/com/cjy/back/ybsjAppointment/entity/vo/SynchronousWriteOffDataVO.java
  6. 3
      src/main/java/com/cjy/back/ybsjAppointment/service/YbsjyAppointmentRecordService.java
  7. 10
      src/main/java/com/cjy/back/ybsjAppointment/service/impl/YbsjyAppointmentRecordImpl.java
  8. 18
      src/main/java/com/cjy/back/ybsjAppointment/service/impl/YbsjyAppointmentSettingServiceImpl.java
  9. 2
      src/main/webapp/html/back/yuyueList/studyReservationRecord.html
  10. 2
      src/main/webapp/html/back/yuyueList/teamReservationRecord.html

@ -37,6 +37,7 @@ public class YbsjyAppointmentRecordController {
@Value("${jqzhgk.scjSynchronousWriteOffData}")
private String scjSynchronousWriteOffData;
/**
* 查询预约记录
*
@ -50,7 +51,7 @@ public class YbsjyAppointmentRecordController {
if (user == null) {
return ServerResponse.createByError("请重新登陆");
}
if (getAppointmentRecordVO.getVisitTypes()!=null && !getAppointmentRecordVO.getVisitTypes().equals("")){
if (getAppointmentRecordVO.getVisitTypes() != null && !getAppointmentRecordVO.getVisitTypes().equals("")) {
getAppointmentRecordVO.setVisitTypes(reverseAndSort(getAppointmentRecordVO.getVisitTypes()));
}
return ybsjyAppointmentRecordService.getAppointmentRecord(getAppointmentRecordVO);
@ -123,11 +124,16 @@ public class YbsjyAppointmentRecordController {
writeOffVo.setUserId(user.getUserid().toString());
int ofo = ybsjyAppointmentRecordService.updateWriteOff(writeOffVo);
if (ofo > 0) {
// 更新景区管控数据
List<SynchronousWriteOffDataVO> synchronousWriteOffDataVOS = new ArrayList<>();
//核销人ID
SynchronousWriteOffDataVO synchronousWriteOffDataVO = new SynchronousWriteOffDataVO();
//核销人ID
if (writeOffVo.getAppointmentDocumentsWriteOff() != null && !writeOffVo.getAppointmentDocumentsWriteOff().equals("")) {
Map<String, Object> mapTime = ybsjyAppointmentRecordService.selectTime(writeOffVo.getAppointmentTimeInfoId());
synchronousWriteOffDataVO.setAppointmentSlot(mapTime.get("start_time") + "-" + mapTime.get("end_time"));
}
synchronousWriteOffDataVO.setBookingCategory(2);
synchronousWriteOffDataVO.setWriteOff(writeOffVo.getAppointmentDocumentsWriteOff());
synchronousWriteOffDataVO.setDocumentsId(writeOffVo.getId().toString());
@ -166,29 +172,30 @@ public class YbsjyAppointmentRecordController {
@RequestMapping("/selectStatistics")
public ServerResponse selectStatistics(@RequestBody GetAppointmentRecordVO getAppointmentRecordVO) {
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("data", ybsjyAppointmentRecordService.selectStatistics(getAppointmentRecordVO));
resultMap.put("data", ybsjyAppointmentRecordService.selectStatistics(getAppointmentRecordVO));
resultMap.put("msg", "查询成功");
resultMap.put("code", 0);
return ServerResponse.createBySuccess(resultMap);
}
public static String reverseAndSort(String input) {
// 按逗号分割字符串
String[] parts = input.split(",");
int[] reversedNumbers = new int[parts.length];
int[] numbers = new int[parts.length];
// 反转每个数字并存储到数组中
// 将分割后的字符串转为整数
for (int i = 0; i < parts.length; i++) {
reversedNumbers[i] = Integer.parseInt(new StringBuilder(parts[i]).reverse().toString());
numbers[i] = Integer.parseInt(parts[i]);
}
// 对反转后的数字进行排序
Arrays.sort(reversedNumbers);
// 对整数数组进行排序
Arrays.sort(numbers);
// 构建最终结果字符串
// 构建结果字符串
StringBuilder result = new StringBuilder();
for (int i = 0; i < reversedNumbers.length; i++) {
result.append(reversedNumbers[i]);
if (i < reversedNumbers.length - 1) {
for (int i = 0; i < numbers.length; i++) {
result.append(numbers[i]);
if (i < numbers.length - 1) {
result.append(",");
}
}

@ -210,4 +210,6 @@ public interface YbsjyAppointmentRecordMapper {
//查询弹框内容
Map<String, Object> selectPop();
Map<String,Object>selectTime(String id);
}

@ -147,7 +147,7 @@
and t1.scenic_id =#{getAppointmentRecordVO.scenicId}
</if>
<if test="getAppointmentRecordVO.visitTypes !=null and getAppointmentRecordVO.visitTypes !='' ">
and t1.visit_types like concat ('%',#{getAppointmentRecordVO.visitTypes},'%')
and t1.visit_types in (#{getAppointmentRecordVO.visitTypes})
</if>
GROUP BY t1.id
ORDER BY t1.create_time desc
@ -588,4 +588,10 @@
and userkey ='95034a2bb9a843b79dbc93f74599282b'
and isdel = 'NO'
</select>
<select id="selectTime" resultType="map">
select start_time,end_time
from ybsj_appointment_time_info
where id =#{id}
</select>
</mapper>

@ -2,6 +2,8 @@ package com.cjy.back.ybsjAppointment.entity.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
/**
* @author liangjiawei
* @createDate 2023/7/27
@ -35,6 +37,16 @@ public class GetAppointmentRecordVO {
private String appointmentTypeId;
private String visitTypes;
private List<String> types;
public List<String> getTypes() {
return types;
}
public void setTypes(List<String> types) {
this.types = types;
}
public String getVisitTypes() {
return visitTypes;
}

@ -17,6 +17,17 @@ public class SynchronousWriteOffDataVO {
*/
private String documentsId;
private String appointmentSlot;
public String getAppointmentSlot() {
return appointmentSlot;
}
public void setAppointmentSlot(String appointmentSlot) {
this.appointmentSlot = appointmentSlot;
}
public String getWriteOff() {
return writeOff;
}

@ -126,4 +126,7 @@ public interface YbsjyAppointmentRecordService {
//查询弹框内容
Map<String, Object> selectPop();
Map<String,Object>selectTime(String id);
}

@ -74,7 +74,9 @@ public class YbsjyAppointmentRecordImpl implements YbsjyAppointmentRecordService
if (getAppointmentRecordVO.getReservationPersonPhone() != null && !getAppointmentRecordVO.getReservationPersonPhone().isEmpty()) {
getAppointmentRecordVO.setReservationPersonPhone(Encryption.encrypt(getAppointmentRecordVO.getReservationPersonPhone(), rule));
}
// if (getAppointmentRecordVO.getVisitTypes()!=null && !getAppointmentRecordVO.getVisitTypes().equals("")){
// getAppointmentRecordVO.setTypes( Arrays.asList(getAppointmentRecordVO.getVisitTypes().split(",")));
// }
//根据条件进行分页查询数据
List<Map<String, Object>> list = ybsjyAppointmentRecordMapper.getAppointmentRecordListByPage(pw.getPage(), getAppointmentRecordVO);
list.stream().forEach(item -> {
@ -496,4 +498,10 @@ public class YbsjyAppointmentRecordImpl implements YbsjyAppointmentRecordService
public Map<String, Object> selectPop() {
return ybsjyAppointmentRecordMapper.selectPop();
}
@Override
public Map<String, Object> selectTime(String id) {
return ybsjyAppointmentRecordMapper.selectTime(id);
}
}

@ -372,21 +372,21 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti
public static String reverseAndSort(String input) {
// 按逗号分割字符串
String[] parts = input.split(",");
int[] reversedNumbers = new int[parts.length];
int[] numbers = new int[parts.length];
// 反转每个数字并存储到数组中
// 将分割后的字符串转为整数
for (int i = 0; i < parts.length; i++) {
reversedNumbers[i] = Integer.parseInt(new StringBuilder(parts[i]).reverse().toString());
numbers[i] = Integer.parseInt(parts[i]);
}
// 对反转后的数字进行排序
Arrays.sort(reversedNumbers);
// 对整数数组进行排序
Arrays.sort(numbers);
// 构建最终结果字符串
// 构建结果字符串
StringBuilder result = new StringBuilder();
for (int i = 0; i < reversedNumbers.length; i++) {
result.append(reversedNumbers[i]);
if (i < reversedNumbers.length - 1) {
for (int i = 0; i < numbers.length; i++) {
result.append(numbers[i]);
if (i < numbers.length - 1) {
result.append(",");
}
}

@ -42,6 +42,8 @@
<option value="0">待核销</option>
<option value="1">已核销</option>
<option value="3">已取消</option>
<option value="4">审核中</option>
<option value="5">预约失败</option>
</select>
</div>
</div>

@ -43,6 +43,8 @@
<option value="0">待核销</option>
<option value="1">已核销</option>
<option value="3">已取消</option>
<option value="4">审核中</option>
<option value="5">预约失败</option>
</select>
</div>
</div>

Loading…
Cancel
Save