| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.FaultUpload; |
| | | import com.whyc.service.FaultUploadService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @PutMapping("confirm") |
| | | @ApiOperation("确认") |
| | | @ApiOperation(value = "确认",notes = "属性status:-1-确认不属实,1-确认属实") |
| | | public Response updateConfirm(@RequestBody FaultUpload fault){ |
| | | return service.updateConfirm(fault); |
| | | } |
| | | |
| | | @PostMapping("listPage") |
| | | @ApiOperation(value = "列表分页",notes = "包机组内成员可见") |
| | | @ApiOperation(value = "列表分页-组内",notes = "包机组内成员可见") |
| | | public Response listPage(@RequestParam int pageNum,@RequestParam int pageSize, |
| | | @RequestBody FaultUpload upload){ |
| | | return service.listPage(pageNum, pageSize,upload); |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.listPage(pageNum, pageSize,upload,userId); |
| | | } |
| | | |
| | | @GetMapping("typeNum") |
| | | @ApiOperation(value = "故障隐患类型统计",notes = "包机组内成员可见") |
| | | public Response getTypeNum(){ |
| | | return service.getTypeNum(); |
| | | @GetMapping("typeCount") |
| | | @ApiOperation(value = "隐患故障上报类型统计",notes = "timeType:不传-所有,1-本月,2-本季度,3-本年") |
| | | public Response getTypeCount(@RequestParam(required = false) Integer timeType){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.getTypeCount(timeType,userId); |
| | | } |
| | | |
| | | @PostMapping("listPage2") |
| | | @ApiOperation(value = "列表分页-所有班组",notes = "包机组内成员可见") |
| | | @ApiOperation(value = "列表分页-管理") |
| | | public Response listPage2(@RequestParam int pageNum,@RequestParam int pageSize, |
| | | @RequestBody FaultUpload upload){ |
| | | return service.listPage2(pageNum, pageSize,upload); |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.listPage2(pageNum, pageSize,upload,userId); |
| | | } |
| | | |
| | | @GetMapping("groupNameCount") |
| | | @ApiOperation(value = "隐患故障上报统计-管理",notes = "timeType:1-本月,2-本季度,3-本年") |
| | | public Response groupNameCount(@RequestParam int timeType){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.groupNameCount(timeType,userId); |
| | | } |
| | | |
| | | @GetMapping("listOfLastPeriod") |
| | | @ApiOperation(value = "隐患故障上报进度-最近一周及最近一月-管理",notes = "type:1-最近一周,2-最近一月") |
| | | public Response getListOfLastPeriod(int type){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.getListOfLastPeriod(type,userId); |
| | | } |
| | | |
| | | @GetMapping("myUploadStatusCount") |
| | | @ApiOperation(value = "我的隐患故障上报状态数量统计") |
| | | public Response getMyUploadStatusCount(){ |
| | | int userId = ActionUtil.getUser().getUId().intValue(); |
| | | return service.getMyUploadStatusCount(userId); |
| | | } |
| | | |
| | | } |