|
|
|
@ -59,57 +59,49 @@ public class EntrustAlterApplyController { |
|
|
|
|
@PutMapping("/update") |
|
|
|
|
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyEdit')") // 委托申请修改消息修改权限
|
|
|
|
|
public R update(@RequestBody @Valid EntrustAlterApplyDTO dto) { |
|
|
|
|
Boolean success = null; |
|
|
|
|
try { |
|
|
|
|
success = entrustAlterApplyService.update(dto); |
|
|
|
|
return entrustAlterApplyService.update(dto) ? R.ok(true,"修改成功") : R.failed(false,"修改失败"); |
|
|
|
|
} catch (ValidateCodeException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.failed(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
return R.ok(success).setMsg(success ? "修改成功" : "修改失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "审核提交委托申请修改消息", notes = "审核提交委托申请修改消息") |
|
|
|
|
@PutMapping("/approve") |
|
|
|
|
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyApprove')") // 委托申请修改消息审核权限
|
|
|
|
|
public R approve(@RequestBody @Valid EntrustAlterApplyApproveDTO approveDTO) { |
|
|
|
|
Boolean success = null; |
|
|
|
|
try { |
|
|
|
|
success = entrustAlterApplyService.approve(approveDTO); |
|
|
|
|
return entrustAlterApplyService.approve(approveDTO) ? R.ok(true,"操作成功") : R.failed(false,"操作成功"); |
|
|
|
|
} catch (ValidateCodeException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.failed(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
return R.ok(success).setMsg(success ? "审核成功" : "审核失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "删除委托申请修改消息", notes = "删除委托申请修改消息, 只能删除为提交状态的消息") |
|
|
|
|
@PostMapping("/delete") |
|
|
|
|
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyDelete')") // 委托申请修改消息删除权限
|
|
|
|
|
public R delete(@RequestBody List<String> ids) { |
|
|
|
|
Boolean success = null; |
|
|
|
|
try { |
|
|
|
|
success = entrustAlterApplyService.delete(ids); |
|
|
|
|
return entrustAlterApplyService.delete(ids) ? R.ok(true, "操作成功") : R.failed(false,"操作失败"); |
|
|
|
|
} catch (ValidateCodeException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.failed(e.getMessage()); |
|
|
|
|
} |
|
|
|
|
return R.ok(success).setMsg(success ? "审核成功" : "审核失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "审核通过后,调用该接口修改委托案件简要、鉴定要求,x", notes = "审核通过后,调用该接口修改委托案件简要、鉴定要求") |
|
|
|
|
@PutMapping("/updateEntrust") |
|
|
|
|
@PreAuthorize("@pms.hasPermission('EntrustAlterApplyUpdateEntrust')") // 委托申请修改消息修改委托案件简要、鉴定要求权限
|
|
|
|
|
public R updateEntrust(@Valid @RequestBody ApprovedUpdateEntrustDTO dto) { |
|
|
|
|
Boolean success = entrustAlterApplyService.updateEntrust(dto); |
|
|
|
|
return R.ok(success).setMsg(success ? "修改成功" : "修改失败"); |
|
|
|
|
return entrustAlterApplyService.updateEntrust(dto) ? R.ok(true, "操作成功") : R.failed(false,"操作失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "判断当前委托是否在申请中的状态", notes = "判断当前委托是否在申请中的状态") |
|
|
|
|
@GetMapping("/isApplying") |
|
|
|
|
public R isApplying(@RequestParam("entrustId") String entrustId) { |
|
|
|
|
Boolean success = entrustAlterApplyService.isApplying(entrustId); |
|
|
|
|
return R.ok(success).setMsg(success ? "当前委托在申请修改中!" : "当前委托在未申请修改!"); |
|
|
|
|
return entrustAlterApplyService.isApplying(entrustId) ? R.ok(true, "当前委托在申请修改中!") : R.failed(false, "当前委托在未申请修改!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|