办公V3
This commit is contained in:
@@ -12,6 +12,7 @@ import com.klp.hrm.domain.bo.HrmSealStampBo;
|
||||
import com.klp.hrm.domain.vo.HrmSealReqVo;
|
||||
import com.klp.hrm.service.IHrmSealReqService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,6 +22,7 @@ import javax.validation.constraints.NotNull;
|
||||
/**
|
||||
* 用印申请
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@@ -29,68 +31,65 @@ public class HrmSealReqController extends BaseController {
|
||||
|
||||
private final IHrmSealReqService service;
|
||||
|
||||
@SaCheckPermission("hrm:seal:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HrmSealReqVo> list(HrmSealReqBo bo, PageQuery pageQuery) {
|
||||
return service.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:query")
|
||||
@GetMapping("/{bizId}")
|
||||
public R<HrmSealReqVo> getInfo(@PathVariable @NotNull Long bizId) {
|
||||
return R.ok(service.queryById(bizId));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:add")
|
||||
@Log(title = "用印申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody HrmSealReqBo bo) {
|
||||
return toAjax(service.insertByBo(bo));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:edit")
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody HrmSealReqBo bo) {
|
||||
return toAjax(service.updateByBo(bo));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:remove")
|
||||
@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));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:approve")
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/approve")
|
||||
public R<Void> approve(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "approved"));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:reject")
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/reject")
|
||||
public R<Void> reject(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "rejected"));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:cancel")
|
||||
@Log(title = "用印申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/cancel")
|
||||
public R<Void> cancel(@PathVariable @NotNull Long bizId) {
|
||||
return toAjax(service.updateStatus(bizId, "canceled"));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:stamp")
|
||||
@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));
|
||||
}
|
||||
|
||||
@SaCheckPermission("hrm:seal:stamp")
|
||||
@Log(title = "用印盖章(Python)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/{bizId}/stamp/python")
|
||||
public R<String> stampPython(@PathVariable @NotNull Long bizId, @Validated @RequestBody HrmSealStampBo bo) {
|
||||
|
||||
Reference in New Issue
Block a user