Skip to content

Commit

Permalink
feat : Portal Main 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
oU-Ua committed Feb 7, 2024
2 parents 1806730 + 064ef02 commit 0e1fa29
Show file tree
Hide file tree
Showing 44 changed files with 326 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/kbds/itamserveradmin/domain/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class Test {
@PostMapping("/test")
public ResponseEntity<String> test(){
boolean test = true;
System.out.println("시작");
System.out.println("start");

if(test) {
throw new BaseException(ErrorCode.INTERNAL_SERVER_ERROR);
}

return ResponseEntity.ok("성공");
return ResponseEntity.ok("success");

}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.asset.controller;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AssetController {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.asset.dto;

import lombok.Data;

@Data
public class AssetReq {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.asset.dto;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class AssetRes {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kbds.itamserveradmin.domain.asset.entity;

import com.kbds.itamserveradmin.domain.cooperation.entity.Cooperation;
import com.kbds.itamserveradmin.domain.corporation.entity.Corporation;
import com.kbds.itamserveradmin.domain.user.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -9,8 +9,6 @@


import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

@Entity
@Data
Expand All @@ -20,14 +18,14 @@
public class Asset {

@Id
private Long astId;
private String astId;
private String astName;
private Boolean isAstInternal;
private AstTag astTag;

@ManyToOne
@JoinColumn(name = "corp_id" )
private Cooperation corp;
private Corporation corp;

@ManyToOne
@JoinColumn(name = "user_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.asset.repository;

import com.kbds.itamserveradmin.domain.asset.entity.AssetNotice;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetNoticeRepository extends JpaRepository<AssetNotice, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.asset.repository;

import com.kbds.itamserveradmin.domain.asset.entity.Asset;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetRepository extends JpaRepository<Asset, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.asset.repository;

import com.kbds.itamserveradmin.domain.asset.entity.ManualLog;
import org.springframework.data.jpa.repository.JpaRepository;

public interface ManualLogRepository extends JpaRepository<ManualLog, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.kbds.itamserveradmin.domain.asset.service;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class AssetService {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.assetRequest.repository;

import com.kbds.itamserveradmin.domain.assetRequest.entity.AssetRequestLog;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetRequestLogRepository extends JpaRepository<AssetRequestLog, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.assetRequest.repository;

import com.kbds.itamserveradmin.domain.assetRequest.entity.AssetRequestManageLog;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetRequestManageLogRepository extends JpaRepository<AssetRequestManageLog, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.assetRequest.repository;

import com.kbds.itamserveradmin.domain.assetRequest.entity.AssetRequestManage;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetRequestManageRepository extends JpaRepository<AssetRequestManage, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.assetRequest.repository;

import com.kbds.itamserveradmin.domain.assetRequest.entity.AssetRequest;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AssetRequestRepository extends JpaRepository<AssetRequest, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.assetRequest.repository;

import com.kbds.itamserveradmin.domain.assetRequest.entity.UserAssetRequestInfo;
import org.springframework.data.jpa.repository.JpaRepository;


public interface UserAssetRequestInfoRepository extends JpaRepository<UserAssetRequestInfo, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.kbds.itamserveradmin.domain.contract.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController

public class ContractController {
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.kbds.itamserveradmin.domain.contract.entity;

import com.kbds.itamserveradmin.domain.asset.entity.Asset;
import com.kbds.itamserveradmin.domain.cooperation.entity.Cooperation;
import com.kbds.itamserveradmin.domain.corporation.entity.Corporation;
import com.kbds.itamserveradmin.domain.purchaseRequest.entity.NewAssetRequest;
import com.kbds.itamserveradmin.domain.user.entity.User;
import com.kbds.itamserveradmin.global.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -30,7 +29,7 @@ public class Contract {

@ManyToOne
@JoinColumn(name = "corp_id")
private Cooperation corp;
private Corporation corp;

@OneToOne
private NewAssetRequest newAstReq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
package com.kbds.itamserveradmin.domain.contract.entity;

public enum OpStatus {
IN_OPERATION, IN_DISPOSAL
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.kbds.itamserveradmin.domain.contract.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import java.time.LocalDateTime;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PeriodType {
@Id
private Long periodId;

@OneToOne
@JoinColumn(name = "cont_id")
private Contract cont;

private LocalDateTime contStartDate;

private LocalDateTime contEndDate;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.CALKey;
import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import org.springframework.data.jpa.repository.JpaRepository;

public interface CALKeyRepository extends JpaRepository<CALKey, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import com.kbds.itamserveradmin.domain.contract.entity.ContractRecord;
import org.springframework.data.jpa.repository.JpaRepository;

public interface ContractRecordRepository extends JpaRepository<ContractRecord, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import org.springframework.data.jpa.repository.JpaRepository;

public interface ContractRepository extends JpaRepository<Contract, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import com.kbds.itamserveradmin.domain.contract.entity.LicenseKey;
import org.springframework.data.jpa.repository.JpaRepository;

public interface LicenseKeyRepository extends JpaRepository<LicenseKey, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.NumOfUsersType;
import org.springframework.data.jpa.repository.JpaRepository;

public interface NumOfUsersTypeRepository extends JpaRepository<NumOfUsersType, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import com.kbds.itamserveradmin.domain.contract.entity.PeriodType;
import org.springframework.data.jpa.repository.JpaRepository;

public interface PeriodTypeRepository extends JpaRepository<PeriodType, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.contract.repository;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import com.kbds.itamserveradmin.domain.contract.entity.SupplyType;
import org.springframework.data.jpa.repository.JpaRepository;

public interface SupplyTypeRepository extends JpaRepository<SupplyType, String> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.kbds.itamserveradmin.domain.contract.service;

import org.springframework.stereotype.Service;

@Service
public class ContractService {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.kbds.itamserveradmin.domain.corporation.controller;

public class CooperationController {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.kbds.itamserveradmin.domain.corporation.entity;

import com.kbds.itamserveradmin.domain.contract.entity.Contract;
import com.kbds.itamserveradmin.domain.department.entity.Department;
import com.kbds.itamserveradmin.domain.user.entity.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Corporation {
@Id
@Column(name = "corp_id")
private String corpId;

@Column(name = "corp_name")
private String corpName;

@Column(name = "crn")
private String corpNum;

@Column(name = "corp_contact")
private String corpContact;

@Column(name = "corp_addr")
private String corpAddr;

@Column(name = "corp_site")
private String corpSite;

@Column(name = "corp_head")
private String corpHead;

@Column(name = "corp_note")
private String corpNote;

@Column(name = "is_sub_corp")
private boolean isSubCorp;

//==연관관계==//
@OneToMany(mappedBy = "cooperation",fetch = FetchType.LAZY)
@Builder.Default
private List<Department> departments = new ArrayList<>();

@OneToMany(mappedBy = "cooperation",fetch = FetchType.LAZY)
@Builder.Default
private List<User> users = new ArrayList<>();

// @OneToMany(mappedBy ="cooperation")
// private List<Asset> assets = new ArrayList<>();

@OneToMany(mappedBy = "corp",fetch = FetchType.LAZY)
@Builder.Default
private List<Contract> contracts = new ArrayList<>();

//==연관관계==//


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.kbds.itamserveradmin.domain.corporation.repository;

import com.kbds.itamserveradmin.domain.corporation.entity.Corporation;
import org.springframework.data.jpa.repository.JpaRepository;

public interface CooperationRepository extends JpaRepository<Corporation,String> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.kbds.itamserveradmin.domain.corporation.service;

public interface CooperationService {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.kbds.itamserveradmin.domain.corporation.service;

public class CooperationServiceImpl implements CooperationService{
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package com.kbds.itamserveradmin.domain.department.controller;

import org.springframework.stereotype.Controller;

@Controller
public class DepartmentController {

}
Loading

0 comments on commit 0e1fa29

Please sign in to comment.