杨校老师项目之基于SSM大学生创新创业项目管理系统

简介: 杨校老师项目之基于SSM大学生创新创业项目管理系统
1. 获取代码:

自助下载获取https://download.csdn.net/download/kese7952/85357941

2. 项目描述

基于SSM框架开发的大学生创新创业项目管理平台。

3.功能简介

4. 技术栈:

html + JavaScript + Ajax + SSM + MySQL + LayUI + Bootstrap

5. 运行环境

IntelliJ IDEA/Eclipse + MySQL5.7+ JDK1.8 + Maven3.5.4 + Tomcat9.0 + Redis6.1

6.后台界面

后台首页

角色管理


用户管理

权限管理

通知管理

文件管理


所有项目

中期检查

立项阶段

结题阶段

管理员个人资料


7. 前台界面


8. 代码展示
  • 8.1 评审的实体类
package com.ieps.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Mryang
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Review implements Serializable {
    
    private Integer id;
    
    // 评委职工号
    private String userNum;
    
    // 项目编号
    private String itemNum;
    
    // 分数
    private BigDecimal reviewScore;
    
    // 评审意见
    private String reviewOption;
    
    // 评审类型(0:立项申请;1:中期检查;2:结题申请)
    private Integer reviewType;
    
    // 评审级别(0:指导老师评审;1:学院评审;2:学校评审)
    private Integer reviewLevel;
    
    // 评审时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date reviewTime;
    
    private Date createTime;
    
    private Date updateTime;
    
}

  • 8.2 评审的controller控制器
package com.ieps.controller;

import com.ieps.common.ServerResponse;
import com.ieps.dto.ReviewAdminDto;
import com.ieps.pojo.User;
import com.ieps.service.ReviewAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * @author Mryang
 */
@Controller
public class ReviewAdminController {

    @Autowired
    private ReviewAdminService reviewAdminService;
    
    /**
     * 根据项目编号(itemNum)评审结果,分页显示
     * @param page
     * @param itemNum
     * @param limit
     * @param session
     * @param userNum
     * @return
     */
    @RequestMapping("/getAllReviewWithItemNum.do")
    @ResponseBody
    public ServerResponse getAllReviewWithItemNum(@RequestParam(value = "page", defaultValue = "1") int page, String itemNum,
                                                  @RequestParam(value = "limit", defaultValue = "10") int limit, HttpSession session,
                                                  @RequestParam("userNum") String userNum) {
    
    
        User user = (User) session.getAttribute("activeUser");
    
        
        return reviewAdminService.getAllReviewListWithItemNum(page, limit, itemNum);
    
    }
    
    
    @RequestMapping("/checkReview.do")
    @ResponseBody
    public ServerResponse checkReview(ReviewAdminDto reviewAdminDto, HttpSession session) {
       
        User user = (User) session.getAttribute("activeUser");
        
        return reviewAdminService.checkReview(reviewAdminDto);
        
    }
    

}

  • 8.3 评审的业务逻辑接口
package com.ieps.service;

import com.ieps.common.ServerResponse;
import com.ieps.dto.ReviewAdminDto;

/**
 * @author Mryang
 */
public interface ReviewAdminService {
    
    ServerResponse getAllReviewListWithItemNum(int pageNum, int pageSize, String itemNum);
    
    ServerResponse checkReview(ReviewAdminDto reviewAdminDto);
    
}


  • 8.4 货物的业务逻辑接口的实现类
package com.ieps.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ieps.common.ServerResponse;
import com.ieps.dto.ReviewAdminDto;
import com.ieps.mapper.ReviewMapper;
import com.ieps.service.ReviewAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mryang
 */
@Service
public class ReviewAdminServiceImpl implements ReviewAdminService {
    
    @Autowired
    private ReviewMapper reviewMapper;
    
    
    @Override
    public ServerResponse getAllReviewListWithItemNum(int pageNum, int pageSize, String itemNum) {
    
        PageHelper.startPage(pageNum, pageSize);
    
        List<ReviewAdminDto> reviewAdminDtoList = reviewMapper.selectAllReviewListWithItemNum(itemNum);
        
        
        // 评审类型:1:立项评审;2:中期检查;3:结题评审
        for (int i = 0; i < reviewAdminDtoList.size(); i++) {
            if (reviewAdminDtoList.get(i).getReviewType() == 1) {
                reviewAdminDtoList.get(i).setReviewAdminType("立项评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewType() == 2) {
                reviewAdminDtoList.get(i).setReviewAdminType("中期检查");
            }
            else if (reviewAdminDtoList.get(i).getReviewType() == 3) {
                reviewAdminDtoList.get(i).setReviewAdminType("结题评审");
            }
        }
        
        // 评审级别: 1:院级评审;2:校级评审;3:省区级评审;4:国家级评审
        for (int i = 0; i < reviewAdminDtoList.size(); i++) {
            if (reviewAdminDtoList.get(i).getReviewLevel() == 1) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("院级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 2) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("校级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 3) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("省区级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 4) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("国家级评审");
            }
        }
    
        PageInfo pageInfo = new PageInfo(reviewAdminDtoList);
        
        return ServerResponse.createBySuccess(pageInfo);
    }
    
    @Override
    public ServerResponse checkReview(ReviewAdminDto reviewAdminDto) {
        List<ReviewAdminDto> reviewAdminDtoList = reviewMapper.selectReviewWithMultCondition(reviewAdminDto);
        if (reviewAdminDtoList.size() > 0 ) {
            return ServerResponse.createByErrorMessage("对不起,你已经上传了一次同类型的文件,请重新操作!");
        }
    
        return ServerResponse.createBySuccess("恭喜你,上传文件成功!");
    }
}


package com.ieps.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ieps.common.ServerResponse;
import com.ieps.dto.ReviewAdminDto;
import com.ieps.mapper.ReviewMapper;
import com.ieps.service.ReviewAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mryang
 */
@Service
public class ReviewAdminServiceImpl implements ReviewAdminService {
    
    @Autowired
    private ReviewMapper reviewMapper;
    
    
    @Override
    public ServerResponse getAllReviewListWithItemNum(int pageNum, int pageSize, String itemNum) {
    
        PageHelper.startPage(pageNum, pageSize);
    
        List<ReviewAdminDto> reviewAdminDtoList = reviewMapper.selectAllReviewListWithItemNum(itemNum);
        
        
        // 评审类型:1:立项评审;2:中期检查;3:结题评审
        for (int i = 0; i < reviewAdminDtoList.size(); i++) {
            if (reviewAdminDtoList.get(i).getReviewType() == 1) {
                reviewAdminDtoList.get(i).setReviewAdminType("立项评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewType() == 2) {
                reviewAdminDtoList.get(i).setReviewAdminType("中期检查");
            }
            else if (reviewAdminDtoList.get(i).getReviewType() == 3) {
                reviewAdminDtoList.get(i).setReviewAdminType("结题评审");
            }
        }
        
        // 评审级别: 1:院级评审;2:校级评审;3:省区级评审;4:国家级评审
        for (int i = 0; i < reviewAdminDtoList.size(); i++) {
            if (reviewAdminDtoList.get(i).getReviewLevel() == 1) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("院级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 2) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("校级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 3) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("省区级评审");
            }
            else if (reviewAdminDtoList.get(i).getReviewLevel() == 4) {
                reviewAdminDtoList.get(i).setReviewAdminLevel("国家级评审");
            }
        }
    
        PageInfo pageInfo = new PageInfo(reviewAdminDtoList);
        
        return ServerResponse.createBySuccess(pageInfo);
    }
    
    @Override
    public ServerResponse checkReview(ReviewAdminDto reviewAdminDto) {
        List<ReviewAdminDto> reviewAdminDtoList = reviewMapper.selectReviewWithMultCondition(reviewAdminDto);
        if (reviewAdminDtoList.size() > 0 ) {
            return ServerResponse.createByErrorMessage("对不起,你已经上传了一次同类型的文件,请重新操作!");
        }
    
        return ServerResponse.createBySuccess("恭喜你,上传文件成功!");
    }
}


  • 8.5 评审的数据持久层的接口
package com.ieps.mapper;

import com.ieps.dto.ReviewAdminDto;
import com.ieps.pojo.Review;

import java.util.List;

public interface ReviewMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Review record);

    int insertSelective(Review record);

    Review selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Review record);

    int updateByPrimaryKey(Review record);
    
    List<ReviewAdminDto> selectAllReviewListWithItemNum(String itemNum);
    
    List<ReviewAdminDto> selectReviewWithMultCondition(ReviewAdminDto reviewAdminDto);
    
    
}
  • 8.5 评审的数据持久层的接口
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ieps.mapper.ReviewMapper">
    <resultMap id="BaseResultMap" type="com.ieps.pojo.Review">
        <constructor>
            <idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer"/>
            <arg column="user_num" jdbcType="VARCHAR" javaType="java.lang.String"/>
            <arg column="item_num" jdbcType="VARCHAR" javaType="java.lang.String"/>
            <arg column="review_score" jdbcType="DECIMAL" javaType="java.lang.Long"/>
            <arg column="review_option" jdbcType="VARCHAR" javaType="java.lang.String"/>
            <arg column="review_type" jdbcType="INTEGER" javaType="java.lang.Integer"/>
            <arg column="review_level" jdbcType="INTEGER" javaType="java.lang.Integer"/>
            <arg column="review_time" jdbcType="TIMESTAMP" javaType="java.util.Date"/>
            <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date"/>
            <arg column="update_time" jdbcType="TIMESTAMP" javaType="java.util.Date"/>
        </constructor>
    </resultMap>
    <sql id="Base_Column_List">
    id, user_num, item_num, review_score, review_option, review_type, review_level, review_time, create_time, update_time
  </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
        select
        <include refid="Base_Column_List"/>
        from ieps_review
        where id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from ieps_review
    where id = #{id,jdbcType=INTEGER}
  </delete>
    <insert id="insert" parameterType="com.ieps.pojo.Review">
    insert into ieps_review (user_num, item_num, review_score,
      review_option, review_type, review_level,
      review_time, create_time, update_time
      )
    values
    (
      #{userNum,jdbcType=VARCHAR}, #{itemNum,jdbcType=VARCHAR}, #{reviewScore,jdbcType=DECIMAL}, #{reviewOption,jdbcType=VARCHAR},
      #{reviewType,jdbcType=INTEGER}, #{reviewLevel,jdbcType=INTEGER}, now(), now(), now()
      )
  </insert>
    <insert id="insertSelective" parameterType="com.ieps.pojo.Review">
        insert into ieps_review
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="userNum != null">
                user_num,
            </if>
            <if test="itemNum != null">
                item_num,
            </if>
            <if test="reviewScore != null">
                review_score,
            </if>
            <if test="reviewOption != null">
                review_option,
            </if>
            <if test="reviewType != null">
                review_type,
            </if>
            <if test="reviewLevel != null">
                review_level,
            </if>
            <if test="reviewTime != null">
                review_time,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="userNum != null">
                #{userNum,jdbcType=VARCHAR},
            </if>
            <if test="itemNum != null">
                #{itemNum,jdbcType=VARCHAR},
            </if>
            <if test="reviewScore != null">
                #{reviewScore,jdbcType=DECIMAL},
            </if>
            <if test="reviewOption != null">
                #{reviewOption,jdbcType=VARCHAR},
            </if>
            <if test="reviewType != null">
                #{reviewType,jdbcType=INTEGER},
            </if>
            <if test="reviewLevel != null">
                #{reviewLevel,jdbcType=INTEGER},
            </if>
            <if test="reviewTime != null">
                now(),
            </if>
            <if test="createTime != null">
                now(),
            </if>
            <if test="updateTime != null">
                now(),
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.ieps.pojo.Review">
        update ieps_review
        <set>
            <if test="userNum != null">
                user_num = #{userNum,jdbcType=VARCHAR},
            </if>
            <if test="itemNum != null">
                item_num = #{itemNum,jdbcType=VARCHAR},
            </if>
            <if test="reviewScore != null">
                review_score = #{reviewScore,jdbcType=DECIMAL},
            </if>
            <if test="reviewOption != null">
                review_option = #{reviewOption,jdbcType=VARCHAR},
            </if>
            <if test="reviewType != null">
                review_type = #{reviewType,jdbcType=INTEGER},
            </if>
            <if test="reviewLevel != null">
                review_level = #{reviewLevel,jdbcType=INTEGER},
            </if>
            <if test="reviewTime != null">
                review_time = #{reviewTime,jdbcType=TIMESTAMP},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=TIMESTAMP},
            </if>
            <if test="updateTime != null">
                update_time = now(),
            </if>
        </set>
        where id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.ieps.pojo.Review">
    update ieps_review
    set user_num = #{userNum,jdbcType=VARCHAR},
      item_num = #{itemNum,jdbcType=VARCHAR},
      review_score = #{reviewScore,jdbcType=DECIMAL},
      review_option = #{reviewOption,jdbcType=VARCHAR},
      review_type = #{reviewType,jdbcType=INTEGER},
      review_level = #{reviewLevel,jdbcType=INTEGER},
      review_time = now(),
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = now()
    where id = #{id,jdbcType=INTEGER}
  </update>

     <!-- -1:普通文件;0:重要通知文件;1:常用下载文件;2:申请项目文件;3:立项评审结果附件;4:中期检查评审结果附件;5:结题评审结果附件。-->
    <select id="selectAllReviewListWithItemNum" parameterType="string" resultType="ReviewAdminDto">
        SELECT ir.id, ir.user_num AS userNum, iui.user_name AS userName, ir.item_num AS itemNum, ir.review_score AS reviewScore, ir.review_option AS reviewOption,
        ir.review_type AS reviewType, ir.review_level AS reviewLevel, ir.review_time AS reviewTime, ir.create_time AS createTime, ir.update_time AS updateTime,
        ifh.file_name AS fileName, ifh.file_kind AS fileKind
    FROM ieps_review ir
    LEFT JOIN
        (
        SELECT * FROM ieps_file_hub
        WHERE file_kind NOT IN (-1, 0, 1, 2)
        ) ifh
        ON ifh.type_num = ir.item_num
    AND ifh.user_num = ir.user_num
        INNER JOIN ieps_user_info iui
        ON iui.user_num = ir.user_num
        WHERE ir.item_num = #{itemNum}
    </select>
    
    
    <select id="selectReviewWithMultCondition" resultType="ReviewAdminDto">
        SELECT ir.id, ir.user_num AS userNum, iui.user_name AS userName, ir.item_num AS itemNum, ir.review_score AS reviewScore, ir.review_option AS reviewOption,
        ir.review_type AS reviewType, ir.review_level AS reviewLevel, ir.review_time AS reviewTime, ir.create_time AS createTime, ir.update_time AS updateTime,
        ifh.file_name AS fileName, ifh.file_kind AS fileKind
    FROM ieps_review ir
    INNER JOIN
        (
        SELECT * FROM ieps_file_hub
        WHERE file_kind = #{fileKind}
        ) ifh
        ON ifh.type_num = ir.item_num
    AND ifh.user_num = ir.user_num
        INNER JOIN ieps_user_info iui
        ON iui.user_num = ir.user_num
        WHERE ir.item_num = #{itemNum}
        AND ir.user_num = #{userNum}
    </select>


</mapper>

分享是快乐的,也见证了个人成长历程,文章大多都是工作经验总结以及平时学习积累,基于自身认知不足之处在所难免,也请大家指正,共同进步。

目录
相关文章
|
2月前
|
Java 应用服务中间件 数据库连接
ssm项目整合,简单的用户管理系统
文章介绍了一个使用SSM框架(Spring、SpringMVC、MyBatis)构建的简单用户管理系统的整合过程,包括项目搭建、数据库配置、各层代码实现以及视图展示。
ssm项目整合,简单的用户管理系统
|
1月前
|
前端开发 Java 关系型数据库
【保姆级SSM教程】高并发朋友圈点赞项目设计
【保姆级SSM教程】高并发朋友圈点赞项目设计
29 0
|
1月前
|
SQL Java 数据库连接
快速搭建SSM项目【最全教程】~令狐小哥版
快速搭建SSM项目【最全教程】~令狐小哥版
25 0
|
3月前
|
Java 数据库连接 Maven
SSM框架整合图书管理项目
这篇文章是关于SSM框架整合到图书管理项目的详细教程,涵盖了从Maven项目构建、依赖导入、数据库连接、配置文件编写、实体类和接口实现到SpringMVC整合的完整步骤。
SSM框架整合图书管理项目
|
3月前
|
Java 应用服务中间件 Maven
Mac使用Idea配置传统SSM项目(非maven项目)
Mac使用Idea配置传统SSM项目(非maven项目)
53 1
|
4月前
|
存储 关系型数据库 测试技术
基于ssm+vue的校园驿站管理系统+(源码+部署说明+演示视频+源码介绍)(2)
基于ssm+vue的校园驿站管理系统+(源码+部署说明+演示视频+源码介绍)
63 1
WXM
|
4月前
|
Java 应用服务中间件 网络安全
Eclipse运行SSM/SSH项目教程
Eclipse运行SSM/SSH项目教程
WXM
134 0
|
4月前
|
Java 关系型数据库 测试技术
基于ssm+vue的校园驿站管理系统+(源码+部署说明+演示视频+源码介绍)(1)
基于ssm+vue的校园驿站管理系统+(源码+部署说明+演示视频+源码介绍)
59 0
|
5月前
|
前端开发 Java
基于SSM框架的手机商城项目
基于SSM框架的手机商城项目
57 0
|
3月前
|
Java 数据库连接 Maven
手把手教你如何搭建SSM框架、图书商城系统案例
这篇文章是关于如何搭建SSM框架以及实现一个图书商城系统的详细教程,包括了项目的配置文件整合、依赖管理、项目结构和运行效果展示,并提供了GitHub源码链接。
手把手教你如何搭建SSM框架、图书商城系统案例