| | |
| | | import com.ruoyi.approve.pojo.ApprovalTask; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplate; |
| | | import com.ruoyi.approve.utils.ApproveProcessConfigNodeUtils; |
| | | import com.ruoyi.basic.enums.ApplicationTypeEnum; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.collaborativeApproval.dto.EnterpriseNewsDto; |
| | | import com.ruoyi.collaborativeApproval.mapper.EnterpriseNewsMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.EnterpriseNews; |
| | |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | private final ApproveProcessConfigNodeUtils approveProcessConfigNodeUtils; |
| | | private final ISysNoticeService sysNoticeService; |
| | | private final FileUtil fileUtil; |
| | | |
| | | @Override |
| | | public IPage<EnterpriseNewsVo> listPage(Page<EnterpriseNewsVo> page, EnterpriseNewsDto enterpriseNewsDto) { |
| | | return enterpriseNewsMapper.listPage(page, enterpriseNewsDto); |
| | | IPage<EnterpriseNewsVo> enterpriseNewsVoIPage = enterpriseNewsMapper.listPage(page, enterpriseNewsDto); |
| | | enterpriseNewsVoIPage.getRecords().forEach(enterpriseNewsVo -> { |
| | | enterpriseNewsVo.setStorageBlobDTOs(fileUtil.getStorageBlobVOsByRecordTypeAndRecordId(RecordTypeEnum.ENTERPRISE_NEWS, enterpriseNewsVo.getId())); |
| | | }); |
| | | return enterpriseNewsVoIPage; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (STATUS_PENDING.equals(enterpriseNews.getStatus())) { |
| | | startEnterpriseNewsApproval(enterpriseNews, enterpriseNewsDto); |
| | | } |
| | | //添加附件 |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.ENTERPRISE_NEWS, enterpriseNews.getId(), enterpriseNewsDto.getStorageBlobDTOs()); |
| | | return true; |
| | | } |
| | | |
| | |
| | | |
| | | clearReadScopeRelations(enterpriseNews.getId()); |
| | | saveReadScopeRelations(enterpriseNews.getId(), readScope, deptIds, userIds); |
| | | |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.ENTERPRISE_NEWS, enterpriseNews.getId(), enterpriseNewsDto.getStorageBlobDTOs()); |
| | | if (STATUS_PENDING.equals(enterpriseNews.getStatus())) { |
| | | startEnterpriseNewsApproval(enterpriseNews, enterpriseNewsDto); |
| | | } |