|
@@ -0,0 +1,106 @@
|
|
|
+package com.ruoyi.organization.controller;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+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.log.annotation.Log;
|
|
|
+import com.ruoyi.common.log.enums.BusinessType;
|
|
|
+import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
+import com.ruoyi.system.validate.group.AddGroup;
|
|
|
+import com.ruoyi.organization.domain.YlyYgglBcsz;
|
|
|
+import com.ruoyi.organization.service.IYlyYgglBcszService;
|
|
|
+import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 养老院-员工管理-班次设置Controller
|
|
|
+ *
|
|
|
+ * @author sun
|
|
|
+ * @date 2024-10-31
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/bcsz")
|
|
|
+public class YlyYgglBcszController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IYlyYgglBcszService ylyYgglBcszService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询养老院-员工管理-班次设置列表
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:list")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(YlyYgglBcsz ylyYgglBcsz)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<YlyYgglBcsz> list = ylyYgglBcszService.selectYlyYgglBcszList(ylyYgglBcsz);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出养老院-员工管理-班次设置列表
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:export")
|
|
|
+ @Log(title = "养老院-员工管理-班次设置", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, YlyYgglBcsz ylyYgglBcsz)
|
|
|
+ {
|
|
|
+ List<YlyYgglBcsz> list = ylyYgglBcszService.selectYlyYgglBcszList(ylyYgglBcsz);
|
|
|
+ ExcelUtil<YlyYgglBcsz> util = new ExcelUtil<YlyYgglBcsz>(YlyYgglBcsz.class);
|
|
|
+ util.exportExcel(response, list, "养老院-员工管理-班次设置数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取养老院-员工管理-班次设置详细信息
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:query")
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") String id)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(ylyYgglBcszService.selectYlyYgglBcszById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增养老院-员工管理-班次设置
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:add")
|
|
|
+ @Log(title = "养老院-员工管理-班次设置", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@Validated({AddGroup.class}) @RequestBody YlyYgglBcsz ylyYgglBcsz)
|
|
|
+ {
|
|
|
+ return toAjax(ylyYgglBcszService.insertYlyYgglBcsz(ylyYgglBcsz),ylyYgglBcsz.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改养老院-员工管理-班次设置
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:edit")
|
|
|
+ @Log(title = "养老院-员工管理-班次设置", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@Validated @RequestBody YlyYgglBcsz ylyYgglBcsz)
|
|
|
+ {
|
|
|
+ return toAjax(ylyYgglBcszService.updateYlyYgglBcsz(ylyYgglBcsz));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除养老院-员工管理-班次设置
|
|
|
+ */
|
|
|
+ @RequiresPermissions("organization:bcsz:remove")
|
|
|
+ @Log(title = "养老院-员工管理-班次设置", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable String[] ids)
|
|
|
+ {
|
|
|
+ return toAjax(ylyYgglBcszService.deleteYlyYgglBcszByIds(ids));
|
|
|
+ }
|
|
|
+}
|