LIVE_YE 1 年之前
父节点
当前提交
f370f654ab

+ 10 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/reservat/BomanReservatController.java

@@ -101,6 +101,16 @@ public class BomanReservatController extends BaseController
         return bomanReservatService.examine(bomanReservat);
     }
 
+    /**
+     * 陵园预约核销
+     */
+    @PreAuthorize("@ss.hasPermi('system:reservat:hx')")
+    @GetMapping("/hx")
+    public AjaxResult verification(Long reservatId)
+    {
+        return bomanReservatService.verification(reservatId);
+    }
+
     /**
      * 删除陵园预约
      */

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IBomanReservatService.java

@@ -69,4 +69,6 @@ public interface IBomanReservatService
      * @return
      */
     AjaxResult  indexStatistics (BomanReservat bomanReservat);
+
+    AjaxResult verification(Long reservatId);
 }

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BomanReservatServiceImpl.java

@@ -146,4 +146,17 @@ public class BomanReservatServiceImpl implements IBomanReservatService
         }
         return AjaxResult.success(map);
     }
+
+    @Override
+    public AjaxResult verification(Long reservatId) {
+        BomanReservat reservat = bomanReservatMapper.selectBomanReservatByReservatId(reservatId);
+        if("2".equals(reservat.getVisitStatus())){
+            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();
+    }
 }