| | |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.WorkflowLink; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.pojo.WorkflowMain; |
| | | import com.whyc.service.WorkflowLinkService; |
| | | import com.whyc.service.WorkflowMainService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("workflowMain") |
| | |
| | | @Autowired |
| | | private WorkflowLinkService linkService; |
| | | |
| | | @PostMapping("workflowMainList") |
| | | @ApiOperation(value = "查询各状态工单列表",notes = "待处理:type=0,已处理:type=1,已归档:type=2,已撤销:type=3") |
| | | public Response<PageInfo<WorkflowMain>> getList(@RequestBody WorkflowMain main,@RequestParam Integer type, @RequestParam Integer pageNum, @RequestParam Integer pageSize){ |
| | | Long userId = ActionUtil.getUser().getUId(); |
| | | return new Response<PageInfo<WorkflowMain>>().set(1,service.getPendingList(userId,type,pageNum,pageSize,main)); |
| | | } |
| | | |
| | | @GetMapping("basicInfo") |
| | | @ApiOperation(value = "工单基本状态") |
| | | public Response<WorkflowMain> getBasicInfo(@RequestParam Integer mainId){ |
| | | return new Response<WorkflowMain>().set(1,service.getBaseInfo(mainId)); |
| | | } |
| | | |
| | | //本人的单据: 已审批,审批中,已撤销,已驳回 |
| | | //接收到的单据: 待审核,(待接单审核?),已审核 |
| | | /** |
| | | * 本人的单据: |
| | | * 已审批,审批中,已撤销,已驳回 |
| | | * */ |
| | | @GetMapping("ownStatistics") |
| | | @ApiOperation(value = "本人的单据统计") |
| | | public Response<Map<Integer,Integer>> getOwnStatistics(int type){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.getOwnStatistics(userId,type); |
| | | } |
| | | |
| | | /** |
| | | * 本人的单据: |
| | | * 已审批,审批中,已撤销,已驳回 |
| | | * */ |
| | | @GetMapping("ownListPage") |
| | | @ApiOperation(value = "本人的单据列表分页") |
| | | public Response<PageInfo<WorkflowMain>> ownListPage(int type,int status,int pageNum,int pageSize){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.ownListPage(userId,type,status,pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 接收到的单据: |
| | | * 放电计划临时表中存在: 待审核,待接单审核,已审核 |
| | | * */ |
| | | @GetMapping("receivedStatistics") |
| | | @ApiOperation(value = "接收到的单据统计") |
| | | public Response<Map<Integer,Integer>> getReceivedStatistics(int type){ |
| | | UserInf user = ActionUtil.getUser(); |
| | | return service.getReceivedStatistics(type,user); |
| | | } |
| | | |
| | | /** |
| | | * 接收到的单据: |
| | | * 放电计划临时表中存在: 待审核,待接单审核,已审核 |
| | | * */ |
| | | @GetMapping("receivedListPage") |
| | | @ApiOperation(value = "接收到的单据列表分页") |
| | | public Response<PageInfo<WorkflowMain>> getReceivedListPage(int type,int status,int pageNum,int pageSize){ |
| | | UserInf user = ActionUtil.getUser(); |
| | | return service.getReceivedListPage(type,status,user,pageNum,pageSize); |
| | | } |
| | | |
| | | } |