L3HRM后端推送

This commit is contained in:
2025-12-16 16:56:14 +08:00
parent 5ac2e78a33
commit 62c541839e
221 changed files with 8280 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
package com.klp.hrm.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.klp.common.annotation.Log;
import com.klp.common.core.controller.BaseController;
import com.klp.common.core.domain.PageQuery;
import com.klp.common.core.domain.R;
import com.klp.common.core.page.TableDataInfo;
import com.klp.common.enums.BusinessType;
import com.klp.hrm.domain.bo.HrmFlowTemplateBo;
import com.klp.hrm.domain.vo.HrmFlowTemplateVo;
import com.klp.hrm.service.IHrmFlowTemplateService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Arrays;
import java.util.List;
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/hrm/flow/template")
public class HrmFlowTemplateController extends BaseController {
private final IHrmFlowTemplateService service;
@SaCheckPermission("hrm:flow:list")
@GetMapping("/list")
public TableDataInfo<HrmFlowTemplateVo> list(HrmFlowTemplateBo bo, PageQuery pageQuery) {
return service.queryPageList(bo, pageQuery);
}
@SaCheckPermission("hrm:flow:query")
@GetMapping("/{tplId}")
public R<HrmFlowTemplateVo> getInfo(@PathVariable @NotNull Long tplId) {
return R.ok(service.queryById(tplId));
}
@SaCheckPermission("hrm:flow:add")
@Log(title = "流程模板", businessType = BusinessType.INSERT)
@PostMapping
public R<Void> add(@Validated @RequestBody HrmFlowTemplateBo bo) {
return toAjax(service.insertByBo(bo));
}
@SaCheckPermission("hrm:flow:edit")
@Log(title = "流程模板", businessType = BusinessType.UPDATE)
@PutMapping
public R<Void> edit(@Validated @RequestBody HrmFlowTemplateBo bo) {
return toAjax(service.updateByBo(bo));
}
@SaCheckPermission("hrm:flow:remove")
@Log(title = "流程模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{tplIds}")
public R<Void> remove(@PathVariable @NotEmpty Long[] tplIds) {
return toAjax(service.deleteWithValidByIds(Arrays.asList(tplIds), true));
}
@SaCheckPermission("hrm:flow:list")
@GetMapping("/all")
public R<List<HrmFlowTemplateVo>> all(HrmFlowTemplateBo bo) {
return R.ok(service.queryList(bo));
}
}