| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo; |
| | | import com.panzhihua.common.redis.RedisUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.sangeshenbian.config.AutoColumnWidthStrategy; |
| | | import com.panzhihua.sangeshenbian.dao.ComplaintMapper; |
| | | import com.panzhihua.sangeshenbian.enums.AuditStatusEnum; |
| | |
| | | //查询评价 |
| | | ComplaintComment comment = complaintCommentService.lambdaQuery().eq(ComplaintComment::getComplaintId, id).last("LIMIT 1").one(); |
| | | complaintVO.setComplaintComment(comment); |
| | | ArrayList<String> voiceFileList = new ArrayList<>(); |
| | | String voiceFile = complaint.getVoiceFile(); |
| | | if(StringUtils.isNotEmpty(voiceFile)){ |
| | | for (String file :voiceFile.split(",")) { |
| | | voiceFileList.add(file); |
| | | } |
| | | } |
| | | |
| | | complaintVO.setVoiceFileList(voiceFileList); |
| | | return complaintVO; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void downloadFile(Long id, Integer type, SystemUserVo loginUserInfo) throws IOException { |
| | | public String downloadFile(Long id, Integer type, SystemUserVo loginUserInfo) throws IOException { |
| | | Complaint complaint = baseMapper.getDetailBg(id); |
| | | if (Objects.isNull(complaint)) { |
| | | throw new ServiceException("该诉求不存在"); |
| | |
| | | response.setHeader("Content-disposition", "attachment;filename=\"" + fileNameEncode + ".docx" + "\""); |
| | | InputStream resourceAsStream = this.getClass().getResourceAsStream("/template/" + fileName); |
| | | XWPFTemplate.compile(resourceAsStream).render(map).writeAndClose(response.getOutputStream()); |
| | | return complaint.getName(); |
| | | } |
| | | |
| | | |