예외사유 대상 조회 오류 수정

This commit is contained in:
2025-06-02 09:58:20 +09:00
parent e069dd2597
commit cae32f8be7
2 changed files with 7 additions and 6 deletions

View File

@@ -30,8 +30,8 @@ public interface ContRepository extends JpaRepository<Cont, String> {
String getRegSabun();
}
@Query(value = "select c.contNo as contNo, " +
" p.cateCd as cateCd, " +
" p.cateNm as cateNm, " +
" c.cateCd as cateCd, " +
" c.cateNm as cateNm, " +
" c.compNm as compNm, " +
" c.title as title, " +
" c.signDt as signDt, " +
@@ -41,9 +41,8 @@ public interface ContRepository extends JpaRepository<Cont, String> {
" c.regDt as regDt, " +
" c.regNm as regNm, " +
" c.regSabun as regSabun " +
"from Cont c inner join Prcs p " +
"on c.prcsNo = p.prcsNo " +
"and c.regSabun = :sabun " +
"from Cont c " +
"where c.regSabun = :sabun " +
"and (:contStatCd is null or :contStatCd = '' or c.contStatCd = :contStatCd) " +
"and c.signDt between :signSdt and :signEdt order by c.contNo desc")
Page<IContResponse> findBySearch(String sabun, String contStatCd, String signSdt, String signEdt, Pageable pageable);

View File

@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
@@ -130,7 +131,8 @@ public class ContServiceImpl implements ContService {
.build());
if(contSaveRequest.getContAtts() != null && contSaveRequest.getContAtts().size() > 0){
cont.setContAtts(contAttRepository.saveAll(contSaveRequest.getContAtts().stream().map(contAttSaveRequest -> {
cont.setContAtts(contAttRepository.saveAll(contSaveRequest.getContAtts().stream().filter(Objects::nonNull).map(contAttSaveRequest -> {
String pNm = CommonUtils.dateFormat("yyyyMMddHHmmssSSS");
fileUtils.fileUpload(filePath + pNm, contAttSaveRequest.getData());
return ContAtt.builder()