|
|
@ -15,8 +15,10 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.util.ResourceUtils;
|
|
|
|
import org.springframework.util.ResourceUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.file.FileInfo;
|
|
|
|
import cokr.xit.base.file.FileInfo;
|
|
|
|
|
|
|
|
import cokr.xit.base.file.FileInfo.Relation;
|
|
|
|
import cokr.xit.base.file.service.FileQuery;
|
|
|
|
import cokr.xit.base.file.service.FileQuery;
|
|
|
|
import cokr.xit.base.file.service.bean.FileBean;
|
|
|
|
import cokr.xit.base.file.service.bean.FileBean;
|
|
|
|
|
|
|
|
import cokr.xit.base.file.web.FileInfoFactory;
|
|
|
|
import cokr.xit.fims.cmmn.CmmnUtil;
|
|
|
|
import cokr.xit.fims.cmmn.CmmnUtil;
|
|
|
|
import cokr.xit.fims.cmmn.CrdnPayerHstry;
|
|
|
|
import cokr.xit.fims.cmmn.CrdnPayerHstry;
|
|
|
|
import cokr.xit.fims.cmmn.CrdnSttsHstry;
|
|
|
|
import cokr.xit.fims.cmmn.CrdnSttsHstry;
|
|
|
@ -478,5 +480,41 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
|
|
|
|
return saved;
|
|
|
|
return saved;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean copyCvlcptCrdnInfo(String crdnId) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FileQuery fileQuery = new FileQuery().setInfoType(Crdn.INF_TYPE).setInfoKeys(crdnId);
|
|
|
|
|
|
|
|
List<DataObject> orgnlCrdnFileList = fileBean.getFileList(fileQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String newCrdnId = crdnCvlcptBean.insertCrdnFromSelect(crdnId);
|
|
|
|
|
|
|
|
if(ifEmpty(newCrdnId, () -> "").equals("")) {
|
|
|
|
|
|
|
|
throw new RuntimeException("단속민원 복사 등록 중 단속대장 등록에 실패하였습니다.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!orgnlCrdnFileList.isEmpty() && orgnlCrdnFileList.size() > 0) {
|
|
|
|
|
|
|
|
List<FileInfo> fileInfoList = new ArrayList<FileInfo>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<File> files = new ArrayList<>();
|
|
|
|
|
|
|
|
for (int iLoop = 0; iLoop < orgnlCrdnFileList.size(); iLoop++) {
|
|
|
|
|
|
|
|
files.add(new File(orgnlCrdnFileList.get(iLoop).string("FILE_PATH")));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Relation relation = new Relation();
|
|
|
|
|
|
|
|
relation.setInfoType(Crdn.INF_TYPE);
|
|
|
|
|
|
|
|
relation.setInfoKey(newCrdnId);
|
|
|
|
|
|
|
|
fileInfoList = new FileInfoFactory().createFileInfos(relation, files);
|
|
|
|
|
|
|
|
for (int iLoop = 0; iLoop < fileInfoList.size(); iLoop++) {
|
|
|
|
|
|
|
|
fileInfoList.get(iLoop).setName(orgnlCrdnFileList.get(iLoop).string("FILE_NM"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int effected = fileBean.create(fileInfoList);
|
|
|
|
|
|
|
|
if(effected == 0) {
|
|
|
|
|
|
|
|
throw new RuntimeException("단속민원 복사 등록 중 파일복사에 실패하였습니다.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|