diff --git a/frontend/src/modules/custMgt/components/InsertChrgModal.vue b/frontend/src/modules/custMgt/components/InsertChrgModal.vue
index a9fc94b..f5de1ca 100644
--- a/frontend/src/modules/custMgt/components/InsertChrgModal.vue
+++ b/frontend/src/modules/custMgt/components/InsertChrgModal.vue
@@ -17,11 +17,10 @@
-
| 충전월 |
-
+ |
|
+
+
+ |
-
+
| 충전금액 |
@@ -91,6 +109,28 @@
|
+
+ | 충전금액 |
+
+
+
+
+
+
+ |
+
diff --git a/src/main/java/kr/co/uplus/ez/api/comm/FileService.java b/src/main/java/kr/co/uplus/ez/api/comm/FileService.java
new file mode 100644
index 0000000..a67a3c3
--- /dev/null
+++ b/src/main/java/kr/co/uplus/ez/api/comm/FileService.java
@@ -0,0 +1,18 @@
+package kr.co.uplus.ez.api.comm;
+
+import java.nio.file.Path;
+import java.util.stream.Stream;
+
+import org.springframework.core.io.Resource;
+import org.springframework.web.multipart.MultipartFile;
+
+public interface FileService {
+
+ void init();
+ void store(MultipartFile file);
+ Stream loadAll();
+ Path load(String filename);
+ Resource loadAsResource(String filename);
+ void deleteAll();
+ void deleteFile(String filename);
+}
diff --git a/src/main/java/kr/co/uplus/ez/api/comm/FileServiceImpl.java b/src/main/java/kr/co/uplus/ez/api/comm/FileServiceImpl.java
new file mode 100644
index 0000000..728d8b9
--- /dev/null
+++ b/src/main/java/kr/co/uplus/ez/api/comm/FileServiceImpl.java
@@ -0,0 +1,105 @@
+package kr.co.uplus.ez.api.comm;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.stream.Stream;
+
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.UrlResource;
+import org.springframework.stereotype.Service;
+import org.springframework.util.FileSystemUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import kr.co.uplus.ez.api.comm.FileService;
+
+@Service
+public class FileServiceImpl implements FileService {
+ // @Value("${spring.servlet.multipart.location}")
+ private String uploadPath = "/efs/admin";
+
+ @Override
+ public void init() {
+ try {
+ Files.createDirectories(Paths.get(uploadPath));
+
+ } catch (IOException e) {
+ throw new RuntimeException("폴더 생성 실패");
+ }
+ }
+
+ @Override
+ public void store(MultipartFile file) {
+ try {
+ if (file.isEmpty()) {
+ throw new Exception("빈 파일입니다.");
+ }
+
+ Path root = Paths.get(uploadPath);
+
+ if (!Files.exists(root)) {
+ init();
+ }
+
+ try (InputStream inputStream = file.getInputStream()) {
+ Files.copy(inputStream, root.resolve(
+ file.getOriginalFilename()), StandardCopyOption.REPLACE_EXISTING
+ );
+
+ } catch (Exception e) {
+ throw new RuntimeException("파일을 저장할 수 없습니다. Error: " + e.getMessage());
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException("파일을 저장할 수 없습니다. Error: " + e.getMessage());
+ }
+ }
+
+ @Override
+ public Stream loadAll() {
+ try {
+ Path root = Paths.get(uploadPath);
+ return Files.walk(root, 1).filter(path -> !path.equals(root));
+
+ } catch (IOException e) {
+ throw new RuntimeException("파일 읽기 실패", e);
+ }
+ }
+
+ @Override
+ public Path load(String filename) {
+ return Paths.get(uploadPath).resolve(filename);
+ }
+
+ @Override
+ public Resource loadAsResource(String filename) {
+ try {
+ Path file = load(filename);
+ Resource resource = new UrlResource(file.toUri());
+
+ if (resource.exists() || resource.isReadable()) {
+ return resource;
+
+ } else {
+ throw new RuntimeException("파일을 읽을 수 없습니다. : " + filename);
+ }
+
+ } catch (MalformedURLException e) {
+ throw new RuntimeException("파일을 읽을 수 없습니다. : " + filename, e);
+ }
+ }
+
+ @Override
+ public void deleteAll() {
+ FileSystemUtils.deleteRecursively(Paths.get(uploadPath).toFile());
+ }
+
+ @Override
+ public void deleteFile(String filename) {
+ FileSystemUtils.deleteRecursively(Paths.get(uploadPath + "\\" + filename).toFile());
+ }
+}
diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
index da2218c..a09ba54 100644
--- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
+++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/ChrgDetail.java
@@ -27,4 +27,6 @@ public class ChrgDetail implements Serializable{
private String bizrNo;
@ApiModelProperty(example = "충전seq", name = "충전seq", dataType = "String")
private String chrgSeq;
+ @ApiModelProperty(example = "가입구분", name = "가입구분", dataType = "String")
+ private String joinDiv;
}
diff --git a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
index 7e587c9..be843cd 100644
--- a/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
+++ b/src/main/java/kr/co/uplus/ez/api/custMgt/dto/UserinInfo.java
@@ -19,5 +19,6 @@ public class UserinInfo implements Serializable{
private String userSttusCd;
@ApiModelProperty(example = "이용자 유형 코드", name = "이용자 유형 코드", dataType = "String")
private String userTpCd;
-
+ @ApiModelProperty(example = "가입구분", name = "가입구분", dataType = "String")
+ private String joinDiv;
}
diff --git a/src/main/java/kr/co/uplus/ez/api/sysMgt/SysMgtController.java b/src/main/java/kr/co/uplus/ez/api/sysMgt/SysMgtController.java
index a9ece02..70f0020 100644
--- a/src/main/java/kr/co/uplus/ez/api/sysMgt/SysMgtController.java
+++ b/src/main/java/kr/co/uplus/ez/api/sysMgt/SysMgtController.java
@@ -14,6 +14,7 @@ import kr.co.uplus.ez.common.components.ValidComponents;
import kr.co.uplus.ez.common.components.WebClientRequestService;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Const;
+import springfox.documentation.spring.web.json.Json;
import org.apache.http.HttpStatus;
import org.apache.http.protocol.HTTP;
@@ -274,8 +275,8 @@ public class SysMgtController {
/**
* data: 2022. 10.24.
- * auth: Lee minha
- * desc: 배치 리스트 조회
+ * auth: Lee
+ * desc: 배치 리스트 조회.
* @return
*/
@ApiOperation(value = "batchList", notes = "배치 리스트 조회")
@@ -286,12 +287,11 @@ public class SysMgtController {
}
/**
- * data : 2022. 10. 26
- * auth : Lee minha
- * desc : 배치 상세내용
+ * date : 2022. 10. 26
+ * auth : Lee
+ * desc : 배치 상세내용.
* @return
*/
-
@ApiOperation(value = "batchDetail", notes = "배치 상세내용")
@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
@RequestMapping(value = "batchDetail", method = {RequestMethod.POST})
@@ -299,16 +299,21 @@ public class SysMgtController {
public BatchDetailResDto batchDetail(@RequestBody @Valid BatchDetailReqDto batchDetailReqDto,
BindingResult bindingResult) {
+
if (validComponents.validParameter(bindingResult)) {
return new BatchDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
}
-// batchDetailReqDto.setBatchId("BATCH_010");
- logger.debug("param 확인 : "+ batchDetailReqDto);
return sysService.batchDetail(batchDetailReqDto);
}
+ /**
+ * date : 2022. 10. 26
+ * auth : Lee
+ * @param batchReqMap
+ * @return
+ */
@RequestMapping(value = "batchExecuteJob", method = {RequestMethod.POST})
@ResponseBody
public BatchExeLogResDto batchExecuteJob(@RequestBody @Valid Map