Explorar o código

物业管理端

tjf hai 4 meses
pai
achega
e5de77c838
Modificáronse 37 ficheiros con 896 adicións e 985 borrados
  1. 52 5
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/asset/AssetTypeController.java
  2. 12 19
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/checkPoint/CheckPointManageController.java
  3. 0 98
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/maintenance/MaintenanceStaffController.java
  4. 97 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/staffManage/StaffManageController.java
  5. 13 20
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/staffTrain/StaffTrainManualController.java
  6. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java
  7. 12 19
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/visitor/VisitorManageController.java
  8. 0 98
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/visitor/VisitorRecordsController.java
  9. 12 3
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java
  10. 28 4
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/AssetType.java
  11. 16 2
      ruoyi-system/src/main/java/com/ruoyi/system/domain/illegalParking/IllegalParking.java
  12. 79 9
      ruoyi-system/src/main/java/com/ruoyi/system/domain/staffManage/StaffManage.java
  13. 19 5
      ruoyi-system/src/main/java/com/ruoyi/system/domain/staffTrain/StaffTrainManual.java
  14. 0 112
      ruoyi-system/src/main/java/com/ruoyi/system/domain/visitor/VisitorRecords.java
  15. 19 1
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/AssetTypeMapper.java
  16. 1 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/IllegalParkingMapper.java
  17. 0 63
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/MaintenanceStaffMapper.java
  18. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StaffManageMapper.java
  19. 1 2
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/StaffTrainManualMapper.java
  20. 0 63
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/VisitorRecordsMapper.java
  21. 15 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/IAssetTypeService.java
  22. 0 62
      ruoyi-system/src/main/java/com/ruoyi/system/service/IMaintenanceStaffService.java
  23. 63 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStaffManageService.java
  24. 1 1
      ruoyi-system/src/main/java/com/ruoyi/system/service/IStaffTrainManualService.java
  25. 0 63
      ruoyi-system/src/main/java/com/ruoyi/system/service/IVisitorRecordsService.java
  26. 190 23
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AssetTypeServiceImpl.java
  27. 12 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalParkingServiceImpl.java
  28. 0 97
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MaintenanceStaffServiceImpl.java
  29. 97 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StaffManageServiceImpl.java
  30. 1 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StaffTrainManualServiceImpl.java
  31. 1 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VisitorManageServiceImpl.java
  32. 0 96
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VisitorRecordsServiceImpl.java
  33. 39 1
      ruoyi-system/src/main/resources/mapper/system/AssetTypeMapper.xml
  34. 5 0
      ruoyi-system/src/main/resources/mapper/system/IllegalParkingMapper.xml
  35. 41 16
      ruoyi-system/src/main/resources/mapper/system/StaffManageMapper.xml
  36. 6 1
      ruoyi-system/src/main/resources/mapper/system/StaffTrainManualMapper.xml
  37. 0 96
      ruoyi-system/src/main/resources/mapper/system/VisitorRecordsMapper.xml

+ 52 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/asset/AssetTypeController.java

@@ -1,13 +1,15 @@
 package com.ruoyi.web.controller.asset;
 
 import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.core.domain.entity.AssetType;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.system.domain.asset.AssetType;
 import com.ruoyi.system.service.IAssetTypeService;
+import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -32,12 +34,23 @@ public class AssetTypeController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('wuYe:assetType:list')")
     @GetMapping("/list")
-    public TableDataInfo list(AssetType assetType) {
-        startPage();
+    public AjaxResult list(AssetType assetType) {
+
         List<AssetType> list = assetTypeService.selectAssetTypeList(assetType);
-        return getDataTable(list);
+        return success(list);
     }
 
+    /**
+     * 查询部门列表(排除节点)
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:assetType:list')")
+    @GetMapping("/list/exclude/{assetId}")
+    public AjaxResult excludeChild(@PathVariable(value = "assetId", required = false) Long assetId)
+    {
+        List<AssetType> assetTypes = assetTypeService.selectAssetTypeList(new AssetType());
+        assetTypes.removeIf(d -> d.getAssetId().intValue() == assetId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), assetId + ""));
+        return success(assetTypes);
+    }
     /**
      * 导出资产类型列表
      */
@@ -66,6 +79,10 @@ public class AssetTypeController extends BaseController {
     @Log(title = "资产类型", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody AssetType assetType) {
+        if (!assetTypeService.checkAssetTypeNameUnique(assetType))
+        {
+            return error("新增资产'" + assetType.getAssetName() + "'失败,资产名称已存在");
+        }
         return toAjax(assetTypeService.insertAssetType(assetType));
     }
 
@@ -76,6 +93,19 @@ public class AssetTypeController extends BaseController {
     @Log(title = "资产类型", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
     public AjaxResult edit(@RequestBody AssetType assetType) {
+        Long assetId = assetType.getAssetId();
+        if (!assetTypeService.checkAssetTypeNameUnique(assetType))
+        {
+            return error("新增资产'" + assetType.getAssetName() + "'失败,资产名称已存在");
+        }
+        else if (assetType.getParentId().equals(assetId))
+        {
+            return error("修改资产'" + assetType.getAssetName() + "'失败,上级资产不能是自己");
+        }
+        else if (StringUtils.equals(UserConstants.DEPT_DISABLE, assetType.getStatus()) && assetTypeService.selectNormalChildrenAssetById(assetId) > 0)
+        {
+            return error("该部门包含未停用的子部门!");
+        }
         return toAjax(assetTypeService.updateAssetType(assetType));
     }
 
@@ -86,6 +116,23 @@ public class AssetTypeController extends BaseController {
     @Log(title = "资产类型", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{assetIds}")
     public AjaxResult remove(@PathVariable Long[] assetIds) {
+        for (Long assetId : assetIds) {
+            if (assetTypeService.hasChildByAssetId(assetId))
+            {
+                return warn("存在下级资产,不允许删除");
+            }
+        }
         return toAjax(assetTypeService.deleteAssetTypeByAssetIds(assetIds));
     }
+
+
+    /**
+     * 获取资产分类树列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
+    @GetMapping("/deptTree")
+    public AjaxResult deptTree(AssetType assetType)
+    {
+        return success(assetTypeService.selectAssetTypeTreeList(assetType));
+    }
 }

+ 12 - 19
ruoyi-admin/src/main/java/com/ruoyi/web/controller/checkPoint/CheckPointManageController.java

@@ -23,18 +23,16 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/wuYe/checkPointManage")
-public class CheckPointManageController extends BaseController
-{
+public class CheckPointManageController extends BaseController {
     @Autowired
     private ICheckPointManageService checkPointManageService;
 
-/**
- * 查询巡更点管理列表
- */
-@PreAuthorize("@ss.hasPermi('wuYe:manage:list')")
-@GetMapping("/list")
-    public TableDataInfo list(CheckPointManage checkPointManage)
-    {
+    /**
+     * 查询巡更点管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:manage:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CheckPointManage checkPointManage) {
         startPage();
         List<CheckPointManage> list = checkPointManageService.selectCheckPointManageList(checkPointManage);
         return getDataTable(list);
@@ -46,8 +44,7 @@ public class CheckPointManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manage:export')")
     @Log(title = "巡更点管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, CheckPointManage checkPointManage)
-    {
+    public void export(HttpServletResponse response, CheckPointManage checkPointManage) {
         List<CheckPointManage> list = checkPointManageService.selectCheckPointManageList(checkPointManage);
         ExcelUtil<CheckPointManage> util = new ExcelUtil<CheckPointManage>(CheckPointManage.class);
         util.exportExcel(response, list, "巡更点管理数据");
@@ -58,8 +55,7 @@ public class CheckPointManageController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('wuYe:manage:query')")
     @GetMapping(value = "/{checkPointManageId}")
-    public AjaxResult getInfo(@PathVariable("checkPointManageId") Long checkPointManageId)
-    {
+    public AjaxResult getInfo(@PathVariable("checkPointManageId") Long checkPointManageId) {
         return success(checkPointManageService.selectCheckPointManageByCheckPointManageId(checkPointManageId));
     }
 
@@ -69,8 +65,7 @@ public class CheckPointManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manage:add')")
     @Log(title = "巡更点管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody CheckPointManage checkPointManage)
-    {
+    public AjaxResult add(@RequestBody CheckPointManage checkPointManage) {
         return toAjax(checkPointManageService.insertCheckPointManage(checkPointManage));
     }
 
@@ -80,8 +75,7 @@ public class CheckPointManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manage:edit')")
     @Log(title = "巡更点管理", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody CheckPointManage checkPointManage)
-    {
+    public AjaxResult edit(@RequestBody CheckPointManage checkPointManage) {
         return toAjax(checkPointManageService.updateCheckPointManage(checkPointManage));
     }
 
@@ -91,8 +85,7 @@ public class CheckPointManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manage:remove')")
     @Log(title = "巡更点管理", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{checkPointManageIds}")
-    public AjaxResult remove(@PathVariable Long[] checkPointManageIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] checkPointManageIds) {
         return toAjax(checkPointManageService.deleteCheckPointManageByCheckPointManageIds(checkPointManageIds));
     }
 }

+ 0 - 98
ruoyi-admin/src/main/java/com/ruoyi/web/controller/maintenance/MaintenanceStaffController.java

@@ -1,98 +0,0 @@
-package com.ruoyi.web.controller.maintenance;
-
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.system.domain.maintenance.MaintenanceStaff;
-import com.ruoyi.system.service.IMaintenanceStaffService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 维修人员管理Controller
- *
- * @author boman
- * @date 2025-02-14
- */
-@RestController
-@RequestMapping("/wuYe/staff")
-public class MaintenanceStaffController extends BaseController
-{
-    @Autowired
-    private IMaintenanceStaffService maintenanceStaffService;
-
-/**
- * 查询维修人员管理列表
- */
-@PreAuthorize("@ss.hasPermi('wuYe:staff:list')")
-@GetMapping("/list")
-    public TableDataInfo list(MaintenanceStaff maintenanceStaff)
-    {
-        startPage();
-        List<MaintenanceStaff> list = maintenanceStaffService.selectMaintenanceStaffList(maintenanceStaff);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出维修人员管理列表
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:staff:export')")
-    @Log(title = "维修人员管理", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, MaintenanceStaff maintenanceStaff)
-    {
-        List<MaintenanceStaff> list = maintenanceStaffService.selectMaintenanceStaffList(maintenanceStaff);
-        ExcelUtil<MaintenanceStaff> util = new ExcelUtil<MaintenanceStaff>(MaintenanceStaff.class);
-        util.exportExcel(response, list, "维修人员管理数据");
-    }
-
-    /**
-     * 获取维修人员管理详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:staff:query')")
-    @GetMapping(value = "/{staffId}")
-    public AjaxResult getInfo(@PathVariable("staffId") Long staffId)
-    {
-        return success(maintenanceStaffService.selectMaintenanceStaffByStaffId(staffId));
-    }
-
-    /**
-     * 新增维修人员管理
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:staff:add')")
-    @Log(title = "维修人员管理", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody MaintenanceStaff maintenanceStaff)
-    {
-        return toAjax(maintenanceStaffService.insertMaintenanceStaff(maintenanceStaff));
-    }
-
-    /**
-     * 修改维修人员管理
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:staff:edit')")
-    @Log(title = "维修人员管理", businessType = BusinessType.UPDATE)
-    @PostMapping("/put")
-    public AjaxResult edit(@RequestBody MaintenanceStaff maintenanceStaff)
-    {
-        return toAjax(maintenanceStaffService.updateMaintenanceStaff(maintenanceStaff));
-    }
-
-    /**
-     * 删除维修人员管理
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:staff:remove')")
-    @Log(title = "维修人员管理", businessType = BusinessType.DELETE)
-    @GetMapping("/delete/{staffIds}")
-    public AjaxResult remove(@PathVariable Long[] staffIds)
-    {
-        return toAjax(maintenanceStaffService.deleteMaintenanceStaffByStaffIds(staffIds));
-    }
-}

+ 97 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/staffManage/StaffManageController.java

@@ -0,0 +1,97 @@
+package com.ruoyi.web.controller.staffManage;
+
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.staffManage.StaffManage;
+import com.ruoyi.system.service.IStaffManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 员工管理Controller
+ *
+ * @author boman
+ * @date 2025-02-18
+ */
+@RestController
+@RequestMapping("/wuYe/staffManage")
+public class StaffManageController extends BaseController
+{
+    @Autowired
+    private IStaffManageService staffManageService;
+
+/**
+ * 查询员工管理列表
+ */
+@PreAuthorize("@ss.hasPermi('wuYe:staffManage:list')")
+@GetMapping("/list")
+    public TableDataInfo list(StaffManage staffManage)
+    {
+        startPage();
+        List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出员工管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:staffManage:export')")
+    @Log(title = "员工管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, StaffManage staffManage)
+    {
+        List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
+        ExcelUtil<StaffManage> util = new ExcelUtil<StaffManage>(StaffManage.class);
+        util.exportExcel(response, list, "员工管理数据");
+    }
+
+    /**
+     * 获取员工管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:staffManage:query')")
+    @GetMapping(value = "/{staffId}")
+    public AjaxResult getInfo(@PathVariable("staffId") Long staffId)
+    {
+        return success(staffManageService.selectStaffManageByStaffId(staffId));
+    }
+
+    /**
+     * 新增员工管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:staffManage:add')")
+    @Log(title = "员工管理", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody StaffManage staffManage)
+    {
+        return toAjax(staffManageService.insertStaffManage(staffManage));
+    }
+
+    /**
+     * 修改员工管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:staffManage:edit')")
+    @Log(title = "员工管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody StaffManage staffManage)
+    {
+        return toAjax(staffManageService.updateStaffManage(staffManage));
+    }
+
+    /**
+     * 删除员工管理
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:staffManage:remove')")
+    @Log(title = "员工管理", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{staffIds}")
+    public AjaxResult remove(@PathVariable Long[] staffIds)
+    {
+        return toAjax(staffManageService.deleteStaffManageByStaffIds(staffIds));
+    }
+}

+ 13 - 20
ruoyi-admin/src/main/java/com/ruoyi/web/controller/staffTrain/StaffTrainManualController.java

@@ -19,22 +19,20 @@ import java.util.List;
  * 员工培训手册Controller
  *
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
 @RestController
 @RequestMapping("/wuYe/manual")
-public class StaffTrainManualController extends BaseController
-{
+public class StaffTrainManualController extends BaseController {
     @Autowired
     private IStaffTrainManualService staffTrainManualService;
 
-/**
- * 查询员工培训手册列表
- */
-@PreAuthorize("@ss.hasPermi('wuYe:manual:list')")
-@GetMapping("/list")
-    public TableDataInfo list(StaffTrainManual staffTrainManual)
-    {
+    /**
+     * 查询员工培训手册列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:manual:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(StaffTrainManual staffTrainManual) {
         startPage();
         List<StaffTrainManual> list = staffTrainManualService.selectStaffTrainManualList(staffTrainManual);
         return getDataTable(list);
@@ -46,8 +44,7 @@ public class StaffTrainManualController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manual:export')")
     @Log(title = "员工培训手册", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, StaffTrainManual staffTrainManual)
-    {
+    public void export(HttpServletResponse response, StaffTrainManual staffTrainManual) {
         List<StaffTrainManual> list = staffTrainManualService.selectStaffTrainManualList(staffTrainManual);
         ExcelUtil<StaffTrainManual> util = new ExcelUtil<StaffTrainManual>(StaffTrainManual.class);
         util.exportExcel(response, list, "员工培训手册数据");
@@ -58,8 +55,7 @@ public class StaffTrainManualController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('wuYe:manual:query')")
     @GetMapping(value = "/{manualId}")
-    public AjaxResult getInfo(@PathVariable("manualId") Long manualId)
-    {
+    public AjaxResult getInfo(@PathVariable("manualId") Long manualId) {
         return success(staffTrainManualService.selectStaffTrainManualByManualId(manualId));
     }
 
@@ -69,8 +65,7 @@ public class StaffTrainManualController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manual:add')")
     @Log(title = "员工培训手册", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody StaffTrainManual staffTrainManual)
-    {
+    public AjaxResult add(@RequestBody StaffTrainManual staffTrainManual) {
         return toAjax(staffTrainManualService.insertStaffTrainManual(staffTrainManual));
     }
 
@@ -80,8 +75,7 @@ public class StaffTrainManualController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manual:edit')")
     @Log(title = "员工培训手册", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody StaffTrainManual staffTrainManual)
-    {
+    public AjaxResult edit(@RequestBody StaffTrainManual staffTrainManual) {
         return toAjax(staffTrainManualService.updateStaffTrainManual(staffTrainManual));
     }
 
@@ -91,8 +85,7 @@ public class StaffTrainManualController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:manual:remove')")
     @Log(title = "员工培训手册", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{manualIds}")
-    public AjaxResult remove(@PathVariable Long[] manualIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] manualIds) {
         return toAjax(staffTrainManualService.deleteStaffTrainManualByManualIds(manualIds));
     }
 }

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java

@@ -106,7 +106,7 @@ public class SysDictTypeController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
     @Log(title = "字典类型", businessType = BusinessType.CLEAN)
-    @GetMapping("/delete/refreshCache")
+    @GetMapping("/refreshCache")
     public AjaxResult refreshCache()
     {
         dictTypeService.resetDictCache();

+ 12 - 19
ruoyi-admin/src/main/java/com/ruoyi/web/controller/visitor/VisitorManageController.java

@@ -23,18 +23,16 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/wuYe/visitorManage")
-public class VisitorManageController extends BaseController
-{
+public class VisitorManageController extends BaseController {
     @Autowired
     private IVisitorManageService visitorManageService;
 
-/**
- * 查询来访管理列表
- */
-@PreAuthorize("@ss.hasPermi('wuYe:visitorManage:list')")
-@GetMapping("/list")
-    public TableDataInfo list(VisitorManage visitorManage)
-    {
+    /**
+     * 查询来访管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(VisitorManage visitorManage) {
         startPage();
         List<VisitorManage> list = visitorManageService.selectVisitorManageList(visitorManage);
         return getDataTable(list);
@@ -46,8 +44,7 @@ public class VisitorManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:export')")
     @Log(title = "来访管理", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, VisitorManage visitorManage)
-    {
+    public void export(HttpServletResponse response, VisitorManage visitorManage) {
         List<VisitorManage> list = visitorManageService.selectVisitorManageList(visitorManage);
         ExcelUtil<VisitorManage> util = new ExcelUtil<VisitorManage>(VisitorManage.class);
         util.exportExcel(response, list, "来访管理数据");
@@ -58,8 +55,7 @@ public class VisitorManageController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:query')")
     @GetMapping(value = "/{visitorManageId}")
-    public AjaxResult getInfo(@PathVariable("visitorManageId") Long visitorManageId)
-    {
+    public AjaxResult getInfo(@PathVariable("visitorManageId") Long visitorManageId) {
         return success(visitorManageService.selectVisitorManageByVisitorManageId(visitorManageId));
     }
 
@@ -69,8 +65,7 @@ public class VisitorManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:add')")
     @Log(title = "来访管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody VisitorManage visitorManage)
-    {
+    public AjaxResult add(@RequestBody VisitorManage visitorManage) {
         return toAjax(visitorManageService.insertVisitorManage(visitorManage));
     }
 
@@ -80,8 +75,7 @@ public class VisitorManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:edit')")
     @Log(title = "来访管理", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody VisitorManage visitorManage)
-    {
+    public AjaxResult edit(@RequestBody VisitorManage visitorManage) {
         return toAjax(visitorManageService.updateVisitorManage(visitorManage));
     }
 
@@ -91,8 +85,7 @@ public class VisitorManageController extends BaseController
     @PreAuthorize("@ss.hasPermi('wuYe:visitorManage:remove')")
     @Log(title = "来访管理", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{visitorManageIds}")
-    public AjaxResult remove(@PathVariable Long[] visitorManageIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] visitorManageIds) {
         return toAjax(visitorManageService.deleteVisitorManageByVisitorManageIds(visitorManageIds));
     }
 }

+ 0 - 98
ruoyi-admin/src/main/java/com/ruoyi/web/controller/visitor/VisitorRecordsController.java

@@ -1,98 +0,0 @@
-package com.ruoyi.web.controller.visitor;
-
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.system.domain.visitor.VisitorRecords;
-import com.ruoyi.system.service.IVisitorRecordsService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-/**
- * 访客车辆登记Controller
- *
- * @author boman
- * @date 2025-02-14
- */
-@RestController
-@RequestMapping("/wuYe/visitorRecords")
-public class VisitorRecordsController extends BaseController
-{
-    @Autowired
-    private IVisitorRecordsService visitorRecordsService;
-
-/**
- * 查询访客车辆登记列表
- */
-@PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:list')")
-@GetMapping("/list")
-    public TableDataInfo list(VisitorRecords visitorRecords)
-    {
-        startPage();
-        List<VisitorRecords> list = visitorRecordsService.selectVisitorRecordsList(visitorRecords);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出访客车辆登记列表
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:export')")
-    @Log(title = "访客车辆登记", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, VisitorRecords visitorRecords)
-    {
-        List<VisitorRecords> list = visitorRecordsService.selectVisitorRecordsList(visitorRecords);
-        ExcelUtil<VisitorRecords> util = new ExcelUtil<VisitorRecords>(VisitorRecords.class);
-        util.exportExcel(response, list, "访客车辆登记数据");
-    }
-
-    /**
-     * 获取访客车辆登记详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:query')")
-    @GetMapping(value = "/{visitorRecordsId}")
-    public AjaxResult getInfo(@PathVariable("visitorRecordsId") Long visitorRecordsId)
-    {
-        return success(visitorRecordsService.selectVisitorRecordsByVisitorRecordsId(visitorRecordsId));
-    }
-
-    /**
-     * 新增访客车辆登记
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:add')")
-    @Log(title = "访客车辆登记", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody VisitorRecords visitorRecords)
-    {
-        return toAjax(visitorRecordsService.insertVisitorRecords(visitorRecords));
-    }
-
-    /**
-     * 修改访客车辆登记
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:edit')")
-    @Log(title = "访客车辆登记", businessType = BusinessType.UPDATE)
-    @PostMapping("/put")
-    public AjaxResult edit(@RequestBody VisitorRecords visitorRecords)
-    {
-        return toAjax(visitorRecordsService.updateVisitorRecords(visitorRecords));
-    }
-
-    /**
-     * 删除访客车辆登记
-     */
-    @PreAuthorize("@ss.hasPermi('wuYe:visitorRecords:remove')")
-    @Log(title = "访客车辆登记", businessType = BusinessType.DELETE)
-    @GetMapping("/delete/{visitorRecordsIds}")
-    public AjaxResult remove(@PathVariable Long[] visitorRecordsIds)
-    {
-        return toAjax(visitorRecordsService.deleteVisitorRecordsByVisitorRecordsIds(visitorRecordsIds));
-    }
-}

+ 12 - 3
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java

@@ -1,14 +1,16 @@
 package com.ruoyi.common.core.domain;
 
-import java.io.Serializable;
-import java.util.List;
-import java.util.stream.Collectors;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.AssetType;
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysMenu;
 import com.ruoyi.common.utils.StringUtils;
 
+import java.io.Serializable;
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * Treeselect树结构实体类
  * 
@@ -51,6 +53,13 @@ public class TreeSelect implements Serializable
         this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
     }
 
+    public TreeSelect(AssetType assetType)
+    {
+        this.id = assetType.getAssetId();
+        this.label = assetType.getAssetName();
+        this.children = assetType.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
+    }
+
     public Long getId()
     {
         return id;

+ 28 - 4
ruoyi-system/src/main/java/com/ruoyi/system/domain/asset/AssetType.java → ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/AssetType.java

@@ -1,9 +1,12 @@
-package com.ruoyi.system.domain.asset;
+package com.ruoyi.common.core.domain.entity;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 资产类型对象 asset_type
@@ -41,7 +44,28 @@ public class AssetType extends BaseEntity
     /** 删除标志(0代表存在 2代表删除) */
     private String delFlag;
 
-    public void setAssetId(Long assetId) 
+    /** 父资产名称 */
+    private String parentName;
+    /** 子资产 */
+    private List<AssetType> children = new ArrayList<AssetType>();
+
+    public String getParentName() {
+        return parentName;
+    }
+
+    public void setParentName(String parentName) {
+        this.parentName = parentName;
+    }
+
+    public List<AssetType> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<AssetType> children) {
+        this.children = children;
+    }
+
+    public void setAssetId(Long assetId)
     {
         this.assetId = assetId;
     }

+ 16 - 2
ruoyi-system/src/main/java/com/ruoyi/system/domain/illegalParking/IllegalParking.java

@@ -1,9 +1,11 @@
 package com.ruoyi.system.domain.illegalParking;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.List;
 
 /**
  * 违章停车登记对象 illegal_parking
@@ -48,6 +50,18 @@ public class IllegalParking extends BaseEntity
     /** 是否黑名单 N:否 Y:是 */
     @Excel(name = "是否黑名单 N:否 Y:是")
     private String isBlack;
+    /**
+     * 违停记录子集
+     */
+    private List<IllegalParking> children;
+
+    public List<IllegalParking> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<IllegalParking> children) {
+        this.children = children;
+    }
 
     public String getCarType() {
         return carType;

+ 79 - 9
ruoyi-system/src/main/java/com/ruoyi/system/domain/maintenance/MaintenanceStaff.java → ruoyi-system/src/main/java/com/ruoyi/system/domain/staffManage/StaffManage.java

@@ -1,4 +1,4 @@
-package com.ruoyi.system.domain.maintenance;
+package com.ruoyi.system.domain.staffManage;
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -6,26 +6,30 @@ import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
- * 维修人员管理对象 maintenance_staff
+ * 员工管理对象 staff_manage
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
-public class MaintenanceStaff extends BaseEntity
+public class StaffManage extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
-    /** 维修人员id */
+    /** 员工管理id */
     private Long staffId;
 
-    /** 维修人员姓名 */
-    @Excel(name = "维修人员姓名")
+    /** 员姓名 */
+    @Excel(name = "员姓名")
     private String staffName;
 
-    /** 性别,Male(男), Female(女) */
-    @Excel(name = "性别,Male", readConverterExp = "男=")
+    /** 员工性别(0男 1女 2未知) */
+    @Excel(name = "员工性别", readConverterExp = "0=,1=女,2=未知")
     private String gender;
 
+    /** 员工类别,1:保安 2:维修人员 3:物业管理 */
+    @Excel(name = "员工类别,1:保安 2:维修人员 3:物业管理")
+    private String staffCategory;
+
     /** 维修分类,表示维修人员擅长的维修类别 */
     @Excel(name = "维修分类,表示维修人员擅长的维修类别")
     private String maintenanceCategory;
@@ -38,6 +42,22 @@ public class MaintenanceStaff extends BaseEntity
     @Excel(name = "头像,存储头像的URL或文件路径")
     private String avatarPhoto;
 
+    /** 身份证号码 */
+    @Excel(name = "身份证号码")
+    private String idCard;
+
+    /** 身份证正面 */
+    @Excel(name = "身份证正面")
+    private String idCardFront;
+
+    /** 身份证反面 */
+    @Excel(name = "身份证反面")
+    private String idCardBack;
+
+    /** 相关证件 */
+    @Excel(name = "相关证件")
+    private String certificate;
+
     /** 状态,字典值 */
     @Excel(name = "状态,字典值")
     private String status;
@@ -69,6 +89,15 @@ public class MaintenanceStaff extends BaseEntity
     {
         return gender;
     }
+    public void setStaffCategory(String staffCategory) 
+    {
+        this.staffCategory = staffCategory;
+    }
+
+    public String getStaffCategory() 
+    {
+        return staffCategory;
+    }
     public void setMaintenanceCategory(String maintenanceCategory) 
     {
         this.maintenanceCategory = maintenanceCategory;
@@ -96,6 +125,42 @@ public class MaintenanceStaff extends BaseEntity
     {
         return avatarPhoto;
     }
+    public void setIdCard(String idCard) 
+    {
+        this.idCard = idCard;
+    }
+
+    public String getIdCard() 
+    {
+        return idCard;
+    }
+    public void setIdCardFront(String idCardFront) 
+    {
+        this.idCardFront = idCardFront;
+    }
+
+    public String getIdCardFront() 
+    {
+        return idCardFront;
+    }
+    public void setIdCardBack(String idCardBack) 
+    {
+        this.idCardBack = idCardBack;
+    }
+
+    public String getIdCardBack() 
+    {
+        return idCardBack;
+    }
+    public void setCertificate(String certificate) 
+    {
+        this.certificate = certificate;
+    }
+
+    public String getCertificate() 
+    {
+        return certificate;
+    }
     public void setStatus(String status) 
     {
         this.status = status;
@@ -112,9 +177,14 @@ public class MaintenanceStaff extends BaseEntity
             .append("staffId", getStaffId())
             .append("staffName", getStaffName())
             .append("gender", getGender())
+            .append("staffCategory", getStaffCategory())
             .append("maintenanceCategory", getMaintenanceCategory())
             .append("phoneNumber", getPhoneNumber())
             .append("avatarPhoto", getAvatarPhoto())
+            .append("idCard", getIdCard())
+            .append("idCardFront", getIdCardFront())
+            .append("idCardBack", getIdCardBack())
+            .append("certificate", getCertificate())
             .append("status", getStatus())
             .append("createBy", getCreateBy())
             .append("createTime", getCreateTime())

+ 19 - 5
ruoyi-system/src/main/java/com/ruoyi/system/domain/staffTrain/StaffTrainManual.java

@@ -12,7 +12,7 @@ import java.util.Date;
  * 员工培训手册对象 staff_train_manual
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
 public class StaffTrainManual extends BaseEntity
 {
@@ -25,8 +25,8 @@ public class StaffTrainManual extends BaseEntity
     @Excel(name = "员工培训手册标题")
     private String manualTitle;
 
-    /** 员工培训手册类型(1:公告 2:通知 3:资讯) */
-    @Excel(name = "员工培训手册类型", readConverterExp = "1=:公告,2=:通知,3=:资讯")
+    /** 员工培训手册类型(1:图片 2:视频) */
+    @Excel(name = "员工培训手册类型", readConverterExp = "1=图片,2=视频")
     private String manualType;
 
     /** 员工培训手册内容 */
@@ -42,6 +42,10 @@ public class StaffTrainManual extends BaseEntity
     @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date publishTime;
 
+    /** 视频地址URL */
+    @Excel(name = "视频地址URL")
+    private String videoUrl;
+
     /** 封面图片,存储图片路径或URL */
     @Excel(name = "封面图片,存储图片路径或URL")
     private String coverImage;
@@ -51,7 +55,7 @@ public class StaffTrainManual extends BaseEntity
     private String author;
 
     /** 来源,记录资讯的来源(如单位、网站等) */
-    @Excel(name = "来源,记录资讯的来源", readConverterExp = "如=单位、网站等")
+    @Excel(name = "来源,记录资讯的来源")
     private String source;
 
     /** 浏览次数,记录资讯被查看的次数 */
@@ -59,7 +63,7 @@ public class StaffTrainManual extends BaseEntity
     private Long viewCount;
 
     /** 是否置顶:Y(置顶)、N(不置顶) */
-    @Excel(name = "是否置顶:Y", readConverterExp = "置=顶")
+    @Excel(name = "是否置顶:Y", readConverterExp = "Y=顶,N=不置顶")
     private String isTop;
 
     public void setManualId(Long manualId) 
@@ -116,6 +120,15 @@ public class StaffTrainManual extends BaseEntity
     {
         return publishTime;
     }
+    public void setVideoUrl(String videoUrl) 
+    {
+        this.videoUrl = videoUrl;
+    }
+
+    public String getVideoUrl() 
+    {
+        return videoUrl;
+    }
     public void setCoverImage(String coverImage) 
     {
         this.coverImage = coverImage;
@@ -171,6 +184,7 @@ public class StaffTrainManual extends BaseEntity
             .append("manualContent", getManualContent())
             .append("status", getStatus())
             .append("publishTime", getPublishTime())
+            .append("videoUrl", getVideoUrl())
             .append("coverImage", getCoverImage())
             .append("author", getAuthor())
             .append("source", getSource())

+ 0 - 112
ruoyi-system/src/main/java/com/ruoyi/system/domain/visitor/VisitorRecords.java

@@ -1,112 +0,0 @@
-package com.ruoyi.system.domain.visitor;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-/**
- * 访客车辆登记对象 visitor_records
- * 
- * @author boman
- * @date 2025-02-14
- */
-public class VisitorRecords extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 访客车辆登记主键 */
-    private Long visitorRecordsId;
-
-    /** 车牌号码(含汉字/字母/数字) */
-    @Excel(name = "车牌号码", readConverterExp = "含=汉字/字母/数字")
-    private String plateNumber;
-
-    /** 门户id */
-    @Excel(name = "门户id")
-    private Long portalId;
-
-    /** 来访门户/访问位置 */
-    @Excel(name = "来访门户/访问位置")
-    private String visitPortal;
-
-    /** 来访人员手机号码(支持国际格式) */
-    @Excel(name = "来访人员手机号码", readConverterExp = "支=持国际格式")
-    private String mobileNumber;
-
-    /** 来访人员姓名 */
-    @Excel(name = "来访人员姓名")
-    private String visitName;
-
-    public void setVisitorRecordsId(Long visitorRecordsId) 
-    {
-        this.visitorRecordsId = visitorRecordsId;
-    }
-
-    public Long getVisitorRecordsId() 
-    {
-        return visitorRecordsId;
-    }
-    public void setPlateNumber(String plateNumber) 
-    {
-        this.plateNumber = plateNumber;
-    }
-
-    public String getPlateNumber() 
-    {
-        return plateNumber;
-    }
-    public void setPortalId(Long portalId) 
-    {
-        this.portalId = portalId;
-    }
-
-    public Long getPortalId() 
-    {
-        return portalId;
-    }
-    public void setVisitPortal(String visitPortal) 
-    {
-        this.visitPortal = visitPortal;
-    }
-
-    public String getVisitPortal() 
-    {
-        return visitPortal;
-    }
-    public void setMobileNumber(String mobileNumber) 
-    {
-        this.mobileNumber = mobileNumber;
-    }
-
-    public String getMobileNumber() 
-    {
-        return mobileNumber;
-    }
-    public void setVisitName(String visitName) 
-    {
-        this.visitName = visitName;
-    }
-
-    public String getVisitName() 
-    {
-        return visitName;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("visitorRecordsId", getVisitorRecordsId())
-            .append("plateNumber", getPlateNumber())
-            .append("portalId", getPortalId())
-            .append("visitPortal", getVisitPortal())
-            .append("mobileNumber", getMobileNumber())
-            .append("visitName", getVisitName())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
-    }
-}

+ 19 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AssetTypeMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.mapper;
 
-import com.ruoyi.system.domain.asset.AssetType;
+import com.ruoyi.common.core.domain.entity.AssetType;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -28,6 +29,7 @@ public interface AssetTypeMapper
      * @return 资产类型集合
      */
     public List<AssetType> selectAssetTypeList(AssetType assetType);
+    public List<AssetType> selectAssetTypeListTree(AssetType assetType);
 
     /**
      * 新增资产类型
@@ -60,4 +62,20 @@ public interface AssetTypeMapper
      * @return 结果
      */
     public int deleteAssetTypeByAssetIds(Long[] assetIds);
+
+
+    AssetType checkAssetNameUnique(@Param("assetName") String assetName, @Param("parentId") Long parentId);
+
+   int selectNormalChildrenAssetById(Long assetId);
+
+    int hasChildByAssetId(Long assetId);
+
+    /**
+     * 根据ID查询所有子资产分类
+     *
+     * @param assetId 资产分类iD
+     * @return 资产分类列表
+     */
+    public List<AssetType> selectChildrenAssetTypeById(Long assetId);
+    int updateAssetTypeChildren(@Param("assetTypes") List<AssetType> assetTypes);
 }

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/IllegalParkingMapper.java

@@ -28,6 +28,7 @@ public interface IllegalParkingMapper
      * @return 违章停车登记集合
      */
     public List<IllegalParking> selectIllegalParkingList(IllegalParking illegalParking);
+    public List<IllegalParking> selectIllegalParkingByPlateNumber(String plateNumber);
 
     /**
      * 新增违章停车登记

+ 0 - 63
ruoyi-system/src/main/java/com/ruoyi/system/mapper/MaintenanceStaffMapper.java

@@ -1,63 +0,0 @@
-package com.ruoyi.system.mapper;
-
-import com.ruoyi.system.domain.maintenance.MaintenanceStaff;
-
-import java.util.List;
-
-
-/**
- * 维修人员管理Mapper接口
- * 
- * @author boman
- * @date 2025-02-14
- */
-public interface MaintenanceStaffMapper 
-{
-    /**
-     * 查询维修人员管理
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 维修人员管理
-     */
-    public MaintenanceStaff selectMaintenanceStaffByStaffId(Long staffId);
-
-    /**
-     * 查询维修人员管理列表
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 维修人员管理集合
-     */
-    public List<MaintenanceStaff> selectMaintenanceStaffList(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 新增维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    public int insertMaintenanceStaff(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 修改维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    public int updateMaintenanceStaff(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 删除维修人员管理
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 结果
-     */
-    public int deleteMaintenanceStaffByStaffId(Long staffId);
-
-    /**
-     * 批量删除维修人员管理
-     * 
-     * @param staffIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteMaintenanceStaffByStaffIds(Long[] staffIds);
-}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StaffManageMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.staffManage.StaffManage;
+
+import java.util.List;
+
+
+/**
+ * 员工管理Mapper接口
+ * 
+ * @author boman
+ * @date 2025-02-18
+ */
+public interface StaffManageMapper 
+{
+    /**
+     * 查询员工管理
+     * 
+     * @param staffId 员工管理主键
+     * @return 员工管理
+     */
+    public StaffManage selectStaffManageByStaffId(Long staffId);
+
+    /**
+     * 查询员工管理列表
+     * 
+     * @param staffManage 员工管理
+     * @return 员工管理集合
+     */
+    public List<StaffManage> selectStaffManageList(StaffManage staffManage);
+
+    /**
+     * 新增员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    public int insertStaffManage(StaffManage staffManage);
+
+    /**
+     * 修改员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    public int updateStaffManage(StaffManage staffManage);
+
+    /**
+     * 删除员工管理
+     * 
+     * @param staffId 员工管理主键
+     * @return 结果
+     */
+    public int deleteStaffManageByStaffId(Long staffId);
+
+    /**
+     * 批量删除员工管理
+     * 
+     * @param staffIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteStaffManageByStaffIds(Long[] staffIds);
+}

+ 1 - 2
ruoyi-system/src/main/java/com/ruoyi/system/mapper/StaffTrainManualMapper.java

@@ -1,7 +1,6 @@
 package com.ruoyi.system.mapper;
 
 import com.ruoyi.system.domain.staffTrain.StaffTrainManual;
-
 import java.util.List;
 
 
@@ -9,7 +8,7 @@ import java.util.List;
  * 员工培训手册Mapper接口
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
 public interface StaffTrainManualMapper 
 {

+ 0 - 63
ruoyi-system/src/main/java/com/ruoyi/system/mapper/VisitorRecordsMapper.java

@@ -1,63 +0,0 @@
-package com.ruoyi.system.mapper;
-
-import com.ruoyi.system.domain.visitor.VisitorRecords;
-
-import java.util.List;
-
-
-/**
- * 访客车辆登记Mapper接口
- * 
- * @author boman
- * @date 2025-02-14
- */
-public interface VisitorRecordsMapper 
-{
-    /**
-     * 查询访客车辆登记
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 访客车辆登记
-     */
-    public VisitorRecords selectVisitorRecordsByVisitorRecordsId(Long visitorRecordsId);
-
-    /**
-     * 查询访客车辆登记列表
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 访客车辆登记集合
-     */
-    public List<VisitorRecords> selectVisitorRecordsList(VisitorRecords visitorRecords);
-
-    /**
-     * 新增访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    public int insertVisitorRecords(VisitorRecords visitorRecords);
-
-    /**
-     * 修改访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    public int updateVisitorRecords(VisitorRecords visitorRecords);
-
-    /**
-     * 删除访客车辆登记
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 结果
-     */
-    public int deleteVisitorRecordsByVisitorRecordsId(Long visitorRecordsId);
-
-    /**
-     * 批量删除访客车辆登记
-     * 
-     * @param visitorRecordsIds 需要删除的数据主键集合
-     * @return 结果
-     */
-    public int deleteVisitorRecordsByVisitorRecordsIds(Long[] visitorRecordsIds);
-}

+ 15 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/IAssetTypeService.java

@@ -1,6 +1,7 @@
 package com.ruoyi.system.service;
 
-import com.ruoyi.system.domain.asset.AssetType;
+import com.ruoyi.common.core.domain.TreeSelect;
+import com.ruoyi.common.core.domain.entity.AssetType;
 
 import java.util.List;
 
@@ -60,4 +61,17 @@ public interface IAssetTypeService
      * @return 结果
      */
     public int deleteAssetTypeByAssetId(Long assetId);
+
+    /**
+     * 构建前端所需要树结构
+     * @param assetType
+     * @return
+     */
+    List<TreeSelect>selectAssetTypeTreeList(AssetType assetType);
+
+    boolean checkAssetTypeNameUnique(AssetType assetType);
+
+   int selectNormalChildrenAssetById(Long assetId);
+
+    boolean  hasChildByAssetId (Long assetId);
 }

+ 0 - 62
ruoyi-system/src/main/java/com/ruoyi/system/service/IMaintenanceStaffService.java

@@ -1,62 +0,0 @@
-package com.ruoyi.system.service;
-
-import com.ruoyi.system.domain.maintenance.MaintenanceStaff;
-
-import java.util.List;
-
-/**
- * 维修人员管理Service接口
- * 
- * @author boman
- * @date 2025-02-14
- */
-public interface IMaintenanceStaffService 
-{
-    /**
-     * 查询维修人员管理
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 维修人员管理
-     */
-    public MaintenanceStaff selectMaintenanceStaffByStaffId(Long staffId);
-
-    /**
-     * 查询维修人员管理列表
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 维修人员管理集合
-     */
-    public List<MaintenanceStaff> selectMaintenanceStaffList(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 新增维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    public int insertMaintenanceStaff(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 修改维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    public int updateMaintenanceStaff(MaintenanceStaff maintenanceStaff);
-
-    /**
-     * 批量删除维修人员管理
-     * 
-     * @param staffIds 需要删除的维修人员管理主键集合
-     * @return 结果
-     */
-    public int deleteMaintenanceStaffByStaffIds(Long[] staffIds);
-
-    /**
-     * 删除维修人员管理信息
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 结果
-     */
-    public int deleteMaintenanceStaffByStaffId(Long staffId);
-}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IStaffManageService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.staffManage.StaffManage;
+
+import java.util.List;
+
+
+/**
+ * 员工管理Service接口
+ * 
+ * @author boman
+ * @date 2025-02-18
+ */
+public interface IStaffManageService 
+{
+    /**
+     * 查询员工管理
+     * 
+     * @param staffId 员工管理主键
+     * @return 员工管理
+     */
+    public StaffManage selectStaffManageByStaffId(Long staffId);
+
+    /**
+     * 查询员工管理列表
+     * 
+     * @param staffManage 员工管理
+     * @return 员工管理集合
+     */
+    public List<StaffManage> selectStaffManageList(StaffManage staffManage);
+
+    /**
+     * 新增员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    public int insertStaffManage(StaffManage staffManage);
+
+    /**
+     * 修改员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    public int updateStaffManage(StaffManage staffManage);
+
+    /**
+     * 批量删除员工管理
+     * 
+     * @param staffIds 需要删除的员工管理主键集合
+     * @return 结果
+     */
+    public int deleteStaffManageByStaffIds(Long[] staffIds);
+
+    /**
+     * 删除员工管理信息
+     * 
+     * @param staffId 员工管理主键
+     * @return 结果
+     */
+    public int deleteStaffManageByStaffId(Long staffId);
+}

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/IStaffTrainManualService.java

@@ -9,7 +9,7 @@ import java.util.List;
  * 员工培训手册Service接口
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
 public interface IStaffTrainManualService 
 {

+ 0 - 63
ruoyi-system/src/main/java/com/ruoyi/system/service/IVisitorRecordsService.java

@@ -1,63 +0,0 @@
-package com.ruoyi.system.service;
-
-import com.ruoyi.system.domain.visitor.VisitorRecords;
-
-import java.util.List;
-
-
-/**
- * 访客车辆登记Service接口
- * 
- * @author boman
- * @date 2025-02-14
- */
-public interface IVisitorRecordsService 
-{
-    /**
-     * 查询访客车辆登记
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 访客车辆登记
-     */
-    public VisitorRecords selectVisitorRecordsByVisitorRecordsId(Long visitorRecordsId);
-
-    /**
-     * 查询访客车辆登记列表
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 访客车辆登记集合
-     */
-    public List<VisitorRecords> selectVisitorRecordsList(VisitorRecords visitorRecords);
-
-    /**
-     * 新增访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    public int insertVisitorRecords(VisitorRecords visitorRecords);
-
-    /**
-     * 修改访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    public int updateVisitorRecords(VisitorRecords visitorRecords);
-
-    /**
-     * 批量删除访客车辆登记
-     * 
-     * @param visitorRecordsIds 需要删除的访客车辆登记主键集合
-     * @return 结果
-     */
-    public int deleteVisitorRecordsByVisitorRecordsIds(Long[] visitorRecordsIds);
-
-    /**
-     * 删除访客车辆登记信息
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 结果
-     */
-    public int deleteVisitorRecordsByVisitorRecordsId(Long visitorRecordsId);
-}

+ 190 - 23
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AssetTypeServiceImpl.java

@@ -1,97 +1,264 @@
 package com.ruoyi.system.service.impl;
 
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.TreeSelect;
+import com.ruoyi.common.core.domain.entity.AssetType;
+import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.system.domain.asset.AssetType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.spring.SpringUtils;
 import com.ruoyi.system.mapper.AssetTypeMapper;
 import com.ruoyi.system.service.IAssetTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 资产类型Service业务层处理
- * 
+ *
  * @author boman
  * @date 2025-02-17
  */
 @Service
-public class AssetTypeServiceImpl implements IAssetTypeService 
-{
+public class AssetTypeServiceImpl implements IAssetTypeService {
     @Autowired
     private AssetTypeMapper assetTypeMapper;
 
     /**
      * 查询资产类型
-     * 
+     *
      * @param assetId 资产类型主键
      * @return 资产类型
      */
     @Override
-    public AssetType selectAssetTypeByAssetId(Long assetId)
-    {
+    public AssetType selectAssetTypeByAssetId(Long assetId) {
         return assetTypeMapper.selectAssetTypeByAssetId(assetId);
     }
 
     /**
      * 查询资产类型列表
-     * 
+     *
      * @param assetType 资产类型
      * @return 资产类型
      */
     @Override
-    public List<AssetType> selectAssetTypeList(AssetType assetType)
-    {
+    public List<AssetType> selectAssetTypeList(AssetType assetType) {
         return assetTypeMapper.selectAssetTypeList(assetType);
     }
 
     /**
      * 新增资产类型
-     * 
+     *
      * @param assetType 资产类型
      * @return 结果
      */
     @Override
-    public int insertAssetType(AssetType assetType)
-    {
+    public int insertAssetType(AssetType assetType) {
         assetType.setCreateTime(DateUtils.getNowDate());
-        return assetTypeMapper.insertAssetType(assetType);
+        AssetType info = assetTypeMapper.selectAssetTypeByAssetId(assetType.getParentId());
+        int i = 0;
+        if (info != null) {
+            // 如果父节点不为正常状态,则不允许新增子节点
+            // 如果父节点不为正常状态,则不允许新增子节点
+            if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) {
+                throw new ServiceException("部门停用,不允许新增");
+            }
+            assetType.setAncestors(info.getAncestors() + "," + assetType.getParentId());
+            assetType.setCreateTime(DateUtils.getNowDate());
+            i = assetTypeMapper.insertAssetType(assetType);
+        } else {
+            assetType.setParentId(0L);
+            assetType.setAncestors("0");
+            assetType.setCreateTime(DateUtils.getNowDate());
+            i = assetTypeMapper.insertAssetType(assetType);
+        }
+        return i;
     }
 
     /**
      * 修改资产类型
-     * 
+     *
      * @param assetType 资产类型
      * @return 结果
      */
     @Override
-    public int updateAssetType(AssetType assetType)
-    {
+    public int updateAssetType(AssetType assetType) {
+        AssetType newParentAssetType = assetTypeMapper.selectAssetTypeByAssetId(assetType.getParentId());
+        AssetType oldParentAssetType = assetTypeMapper.selectAssetTypeByAssetId(assetType.getAssetId());
+        if (StringUtils.isNotNull(newParentAssetType) && StringUtils.isNotNull(oldParentAssetType)) {
+            String newAncestors = newParentAssetType.getAncestors() + "," + newParentAssetType.getAncestors();
+            String oldAncestors = oldParentAssetType.getAncestors();
+            assetType.setAncestors(newAncestors);
+            updateAssetTypeChildren(assetType.getAssetId(), newAncestors, oldAncestors);
+        }
         assetType.setUpdateTime(DateUtils.getNowDate());
         return assetTypeMapper.updateAssetType(assetType);
     }
 
+    /**
+     * 修改子元素关系
+     *
+     * @param assetId      被修改的资产ID
+     * @param newAncestors 新的父ID集合
+     * @param oldAncestors 旧的父ID集合
+     */
+    public void updateAssetTypeChildren(Long assetId, String newAncestors, String oldAncestors) {
+        List<AssetType> children = assetTypeMapper.selectChildrenAssetTypeById(assetId);
+        for (AssetType child : children) {
+            child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
+        }
+        if (children.size() > 0) {
+            assetTypeMapper.updateAssetTypeChildren(children);
+        }
+    }
+
     /**
      * 批量删除资产类型
-     * 
+     *
      * @param assetIds 需要删除的资产类型主键
      * @return 结果
      */
     @Override
-    public int deleteAssetTypeByAssetIds(Long[] assetIds)
-    {
+    public int deleteAssetTypeByAssetIds(Long[] assetIds) {
         return assetTypeMapper.deleteAssetTypeByAssetIds(assetIds);
     }
 
     /**
      * 删除资产类型信息
-     * 
+     *
      * @param assetId 资产类型主键
      * @return 结果
      */
     @Override
-    public int deleteAssetTypeByAssetId(Long assetId)
-    {
+    public int deleteAssetTypeByAssetId(Long assetId) {
         return assetTypeMapper.deleteAssetTypeByAssetId(assetId);
     }
+
+    /**
+     * 构建前端所需要树结构
+     *
+     * @param assetType
+     * @return
+     */
+    @Override
+    public List<TreeSelect> selectAssetTypeTreeList(AssetType assetType) {
+        List<AssetType> assetTypes = SpringUtils.getAopProxy(this).selectAssetTypeListTree(assetType);
+        return buildAssetTypeTreeSelect(assetTypes);
+    }
+
+    /**
+     * 检验资产名称的唯一性
+     *
+     * @param assetType
+     * @return
+     */
+    @Override
+    public boolean checkAssetTypeNameUnique(AssetType assetType) {
+        Long assetId = StringUtils.isNull(assetType.getAssetId()) ? -1L : assetType.getAssetId();
+        AssetType info = assetTypeMapper.checkAssetNameUnique(assetType.getAssetName(), assetType.getParentId());
+        if (StringUtils.isNotNull(info) && info.getAssetId().longValue() != assetId.longValue()) {
+            return UserConstants.NOT_UNIQUE;
+        }
+        return UserConstants.UNIQUE;
+    }
+
+    @Override
+    public int selectNormalChildrenAssetById(Long assetId) {
+        return assetTypeMapper.selectNormalChildrenAssetById(assetId);
+    }
+
+    /**
+     * 是否存在子节点
+     *
+     * @param assetId 资产ID
+     * @return 结果
+     */
+    @Override
+    public boolean hasChildByAssetId(Long assetId) {
+        int result = assetTypeMapper.hasChildByAssetId(assetId);
+        return result > 0;
+    }
+
+    /**
+     * 查询资产类型列表
+     *
+     * @param assetType 资产类型
+     * @return 资产类型
+     */
+    public List<AssetType> selectAssetTypeListTree(AssetType assetType) {
+        return assetTypeMapper.selectAssetTypeListTree(assetType);
+    }
+
+    /**
+     * 构建前端所需要下拉树结构
+     *
+     * @param assetTypes 资产列表
+     * @return 下拉树结构列表
+     */
+    public List<TreeSelect> buildAssetTypeTreeSelect(List<AssetType> assetTypes) {
+        List<AssetType> assetTypesTrees = buildAssetTypeTree(assetTypes);
+        return assetTypesTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
+    }
+
+    /**
+     * 构建前端所需要树结构
+     *
+     * @param assetTypes 资产列表
+     * @return 树结构列表
+     */
+    public List<AssetType> buildAssetTypeTree(List<AssetType> assetTypes) {
+        List<AssetType> returnList = new ArrayList<AssetType>();
+        List<Long> tempList = assetTypes.stream().map(AssetType::getAssetId).collect(Collectors.toList());
+        for (AssetType assetType : assetTypes) {
+            // 如果是顶级节点, 遍历该父节点的所有子节点
+            if (!tempList.contains(assetType.getParentId())) {
+                recursionFn(assetTypes, assetType);
+                returnList.add(assetType);
+            }
+        }
+        if (returnList.isEmpty()) {
+            returnList = assetTypes;
+        }
+        return returnList;
+    }
+
+    /**
+     * 递归列表
+     */
+    private void recursionFn(List<AssetType> list, AssetType t) {
+        // 得到子节点列表
+        List<AssetType> childList = getChildList(list, t);
+        t.setChildren(childList);
+        for (AssetType tChild : childList) {
+            if (hasChild(list, tChild)) {
+                recursionFn(list, tChild);
+            }
+        }
+    }
+
+    /**
+     * 得到子节点列表
+     */
+    private List<AssetType> getChildList(List<AssetType> list, AssetType t) {
+        List<AssetType> tlist = new ArrayList<AssetType>();
+        Iterator<AssetType> it = list.iterator();
+        while (it.hasNext()) {
+            AssetType n = (AssetType) it.next();
+            if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getAssetId().longValue()) {
+                tlist.add(n);
+            }
+        }
+        return tlist;
+    }
+
+    /**
+     * 判断是否有子节点
+     */
+    private boolean hasChild(List<AssetType> list, AssetType t) {
+        return getChildList(list, t).size() > 0;
+    }
 }

+ 12 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IllegalParkingServiceImpl.java

@@ -30,7 +30,14 @@ public class IllegalParkingServiceImpl implements IIllegalParkingService
     @Override
     public IllegalParking selectIllegalParkingByIllegalParkingId(Long illegalParkingId)
     {
-        return illegalParkingMapper.selectIllegalParkingByIllegalParkingId(illegalParkingId);
+
+        IllegalParking illegalParking = illegalParkingMapper.selectIllegalParkingByIllegalParkingId(illegalParkingId);
+        String plateNumber = illegalParking.getPlateNumber();
+        List<IllegalParking> illegalParkings = illegalParkingMapper.selectIllegalParkingByPlateNumber(plateNumber);
+        if (illegalParkings != null && illegalParkings.size() > 0){
+            illegalParking.setChildren(illegalParkings);
+        }
+        return illegalParking;
     }
 
     /**
@@ -42,7 +49,9 @@ public class IllegalParkingServiceImpl implements IIllegalParkingService
     @Override
     public List<IllegalParking> selectIllegalParkingList(IllegalParking illegalParking)
     {
-        return illegalParkingMapper.selectIllegalParkingList(illegalParking);
+
+        List<IllegalParking> illegalParkings = illegalParkingMapper.selectIllegalParkingList(illegalParking);
+        return illegalParkings;
     }
 
     /**
@@ -54,6 +63,7 @@ public class IllegalParkingServiceImpl implements IIllegalParkingService
     @Override
     public int insertIllegalParking(IllegalParking illegalParking)
     {
+        //todo 需要判断是否是小区车辆,关联房号,判断是否需要进入黑名单
         illegalParking.setCreateTime(DateUtils.getNowDate());
         return illegalParkingMapper.insertIllegalParking(illegalParking);
     }

+ 0 - 97
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MaintenanceStaffServiceImpl.java

@@ -1,97 +0,0 @@
-package com.ruoyi.system.service.impl;
-
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.system.domain.maintenance.MaintenanceStaff;
-import com.ruoyi.system.mapper.MaintenanceStaffMapper;
-import com.ruoyi.system.service.IMaintenanceStaffService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 维修人员管理Service业务层处理
- * 
- * @author boman
- * @date 2025-02-14
- */
-@Service
-public class MaintenanceStaffServiceImpl implements IMaintenanceStaffService 
-{
-    @Autowired
-    private MaintenanceStaffMapper maintenanceStaffMapper;
-
-    /**
-     * 查询维修人员管理
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 维修人员管理
-     */
-    @Override
-    public MaintenanceStaff selectMaintenanceStaffByStaffId(Long staffId)
-    {
-        return maintenanceStaffMapper.selectMaintenanceStaffByStaffId(staffId);
-    }
-
-    /**
-     * 查询维修人员管理列表
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 维修人员管理
-     */
-    @Override
-    public List<MaintenanceStaff> selectMaintenanceStaffList(MaintenanceStaff maintenanceStaff)
-    {
-        return maintenanceStaffMapper.selectMaintenanceStaffList(maintenanceStaff);
-    }
-
-    /**
-     * 新增维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    @Override
-    public int insertMaintenanceStaff(MaintenanceStaff maintenanceStaff)
-    {
-        maintenanceStaff.setCreateTime(DateUtils.getNowDate());
-        return maintenanceStaffMapper.insertMaintenanceStaff(maintenanceStaff);
-    }
-
-    /**
-     * 修改维修人员管理
-     * 
-     * @param maintenanceStaff 维修人员管理
-     * @return 结果
-     */
-    @Override
-    public int updateMaintenanceStaff(MaintenanceStaff maintenanceStaff)
-    {
-        maintenanceStaff.setUpdateTime(DateUtils.getNowDate());
-        return maintenanceStaffMapper.updateMaintenanceStaff(maintenanceStaff);
-    }
-
-    /**
-     * 批量删除维修人员管理
-     * 
-     * @param staffIds 需要删除的维修人员管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteMaintenanceStaffByStaffIds(Long[] staffIds)
-    {
-        return maintenanceStaffMapper.deleteMaintenanceStaffByStaffIds(staffIds);
-    }
-
-    /**
-     * 删除维修人员管理信息
-     * 
-     * @param staffId 维修人员管理主键
-     * @return 结果
-     */
-    @Override
-    public int deleteMaintenanceStaffByStaffId(Long staffId)
-    {
-        return maintenanceStaffMapper.deleteMaintenanceStaffByStaffId(staffId);
-    }
-}

+ 97 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StaffManageServiceImpl.java

@@ -0,0 +1,97 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.staffManage.StaffManage;
+import com.ruoyi.system.mapper.StaffManageMapper;
+import com.ruoyi.system.service.IStaffManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 员工管理Service业务层处理
+ * 
+ * @author boman
+ * @date 2025-02-18
+ */
+@Service
+public class StaffManageServiceImpl implements IStaffManageService 
+{
+    @Autowired
+    private StaffManageMapper staffManageMapper;
+
+    /**
+     * 查询员工管理
+     * 
+     * @param staffId 员工管理主键
+     * @return 员工管理
+     */
+    @Override
+    public StaffManage selectStaffManageByStaffId(Long staffId)
+    {
+        return staffManageMapper.selectStaffManageByStaffId(staffId);
+    }
+
+    /**
+     * 查询员工管理列表
+     * 
+     * @param staffManage 员工管理
+     * @return 员工管理
+     */
+    @Override
+    public List<StaffManage> selectStaffManageList(StaffManage staffManage)
+    {
+        return staffManageMapper.selectStaffManageList(staffManage);
+    }
+
+    /**
+     * 新增员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    @Override
+    public int insertStaffManage(StaffManage staffManage)
+    {
+        staffManage.setCreateTime(DateUtils.getNowDate());
+        return staffManageMapper.insertStaffManage(staffManage);
+    }
+
+    /**
+     * 修改员工管理
+     * 
+     * @param staffManage 员工管理
+     * @return 结果
+     */
+    @Override
+    public int updateStaffManage(StaffManage staffManage)
+    {
+        staffManage.setUpdateTime(DateUtils.getNowDate());
+        return staffManageMapper.updateStaffManage(staffManage);
+    }
+
+    /**
+     * 批量删除员工管理
+     * 
+     * @param staffIds 需要删除的员工管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteStaffManageByStaffIds(Long[] staffIds)
+    {
+        return staffManageMapper.deleteStaffManageByStaffIds(staffIds);
+    }
+
+    /**
+     * 删除员工管理信息
+     * 
+     * @param staffId 员工管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteStaffManageByStaffId(Long staffId)
+    {
+        return staffManageMapper.deleteStaffManageByStaffId(staffId);
+    }
+}

+ 1 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/StaffTrainManualServiceImpl.java

@@ -6,14 +6,13 @@ import com.ruoyi.system.mapper.StaffTrainManualMapper;
 import com.ruoyi.system.service.IStaffTrainManualService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
 import java.util.List;
 
 /**
  * 员工培训手册Service业务层处理
  * 
  * @author boman
- * @date 2025-02-14
+ * @date 2025-02-18
  */
 @Service
 public class StaffTrainManualServiceImpl implements IStaffTrainManualService 

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VisitorManageServiceImpl.java

@@ -54,6 +54,7 @@ public class VisitorManageServiceImpl implements IVisitorManageService
     @Override
     public int insertVisitorManage(VisitorManage visitorManage)
     {
+        //todo 车牌需要进入道闸系统临时车
         visitorManage.setCreateTime(DateUtils.getNowDate());
         return visitorManageMapper.insertVisitorManage(visitorManage);
     }

+ 0 - 96
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/VisitorRecordsServiceImpl.java

@@ -1,96 +0,0 @@
-package com.ruoyi.system.service.impl;
-
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.system.domain.visitor.VisitorRecords;
-import com.ruoyi.system.mapper.VisitorRecordsMapper;
-import com.ruoyi.system.service.IVisitorRecordsService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import java.util.List;
-
-/**
- * 访客车辆登记Service业务层处理
- * 
- * @author boman
- * @date 2025-02-14
- */
-@Service
-public class VisitorRecordsServiceImpl implements IVisitorRecordsService 
-{
-    @Autowired
-    private VisitorRecordsMapper visitorRecordsMapper;
-
-    /**
-     * 查询访客车辆登记
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 访客车辆登记
-     */
-    @Override
-    public VisitorRecords selectVisitorRecordsByVisitorRecordsId(Long visitorRecordsId)
-    {
-        return visitorRecordsMapper.selectVisitorRecordsByVisitorRecordsId(visitorRecordsId);
-    }
-
-    /**
-     * 查询访客车辆登记列表
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 访客车辆登记
-     */
-    @Override
-    public List<VisitorRecords> selectVisitorRecordsList(VisitorRecords visitorRecords)
-    {
-        return visitorRecordsMapper.selectVisitorRecordsList(visitorRecords);
-    }
-
-    /**
-     * 新增访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    @Override
-    public int insertVisitorRecords(VisitorRecords visitorRecords)
-    {
-        visitorRecords.setCreateTime(DateUtils.getNowDate());
-        return visitorRecordsMapper.insertVisitorRecords(visitorRecords);
-    }
-
-    /**
-     * 修改访客车辆登记
-     * 
-     * @param visitorRecords 访客车辆登记
-     * @return 结果
-     */
-    @Override
-    public int updateVisitorRecords(VisitorRecords visitorRecords)
-    {
-        visitorRecords.setUpdateTime(DateUtils.getNowDate());
-        return visitorRecordsMapper.updateVisitorRecords(visitorRecords);
-    }
-
-    /**
-     * 批量删除访客车辆登记
-     * 
-     * @param visitorRecordsIds 需要删除的访客车辆登记主键
-     * @return 结果
-     */
-    @Override
-    public int deleteVisitorRecordsByVisitorRecordsIds(Long[] visitorRecordsIds)
-    {
-        return visitorRecordsMapper.deleteVisitorRecordsByVisitorRecordsIds(visitorRecordsIds);
-    }
-
-    /**
-     * 删除访客车辆登记信息
-     * 
-     * @param visitorRecordsId 访客车辆登记主键
-     * @return 结果
-     */
-    @Override
-    public int deleteVisitorRecordsByVisitorRecordsId(Long visitorRecordsId)
-    {
-        return visitorRecordsMapper.deleteVisitorRecordsByVisitorRecordsId(visitorRecordsId);
-    }
-}

+ 39 - 1
ruoyi-system/src/main/resources/mapper/system/AssetTypeMapper.xml

@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectAssetTypeList" parameterType="AssetType" resultMap="AssetTypeResult">
         <include refid="selectAssetTypeVo"/>
-        <where>  
+        <where>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
             <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
             <if test="assetName != null  and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
@@ -37,6 +37,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectAssetTypeVo"/>
         where asset_id = #{assetId}
     </select>
+    <select id="selectAssetTypeListTree" parameterType="AssetType" resultMap="AssetTypeResult">
+        <include refid="selectAssetTypeVo"/>
+        <where>
+            del_flag = '0'
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
+            <if test="assetName != null  and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
+            <if test="orderNum != null "> and order_num = #{orderNum}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+        </where>
+        order by parent_id, order_num
+    </select>
 
     <insert id="insertAssetType" parameterType="AssetType" useGeneratedKeys="true" keyProperty="assetId">
         insert into asset_type
@@ -82,6 +94,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
         where asset_id = #{assetId}
     </update>
+    <update id="updateAssetTypeChildren" parameterType="java.util.List">
+        update asset_type set ancestors =
+        <foreach collection="assetTypes" item="item" index="index"
+                 separator=" " open="case asset_id" close="end">
+            when #{item.assetId} then #{item.ancestors}
+        </foreach>
+        where asset_id in
+        <foreach collection="assetTypes" item="item" index="index"
+                 separator="," open="(" close=")">
+            #{item.item.assetId}
+        </foreach>
+    </update>
+    <select id="checkAssetNameUnique" resultMap="AssetTypeResult">
+        <include refid="selectAssetTypeVo"/>
+        where asset_name=#{assetName} and parent_id = #{parentId} and del_flag = '0' limit 1
+    </select>
+    <select id="selectNormalChildrenAssetById" parameterType="Long" resultType="int">
+        select count(*) from asset_type where status = 0 and del_flag = '0' and find_in_set(#{assetId}, ancestors)
+    </select>
+    <select id="hasChildByAssetId" parameterType="Long" resultType="int">
+        select count(1) from asset_type
+        where del_flag = '0' and parent_id = #{assetId} limit 1
+    </select>
+    <select id="selectChildrenAssetTypeById" parameterType="Long" resultMap="AssetTypeResult">
+        select * from asset_type where find_in_set(#{assetId}, ancestors)
+    </select>
 
     <delete id="deleteAssetTypeByAssetId" parameterType="Long">
         delete from asset_type where asset_id = #{assetId}

+ 5 - 0
ruoyi-system/src/main/resources/mapper/system/IllegalParkingMapper.xml

@@ -44,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where illegal_parking_id = #{illegalParkingId}
     </select>
 
+    <select id="selectIllegalParkingByPlateNumber" parameterType="Long" resultMap="IllegalParkingResult">
+        <include refid="selectIllegalParkingVo"/>
+        where plate_number = #{plateNumber}
+    </select>
+
     <insert id="insertIllegalParking" parameterType="IllegalParking" useGeneratedKeys="true" keyProperty="illegalParkingId">
         insert into illegal_parking
         <trim prefix="(" suffix=")" suffixOverrides=",">

+ 41 - 16
ruoyi-system/src/main/resources/mapper/system/MaintenanceStaffMapper.xml → ruoyi-system/src/main/resources/mapper/system/StaffManageMapper.xml

@@ -2,15 +2,20 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.system.mapper.MaintenanceStaffMapper">
+<mapper namespace="com.ruoyi.system.mapper.StaffManageMapper">
     
-    <resultMap type="MaintenanceStaff" id="MaintenanceStaffResult">
+    <resultMap type="StaffManage" id="StaffManageResult">
         <result property="staffId"    column="staff_id"    />
         <result property="staffName"    column="staff_name"    />
         <result property="gender"    column="gender"    />
+        <result property="staffCategory"    column="staff_category"    />
         <result property="maintenanceCategory"    column="maintenance_category"    />
         <result property="phoneNumber"    column="phone_number"    />
         <result property="avatarPhoto"    column="avatar_photo"    />
+        <result property="idCard"    column="id_card"    />
+        <result property="idCardFront"    column="id_card_front"    />
+        <result property="idCardBack"    column="id_card_back"    />
+        <result property="certificate"    column="certificate"    />
         <result property="status"    column="status"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -19,35 +24,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark"    column="remark"    />
     </resultMap>
 
-    <sql id="selectMaintenanceStaffVo">
-        select staff_id, staff_name, gender, maintenance_category, phone_number, avatar_photo, status, create_by, create_time, update_by, update_time, remark from maintenance_staff
+    <sql id="selectStaffManageVo">
+        select staff_id, staff_name, gender, staff_category, maintenance_category, phone_number, avatar_photo, id_card, id_card_front, id_card_back, certificate, status, create_by, create_time, update_by, update_time, remark from staff_manage
     </sql>
 
-    <select id="selectMaintenanceStaffList" parameterType="MaintenanceStaff" resultMap="MaintenanceStaffResult">
-        <include refid="selectMaintenanceStaffVo"/>
+    <select id="selectStaffManageList" parameterType="StaffManage" resultMap="StaffManageResult">
+        <include refid="selectStaffManageVo"/>
         <where>  
             <if test="staffName != null  and staffName != ''"> and staff_name like concat('%', #{staffName}, '%')</if>
             <if test="gender != null  and gender != ''"> and gender = #{gender}</if>
+            <if test="staffCategory != null  and staffCategory != ''"> and staff_category = #{staffCategory}</if>
             <if test="maintenanceCategory != null  and maintenanceCategory != ''"> and maintenance_category = #{maintenanceCategory}</if>
             <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
             <if test="avatarPhoto != null  and avatarPhoto != ''"> and avatar_photo = #{avatarPhoto}</if>
+            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
+            <if test="idCardFront != null  and idCardFront != ''"> and id_card_front = #{idCardFront}</if>
+            <if test="idCardBack != null  and idCardBack != ''"> and id_card_back = #{idCardBack}</if>
+            <if test="certificate != null  and certificate != ''"> and certificate = #{certificate}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
     </select>
     
-    <select id="selectMaintenanceStaffByStaffId" parameterType="Long" resultMap="MaintenanceStaffResult">
-        <include refid="selectMaintenanceStaffVo"/>
+    <select id="selectStaffManageByStaffId" parameterType="Long" resultMap="StaffManageResult">
+        <include refid="selectStaffManageVo"/>
         where staff_id = #{staffId}
     </select>
 
-    <insert id="insertMaintenanceStaff" parameterType="MaintenanceStaff" useGeneratedKeys="true" keyProperty="staffId">
-        insert into maintenance_staff
+    <insert id="insertStaffManage" parameterType="StaffManage" useGeneratedKeys="true" keyProperty="staffId">
+        insert into staff_manage
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="staffName != null">staff_name,</if>
             <if test="gender != null">gender,</if>
+            <if test="staffCategory != null">staff_category,</if>
             <if test="maintenanceCategory != null">maintenance_category,</if>
             <if test="phoneNumber != null">phone_number,</if>
             <if test="avatarPhoto != null">avatar_photo,</if>
+            <if test="idCard != null">id_card,</if>
+            <if test="idCardFront != null">id_card_front,</if>
+            <if test="idCardBack != null">id_card_back,</if>
+            <if test="certificate != null">certificate,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
@@ -58,9 +73,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="staffName != null">#{staffName},</if>
             <if test="gender != null">#{gender},</if>
+            <if test="staffCategory != null">#{staffCategory},</if>
             <if test="maintenanceCategory != null">#{maintenanceCategory},</if>
             <if test="phoneNumber != null">#{phoneNumber},</if>
             <if test="avatarPhoto != null">#{avatarPhoto},</if>
+            <if test="idCard != null">#{idCard},</if>
+            <if test="idCardFront != null">#{idCardFront},</if>
+            <if test="idCardBack != null">#{idCardBack},</if>
+            <if test="certificate != null">#{certificate},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
@@ -70,14 +90,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
-    <update id="updateMaintenanceStaff" parameterType="MaintenanceStaff">
-        update maintenance_staff
+    <update id="updateStaffManage" parameterType="StaffManage">
+        update staff_manage
         <trim prefix="SET" suffixOverrides=",">
             <if test="staffName != null">staff_name = #{staffName},</if>
             <if test="gender != null">gender = #{gender},</if>
+            <if test="staffCategory != null">staff_category = #{staffCategory},</if>
             <if test="maintenanceCategory != null">maintenance_category = #{maintenanceCategory},</if>
             <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
             <if test="avatarPhoto != null">avatar_photo = #{avatarPhoto},</if>
+            <if test="idCard != null">id_card = #{idCard},</if>
+            <if test="idCardFront != null">id_card_front = #{idCardFront},</if>
+            <if test="idCardBack != null">id_card_back = #{idCardBack},</if>
+            <if test="certificate != null">certificate = #{certificate},</if>
             <if test="status != null">status = #{status},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
@@ -88,12 +113,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where staff_id = #{staffId}
     </update>
 
-    <delete id="deleteMaintenanceStaffByStaffId" parameterType="Long">
-        delete from maintenance_staff where staff_id = #{staffId}
+    <delete id="deleteStaffManageByStaffId" parameterType="Long">
+        delete from staff_manage where staff_id = #{staffId}
     </delete>
 
-    <delete id="deleteMaintenanceStaffByStaffIds" parameterType="String">
-        delete from maintenance_staff where staff_id in 
+    <delete id="deleteStaffManageByStaffIds" parameterType="String">
+        delete from staff_manage where staff_id in 
         <foreach item="staffId" collection="array" open="(" separator="," close=")">
             #{staffId}
         </foreach>

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/StaffTrainManualMapper.xml

@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="manualContent"    column="manual_content"    />
         <result property="status"    column="status"    />
         <result property="publishTime"    column="publish_time"    />
+        <result property="videoUrl"    column="video_url"    />
         <result property="coverImage"    column="cover_image"    />
         <result property="author"    column="author"    />
         <result property="source"    column="source"    />
@@ -24,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectStaffTrainManualVo">
-        select manual_id, manual_title, manual_type, manual_content, status, publish_time, cover_image, author, source, view_count, is_top, create_by, create_time, update_by, update_time, remark from staff_train_manual
+        select manual_id, manual_title, manual_type, manual_content, status, publish_time, video_url, cover_image, author, source, view_count, is_top, create_by, create_time, update_by, update_time, remark from staff_train_manual
     </sql>
 
     <select id="selectStaffTrainManualList" parameterType="StaffTrainManual" resultMap="StaffTrainManualResult">
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manualContent != null  and manualContent != ''"> and manual_content = #{manualContent}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="publishTime != null "> and publish_time = #{publishTime}</if>
+            <if test="videoUrl != null  and videoUrl != ''"> and video_url = #{videoUrl}</if>
             <if test="coverImage != null  and coverImage != ''"> and cover_image = #{coverImage}</if>
             <if test="author != null  and author != ''"> and author = #{author}</if>
             <if test="source != null  and source != ''"> and source = #{source}</if>
@@ -56,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manualContent != null">manual_content,</if>
             <if test="status != null">status,</if>
             <if test="publishTime != null">publish_time,</if>
+            <if test="videoUrl != null">video_url,</if>
             <if test="coverImage != null">cover_image,</if>
             <if test="author != null">author,</if>
             <if test="source != null">source,</if>
@@ -73,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manualContent != null">#{manualContent},</if>
             <if test="status != null">#{status},</if>
             <if test="publishTime != null">#{publishTime},</if>
+            <if test="videoUrl != null">#{videoUrl},</if>
             <if test="coverImage != null">#{coverImage},</if>
             <if test="author != null">#{author},</if>
             <if test="source != null">#{source},</if>
@@ -94,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="manualContent != null">manual_content = #{manualContent},</if>
             <if test="status != null">status = #{status},</if>
             <if test="publishTime != null">publish_time = #{publishTime},</if>
+            <if test="videoUrl != null">video_url = #{videoUrl},</if>
             <if test="coverImage != null">cover_image = #{coverImage},</if>
             <if test="author != null">author = #{author},</if>
             <if test="source != null">source = #{source},</if>

+ 0 - 96
ruoyi-system/src/main/resources/mapper/system/VisitorRecordsMapper.xml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.system.mapper.VisitorRecordsMapper">
-    
-    <resultMap type="VisitorRecords" id="VisitorRecordsResult">
-        <result property="visitorRecordsId"    column="visitor_records_id"    />
-        <result property="plateNumber"    column="plate_number"    />
-        <result property="portalId"    column="portal_id"    />
-        <result property="visitPortal"    column="visit_portal"    />
-        <result property="mobileNumber"    column="mobile_number"    />
-        <result property="visitName"    column="visit_name"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
-    </resultMap>
-
-    <sql id="selectVisitorRecordsVo">
-        select visitor_records_id, plate_number, portal_id, visit_portal, mobile_number, visit_name, create_by, create_time, update_by, update_time, remark from visitor_records
-    </sql>
-
-    <select id="selectVisitorRecordsList" parameterType="VisitorRecords" resultMap="VisitorRecordsResult">
-        <include refid="selectVisitorRecordsVo"/>
-        <where>  
-            <if test="plateNumber != null  and plateNumber != ''"> and plate_number = #{plateNumber}</if>
-            <if test="portalId != null "> and portal_id = #{portalId}</if>
-            <if test="visitPortal != null  and visitPortal != ''"> and visit_portal = #{visitPortal}</if>
-            <if test="mobileNumber != null  and mobileNumber != ''"> and mobile_number = #{mobileNumber}</if>
-            <if test="visitName != null  and visitName != ''"> and visit_name like concat('%', #{visitName}, '%')</if>
-        </where>
-    </select>
-    
-    <select id="selectVisitorRecordsByVisitorRecordsId" parameterType="Long" resultMap="VisitorRecordsResult">
-        <include refid="selectVisitorRecordsVo"/>
-        where visitor_records_id = #{visitorRecordsId}
-    </select>
-
-    <insert id="insertVisitorRecords" parameterType="VisitorRecords" useGeneratedKeys="true" keyProperty="visitorRecordsId">
-        insert into visitor_records
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="plateNumber != null and plateNumber != ''">plate_number,</if>
-            <if test="portalId != null">portal_id,</if>
-            <if test="visitPortal != null and visitPortal != ''">visit_portal,</if>
-            <if test="mobileNumber != null and mobileNumber != ''">mobile_number,</if>
-            <if test="visitName != null">visit_name,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="remark != null">remark,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="plateNumber != null and plateNumber != ''">#{plateNumber},</if>
-            <if test="portalId != null">#{portalId},</if>
-            <if test="visitPortal != null and visitPortal != ''">#{visitPortal},</if>
-            <if test="mobileNumber != null and mobileNumber != ''">#{mobileNumber},</if>
-            <if test="visitName != null">#{visitName},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="remark != null">#{remark},</if>
-         </trim>
-    </insert>
-
-    <update id="updateVisitorRecords" parameterType="VisitorRecords">
-        update visitor_records
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="plateNumber != null and plateNumber != ''">plate_number = #{plateNumber},</if>
-            <if test="portalId != null">portal_id = #{portalId},</if>
-            <if test="visitPortal != null and visitPortal != ''">visit_portal = #{visitPortal},</if>
-            <if test="mobileNumber != null and mobileNumber != ''">mobile_number = #{mobileNumber},</if>
-            <if test="visitName != null">visit_name = #{visitName},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="remark != null">remark = #{remark},</if>
-        </trim>
-        where visitor_records_id = #{visitorRecordsId}
-    </update>
-
-    <delete id="deleteVisitorRecordsByVisitorRecordsId" parameterType="Long">
-        delete from visitor_records where visitor_records_id = #{visitorRecordsId}
-    </delete>
-
-    <delete id="deleteVisitorRecordsByVisitorRecordsIds" parameterType="String">
-        delete from visitor_records where visitor_records_id in 
-        <foreach item="visitorRecordsId" collection="array" open="(" separator="," close=")">
-            #{visitorRecordsId}
-        </foreach>
-    </delete>
-</mapper>