feat/dean/test2_temp #102
@@ -279,8 +279,9 @@ public class FIleChecker {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//kamco-nfs를 확인하는곳이 있어서 파라미터 추가 사용용도확인후 처리
|
// kamco-nfs를 확인하는곳이 있어서 파라미터 추가 사용용도확인후 처리
|
||||||
public static List<Folder> getFolderAll(String dirPath, String sortType, int maxDepth,String nfsRootDir) {
|
public static List<Folder> getFolderAll(
|
||||||
|
String dirPath, String sortType, int maxDepth, String nfsRootDir) {
|
||||||
|
|
||||||
Path startPath = Paths.get(dirPath);
|
Path startPath = Paths.get(dirPath);
|
||||||
|
|
||||||
@@ -309,9 +310,10 @@ public class FIleChecker {
|
|||||||
String parentPath = path.getParent().toString();
|
String parentPath = path.getParent().toString();
|
||||||
String fullPath = path.toAbsolutePath().toString();
|
String fullPath = path.toAbsolutePath().toString();
|
||||||
|
|
||||||
//이것이 필요한건가?
|
// 이것이 필요한건가?
|
||||||
// boolean isShowHide =
|
// boolean isShowHide =
|
||||||
// !parentFolderNm.equals("kamco-nfs"); // 폴더 리스트에 kamco-nfs 하위만 나오도록 처리
|
// !parentFolderNm.equals("kamco-nfs"); // 폴더 리스트에
|
||||||
|
// kamco-nfs 하위만 나오도록 처리
|
||||||
boolean isShowHide =
|
boolean isShowHide =
|
||||||
!parentFolderNm.equals(nfsRootDir); // 폴더 리스트에 nfsRootDir 하위만 나오도록 처리
|
!parentFolderNm.equals(nfsRootDir); // 폴더 리스트에 nfsRootDir 하위만 나오도록 처리
|
||||||
File file = new File(fullPath);
|
File file = new File(fullPath);
|
||||||
@@ -361,8 +363,8 @@ public class FIleChecker {
|
|||||||
return folderList;
|
return folderList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Folder> getFolderAll(String dirPath,String nfsRootDir) {
|
public static List<Folder> getFolderAll(String dirPath, String nfsRootDir) {
|
||||||
return getFolderAll(dirPath, "name", 1,nfsRootDir);
|
return getFolderAll(dirPath, "name", 1, nfsRootDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getChildFolderCount(File directory) {
|
public static int getChildFolderCount(File directory) {
|
||||||
|
|||||||
@@ -69,13 +69,12 @@ public class GukYuinApiService {
|
|||||||
@Value("${file.nfs}")
|
@Value("${file.nfs}")
|
||||||
private String nfs;
|
private String nfs;
|
||||||
|
|
||||||
// @Value("${file.dataset-dir}")
|
// @Value("${file.dataset-dir}")
|
||||||
// private String datasetDir;
|
// private String datasetDir;
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public ChngDetectMastDto.RegistResDto regist(
|
public ChngDetectMastDto.RegistResDto regist(
|
||||||
ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||||
|
|
||||||
String url = gukyuinCdiUrl + "/chn/mast/regist";
|
String url = gukyuinCdiUrl + "/chn/mast/regist";
|
||||||
|
|
||||||
@@ -83,12 +82,12 @@ public class GukYuinApiService {
|
|||||||
chnDetectMastReq.setReqEpno(userUtil.getEmployeeNo());
|
chnDetectMastReq.setReqEpno(userUtil.getEmployeeNo());
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.RegistResDto> result =
|
ExternalCallResult<ChngDetectMastDto.RegistResDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.POST,
|
HttpMethod.POST,
|
||||||
chnDetectMastReq,
|
chnDetectMastReq,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectMastDto.RegistResDto.class);
|
ChngDetectMastDto.RegistResDto.class);
|
||||||
|
|
||||||
ChngDetectMastDto.RegistResDto resultBody = result.body();
|
ChngDetectMastDto.RegistResDto resultBody = result.body();
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
@@ -116,27 +115,27 @@ public class GukYuinApiService {
|
|||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
log.error("에러 응답 파싱 실패. rawBody={}", errBody, e);
|
log.error("에러 응답 파싱 실패. rawBody={}", errBody, e);
|
||||||
return new ChngDetectMastDto.RegistResDto(
|
return new ChngDetectMastDto.RegistResDto(
|
||||||
result.statusCode(), // HTTP status
|
result.statusCode(), // HTTP status
|
||||||
errBody, // 원문 그대로
|
errBody, // 원문 그대로
|
||||||
null,
|
null,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.ADDED.getId(),
|
EventType.ADDED.getId(),
|
||||||
myip,
|
myip,
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
chnDetectMastReq,
|
chnDetectMastReq,
|
||||||
success);
|
success);
|
||||||
|
|
||||||
return resultBody;
|
return resultBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public ChngDetectMastDto.RemoveResDto remove(
|
public ChngDetectMastDto.RemoveResDto remove(
|
||||||
ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
ChngDetectMastDto.ChnDetectMastReqDto chnDetectMastReq) {
|
||||||
String url = gukyuinCdiUrl + "/chn/mast/remove";
|
String url = gukyuinCdiUrl + "/chn/mast/remove";
|
||||||
|
|
||||||
chnDetectMastReq.setReqIp(myip);
|
chnDetectMastReq.setReqIp(myip);
|
||||||
@@ -144,12 +143,12 @@ public class GukYuinApiService {
|
|||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
ExternalCallResult<ChngDetectMastDto.RemoveResDto> result =
|
ExternalCallResult<ChngDetectMastDto.RemoveResDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.POST,
|
HttpMethod.POST,
|
||||||
chnDetectMastReq,
|
chnDetectMastReq,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectMastDto.RemoveResDto.class);
|
ChngDetectMastDto.RemoveResDto.class);
|
||||||
|
|
||||||
ChngDetectMastDto.RemoveResDto resultBody = result.body();
|
ChngDetectMastDto.RemoveResDto resultBody = result.body();
|
||||||
if (resultBody != null && resultBody.getSuccess() != null) {
|
if (resultBody != null && resultBody.getSuccess() != null) {
|
||||||
@@ -161,12 +160,12 @@ public class GukYuinApiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.REMOVE.getId(),
|
EventType.REMOVE.getId(),
|
||||||
myip,
|
myip,
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
chnDetectMastReq,
|
chnDetectMastReq,
|
||||||
success);
|
success);
|
||||||
|
|
||||||
return resultBody;
|
return resultBody;
|
||||||
}
|
}
|
||||||
@@ -175,52 +174,52 @@ public class GukYuinApiService {
|
|||||||
public ChngDetectMastDto.ResultDto detail(String chnDtctMstId) {
|
public ChngDetectMastDto.ResultDto detail(String chnDtctMstId) {
|
||||||
|
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/mast/list/"
|
+ "/chn/mast/list/"
|
||||||
+ chnDtctMstId
|
+ chnDtctMstId
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 등록목록 비교년도,기준년도,차수 조합해서 n개 확인
|
// 등록목록 비교년도,기준년도,차수 조합해서 n개 확인
|
||||||
public ChngDetectMastDto.ResultDto listYearStage(
|
public ChngDetectMastDto.ResultDto listYearStage(
|
||||||
ChngDetectMastDto.ChngDetectMastSearchDto searchDto) {
|
ChngDetectMastDto.ChngDetectMastSearchDto searchDto) {
|
||||||
String queryString = netUtils.dtoToQueryString(searchDto, null);
|
String queryString = netUtils.dtoToQueryString(searchDto, null);
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/mast"
|
+ "/chn/mast"
|
||||||
+ queryString
|
+ queryString
|
||||||
+ "&reqIp="
|
+ "&reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.LIST.getId(),
|
EventType.LIST.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,82 +263,82 @@ public class GukYuinApiService {
|
|||||||
|
|
||||||
// 탐지객체 리스트 조회
|
// 탐지객체 리스트 조회
|
||||||
public ResultContDto findChnContList(
|
public ResultContDto findChnContList(
|
||||||
String chnDtctId, Integer pageIndex, Integer pageSize, String batchYn) {
|
String chnDtctId, Integer pageIndex, Integer pageSize, String batchYn) {
|
||||||
|
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/cont/"
|
+ "/chn/cont/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "?pageIndex="
|
+ "?pageIndex="
|
||||||
+ pageIndex
|
+ pageIndex
|
||||||
+ "&pageSize="
|
+ "&pageSize="
|
||||||
+ pageSize
|
+ pageSize
|
||||||
+ "&reqIp="
|
+ "&reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultContDto.class);
|
ChngDetectContDto.ResultContDto.class);
|
||||||
|
|
||||||
List<ContBasic> contList = result.body().getResult();
|
List<ContBasic> contList = result.body().getResult();
|
||||||
if (contList == null || contList.isEmpty()) {
|
if (contList == null || contList.isEmpty()) {
|
||||||
return new ResultContDto(
|
return new ResultContDto(
|
||||||
result.body().getCode(),
|
result.body().getCode(),
|
||||||
result.body().getMessage(),
|
result.body().getMessage(),
|
||||||
result.body().getResult(),
|
result.body().getResult(),
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.LIST.getId(),
|
EventType.LIST.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
|
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultPnuDto findPnuObjMgmtList(String chnDtctId, String chnDtctObjtId) {
|
public ResultPnuDto findPnuObjMgmtList(String chnDtctId, String chnDtctObjtId) {
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/pnu/"
|
+ "/chn/pnu/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "/objt/"
|
+ "/objt/"
|
||||||
+ chnDtctObjtId
|
+ chnDtctObjtId
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectContDto.ResultPnuDto> result =
|
ExternalCallResult<ChngDetectContDto.ResultPnuDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultPnuDto.class);
|
ChngDetectContDto.ResultPnuDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
|
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChngDetectContDto.ResultLabelDto updateChnDtctObjtLabelingYn(
|
public ChngDetectContDto.ResultLabelDto updateChnDtctObjtLabelingYn(
|
||||||
String chnDtctObjtId, String lblYn, String batchYn) {
|
String chnDtctObjtId, String lblYn, String batchYn) {
|
||||||
String url = gukyuinCdiUrl + "/rlb/objt/" + chnDtctObjtId + "/lbl/" + lblYn;
|
String url = gukyuinCdiUrl + "/rlb/objt/" + chnDtctObjtId + "/lbl/" + lblYn;
|
||||||
|
|
||||||
ReqInfo info = new ReqInfo();
|
ReqInfo info = new ReqInfo();
|
||||||
@@ -347,20 +346,20 @@ public class GukYuinApiService {
|
|||||||
info.setReqEpno("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
info.setReqEpno("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectContDto.ResultLabelDto> result =
|
ExternalCallResult<ChngDetectContDto.ResultLabelDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.POST,
|
HttpMethod.POST,
|
||||||
info,
|
info,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultLabelDto.class);
|
ChngDetectContDto.ResultLabelDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.MODIFIED.getId(),
|
EventType.MODIFIED.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
|
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
@@ -368,80 +367,80 @@ public class GukYuinApiService {
|
|||||||
public ResultContDto findChnPnuToContList(String chnDtctId, String pnu) {
|
public ResultContDto findChnPnuToContList(String chnDtctId, String pnu) {
|
||||||
|
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/cont/"
|
+ "/chn/cont/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "/pnu/"
|
+ "/pnu/"
|
||||||
+ pnu
|
+ pnu
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultContDto.class);
|
ChngDetectContDto.ResultContDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.LIST.getId(),
|
EventType.LIST.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultDto listChnDtctId(String chnDtctId, String batchYn) {
|
public ResultDto listChnDtctId(String chnDtctId, String batchYn) {
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/mast/"
|
+ "/chn/mast/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo());
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
ExternalCallResult<ChngDetectMastDto.ResultDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.ResultDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body().getSuccess());
|
result.body().getSuccess());
|
||||||
|
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
|
||||||
public void insertGukyuinAuditLog(
|
public void insertGukyuinAuditLog(
|
||||||
String actionType,
|
String actionType,
|
||||||
String myIp,
|
String myIp,
|
||||||
Long userUid,
|
Long userUid,
|
||||||
String requestUri,
|
String requestUri,
|
||||||
Object requestBody,
|
Object requestBody,
|
||||||
boolean successFail) {
|
boolean successFail) {
|
||||||
try {
|
try {
|
||||||
AuditLogEntity log =
|
AuditLogEntity log =
|
||||||
new AuditLogEntity(
|
new AuditLogEntity(
|
||||||
userUid,
|
userUid,
|
||||||
EventType.fromName(actionType),
|
EventType.fromName(actionType),
|
||||||
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
successFail ? EventStatus.SUCCESS : EventStatus.FAILED,
|
||||||
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
"GUKYUIN", // 메뉴도 국유인으로 하나 따기
|
||||||
myIp,
|
myIp,
|
||||||
requestUri,
|
requestUri,
|
||||||
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
requestBody == null ? null : ApiLogFunction.cutRequestBody(requestBody.toString()),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
auditLogRepository.save(log);
|
auditLogRepository.save(log);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -457,16 +456,17 @@ public class GukYuinApiService {
|
|||||||
return new ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 국유인 연동을 한 회차입니다.");
|
return new ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 국유인 연동을 한 회차입니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// String kamconfsDatasetExportPathfsDatasetExportPath = "/kamco-nfs/dataset/export/";
|
// String kamconfsDatasetExportPathfsDatasetExportPath = "/kamco-nfs/dataset/export/";
|
||||||
String kamconfsDatasetExportPathfsDatasetExportPath = String.format("%s%s", nfs, "/dataset/export/");
|
String kamconfsDatasetExportPathfsDatasetExportPath =
|
||||||
|
String.format("%s%s", nfs, "/dataset/export/");
|
||||||
if (!Files.isDirectory(Path.of(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid()))) {
|
if (!Files.isDirectory(Path.of(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid()))) {
|
||||||
return new ResponseObj(
|
return new ResponseObj(
|
||||||
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 비교년도,기준년도로 전송한 데이터 있는지 확인 후 회차 번호 생성
|
// 비교년도,기준년도로 전송한 데이터 있는지 확인 후 회차 번호 생성
|
||||||
Integer maxStage =
|
Integer maxStage =
|
||||||
gukyuinCoreService.findMapSheetLearnYearStage(info.getCompareYyyy(), info.getTargetYyyy());
|
gukyuinCoreService.findMapSheetLearnYearStage(info.getCompareYyyy(), info.getTargetYyyy());
|
||||||
|
|
||||||
// reqDto 셋팅
|
// reqDto 셋팅
|
||||||
ChnDetectMastReqDto reqDto = new ChnDetectMastReqDto();
|
ChnDetectMastReqDto reqDto = new ChnDetectMastReqDto();
|
||||||
@@ -480,8 +480,8 @@ public class GukYuinApiService {
|
|||||||
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리
|
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리
|
||||||
if (maxStage > 0) {
|
if (maxStage > 0) {
|
||||||
Long learnId =
|
Long learnId =
|
||||||
gukyuinCoreService.findMapSheetLearnInfoByYyyy(
|
gukyuinCoreService.findMapSheetLearnInfoByYyyy(
|
||||||
info.getCompareYyyy(), info.getTargetYyyy(), maxStage);
|
info.getCompareYyyy(), info.getTargetYyyy(), maxStage);
|
||||||
gukyuinCoreService.updateMapSheetLearnGukyuinEndStatus(learnId);
|
gukyuinCoreService.updateMapSheetLearnGukyuinEndStatus(learnId);
|
||||||
gukyuinCoreService.updateMapSheetInferenceLabelEndStatus(learnId);
|
gukyuinCoreService.updateMapSheetInferenceLabelEndStatus(learnId);
|
||||||
}
|
}
|
||||||
@@ -500,90 +500,90 @@ public class GukYuinApiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ResultContDto findChnPnuToContObject(
|
public ResultContDto findChnPnuToContObject(
|
||||||
String chnDtctId, String chnDtctObjtId, Integer pageIndex, Integer pageSize) {
|
String chnDtctId, String chnDtctObjtId, Integer pageIndex, Integer pageSize) {
|
||||||
|
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/chn/cont/"
|
+ "/chn/cont/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "/chnDtctObjtId/"
|
+ "/chnDtctObjtId/"
|
||||||
+ chnDtctObjtId
|
+ chnDtctObjtId
|
||||||
+ "?pageIndex="
|
+ "?pageIndex="
|
||||||
+ pageIndex
|
+ pageIndex
|
||||||
+ "&pageSize="
|
+ "&pageSize="
|
||||||
+ pageSize
|
+ pageSize
|
||||||
+ "&reqIp="
|
+ "&reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
ExternalCallResult<ChngDetectContDto.ResultContDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url,
|
url,
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
netUtils.jsonHeaders(),
|
netUtils.jsonHeaders(),
|
||||||
ChngDetectContDto.ResultContDto.class);
|
ChngDetectContDto.ResultContDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body() != null && result.body().getSuccess());
|
result.body() != null && result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChngDetectMastDto.RlbDtctDto findRlbDtctList(
|
public ChngDetectMastDto.RlbDtctDto findRlbDtctList(
|
||||||
String chnDtctId, String yyyymmdd, String batchYn) {
|
String chnDtctId, String yyyymmdd, String batchYn) {
|
||||||
|
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/rlb/dtct/"
|
+ "/rlb/dtct/"
|
||||||
+ chnDtctId
|
+ chnDtctId
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo())
|
+ ("Y".equals(batchYn) ? "BATCH" : userUtil.getEmployeeNo())
|
||||||
+ "&yyyymmdd="
|
+ "&yyyymmdd="
|
||||||
+ yyyymmdd;
|
+ yyyymmdd;
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.RlbDtctDto> result =
|
ExternalCallResult<ChngDetectMastDto.RlbDtctDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class);
|
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.LIST.getId(),
|
EventType.LIST.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body() != null && result.body().getSuccess());
|
result.body() != null && result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RlbDtctDto findRlbDtctObject(String chnDtctObjtId) {
|
public RlbDtctDto findRlbDtctObject(String chnDtctObjtId) {
|
||||||
String url =
|
String url =
|
||||||
gukyuinCdiUrl
|
gukyuinCdiUrl
|
||||||
+ "/rlb/objt/"
|
+ "/rlb/objt/"
|
||||||
+ chnDtctObjtId
|
+ chnDtctObjtId
|
||||||
+ "?reqIp="
|
+ "?reqIp="
|
||||||
+ myip
|
+ myip
|
||||||
+ "&reqEpno="
|
+ "&reqEpno="
|
||||||
+ userUtil.getEmployeeNo();
|
+ userUtil.getEmployeeNo();
|
||||||
|
|
||||||
ExternalCallResult<ChngDetectMastDto.RlbDtctDto> result =
|
ExternalCallResult<ChngDetectMastDto.RlbDtctDto> result =
|
||||||
externalHttpClient.call(
|
externalHttpClient.call(
|
||||||
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class);
|
url, HttpMethod.GET, null, netUtils.jsonHeaders(), ChngDetectMastDto.RlbDtctDto.class);
|
||||||
|
|
||||||
this.insertGukyuinAuditLog(
|
this.insertGukyuinAuditLog(
|
||||||
EventType.DETAIL.getId(),
|
EventType.DETAIL.getId(),
|
||||||
netUtils.getLocalIP(),
|
netUtils.getLocalIP(),
|
||||||
userUtil.getId(),
|
userUtil.getId(),
|
||||||
url.replace(gukyuinUrl, ""),
|
url.replace(gukyuinUrl, ""),
|
||||||
null,
|
null,
|
||||||
result.body() != null && result.body().getSuccess());
|
result.body() != null && result.body().getSuccess());
|
||||||
return result.body();
|
return result.body();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import lombok.Setter;
|
|||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/** AI API 추론 실행 DTO */
|
||||||
* AI API 추론 실행 DTO
|
|
||||||
*/
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -27,7 +25,6 @@ public class InferenceSendDto {
|
|||||||
private String cd_model_type;
|
private String cd_model_type;
|
||||||
private Double priority;
|
private Double priority;
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -39,7 +36,5 @@ public class InferenceSendDto {
|
|||||||
private Integer input2_year;
|
private Integer input2_year;
|
||||||
private String input1_scene_path;
|
private String input1_scene_path;
|
||||||
private String input2_scene_path;
|
private String input2_scene_path;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -470,13 +470,15 @@ public class InferenceResultService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2) local 환경 임시 처리
|
// 2) local 환경 임시 처리
|
||||||
// if ("local".equals(profile)) {
|
// if ("local".equals(profile)) {
|
||||||
// if (dto.getPred_requests_areas() == null) {
|
// if (dto.getPred_requests_areas() == null) {
|
||||||
// throw new IllegalStateException("pred_requests_areas is null");
|
// throw new IllegalStateException("pred_requests_areas is null");
|
||||||
// }
|
// }
|
||||||
// dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
//
|
||||||
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
// dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
||||||
// }
|
//
|
||||||
|
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
||||||
|
// }
|
||||||
|
|
||||||
// 3) HTTP 호출
|
// 3) HTTP 호출
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public class MapSheetMngService {
|
|||||||
private final UploadService uploadService;
|
private final UploadService uploadService;
|
||||||
private final UserUtil userUtil = new UserUtil();
|
private final UserUtil userUtil = new UserUtil();
|
||||||
|
|
||||||
|
|
||||||
@Value("${file.root}")
|
@Value("${file.root}")
|
||||||
private String nfsRootDir;
|
private String nfsRootDir;
|
||||||
|
|
||||||
@@ -74,8 +73,8 @@ public class MapSheetMngService {
|
|||||||
// List조회
|
// List조회
|
||||||
Page<YearEntity> years = mapSheetMngCoreService.getListMapListYYYYWithPaging(req);
|
Page<YearEntity> years = mapSheetMngCoreService.getListMapListYYYYWithPaging(req);
|
||||||
return years.map(YearEntity::getYyyy).getContent().stream()
|
return years.map(YearEntity::getYyyy).getContent().stream()
|
||||||
.sorted(Comparator.reverseOrder())
|
.sorted(Comparator.reverseOrder())
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MngDto findMapSheetMng(int mngYyyy) {
|
public MngDto findMapSheetMng(int mngYyyy) {
|
||||||
@@ -113,7 +112,7 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public DmlReturn uploadPair(
|
public DmlReturn uploadPair(
|
||||||
MultipartFile tfwFile, String tifFile, Long hstUid, Long tifFileSize) {
|
MultipartFile tfwFile, String tifFile, Long hstUid, Long tifFileSize) {
|
||||||
|
|
||||||
String tmpPath = syncTmpDir;
|
String tmpPath = syncTmpDir;
|
||||||
|
|
||||||
@@ -136,7 +135,7 @@ public class MapSheetMngService {
|
|||||||
return dmlReturn;
|
return dmlReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO 삭제?
|
// TODO 삭제?
|
||||||
MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy());
|
MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy());
|
||||||
|
|
||||||
// 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음
|
// 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음
|
||||||
@@ -183,27 +182,27 @@ public class MapSheetMngService {
|
|||||||
// 파일이 존재하지 않을 경우(0개) 해당년도 다른 파일경로로 참조
|
// 파일이 존재하지 않을 경우(0개) 해당년도 다른 파일경로로 참조
|
||||||
if (uploadPath.isEmpty()) {
|
if (uploadPath.isEmpty()) {
|
||||||
MngFilesDto filesDto =
|
MngFilesDto filesDto =
|
||||||
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
||||||
String referPath = filesDto.getFilePath();
|
String referPath = filesDto.getFilePath();
|
||||||
Path path = Paths.get(referPath);
|
Path path = Paths.get(referPath);
|
||||||
boolean isFiveDigitNumber =
|
boolean isFiveDigitNumber =
|
||||||
path.getFileName() != null && path.getFileName().toString().matches("\\d{5}");
|
path.getFileName() != null && path.getFileName().toString().matches("\\d{5}");
|
||||||
|
|
||||||
log.info("isFiveDigitNumber : " + isFiveDigitNumber);
|
log.info("isFiveDigitNumber : " + isFiveDigitNumber);
|
||||||
if (isFiveDigitNumber) {
|
if (isFiveDigitNumber) {
|
||||||
uploadPath =
|
uploadPath =
|
||||||
Paths.get(referPath).getParent().toString()
|
Paths.get(referPath).getParent().toString()
|
||||||
+ "/"
|
+ "/"
|
||||||
+ errDto.getRefMapSheetNum()
|
+ errDto.getRefMapSheetNum()
|
||||||
+ "/"
|
+ "/"
|
||||||
+ errDto.getUuid();
|
+ errDto.getUuid();
|
||||||
} else {
|
} else {
|
||||||
uploadPath =
|
uploadPath =
|
||||||
Paths.get(referPath).getParent().getParent().toString()
|
Paths.get(referPath).getParent().getParent().toString()
|
||||||
+ "/"
|
+ "/"
|
||||||
+ errDto.getRefMapSheetNum()
|
+ errDto.getRefMapSheetNum()
|
||||||
+ "/"
|
+ "/"
|
||||||
+ errDto.getUuid();
|
+ errDto.getUuid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +229,7 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
// hst업데이트
|
// hst업데이트
|
||||||
MapSheetMngDto.SyncCheckStateReqUpdateDto updReqSyncCheckState =
|
MapSheetMngDto.SyncCheckStateReqUpdateDto updReqSyncCheckState =
|
||||||
new MapSheetMngDto.SyncCheckStateReqUpdateDto();
|
new MapSheetMngDto.SyncCheckStateReqUpdateDto();
|
||||||
updReqSyncCheckState.setHstUid(hstUid);
|
updReqSyncCheckState.setHstUid(hstUid);
|
||||||
updReqSyncCheckState.setFilePath(uploadPath);
|
updReqSyncCheckState.setFilePath(uploadPath);
|
||||||
updReqSyncCheckState.setSyncCheckTfwFileName(tfwFile.getOriginalFilename());
|
updReqSyncCheckState.setSyncCheckTfwFileName(tfwFile.getOriginalFilename());
|
||||||
@@ -277,7 +276,7 @@ public class MapSheetMngService {
|
|||||||
DmlReturn dmlReturn = new DmlReturn("success", "정상처리되었습니다.");
|
DmlReturn dmlReturn = new DmlReturn("success", "정상처리되었습니다.");
|
||||||
|
|
||||||
MapSheetMngDto.SyncCheckStateReqUpdateDto reqDto =
|
MapSheetMngDto.SyncCheckStateReqUpdateDto reqDto =
|
||||||
new MapSheetMngDto.SyncCheckStateReqUpdateDto();
|
new MapSheetMngDto.SyncCheckStateReqUpdateDto();
|
||||||
|
|
||||||
for (Long uid : fileUids) {
|
for (Long uid : fileUids) {
|
||||||
MapSheetMngDto.MngFilesDto dto = mapSheetMngCoreService.findByFileUidMapSheetFile(uid);
|
MapSheetMngDto.MngFilesDto dto = mapSheetMngCoreService.findByFileUidMapSheetFile(uid);
|
||||||
@@ -344,13 +343,13 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
log.info("[FIND_FOLDER] DIR : {}", dirPath);
|
log.info("[FIND_FOLDER] DIR : {}", dirPath);
|
||||||
List<FIleChecker.Folder> folderList =
|
List<FIleChecker.Folder> folderList =
|
||||||
FIleChecker.getFolderAll(dirPath, nfsRootDir).stream()
|
FIleChecker.getFolderAll(dirPath, nfsRootDir).stream()
|
||||||
.filter(dir -> dir.getIsValid().equals(true))
|
.filter(dir -> dir.getIsValid().equals(true))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
int folderTotCnt = folderList.size();
|
int folderTotCnt = folderList.size();
|
||||||
int folderErrTotCnt =
|
int folderErrTotCnt =
|
||||||
(int) folderList.stream().filter(dto -> dto.getIsValid().equals(false)).count();
|
(int) folderList.stream().filter(dto -> dto.getIsValid().equals(false)).count();
|
||||||
|
|
||||||
return new FoldersDto(dirPath, folderTotCnt, folderErrTotCnt, folderList);
|
return new FoldersDto(dirPath, folderTotCnt, folderErrTotCnt, folderList);
|
||||||
}
|
}
|
||||||
@@ -362,14 +361,14 @@ public class MapSheetMngService {
|
|||||||
int endPos = srchDto.getEndPos();
|
int endPos = srchDto.getEndPos();
|
||||||
|
|
||||||
List<FIleChecker.Basic> files =
|
List<FIleChecker.Basic> files =
|
||||||
FIleChecker.getFilesFromAllDepth(
|
FIleChecker.getFilesFromAllDepth(
|
||||||
srchDto.getDirPath(),
|
srchDto.getDirPath(),
|
||||||
"*",
|
"*",
|
||||||
srchDto.getExtension(),
|
srchDto.getExtension(),
|
||||||
1,
|
1,
|
||||||
srchDto.getSortType(),
|
srchDto.getSortType(),
|
||||||
startPos,
|
startPos,
|
||||||
endPos);
|
endPos);
|
||||||
|
|
||||||
int fileListPos = 0;
|
int fileListPos = 0;
|
||||||
int fileTotCnt = files.size();
|
int fileTotCnt = files.size();
|
||||||
@@ -386,18 +385,18 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
||||||
List<MngYyyyDto> yearList =
|
List<MngYyyyDto> yearList =
|
||||||
mngList.stream()
|
mngList.stream()
|
||||||
.filter(
|
.filter(
|
||||||
dto -> "DONE".equals(dto.getMngState()) || "TAKINGERROR".equals(dto.getMngState()))
|
dto -> "DONE".equals(dto.getMngState()) || "TAKINGERROR".equals(dto.getMngState()))
|
||||||
.map(dto -> new MngYyyyDto(dto.getMngYyyy(), dto.getMngPath()))
|
.map(dto -> new MngYyyyDto(dto.getMngYyyy(), dto.getMngPath()))
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return yearList;
|
return yearList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public ModelUploadResDto uploadChunkMapSheetFile(
|
public ModelUploadResDto uploadChunkMapSheetFile(
|
||||||
Long hstUid, UploadAddReq upAddReqDto, MultipartFile chunkFile) throws IOException {
|
Long hstUid, UploadAddReq upAddReqDto, MultipartFile chunkFile) throws IOException {
|
||||||
|
|
||||||
ErrorDataDto errDto = mapSheetMngCoreService.findMapSheetError(hstUid);
|
ErrorDataDto errDto = mapSheetMngCoreService.findMapSheetError(hstUid);
|
||||||
|
|
||||||
@@ -411,20 +410,20 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
if (uploadPath.isEmpty()) {
|
if (uploadPath.isEmpty()) {
|
||||||
MngFilesDto filesDto =
|
MngFilesDto filesDto =
|
||||||
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
mapSheetMngCoreService.findYyyyToMapSheetFilePathRefer(errDto.getMngYyyy());
|
||||||
String referPath = filesDto.getFilePath();
|
String referPath = filesDto.getFilePath();
|
||||||
Path path = Paths.get(referPath);
|
Path path = Paths.get(referPath);
|
||||||
boolean isFiveDigitNumber =
|
boolean isFiveDigitNumber =
|
||||||
path.getFileName() != null && path.getFileName().toString().matches("\\d{5}");
|
path.getFileName() != null && path.getFileName().toString().matches("\\d{5}");
|
||||||
|
|
||||||
log.info("isFiveDigitNumber : " + isFiveDigitNumber);
|
log.info("isFiveDigitNumber : " + isFiveDigitNumber);
|
||||||
if (isFiveDigitNumber) {
|
if (isFiveDigitNumber) {
|
||||||
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
|
uploadPath = Paths.get(referPath).getParent().toString() + "/" + errDto.getRefMapSheetNum();
|
||||||
} else {
|
} else {
|
||||||
uploadPath =
|
uploadPath =
|
||||||
Paths.get(referPath).getParent().getParent().toString()
|
Paths.get(referPath).getParent().getParent().toString()
|
||||||
+ "/"
|
+ "/"
|
||||||
+ errDto.getRefMapSheetNum();
|
+ errDto.getRefMapSheetNum();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,7 +446,7 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
// upload_id, uuid 를 update
|
// upload_id, uuid 를 update
|
||||||
mapSheetMngCoreService.updateMapSheetMngHstUploadId(
|
mapSheetMngCoreService.updateMapSheetMngHstUploadId(
|
||||||
hstUid, upAddReqDto.getUuid(), upRes.getUploadId());
|
hstUid, upAddReqDto.getUuid(), upRes.getUploadId());
|
||||||
}
|
}
|
||||||
|
|
||||||
modelUploadResDto.setRes(upRes.getRes());
|
modelUploadResDto.setRes(upRes.getRes());
|
||||||
|
|||||||
@@ -389,13 +389,15 @@ public class MapSheetInferenceJobService {
|
|||||||
log.info("========================================================");
|
log.info("========================================================");
|
||||||
log.info("");
|
log.info("");
|
||||||
// 2) local 환경 임시 처리
|
// 2) local 환경 임시 처리
|
||||||
// if ("local".equals(profile)) {
|
// if ("local".equals(profile)) {
|
||||||
// if (dto.getPred_requests_areas() == null) {
|
// if (dto.getPred_requests_areas() == null) {
|
||||||
// throw new IllegalStateException("pred_requests_areas is null");
|
// throw new IllegalStateException("pred_requests_areas is null");
|
||||||
// }
|
// }
|
||||||
// dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
//
|
||||||
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
// dto.getPred_requests_areas().setInput1_scene_path("/kamco-nfs/requests/2023_local.geojson");
|
||||||
// }
|
//
|
||||||
|
// dto.getPred_requests_areas().setInput2_scene_path("/kamco-nfs/requests/2024_local.geojson");
|
||||||
|
// }
|
||||||
|
|
||||||
// 3) HTTP 호출
|
// 3) HTTP 호출
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|||||||
Reference in New Issue
Block a user