办公V3
This commit is contained in:
@@ -27,40 +27,34 @@ public class HrmContractController extends BaseController {
|
||||
|
||||
private final IHrmContractService service;
|
||||
|
||||
@SaCheckPermission("hrm:contract:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmContractVo> list(HrmContractBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:contract:query")
|
||||
@GetMapping("/{contractId}")
|
||||
public R<HrmContractVo> getInfo(@PathVariable @NotNull Long contractId) {
|
||||
return R.ok(service.queryById(contractId));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:contract:add")
|
||||
@Log(title = "劳动合同", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmContractBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:contract:edit")
|
||||
@Log(title = "劳动合同", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmContractBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:contract:remove")
|
||||
@Log(title = "劳动合同", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contractIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] contractIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(contractIds), true));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:contract:list")
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmContractVo>> all(HrmContractBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
|
||||
Reference in New Issue
Block a user