L3HRM后端推送
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.klp.hrm.controller;
|
||||
|
||||
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.HrmPayPlanBo;
|
||||
import com.klp.hrm.domain.vo.HrmPayPlanVo;
|
||||
import com.klp.hrm.service.IHrmPayPlanService;
|
||||
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/pay/plan")
|
||||
public class HrmPayPlanController extends BaseController {
|
||||
|
||||
private final IHrmPayPlanService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmPayPlanVo> list(HrmPayPlanBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{planId}")
|
||||
public R<HrmPayPlanVo> getInfo(@PathVariable @NotNull Long planId) {
|
||||
return R.ok(service.queryById(planId));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬方案", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmPayPlanBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬方案", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmPayPlanBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬方案", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{planIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] planIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(planIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmPayPlanVo>> all(HrmPayPlanBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user