| | |
| | | import org.jeecg.modules.dnc.service.IDocFileService; |
| | | import org.jeecg.modules.dnc.service.IDocInfoService; |
| | | import org.jeecg.modules.dnc.service.IDocRelativeService; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Override |
| | | public List<DocFile> findListByDocId(String docId) { |
| | | DocInfo docInfo = docInfoMapper.selectById(docId); |
| | | if(!ValidateUtil.validateString(docId)) |
| | | return null; |
| | | return super.lambdaQuery().eq(DocFile::getDocId, docId).orderByDesc(DocFile::getFileId).list(); |
| | | List<DocFile> fileList=super.lambdaQuery().eq(DocFile::getDocId, docId).orderByDesc(DocFile::getFileId).list(); |
| | | fileList.forEach(item->{ |
| | | //对比版本 |
| | | item.setPublishFlag(docInfo.getPublishVersion().equals(item.getDocVersion())); |
| | | }); |
| | | return fileList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if(docFile == null) { |
| | | ExceptionCast.cast(DocumentCode.DOC_FILE_ERROR); |
| | | } |
| | | List<DeviceInfo> deviceList = docRelativeService.findDeviceByDocId(docFile.getDocId()); |
| | | List<MdcEquipment> deviceList = docRelativeService.findDeviceByDocId(docFile.getDocId()); |
| | | if(deviceList != null && !deviceList.isEmpty()) |
| | | ExceptionCast.cast(DocumentCode.DOC_DEVICE_EXIST); |
| | | DocInfo docInfo = new DocInfo(); |