|
@@ -0,0 +1,68 @@
|
|
|
+package com.ozs.web.controller.system;
|
|
|
+
|
|
|
+import com.ozs.common.annotation.Log;
|
|
|
+import com.ozs.common.core.controller.BaseController;
|
|
|
+import com.ozs.common.core.domain.AjaxResult;
|
|
|
+import com.ozs.common.enums.BusinessType;
|
|
|
+import com.ozs.system.domain.SysDeptOrgan;
|
|
|
+import com.ozs.system.service.SysDeptOrganService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+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.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 部门的机关指导处 操作处理
|
|
|
+ *
|
|
|
+ * @author ruoyi
|
|
|
+ */
|
|
|
+@Api(tags = "机关指导处")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/dept/organ")
|
|
|
+public class SysDeptOrganController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysDeptOrganService sysDeptOrganService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取机关指导处列表(本级和上级)
|
|
|
+ */
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperation("获取机关指导处列表")
|
|
|
+ public AjaxResult list() {
|
|
|
+ List<SysDeptOrgan> deptOrganList = sysDeptOrganService.selectList();
|
|
|
+ return success(deptOrganList);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增机关指导处
|
|
|
+ */
|
|
|
+ @Log(title = "机关指导处管理", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/add")
|
|
|
+ @ApiOperation("新增机关指导处")
|
|
|
+ public AjaxResult add(@RequestBody SysDeptOrgan deptOrgan) {
|
|
|
+ Long userId = getUserId();
|
|
|
+ deptOrgan.setCreateBy(String.valueOf(userId));
|
|
|
+ deptOrgan.setCreateTime(new Date());
|
|
|
+ return sysDeptOrganService.insertDeptOrgan(deptOrgan);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除机关指导处
|
|
|
+ */
|
|
|
+ @Log(title = "机关指导处管理", businessType = BusinessType.DELETE)
|
|
|
+ @PostMapping("/deleteById")
|
|
|
+ @ApiOperation("删除机关指导处")
|
|
|
+ public AjaxResult deleteById(@RequestBody SysDeptOrgan deptOrgan) {
|
|
|
+ return sysDeptOrganService.deleteById(deptOrgan);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|