|
@ -400,12 +400,20 @@ public class ArchivesCaseServiceImpl implements ArchivesCaseService { |
|
|
return vo; |
|
|
return vo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Boolean isHaveArchives(List<String> deviceId) { |
|
|
|
|
|
Integer count = caseRepository.isHaveArchives(deviceId); |
|
|
|
|
|
return count>0?false:true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Object readyIntoCase(String tid, String caseName, String barcode, Pageable page) { |
|
|
public Object readyIntoCase(String tid, String caseName, String barcode, Pageable page) { |
|
|
tid = StringUtils.isEmpty(tid) ? null : "%"+ tid +"%"; |
|
|
tid = StringUtils.isEmpty(tid) ? null : "%"+ tid +"%"; |
|
|
caseName = StringUtils.isEmpty(caseName) ? null : "%"+ caseName +"%"; |
|
|
caseName = StringUtils.isEmpty(caseName) ? null : "%"+ caseName +"%"; |
|
|
barcode = StringUtils.isEmpty(barcode) ? null : "%"+ barcode +"%"; |
|
|
barcode = StringUtils.isEmpty(barcode) ? null : "%"+ barcode +"%"; |
|
|
Page<ArchivesCase> pageCase = caseRepository.readyIntoCase(caseName,tid,barcode,page); |
|
|
|
|
|
|
|
|
List<Integer> storageType = new ArrayList<>(); |
|
|
|
|
|
storageType.add(0);storageType.add(1); |
|
|
|
|
|
Page<ArchivesCase> pageCase = caseRepository.readyIntoCase(caseName,tid,barcode,storageType,page); |
|
|
return PageUtil.toPage(pageCase); |
|
|
return PageUtil.toPage(pageCase); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -419,6 +427,17 @@ public class ArchivesCaseServiceImpl implements ArchivesCaseService { |
|
|
return PageUtil.toPage(pageCase); |
|
|
return PageUtil.toPage(pageCase); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Object alReadyInto(String tid, String caseName, String barcode, Pageable page) { |
|
|
|
|
|
tid = StringUtils.isEmpty(tid) ? null : "%"+ tid +"%"; |
|
|
|
|
|
caseName = StringUtils.isEmpty(caseName) ? null : "%"+ caseName +"%"; |
|
|
|
|
|
barcode = StringUtils.isEmpty(barcode) ? null : "%"+ barcode +"%"; |
|
|
|
|
|
List<Integer> storageType = new ArrayList<>(); |
|
|
|
|
|
storageType.add(2);storageType.add(3); |
|
|
|
|
|
Page<ArchivesCase> pageCase = caseRepository.readyIntoCase(caseName,tid,barcode,storageType,page); |
|
|
|
|
|
return PageUtil.toPage(pageCase); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Object initCaseByArchives(String caseId) { |
|
|
public Object initCaseByArchives(String caseId) { |
|
|
return caseRepository.initCaseAllByCaseId(caseId); |
|
|
return caseRepository.initCaseAllByCaseId(caseId); |
|
@ -452,7 +471,7 @@ public class ArchivesCaseServiceImpl implements ArchivesCaseService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if(resultOk>1){ |
|
|
|
|
|
|
|
|
if(resultOk>0){ |
|
|
newShelfId = newShelfId.substring(0,newShelfId.length()-1); |
|
|
newShelfId = newShelfId.substring(0,newShelfId.length()-1); |
|
|
newLocation = newLocation.substring(0,newLocation.length()-1); |
|
|
newLocation = newLocation.substring(0,newLocation.length()-1); |
|
|
newLocationName = newLocationName.substring(0,newLocationName.length()-1); |
|
|
newLocationName = newLocationName.substring(0,newLocationName.length()-1); |
|
@ -560,4 +579,21 @@ public class ArchivesCaseServiceImpl implements ArchivesCaseService { |
|
|
public List<StorageLog> initStorageLogList(List<Integer> logs) { |
|
|
public List<StorageLog> initStorageLogList(List<Integer> logs) { |
|
|
return storageLogRepository.findAllById(logs); |
|
|
return storageLogRepository.findAllById(logs); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public Integer externalCallback(String caseId, String type) { |
|
|
|
|
|
Integer storageType = "1".equals(type)? 2:0; |
|
|
|
|
|
ArchivesCase archivesCase = caseRepository.findCaseById(caseId); |
|
|
|
|
|
if(null == archivesCase) |
|
|
|
|
|
return 0; |
|
|
|
|
|
//入库回调 |
|
|
|
|
|
if("1".equals(type)){ |
|
|
|
|
|
archivesCase.setStorageType(storageType); |
|
|
|
|
|
//出库回调 |
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
caseRepository.saveAndFlush(archivesCase); |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
} |
|
|
} |