| | |
| | | package com.example.jz.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.example.jz.dao.GroupDao; |
| | | import com.example.jz.dao.GroupUserDao; |
| | | import com.example.jz.dao.MessageDao; |
| | | import com.example.jz.dao.ReportDao; |
| | | import com.example.jz.modle.R; |
| | | import com.example.jz.modle.dto.AddReportDto; |
| | | import com.example.jz.modle.dto.CauseDto; |
| | | import com.example.jz.modle.dto.ReportParamDto; |
| | | import com.example.jz.modle.entity.Cause; |
| | | import com.example.jz.modle.entity.GroupUser; |
| | | import com.example.jz.modle.vo.NewCauseVo; |
| | | import com.example.jz.modle.vo.ReportListVo; |
| | | import com.example.jz.service.CauseService; |
| | | import com.example.jz.service.GroupService; |
| | | import com.example.jz.service.ReportService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 案件表(Cause)表控制层 |
| | |
| | | @PostMapping("/addCause") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R addCause(@RequestBody @Validated CauseDto causeDto) { |
| | | int count = causeService.count(new LambdaQueryWrapper<Cause>().eq(Cause::getName, causeDto.getName())); |
| | | if(count>0){ |
| | | return R.failed("该案件名已存在,请重新输入"); |
| | | } |
| | | causeService.addCause(causeDto); |
| | | return R.ok(); |
| | | } |
| | |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R getCauseList(String cause, Integer status, Integer size, Integer current) { |
| | | return R.ok(causeService.getCauserListByCondition(cause, status, size, current)); |
| | | } |
| | | |
| | | @GetMapping("/getVxCauseList") |
| | | @ApiOperation(httpMethod = "GET", value = "微信找案件") |
| | | public R<List<NewCauseVo>> getVxCauseList(@RequestParam String phone){ |
| | | List<NewCauseVo> res = causeService.getVxCauseList(phone); |
| | | return R.ok(res); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "GET", value = "案件台-案件录入-案件录入列表") |
| | |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | @SneakyThrows |
| | | public R uploadReporter(@RequestParam(value = "multipartFile") MultipartFile multipartFile,Integer causeId) { |
| | | causeService.loadFileReport(multipartFile,causeId); |
| | | causeService.loadFileReport(multipartFile,causeId); |
| | | return R.ok(); |
| | | } |
| | | |