|
|
|
@ -290,10 +290,11 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
|
|
|
|
|
bizNimsMapper.updateDsuseMgtReceipt(reqDto);
|
|
|
|
|
|
|
|
|
|
// 파일 삭제
|
|
|
|
|
List<String> fileIds = bizNimsMapper.selectFileId(
|
|
|
|
|
String[] fileIds = bizNimsMapper.selectFileId(
|
|
|
|
|
Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_PRD_IMG.getCode(), "infKey", reqDto.getDscdmngId()));
|
|
|
|
|
if (!fileIds.isEmpty()) {
|
|
|
|
|
fileService.delete(fileIds.toArray(new String[0]));
|
|
|
|
|
if (fileIds.length > 0) {
|
|
|
|
|
fileService.delete(fileIds);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 폐기관리 상세 삭제
|
|
|
|
@ -325,10 +326,10 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
|
|
|
|
|
if(bizNimsMapper.updateDsuseMgtRslt(reqDto) == 1){
|
|
|
|
|
if("Y".equals(fileChangeYn)) {
|
|
|
|
|
// 파일 삭제
|
|
|
|
|
List<String> fileIds = bizNimsMapper.selectFileId(
|
|
|
|
|
String[] fileIds = bizNimsMapper.selectFileId(
|
|
|
|
|
Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_IMG.getCode(), "infKey", reqDto.getDscdmngId()));
|
|
|
|
|
if (!fileIds.isEmpty()) {
|
|
|
|
|
fileService.delete(fileIds.toArray(new String[0]));
|
|
|
|
|
if (fileIds.length > 0) {
|
|
|
|
|
fileService.delete(fileIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int idx = 1;
|
|
|
|
@ -948,9 +949,9 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
|
|
|
|
|
* </pre>
|
|
|
|
|
*/
|
|
|
|
|
private String uploadFileDeleteAndSave(String infType, String infKey, String subType, MultipartFile mf) {
|
|
|
|
|
List<String> fileIds = bizNimsMapper.selectFileId(Map.of("infType", infType, "infKey", infKey, "subType", subType));
|
|
|
|
|
if(!fileIds.isEmpty()){
|
|
|
|
|
fileService.delete(fileIds.toArray(new String[0]));
|
|
|
|
|
String[] fileIds = bizNimsMapper.selectFileId(Map.of("infType", infType, "infKey", infKey, "subType", subType));
|
|
|
|
|
if(fileIds.length > 0){
|
|
|
|
|
fileService.delete(fileIds);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return uploadFileSave(infType, infKey, subType, mf);
|
|
|
|
@ -975,28 +976,4 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
|
|
|
|
|
|
|
|
|
|
return files.get(0).getId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
// public List<NimsApiDto.StorageInfo> saveStorageInfo(NimsApiRequest.StorageInfoRequest dto) {
|
|
|
|
|
// NimsApiResult.Response<NimsApiDto.StorageInfo> result = infNimsService.getStorageInfo(dto);
|
|
|
|
|
// List<NimsApiDto.StorageInfo> list = result.getResultOrThrow();
|
|
|
|
|
//
|
|
|
|
|
// for (NimsApiDto.StorageInfo d : list) {
|
|
|
|
|
// d.setRgtr(Constants.NIMS_API_USER_ID);
|
|
|
|
|
// bizNimsMapper.mergeStorgeInfo(d);
|
|
|
|
|
// }
|
|
|
|
|
// return list;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|