| | |
| | | public AjaxResult selectDataList(DocumentMaterials documentMaterials, Integer pageNum, Integer pageSize) { |
| | | LambdaQueryWrapper<DocumentMaterials> lqw = buildCondition(documentMaterials); |
| | | |
| | | |
| | | lqw.eq(true, DocumentMaterials::getVisible, 1); |
| | | Page<DocumentMaterials> zfClanPage = new Page<>(pageNum, pageSize); |
| | | Page<DocumentMaterials> pageResult = page(zfClanPage, lqw); |
| | | |
| | |
| | | public List<DocumentMaterials> selectDocumentMaterialsList(DocumentMaterials documentMaterials) { |
| | | LambdaQueryWrapper<DocumentMaterials> lambdaQueryWrapper = buildCondition(documentMaterials); |
| | | List<DocumentMaterials> beanRecords = list(lambdaQueryWrapper); |
| | | int size = beanRecords.size(); |
| | | // 获取该案卷的最大页号(总页数) |
| | | Long totalPages = this.baseMapper.getMaxPageNumber(documentMaterials.getRecordId().intValue()); |
| | | |
| | | // 遍历所有条目,设置pageNumberFormatted |
| | | for (int i = 0; i < size; i++) { |
| | | DocumentMaterials item = beanRecords.get(i); |
| | | Long pageNumber = item.getPageNumber(); |
| | | |
| | | if (i == size - 1) { |
| | | // 最后一行:格式化页号为"最后一页页号-总页数"的形式 |
| | | item.setPageNumberFormatted(pageNumber + "-" + totalPages); |
| | | } else { |
| | | // 其他行:直接使用pageNumber的值 |
| | | item.setPageNumberFormatted(pageNumber != null ? pageNumber.toString() : ""); |
| | | } |
| | | if(item.getSecurityLevel().equals("该页另存")) |
| | | item.setSecurityLevel("普通"); |
| | | } |
| | | return beanRecords; |
| | | } |
| | | |
| | | @Override |
| | | public List<DocumentMaterialsVoLarge> selectDocumentMaterialsAllByRecordId(Long id) { |
| | | |
| | | return this.baseMapper.getDocumentMaterialsvoLarge(Math.toIntExact(id)); |
| | | List<DocumentMaterialsVoLarge> lists = this.baseMapper.getDocumentMaterialsvoLarge(Math.toIntExact(id)); |
| | | // 遍历所有条目,设置pageNumberFormatted |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | DocumentMaterialsVoLarge item = lists.get(i); |
| | | Long pageNumber = item.getPageNumber(); |
| | | |
| | | |
| | | if(item.getSecurityLevel().equals("该页另存")) |
| | | item.setSecurityLevel("普通"); |
| | | } |
| | | return lists; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | List<DocumentMaterials> beanRecords = list(lambdaQueryWrapper); |
| | | // 遍历所有条目,设置pageNumberFormatted |
| | | for (int i = 0; i < beanRecords.size(); i++) { |
| | | DocumentMaterials item = beanRecords.get(i); |
| | | Long pageNumber = item.getPageNumber(); |
| | | |
| | | |
| | | if(item.getSecurityLevel().equals("该页另存")) |
| | | item.setSecurityLevel("普通"); |
| | | } |
| | | return beanRecords; |
| | | } |
| | | |
| | |
| | | if (StringUtils.isEmpty(documentMaterials.getIsCanceled())) { |
| | | throw new ErrorcodeExceptionextends(400, "是否注销不能为空"); |
| | | } |
| | | // 手动转换密级字段 |
| | | // if ("秘密".equals(documentMaterials.getSecurityLevel())) { |
| | | // documentMaterials.setSecurityLevel("该页另存"); |
| | | // } |
| | | // if ("内部用图".equals(documentMaterials.getSecurityLevel())) { |
| | | // documentMaterials.setSecurityLevel("该页另存"); |
| | | // } |
| | | // if ("内部用途".equals(documentMaterials.getSecurityLevel())) { |
| | | // documentMaterials.setSecurityLevel("该页另存"); |
| | | // } |
| | | this.insertDocumentMaterials(documentMaterials); |
| | | } |
| | | |
| | |
| | | newRecord.setFileSize(null); |
| | | newRecord.setFormat(null); |
| | | newRecord.setUrl(null); |
| | | newRecord.setVisible(0); |
| | | |
| | | // 添加到中间记录列表 |
| | | middleRecords.add(newRecord); |
| | | } |