Design and implementation of Java-based university material procurement system (source code + lw + deployment documents + explanation, etc.)

Article directory

  • Preface
  • Specific implementation screenshots
  • Paper reference
  • Detailed video demonstration
  • why choose me
    • own website
    • My own small program (Xiao Cai coding)
  • Code reference
  • Database reference
  • Source code acquisition

Foreword

Blogger Introduction: ?100,000+ fans across the entire network, CSDN guest author, blog expert, CSDN Rising Star Program mentor, high-quality creator in the full stack field, Blog Star, Nuggets/Huawei Cloud/ High-quality author on Alibaba Cloud/InfoQ and other platforms, focusing on Java, small program technology fields and graduation project practice?
Wonderful column recommended subscription
A collection of the most worthy WeChat mini program graduation project topics in 2023-2024: 100 popular topics recommended?

A collection of the most worthy Java graduation project topics in 2023-2024: 500 popular topics recommended?

Java quality practical cases “500 sets”

WeChat Mini Program Project Excellent Case “500 Sets”

Get the source code + database at the end of the article
If you are interested, you can save it first. If you have any questions about graduation topic selection, project and paper writing, etc., you can leave me a message for consultation. I hope to help more people

Detailed implementation screenshots

The main function:
University material procurement management system based on java

The system is divided into three roles: supplier, administrator, and college.

The main functions of the supplier are:
1. Supplier login system
2. View system announcement information
3. Check the bidding information of the system, bid online, fill in the bidding information and submit it
4. Suppliers can view their own bidding information history
5. Suppliers view bid winning notification information
6. Log out
The main functions of the college are:
1. College login system
2. View system announcement information
3. The college can view the purchasing information list and add the material information that needs to be purchased online.
4. Query, modify and delete purchased materials
5. Log out

The main functions of the administrator are:
1. The administrator enters the account to log in to the backend.
2. Personal Center: Administrators can modify passwords and account information
3. Supplier management: add, delete, modify and query registered supplier information
4. College management: add, modify, delete and query registered college information
5. Announcement management: add, modify, delete and query system announcements
6. Procurement information management: review, tender, delete and query the procurement information released by the college
7. Bidding information management: review procurement bidding information, bid winning notification, deletion, query
8. Bidding information class management: review procurement bidding information, bid winning notification, view, delete
9. Bid-winning notification management: view, modify, delete, and query procurement bidding-winning notification information.
10. Exit information
jdk version: 1.8 and above
ide tool: IDEA
Database: mysql5.7
Programming language: Java
tomcat: 8.0 and above
java framework: SSM
maven: 3.6.1
Front end: layui
Detailed technology: HTML + CSS + JS + JSP + JAVA + SSM + MYSQL + JQUERY + MAVEN Image”>
Image
Image
Image
Image
Image

Paper reference

Detailed video demonstration

Please contact me for a more detailed demonstration video

Why choose me

Own website

The projects uploaded on the website are all collected and developed by the bloggers themselves, and the quality can be guaranteed. It is suitable for students who know a little bit about program development!

My own small program (Xiao Cai coding)

In order to make it easier for students to use it, I developed a small program version called Xiaocai coding. Students can quickly search and locate the program they want through the mini program

Code reference

@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {<!-- -->
   UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
   if(user==null || !user.getPassword().equals(password)) {<!-- -->
      return R.error("Account or password is incorrect");
   }
   String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
   return R.ok().put("token", token);
}

@Override
public String generateToken(Long userid,String username, String tableName, String role) {<!-- -->
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("userid", userid).eq("role", role));
String token = CommonUtil.getRandomString(32);
Calendar cal = Calendar.getInstance();
    cal.setTime(new Date());
    cal.add(Calendar.HOUR_OF_DAY, 1);
if(tokenEntity!=null) {<!-- -->
tokenEntity.setToken(token);
tokenEntity.setExpiratedtime(cal.getTime());
this.updateById(tokenEntity);
} else {<!-- -->
this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime()));
}
return token;
}



/**
 * Permission (Token) verification
 */
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {<!-- -->

    public static final String LOGIN_TOKEN_KEY = "Token";

    @Autowired
    private TokenService tokenService;
    
@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {<!-- -->

//Support cross-domain requests
        response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
        response.setHeader("Access-Control-Max-Age", "3600");
        response.setHeader("Access-Control-Allow-Credentials", "true");
        response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization") ;
        response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
// When crossing domains, an OPTIONS request will be sent first. Here we directly return the normal status to the OPTIONS request.
if (request.getMethod().equals(RequestMethod.OPTIONS.name())) {<!-- -->
        response.setStatus(HttpStatus.OK.value());
            return false;
        }
        
        IgnoreAuth annotation;
        if (handler instanceof HandlerMethod) {<!-- -->
            annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
        } else {<!-- -->
            return true;
        }

        //Get token from header
        String token = request.getHeader(LOGIN_TOKEN_KEY);
        
        /**
         * Leave methods that do not require permission verification directly.
         */
        if(annotation!=null) {<!-- -->
        return true;
        }
        
        TokenEntity tokenEntity = null;
        if(StringUtils.isNotBlank(token)) {<!-- -->
        tokenEntity = tokenService.getTokenEntity(token);
        }
        
        if(tokenEntity != null) {<!-- -->
        request.getSession().setAttribute("userId", tokenEntity.getUserid());
        request.getSession().setAttribute("role", tokenEntity.getRole());
        request.getSession().setAttribute("tableName", tokenEntity.getTablename());
        request.getSession().setAttribute("username", tokenEntity.getUsername());
        return true;
        }
        
PrintWriter writer = null;
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
try {<!-- -->
writer = response.getWriter();
writer.print(JSONObject.toJSONString(R.error(401, "Please log in first")));
} finally {<!-- -->
if(writer != null){<!-- -->
writer.close();
}
}
// throw new EIException("Please log in first", 401);
return false;
    }
}

Database reference

-------------------------------
-- Table structure for token
----------------------------
DROP TABLE IF EXISTS `token`;
CREATE TABLE `token` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
  `userid` bigint(20) NOT NULL COMMENT 'userid',
  `username` varchar(100) NOT NULL COMMENT 'username',
  `tablename` varchar(100) DEFAULT NULL COMMENT 'table name',
  `role` varchar(100) DEFAULT NULL COMMENT 'role',
  `token` varchar(200) NOT NULL COMMENT 'password',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Add time',
  `expiratedtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Expired time',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='token table';

----------------------------
-- Records of token
----------------------------
INSERT INTO `token` VALUES ('9', '23', 'cd01', 'xuesheng', 'Student', 'al6svx5qkei1wljry5o1npswhdpqcpcg', '2023-02-23 21:46:45', '2023-03-15 14:01:36');
INSERT INTO `token` VALUES ('10', '11', 'xh01', 'xuesheng', 'Student', 'fahmrd9bkhqy04sq0fzrl4h9m86cu6kx', '2023-02-27 18:33:52', '2023-03-17 18:27:42');
INSERT INTO `token` VALUES ('11', '17', 'ch01', 'xuesheng', 'Student', 'u5km44scxvzuv5yumdah2lhva0gp4393', '2023-02-27 18:46:19', '2023-02-27 19:48:58');
INSERT INTO `token` VALUES ('12', '1', 'admin', 'users', 'administrator', 'h1pqzsb9bldh93m92j9m2sljy9bt1wdh', '2023-02-27 19:37:01', '2023-03- 17 18:23:02');
INSERT INTO `token` VALUES ('13', '21', 'xiaohao', 'shezhang', 'President', 'zdm7j8h1wnfe27pkxyiuzvxxy27ykl2a', '2023-02-27 19:38:07', '2023-03- 17 18:25:20');
INSERT INTO `token` VALUES ('14', '27', 'djy01', 'xuesheng', 'Student', 'g3teq4335pe21nwuwj2sqkrpqoabqomm', '2023-03-15 12:56:17', '2023-03-15 14:00:16');
INSERT INTO `token` VALUES ('15', '29', 'dajiyue', 'shezhang', 'President', '0vb1x9xn7riewlp5ddma5ro7lp4u8m9j', '2023-03-15 12:58:08', '2023-03- 15 14:03:48');

Source code acquisition

Just contact me with the business card below the article~
Please like, collect, follow, comment, and viewGet contact information
Recommended subscription for wonderful columns: in the column below
Java quality practical cases “500 sets”
WeChat Mini Program Project Excellent Case “500 Sets”