|
@@ -320,6 +320,31 @@ public class BomanReservatServiceImpl implements IBomanReservatService {
|
|
return i > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
return i > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 管理员核销
|
|
|
|
+ * @param reservatId
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult verificationManage(Long reservatId) {
|
|
|
|
+ BomanReservat reservat = bomanReservatMapper.selectBomanReservatByReservatId(reservatId);
|
|
|
|
+ if (!"3".equals(reservat.getVisitType())){
|
|
|
|
+ return AjaxResult.error("当前预约未通过,禁止核销");
|
|
|
|
+ }
|
|
|
|
+ if ("2".equals(reservat.getVisitStatus())) {
|
|
|
|
+ return AjaxResult.error("当前预约已核销,请勿重复操作。");
|
|
|
|
+ }
|
|
|
|
+ //判断时间是否一致 日期和时段
|
|
|
|
+ String visitDate = reservat.getVisitDate();
|
|
|
|
+ if (StringUtils.isNotBlank(visitDate) && DateUtils.sameDayCompareD(DateUtils.parseDate(visitDate),DateUtils.getNowDate()) ){
|
|
|
|
+ return AjaxResult.error("核销时间必须大于等于预约日期。");
|
|
|
|
+ }
|
|
|
|
+ BomanReservat bomanReservat = new BomanReservat();
|
|
|
|
+ bomanReservat.setReservatId(reservatId);
|
|
|
|
+ bomanReservat.setVisitStatus("2");
|
|
|
|
+ int i = bomanReservatMapper.updateBomanReservat(bomanReservat);
|
|
|
|
+ return i > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 陵园实时参观统计
|
|
* 陵园实时参观统计
|