package com.fjhx.controller.example; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fjhx.entity.example.ExampleInfo; import com.fjhx.service.example.ExampleInfoService; import org.springblade.core.tool.api.R; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Map; /** *

* 流程实例 前端控制器 *

* * @author ${author} * @since 2022-08-18 */ @RestController @RequestMapping("/exampleInfo") public class ExampleInfoController { @Autowired private ExampleInfoService exampleInfoService; /** * 代办 */ @PostMapping("/getWaitingProcessingPage") public R getWaitingProcessingPage(@RequestBody Map condition) { Page> result = exampleInfoService.getWaitingProcessingPage(condition); return R.data(result); } /** * 审批记录 */ @PostMapping("/record") public R record(@RequestBody ExampleInfo exampleInfo) { List> result = exampleInfoService.record(exampleInfo.getFlowLinkNo()); return R.data(result); } /** * 展示流程 */ @PostMapping("/showFlow") public R showFlow(@RequestBody Map condition) { List> result = exampleInfoService.showFlow(condition.get("code")); return R.data(result); } /** * 已办 */ @PostMapping("/getDone") public R getDone(Map condition) { Page> result = exampleInfoService.getDone(condition); return R.data(result); } /** * 撤回 */ @PostMapping("/withdraw") public R withdraw(Map condition) { Long withdrawExampleInfoId = condition.get("withdrawExampleInfoId"); Long withdrawExampleDetailsId = condition.get("withdrawExampleDetailsId"); exampleInfoService.withdraw(withdrawExampleInfoId, withdrawExampleDetailsId); return R.success(); } /** * 撤销 */ @PostMapping("/revoke") public R revoke(Map condition) { Long withdrawExampleInfoId = condition.get("withdrawExampleInfoId"); exampleInfoService.revoke(withdrawExampleInfoId); return R.success(); } }