|
|
|
@ -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(","); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|