| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.sxkj.gd.workorder.entity.GdClueEventEntity; |
| | | import org.sxkj.gd.workorder.param.GdClueEventRejectParam; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventCountVO; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventListVO; |
| | | import org.sxkj.gd.workorder.vo.GdClueEventVO; |
| | | import org.sxkj.gd.workorder.excel.GdClueEventExcel; |
| | | import org.sxkj.gd.workorder.wrapper.GdClueEventWrapper; |
| | | import org.sxkj.gd.workorder.service.IGdClueEventService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入gdClueEvent") |
| | | public R<GdClueEventVO> detail(GdClueEventEntity gdClueEvent) { |
| | | GdClueEventEntity detail = gdClueEventService.getOne(Condition.getQueryWrapper(gdClueEvent)); |
| | | return R.data(GdClueEventWrapper.build().entityVO(detail)); |
| | | @ApiOperation(value = "详情", notes = "传入事件ID") |
| | | public R<GdClueEventVO> detail(@ApiParam(value = "事件ID", required = true) @RequestParam Long id) { |
| | | return R.data(gdClueEventService.getGdClueEventDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 事件表(线索事件) 分页 |
| | | * 事件表(线索事件) 列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入gdClueEvent") |
| | | public R<IPage<GdClueEventVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdClueEvent, Query query) { |
| | | IPage<GdClueEventEntity> pages = gdClueEventService.page(Condition.getPage(query), Condition.getQueryWrapper(gdClueEvent, GdClueEventEntity.class)); |
| | | return R.data(GdClueEventWrapper.build().pageVO(pages)); |
| | | @ApiOperation(value = "列表", notes = "固定过滤本部门,onlyMine=1时仅我的数据") |
| | | public R<List<GdClueEventListVO>> list(@ApiParam(value = "是否仅我的数据,1为是,0为否") |
| | | @RequestParam(value = "onlyMine", required = false, defaultValue = "0") Integer onlyMine, |
| | | @ApiParam(value = "事件编号关键字") |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | List<GdClueEventListVO> list = gdClueEventService.listGdClueEventByDept(onlyMine, keyword); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 事件表(线索事件) 数量统计 |
| | | */ |
| | | @GetMapping("/count") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "数量统计", notes = "返回全部工单与我的工单数量") |
| | | public R<GdClueEventCountVO> count(@ApiParam(value = "事件编号关键字") |
| | | @RequestParam(value = "keyword", required = false) String keyword) { |
| | | return R.data(gdClueEventService.getGdClueEventCount(keyword)); |
| | | } |
| | | |
| | | /** |
| | | * 事件表(线索事件) 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "分页", notes = "传入gdClueEvent") |
| | | public R<IPage<GdClueEventVO>> page(GdClueEventVO gdClueEvent, Query query) { |
| | | IPage<GdClueEventVO> pages = gdClueEventService.selectGdClueEventPage(Condition.getPage(query), gdClueEvent); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 事件表(线索事件) 新增或修改-对外接口 |
| | | */ |
| | | @PostMapping("/submitExternal") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入gdClueEvent") |
| | | public R submitExternal(@Valid @RequestBody GdClueEventEntity gdClueEvent) { |
| | | return R.status(gdClueEventService.saveOrUpdateExternal(gdClueEvent)); |
| | | } |
| | | |
| | | /** |
| | | * 事件表(线索事件) 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 事件驳回 |
| | | * 事件处理 |
| | | */ |
| | | @PostMapping("/reject") |
| | | @PostMapping("/handle") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "驳回", notes = "传入事件ID") |
| | | public R reject(@Valid @RequestBody GdClueEventRejectParam rejectParam) { |
| | | return R.status(gdClueEventService.rejectClueEvent(rejectParam)); |
| | | @ApiOperation(value = "处理", notes = "传入事件ID与事件状态") |
| | | public R handle(@Valid @RequestBody GdClueEventRejectParam rejectParam) { |
| | | return R.status(gdClueEventService.handleClueEvent(rejectParam)); |
| | | } |
| | | |
| | | // /** |