|
|
|
@ -451,79 +451,79 @@ public class YbsjyAppointmentSettingServiceImpl implements YbsjyAppointmentSetti |
|
|
|
|
|
|
|
|
|
private void handle5502DocumentType(AppointmentPersonVO person, ReservationNowVO vo, |
|
|
|
|
AppointmentFormVO form) throws Exception { |
|
|
|
|
// Long identificationCode = IdProduceUtil.ordinaryCreate().nextId();
|
|
|
|
|
// person.setIdentificationCode(identificationCode.toString());
|
|
|
|
|
//
|
|
|
|
|
// Map<String, Object> accessMap = new HashMap<>();
|
|
|
|
|
// accessMap.put("idCard", identificationCode);
|
|
|
|
|
// accessMap.put("startTime", vo.getAppointmentDate() + " " + vo.getStartTime() + ":00");
|
|
|
|
|
// accessMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00");
|
|
|
|
|
//
|
|
|
|
|
// String accessResponse = HttpUtil.sendPost(turnstileUrl + addAccessRight, accessMap);
|
|
|
|
|
// JSONObject accessJson = JSONObject.parseObject(accessResponse);
|
|
|
|
|
//
|
|
|
|
|
// if ("500".equals(accessJson.get("code"))) {
|
|
|
|
|
// logAccessRequest(turnstileUrl + addAccessRight, accessMap.toString(),
|
|
|
|
|
// accessResponse, accessJson.get("code").toString(), null);
|
|
|
|
|
// throw new Exception(accessJson.get("msg").toString());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (vo.getAppointmentTypeId() != 5701 && "0".equals(person.getReservationPerson())) { |
|
|
|
|
Long identificationCode = IdProduceUtil.ordinaryCreate().nextId(); |
|
|
|
|
person.setIdentificationCode(identificationCode.toString()); |
|
|
|
|
|
|
|
|
|
Map<String, Object> accessMap = new HashMap<>(); |
|
|
|
|
accessMap.put("idCard", identificationCode); |
|
|
|
|
accessMap.put("startTime", vo.getAppointmentDate() + " " + vo.getStartTime() + ":00"); |
|
|
|
|
accessMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00"); |
|
|
|
|
|
|
|
|
|
String accessResponse = HttpUtil.sendPost(turnstileUrl + addAccessRight, accessMap); |
|
|
|
|
JSONObject accessJson = JSONObject.parseObject(accessResponse); |
|
|
|
|
|
|
|
|
|
if ("500".equals(accessJson.get("code"))) { |
|
|
|
|
logAccessRequest(turnstileUrl + addAccessRight, accessMap.toString(), |
|
|
|
|
accessResponse, accessJson.get("code").toString(), null); |
|
|
|
|
throw new Exception(accessJson.get("msg").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (vo.getAppointmentTypeId() != 5701 && "1".equals(person.getReservationPerson())) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Map<String, Object> qrMap = new HashMap<>();
|
|
|
|
|
// qrMap.put("idCard", identificationCode);
|
|
|
|
|
// qrMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00");
|
|
|
|
|
//
|
|
|
|
|
// String qrResponse = HttpUtil.sendPost(turnstileUrl + updateQRCodev, qrMap);
|
|
|
|
|
// JSONObject qrJson = JSONObject.parseObject(qrResponse);
|
|
|
|
|
//
|
|
|
|
|
// if ("500".equals(qrJson.get("code"))) {
|
|
|
|
|
// logAccessRequest(turnstileUrl + updateQRCodev, qrMap.toString(),
|
|
|
|
|
// qrResponse, qrJson.get("code").toString(), "post");
|
|
|
|
|
// throw new Exception(qrJson.get("msg").toString());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// JSONObject dataJson = JSONObject.parseObject(qrJson.get("data").toString());
|
|
|
|
|
// person.setQrContent(dataJson.get("二维码信息").toString());
|
|
|
|
|
Map<String, Object> qrMap = new HashMap<>(); |
|
|
|
|
qrMap.put("idCard", identificationCode); |
|
|
|
|
qrMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00"); |
|
|
|
|
|
|
|
|
|
String qrResponse = HttpUtil.sendPost(turnstileUrl + updateQRCodev, qrMap); |
|
|
|
|
JSONObject qrJson = JSONObject.parseObject(qrResponse); |
|
|
|
|
|
|
|
|
|
if ("500".equals(qrJson.get("code"))) { |
|
|
|
|
logAccessRequest(turnstileUrl + updateQRCodev, qrMap.toString(), |
|
|
|
|
qrResponse, qrJson.get("code").toString(), "post"); |
|
|
|
|
throw new Exception(qrJson.get("msg").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(qrJson.get("data").toString()); |
|
|
|
|
person.setQrContent(dataJson.get("二维码信息").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void handleOtherDocumentType(AppointmentPersonVO person, ReservationNowVO vo, |
|
|
|
|
AppointmentFormVO form) throws Exception { |
|
|
|
|
// Map<String, Object> accessMap = new HashMap<>();
|
|
|
|
|
// accessMap.put("idCard", Encryption.decrypt(person.getDocumentsNumber(), rule));
|
|
|
|
|
// accessMap.put("startTime", vo.getAppointmentDate() + " " + vo.getStartTime() + ":00");
|
|
|
|
|
// accessMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00");
|
|
|
|
|
//
|
|
|
|
|
// String accessResponse = HttpUtil.sendPost(turnstileUrl + addAccessRight, accessMap);
|
|
|
|
|
// JSONObject accessJson = JSONObject.parseObject(accessResponse);
|
|
|
|
|
//
|
|
|
|
|
// if ("500".equals(accessJson.get("code"))) {
|
|
|
|
|
// logAccessRequest(turnstileUrl + addAccessRight, accessMap.toString(),
|
|
|
|
|
// accessResponse, accessJson.get("code").toString(), "post");
|
|
|
|
|
// throw new Exception(accessJson.get("msg").toString());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (vo.getAppointmentTypeId() != 5701 && "0".equals(person.getReservationPerson())) { |
|
|
|
|
Map<String, Object> accessMap = new HashMap<>(); |
|
|
|
|
accessMap.put("idCard", Encryption.decrypt(person.getDocumentsNumber(), rule)); |
|
|
|
|
accessMap.put("startTime", vo.getAppointmentDate() + " " + vo.getStartTime() + ":00"); |
|
|
|
|
accessMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00"); |
|
|
|
|
|
|
|
|
|
String accessResponse = HttpUtil.sendPost(turnstileUrl + addAccessRight, accessMap); |
|
|
|
|
JSONObject accessJson = JSONObject.parseObject(accessResponse); |
|
|
|
|
|
|
|
|
|
if ("500".equals(accessJson.get("code"))) { |
|
|
|
|
logAccessRequest(turnstileUrl + addAccessRight, accessMap.toString(), |
|
|
|
|
accessResponse, accessJson.get("code").toString(), "post"); |
|
|
|
|
throw new Exception(accessJson.get("msg").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (vo.getAppointmentTypeId() != 5701 && "1".equals(person.getReservationPerson())) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Map<String, Object> qrMap = new HashMap<>();
|
|
|
|
|
// qrMap.put("idCard", Encryption.decrypt(person.getDocumentsNumber(), rule));
|
|
|
|
|
// qrMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00");
|
|
|
|
|
//
|
|
|
|
|
// String qrResponse = HttpUtil.sendPost(turnstileUrl + updateQRCodev, qrMap);
|
|
|
|
|
// JSONObject qrJson = JSONObject.parseObject(qrResponse);
|
|
|
|
|
//
|
|
|
|
|
// if ("500".equals(qrJson.get("code"))) {
|
|
|
|
|
// logAccessRequest(turnstileUrl + updateQRCodev, qrMap.toString(),
|
|
|
|
|
// qrResponse, qrJson.get("code").toString(), "post");
|
|
|
|
|
// throw new Exception(qrJson.get("msg").toString());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// JSONObject dataJson = JSONObject.parseObject(qrJson.get("data").toString());
|
|
|
|
|
// person.setQrContent(dataJson.get("二维码信息").toString());
|
|
|
|
|
Map<String, Object> qrMap = new HashMap<>(); |
|
|
|
|
qrMap.put("idCard", Encryption.decrypt(person.getDocumentsNumber(), rule)); |
|
|
|
|
qrMap.put("endTime", vo.getAppointmentDate() + " " + vo.getEndTime() + ":00"); |
|
|
|
|
|
|
|
|
|
String qrResponse = HttpUtil.sendPost(turnstileUrl + updateQRCodev, qrMap); |
|
|
|
|
JSONObject qrJson = JSONObject.parseObject(qrResponse); |
|
|
|
|
|
|
|
|
|
if ("500".equals(qrJson.get("code"))) { |
|
|
|
|
logAccessRequest(turnstileUrl + updateQRCodev, qrMap.toString(), |
|
|
|
|
qrResponse, qrJson.get("code").toString(), "post"); |
|
|
|
|
throw new Exception(qrJson.get("msg").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(qrJson.get("data").toString()); |
|
|
|
|
person.setQrContent(dataJson.get("二维码信息").toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void syncDataToScenicManagement(List<SynchronousDataVO> syncList, |
|
|
|
|