| | |
| | | </exclusions> |
| | | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-system</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-system</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.ruoyi.domain; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 【请填写功能名称】对象 archive_category |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | public class ArchiveCategory extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "编号") |
| | | private String numb; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "名称") |
| | | private String nname; |
| | | |
| | | |
| | | private Date ctime; |
| | | |
| | | public Date getCtime() { |
| | | return ctime; |
| | | } |
| | | |
| | | public void setCtime(Date ctime) { |
| | | this.ctime = ctime; |
| | | } |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | |
| | | public void setNumb(String numb) |
| | | { |
| | | this.numb = numb; |
| | | } |
| | | |
| | | public String getNumb() |
| | | { |
| | | return numb; |
| | | } |
| | | |
| | | public void setNname(String nname) |
| | | { |
| | | this.nname = nname; |
| | | } |
| | | |
| | | public String getNname() |
| | | { |
| | | return nname; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("numb", getNumb()) |
| | | .append("nname", getNname()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | |
| | | @Excel(name = "备注") |
| | | private String remarks; |
| | | |
| | | |
| | | /** 历史相关发文号 */ |
| | | @Excel(name = "历史相关发文号") |
| | | private String historicalReferenceNumber; |
| | | |
| | | public void setId(Long id) |
| | | @TableField(exist = false) |
| | | private boolean isOwnData; |
| | | @TableField(exist = false) |
| | | |
| | | private String archiveRecordsId; |
| | | @TableField(exist = false) |
| | | |
| | | private Long userId; |
| | | |
| | | @Override |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | @Override |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | private Date createTime; |
| | | |
| | | public Long getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Long userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getArchiveRecordsId() { |
| | | return archiveRecordsId; |
| | | } |
| | | |
| | | public String isArchiveRecordsId() { |
| | | return archiveRecordsId; |
| | | } |
| | | |
| | | public void setArchiveRecordsId(String archiveRecordsId) { |
| | | this.archiveRecordsId = archiveRecordsId; |
| | | } |
| | | |
| | | public boolean isOwnData() { |
| | | return isOwnData; |
| | | } |
| | | |
| | | public void setOwnData(boolean ownData) { |
| | | isOwnData = ownData; |
| | | } |
| | | |
| | | public String getRecordStatus() { |
| | | return recordStatus; |
| | | } |
| | | |
| | | public void setRecordStatus(String recordStatus) { |
| | | this.recordStatus = recordStatus; |
| | | } |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | |
| | | package com.ruoyi.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | |
| | | /** 档案目录id |
| | | */ |
| | | @Excel(name = "档案目录id ") |
| | | private Long archiveRecordsId; |
| | | private String archiveRecordsId; |
| | | |
| | | /** 用户id */ |
| | | @Excel(name = "用户id") |
| | | private Long userId; |
| | | |
| | | public SysUser getSysUser() { |
| | | return sysUser; |
| | | } |
| | | |
| | | public void setSysUser(SysUser sysUser) { |
| | | this.sysUser = sysUser; |
| | | } |
| | | @TableField(exist = false) |
| | | private SysUser sysUser; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | |
| | | return id; |
| | | } |
| | | |
| | | public void setArchiveRecordsId(Long archiveRecordsId) |
| | | public void setArchiveRecordsId(String archiveRecordsId) |
| | | { |
| | | this.archiveRecordsId = archiveRecordsId; |
| | | } |
| | | |
| | | public Long getArchiveRecordsId() |
| | | public String getArchiveRecordsId() |
| | | { |
| | | return archiveRecordsId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.domain; |
| | | |
| | | |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 【请填写功能名称】对象 document_materials |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | public class DocumentMaterials extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long materialId; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "文件编任者") |
| | | private String creator; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "文件提名") |
| | | private String title; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "日期") |
| | | private Date date; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "页号") |
| | | private Long pageNumber; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "页次") |
| | | private Long pageOrder; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "所处阶段") |
| | | private String stage; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "公开属性") |
| | | private String publicity; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否为附件") |
| | | private String isAttachment; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否为附图") |
| | | private String isDiagram; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "保管期限") |
| | | private String retentionPeriod; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "密级") |
| | | private String securityLevel; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否涉密及敏感信息") |
| | | private String isSensitive; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "是否注销") |
| | | private String isCanceled; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "格式") |
| | | private String format; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "幅面") |
| | | private String sizeType; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "水平分辨率") |
| | | private Long horizontalResolution; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "垂直分辨率") |
| | | private Long verticalResolution; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "宽度") |
| | | private Long width; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "高度") |
| | | private Long height; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "大小") |
| | | private Long fileSize; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "附件及历史发文号") |
| | | private String attachmentHistoryNumbers; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "备注") |
| | | private String remarks; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "${comment}") |
| | | private Date createdAt; |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "${comment}") |
| | | private Date updatedAt; |
| | | |
| | | |
| | | private Long recordId; |
| | | |
| | | public Long getRecordId() { |
| | | return recordId; |
| | | } |
| | | |
| | | public void setRecordId(Long recordId) { |
| | | this.recordId = recordId; |
| | | } |
| | | |
| | | public void setMaterialId(Long materialId) |
| | | { |
| | | this.materialId = materialId; |
| | | } |
| | | |
| | | public Long getMaterialId() |
| | | { |
| | | return materialId; |
| | | } |
| | | |
| | | public void setCreator(String creator) |
| | | { |
| | | this.creator = creator; |
| | | } |
| | | |
| | | public String getCreator() |
| | | { |
| | | return creator; |
| | | } |
| | | |
| | | public void setTitle(String title) |
| | | { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getTitle() |
| | | { |
| | | return title; |
| | | } |
| | | |
| | | public void setDate(Date date) |
| | | { |
| | | this.date = date; |
| | | } |
| | | |
| | | public Date getDate() |
| | | { |
| | | return date; |
| | | } |
| | | |
| | | public void setPageNumber(Long pageNumber) |
| | | { |
| | | this.pageNumber = pageNumber; |
| | | } |
| | | |
| | | public Long getPageNumber() |
| | | { |
| | | return pageNumber; |
| | | } |
| | | |
| | | public void setPageOrder(Long pageOrder) |
| | | { |
| | | this.pageOrder = pageOrder; |
| | | } |
| | | |
| | | public Long getPageOrder() |
| | | { |
| | | return pageOrder; |
| | | } |
| | | |
| | | public void setStage(String stage) |
| | | { |
| | | this.stage = stage; |
| | | } |
| | | |
| | | public String getStage() |
| | | { |
| | | return stage; |
| | | } |
| | | |
| | | public void setPublicity(String publicity) |
| | | { |
| | | this.publicity = publicity; |
| | | } |
| | | |
| | | public String getPublicity() |
| | | { |
| | | return publicity; |
| | | } |
| | | |
| | | public void setIsAttachment(String isAttachment) |
| | | { |
| | | this.isAttachment = isAttachment; |
| | | } |
| | | |
| | | public String getIsAttachment() |
| | | { |
| | | return isAttachment; |
| | | } |
| | | |
| | | public void setIsDiagram(String isDiagram) |
| | | { |
| | | this.isDiagram = isDiagram; |
| | | } |
| | | |
| | | public String getIsDiagram() |
| | | { |
| | | return isDiagram; |
| | | } |
| | | |
| | | public void setRetentionPeriod(String retentionPeriod) |
| | | { |
| | | this.retentionPeriod = retentionPeriod; |
| | | } |
| | | |
| | | public String getRetentionPeriod() |
| | | { |
| | | return retentionPeriod; |
| | | } |
| | | |
| | | public void setSecurityLevel(String securityLevel) |
| | | { |
| | | this.securityLevel = securityLevel; |
| | | } |
| | | |
| | | public String getSecurityLevel() |
| | | { |
| | | return securityLevel; |
| | | } |
| | | |
| | | public void setIsSensitive(String isSensitive) |
| | | { |
| | | this.isSensitive = isSensitive; |
| | | } |
| | | |
| | | public String getIsSensitive() |
| | | { |
| | | return isSensitive; |
| | | } |
| | | |
| | | public void setIsCanceled(String isCanceled) |
| | | { |
| | | this.isCanceled = isCanceled; |
| | | } |
| | | |
| | | public String getIsCanceled() |
| | | { |
| | | return isCanceled; |
| | | } |
| | | |
| | | public void setFormat(String format) |
| | | { |
| | | this.format = format; |
| | | } |
| | | |
| | | public String getFormat() |
| | | { |
| | | return format; |
| | | } |
| | | |
| | | public void setSizeType(String sizeType) |
| | | { |
| | | this.sizeType = sizeType; |
| | | } |
| | | |
| | | public String getSizeType() |
| | | { |
| | | return sizeType; |
| | | } |
| | | |
| | | public void setHorizontalResolution(Long horizontalResolution) |
| | | { |
| | | this.horizontalResolution = horizontalResolution; |
| | | } |
| | | |
| | | public Long getHorizontalResolution() |
| | | { |
| | | return horizontalResolution; |
| | | } |
| | | |
| | | public void setVerticalResolution(Long verticalResolution) |
| | | { |
| | | this.verticalResolution = verticalResolution; |
| | | } |
| | | |
| | | public Long getVerticalResolution() |
| | | { |
| | | return verticalResolution; |
| | | } |
| | | |
| | | public void setWidth(Long width) |
| | | { |
| | | this.width = width; |
| | | } |
| | | |
| | | public Long getWidth() |
| | | { |
| | | return width; |
| | | } |
| | | |
| | | public void setHeight(Long height) |
| | | { |
| | | this.height = height; |
| | | } |
| | | |
| | | public Long getHeight() |
| | | { |
| | | return height; |
| | | } |
| | | |
| | | public void setFileSize(Long fileSize) |
| | | { |
| | | this.fileSize = fileSize; |
| | | } |
| | | |
| | | public Long getFileSize() |
| | | { |
| | | return fileSize; |
| | | } |
| | | |
| | | public void setAttachmentHistoryNumbers(String attachmentHistoryNumbers) |
| | | { |
| | | this.attachmentHistoryNumbers = attachmentHistoryNumbers; |
| | | } |
| | | |
| | | public String getAttachmentHistoryNumbers() |
| | | { |
| | | return attachmentHistoryNumbers; |
| | | } |
| | | |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | |
| | | public void setCreatedAt(Date createdAt) |
| | | { |
| | | this.createdAt = createdAt; |
| | | } |
| | | |
| | | public Date getCreatedAt() |
| | | { |
| | | return createdAt; |
| | | } |
| | | |
| | | public void setUpdatedAt(Date updatedAt) |
| | | { |
| | | this.updatedAt = updatedAt; |
| | | } |
| | | |
| | | public Date getUpdatedAt() |
| | | { |
| | | return updatedAt; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("materialId", getMaterialId()) |
| | | .append("creator", getCreator()) |
| | | .append("title", getTitle()) |
| | | .append("date", getDate()) |
| | | .append("pageNumber", getPageNumber()) |
| | | .append("pageOrder", getPageOrder()) |
| | | .append("stage", getStage()) |
| | | .append("publicity", getPublicity()) |
| | | .append("isAttachment", getIsAttachment()) |
| | | .append("isDiagram", getIsDiagram()) |
| | | .append("retentionPeriod", getRetentionPeriod()) |
| | | .append("securityLevel", getSecurityLevel()) |
| | | .append("isSensitive", getIsSensitive()) |
| | | .append("isCanceled", getIsCanceled()) |
| | | .append("format", getFormat()) |
| | | .append("sizeType", getSizeType()) |
| | | .append("horizontalResolution", getHorizontalResolution()) |
| | | .append("verticalResolution", getVerticalResolution()) |
| | | .append("width", getWidth()) |
| | | .append("height", getHeight()) |
| | | .append("fileSize", getFileSize()) |
| | | .append("attachmentHistoryNumbers", getAttachmentHistoryNumbers()) |
| | | .append("remarks", getRemarks()) |
| | | .append("createdAt", getCreatedAt()) |
| | | .append("updatedAt", getUpdatedAt()) |
| | | .toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface ArchiveCategoryMapper extends BaseMapper<ArchiveCategory> { |
| | | } |
| | |
| | | package com.ruoyi.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | @Mapper |
| | | public interface ArchiveRecordsMapper extends BaseMapper<ArchiveRecords> { |
| | | |
| | | |
| | | @Select("SELECT c.*,a.archive_records_id,b.user_id FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.record_id=a.archive_records_id ${ew.customSqlSegment} ") |
| | | Page<ArchiveRecords> selectJoinUserPage(Page<ArchiveRecords> page, @Param("ew") LambdaQueryWrapper<ArchiveRecords> queryWrapper); |
| | | |
| | | @Select("select max(id) from archive_records") |
| | | Long findMaxId(); |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Mapper接口 |
New file |
| | |
| | | package com.ruoyi.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface DocumentMaterialsMapper extends BaseMapper<DocumentMaterials> { |
| | | } |
New file |
| | |
| | | package com.ruoyi.service; |
| | | |
| | | |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 【请填写功能名称】Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | public interface IArchiveCategoryService |
| | | { |
| | | |
| | | |
| | | AjaxResult selectDataList(ArchiveCategory archiveCategory, Integer pageNum, Integer pageSize); |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | | * |
| | | * @param id 【请填写功能名称】主键 |
| | | * @return 【请填写功能名称】 |
| | | */ |
| | | public ArchiveCategory selectArchiveCategoryById(Long id); |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 【请填写功能名称】集合 |
| | | */ |
| | | public List<ArchiveCategory> selectArchiveCategoryList(ArchiveCategory archiveCategory); |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 结果 |
| | | */ |
| | | public int insertArchiveCategory(ArchiveCategory archiveCategory); |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 结果 |
| | | */ |
| | | public int updateArchiveCategory(ArchiveCategory archiveCategory); |
| | | |
| | | /** |
| | | * 批量删除【请填写功能名称】 |
| | | * |
| | | * @param ids 需要删除的【请填写功能名称】主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArchiveCategoryByIds(Long[] ids); |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】信息 |
| | | * |
| | | * @param id 【请填写功能名称】主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArchiveCategoryById(Long id); |
| | | } |
| | |
| | | */ |
| | | public interface IArchiveRecordsService |
| | | { |
| | | Long getMaxId(); |
| | | |
| | | AjaxResult selectDataList(ArchiveRecords archiveRecords, Integer pageNum, Integer pageSize); |
| | | |
| | |
| | | package com.ruoyi.service; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | * @date 2025-07-20 |
| | | */ |
| | | public interface IArchiverecordstouserService |
| | | public interface IArchiverecordstouserService |
| | | { |
| | | public int insertRecordToUsers(String recordId, Long[] userIds); |
| | | AjaxResult selectDataList(Archiverecordstouser archiverecordstouser, Integer pageNum, Integer pageSize); |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | | * |
New file |
| | |
| | | package com.ruoyi.service; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IDocumentMaterialsService { |
| | | |
| | | |
| | | AjaxResult selectDataList(DocumentMaterials documentMaterials, Integer pageNum, Integer pageSize); |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | | * @param materialId 【请填写功能名称】主键 |
| | | * @return 【请填写功能名称】 |
| | | */ |
| | | public DocumentMaterials selectDocumentMaterialsByMaterialId(String materialId); |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | * @param documentMaterials 【请填写功能名称】 |
| | | * @return 【请填写功能名称】集合 |
| | | */ |
| | | public List<DocumentMaterials> selectDocumentMaterialsList(DocumentMaterials documentMaterials); |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | * |
| | | * @param documentMaterials 【请填写功能名称】 |
| | | * @return |
| | | */ |
| | | public int insertDocumentMaterials(DocumentMaterials documentMaterials); |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | * |
| | | * @param documentMaterials 【请填写功能名称】 |
| | | * @return 结果 |
| | | */ |
| | | public int updateDocumentMaterials(DocumentMaterials documentMaterials); |
| | | |
| | | /** |
| | | * 批量删除【请填写功能名称】 |
| | | * |
| | | * @param materialIds 需要删除的【请填写功能名称】主键集合 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteDocumentMaterialsByMaterialIds(String[] materialIds); |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】信息 |
| | | * |
| | | * @param materialId 【请填写功能名称】主键 |
| | | * @return 结果 |
| | | */ |
| | | public int deleteDocumentMaterialsByMaterialId(String materialId); |
| | | } |
New file |
| | |
| | | package com.ruoyi.service.impl; |
| | | |
| | | |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.mapper.ArchiveCategoryMapper; |
| | | import com.ruoyi.mapper.ArchiveRecordsMapper; |
| | | import com.ruoyi.service.IArchiveCategoryService; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | /** |
| | | * 【请填写功能名称】Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | @Service |
| | | public class ArchiveCategoryServiceImpl extends ServiceImpl<ArchiveCategoryMapper, ArchiveCategory> implements IArchiveCategoryService |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | private LambdaQueryWrapper<ArchiveCategory> buildCondition(ArchiveCategory archiveRecords){ |
| | | LambdaQueryWrapper<ArchiveCategory> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.like(!StringUtils.isEmpty(archiveRecords.getNumb()), ArchiveCategory::getNumb, archiveRecords.getNumb()) |
| | | .like(!StringUtils.isEmpty(archiveRecords.getNname()), ArchiveCategory::getNname, archiveRecords.getNname()); |
| | | // lqw.like(!StringUtils.isEmpty(archiveRecords.getProjectName()), ArchiveRecords::getProjectName, archiveRecords.getProjectName()) |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getFilingNumber()), ArchiveRecords::getFilingNumber, archiveRecords.getFilingNumber()) |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getArchiveRoomNumber()), ArchiveRecords::getArchiveRoomNumber, archiveRecords.getArchiveRoomNumber()) |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId()); |
| | | // // .like(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark()) |
| | | // .eq(zfProperty.getFamilyId()!=null,ZfProperty::getFamilyId,zfProperty.getFamilyId()) |
| | | // .in(ZfProperty::getFamilyId,familyIdList) |
| | | // .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime()) |
| | | // .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime()); |
| | | // lqw.orderByDesc(ZfProperty::getCreateTime); |
| | | // lqw.orderByDesc(ArchiveRecords::isOwnData); |
| | | lqw.orderByDesc(ArchiveCategory::getCtime); |
| | | System.out.println("ssssssssssssddd0000000000000000"); |
| | | return lqw; |
| | | |
| | | } |
| | | @Override |
| | | public AjaxResult selectDataList(ArchiveCategory archiveCategory, Integer pageNum, Integer pageSize) { |
| | | LambdaQueryWrapper<ArchiveCategory> lqw = buildCondition(archiveCategory); |
| | | |
| | | |
| | | Page<ArchiveCategory> zfClanPage = new Page<>(pageNum, pageSize); |
| | | Page<ArchiveCategory> pageResult = page(zfClanPage, lqw); |
| | | |
| | | List<ArchiveCategory> beanRecords = pageResult.getRecords();//得到查询出来的数据 |
| | | |
| | | |
| | | |
| | | // List<ArchiveRecords> beanRecords = list(lqw); |
| | | // log.info("从数据库中查到的为:{}", beanRecords); |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | |
| | | |
| | | return AjaxResult.success(data); } |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | | * |
| | | * @param id 【请填写功能名称】主键 |
| | | * @return 【请填写功能名称】 |
| | | */ |
| | | @Override |
| | | public ArchiveCategory selectArchiveCategoryById(Long id) |
| | | { |
| | | LambdaQueryWrapper<ArchiveCategory> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(id!=null, ArchiveCategory::getId, id); |
| | | List<ArchiveCategory> records = list(lqw); |
| | | if(!records.isEmpty()) |
| | | return records.get(0); |
| | | else |
| | | return null; } |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 【请填写功能名称】 |
| | | */ |
| | | @Override |
| | | public List<ArchiveCategory> selectArchiveCategoryList(ArchiveCategory archiveCategory) |
| | | { |
| | | |
| | | LambdaQueryWrapper<ArchiveCategory> lambdaQueryWrapper = buildCondition(archiveCategory); |
| | | List<ArchiveCategory> beanRecords = list(lambdaQueryWrapper); |
| | | System.out.println(beanRecords.size()); |
| | | return beanRecords; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertArchiveCategory(ArchiveCategory archiveCategory) |
| | | { |
| | | LocalDateTime time = LocalDateTime.now(); |
| | | |
| | | Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
| | | archiveCategory.setCtime(date); |
| | | boolean res = this.save(archiveCategory); |
| | | if(res) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | * |
| | | * @param archiveCategory 【请填写功能名称】 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateArchiveCategory(ArchiveCategory archiveCategory) |
| | | { |
| | | |
| | | |
| | | boolean result = updateById(archiveCategory); |
| | | if(result) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 批量删除【请填写功能名称】 |
| | | * |
| | | * @param ids 需要删除的【请填写功能名称】主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArchiveCategoryByIds(Long[] ids) |
| | | { |
| | | |
| | | if (this.removeByIds(Arrays.asList(ids))) { |
| | | return 1; |
| | | } |
| | | else |
| | | return 0; |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】信息 |
| | | * |
| | | * @param id 【请填写功能名称】主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteArchiveCategoryById(Long id) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.service.impl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.mapper.ArchiveRecordsMapper; |
| | | import com.ruoyi.mapper.ArchiverecordstouserMapper; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | // @Autowired |
| | | // private ArchiveRecordsMapper archiveRecordsMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ArchiverecordstouserMapper archiverecordstouserMapper; |
| | | |
| | | |
| | | |
| | |
| | | // .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime()) |
| | | // .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime()); |
| | | // lqw.orderByDesc(ZfProperty::getCreateTime); |
| | | // lqw.orderByDesc(ArchiveRecords::isOwnData); |
| | | // lqw.orderByDesc(ArchiveRecords::getCreateTime); |
| | | lqw.orderByDesc(ArchiveRecords::getCreateTime); |
| | | System.out.println("ssssssssssssddd0000000000000000"); |
| | | return lqw; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Long getMaxId() { |
| | | //return this. |
| | | return baseMapper.findMaxId(); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult selectDataList(ArchiveRecords archiveRecords, Integer pageNum, Integer pageSize) { |
| | | |
| | |
| | | System.out.println("-------------"); |
| | | System.out.println(pageNum); |
| | | |
| | | Page<ArchiveRecords> zfClanPage = new Page<>(pageNum, pageSize); |
| | | Page<ArchiveRecords> pageResult = page(zfClanPage, lqw); |
| | | |
| | | |
| | | |
| | | Page<ArchiveRecords> page = new Page<>(pageNum, pageSize); |
| | | |
| | | // 使用自定义的分页查询方法,先连接再分页 |
| | | Page<ArchiveRecords> pageResult = this.baseMapper.selectJoinUserPage(page, lqw); |
| | | |
| | | |
| | | //selectJoinUserPage(page, lqw); |
| | | |
| | | |
| | | |
| | | List<ArchiveRecords> beanRecords = pageResult.getRecords();//得到查询出来的数据 |
| | | // List<ArchiveRecords> beanRecords = list(lqw); |
| | | // log.info("从数据库中查到的为:{}", beanRecords); |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | //拿到当前用户的id |
| | | // 获取当前用户ID |
| | | Long userid = SecurityUtils.getUserId(); |
| | | |
| | | beanRecords.forEach(record ->{ |
| | | if(record.isArchiveRecordsId()!=null&&record.getUserId()==userid) |
| | | { |
| | | record.setOwnData(true); |
| | | } |
| | | else |
| | | record.setOwnData(false); |
| | | }); |
| | | |
| | | // Collections.sort(beanRecords, Comparator.comparing(ArchiveRecords::isOwnData)); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | // System.out.println(data.get("data")); |
| | | // System.out.println(data.get("pageNum")); |
| | |
| | | @Override |
| | | public int insertArchiveRecords(ArchiveRecords archiveRecords) |
| | | { |
| | | LocalDateTime time = LocalDateTime.now(); |
| | | |
| | | Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
| | | archiveRecords.setCreateTime(date); |
| | | boolean res = this.save(archiveRecords); |
| | | if(res) |
| | | return 1; |
| | |
| | | package com.ruoyi.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.mapper.ArchiveRecordsMapper; |
| | | import com.ruoyi.mapper.ArchiverecordstouserMapper; |
| | | import com.ruoyi.service.IArchiverecordstouserService; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @date 2025-07-20 |
| | | */ |
| | | @Service |
| | | public class ArchiverecordstouserServiceImpl extends ServiceImpl<ArchiveRecordsMapper, ArchiveRecords> implements IArchiverecordstouserService |
| | | public class ArchiverecordstouserServiceImpl extends ServiceImpl<ArchiverecordstouserMapper, Archiverecordstouser> implements IArchiverecordstouserService |
| | | { |
| | | @Autowired |
| | | private SysUserMapper userMapper; |
| | | private LambdaQueryWrapper<Archiverecordstouser> buildCondition(Archiverecordstouser archiverecordstouser) { |
| | | LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(!StringUtils.isEmpty(archiverecordstouser.getArchiveRecordsId()),Archiverecordstouser::getArchiveRecordsId, archiverecordstouser.getArchiveRecordsId()); |
| | | |
| | | return lqw; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int insertRecordToUsers(String recordId, Long[] userIds) { |
| | | // 新增用户与角色管理 |
| | | List<Archiverecordstouser> list = new ArrayList<Archiverecordstouser>(); |
| | | for (Long userId : userIds) |
| | | { |
| | | Archiverecordstouser ur = new Archiverecordstouser(); |
| | | ur.setArchiveRecordsId(recordId); |
| | | ur.setUserId(userId); |
| | | list.add(ur); |
| | | } |
| | | boolean res = this.saveBatch(list); |
| | | if(res) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | // return userRoleMapper.batchUserRole(list); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult selectDataList(Archiverecordstouser archiverecordstouser, Integer pageNum, Integer pageSize) { |
| | | System.out.println(archiverecordstouser.getArchiveRecordsId()); |
| | | System.out.println("sssssssssssssssssssssssss"); |
| | | LambdaQueryWrapper<Archiverecordstouser> lqw = buildCondition(archiverecordstouser); |
| | | |
| | | |
| | | Page<Archiverecordstouser> zfClanPage = new Page<>(pageNum, pageSize); |
| | | Page<Archiverecordstouser> pageResult = page(zfClanPage, lqw); |
| | | |
| | | List<Archiverecordstouser> beanRecords = pageResult.getRecords();//得到查询出来的数据 |
| | | |
| | | |
| | | beanRecords.forEach(record -> { |
| | | if (record.getUserId() != null) { |
| | | SysUser user = userMapper.selectUserById(record.getUserId()); |
| | | record.setSysUser(user); // 假设Archiverecordstouser中有setUser方法 |
| | | } |
| | | }); |
| | | // List<ArchiveRecords> beanRecords = list(lqw); |
| | | // log.info("从数据库中查到的为:{}", beanRecords); |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | |
| | | |
| | | return AjaxResult.success(data); } |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
New file |
| | |
| | | package com.ruoyi.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.ArchiveRecords; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.mapper.DocumentMaterialsMapper; |
| | | import com.ruoyi.service.IArchiveCategoryService; |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | @Service |
| | | public class DocumentMaterialsServiceImpl extends ServiceImpl<DocumentMaterialsMapper, DocumentMaterials> implements IDocumentMaterialsService { |
| | | private LambdaQueryWrapper<DocumentMaterials> buildCondition(DocumentMaterials documentMaterials){ |
| | | LambdaQueryWrapper<DocumentMaterials> lqw = new LambdaQueryWrapper<>(); |
| | | |
| | | lqw.like(!StringUtils.isEmpty(documentMaterials.getCreator()), DocumentMaterials::getCreator, documentMaterials.getCreator()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getStage()), DocumentMaterials::getStage, documentMaterials.getStage()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getIsCanceled()), DocumentMaterials::getIsCanceled, documentMaterials.getIsCanceled()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getIsAttachment()), DocumentMaterials::getIsAttachment, documentMaterials.getIsAttachment()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getIsSensitive()), DocumentMaterials::getIsSensitive, documentMaterials.getIsSensitive()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getPublicity()), DocumentMaterials::getPublicity, documentMaterials.getPublicity()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getRetentionPeriod()), DocumentMaterials::getRetentionPeriod, documentMaterials.getRetentionPeriod()) |
| | | .like(!StringUtils.isEmpty(documentMaterials.getSecurityLevel()), DocumentMaterials::getSecurityLevel, documentMaterials.getSecurityLevel()) |
| | | .eq(documentMaterials.getDate()!=null, DocumentMaterials::getDate, documentMaterials.getDate()) |
| | | .eq(documentMaterials.getRecordId()!=null, DocumentMaterials::getRecordId, documentMaterials.getRecordId()); |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getFilingNumber()), ArchiveRecords::getFilingNumber, archiveRecords.getFilingNumber()) |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getArchiveRoomNumber()), ArchiveRecords::getArchiveRoomNumber, archiveRecords.getArchiveRoomNumber()) |
| | | // .like(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId, archiveRecords.getRecordId()); |
| | | // // .like(!StringUtils.isEmpty(zfProperty.getLocation()), ZfProperty::getLocation, zfProperty.getLocation()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getHolder()), ZfProperty::getHolder, zfProperty.getHolder()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getAddress()), ZfProperty::getAddress, zfProperty.getAddress()) |
| | | // .like(!StringUtils.isEmpty(zfProperty.getRemark()), ZfProperty::getRemark, zfProperty.getRemark()) |
| | | // .eq(zfProperty.getFamilyId()!=null,ZfProperty::getFamilyId,zfProperty.getFamilyId()) |
| | | // .in(ZfProperty::getFamilyId,familyIdList) |
| | | // .eq(zfProperty.getHappenTime()!=null,ZfProperty::getHappenTime,zfProperty.getHappenTime()) |
| | | // .between(zfProperty.getHappenStartTime() != null && zfProperty.getHappenEndTime() != null, ZfProperty::getHappenTime, zfProperty.getHappenStartTime(), zfProperty.getHappenEndTime()); |
| | | // lqw.orderByDesc(ZfProperty::getCreateTime); |
| | | // lqw.orderByDesc(ArchiveRecords::isOwnData) |
| | | lqw.orderByDesc(DocumentMaterials::getCreatedAt); |
| | | System.out.println("ssssssssssssddd0000000000000000"); |
| | | return lqw; |
| | | |
| | | } |
| | | @Override |
| | | public AjaxResult selectDataList(DocumentMaterials documentMaterials, Integer pageNum, Integer pageSize) { |
| | | LambdaQueryWrapper<DocumentMaterials> lqw = buildCondition(documentMaterials); |
| | | |
| | | |
| | | Page<DocumentMaterials> zfClanPage = new Page<>(pageNum, pageSize); |
| | | Page<DocumentMaterials> pageResult = page(zfClanPage, lqw); |
| | | |
| | | List<DocumentMaterials> beanRecords = pageResult.getRecords();//得到查询出来的数据 |
| | | |
| | | |
| | | // beanRecords.forEach(record -> { |
| | | // if (record.getUserId() != null) { |
| | | // SysUser user = userMapper.selectUserById(record.getUserId()); |
| | | // record.setSysUser(user); // 假设Archiverecordstouser中有setUser方法 |
| | | // } |
| | | // }); |
| | | // List<ArchiveRecords> beanRecords = list(lqw); |
| | | // log.info("从数据库中查到的为:{}", beanRecords); |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | |
| | | |
| | | return AjaxResult.success(data); } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public DocumentMaterials selectDocumentMaterialsByMaterialId(String materialId) { |
| | | |
| | | |
| | | LambdaQueryWrapper<DocumentMaterials> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(materialId!=null, DocumentMaterials::getMaterialId, materialId); |
| | | List<DocumentMaterials> records = list(lqw); |
| | | if(!records.isEmpty()) |
| | | return records.get(0); |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<DocumentMaterials> selectDocumentMaterialsList(DocumentMaterials documentMaterials) { |
| | | LambdaQueryWrapper<DocumentMaterials> lambdaQueryWrapper = buildCondition(documentMaterials); |
| | | List<DocumentMaterials> beanRecords = list(lambdaQueryWrapper); |
| | | |
| | | return beanRecords; |
| | | } |
| | | |
| | | @Override |
| | | public int insertDocumentMaterials(DocumentMaterials documentMaterials) { |
| | | LocalDateTime time = LocalDateTime.now(); |
| | | |
| | | Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant()); |
| | | documentMaterials.setCreatedAt(date); |
| | | boolean res = this.save(documentMaterials); |
| | | if(res) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int updateDocumentMaterials(DocumentMaterials documentMaterials) { |
| | | |
| | | boolean result = updateById(documentMaterials); |
| | | if(result) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteDocumentMaterialsByMaterialIds(String[] materialIds) { |
| | | if (this.removeByIds(Arrays.asList(materialIds))) { |
| | | return 1; |
| | | } |
| | | else |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteDocumentMaterialsByMaterialId(String materialId) { |
| | | return 0; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.archive; |
| | | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.domain.ArchiveCategory; |
| | | import com.ruoyi.framework.web.domain.server.Sys; |
| | | import com.ruoyi.service.IArchiveCategoryService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/category") |
| | | public class ArchiveCategoryController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IArchiveCategoryService archiveCategoryService; |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(ArchiveCategory archiveCategory) |
| | | { |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return archiveCategoryService.selectDataList(archiveCategory, pageNum, pageSize); |
| | | |
| | | } |
| | | @PreAuthorize("@ss.hasPermi('system:category:list')") |
| | | @GetMapping("/listAll") |
| | | public AjaxResult getAllCategory() |
| | | { |
| | | ArchiveCategory archiveCategory = new ArchiveCategory(); |
| | | return success(archiveCategoryService.selectArchiveCategoryList(archiveCategory)); |
| | | } |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:export')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArchiveCategory archiveCategory) |
| | | { |
| | | List<ArchiveCategory> list = archiveCategoryService.selectArchiveCategoryList(archiveCategory); |
| | | |
| | | System.out.println(list); |
| | | ExcelUtil<ArchiveCategory> util = new ExcelUtil<ArchiveCategory>(ArchiveCategory.class); |
| | | util.exportExcel(response, list, "案卷类别信息"); |
| | | } |
| | | |
| | | /** |
| | | * 获取【请填写功能名称】详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(archiveCategoryService.selectArchiveCategoryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:add')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArchiveCategory archiveCategory) |
| | | { |
| | | return toAjax(archiveCategoryService.insertArchiveCategory(archiveCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:edit')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArchiveCategory archiveCategory) |
| | | { |
| | | return toAjax(archiveCategoryService.updateArchiveCategory(archiveCategory)); |
| | | } |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:category:remove')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(archiveCategoryService.deleteArchiveCategoryByIds(ids)); |
| | | } |
| | | } |
| | |
| | | return archiveRecordsService.selectDataList(archiveRecords, pageNum, pageSize); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 拿到最大id |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:records:list')") |
| | | @GetMapping("/getMaxId") |
| | | public AjaxResult getMaxId() |
| | | { |
| | | return success(archiveRecordsService.getMaxId()+1); |
| | | } |
| | | /** |
| | | * 导出档案记录列表 |
| | | */ |
| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.service.IArchiverecordstouserService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Controller |
| | | * |
| | |
| | | @Autowired |
| | | private IArchiverecordstouserService archiverecordstouserService; |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')") |
| | | |
| | | @PutMapping("/authUserToArchive") |
| | | public AjaxResult selectRecordToUser(String recordId, Long[] userIds) |
| | | { |
| | | return toAjax(archiverecordstouserService.insertRecordToUsers(recordId, userIds)); |
| | | } |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(Archiverecordstouser archiverecordstouser) |
| | | public AjaxResult list(Archiverecordstouser archiverecordstouser) |
| | | { |
| | | startPage(); |
| | | List<Archiverecordstouser> list = archiverecordstouserService.selectArchiverecordstouserList(archiverecordstouser); |
| | | return getDataTable(list); |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return archiverecordstouserService.selectDataList(archiverecordstouser, pageNum, pageSize); |
| | | |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.ruoyi.web.controller.archive; |
| | | |
| | | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.text.Convert; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.domain.DocumentMaterials; |
| | | import com.ruoyi.service.IDocumentMaterialsService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; |
| | | import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-07-28 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/materials") |
| | | public class DocumentMaterialsController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDocumentMaterialsService documentMaterialsService; |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(DocumentMaterials documentMaterials) |
| | | { |
| | | |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return documentMaterialsService.selectDataList(documentMaterials, pageNum, pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 导出【请填写功能名称】列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:export')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, DocumentMaterials documentMaterials) |
| | | { |
| | | List<DocumentMaterials> list = documentMaterialsService.selectDocumentMaterialsList(documentMaterials); |
| | | ExcelUtil<DocumentMaterials> util = new ExcelUtil<DocumentMaterials>(DocumentMaterials.class); |
| | | util.exportExcel(response, list, "【请填写功能名称】数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取【请填写功能名称】详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:query')") |
| | | @GetMapping(value = "/{materialId}") |
| | | public AjaxResult getInfo(@PathVariable("materialId") String materialId) |
| | | { |
| | | return success(documentMaterialsService.selectDocumentMaterialsByMaterialId(materialId)); |
| | | } |
| | | |
| | | /** |
| | | * 新增【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:add')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody DocumentMaterials documentMaterials) |
| | | { |
| | | return toAjax(documentMaterialsService.insertDocumentMaterials(documentMaterials)); |
| | | } |
| | | |
| | | /** |
| | | * 修改【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:edit')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody DocumentMaterials documentMaterials) |
| | | { |
| | | return toAjax(documentMaterialsService.updateDocumentMaterials(documentMaterials)); |
| | | } |
| | | |
| | | /** |
| | | * 删除【请填写功能名称】 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:materials:remove')") |
| | | @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{materialIds}") |
| | | public AjaxResult remove(@PathVariable String[] materialIds) |
| | | { |
| | | return toAjax(documentMaterialsService.deleteDocumentMaterialsByMaterialIds(materialIds)); |
| | | } |
| | | } |