| | |
| | | import com.example.jz.modle.entity.User; |
| | | import com.example.jz.modle.vo.PublicityVo; |
| | | import com.example.jz.service.PublicityService; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | |
| | | @GetMapping |
| | | @ApiOperation("分页查询所有数据") |
| | | public R selectAll(Page<User> page, User user) { |
| | | return R.ok(this.userService.page(page, new QueryWrapper<User>() |
| | | R<Page<User>> res = R.ok(this.userService.page(page, new QueryWrapper<User>() |
| | | .eq("role", 0) |
| | | .and(StringUtils.isNotBlank(user.getNickName()) && StringUtils.isNotBlank(user.getRealName()), new Consumer<QueryWrapper<User>>() { |
| | | @Override |
| | |
| | | } |
| | | }) |
| | | .like(StringUtils.isNotBlank(user.getNickName()) && StringUtils.isBlank(user.getRealName()), "nick_name", user.getNickName()) |
| | | .or() |
| | | .like(StringUtils.isNotBlank(user.getRealName()) && StringUtils.isBlank(user.getNickName()), "real_name", user.getRealName()) |
| | | .and(StringUtils.isNotBlank(user.getRealName()) && StringUtils.isBlank(user.getNickName()), new Consumer<QueryWrapper<User>>() { |
| | | @Override |
| | | public void accept(QueryWrapper<User> userQueryWrapper) { |
| | | userQueryWrapper.like("real_name", user.getRealName()); |
| | | } |
| | | }) |
| | | // .like(StringUtils.isNotBlank(user.getRealName()) && StringUtils.isBlank(user.getNickName()), "real_name", user.getRealName()) |
| | | .orderByDesc("ctime"))); |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | |
| | | @ColumnWidth(20) |
| | | private String workingLocation; |
| | | |
| | | @ApiModelProperty(value = "创建时间",dataType = "Date",position = 6) |
| | | @ExcelProperty(value = "创建时间", index = 6) |
| | | @ApiModelProperty(value = "涉案金额",dataType = "String", position = 6) |
| | | @ExcelProperty(value = "涉案金额",index = 6) |
| | | @ColumnWidth(20) |
| | | private Double amountInvolved; |
| | | |
| | | @ApiModelProperty(value = "创建时间",dataType = "Date",position = 7) |
| | | @ExcelProperty(value = "创建时间", index = 7) |
| | | @DateTimeFormat("yyyy/MM/dd HH:mm:ss") |
| | | @ColumnWidth(20) |
| | | private Date ctime; |
| | | |
| | | @ApiModelProperty(value = "备注",dataType = "String", position = 7) |
| | | @ExcelProperty(value = "备注",index = 7) |
| | | @ApiModelProperty(value = "备注",dataType = "String", position = 8) |
| | | @ExcelProperty(value = "备注",index = 8) |
| | | @ColumnWidth(20) |
| | | private String userMemo; |
| | | } |
| | |
| | | private Date firstTime; |
| | | //创建时间 |
| | | private Date ctime; |
| | | //状态 0未审核 1不予立案 2受理中 3已结案 |
| | | //状态 0立案 1初查 2受理 3移送起诉 4结案 |
| | | private Integer status; |
| | | //负责人id |
| | | private Integer userId; |
| | |
| | | List<CauseReportExpDto> res = users.stream().map(new Function<User, CauseReportExpDto>() { |
| | | @Override |
| | | public CauseReportExpDto apply(User user) { |
| | | Double amountInvolved = reportDao.selectOne(Wrappers.<Report>lambdaQuery().eq(Report::getCauseId, causeId).eq(Report::getUserId, user.getId())).getAmountInvolved(); |
| | | CauseReportExpDto build = CauseReportExpDto.builder() |
| | | .realName(user.getRealName()) |
| | | .userMobile(user.getUserMobile()) |
| | |
| | | .sex(user.getSex()) |
| | | .location(user.getLocation()) |
| | | .workingLocation(user.getWorkingLocation()) |
| | | .amountInvolved(amountInvolved) |
| | | .ctime(user.getCtime()) |
| | | .userMemo(user.getUserMemo()) |
| | | .build(); |
| | |
| | | @Override |
| | | public List<Map<String, String>> getCauseIdAndName() { |
| | | ArrayList<Map<String, String>> maps = new ArrayList<>(); |
| | | causeDao.selectList(new QueryWrapper<Cause>().eq("status", 0).or().eq("status", 2)).stream().forEach(a -> { |
| | | causeDao.selectList(null).stream().forEach(a -> { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("id", a.getId().toString()); |
| | | map.put("name", a.getName()); |
| | |
| | | fileName = URLEncoder.encode(fileName, "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=" + fileName + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx"); |
| | | EasyExcel.write(response.getOutputStream(), className) |
| | | .sheet(sheetName) |
| | | .doWrite(collection); |
| | |
| | | validation-timeout: 1000 |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 50MB |
| | | max-file-size: 1024MB |
| | | max-request-size: 2048MB |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | time-zone: GMT+8 |
| | |
| | | <where> |
| | | 1=1 |
| | | <if test="reportParamDto.people != ''"> |
| | | and (u.real_name like '%${reportParamDto.people}%' or u.user_idcard like '%${reportParamDto.people}%') |
| | | and (u.real_name like '%${reportParamDto.people}%') |
| | | </if> |
| | | <if test="reportParamDto.phoneNumber != ''"> |
| | | and u.user_mobile like '%${reportParamDto.phoneNumber}%' |