l
chenfeng 6 months ago
parent 7d4babee3a
commit 1de8a503fe
  1. 2
      pom.xml
  2. 9
      src/main/java/com/cjy/back/ybsjAppointment/controller/YbsjyAppointmentRecordController.java
  3. 10
      src/main/java/com/cjy/back/ybsjAppointment/entity/vo/SynchronousWriteOffDataVO.java
  4. 126
      src/main/java/com/cjy/back/ybsjAppointment/service/impl/YbsjyAppointmentSettingServiceImpl.java
  5. 32
      src/main/webapp/html/back/yuyue/reservationManagementAdd.html
  6. 28
      src/main/webapp/html/back/yuyue/reservationManagementAdd.js

@ -334,7 +334,7 @@
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<!-- Apache POI (确保版本一致) -->
<!-- &lt;!&ndash; Apache POI (确保版本一致) &ndash;&gt;-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>

@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -116,7 +118,7 @@ public class YbsjyAppointmentRecordController {
* @return
*/
@RequestMapping("/updateWriteOff")
public ServerResponse updateWriteOff(@RequestBody WriteOffVo writeOffVo, HttpServletRequest request) {
public ServerResponse updateWriteOff(@RequestBody WriteOffVo writeOffVo, HttpServletRequest request) throws ParseException {
SysUser user = (SysUser) request.getSession().getAttribute("admin");
if (user == null) {
return ServerResponse.createByError("请重新登陆");
@ -130,13 +132,16 @@ public class YbsjyAppointmentRecordController {
List<SynchronousWriteOffDataVO> synchronousWriteOffDataVOS = new ArrayList<>();
//核销人ID
SynchronousWriteOffDataVO synchronousWriteOffDataVO = new SynchronousWriteOffDataVO();
if (writeOffVo.getAppointmentDocumentsWriteOff() != null && !writeOffVo.getAppointmentDocumentsWriteOff().equals("")) {
if (writeOffVo.getAppointmentTimeInfoId() != null && !writeOffVo.getAppointmentTimeInfoId().equals("")) {
Map<String, Object> mapTime = ybsjyAppointmentRecordService.selectTime(writeOffVo.getAppointmentTimeInfoId());
synchronousWriteOffDataVO.setAppointmentSlot(mapTime.get("start_time") + "-" + mapTime.get("end_time"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
synchronousWriteOffDataVO.setAppointmentDate(sdf.parse(writeOffVo.getAppointmentDate()));
}
synchronousWriteOffDataVO.setBookingCategory(2);
synchronousWriteOffDataVO.setWriteOff(writeOffVo.getAppointmentDocumentsWriteOff());
synchronousWriteOffDataVO.setDocumentsId(writeOffVo.getId().toString());
synchronousWriteOffDataVOS.add(synchronousWriteOffDataVO);
String responseString = HttpUtil.sendPostJson(scjSynchronousWriteOffData, JSONObject.toJSONString(synchronousWriteOffDataVOS));
JSONObject responseJson = JSONObject.parseObject(responseString);

@ -1,5 +1,7 @@
package com.cjy.back.ybsjAppointment.entity.vo;
import java.util.Date;
/**
* @author liangjiawei
* @createDate 2023/8/3
@ -18,7 +20,15 @@ public class SynchronousWriteOffDataVO {
private String documentsId;
private String appointmentSlot;
private Date appointmentDate;
public Date getAppointmentDate() {
return appointmentDate;
}
public void setAppointmentDate(Date appointmentDate) {
this.appointmentDate = appointmentDate;
}
public String getAppointmentSlot() {
return appointmentSlot;

@ -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,

@ -181,22 +181,22 @@
var form = layui.form;
var upload = layui.upload;
//自定义表达验证:验证是否上传文件或填写url
form.verify({
mpicsIsNotnull: function () {
var logofilepath = $("#lpics").val();
var checkResult = '';
if (logofilepath != null && logofilepath != "") {
} else {
// checkResult = '请上传文件';
window.parent.layer.msg('请上传图片文件!', {
icon: 5,
});
return false;
}
}
});
// form.verify({
//
// mpicsIsNotnull: function () {
//
// var logofilepath = $("#lpics").val();
// var checkResult = '';
// if (logofilepath != null && logofilepath != "") {
// } else {
// // checkResult = '请上传文件';
// window.parent.layer.msg('请上传图片文件!', {
// icon: 5,
// });
// return false;
// }
// }
// });
//监听提交
form.on('submit(addsysDelicacyfoodShop)', function (data) {
var arr = []

@ -74,20 +74,20 @@ $(function() {
form.render("select"); //渲染
// logo
fileurl = json.url;
$("#lpics").val(fileurl);
var datalist = fileurl.split(",");
for (var i = 0; i < datalist.length; i++) {
var filepath = datalist[i];
var filename = '';
var affixsid = i;
$('#logolist').append('<a href="javascript:void(0)" onclick="zoomp(\'' + filepath +
'\')"><img id="img' + affixsid + '" src="' + filepath + '" alt="' + filename +
'" class="layui-upload-img" style="width:300px;"></a><button id="button' + affixsid +
'" class="layui-btn layui-btn-xs layui-btn-danger deleteFile" type="button" onclick=delfile("' +
affixsid + '","' + filepath + '")>删除</button>')
}
// fileurl = json.url;
// $("#lpics").val(fileurl);
//
// var datalist = fileurl.split(",");
// for (var i = 0; i < datalist.length; i++) {
// var filepath = datalist[i];
// var filename = '';
// var affixsid = i;
// $('#logolist').append('<a href="javascript:void(0)" onclick="zoomp(\'' + filepath +
// '\')"><img id="img' + affixsid + '" src="' + filepath + '" alt="' + filename +
// '" class="layui-upload-img" style="width:300px;"></a><button id="button' + affixsid +
// '" class="layui-btn layui-btn-xs layui-btn-danger deleteFile" type="button" onclick=delfile("' +
// affixsid + '","' + filepath + '")>删除</button>')
// }
aa = json.periodTimeList
$.each(aa,function (index,item){

Loading…
Cancel
Save