mitao
2025-03-18 35168aa5267f61747fe4dbb4a35f0e1a7bdbd7e1
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -33,6 +33,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -810,6 +811,8 @@
        if (Objects.isNull(complaintAuditRecord)) {
            throw new ServiceException("上报申请记录不存在");
        }
        complaintAuditRecord.setAuditorName(systemUser.getName());
        complaintAuditRecord.setAuditorPhone(systemUser.getPhone());
        if (complaintReporAuditDTO.getAuditResult().equals(1)) {
            complaintAuditRecord.setAuditStatus(1);
            complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId());
@@ -1238,8 +1241,8 @@
        response.setContentType("application/octet-stream");
        String fileNameEncode = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename=\"" + fileNameEncode + ".docx" + "\"");
        String fileTemplateName = FileUtil.getPath() + "template/" + fileName + ".docx";
        XWPFTemplate.compile(fileTemplateName).render(map).writeAndClose(response.getOutputStream());
        ClassPathResource resource = new ClassPathResource("template/" + fileName + ".docx");
        XWPFTemplate.compile(resource.getFile()).render(map).writeAndClose(response.getOutputStream());
    }