办公V3
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
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.HrmReimburseReqBo;
|
||||
import com.klp.hrm.domain.vo.HrmReimburseReqVo;
|
||||
import com.klp.hrm.service.IHrmReimburseReqService;
|
||||
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/reimburse")
|
||||
public class HrmReimburseReqController extends BaseController {
|
||||
|
||||
private final IHrmReimburseReqService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmReimburseReqVo> list(HrmReimburseReqBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{bizId}")
|
||||
public R<HrmReimburseReqVo> getInfo(@PathVariable @NotNull Long bizId) {
|
||||
return R.ok(service.queryById(bizId));
|
||||
}
|
||||
|
||||
@Log(title = "日常报销单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmReimburseReqBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "日常报销单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmReimburseReqBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "日常报销单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bizIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] bizIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(bizIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmReimburseReqVo>> all(HrmReimburseReqBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user