|
|
@ -1,5 +1,6 @@
|
|
|
|
package kr.xit.fims.biz.ec.service;
|
|
|
|
package kr.xit.fims.biz.ec.service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
@ -10,6 +11,7 @@ import java.util.Objects;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
|
import org.apache.commons.collections4.ListUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.ibatis.session.RowBounds;
|
|
|
|
import org.apache.ibatis.session.RowBounds;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@ -194,19 +196,53 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: src file backup
|
|
|
|
// FIXME: src file backup
|
|
|
|
// rollback시 파일이 move 않되도록 모든 데이타 처리후 file move
|
|
|
|
// rollback시 파일이 move 않되도록 모든 데이타 처리후 file move
|
|
|
|
// dto.getFileInfoList().forEach((fi) -> {
|
|
|
|
dto.getFileInfoList().forEach((fi) -> {
|
|
|
|
// try {
|
|
|
|
try {
|
|
|
|
// FileUtils.moveFile(
|
|
|
|
FileUtils.moveFile(
|
|
|
|
// new File(filePath + "/" + fi.getFileNm())
|
|
|
|
new File(filePath + "/" + fi.getFileNm())
|
|
|
|
// , new File(rcvBackupRoot + uploadBusCctvPath + "/" + fi.getFileNm())
|
|
|
|
, new File(rcvBackupRoot + uploadBusCctvPath + "/" + fi.getFileNm())
|
|
|
|
// );
|
|
|
|
);
|
|
|
|
//
|
|
|
|
|
|
|
|
// } catch (IOException ie) {
|
|
|
|
} catch (IOException ie) {
|
|
|
|
// ie.printStackTrace();
|
|
|
|
ie.printStackTrace();
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------
|
|
|
|
|
|
|
|
// 단속자료 생성 - 단속 처리
|
|
|
|
|
|
|
|
//-----------------------------------------------------
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
|
|
|
|
public void saveRtReglt(final CctvCrackdownDTO.Request dto) {
|
|
|
|
|
|
|
|
dto.setRegister(getUserInfo().getUniqId());
|
|
|
|
|
|
|
|
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
|
|
|
|
|
|
|
|
mapper.insertRtRegltFromEcExtrRegltCntc(dto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dto.setUpdusr(getUserInfo().getUniqId());
|
|
|
|
|
|
|
|
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode());
|
|
|
|
|
|
|
|
mapper.updateStatusAndRegltIdOfEcExtrRegltCntc(dto);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------
|
|
|
|
|
|
|
|
// 단속자료 생성 - 서손 처리
|
|
|
|
|
|
|
|
//-----------------------------------------------------
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
|
|
|
|
public void saveRtErpp(final CctvCrackdownDTO.Request dto) {
|
|
|
|
|
|
|
|
// 단속테이블
|
|
|
|
|
|
|
|
dto.setRegister(getUserInfo().getUniqId());
|
|
|
|
|
|
|
|
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode());
|
|
|
|
|
|
|
|
mapper.insertRtRegltFromEcExtrRegltCntc(dto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 서손테이블
|
|
|
|
|
|
|
|
mapper.insertRtErppFromEcExtrRegltCntc(dto);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 상태 변경
|
|
|
|
|
|
|
|
dto.setUpdusr(getUserInfo().getUniqId());
|
|
|
|
|
|
|
|
dto.setExtrlRegltCntcProcessSttus(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode());
|
|
|
|
|
|
|
|
mapper.updateStatusAndRegltIdOfEcExtrRegltCntc(dto);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// metaFileName : 20101224121055000_014_001_0
|
|
|
|
// metaFileName : 20101224121055000_014_001_0
|
|
|
|
// yyyyMMddHHmmssTTT_업체코드_장비코드
|
|
|
|
// yyyyMMddHHmmssTTT_업체코드_장비코드
|
|
|
|