Browse Source

feat: [试验管理] 增加借阅时间字段,增加类型字段

master
memorylkf 1 week ago
parent
commit
092d6c5d22
3 changed files with 89 additions and 1 deletions
  1. +32
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java
  2. +56
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyTypeEnum.java
  3. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml

+ 32
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Study.java View File

@ -16,6 +16,9 @@ public class Study extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 类型1试验,5非试验表单,10麻精药表单 */
private Integer type;
/** 试验编号 */
@Compare(name = "试验编号")
private String sn;
@ -36,9 +39,22 @@ public class Study extends MpBaseEntity
/** 借阅状态1未借阅,5待借阅,10借阅中 */
private Integer borrowStatus;
/** 借阅开始日期 */
private String borrowStartDate;
/** 借阅结束日期 */
private String borrowEndDate;
@Compare(name = "试验简述")
private String remark;
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public void setSn(String sn)
{
@ -98,6 +114,22 @@ public class Study extends MpBaseEntity
return borrowStatus;
}
public String getBorrowStartDate() {
return borrowStartDate;
}
public void setBorrowStartDate(String borrowStartDate) {
this.borrowStartDate = borrowStartDate;
}
public String getBorrowEndDate() {
return borrowEndDate;
}
public void setBorrowEndDate(String borrowEndDate) {
this.borrowEndDate = borrowEndDate;
}
@Override
public String getRemark() {
return remark;

+ 56
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyTypeEnum.java View File

@ -0,0 +1,56 @@
package com.hxhq.business.enums.study;
/**
* 试验类型1试验5非试验表单10麻精药表单
* @author tanfei
*/
public enum StudyTypeEnum {
/**
* 1试验
*/
sy(1, "试验"),
/**
* 5非试验表单
*/
fsy(5, "非试验表单"),
/**
* 10麻精药表单
*/
mjy(10, "麻精药表单");
private int value;
private String text;
StudyTypeEnum(int value, String text) {
this.value = value;
this.text = text;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public static StudyTypeEnum getEnumByValue(int type) {
for (StudyTypeEnum bt : values()) {
if (bt.value == type) {
return bt;
}
}
return null;
}
}

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyMapper.xml View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyListDto">
SELECT s.`id`,s.`sn`,s.`name`,s.`leader`,s.`leader_name`,s.`status`,s.`borrow_status`,s.`create_time`,s.`create_by` FROM `t_study` s
SELECT s.`id`,s.`type`,s.`sn`,s.`name`,s.`leader`,s.`leader_name`,s.`status`,s.`borrow_status`,s.`create_time`,s.`create_by` FROM `t_study` s
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}

Loading…
Cancel
Save