Browse Source

패키지 변경

pull/4/head
lkd9125 1 year ago
parent
commit
412720800b
  1. 2
      pav-server/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java
  2. 17
      pav-server/src/main/java/com/palnet/biz/api/bas/flight/template/service/TemplateService.java

2
pav-server/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java

@ -410,7 +410,7 @@ public class BasFlightController {
@GetMapping("/laanc-pdf/download")
public void downloadPDF(int fileSno, HttpServletResponse response){
// basFlightService.fileDownload(fileSno, response);
templateService.fileDownload(fileSno, response);
}
}

17
pav-server/src/main/java/com/palnet/biz/api/bas/flight/template/service/TemplateService.java

@ -12,6 +12,7 @@ import java.time.Instant;
import java.util.Map;
import java.util.Map.Entry;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
@ -22,6 +23,8 @@ import com.palnet.biz.api.acnt.jwt.utils.JwtTokenUtil;
import com.palnet.biz.api.bas.flight.template.vo.LaancPdfVO;
import com.palnet.biz.jpa.entity.ComFileBas;
import com.palnet.biz.jpa.repository.com.ComFileBasRepository;
import com.palnet.comn.code.ErrorCode;
import com.palnet.comn.exception.CustomException;
import com.palnet.comn.utils.InstantUtils;
import com.palnet.comn.utils.PdfUtils;
@ -106,4 +109,18 @@ public class TemplateService {
comFileBasRepository.save(comFileBas);
}
/**
* 파일 다운로드
* @param fileSno
* @param response
*/
public void fileDownload(int fileSno, HttpServletResponse response) {
ComFileBas comFileBas = comFileBasRepository.findById(fileSno).orElse(null);
if(comFileBas == null) throw new CustomException(ErrorCode.DATA_NOTFIND);
log.info("comFileBas -> {}", comFileBas);
}
}

Loading…
Cancel
Save