Commit 4dfd417c5999d88980d655d60f59a3e487790f9a
1 parent
62e2c712
档案借阅
Showing
7 changed files
with
216 additions
and
5 deletions
ruoyi-archives/src/main/java/com/ruoyi/controller/ArchivesBorrowController.java
0 → 100644
| 1 | +package com.ruoyi.controller; | |
| 2 | + | |
| 3 | +import com.ruoyi.common.annotation.Log; | |
| 4 | +import com.ruoyi.common.core.controller.BaseController; | |
| 5 | +import com.ruoyi.common.core.domain.AjaxResult; | |
| 6 | +import com.ruoyi.common.core.page.TableDataInfo; | |
| 7 | +import com.ruoyi.common.enums.BusinessType; | |
| 8 | +import com.ruoyi.common.utils.poi.ExcelUtil; | |
| 9 | +import com.ruoyi.domain.ArchivesBorrow; | |
| 10 | +import com.ruoyi.domain.ArchivesBox; | |
| 11 | +import com.ruoyi.service.IArchivesBorrowService; | |
| 12 | +import com.ruoyi.service.IArchivesBoxService; | |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 15 | +import org.springframework.web.bind.annotation.*; | |
| 16 | + | |
| 17 | +import javax.servlet.http.HttpServletResponse; | |
| 18 | +import java.util.List; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * 【请填写功能名称】Controller | |
| 22 | + * | |
| 23 | + * @author ym | |
| 24 | + * @date 2022-08-23 | |
| 25 | + */ | |
| 26 | +@RestController | |
| 27 | +@RequestMapping("/archives/borrow") | |
| 28 | +public class ArchivesBorrowController extends BaseController | |
| 29 | +{ | |
| 30 | + @Autowired | |
| 31 | + private IArchivesBorrowService archivesBorrowService; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 查询【请填写功能名称】列表 | |
| 35 | + */ | |
| 36 | + @PreAuthorize("@ss.hasPermi('archives:borrow:list')") | |
| 37 | + @GetMapping("/list") | |
| 38 | + public TableDataInfo list(ArchivesBorrow archivesBorrow) | |
| 39 | + { | |
| 40 | + startPage(); | |
| 41 | + List<ArchivesBorrow> list = archivesBorrowService.selectArchivesBorrowListByFilingDept(archivesBorrow); | |
| 42 | + return getDataTable(list); | |
| 43 | + } | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | +} | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/domain/ArchivesBorrow.java
| ... | ... | @@ -78,11 +78,16 @@ public class ArchivesBorrow extends BaseEntity |
| 78 | 78 | @Excel(name = "待归还日期", width = 30, dateFormat = "yyyy-MM-dd") |
| 79 | 79 | private Date returnDate; |
| 80 | 80 | |
| 81 | + /** 实际还日期 */ | |
| 82 | + @JsonFormat(pattern = "yyyy-MM-dd") | |
| 83 | + @Excel(name = "实际还日期", width = 30, dateFormat = "yyyy-MM-dd") | |
| 84 | + private Date returnedDate; | |
| 85 | + | |
| 81 | 86 | /** 借阅单号 */ |
| 82 | 87 | @Excel(name = "借阅单号") |
| 83 | 88 | private String borrowMark; |
| 84 | 89 | |
| 85 | - /** 申请状态 0-待审核 1-通过 2-不通过*/ | |
| 90 | + /** 借阅状态 0-借出 1-归还 2-逾期*/ | |
| 86 | 91 | @Excel(name = "申请状态") |
| 87 | 92 | private String status; |
| 88 | 93 | |
| ... | ... | @@ -92,6 +97,8 @@ public class ArchivesBorrow extends BaseEntity |
| 92 | 97 | @JsonFormat(pattern = "yyyy-MM-dd") |
| 93 | 98 | private Date borrowDateE; |
| 94 | 99 | |
| 100 | + private Long filingDept; | |
| 101 | + | |
| 95 | 102 | public Long getId() { |
| 96 | 103 | return id; |
| 97 | 104 | } |
| ... | ... | @@ -220,6 +227,14 @@ public class ArchivesBorrow extends BaseEntity |
| 220 | 227 | this.returnDate = returnDate; |
| 221 | 228 | } |
| 222 | 229 | |
| 230 | + public Date getReturnedDate() { | |
| 231 | + return returnedDate; | |
| 232 | + } | |
| 233 | + | |
| 234 | + public void setReturnedDate(Date returnedDate) { | |
| 235 | + this.returnedDate = returnedDate; | |
| 236 | + } | |
| 237 | + | |
| 223 | 238 | public String getBorrowMark() { |
| 224 | 239 | return borrowMark; |
| 225 | 240 | } |
| ... | ... | @@ -252,6 +267,14 @@ public class ArchivesBorrow extends BaseEntity |
| 252 | 267 | this.borrowDateE = borrowDateE; |
| 253 | 268 | } |
| 254 | 269 | |
| 270 | + public Long getFilingDept() { | |
| 271 | + return filingDept; | |
| 272 | + } | |
| 273 | + | |
| 274 | + public void setFilingDept(Long filingDept) { | |
| 275 | + this.filingDept = filingDept; | |
| 276 | + } | |
| 277 | + | |
| 255 | 278 | @Override |
| 256 | 279 | public String toString() { |
| 257 | 280 | return "ArchivesBorrow{" + |
| ... | ... | @@ -270,10 +293,12 @@ public class ArchivesBorrow extends BaseEntity |
| 270 | 293 | ", updateBy='" + updateBy + '\'' + |
| 271 | 294 | ", updateTime=" + updateTime + |
| 272 | 295 | ", returnDate=" + returnDate + |
| 296 | + ", returnedDate=" + returnedDate + | |
| 273 | 297 | ", borrowMark='" + borrowMark + '\'' + |
| 274 | 298 | ", status='" + status + '\'' + |
| 275 | 299 | ", borrowDateS=" + borrowDateS + |
| 276 | 300 | ", borrowDateE=" + borrowDateE + |
| 301 | + ", filingDept=" + filingDept + | |
| 277 | 302 | '}'; |
| 278 | 303 | } |
| 279 | 304 | } | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/mapper/ArchivesBorrowMapper.java
| ... | ... | @@ -15,9 +15,17 @@ public interface ArchivesBorrowMapper |
| 15 | 15 | /** |
| 16 | 16 | * 查询【请填写功能名称】列表 |
| 17 | 17 | * |
| 18 | - * @param archivesBox 【请填写功能名称】 | |
| 18 | + * @param archivesBorrow 【请填写功能名称】 | |
| 19 | 19 | * @return 【请填写功能名称】集合 |
| 20 | 20 | */ |
| 21 | - List<ArchivesBorrow> selectArchivesBorrowList(ArchivesBorrow archivesBox); | |
| 21 | + List<ArchivesBorrow> selectArchivesBorrowList(ArchivesBorrow archivesBorrow); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 查询【请填写功能名称】列表 | |
| 25 | + * | |
| 26 | + * @param archivesBorrow 【请填写功能名称】 | |
| 27 | + * @return 【请填写功能名称】集合 | |
| 28 | + */ | |
| 29 | + List<ArchivesBorrow> selectArchivesBorrowListByFilingDept(ArchivesBorrow archivesBorrow); | |
| 22 | 30 | |
| 23 | 31 | } | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/service/IArchivesBorrowService.java
| ... | ... | @@ -21,4 +21,12 @@ public interface IArchivesBorrowService |
| 21 | 21 | */ |
| 22 | 22 | List<ArchivesBorrow> selectArchivesBorrowList(ArchivesBorrow archivesBorrow); |
| 23 | 23 | |
| 24 | + /** | |
| 25 | + * 查询【请填写功能名称】列表 | |
| 26 | + * | |
| 27 | + * @param archivesBorrow 【请填写功能名称】 | |
| 28 | + * @return 【请填写功能名称】集合 | |
| 29 | + */ | |
| 30 | + List<ArchivesBorrow> selectArchivesBorrowListByFilingDept(ArchivesBorrow archivesBorrow); | |
| 31 | + | |
| 24 | 32 | } | ... | ... |
ruoyi-archives/src/main/java/com/ruoyi/service/impl/ArchivesBorrowServiceImpl.java
| 1 | 1 | package com.ruoyi.service.impl; |
| 2 | 2 | |
| 3 | 3 | import com.ruoyi.domain.ArchivesBorrow; |
| 4 | -import com.ruoyi.domain.ArchivesBox; | |
| 5 | 4 | import com.ruoyi.mapper.ArchivesBorrowMapper; |
| 6 | 5 | import com.ruoyi.service.IArchivesBorrowService; |
| 7 | 6 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -33,4 +32,16 @@ public class ArchivesBorrowServiceImpl implements IArchivesBorrowService |
| 33 | 32 | return archivesBorrowMapper.selectArchivesBorrowList(archivesBorrow); |
| 34 | 33 | } |
| 35 | 34 | |
| 35 | + /** | |
| 36 | + * 查询【请填写功能名称】列表 | |
| 37 | + * | |
| 38 | + * @param archivesBorrow 【请填写功能名称】 | |
| 39 | + * @return 【请填写功能名称】 | |
| 40 | + */ | |
| 41 | + @Override | |
| 42 | + public List<ArchivesBorrow> selectArchivesBorrowListByFilingDept(ArchivesBorrow archivesBorrow) | |
| 43 | + { | |
| 44 | + return archivesBorrowMapper.selectArchivesBorrowListByFilingDept(archivesBorrow); | |
| 45 | + } | |
| 46 | + | |
| 36 | 47 | } | ... | ... |
ruoyi-archives/src/main/resources/mapper/archives/ArchivesBorrowMapper.xml
| ... | ... | @@ -20,7 +20,8 @@ |
| 20 | 20 | <result property="updateBy" column="update_by" /> |
| 21 | 21 | <result property="updateTime" column="update_time" /> |
| 22 | 22 | <result property="returnDate" column="return_date" /> |
| 23 | - <result property="borrow_mark" column="borrowMark" /> | |
| 23 | + <result property="returnedDate" column="returned_date" /> | |
| 24 | + <result property="borrowMark" column="borrow_mark" /> | |
| 24 | 25 | <result property="status" column="status" /> |
| 25 | 26 | </resultMap> |
| 26 | 27 | |
| ... | ... | @@ -40,4 +41,15 @@ |
| 40 | 41 | </where> |
| 41 | 42 | </select> |
| 42 | 43 | |
| 44 | + <select id="selectArchivesBorrowListByFilingDept" parameterType="ArchivesBorrow" resultMap="ArchivesBorrowResult"> | |
| 45 | + select a.* from archives_borrow a,archives_collect_box b where a.collect_box_id=b.id | |
| 46 | + <if test="name != null and name != ''"> and a.name = #{name}</if> | |
| 47 | + <if test="dept != null and dept != ''"> and a.dept = #{dept}</if> | |
| 48 | + <if test="borrowDate != null and borrowDate != ''"> and a.borrow_date = #{borrowDate}</if> | |
| 49 | + <if test="borrowDateS != null and borrowDateS != ''"> and a.borrow_date >= #{borrowDateS}</if> | |
| 50 | + <if test="borrowDateE != null and borrowDateE != ''"> and a.borrow_date <= #{borrowDateE}</if> | |
| 51 | + <if test="borrowMark != null and borrowMark != ''"> and a.borrow_mark = #{borrowMark}</if> | |
| 52 | + <if test="filingDept != null and filingDept != ''"> and b.filing_dept = #{filingDept}</if> | |
| 53 | + </select> | |
| 54 | + | |
| 43 | 55 | </mapper> |
| 44 | 56 | \ No newline at end of file | ... | ... |
ruoyi-service/src/main/java/com/ruoyi/service/domain/ArchivesBorrowRecord.java
0 → 100644
| 1 | +package com.ruoyi.service.domain; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
| 5 | +import com.ruoyi.domain.ArchivesBorrow; | |
| 6 | +import java.util.Date; | |
| 7 | + | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 借阅记录 archives_borrow_record | |
| 11 | + * | |
| 12 | + * @author ym | |
| 13 | + */ | |
| 14 | +public class ArchivesBorrowRecord extends ArchivesBorrow | |
| 15 | +{ | |
| 16 | + private static final long serialVersionUID = 1L; | |
| 17 | + | |
| 18 | + private Long id; | |
| 19 | + | |
| 20 | + /** 借阅申请 */ | |
| 21 | + private Long borrowId; | |
| 22 | + | |
| 23 | + /** 借阅文件 */ | |
| 24 | + private Long archivesId; | |
| 25 | + | |
| 26 | + /** 领取时间 */ | |
| 27 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 28 | + private Date createTime; | |
| 29 | + | |
| 30 | + /** 状态 0-借出 1-归还 2-逾期 */ | |
| 31 | + private String recordStatus; | |
| 32 | + | |
| 33 | + /** 归还时间 */ | |
| 34 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |
| 35 | + private Date returnedTime; | |
| 36 | + | |
| 37 | + @Override | |
| 38 | + public Long getId() { | |
| 39 | + return id; | |
| 40 | + } | |
| 41 | + | |
| 42 | + @Override | |
| 43 | + public void setId(Long id) { | |
| 44 | + this.id = id; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public Long getBorrowId() { | |
| 48 | + return borrowId; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void setBorrowId(Long borrowId) { | |
| 52 | + this.borrowId = borrowId; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public Long getArchivesId() { | |
| 56 | + return archivesId; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public void setArchivesId(Long archivesId) { | |
| 60 | + this.archivesId = archivesId; | |
| 61 | + } | |
| 62 | + | |
| 63 | + @Override | |
| 64 | + public Date getCreateTime() { | |
| 65 | + return createTime; | |
| 66 | + } | |
| 67 | + | |
| 68 | + @Override | |
| 69 | + public void setCreateTime(Date createTime) { | |
| 70 | + this.createTime = createTime; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getRecordStatus() { | |
| 74 | + return recordStatus; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setRecordStatus(String recordStatus) { | |
| 78 | + this.recordStatus = recordStatus; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public Date getReturnedTime() { | |
| 82 | + return returnedTime; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setReturnedTime(Date returnedTime) { | |
| 86 | + this.returnedTime = returnedTime; | |
| 87 | + } | |
| 88 | + | |
| 89 | + @Override | |
| 90 | + public String toString() { | |
| 91 | + return "ArchivesBorrowRecord{" + | |
| 92 | + "id=" + id + | |
| 93 | + ", borrowId=" + borrowId + | |
| 94 | + ", archivesId=" + archivesId + | |
| 95 | + ", createTime=" + createTime + | |
| 96 | + ", recordStatus='" + recordStatus + '\'' + | |
| 97 | + ", returnedTime=" + returnedTime + | |
| 98 | + '}'; | |
| 99 | + } | |
| 100 | +} | ... | ... |