| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.WorkflowLinkDTO; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.pojo.WorkflowLink; |
| | | import com.whyc.service.WorkflowLinkService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @RestController |
| | | @RequestMapping("workflowLink") |
| | | @Api(tags = "单据审批") |
| | | public class WorkflowLinkController { |
| | | public class WorkflowLinkController extends BaseController{ |
| | | |
| | | @Autowired |
| | | private WorkflowLinkService service; |
| | |
| | | return new Response<List<WorkflowLink>>().set(1, service.getWorkflowInfo(mainId)); |
| | | } |
| | | |
| | | @PutMapping("linkOfDischargePlanTemp") |
| | | @PostMapping("linkOfDischargePlanTemp") |
| | | @ApiOperation(value = "更新节点-放电计划", notes = "传参link对象内,传入id,mainId,processLevel,status,dealReason或者dealRejectReason;" + |
| | | "字段status:5-通过,8-驳回") |
| | | public Response updateLinkOfDischargePlanTemp(@RequestBody WorkflowLinkDTO linkDTO) { |
| | | return service.updateLinkOfDischargePlanTemp(linkDTO); |
| | | } |
| | | |
| | | @PostMapping("link") |
| | | @ApiOperation(value = "更新节点", notes = "传参link对象内,传入id,mainId,processLevel,status,dealReason或者dealRejectReason;type传3" + |
| | | "字段status:5-通过,8-驳回") |
| | | public Response updateLink(@RequestBody WorkflowLinkDTO linkDTO) { |
| | | return service.updateLink(linkDTO); |
| | | } |
| | | |
| | | @PostMapping("linkOfTemp") |
| | |
| | | } |
| | | |
| | | @GetMapping("searchTmp") |
| | | @ApiOperation(value = "查询节点(除放电计划之外的)") |
| | | public Response searchTmp(@RequestParam int pageNum, @RequestParam int pageSize) { |
| | | return service.searchTmp(pageNum, pageSize); |
| | | @ApiOperation(value = "查询节点(除放电计划之外的)", notes = "status:0全部,1审批中,2审批通过,3驳回;type:0全部,2二次放电,3告警隐患") |
| | | public Response searchTmp(@RequestParam int type, @RequestParam int status, @RequestParam int pageNum, @RequestParam int pageSize) { |
| | | UserInf uinf = ActionUtil.getUser(); |
| | | return service.searchTmp(uinf.getUId().intValue(), uinf.getURole(), type, status, pageNum, pageSize); |
| | | } |
| | | |
| | | @GetMapping("searchLastHrById") |
| | | @ApiOperation(value = "节点为二次放电时查询二次放电参数和本年上一次有效核容数据") |
| | | public Response searchLastHrById(@RequestParam int mid) { |
| | | return service.searchLastHrById(mid); |
| | | } |
| | | |
| | | @GetMapping("searcFaultById") |
| | | @ApiOperation(value = "节点为故障隐患") |
| | | public Response searcFaultById(@RequestParam int mid) { |
| | | return service.searcFaultById(mid); |
| | | } |
| | | |
| | | @GetMapping("getFlowMainByUid") |
| | | @ApiOperation(value = "查询自己申请的工单(去除放电计划)", notes = "status:0全部,1审批中,2审批通过,3驳回;type:0全部,2二次放电,3告警隐患") |
| | | public Response getFlowMainByUid(@RequestParam int type, @RequestParam int status, @RequestParam int pageNum, @RequestParam int pageSize) { |
| | | UserInf uinf = ActionUtil.getUser(); |
| | | return service.getFlowMainByUid(uinf.getUId().intValue(), type, status, pageNum, pageSize); |
| | | } |
| | | } |