|
@@ -1,25 +1,19 @@
|
|
package com.ruoyi.web.controller.manage;
|
|
package com.ruoyi.web.controller.manage;
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
import com.ruoyi.common.annotation.Log;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
import com.ruoyi.manage.domain.StaffManage;
|
|
import com.ruoyi.manage.domain.StaffManage;
|
|
import com.ruoyi.manage.service.IStaffManageService;
|
|
import com.ruoyi.manage.service.IStaffManageService;
|
|
-import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
-import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
|
|
+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
|
|
* 人员管理Controller
|
|
@@ -29,18 +23,16 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/manage/staffManage")
|
|
@RequestMapping("/manage/staffManage")
|
|
-public class StaffManageController extends BaseController
|
|
|
|
-{
|
|
|
|
|
|
+public class StaffManageController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IStaffManageService staffManageService;
|
|
private IStaffManageService staffManageService;
|
|
|
|
|
|
-/**
|
|
|
|
- * 查询人员管理列表
|
|
|
|
- */
|
|
|
|
-@PreAuthorize("@ss.hasPermi('manage:staffManage:list')")
|
|
|
|
-@GetMapping("/list")
|
|
|
|
- public TableDataInfo list(StaffManage staffManage)
|
|
|
|
- {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询人员管理列表
|
|
|
|
+ */
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('manage:staffManage:list')")
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
+ public TableDataInfo list(StaffManage staffManage) {
|
|
startPage();
|
|
startPage();
|
|
List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
|
|
List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -52,8 +44,7 @@ public class StaffManageController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:export')")
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:export')")
|
|
@Log(title = "人员管理", businessType = BusinessType.EXPORT)
|
|
@Log(title = "人员管理", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
- public void export(HttpServletResponse response, StaffManage staffManage)
|
|
|
|
- {
|
|
|
|
|
|
+ public void export(HttpServletResponse response, StaffManage staffManage) {
|
|
List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
|
|
List<StaffManage> list = staffManageService.selectStaffManageList(staffManage);
|
|
ExcelUtil<StaffManage> util = new ExcelUtil<StaffManage>(StaffManage.class);
|
|
ExcelUtil<StaffManage> util = new ExcelUtil<StaffManage>(StaffManage.class);
|
|
util.exportExcel(response, list, "人员管理数据");
|
|
util.exportExcel(response, list, "人员管理数据");
|
|
@@ -64,8 +55,7 @@ public class StaffManageController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:query')")
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:query')")
|
|
@GetMapping(value = "/{staffId}")
|
|
@GetMapping(value = "/{staffId}")
|
|
- public AjaxResult getInfo(@PathVariable("staffId") Long staffId)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("staffId") Long staffId) {
|
|
return success(staffManageService.selectStaffManageByStaffId(staffId));
|
|
return success(staffManageService.selectStaffManageByStaffId(staffId));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -75,8 +65,7 @@ public class StaffManageController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:add')")
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:add')")
|
|
@Log(title = "人员管理", businessType = BusinessType.INSERT)
|
|
@Log(title = "人员管理", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
@PostMapping
|
|
- public AjaxResult add(@RequestBody StaffManage staffManage)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody StaffManage staffManage) {
|
|
return toAjax(staffManageService.insertStaffManage(staffManage));
|
|
return toAjax(staffManageService.insertStaffManage(staffManage));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -86,8 +75,7 @@ public class StaffManageController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:edit')")
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:edit')")
|
|
@Log(title = "人员管理", businessType = BusinessType.UPDATE)
|
|
@Log(title = "人员管理", businessType = BusinessType.UPDATE)
|
|
@PostMapping("/put")
|
|
@PostMapping("/put")
|
|
- public AjaxResult edit(@RequestBody StaffManage staffManage)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody StaffManage staffManage) {
|
|
return toAjax(staffManageService.updateStaffManage(staffManage));
|
|
return toAjax(staffManageService.updateStaffManage(staffManage));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -97,8 +85,7 @@ public class StaffManageController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:remove')")
|
|
@PreAuthorize("@ss.hasPermi('manage:staffManage:remove')")
|
|
@Log(title = "人员管理", businessType = BusinessType.DELETE)
|
|
@Log(title = "人员管理", businessType = BusinessType.DELETE)
|
|
@GetMapping("/delete/{staffIds}")
|
|
@GetMapping("/delete/{staffIds}")
|
|
- public AjaxResult remove(@PathVariable Long[] staffIds)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] staffIds) {
|
|
return toAjax(staffManageService.deleteStaffManageByStaffIds(staffIds));
|
|
return toAjax(staffManageService.deleteStaffManageByStaffIds(staffIds));
|
|
}
|
|
}
|
|
}
|
|
}
|