|
|
|
|
@ -134,8 +134,14 @@ public void run() {
|
|
|
|
|
mapDic.put("7", "1");
|
|
|
|
|
mapDic.put("8", "1");
|
|
|
|
|
this.logger.debug("============================= Z : " + mapDic.get(dirc));
|
|
|
|
|
mapDefault.put("image_path_desc", String.format("/data2/DOTR/%s/0%s/IMAGE/", new Object[] { strarr[0], tennel }));
|
|
|
|
|
mapDefault.put("image_path_desc_center", String.format(" /images/ANPRImage/cfs/%s/0%s/%s/", new Object[] { strarr[0].substring(0, 4), tennel, strarr[0] }));
|
|
|
|
|
|
|
|
|
|
mapDefault.put(
|
|
|
|
|
"image_path_desc_center",
|
|
|
|
|
String.format(
|
|
|
|
|
" /images/ANPRImage/cfs/%s/0%s/%s/",
|
|
|
|
|
new Object[] { strarr[0].substring(0, 4), tennel, strarr[0] }
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
mapDefault.put("work_times", strarr[1]);
|
|
|
|
|
mapDefault.put("seqno", strarr[2]);
|
|
|
|
|
int n = Integer.parseInt(strarr[2].substring(6, 8));
|
|
|
|
|
@ -171,9 +177,8 @@ public void run() {
|
|
|
|
|
|
|
|
|
|
StringBuilder pathOrg = new StringBuilder();
|
|
|
|
|
pathOrg.append(this.g_strFTP[0]);
|
|
|
|
|
|
|
|
|
|
StringBuilder path = new StringBuilder();
|
|
|
|
|
path.append(this.g_strFTP[5]);
|
|
|
|
|
path.append("/");
|
|
|
|
|
path.append(strarr[0].substring(0, 4));
|
|
|
|
|
path.append("/");
|
|
|
|
|
path.append(strarr[0].substring(4, 6));
|
|
|
|
|
@ -205,15 +210,31 @@ public void run() {
|
|
|
|
|
strbuf.append(strarr[2]);
|
|
|
|
|
strbuf.append(".jpg");
|
|
|
|
|
mapDefault.put("image_file_new2",
|
|
|
|
|
String.format("0%s%s%s%sS.JPG", new Object[] { tennel, line, strarr[0], strarr[1].substring(0, 6) }));
|
|
|
|
|
String.format(
|
|
|
|
|
"0%s%s%s%sS.JPG",
|
|
|
|
|
new Object[] { tennel, line, strarr[0], strarr[1].substring(0, 6) }
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
mapDefault.put("image_path", pathOrg.toString());
|
|
|
|
|
mapDefault.put("image_file", strOrgFile);
|
|
|
|
|
|
|
|
|
|
this.logger.debug("=== pathOrg.toString() : " + pathOrg.toString());
|
|
|
|
|
this.logger.debug("=== path.toString() : " + path.toString());
|
|
|
|
|
this.logger.debug("=== strbuf.toString() : " + strbuf.toString());
|
|
|
|
|
jsonParam.put("allImagePath", String.format("%s%s", new Object[] { path.toString().replace(String.valueOf(this.g_strFTP[5]) + "/", ""), strbuf.toString() }));
|
|
|
|
|
|
|
|
|
|
jsonParam.put("allImagePath",
|
|
|
|
|
String.format(
|
|
|
|
|
"%s%s",
|
|
|
|
|
new Object[] {
|
|
|
|
|
path.toString(), strbuf.toString()
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
this.logger.debug("=== : " + jsonParam.toJSONString());
|
|
|
|
|
return String.valueOf(pathOrg.toString()) + "#" + path.toString() + "#" + strbuf.toString() + "#" + line;
|
|
|
|
|
return String.valueOf(pathOrg.toString())
|
|
|
|
|
+ "#" + path.toString() + "#" + strbuf.toString()
|
|
|
|
|
+ "#" + line;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//연계api호출
|
|
|
|
|
@ -225,7 +246,7 @@ public void run() {
|
|
|
|
|
BufferedReader br = null;
|
|
|
|
|
try {
|
|
|
|
|
URL url = new URL(this.g_strFTP[4]);
|
|
|
|
|
this.logger.info("==== 수집서버 주소가 아니고 대외연계서버 주소 : " + this.g_strFTP[4]);
|
|
|
|
|
this.logger.info("==== 대외연계서버 주소 + 녹색과태료 API URL : " + this.g_strFTP[4]);
|
|
|
|
|
connection = (HttpURLConnection)url.openConnection();
|
|
|
|
|
connection.setDoInput(true);
|
|
|
|
|
connection.setDoOutput(true);
|
|
|
|
|
@ -323,7 +344,7 @@ public void run() {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
|
|
for (int i = 0; i < list.size(); i++) { //디렉토리 경로상에 현재 존재하는 JPG파일
|
|
|
|
|
mapDefaultCar.clear();
|
|
|
|
|
this.logger.debug("=== i : " + i + ", : " + list.get(i));
|
|
|
|
|
//
|
|
|
|
|
@ -378,6 +399,7 @@ public void run() {
|
|
|
|
|
this.logger.debug("=== 4 : " + strTargPath[1]);
|
|
|
|
|
isOk = false;
|
|
|
|
|
try {
|
|
|
|
|
//SFTP 1-1
|
|
|
|
|
sftp.mkdir2(strTargPath[1].substring(1));
|
|
|
|
|
this.logger.debug("폴더가 생성되었습니다.");
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
@ -385,7 +407,7 @@ public void run() {
|
|
|
|
|
}
|
|
|
|
|
this.logger.debug(String.format("============= : 업로드 전 ", new Object[0]));
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
//SFTP 1-2
|
|
|
|
|
sftp.upload(strTargPath[1], file, list.get(i), strTargPath[2]);
|
|
|
|
|
|
|
|
|
|
this.logger.debug(String.format("============= : 업로드 성공 ", new Object[0]));
|
|
|
|
|
@ -414,7 +436,8 @@ public void run() {
|
|
|
|
|
this.logger.debug(String.format("=== update param : %s, %s, %s", new Object[] { strTargPath[1], file, list.get(i), strTargPath[2] }));
|
|
|
|
|
this.logger.debug("==== 미납 수행 시작");
|
|
|
|
|
try {
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
//2번째FTP처리
|
|
|
|
|
DefaultCarCenter(strTargPath[3], file, mapDefaultCar);
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
@ -462,6 +485,7 @@ public void run() {
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.getStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.logger.debug("=== " + map.get("image_path_desc_center"));
|
|
|
|
|
this.logger.debug("=== image_file_new2 : " + map.get("image_file_new2"));
|
|
|
|
|
this.logger.info(String.format("============= : DefaultCarCenter 파일전송 전 ", new Object[0]));
|
|
|
|
|
|