Merge remote-tracking branch 'origin/main'

dev
Jonguk. Lim 4 months ago
commit 017f70b6b6

@ -350,6 +350,46 @@ public class AddsNimsController extends ApplicationController {
} }
//폐기증거사진 //폐기증거사진
List<DataObject> partitions = this.getPartitions(dataForDoc);
//1.한글문서파일 데이터 입력
DisposeProcessDetails form = new DisposeProcessDetails(print, printOption, dataForDoc, partitions);
//2.한글문서파일 생성
form.makeFile();
//3.DB 저장, 스토리지 저장
List<String> dscdmngIds = IntStream.rangeClosed(1, dataForDoc.size()).boxed().map(i -> {
return dataForDoc.get(i-1).string("dscdmngId");
}).collect(Collectors.toList());
boolean allEqual = dscdmngIds.stream().distinct().count() <= 1;
if(allEqual) {
String resultFilePath = form.andGetPath();
File file = new File(resultFilePath);
String newFileId = "";
String before = "";
boolean changeDscdmngId = false;
for(DataObject data : dataForDoc) {
if(!before.equals(data.string("dscdmngId"))) {
changeDscdmngId = true;
} else {
changeDscdmngId = false;
}
if(changeDscdmngId) {
Relation rel = new Relation().setInfoType("200").setSubType("02").setInfoKey(data.string("dscdmngId"));
FileInfo fileInfo = new FileInfo.Factory().create(rel, file);
fileInfo.setName(print.getFormatKorName()+".hwp");
int effected= fileService.create(fileInfo);
newFileId = fileInfo.getId();
}
}
}
//4.다운로드
HashMap<String, Object> result = form.andDownload();
mav.addAllObjects(result);
return mav;
}
private List<DataObject> getPartitions(List<DataObject> dataForDoc){
List<DataObject> partitions = new ArrayList<>(); List<DataObject> partitions = new ArrayList<>();
String before = ""; String before = "";
boolean changeDscdmngId = false; boolean changeDscdmngId = false;
@ -389,43 +429,9 @@ public class AddsNimsController extends ApplicationController {
} }
} }
return partitions;
//1.한글문서파일 데이터 입력
DisposeProcessDetails form = new DisposeProcessDetails(print, printOption, dataForDoc, partitions);
//2.한글문서파일 생성
form.makeFile();
//3.DB 저장, 스토리지 저장
List<String> dscdmngIds = IntStream.rangeClosed(1, dataForDoc.size()).boxed().map(i -> {
return dataForDoc.get(i-1).string("dscdmngId");
}).collect(Collectors.toList());
boolean allEqual = dscdmngIds.stream().distinct().count() <= 1;
if(allEqual) {
String resultFilePath = form.andGetPath();
File file = new File(resultFilePath);
String newFileId = "";
before = "";
changeDscdmngId = false;
for(DataObject data : dataForDoc) {
if(!before.equals(data.string("dscdmngId"))) {
changeDscdmngId = true;
} else {
changeDscdmngId = false;
}
if(changeDscdmngId) {
Relation rel = new Relation().setInfoType("200").setSubType("02").setInfoKey(data.string("dscdmngId"));
FileInfo fileInfo = new FileInfo.Factory().create(rel, file);
fileInfo.setName(print.getFormatKorName()+".hwp");
int effected= fileService.create(fileInfo);
newFileId = fileInfo.getId();
}
}
}
//4.다운로드
HashMap<String, Object> result = form.andDownload();
mav.addAllObjects(result);
return mav;
} }
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// 보고 문서 관리 // 보고 문서 관리
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------

@ -229,6 +229,14 @@
if (!item) return; if (!item) return;
$P.bsshFormFields.set($P.control, item); $P.bsshFormFields.set($P.control, item);
let checkData = item.data.dsusePrvCd;
if (checkData =="01" || checkData =="02") {
$("#dsuseAcdtDe--${pageName}").prop('disabled', false);
}else{
$("#dsuseAcdtDe--${pageName}").prop('disabled', true);
$("#dsuseAcdtDe--${pageName}").val("");
}
} }
$P.productControl.onCurrentChange = item => { $P.productControl.onCurrentChange = item => {

Loading…
Cancel
Save