shjung há 2 anos atrás
pai
commit
457d619a2c

+ 0 - 25
src/main/java/com/its/op/dao/repository/its/facility/TbFcltFailHsRepository.java

@@ -1,25 +0,0 @@
-package com.its.op.dao.repository.its.facility;
-
-import com.its.op.entity.its.facility.TbFcltFailHs;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface TbFcltFailHsRepository extends JpaRepository<TbFcltFailHs, String>, JpaSpecificationExecutor<TbFcltFailHs> {
-
-    @Query("select p from TbFcltFailHs p")
-    List<TbFcltFailHs> findAll();
-
-    @Query("select p from TbFcltFailHs p where p.fcltId = :fcltId")
-    List<TbFcltFailHs> findAllFailList(@Param("fcltId") String fcltId);
-
-    @Query(value = "SELECT TO_NUMBER(LPAD(NVL(MAX(SUBSTR(FAIL_HS_SEQ, -4)), '0000') + 1, 4, '0')) AS NEWID " +
-                   "  FROM TB_FCLT_FAIL_HS                                                                 " +
-                   " WHERE SUBSTR(FAIL_HS_SEQ, 1, 6) = TO_CHAR(SYSDATE, 'YYYYMM')", nativeQuery = true)
-    Integer findNewHsSeq(@Param("currYear") String currYear);
-}

+ 0 - 27
src/main/java/com/its/op/dao/repository/its/facility/TbFcltFailRparHsRepository.java

@@ -1,27 +0,0 @@
-package com.its.op.dao.repository.its.facility;
-
-import com.its.op.entity.its.facility.TbFcltFailRparHs;
-import com.its.op.entity.its.facility.TbFcltFailRparHsKey;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface TbFcltFailRparHsRepository extends JpaRepository<TbFcltFailRparHs, TbFcltFailRparHsKey>, JpaSpecificationExecutor<TbFcltFailRparHs> {
-
-    @Query("select p from TbFcltFailRparHs p")
-    List<TbFcltFailRparHs> findAll();
-
-    @Query("select p from TbFcltFailRparHs p where p.failHsSeq = :failHsSeq")
-    List<TbFcltFailRparHs> findAllFailHsList(@Param("failHsSeq") String failHsSeq);
-
-    @Modifying
-    @Query("delete from TbFcltFailRparHs p where p.failHsSeq = :failHsSeq")
-    void deleteDataById(@Param("failHsSeq") String failHsSeq);
-
-}

+ 0 - 19
src/main/java/com/its/op/dao/repository/its/facility/TbFcltInfrRepository.java

@@ -1,19 +0,0 @@
-package com.its.op.dao.repository.its.facility;
-
-import com.its.op.entity.its.facility.TbFcltInfr;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface TbFcltInfrRepository extends JpaRepository<TbFcltInfr, String>, JpaSpecificationExecutor<TbFcltInfr> {
-
-    @Query("select p from TbFcltInfr p")
-    List<TbFcltInfr> findAll();
-
-    @Query("select p from TbFcltInfr p where p.delYn = 'N'")
-    List<TbFcltInfr> findAllList();
-}

+ 13 - 13
src/main/java/com/its/op/dto/its/facility/TbFcltCmpyDto.java

@@ -28,8 +28,8 @@ public class TbFcltCmpyDto implements Serializable {
     private String cmpyNm;
 
     @ApiModelProperty("사업자 등록 번호")  // Y VARCHAR(30)
-    @JsonProperty("brno")
-    private String brno;
+    @JsonProperty("cmpy_rgst_nmbr")
+    private String cmpyRgstNmbr;
 
     @ApiModelProperty("주소")  // Y VARCHAR(200)
     @JsonProperty("addr")
@@ -56,8 +56,8 @@ public class TbFcltCmpyDto implements Serializable {
     private String chgrHpNmbr;
 
     @ApiModelProperty("담당자 이메일")  // Y VARCHAR(128)
-    @JsonProperty("chgr_emal")
-    private String chgrEmal;
+    @JsonProperty("chgr_email")
+    private String chgrEmail;
 
     @ApiModelProperty("삭제 여부")  // Y CHAR(1)
     @JsonProperty("del_yn")
@@ -83,10 +83,10 @@ public class TbFcltCmpyDto implements Serializable {
         private String cmpyNm;
 
         @ApiModelProperty("사업자 등록 번호, Nullable = Y, VARCHAR(30)")  // Y VARCHAR(30)
-        @JsonProperty("brno")
+        @JsonProperty("cmpy_rgst_nmbr")
         //@Size(min=1, max=30)
         @Size(max=30)
-        private String brno;
+        private String cmpyRgstNmbr;
 
         @ApiModelProperty("주소, Nullable = Y, VARCHAR(200)")  // Y VARCHAR(200)
         @JsonProperty("addr")
@@ -120,9 +120,9 @@ public class TbFcltCmpyDto implements Serializable {
         private String chgrHpNmbr;
 
         @ApiModelProperty("담당자 이메일, Nullable = Y, VARCHAR(128)")  // Y VARCHAR(128)
-        @JsonProperty("chgr_emal")
+        @JsonProperty("chgr_email")
         @Size(min=1, max=128)
-        private String chgrEmal;
+        private String chgrEmail;
 
         @ApiModelProperty("삭제 여부, Nullable = Y, CHAR(1)")  // Y CHAR(1)
         @JsonProperty("del_yn")
@@ -131,17 +131,17 @@ public class TbFcltCmpyDto implements Serializable {
         private String delYn;
 
         @Builder
-        public TbFcltCmpyUpdReq(String cmpy_id, String cmpy_nm, String brno, String addr, String tel, String fcsm_nmbr, String rprv_nm, String chgr_nm, String chgr_hp_nmbr, String chgr_emal, String del_yn) {
+        public TbFcltCmpyUpdReq(String cmpy_id, String cmpy_nm, String cmpy_rgst_nmbr, String addr, String tel, String fcsm_nmbr, String rprv_nm, String chgr_nm, String chgr_hp_nmbr, String chgr_email, String del_yn) {
             this.cmpyId = cmpy_id;
             this.cmpyNm = cmpy_nm;
-            this.brno = brno;
+            this.cmpyRgstNmbr = cmpy_rgst_nmbr;
             this.addr = addr;
             this.tel = tel;
             this.fcsmNmbr = fcsm_nmbr;
             this.rprvNm = rprv_nm;
             this.chgrNm = chgr_nm;
             this.chgrHpNmbr = chgr_hp_nmbr;
-            this.chgrEmal = chgr_emal;
+            this.chgrEmail = chgr_email;
             this.delYn = del_yn;
         }
 
@@ -149,14 +149,14 @@ public class TbFcltCmpyDto implements Serializable {
             return TbFcltCmpy.builder()
                     .cmpyId(this.cmpyId)
                     .cmpyNm(this.cmpyNm)
-                    .brno(this.brno)
+                    .cmpyRgstNmbr(this.cmpyRgstNmbr)
                     .addr(this.addr)
                     .tel(this.tel)
                     .fcsmNmbr(this.fcsmNmbr)
                     .rprvNm(this.rprvNm)
                     .chgrNm(this.chgrNm)
                     .chgrHpNmbr(this.chgrHpNmbr)
-                    .chgrEmal(this.chgrEmal)
+                    .chgrEmail(this.chgrEmail)
                     .delYn(this.delYn)
                     .build();
         }

+ 8 - 14
src/main/java/com/its/op/dto/its/oper/TbUserInfrDto.java

@@ -49,8 +49,8 @@ public class TbUserInfrDto implements Serializable {
     private String mobile;
 
     @ApiModelProperty("이메일")  // Y VARCHAR(128)
-    @JsonProperty("emal")
-    private String emal;
+    @JsonProperty("email")
+    private String email;
 
     @ApiModelProperty("삭제 여부")  // Y CHAR(1)
     @JsonProperty("del_yn")
@@ -109,19 +109,16 @@ public class TbUserInfrDto implements Serializable {
 
         @ApiModelProperty("회사, Nullable = Y, VARCHAR(50)")  // Y VARCHAR(50)
         @JsonProperty("comp")
-        //@Size(min=1, max=50)
-        @Size(max=50)
+        @Size(max=100)
         private String comp;
 
         @ApiModelProperty("전화번호, Nullable = Y, VARCHAR(128)")  // Y VARCHAR(128)
         @JsonProperty("tel")
-        //@Size(min=1, max=128)
         @Size(max=128)
         private String tel;
 
         @ApiModelProperty("주소, Nullable = Y, VARCHAR(200)")  // Y VARCHAR(200)
         @JsonProperty("addr")
-        //@Size(min=1, max=200)
         @Size(max=200)
         private String addr;
 
@@ -131,9 +128,9 @@ public class TbUserInfrDto implements Serializable {
         private String mobile;
 
         @ApiModelProperty("이메일, Nullable = Y, VARCHAR(128)")  // Y VARCHAR(128)
-        @JsonProperty("emal")
+        @JsonProperty("email")
         @Size(min=1, max=128)
-        private String emal;
+        private String email;
 
         @ApiModelProperty("삭제 여부, Nullable = Y, CHAR(1)")  // Y CHAR(1)
         @JsonProperty("del_yn")
@@ -176,7 +173,7 @@ public class TbUserInfrDto implements Serializable {
         private String operSystId;
 
         @Builder
-        public TbUserInfrUpdReq(String user_id, String pwd, String name, String comp, String tel, String addr, String mobile, String emal, String del_yn, String rgstymd, String crctymd, String hint_ques, String hint_ans, String grop_id, String oper_syst_id) {
+        public TbUserInfrUpdReq(String user_id, String pwd, String name, String comp, String tel, String addr, String mobile, String email, String del_yn, String rgstymd, String crctymd, String hint_ques, String hint_ans, String grop_id, String oper_syst_id) {
             this.userId = user_id;
             this.pwd = pwd;
             this.name = name;
@@ -184,7 +181,7 @@ public class TbUserInfrDto implements Serializable {
             this.tel = tel;
             this.addr = addr;
             this.mobile = mobile;
-            this.emal = emal;
+            this.email = email;
             this.delYn = del_yn;
             this.rgstymd = rgstymd;
             this.crctymd = crctymd;
@@ -201,12 +198,9 @@ public class TbUserInfrDto implements Serializable {
                     .name(this.name)
                     .comp(this.comp)
                     .tel(this.tel)
-                    .addr(this.addr)
                     .mobile(this.mobile)
-                    .emal(this.emal)
+                    .email(this.email)
                     .delYn(this.delYn)
-                    .rgstymd(this.rgstymd)
-                    .crctymd(this.crctymd)
                     .hintQues(this.hintQues)
                     .hintAns(this.hintAns)
                     .gropId(this.gropId)

+ 8 - 8
src/main/java/com/its/op/entity/its/facility/TbFcltCmpy.java

@@ -34,8 +34,8 @@ public class TbFcltCmpy implements Serializable {
     private String cmpyNm;
 
     @ApiModelProperty("사업자 등록 번호")  // Y VARCHAR(30)
-    @Column(name = "BRNO", length = 30)
-    private String brno;
+    @Column(name = "CMPY_RGST_NMBR", length = 30)
+    private String cmpyRgstNmbr;
 
     @ApiModelProperty("주소")  // Y VARCHAR(200)
     @Column(name = "ADDR", length = 200)
@@ -62,8 +62,8 @@ public class TbFcltCmpy implements Serializable {
     private String chgrHpNmbr;
 
     @ApiModelProperty("담당자 이메일")  // Y VARCHAR(128)
-    @Column(name = "CHGR_EMAL", length = 128)
-    private String chgrEmal;
+    @Column(name = "CHGR_EMAIL", length = 128)
+    private String chgrEmail;
 
     @ApiModelProperty("삭제 여부")  // Y CHAR(1)
     @Column(name = "DEL_YN", columnDefinition = "CHAR", length = 1)
@@ -73,14 +73,14 @@ public class TbFcltCmpy implements Serializable {
         return TbFcltCmpyDto.builder()
                 .cmpyId(this.cmpyId)
                 .cmpyNm(this.cmpyNm)
-                .brno(this.brno)
+                .cmpyRgstNmbr(this.cmpyRgstNmbr)
                 .addr(this.addr)
                 .tel(this.tel)
                 .fcsmNmbr(this.fcsmNmbr)
                 .rprvNm(this.rprvNm)
                 .chgrNm(this.chgrNm)
                 .chgrHpNmbr(this.chgrHpNmbr)
-                .chgrEmal(this.chgrEmal)
+                .chgrEmail(this.chgrEmail)
                 .delYn(this.delYn)
                 .build();
     }
@@ -91,14 +91,14 @@ public class TbFcltCmpy implements Serializable {
 
     public void updateInfo(TbFcltCmpyDto.TbFcltCmpyUpdReq req) {
         this.cmpyNm = req.getCmpyNm();
-        this.brno = req.getBrno();
+        this.cmpyRgstNmbr = req.getCmpyRgstNmbr();
         this.addr = req.getAddr();
         this.tel = req.getTel();
         this.fcsmNmbr = req.getFcsmNmbr();
         this.rprvNm = req.getRprvNm();
         this.chgrNm = req.getChgrNm();
         this.chgrHpNmbr = req.getChgrHpNmbr();
-        this.chgrEmal = req.getChgrEmal();
+        this.chgrEmail = req.getChgrEmail();
         this.delYn = req.getDelYn();
     }
 

+ 6 - 5
src/main/java/com/its/op/entity/its/facility/TbFcltFailHs.java

@@ -3,12 +3,13 @@ package com.its.op.entity.its.facility;
 import com.its.op.dto.its.facility.TbFcltFailHsDto;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.*;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
 
 import javax.persistence.Column;
-import javax.persistence.Entity;
 import javax.persistence.Id;
-import javax.persistence.Table;
 import java.io.Serializable;
 
 /**
@@ -19,8 +20,8 @@ import java.io.Serializable;
 @Builder
 @AllArgsConstructor
 @ApiModel("시설물 장애 내역")
-@Entity
-@Table(name = "TB_FCLT_FAIL_HS")
+//@Entity
+//@Table(name = "TB_FCLT_FAIL_HS")
 public class TbFcltFailHs implements Serializable {
     private static final long serialVersionUID = 1L;
 

+ 3 - 3
src/main/java/com/its/op/entity/its/facility/TbFcltFailRparHs.java

@@ -16,9 +16,9 @@ import java.io.Serializable;
 @Builder
 @AllArgsConstructor
 @ApiModel("시설물 장애 조치 내역")
-@Entity
-@Table(name = "TB_FCLT_FAIL_RPAR_HS")
-@IdClass(TbFcltFailRparHsKey.class)
+//@Entity
+//@Table(name = "TB_FCLT_FAIL_RPAR_HS")
+//@IdClass(TbFcltFailRparHsKey.class)
 public class TbFcltFailRparHs implements Serializable {
     private static final long serialVersionUID = 1L;
 

+ 6 - 5
src/main/java/com/its/op/entity/its/facility/TbFcltInfr.java

@@ -3,12 +3,13 @@ package com.its.op.entity.its.facility;
 import com.its.op.dto.its.facility.TbFcltInfrDto;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.*;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
 
 import javax.persistence.Column;
-import javax.persistence.Entity;
 import javax.persistence.Id;
-import javax.persistence.Table;
 import java.io.Serializable;
 
 /**
@@ -19,8 +20,8 @@ import java.io.Serializable;
 @Builder
 @AllArgsConstructor
 @ApiModel("시설물 정보")
-@Entity
-@Table(name = "TB_FCLT_INFR")
+//@Entity
+//@Table(name = "TB_FCLT_INFR")
 public class TbFcltInfr implements Serializable {
     private static final long serialVersionUID = 1L;
 

+ 1 - 1
src/main/java/com/its/op/entity/its/oper/TbGropMenuAthrKey.java

@@ -15,7 +15,7 @@ import java.io.Serializable;
 public class TbGropMenuAthrKey implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    // GROP_ID, 그룹ID  // N VARCHAR(30)
+    // GROP_ID, 그룹ID  // N VARCHAR(7)
     private String gropId;
 
     // OPERSYST_MENU_ID, 운영시스템메뉴ID  // N VARCHAR(30)

+ 2 - 2
src/main/java/com/its/op/entity/its/oper/TbUserGropInfr.java

@@ -29,11 +29,11 @@ public class TbUserGropInfr implements Serializable {
 
     @ApiModelProperty("그룹ID")  // N VARCHAR2(30)
     @Id
-    @Column(name = "GROP_ID", nullable = false, length = 30)
+    @Column(name = "GROP_ID", nullable = false, length = 7)
     private String gropId;
 
     @ApiModelProperty("그룹명")  // Y VARCHAR2(20)
-    @Column(name = "GROP_NM", length = 20)
+    @Column(name = "GROP_NM", length = 30)
     private String gropNm;
 
     @ApiModelProperty("설명")  // Y VARCHAR2(100)

+ 1 - 1
src/main/java/com/its/op/entity/its/oper/TbUserGropMenuAthr.java

@@ -27,7 +27,7 @@ public class TbUserGropMenuAthr implements Serializable {
 
     @ApiModelProperty("그룹ID")  // N VARCHAR2(30)
     @Id
-    @Column(name = "GROP_ID", nullable = false, length = 30)
+    @Column(name = "GROP_ID", nullable = false, length = 7)
     private String gropId;
 
     @ApiModelProperty("운영시스템ID")  // N VARCHAR2(30)

+ 1 - 1
src/main/java/com/its/op/entity/its/oper/TbUserGropMenuAthrKey.java

@@ -15,7 +15,7 @@ import java.io.Serializable;
 public class TbUserGropMenuAthrKey implements Serializable {
     private static final long serialVersionUID = 1L;
 
-    // GROP_ID, 그룹ID  // N VARCHAR2(30)
+    // GROP_ID, 그룹ID  // N VARCHAR2(7)
     private String gropId;
 
     // OPER_SYST_ID, 운영시스템ID  // N VARCHAR2(30)

+ 9 - 30
src/main/java/com/its/op/entity/its/oper/TbUserInfr.java

@@ -38,38 +38,26 @@ public class TbUserInfr implements Serializable {
     @Column(name = "NAME", length = 30)
     private String name;
 
-    @ApiModelProperty("회사")  // Y VARCHAR(50)
-    @Column(name = "COMP", length = 50)
+    @ApiModelProperty("회사")  // Y VARCHAR(100)
+    @Column(name = "COMP", length = 100)
     private String comp;
 
     @ApiModelProperty("전화번호")  // Y VARCHAR(128)
     @Column(name = "TEL", length = 128)
     private String tel;
 
-    @ApiModelProperty("주소")  // Y VARCHAR(200)
-    @Column(name = "ADDR", length = 200)
-    private String addr;
-
     @ApiModelProperty("이동전화")  // Y VARCHAR(128)
     @Column(name = "MOBILE", length = 128)
     private String mobile;
 
     @ApiModelProperty("이메일")  // Y VARCHAR(128)
-    @Column(name = "EMAL", length = 128)
-    private String emal;
+    @Column(name = "EMAIL", length = 128)
+    private String email;
 
     @ApiModelProperty("삭제 여부")  // Y CHAR(1)
     @Column(name = "DEL_YN", columnDefinition = "CHAR", length = 1)
     private String delYn;
 
-    @ApiModelProperty("등록일자")  // Y VARCHAR(14)
-    @Column(name = "RGSTYMD", length = 14)
-    private String rgstymd;
-
-    @ApiModelProperty("수정일자")  // Y VARCHAR(14)
-    @Column(name = "CRCTYMD", length = 14)
-    private String crctymd;
-
     @ApiModelProperty("힌트질문")  // Y VARCHAR(7)
     @Column(name = "HINT_QUES", length = 7)
     private String hintQues;
@@ -79,7 +67,7 @@ public class TbUserInfr implements Serializable {
     private String hintAns;
 
     @ApiModelProperty("그룹ID")  // Y VARCHAR(30)
-    @Column(name = "GROP_ID", length = 30)
+    @Column(name = "GROP_ID", length = 7)
     private String gropId;
 
     @ApiModelProperty("운영시스템ID")  // Y VARCHAR(30)
@@ -93,12 +81,9 @@ public class TbUserInfr implements Serializable {
                 .name(this.name)
                 .comp(this.comp)
                 .tel(this.tel)
-                .addr(this.addr)
                 .mobile(this.mobile)
-                .emal(this.emal)
+                .email(this.email)
                 .delYn(this.delYn)
-                .rgstymd(this.rgstymd)
-                .crctymd(this.crctymd)
                 .hintQues(this.hintQues)
                 .hintAns(this.hintAns)
                 .gropId(this.gropId)
@@ -113,12 +98,9 @@ public class TbUserInfr implements Serializable {
                 .name(this.name)
                 .comp(this.comp)
                 .tel(this.tel)
-                .addr(this.addr)
                 .mobile(this.mobile)
-                .emal(this.emal)
+                .email(this.email)
                 .delYn(this.delYn)
-                .rgstymd(this.rgstymd)
-                .crctymd(this.crctymd)
                 .hintQues(this.hintQues)
                 .hintAns(this.hintAns)
                 .gropId(this.gropId)
@@ -135,7 +117,7 @@ public class TbUserInfr implements Serializable {
 //                .tel(this.tel)
 //                .addr(this.addr)
 //                .mobile(this.mobile)
-//                .emal(this.emal)
+//                .email(this.email)
 //                .delYn(this.delYn)
 //                .rgstymd(this.rgstymd)
 //                .crctymd(this.crctymd)
@@ -155,12 +137,9 @@ public class TbUserInfr implements Serializable {
         this.name = req.getName();
         this.comp = req.getComp();
         this.tel = req.getTel();
-        this.addr = req.getAddr();
         this.mobile = req.getMobile();
-        this.emal = req.getEmal();
+        this.email = req.getEmail();
         this.delYn = req.getDelYn();
-        this.rgstymd = req.getRgstymd();
-        this.crctymd = req.getCrctymd();
         this.hintQues = req.getHintQues();
         this.hintAns = req.getHintAns();
         this.gropId = req.getGropId();

+ 3 - 6
src/main/java/com/its/op/security/UserInfrVo.java

@@ -41,7 +41,7 @@ public class UserInfrVo implements UserDetails {
     @ApiModelProperty("이동전화")  // Y VARCHAR(128)
     private String mobile;
     @ApiModelProperty("이메일")  // Y VARCHAR(128)
-    private String emal;
+    private String email;
     @ApiModelProperty("삭제 여부")  // Y CHAR(1)
     private String delYn;
 
@@ -69,7 +69,7 @@ public class UserInfrVo implements UserDetails {
                 .tel(this.tel)
                 .addr(this.addr)
                 .mobile(this.mobile)
-                .emal(this.emal)
+                .email(this.email)
                 .delYn(this.delYn)
                 .rgstymd(this.rgstymd)
                 .crctymd(this.crctymd)
@@ -86,12 +86,9 @@ public class UserInfrVo implements UserDetails {
                 .name(this.name)
                 .comp(this.comp)
                 .tel(this.tel)
-                .addr(this.addr)
                 .mobile(this.mobile)
-                .emal(this.emal)
+                .email(this.email)
                 .delYn(this.delYn)
-                .rgstymd(this.rgstymd)
-                .crctymd(this.crctymd)
                 .hintQues(this.hintQues)
                 .hintAns(this.hintAns)
                 .gropId(this.gropId)

+ 30 - 32
src/main/java/com/its/op/service/its/facility/TbFcltFailHsService.java

@@ -1,8 +1,6 @@
 package com.its.op.service.its.facility;
 
 import com.its.op.dao.repository.its.code.TbCmmnCdRepository;
-import com.its.op.dao.repository.its.facility.TbFcltFailHsRepository;
-import com.its.op.dao.repository.its.facility.TbFcltFailRparHsRepository;
 import com.its.op.dto.its.facility.FcltFailTypeDto;
 import com.its.op.dto.its.facility.TbFcltFailHsDto;
 import com.its.op.entity.its.code.TbCmmnCd;
@@ -17,26 +15,26 @@ import org.springframework.transaction.annotation.Transactional;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.NoSuchElementException;
-import java.util.Optional;
 
 @Slf4j
 @RequiredArgsConstructor
 @Service
 public class TbFcltFailHsService {
 
-    private final TbFcltFailHsRepository repo;
-    private final TbFcltFailRparHsRepository rparHsRepo;
+//    private final TbFcltFailHsRepository repo;
+//    private final TbFcltFailRparHsRepository rparHsRepo;
     private final TbCmmnCdRepository cmmnCdRepo;
 
     // 데이터 1건 조회, 없으면 exception
     private TbFcltFailHs requireOne(String id) throws NoSuchElementException {
-        Optional<TbFcltFailHs> info = this.repo.findById(id);
-        if (info.isPresent()) {
-            return info.get();
-        }
-        else {
-            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
-        }
+        return null;
+//        Optional<TbFcltFailHs> info = this.repo.findById(id);
+//        if (info.isPresent()) {
+//            return info.get();
+//        }
+//        else {
+//            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
+//        }
 //        return repo.findById(id)
 //                .orElseThrow(() -> new NoSuchElementException("데이터가 존재하지 않습니다: " + id));
     }
@@ -45,10 +43,10 @@ public class TbFcltFailHsService {
     @Transactional(readOnly = true)
     public List<TbFcltFailHsDto> findAll() {
         List<TbFcltFailHsDto> result = new ArrayList<>();
-        List<TbFcltFailHs> data = this.repo.findAll();
-        for (TbFcltFailHs entity : data) {
-            result.add(entity.toDto());
-        }
+//        List<TbFcltFailHs> data = this.repo.findAll();
+//        for (TbFcltFailHs entity : data) {
+//            result.add(entity.toDto());
+//        }
         return result;
     }
 
@@ -57,7 +55,7 @@ public class TbFcltFailHsService {
     public TbFcltFailHsDto updateById(String id, TbFcltFailHsDto.TbFcltFailHsUpdReq req) {
         TbFcltFailHs entity = requireOne(id);
         entity.updateInfo(req);
-        this.repo.save(entity);
+//        this.repo.save(entity);
         return entity.toDto();
     }
 
@@ -67,7 +65,7 @@ public class TbFcltFailHsService {
         List<TbFcltFailHsDto> result = new ArrayList<>();
         for (TbFcltFailHsDto.TbFcltFailHsUpdReq req : reqList) {
             TbFcltFailHs obj = req.toEntity();
-            this.repo.save(obj);
+//            this.repo.save(obj);
             result.add(obj.toDto());
         }
         return result;
@@ -77,7 +75,7 @@ public class TbFcltFailHsService {
     @Transactional
     public TbFcltFailHsDto mergeInfo(TbFcltFailHsDto.TbFcltFailHsUpdReq req) {
         TbFcltFailHs obj = req.toEntity();
-        this.repo.save(obj);
+//        this.repo.save(obj);
         return obj.toDto();
     }
 
@@ -85,8 +83,8 @@ public class TbFcltFailHsService {
     @Transactional
     public TbFcltFailHsDto deleteById(String id) {
         TbFcltFailHs entity = requireOne(id);
-        this.rparHsRepo.deleteDataById(id);
-        this.repo.deleteById(id);
+//        this.rparHsRepo.deleteDataById(id);
+//        this.repo.deleteById(id);
         return entity.toDto();
     }
 
@@ -95,12 +93,12 @@ public class TbFcltFailHsService {
     public List<TbFcltFailHsDto> deleteByIds(List<String> ids) {
         List<TbFcltFailHsDto> result = new ArrayList<>();
         for (String id : ids) {
-            Optional<TbFcltFailHs> obj = this.repo.findById(id);
-            if (obj.isPresent()) {
-                this.rparHsRepo.deleteDataById(id);
-                this.repo.deleteById(id);
-                result.add(obj.get().toDto());
-            }
+//            Optional<TbFcltFailHs> obj = this.repo.findById(id);
+//            if (obj.isPresent()) {
+//                this.rparHsRepo.deleteDataById(id);
+//                this.repo.deleteById(id);
+//                result.add(obj.get().toDto());
+//            }
         }
         return result;
     }
@@ -114,10 +112,10 @@ public class TbFcltFailHsService {
     public List<TbFcltFailHsDto> findAllFailList(String fcltId) {
 
         List<TbFcltFailHsDto> result = new ArrayList<>();
-        List<TbFcltFailHs> data = this.repo.findAllFailList(fcltId);
-        data.forEach(obj -> {
-            result.add(obj.toDto());
-        });
+//        List<TbFcltFailHs> data = this.repo.findAllFailList(fcltId);
+//        data.forEach(obj -> {
+//            result.add(obj.toDto());
+//        });
         return result;
     }
 
@@ -129,7 +127,7 @@ public class TbFcltFailHsService {
     @Transactional(readOnly = true)
     public String findNewHsSeq() {
         String currYear = ItsUtils.getSysTime("yyyyMM");
-        Integer newId =  this.repo.findNewHsSeq(currYear);
+        Integer newId =  0;//this.repo.findNewHsSeq(currYear);
         return String.format("%s%04d", currYear, newId);
     }
 

+ 26 - 27
src/main/java/com/its/op/service/its/facility/TbFcltFailRparHsService.java

@@ -1,6 +1,5 @@
 package com.its.op.service.its.facility;
 
-import com.its.op.dao.repository.its.facility.TbFcltFailRparHsRepository;
 import com.its.op.dto.its.facility.TbFcltFailRparHsDto;
 import com.its.op.entity.its.facility.TbFcltFailRparHs;
 import com.its.op.entity.its.facility.TbFcltFailRparHsKey;
@@ -12,24 +11,24 @@ import org.springframework.transaction.annotation.Transactional;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.NoSuchElementException;
-import java.util.Optional;
 
 @Slf4j
 @RequiredArgsConstructor
 @Service
 public class TbFcltFailRparHsService {
 
-    private final TbFcltFailRparHsRepository repo;
+//    private final TbFcltFailRparHsRepository repo;
 
     // 데이터 1건 조회, 없으면 exception
     private TbFcltFailRparHs requireOne(TbFcltFailRparHsKey id) throws NoSuchElementException {
-        Optional<TbFcltFailRparHs> info = this.repo.findById(id);
-        if (info.isPresent()) {
-            return info.get();
-        }
-        else {
-            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
-        }
+        return null;
+//        Optional<TbFcltFailRparHs> info = this.repo.findById(id);
+//        if (info.isPresent()) {
+//            return info.get();
+//        }
+//        else {
+//            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
+//        }
 //        return repo.findById(id)
 //                .orElseThrow(() -> new NoSuchElementException("데이터가 존재하지 않습니다: " + id));
     }
@@ -38,10 +37,10 @@ public class TbFcltFailRparHsService {
     @Transactional(readOnly = true)
     public List<TbFcltFailRparHsDto> findAll() {
         List<TbFcltFailRparHsDto> result = new ArrayList<>();
-        List<TbFcltFailRparHs> data = this.repo.findAll();
-        for (TbFcltFailRparHs entity : data) {
-            result.add(entity.toDto());
-        }
+//        List<TbFcltFailRparHs> data = this.repo.findAll();
+//        for (TbFcltFailRparHs entity : data) {
+//            result.add(entity.toDto());
+//        }
         return result;
     }
 
@@ -50,7 +49,7 @@ public class TbFcltFailRparHsService {
     public TbFcltFailRparHsDto updateById(TbFcltFailRparHsKey id, TbFcltFailRparHsDto.TbFcltFailRparHsUpdReq req) {
         TbFcltFailRparHs entity = requireOne(id);
         entity.updateInfo(req);
-        this.repo.save(entity);
+//        this.repo.save(entity);
         return entity.toDto();
     }
 
@@ -60,7 +59,7 @@ public class TbFcltFailRparHsService {
         List<TbFcltFailRparHsDto> result = new ArrayList<>();
         for (TbFcltFailRparHsDto.TbFcltFailRparHsUpdReq req : reqList) {
             TbFcltFailRparHs obj = req.toEntity();
-            this.repo.save(obj);
+//            this.repo.save(obj);
             result.add(obj.toDto());
         }
         return result;
@@ -70,7 +69,7 @@ public class TbFcltFailRparHsService {
     @Transactional
     public TbFcltFailRparHsDto mergeInfo(TbFcltFailRparHsDto.TbFcltFailRparHsUpdReq req) {
         TbFcltFailRparHs obj = req.toEntity();
-        this.repo.save(obj);
+//        this.repo.save(obj);
         return obj.toDto();
     }
 
@@ -78,7 +77,7 @@ public class TbFcltFailRparHsService {
     @Transactional
     public TbFcltFailRparHsDto deleteById(TbFcltFailRparHsKey id) {
         TbFcltFailRparHs entity = requireOne(id);
-        this.repo.deleteById(id);
+//        this.repo.deleteById(id);
         return entity.toDto();
     }
 
@@ -87,11 +86,11 @@ public class TbFcltFailRparHsService {
     public List<TbFcltFailRparHsDto> deleteByIds(List<TbFcltFailRparHsKey> ids) {
         List<TbFcltFailRparHsDto> result = new ArrayList<>();
         for (TbFcltFailRparHsKey id : ids) {
-            Optional<TbFcltFailRparHs> obj = this.repo.findById(id);
-            if (obj.isPresent()) {
-                this.repo.deleteById(id);
-                result.add(obj.get().toDto());
-            }
+//            Optional<TbFcltFailRparHs> obj = this.repo.findById(id);
+//            if (obj.isPresent()) {
+//                this.repo.deleteById(id);
+//                result.add(obj.get().toDto());
+//            }
         }
         return result;
     }
@@ -105,10 +104,10 @@ public class TbFcltFailRparHsService {
     public List<TbFcltFailRparHsDto> findAllFailHsList(String failHsSeq) {
 
         List<TbFcltFailRparHsDto> result = new ArrayList<>();
-        List<TbFcltFailRparHs> data = this.repo.findAllFailHsList(failHsSeq);
-        data.forEach(obj -> {
-            result.add(obj.toDto());
-        });
+//        List<TbFcltFailRparHs> data = this.repo.findAllFailHsList(failHsSeq);
+//        data.forEach(obj -> {
+//            result.add(obj.toDto());
+//        });
         return result;
     }
 }

+ 27 - 27
src/main/java/com/its/op/service/its/facility/TbFcltInfrService.java

@@ -1,6 +1,5 @@
 package com.its.op.service.its.facility;
 
-import com.its.op.dao.repository.its.facility.TbFcltInfrRepository;
 import com.its.op.dto.its.facility.TbFcltInfrDto;
 import com.its.op.dto.its.facility.UnRegisteredFcltInfrDto;
 import com.its.op.dto.its.vds.TbVdsCtlrDto;
@@ -20,20 +19,21 @@ import java.util.*;
 @Service
 public class TbFcltInfrService {
 
-    private final TbFcltInfrRepository repo;
+//    private final TbFcltInfrRepository repo;
     private final TbVmsCtlrService vmsCtlrService;
     private final TbVdsCtlrService vdsCtlrService;
 //    private final TbCctvCtlrService cctvCtlrService;
 
     // 데이터 1건 조회, 없으면 exception
     private TbFcltInfr requireOne(String id) throws NoSuchElementException {
-        Optional<TbFcltInfr> info = this.repo.findById(id);
-        if (info.isPresent()) {
-            return info.get();
-        }
-        else {
-            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
-        }
+        return null;
+//        Optional<TbFcltInfr> info = this.repo.findById(id);
+//        if (info.isPresent()) {
+//            return info.get();
+//        }
+//        else {
+//            throw new NoSuchElementException("데이터가 존재하지 않습니다: " + id);
+//        }
 //        return repo.findById(id)
 //                .orElseThrow(() -> new NoSuchElementException("데이터가 존재하지 않습니다: " + id));
     }
@@ -42,10 +42,10 @@ public class TbFcltInfrService {
     @Transactional(readOnly = true)
     public List<TbFcltInfrDto> findAll() {
         List<TbFcltInfrDto> result = new ArrayList<>();
-        List<TbFcltInfr> data = this.repo.findAll();
-        for (TbFcltInfr entity : data) {
-            result.add(entity.toDto());
-        }
+//        List<TbFcltInfr> data = this.repo.findAll();
+//        for (TbFcltInfr entity : data) {
+//            result.add(entity.toDto());
+//        }
         return result;
     }
 
@@ -56,10 +56,10 @@ public class TbFcltInfrService {
     @Transactional(readOnly = true)
     public List<TbFcltInfrDto> findAllList() {
         List<TbFcltInfrDto> result = new ArrayList<>();
-        List<TbFcltInfr> data = this.repo.findAllList();
-        data.forEach(obj -> {
-            result.add(obj.toDto());
-        });
+//        List<TbFcltInfr> data = this.repo.findAllList();
+//        data.forEach(obj -> {
+//            result.add(obj.toDto());
+//        });
         return result;
     }
 
@@ -75,7 +75,7 @@ public class TbFcltInfrService {
     public TbFcltInfrDto updateById(String id, TbFcltInfrDto.TbFcltInfrUpdReq req) {
         TbFcltInfr entity = requireOne(id);
         entity.updateInfo(req);
-        this.repo.save(entity);
+//        this.repo.save(entity);
         return entity.toDto();
     }
 
@@ -85,7 +85,7 @@ public class TbFcltInfrService {
         List<TbFcltInfrDto> result = new ArrayList<>();
         for (TbFcltInfrDto.TbFcltInfrUpdReq req : reqList) {
             TbFcltInfr obj = req.toEntity();
-            this.repo.save(obj);
+//            this.repo.save(obj);
             result.add(obj.toDto());
         }
         return result;
@@ -95,7 +95,7 @@ public class TbFcltInfrService {
     @Transactional
     public TbFcltInfrDto mergeInfo(TbFcltInfrDto.TbFcltInfrUpdReq req) {
         TbFcltInfr obj = req.toEntity();
-        this.repo.save(obj);
+//        this.repo.save(obj);
         return obj.toDto();
     }
 
@@ -103,7 +103,7 @@ public class TbFcltInfrService {
     @Transactional
     public TbFcltInfrDto deleteById(String id) {
         TbFcltInfr entity = requireOne(id);
-        this.repo.deleteById(id);
+//        this.repo.deleteById(id);
         return entity.toDto();
     }
 
@@ -112,11 +112,11 @@ public class TbFcltInfrService {
     public List<TbFcltInfrDto> deleteByIds(List<String> ids) {
         List<TbFcltInfrDto> result = new ArrayList<>();
         for (String id : ids) {
-            Optional<TbFcltInfr> obj = this.repo.findById(id);
-            if (obj.isPresent()) {
-                this.repo.deleteById(id);
-                result.add(obj.get().toDto());
-            }
+//            Optional<TbFcltInfr> obj = this.repo.findById(id);
+//            if (obj.isPresent()) {
+//                this.repo.deleteById(id);
+//                result.add(obj.get().toDto());
+//            }
         }
         return result;
     }
@@ -131,7 +131,7 @@ public class TbFcltInfrService {
         List<TbFcltInfrDto> result = new ArrayList<>();
         listReq.forEach(obj -> {
             TbFcltInfr entity = obj.toEntity();
-            this.repo.save(entity);
+//            this.repo.save(entity);
             result.add(entity.toDto());
         });
         return result;