Resolve "Список периодических событий" #129

Merged
romanov73 merged 57 commits from 4-show-time-line into master 2018-10-30 23:32:01 +04:00
Showing only changes of commit 5af8cb1bd3 - Show all commits

View File

@ -67,6 +67,9 @@ public class PaperService {
@Transactional
public Integer update(PaperDto paperDto) throws IOException {
Paper paper = paperRepository.findOne(paperDto.getId());
if(paper != null && paper.getStatus() != paperDto.getStatus()){
sendMessageAboutStatusChange(paper.getStatus(),paperDto);
}
if (paperDto.getTmpFileName() != null && paper.getFileData() != null) {
fileService.deleteFile(paper.getFileData());
}