Merge remote-tracking branch 'origin/l' into l

l
Tuzki 2 years ago
commit 287b3b1ccc
  1. 76
      src/main/java/com/cjy/back/ybsjAppointment/service/impl/YbsjyAppointmentSettingServiceImpl.java

@ -296,7 +296,7 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti
ybsjyAppointmentSettingMapper.saveAppointmentDocumentsInfo(appointmentFormVO);
//插入预约人信息表
reservationNowVO.getAppointmentPersonList().stream().forEach(item -> {
for (AppointmentPersonVO item : reservationNowVO.getAppointmentPersonList()) {
item.setReservationCode(AppointmentNumberUtil.generateOrderNumber());
item.setAppointmentTimeInfoId(reservationNowVO.getAppointmentTimeInfoId());
item.setAppointmentDocumentsId(appointmentFormVO.getId());
@ -333,20 +333,23 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti
synchronousDataVO.setExternalId(reservationNowVO.getExternalId());
synchronousDataVOList.add(synchronousDataVO);
//
// Map<String,String> map= new HashMap<>();
// map.put("idCard",item.getDocumentsNumber());
// map.put("startTime",item.getAppointmentDate()+" " +reservationNowVO.getStartTime()+":00");
// map.put("endTime",item.getAppointmentDate()+" " +reservationNowVO.getEndTime()+":00");
// String responseString =HttpUtil.sendPost(turnstileUrl+addAccessRight,map);
// //记录访问日志
// JSONObject accessRightResponseJson = JSONObject.parseObject(responseString);
// //记录访问日志
// AppointmentRequestTurnstileLogEntity addAccessRightAppointmentRequestTurnstileLogEntity=new AppointmentRequestTurnstileLogEntity();
// addAccessRightAppointmentRequestTurnstileLogEntity.setRequestUrl(turnstileUrl+addAccessRight);
// addAccessRightAppointmentRequestTurnstileLogEntity.setRequestParams(map.toString());
// addAccessRightAppointmentRequestTurnstileLogEntity.setResponseBody(responseString);
// addAccessRightAppointmentRequestTurnstileLogEntity.setState(accessRightResponseJson.get("code").toString());
// ybsjyAppointmentSettingMapper.saveAppointmentRequestTurnstileLog(addAccessRightAppointmentRequestTurnstileLogEntity);
Map<String, Object> map = new HashMap<>();
map.put("idCard", item.getDocumentsNumber());
map.put("startTime", item.getAppointmentDate() + " " + reservationNowVO.getStartTime() + ":00");
map.put("endTime", item.getAppointmentDate() + " " + reservationNowVO.getEndTime() + ":00");
String responseString = HttpUtil.sendPost(turnstileUrl + addAccessRight, map);
//记录访问日志
JSONObject accessRightResponseJson = JSONObject.parseObject(responseString);
if (accessRightResponseJson.get("code").equals("500")) {
//记录访问日志
AppointmentRequestTurnstileLogEntity addAccessRightAppointmentRequestTurnstileLogEntity = new AppointmentRequestTurnstileLogEntity();
addAccessRightAppointmentRequestTurnstileLogEntity.setRequestUrl(turnstileUrl + addAccessRight);
addAccessRightAppointmentRequestTurnstileLogEntity.setRequestParams(map.toString());
addAccessRightAppointmentRequestTurnstileLogEntity.setResponseBody(responseString);
addAccessRightAppointmentRequestTurnstileLogEntity.setState(accessRightResponseJson.get("code").toString());
ybsjyAppointmentSettingMapper.saveAppointmentRequestTurnstileLog(addAccessRightAppointmentRequestTurnstileLogEntity);
return ServerResponse.createByError(accessRightResponseJson.get("msg"));
}
//添加访客
// Map<String,Object> map1= new HashMap<>();
@ -364,25 +367,28 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti
// VisitorResponseJsonAppointmentRequestTurnstileLogEntity.setType("post");
// ybsjyAppointmentSettingMapper.saveAppointmentRequestTurnstileLog(VisitorResponseJsonAppointmentRequestTurnstileLogEntity);
//
// //获取二维码信息
// Map<String,Object> map2= new HashMap<>();
// map2.put("idCard",item.getDocumentsNumber());
// map2.put("endTime",item.getAppointmentDate()+" " +reservationNowVO.getEndTime()+":00");
//
// String updateQRCodevResponseString = HttpUtil.sendPost(turnstileUrl+updateQRCodev,map2);
// JSONObject json = JSONObject.parseObject(updateQRCodevResponseString);
// JSONObject json1= JSONObject.parseObject(json.get("data").toString());
//
// //记录访问日志
// AppointmentRequestTurnstileLogEntity appointmentRequestTurnstileLogEntity=new AppointmentRequestTurnstileLogEntity();
// appointmentRequestTurnstileLogEntity.setRequestUrl(turnstileUrl+updateQRCodev);
// appointmentRequestTurnstileLogEntity.setRequestParams(map2.toString());
// appointmentRequestTurnstileLogEntity.setResponseBody(updateQRCodevResponseString);
// appointmentRequestTurnstileLogEntity.setState(json.get("code").toString());
// appointmentRequestTurnstileLogEntity.setType("post");
// ybsjyAppointmentSettingMapper.saveAppointmentRequestTurnstileLog(appointmentRequestTurnstileLogEntity);
// item.setQrContent(json1.get("二维码信息").toString());
});
//获取二维码信息
Map<String, Object> map2 = new HashMap<>();
map2.put("idCard", item.getDocumentsNumber());
map2.put("endTime", item.getAppointmentDate() + " " + reservationNowVO.getEndTime() + ":00");
String updateQRCodevResponseString = HttpUtil.sendPost(turnstileUrl + updateQRCodev, map2);
JSONObject json = JSONObject.parseObject(updateQRCodevResponseString);
if (json.get("code").equals("500")) {
//记录访问日志
AppointmentRequestTurnstileLogEntity appointmentRequestTurnstileLogEntity = new AppointmentRequestTurnstileLogEntity();
appointmentRequestTurnstileLogEntity.setRequestUrl(turnstileUrl + updateQRCodev);
appointmentRequestTurnstileLogEntity.setRequestParams(map2.toString());
appointmentRequestTurnstileLogEntity.setResponseBody(updateQRCodevResponseString);
appointmentRequestTurnstileLogEntity.setState(json.get("code").toString());
appointmentRequestTurnstileLogEntity.setType("post");
ybsjyAppointmentSettingMapper.saveAppointmentRequestTurnstileLog(appointmentRequestTurnstileLogEntity);
return ServerResponse.createByError(json.get("msg"));
}
JSONObject json1 = JSONObject.parseObject(json.get("data").toString());
item.setQrContent(json1.get("二维码信息").toString());
}
reservationNowVO.getAppointmentPersonList().stream().forEach(i -> {
if (i.getDocumentsType() == 5501) {
String documentsNumber = Encryption.encrypt(i.getDocumentsNumber(), rule);
@ -420,7 +426,7 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti
@Override
public ServerResponse appletsAppointmentRecord(GetAppointmentRecordVO getAppointmentRecordVO) {
if (getAppointmentRecordVO.getReservationPersonPhone()!=null && !getAppointmentRecordVO.getReservationPersonPhone().isEmpty()) {
if (getAppointmentRecordVO.getReservationPersonPhone() != null && !getAppointmentRecordVO.getReservationPersonPhone().isEmpty()) {
getAppointmentRecordVO.setReservationPersonPhone(Encryption.encrypt(getAppointmentRecordVO.getReservationPersonPhone(), rule));
}
// 获取当前页码,在分页组件里 参数固定为currentPage

Loading…
Cancel
Save