Browse Source

ComFileBas Entity 추가, Repository추가

pull/3/head
lkd9125 1 year ago
parent
commit
c129b50416
  1. 23
      pav-server/src/main/java/com/palnet/biz/api/bas/flight/controller/BasFlightController.java
  2. 70
      pav-server/src/main/java/com/palnet/biz/jpa/entity/ComFileBas.java
  3. 12
      pav-server/src/main/java/com/palnet/biz/jpa/repository/com/ComFileBasRepository.java
  4. 1
      pav-server/src/main/java/com/palnet/biz/jpa/repository/com/ComIdntBasRepository.java

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

@ -6,9 +6,6 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -17,17 +14,13 @@ import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser; import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException; import org.json.simple.parser.ParseException;
import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Coordinate;
import org.locationtech.proj4j.CRSFactory;
import org.locationtech.proj4j.CoordinateReferenceSystem;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.palnet.biz.api.bas.flight.model.BasFlightAprovRq; import com.palnet.biz.api.bas.flight.model.BasFlightAprovRq;
@ -43,6 +36,7 @@ import com.palnet.biz.api.comn.model.ComnPagingRs;
import com.palnet.biz.api.comn.response.BasicResponse; import com.palnet.biz.api.comn.response.BasicResponse;
import com.palnet.biz.api.comn.response.ErrorResponse; import com.palnet.biz.api.comn.response.ErrorResponse;
import com.palnet.biz.api.comn.response.SuccessResponse; import com.palnet.biz.api.comn.response.SuccessResponse;
import com.palnet.biz.jpa.repository.com.ComFileBasRepository;
import com.palnet.biz.scheduler.ctr.service.CtrTrnsLctnService; import com.palnet.biz.scheduler.ctr.service.CtrTrnsLctnService;
import com.palnet.comn.exception.CustomException; import com.palnet.comn.exception.CustomException;
import com.palnet.comn.utils.AreaUtils; import com.palnet.comn.utils.AreaUtils;
@ -64,11 +58,12 @@ public class BasFlightController {
private final AreaUtils utils; private final AreaUtils utils;
@Autowired @Autowired
public BasFlightController(BasFlightService basFlightService, Environment env, CtrTrnsLctnService ctrTrnsLctnService, AreaUtils AreaUtils) { public BasFlightController(BasFlightService basFlightService, Environment env, CtrTrnsLctnService ctrTrnsLctnService, AreaUtils AreaUtils, ComFileBasRepository comFileBasRepository) {
this.basFlightService = basFlightService; this.basFlightService = basFlightService;
this.env = env; this.env = env;
this.ctrTrnsLctnService = ctrTrnsLctnService; this.ctrTrnsLctnService = ctrTrnsLctnService;
this.utils = AreaUtils; this.utils = AreaUtils;
this.comFileBasRepository = comFileBasRepository;
} }
@GetMapping("/area") @GetMapping("/area")
@ -394,4 +389,16 @@ public class BasFlightController {
} }
} }
private final ComFileBasRepository comFileBasRepository;
@GetMapping("/test/createLancePDF")
public void createLancePDF() {
log.warn("안뇽");
log.error("dd -> {}", comFileBasRepository.findAll());
}
} }

70
pav-server/src/main/java/com/palnet/biz/jpa/entity/ComFileBas.java

@ -0,0 +1,70 @@
package com.palnet.biz.jpa.entity;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.time.Instant;
/**
* The persistent class for the COM_IDNTF_BAS database table.
*
*/
@Data
@Entity
@Table(name="COM_FILE_BAS")
@NamedQuery(name="ComFileBas.findAll", query="SELECT c FROM ComFileBas c")
public class ComFileBas implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name="FILE_SNO")
private int fileSno;
@Column(name="FILE_GROUP_NO")
private int fileGroupNo;
@Column(name="FILE_SAVE_NM")
private String fileSaveNm;
@Column(name="FILE_ORI_NM")
private String fileOriNm;
@Column(name = "FILE_PATH")
private String filePath;
@Column(name="FILE_EXT")
private String fileExt;
// @Temporal(TemporalType.TIMESTAMP)
@Column(name="FILE_SIZE")
private String fileSize;
// @Temporal(TemporalType.TIMESTAMP)
@Column(name="DEL_YN", columnDefinition = "TIMESTAMP")
private Instant delYn;
@Column(name="DEL_USER_ID")
private String delUserId;
@Column(name="DEL_DT")
private Instant delDt;
@Column(name="CREATE_USER_ID")
private String createUserId;
@Column(name="CREATE_DT" , columnDefinition = "TIMESTAMP")
private Instant createDt;
}

12
pav-server/src/main/java/com/palnet/biz/jpa/repository/com/ComFileBasRepository.java

@ -0,0 +1,12 @@
package com.palnet.biz.jpa.repository.com;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.palnet.biz.jpa.entity.ComFileBas;
@Repository
public interface ComFileBasRepository extends JpaRepository<ComFileBas, String>{
}

1
pav-server/src/main/java/com/palnet/biz/jpa/repository/com/ComIdntBasRepository.java

@ -1,7 +1,6 @@
package com.palnet.biz.jpa.repository.com; package com.palnet.biz.jpa.repository.com;
import java.util.List; import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Modifying;

Loading…
Cancel
Save