学生奖惩内容
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.srs.routine.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
@@ -10,7 +11,6 @@ import lombok.*;
|
||||
import com.srs.common.core.domain.BaseEntity;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 测试对象 rt_stu_at_school
|
||||
*
|
||||
@@ -22,10 +22,10 @@ import com.srs.common.core.domain.BaseEntity;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@ApiModel(value = "RtStuAtSchool对象" , description = "在校证明")
|
||||
@ApiModel(value = "RtStuAtSchool对象", description = "在校证明")
|
||||
@TableName("rt_stu_at_school")
|
||||
public class RtStuAtSchool extends BaseEntity{
|
||||
private static final long serialVersionUID=1L;
|
||||
public class RtStuAtSchool extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 学生id
|
||||
@@ -88,7 +88,7 @@ private static final long serialVersionUID=1L;
|
||||
@ApiModelProperty("申请时间")
|
||||
@TableField("stu_created")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "申请时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date stuCreated;
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,6 @@ private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 原因
|
||||
|
||||
*/
|
||||
@ApiModelProperty("原因")
|
||||
@TableField("because")
|
||||
@@ -146,7 +145,7 @@ private static final long serialVersionUID=1L;
|
||||
@ApiModelProperty("入学时间")
|
||||
@TableField("Intake")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入学时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "入学时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date Intake;
|
||||
|
||||
/**
|
||||
@@ -243,7 +242,7 @@ private static final long serialVersionUID=1L;
|
||||
@ApiModelProperty("辅导员审批时间")
|
||||
@TableField("fdtime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "辅导员审批时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "辅导员审批时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date fdtime;
|
||||
|
||||
/**
|
||||
@@ -252,8 +251,8 @@ private static final long serialVersionUID=1L;
|
||||
@ApiModelProperty("学工处审批时间")
|
||||
@TableField("xgtime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "学工处审批时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "学工处审批时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date xgtime;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.srs.routine.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.srs.common.annotation.Excel;
|
||||
import com.srs.common.core.domain.entity.SysUser;
|
||||
import com.srs.common.exception.ServiceException;
|
||||
import com.srs.common.utils.SecurityUtils;
|
||||
import com.srs.system.service.ISysUserService;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -61,18 +67,14 @@ public class RtStuAtSchoolServiceImpl extends ServiceImpl<RtStuAtSchoolMapper,Rt
|
||||
*/
|
||||
@Override
|
||||
public int insertRtStuAtSchool(RtStuAtSchool rtStuAtSchool) {
|
||||
|
||||
RtStuAtSchool rtStuAtSchool1 = rtStuAtSchoolMapper.selectRtStuAtSchoolByStudentId(rtStuAtSchool.getStudentId());
|
||||
if (rtStuAtSchool1 != null){
|
||||
throw new ServiceException("申请已提交,请勿重复提交", 500);
|
||||
}
|
||||
|
||||
SysUser sysUser = sysUserService.selectUserByUserName(rtStuAtSchool.getStudentId());
|
||||
if (sysUser == null) {
|
||||
throw new ServiceException("该学生不存在", 500);
|
||||
}
|
||||
|
||||
|
||||
return rtStuAtSchoolMapper.insertRtStuAtSchool(rtStuAtSchool);
|
||||
}
|
||||
|
||||
@@ -84,6 +86,12 @@ public class RtStuAtSchoolServiceImpl extends ServiceImpl<RtStuAtSchoolMapper,Rt
|
||||
*/
|
||||
@Override
|
||||
public int updateRtStuAtSchool(RtStuAtSchool rtStuAtSchool) {
|
||||
// 如果学工意见和学工审核状态不为空,去到当前登陆人的姓名赋值给学工姓名,并给学工处审核 时间赋值,取出当前时间
|
||||
if (rtStuAtSchool.getXgopinion() != null && rtStuAtSchool.getXgstatus() != null) {
|
||||
rtStuAtSchool.setXgname(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
rtStuAtSchool.setXgtime(new Date());
|
||||
}
|
||||
|
||||
return rtStuAtSchoolMapper.updateRtStuAtSchool(rtStuAtSchool);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user