| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.WorksheetDTO; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.pojo.WorkflowAlarm; |
| | | import com.whyc.pojo.WorkflowMain; |
| | | import com.whyc.pojo.WorksheetMain; |
| | | import com.whyc.service.Workflow1Service; |
| | | import com.whyc.service.WorksheetMainService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | @RequestMapping("worksheet") |
| | | @RestController |
| | |
| | | public class WorksheetController { |
| | | |
| | | @Autowired |
| | | private WorksheetMainService service; |
| | | private WorksheetMainService service1; |
| | | @Autowired |
| | | private Workflow1Service service; |
| | | |
| | | |
| | | @PostMapping |
| | | @ApiOperation("添加工单") |
| | | public Response add(@RequestBody WorksheetMain main){ |
| | | public Response add(@RequestBody WorkflowMain main){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | main.setCreateUser(userInf.getUName()); |
| | | main.setCreateUserId(userInf.getUId().intValue()); |
| | | return service.add(main); |
| | | } |
| | | |
| | | public Response getPendingWorksheet(){ |
| | | UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | |
| | | return null; |
| | | @PostMapping("/getWorkflowByPage") |
| | | @ApiOperation("查询待处理工单") |
| | | public Response getWorkflowByPage(@RequestParam int pageNum,@RequestParam int pageSize,@RequestBody WorksheetDTO dto){ |
| | | PageInfo<WorksheetDTO> list = service.getWorksheetList(pageNum,pageSize,dto); |
| | | return new Response().set(1,list); |
| | | } |
| | | @GetMapping("/getWorkflowById") |
| | | @ApiOperation("工单详情") |
| | | public Response getWorkflowById(@RequestParam Integer id){ |
| | | WorkflowMain main = service.getOneById(id); |
| | | return new Response().set(1,main); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // @PostMapping |
| | | // @ApiOperation("添加工单") |
| | | // public Response add(@RequestBody WorksheetMain main){ |
| | | // UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | // main.setCreateUser(userInf.getUName()); |
| | | // return service1.add(main); |
| | | // } |
| | | |
| | | // @PostMapping("/getPendingByPage") |
| | | // @ApiOperation("查询待处理工单") |
| | | // public Response getPendingByPage(@RequestParam int pageNum,@RequestParam int pageSize,@RequestBody WorksheetDTO dto){ |
| | | //// UserInf userInf = (UserInf) ActionUtil.getUser(); |
| | | //// dto.setDealUser(userInf.getUName()); |
| | | //// dto.setDealUserId(userInf.getUId()); |
| | | // PageInfo<WorksheetDTO> list = service1.getWorksheetList(pageNum,pageSize,dto); |
| | | // return new Response().set(1,list); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |