添加hrm模块
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmAttendCalcBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmAttendCalcVo;
|
||||
import com.ruoyi.hrm.service.IHrmAttendCalcService;
|
||||
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/attend")
|
||||
public class HrmAttendCalcController extends BaseController {
|
||||
|
||||
private final IHrmAttendCalcService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmAttendCalcVo> list(HrmAttendCalcBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{calcId}")
|
||||
public R<HrmAttendCalcVo> getInfo(@PathVariable @NotNull Long calcId) {
|
||||
return R.ok(service.queryById(calcId));
|
||||
}
|
||||
|
||||
@Log(title = "考勤结果", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmAttendCalcBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "考勤结果", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmAttendCalcBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "考勤结果", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{calcIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] calcIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(calcIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmAttendCalcVo>> all(HrmAttendCalcBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmCertificateBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmCertificateVo;
|
||||
import com.ruoyi.hrm.service.IHrmCertificateService;
|
||||
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/certificate")
|
||||
public class HrmCertificateController extends BaseController {
|
||||
|
||||
private final IHrmCertificateService service;
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmCertificateVo> list(HrmCertificateBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{certId}")
|
||||
public R<HrmCertificateVo> getInfo(@PathVariable @NotNull Long certId) {
|
||||
return R.ok(service.queryById(certId));
|
||||
}
|
||||
|
||||
@Log(title = "证书", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmCertificateBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "证书", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmCertificateBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "证书", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{certIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] certIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(certIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmCertificateVo>> all(HrmCertificateBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmContractBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmContractVo;
|
||||
import com.ruoyi.hrm.service.IHrmContractService;
|
||||
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/contract")
|
||||
public class HrmContractController extends BaseController {
|
||||
|
||||
private final IHrmContractService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmContractVo> list(HrmContractBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{contractId}")
|
||||
public R<HrmContractVo> getInfo(@PathVariable @NotNull Long contractId) {
|
||||
return R.ok(service.queryById(contractId));
|
||||
}
|
||||
|
||||
@Log(title = "劳动合同", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmContractBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "劳动合同", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmContractBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "劳动合同", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contractIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] contractIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(contractIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmContractVo>> all(HrmContractBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmEmpOrgPositionBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmpOrgPositionVo;
|
||||
import com.ruoyi.hrm.service.IHrmEmpOrgPositionService;
|
||||
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/empOrg")
|
||||
public class HrmEmpOrgPositionController extends BaseController {
|
||||
|
||||
private final IHrmEmpOrgPositionService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmEmpOrgPositionVo> list(HrmEmpOrgPositionBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{relId}")
|
||||
public R<HrmEmpOrgPositionVo> getInfo(@PathVariable @NotNull Long relId) {
|
||||
return R.ok(service.queryById(relId));
|
||||
}
|
||||
|
||||
@Log(title = "员工组织岗位关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmEmpOrgPositionBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "员工组织岗位关系", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmEmpOrgPositionBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "员工组织岗位关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{relIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] relIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(relIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmEmpOrgPositionVo>> all(HrmEmpOrgPositionBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmEmployeeBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmEmployeeVo;
|
||||
import com.ruoyi.hrm.service.IHrmEmployeeService;
|
||||
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/employee")
|
||||
public class HrmEmployeeController extends BaseController {
|
||||
|
||||
private final IHrmEmployeeService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmEmployeeVo> list(HrmEmployeeBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{empId}")
|
||||
public R<HrmEmployeeVo> getInfo(@PathVariable @NotNull Long empId) {
|
||||
return R.ok(service.queryById(empId));
|
||||
}
|
||||
|
||||
@Log(title = "员工管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmEmployeeBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "员工管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmEmployeeBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "员工管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{empIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] empIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(empIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmEmployeeVo>> all(HrmEmployeeBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取员工信息
|
||||
*/
|
||||
@GetMapping("/byUserId/{userId}")
|
||||
public R<HrmEmployeeVo> getByUserId(@PathVariable @NotNull Long userId) {
|
||||
HrmEmployeeBo bo = new HrmEmployeeBo();
|
||||
bo.setUserId(userId);
|
||||
List<HrmEmployeeVo> list = service.queryList(bo);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
return R.ok(list.get(0));
|
||||
}
|
||||
return R.fail("未找到该用户对应的员工信息");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowActionBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowActionVo;
|
||||
import com.ruoyi.hrm.service.IHrmFlowActionService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hrm/flow/action")
|
||||
public class HrmFlowActionController extends BaseController {
|
||||
|
||||
private final IHrmFlowActionService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowActionVo> list(HrmFlowActionBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{actionId}")
|
||||
public R<HrmFlowActionVo> getInfo(@PathVariable @NotNull Long actionId) {
|
||||
return R.ok(service.queryById(actionId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.helper.LoginHelper;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowCcBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowCcVo;
|
||||
import com.ruoyi.hrm.service.IHrmFlowCcService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hrm/flow/cc")
|
||||
public class HrmFlowCcController extends BaseController {
|
||||
|
||||
private final IHrmFlowCcService service;
|
||||
|
||||
/**
|
||||
* 抄送我的
|
||||
*/
|
||||
@GetMapping("/my")
|
||||
public TableDataInfo<HrmFlowCcVo> my(@RequestParam(required = false) Long ccUserId,@RequestParam(required = false) Integer readFlag, PageQuery pageQuery) {
|
||||
Long uid = ccUserId;
|
||||
if (uid == null) {
|
||||
try {
|
||||
uid = LoginHelper.getUserId();
|
||||
} catch (Exception e) {
|
||||
uid = null;
|
||||
}
|
||||
}
|
||||
HrmFlowCcBo bo = new HrmFlowCcBo();
|
||||
bo.setCcUserId(uid);
|
||||
bo.setReadFlag(readFlag);
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowCcVo> list(HrmFlowCcBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动抄送(支持批量)
|
||||
*/
|
||||
@PostMapping
|
||||
public R<Void> add(@RequestBody HrmFlowCcBo bo) {
|
||||
return toAjax(service.insertBatch(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记抄送已读
|
||||
*/
|
||||
@PostMapping("/{ccId}/read")
|
||||
public R<Void> read(@PathVariable Long ccId) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
return toAjax(service.markRead(ccId, userId));
|
||||
}
|
||||
|
||||
@GetMapping("/ping")
|
||||
public R<String> ping(@RequestParam @NotNull String x) {
|
||||
return R.ok(x);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFormDataBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFormDataVo;
|
||||
import com.ruoyi.hrm.service.IHrmFormDataService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hrm/flow/form")
|
||||
public class HrmFlowFormDataController extends BaseController {
|
||||
|
||||
private final IHrmFormDataService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFormDataVo> list(HrmFormDataBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{formId}")
|
||||
public R<HrmFormDataVo> getInfo(@PathVariable @NotNull Long formId) {
|
||||
return R.ok(service.queryById(formId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowInstanceBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowStartBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowInstanceVo;
|
||||
import com.ruoyi.hrm.service.IHrmFlowInstanceService;
|
||||
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/instance")
|
||||
public class HrmFlowInstanceController extends BaseController {
|
||||
|
||||
private final IHrmFlowInstanceService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowInstanceVo> list(HrmFlowInstanceBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询我的申请列表
|
||||
*/
|
||||
@GetMapping("/myList")
|
||||
public TableDataInfo<HrmFlowInstanceVo> myList(HrmFlowInstanceBo bo, PageQuery pageQuery) {
|
||||
return service.queryMyInstancePageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{instId}")
|
||||
public R<HrmFlowInstanceVo> getInfo(@PathVariable @NotNull Long instId) {
|
||||
return R.ok(service.queryById(instId));
|
||||
}
|
||||
|
||||
@Log(title = "流程实例", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmFlowInstanceBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程实例", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmFlowInstanceBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程实例", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{instIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] instIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(instIds), true));
|
||||
}
|
||||
|
||||
@Log(title = "流程实例启动", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/start")
|
||||
public R<Long> start(@Validated @RequestBody HrmFlowStartBo bo) {
|
||||
return R.ok(service.startInstance(bo));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmFlowInstanceVo>> all(HrmFlowInstanceBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowNodeBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowNodeVo;
|
||||
import com.ruoyi.hrm.service.IHrmFlowNodeService;
|
||||
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/node")
|
||||
public class HrmFlowNodeController extends BaseController {
|
||||
|
||||
private final IHrmFlowNodeService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowNodeVo> list(HrmFlowNodeBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{nodeId}")
|
||||
public R<HrmFlowNodeVo> getInfo(@PathVariable @NotNull Long nodeId) {
|
||||
return R.ok(service.queryById(nodeId));
|
||||
}
|
||||
|
||||
@Log(title = "流程节点", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmFlowNodeBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程节点", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmFlowNodeBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程节点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{nodeIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] nodeIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(nodeIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmFlowNodeVo>> all(HrmFlowNodeBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowTaskBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowTaskApproveBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmSealStampBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowTaskVo;
|
||||
import com.ruoyi.hrm.service.IHrmFlowTaskService;
|
||||
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/task")
|
||||
public class HrmFlowTaskController extends BaseController {
|
||||
|
||||
private final IHrmFlowTaskService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowTaskVo> list(HrmFlowTaskBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/todo")
|
||||
public R<List<HrmFlowTaskVo>> todo(@RequestParam(required = false) Long assigneeUserId) {
|
||||
|
||||
HrmFlowTaskBo bo = new HrmFlowTaskBo();
|
||||
bo.setAssigneeUserId(assigneeUserId);
|
||||
bo.setStatus("pending");
|
||||
return R.ok(service.queryList(bo));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页使用:按 bizType + bizId 查询当前用户的待办任务(pending)
|
||||
*/
|
||||
@GetMapping("/todoByBiz")
|
||||
public R<HrmFlowTaskVo> todoByBiz(@RequestParam @NotNull String bizType,
|
||||
@RequestParam @NotNull Long bizId,
|
||||
@RequestParam(required = false) Long assigneeUserId) {
|
||||
|
||||
return R.ok(service.queryTodoByBiz(bizType, bizId, assigneeUserId));
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/{taskId}")
|
||||
public R<HrmFlowTaskVo> getInfo(@PathVariable @NotNull Long taskId) {
|
||||
return R.ok(service.queryById(taskId));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmFlowTaskBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmFlowTaskBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] taskIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(taskIds), true));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务审批通过", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{taskId}/approve")
|
||||
public R<Void> approve(@PathVariable @NotNull Long taskId,
|
||||
@RequestParam(required = false) Long actionUserId,
|
||||
@RequestBody(required = false) HrmFlowTaskApproveBo approveBo) {
|
||||
String remark = approveBo != null ? approveBo.getRemark() : null;
|
||||
HrmSealStampBo stampBo = approveBo != null ? approveBo.getStampBo() : null;
|
||||
return toAjax(service.approve(taskId, actionUserId, remark, stampBo));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务审批驳回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{taskId}/reject")
|
||||
public R<Void> reject(@PathVariable @NotNull Long taskId,
|
||||
@RequestParam(required = false) Long actionUserId,
|
||||
@RequestParam(required = false) String remark) {
|
||||
return toAjax(service.reject(taskId, actionUserId, remark));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务撤回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{taskId}/withdraw")
|
||||
public R<Void> withdraw(@PathVariable @NotNull Long taskId,
|
||||
@RequestParam(required = false) Long actionUserId,
|
||||
@RequestParam(required = false) String remark) {
|
||||
return toAjax(service.withdraw(taskId, actionUserId, remark));
|
||||
}
|
||||
|
||||
@Log(title = "流程任务转发", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{taskId}/transfer")
|
||||
public R<Void> transfer(@PathVariable @NotNull Long taskId,
|
||||
@RequestParam @NotNull Long newAssigneeUserId,
|
||||
@RequestParam(required = false) Long actionUserId,
|
||||
@RequestParam(required = false) String remark) {
|
||||
return toAjax(service.transfer(taskId, newAssigneeUserId, actionUserId, remark));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmFlowTemplateBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmFlowTemplateVo;
|
||||
import com.ruoyi.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;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmFlowTemplateVo> list(HrmFlowTemplateBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{tplId}")
|
||||
public R<HrmFlowTemplateVo> getInfo(@PathVariable @NotNull Long tplId) {
|
||||
return R.ok(service.queryById(tplId));
|
||||
}
|
||||
|
||||
@Log(title = "流程模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmFlowTemplateBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程模板", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmFlowTemplateBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "流程模板", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{tplIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] tplIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(tplIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmFlowTemplateVo>> all(HrmFlowTemplateBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmHeadcountPlanBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmHeadcountPlanVo;
|
||||
import com.ruoyi.hrm.service.IHrmHeadcountPlanService;
|
||||
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/headcount")
|
||||
public class HrmHeadcountPlanController extends BaseController {
|
||||
|
||||
private final IHrmHeadcountPlanService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmHeadcountPlanVo> list(HrmHeadcountPlanBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{planId}")
|
||||
public R<HrmHeadcountPlanVo> getInfo(@PathVariable @NotNull Long planId) {
|
||||
return R.ok(service.queryById(planId));
|
||||
}
|
||||
|
||||
@Log(title = "编制管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmHeadcountPlanBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "编制管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmHeadcountPlanBo 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<HrmHeadcountPlanVo>> all(HrmHeadcountPlanBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmLeaveBalanceBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmLeaveBalanceVo;
|
||||
import com.ruoyi.hrm.service.IHrmLeaveBalanceService;
|
||||
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/leave/balance")
|
||||
public class HrmLeaveBalanceController extends BaseController {
|
||||
|
||||
private final IHrmLeaveBalanceService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmLeaveBalanceVo> list(HrmLeaveBalanceBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{balId}")
|
||||
public R<HrmLeaveBalanceVo> getInfo(@PathVariable @NotNull Long balId) {
|
||||
return R.ok(service.queryById(balId));
|
||||
}
|
||||
|
||||
@Log(title = "假期余额", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmLeaveBalanceBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "假期余额", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmLeaveBalanceBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "假期余额", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{balIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] balIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(balIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmLeaveBalanceVo>> all(HrmLeaveBalanceBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmLeaveReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmLeaveReqVo;
|
||||
import com.ruoyi.hrm.service.IHrmLeaveReqService;
|
||||
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/leave/req")
|
||||
public class HrmLeaveReqController extends BaseController {
|
||||
|
||||
private final IHrmLeaveReqService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmLeaveReqVo> list(HrmLeaveReqBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{bizId}")
|
||||
public R<HrmLeaveReqVo> getInfo(@PathVariable @NotNull Long bizId) {
|
||||
return R.ok(service.queryById(bizId));
|
||||
}
|
||||
|
||||
@Log(title = "请假单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmLeaveReqBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "请假单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmLeaveReqBo 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<HrmLeaveReqVo>> all(HrmLeaveReqBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmPayPlanBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmPayPlanVo;
|
||||
import com.ruoyi.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));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmPayRunBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmPayRunVo;
|
||||
import com.ruoyi.hrm.service.IHrmPayRunService;
|
||||
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/run")
|
||||
public class HrmPayRunController extends BaseController {
|
||||
|
||||
private final IHrmPayRunService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmPayRunVo> list(HrmPayRunBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{runId}")
|
||||
public R<HrmPayRunVo> getInfo(@PathVariable @NotNull Long runId) {
|
||||
return R.ok(service.queryById(runId));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬批次", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmPayRunBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬批次", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmPayRunBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "薪酬批次", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{runIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] runIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(runIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmPayRunVo>> all(HrmPayRunBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmPayslipBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmPayslipVo;
|
||||
import com.ruoyi.hrm.service.IHrmPayslipService;
|
||||
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/payslip")
|
||||
public class HrmPayslipController extends BaseController {
|
||||
|
||||
private final IHrmPayslipService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmPayslipVo> list(HrmPayslipBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{slipId}")
|
||||
public R<HrmPayslipVo> getInfo(@PathVariable @NotNull Long slipId) {
|
||||
return R.ok(service.queryById(slipId));
|
||||
}
|
||||
|
||||
@Log(title = "工资条", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmPayslipBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资条", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmPayslipBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "工资条", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{slipIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] slipIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(slipIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmPayslipVo>> all(HrmPayslipBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmPunchBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmPunchVo;
|
||||
import com.ruoyi.hrm.service.IHrmPunchService;
|
||||
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/punch")
|
||||
public class HrmPunchController extends BaseController {
|
||||
|
||||
private final IHrmPunchService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmPunchVo> list(HrmPunchBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{punchId}")
|
||||
public R<HrmPunchVo> getInfo(@PathVariable @NotNull Long punchId) {
|
||||
return R.ok(service.queryById(punchId));
|
||||
}
|
||||
|
||||
@Log(title = "打卡记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmPunchBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "打卡记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmPunchBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "打卡记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{punchIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] punchIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(punchIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmPunchVo>> all(HrmPunchBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmReimburseReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmReimburseReqVo;
|
||||
import com.ruoyi.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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmScheduleBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmScheduleVo;
|
||||
import com.ruoyi.hrm.service.IHrmScheduleService;
|
||||
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/schedule")
|
||||
public class HrmScheduleController extends BaseController {
|
||||
|
||||
private final IHrmScheduleService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmScheduleVo> list(HrmScheduleBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{schedId}")
|
||||
public R<HrmScheduleVo> getInfo(@PathVariable @NotNull Long schedId) {
|
||||
return R.ok(service.queryById(schedId));
|
||||
}
|
||||
|
||||
@Log(title = "排班", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmScheduleBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "排班", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmScheduleBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "排班", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{schedIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] schedIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(schedIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmScheduleVo>> all(HrmScheduleBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmSealReqBo;
|
||||
import com.ruoyi.hrm.domain.bo.HrmSealStampBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmSealReqVo;
|
||||
import com.ruoyi.hrm.service.IHrmSealReqService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 用印申请
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hrm/seal")
|
||||
public class HrmSealReqController extends BaseController {
|
||||
|
||||
private final IHrmSealReqService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmSealReqVo> list(HrmSealReqBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{bizId}")
|
||||
public R<HrmSealReqVo> getInfo(@PathVariable @NotNull Long bizId) {
|
||||
return R.ok(service.queryById(bizId));
|
||||
}
|
||||
|
||||
@Log(title = "用印申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmSealReqBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmSealReqBo 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(java.util.Arrays.asList(bizIds), true));
|
||||
}
|
||||
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/approve")
|
||||
public R<Void> approve(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "approved"));
|
||||
}
|
||||
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/reject")
|
||||
public R<Void> reject(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "rejected"));
|
||||
}
|
||||
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/cancel")
|
||||
public R<Void> cancel(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "canceled"));
|
||||
}
|
||||
|
||||
@Log(title = "用印盖章(Java)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/stamp/java")
|
||||
public R<String> stampJava(@PathVariable @NotNull Long bizId, @Validated @RequestBody HrmSealStampBo bo) {
|
||||
// 添加日志,检查接收到的数据
|
||||
log.info("收到盖章请求 - bizId: {}, yPx: {}, xPx: {}, pageNo: {}, yPx类型: {}",
|
||||
bizId, bo.getYPx(), bo.getXPx(), bo.getPageNo(),
|
||||
bo.getYPx() != null ? bo.getYPx().getClass().getName() : "null");
|
||||
if (bo.getYPx() == null) {
|
||||
log.error("yPx 为 null!接收到的 bo 对象: {}", bo);
|
||||
}
|
||||
return R.ok(service.stampWithJava(bizId, bo));
|
||||
}
|
||||
|
||||
@Log(title = "用印盖章(Python)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/stamp/python")
|
||||
public R<String> stampPython(@PathVariable @NotNull Long bizId, @Validated @RequestBody HrmSealStampBo bo) {
|
||||
return R.ok(service.stampWithPython(bizId, bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmShiftBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmShiftVo;
|
||||
import com.ruoyi.hrm.service.IHrmShiftService;
|
||||
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/shift")
|
||||
public class HrmShiftController extends BaseController {
|
||||
|
||||
private final IHrmShiftService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmShiftVo> list(HrmShiftBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{shiftId}")
|
||||
public R<HrmShiftVo> getInfo(@PathVariable @NotNull Long shiftId) {
|
||||
return R.ok(service.queryById(shiftId));
|
||||
}
|
||||
|
||||
@Log(title = "班次", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmShiftBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "班次", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmShiftBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "班次", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{shiftIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] shiftIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(shiftIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmShiftVo>> all(HrmShiftBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmStatSnapshotBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmStatSnapshotVo;
|
||||
import com.ruoyi.hrm.service.IHrmStatSnapshotService;
|
||||
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/stat")
|
||||
public class HrmStatSnapshotController extends BaseController {
|
||||
|
||||
private final IHrmStatSnapshotService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmStatSnapshotVo> list(HrmStatSnapshotBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{snapId}")
|
||||
public R<HrmStatSnapshotVo> getInfo(@PathVariable @NotNull Long snapId) {
|
||||
return R.ok(service.queryById(snapId));
|
||||
}
|
||||
|
||||
@Log(title = "指标快照", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmStatSnapshotBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "指标快照", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmStatSnapshotBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "指标快照", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{snapIds}")
|
||||
public R<Void> remove(@PathVariable @NotEmpty Long[] snapIds) {
|
||||
return toAjax(service.deleteWithValidByIds(Arrays.asList(snapIds), true));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public R<List<HrmStatSnapshotVo>> all(HrmStatSnapshotBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.hrm.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.hrm.domain.bo.HrmTravelReqBo;
|
||||
import com.ruoyi.hrm.domain.vo.HrmTravelReqVo;
|
||||
import com.ruoyi.hrm.service.IHrmTravelReqService;
|
||||
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/travel")
|
||||
public class HrmTravelReqController extends BaseController {
|
||||
|
||||
private final IHrmTravelReqService service;
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmTravelReqVo> list(HrmTravelReqBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/{bizId}")
|
||||
public R<HrmTravelReqVo> getInfo(@PathVariable @NotNull Long bizId) {
|
||||
return R.ok(service.queryById(bizId));
|
||||
}
|
||||
|
||||
@Log(title = "出差单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmTravelReqBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@Log(title = "出差单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmTravelReqBo 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<HrmTravelReqVo>> all(HrmTravelReqBo bo) {
|
||||
return R.ok(service.queryList(bo));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user