-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
2,232 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,4 @@ public static AssetRes assetInfo (Asset asset){ | |
.astPrice(asset.getAstPrice()) | ||
.build(); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/kbds/itamserveradmin/domain/asset/dto/ManualLogReq.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.kbds.itamserveradmin.domain.asset.dto; | ||
|
||
import lombok.Data; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
@Data | ||
public class ManualLogReq { | ||
private MultipartFile file; | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/com/kbds/itamserveradmin/domain/asset/dto/ManualLogRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.kbds.itamserveradmin.domain.asset.dto; | ||
|
||
import com.kbds.itamserveradmin.domain.asset.entity.ManualLog; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class ManualLogRes { | ||
|
||
private String mnLogId; | ||
private String mnLogVer; | ||
private String mnLogUserGuide; | ||
private String mnLogInstallFile; | ||
private String mnLogInstallGuide; | ||
private String assetId; | ||
|
||
public static ManualLogRes installGuideRes(ManualLog manualLog){ | ||
return ManualLogRes.builder() | ||
.assetId(manualLog.getAsset().getAstId()) | ||
.mnLogId(manualLog.getMnLogId()) | ||
.mnLogVer(manualLog.getMnLogVer()) | ||
.mnLogInstallFile(manualLog.getMnLogInstallFile()) | ||
.mnLogInstallGuide(manualLog.getMnLogInstallGuide()) | ||
.build(); | ||
} | ||
|
||
public static ManualLogRes allvers(ManualLog manualLog){ | ||
return ManualLogRes.builder() | ||
.assetId(manualLog.getAsset().getAstId()) | ||
.mnLogVer(manualLog.getMnLogVer()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,8 @@ public class Asset { | |
private String astDpd; | ||
private String astImgUrl; | ||
|
||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/com/kbds/itamserveradmin/domain/asset/repository/AssetRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
package com.kbds.itamserveradmin.domain.asset.repository; | ||
|
||
import com.kbds.itamserveradmin.domain.asset.entity.Asset; | ||
import com.kbds.itamserveradmin.domain.corporation.entity.CorpPK; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
|
||
@Repository | ||
public interface AssetRepository extends JpaRepository<Asset, String> { | ||
|
||
Asset findAssetByAstId(String astId); | ||
|
||
|
||
|
||
|
||
|
||
// @Query("SELECT a " + | ||
// "FROM Asset a " + | ||
// "Where a.corp.corpId = :corp_id " + | ||
// "order by astId desc") | ||
// Asset findCorpCntById(@Param("corp_id") String corp_id); | ||
|
||
@Query(value = "SELECT max(a.astId) " + | ||
"FROM Asset a " + // 여기서 공백을 추가해야 함 | ||
"WHERE a.corp.corpId = :corp_id " + // WHERE 절에 공백을 추가하고 corp_id의 앞에 콜론(:)을 빼먹지 않아야 함 | ||
"ORDER BY a.astId DESC") // ORDER BY 구문을 추가하고 astId 앞에 a.를 빼먹지 않아야 함 | ||
String findCorpCntById(@Param("corp_id") String corp_id); | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/com/kbds/itamserveradmin/domain/asset/repository/ManualLogRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
package com.kbds.itamserveradmin.domain.asset.repository; | ||
|
||
import com.kbds.itamserveradmin.domain.asset.entity.Asset; | ||
import com.kbds.itamserveradmin.domain.asset.entity.ManualLog; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface ManualLogRepository extends JpaRepository<ManualLog, String> { | ||
ManualLog findByAsset_AstId(String astId); | ||
List<ManualLog> findByAsset (Asset asset); | ||
ManualLog findByMnLogId (String mnLogId); | ||
} |
Oops, something went wrong.