| | |
| | | import com.example.jz.modle.R; |
| | | import com.example.jz.modle.entity.Announcement; |
| | | import com.example.jz.service.AnnouncementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("announcement") |
| | | @Api(tags = "群公告") |
| | | public class AnnouncementController extends ApiController { |
| | | /** |
| | | * 服务对象 |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import lombok.SneakyThrows; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 报案表(Report)表控制层 |
| | |
| | | @Data |
| | | @ApiModel(description = "案件录入案件人员详情",value = "CauseReportVo") |
| | | public class CauseReportVo { |
| | | private Integer id; |
| | | //头像地址 |
| | | private String pic; |
| | | //报案人id |
| | |
| | | causeReportVo.setIsIntoGroup("0"); |
| | | } else { |
| | | causeReportVo.setIsIntoGroup("1"); |
| | | causeReportVo.setGroupId(groupDao.selectOne(new QueryWrapper<Group>().eq("cause_id",causeId)).getId()); |
| | | } |
| | | return causeReportVo; |
| | | } |
| | |
| | | } |
| | | ); |
| | | String name = causeDao.selectOne(new QueryWrapper<Cause>().eq("id", id)).getName(); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + URLEncoder.encode(name + ".xlsx", "utf-8")); |
| | | EasyExcel.write(response.getOutputStream(), ExportExcelReportVo.class).sheet("材料导出").doWrite(exportExcelReportVos); |