信息技术的飞速发展造就了一个统一的全球市场,导致了世界范围的激烈市 场竞争。不论一个企业原来的基础是处于先进、后进抑或中间,都遵循着同一竞争尺度,即用户选择原则。残酷的市场竞争给企业带来的压力可归纳为时间 、质量、成本 、服务 和环境是企业发展的永恒主题。面对这样残酷的形势,企业如果不 能开发新产品,特别是技术含量高的独占性的产品,则无法参与市场竞争。
互联网电子招投标是一种取缔传统线下招投标方式。线上电子招投标以网络技术为基础,全面的实现招标、投标、业务流程的数字集成化。论文从描述电子任务招募投标系统开发意义出发,对系统进行了需求分析和系统主要功能模块的设计,给出了系统的实现界面,系统使用 Java 语言、SpringBoot 框架和 mysql 数据库设计,系统实现了线上招投标所有流程并可以分模块化地让用户进行管理工作,可以作为企业向互联网线上招投标转型的借鉴。
关键字: 任务招募;B/S模式;springboot;mysql
ABSTRACT
The rapid development of information technology has created a unified global market, leading to fierce market competition worldwide. Whether an enterprise's original foundation is advanced, backward or intermediate, it follows the same competitive scale, that is, the principle of user selection. The pressure brought by brutal market competition to enterprises can be summarized as time, quality, cost, service and environment are the eternal themes of enterprise development. In the face of such a cruel situation, if an enterprise cannot develop new products, especially exclusive products with high technology content, it cannot participate in market competition.
Internet electronic bidding is a way to ban traditional offline bidding. Based on network technology, online electronic bidding comprehensively realizes the digital integration of bidding, tendering and business processes. Starting from the description of the significance of the development of the electronic bidding system, the paper analyzes the requirements of the system and designs the main functional modules of the system, and gives the implementation interface of the system. The system uses Java language, SpringBoot framework and mysql database design. The system realizes all the processes of online bidding and allows users to manage work in modules, which can be used as a reference for enterprises to transform to online bidding and tendering on the Internet.
Keyword: task recruitment; B/S mode; springboot; mysql
演示视频:
基于springboot任务投标招募平台java任务接单管理系统源码和论文
























package com.yuu.recruit.controller;
import com.yuu.recruit.domain.Employee;
import com.yuu.recruit.domain.EmployeeBookmarked;
import com.yuu.recruit.domain.Employer;
import com.yuu.recruit.service.*;
import com.yuu.recruit.vo.*;
import com.yuu.recruit.service.BidService;
import com.yuu.recruit.service.EmployeeService;
import com.yuu.recruit.service.HomeBowerService;
import com.yuu.recruit.service.TaskService;
import com.yuu.recruit.vo.*;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* 雇员控制器
*
* @author by yuu
* @Classname EmployeeController
* @Date 2022/10/15 0:36
* @see com.yuu.recruit.controller
*/
@Controller
@RequestMapping("employee")
public class EmployeeController {
@Resource
private EmployeeService employeeService;
@Resource
private TaskService taskService;
@Resource
private HomeBowerService homeBowerService;
@Resource
private EmployeeBookmarkedService employeeBookmarkedService;
@Resource
private BidService bidService;
/**
* 雇员退出登录
*
* @param session
* @return
*/
@GetMapping("logout")
public String logout(HttpSession session) {
session.removeAttribute("employee");
return "redirect:/index";
}
/**
* 跳转到个人中心
*
* @return
*/
@GetMapping("dashboard")
public String dashboard(HttpSession session, Model model) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 查询雇员任务投标总中标数
Integer bidCount = taskService.getByBidEmployeeId(employee.getId());
// 主页总浏览次数
Integer bowerCount = employeeService.getBowerCount(employee.getId());
// 最新主页浏览情况
List<HomeBowerVo> homeBowerVos = homeBowerService.getByRecentlyEmployeeId(employee.getId());
// 放置域对象中,供页面展示
model.addAttribute("bidCount", bidCount);
model.addAttribute("bowerCount", bowerCount);
model.addAttribute("homeBowers", homeBowerVos);
return "employee/dashboard";
}
/**
* 收藏或取消收藏任务
*
* @param taskId
* @return
*/
@PostMapping("bookmarked")
@ResponseBody
public EmployeeBookmarked bookmarked(Long taskId, HttpSession session) {
// 获取雇员的登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 收藏或取消收藏任务
EmployeeBookmarked employeeBookmarked = employeeBookmarkedService.bookmarked(employee.getId(), taskId);
return employeeBookmarked;
}
/**
* 跳转到我的收藏页面
*
* @return
*/
@GetMapping("bookmarks")
public String bookmarks(HttpSession session, Model model) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 获取收藏的任务集合
List<EmployeeBookmarkedVo> bookMarks = employeeBookmarkedService.getByEmployeeId(employee.getId());
// 放置到域对象中,方便页面展示
model.addAttribute("bookMarks", bookMarks);
return "employee/bookmarks";
}
/**
* 删除收藏任务
*
* @param taskId 任务 ID
* @return
*/
@PostMapping("bookmarks/remove")
@ResponseBody
public String bookmarks(Long taskId, HttpSession session) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 删除收藏信息
employeeBookmarkedService.remove(employee.getId(), taskId);
return "删除收藏信息";
}
/**
* 查询已完成任务
*
* @param session
* @return
*/
@GetMapping("/task/completed")
public String completedTask(HttpSession session, Model model) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 查询出已完成的订单
List<TaskVo> taskVos = taskService.getCompletedByEmployeeId(employee.getId());
// 放置到域对象中
model.addAttribute("tasks", taskVos);
return "employee/completed_task";
}
/**
* 跳转到待完成任务
*
* @param session
* @param model
* @return
*/
@GetMapping("/task/uncompleted")
public String unCompletedTask(HttpSession session, Model model) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 查询出未完成的订单
List<TaskVo> taskVos = taskService.getUnCompletedByEmployeeId(employee.getId());
// 放置到与对象中
model.addAttribute("tasks", taskVos);
// 跳转到待完成任务列表页
return "employee/uncompleted_task";
}
/**
* 雇员提交任务
*
* @param session
* @return
*/
@PostMapping("/task/submit")
@ResponseBody
public String submitTask(Long taskId, HttpSession session) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 雇员提交信息
taskService.submitTask(employee.getId(), taskId);
return "任务提交成功 ,等待雇主确认!";
}
/**
* 跳转到我的竞标页面
*
* @param session
* @return
*/
@GetMapping("mybids")
public String myBid(HttpSession session, Model model) {
// 获取雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
// 查询所有未中标的信息
List<BidVo> bidVos = bidService.getNoBitByEmployeeId(employee.getId());
// 放置域对象中,供页面展示
model.addAttribute("bids", bidVos);
return "employee/my_bids";
}
/**
* 删除竞标信息
*
* @param bid
* @return
*/
@GetMapping("bid/delete")
public String deleteBid(Long bid) {
bidService.deleteById(bid);
return "redirect:/employee/mybids";
}
/**
* 跳转到个人信息设置页面
*
* @return
*/
@GetMapping("settings/base")
public String settings(HttpSession session, Model model) {
// 获取 session 中的雇员信息
Employee employee = (Employee) session.getAttribute("employee");
// 获取视图展示对象,主要是为了展示技能信息,因为 Employee 中只有 技能 ID 没有技能名称
EmployeeVo employeeVo = employeeService.getById(employee.getId());
model.addAttribute("employee", employeeVo);
return "employee/settings_base";
}
/**
* 保存个人基本信息
*
* @param employee
* @return
*/
@PostMapping("settings/base/save")
public String saveBase(Employee employee, HttpSession session) {
// 更新个人信息到数据库
Employee currEmployee = employeeService.save(employee);
// 更新 session 中的个人信息
session.setAttribute("employee", currEmployee);
return "redirect:/employee/settings/base";
}
/**
* 跳转到修改密码页
*
* @return
*/
@GetMapping("settings/password")
public String updatePass() {
return "employee/settings_pass";
}
/**
* 修改密码
*
* @param password 原来的密码
* @param newPassword 新密码
* @return
*/
@PostMapping("settings/password")
public String updatePass(String password, String newPassword, HttpSession session, RedirectAttributes redirectAttributes) {
// 查询雇员登录信息
Employee employee = (Employee) session.getAttribute("employee");
String msg = employeeService.updatePass(employee.getId(), password, newPassword);
redirectAttributes.addFlashAttribute("msg", msg);
return "redirect:/employee/settings/password";
}
/**
* 跳转到雇员简介页面
*
* @return
*/
@GetMapping("profile")
public String profile(Long employeeId, Model model, HttpSession session) {
// 查询雇员信息
EmployeeVo employee = employeeService.getById(employeeId);
// 查询历史完成任务
List<TaskVo> taskVos = taskService.getByEmployeeId(employeeId);
// 查询雇员总完成任务数
Integer completeCount = taskService.getCompletedByEmployeeId(employeeId).size();
// 如果雇主登录了,主页访问次数加 1
Employer employer = (Employer) session.getAttribute("employer");
if (employer != null) {
employeeService.bower(employeeId, employer.getId());
}
// 主页总浏览次数
Integer bowerCount = employeeService.getBowerCount(employee.getId());
model.addAttribute("employee", employee);
model.addAttribute("tasks", taskVos);
model.addAttribute("completeCount", completeCount);
model.addAttribute("bowerCount", bowerCount);
return "employee_profile";
}
/**
* 添加技能
*
* @param skillName 技能名称
* @return
*/
@PostMapping("skill/add")
@ResponseBody
public String addSkill(String skillName, HttpSession session) {
Employee employee = (Employee) session.getAttribute("employee");
if (!"".equals(skillName)) {
employeeService.addSkill(employee.getId(), skillName);
}
return "添加技能";
}
/**
* 删除技能
*
* @param skillId
* @return
*/
@PostMapping("skill/delete")
@ResponseBody
public String deleteSkill(Long skillId) {
employeeService.deleteSkill(skillId);
return "删除技能";
}
}














package com.example.controller;
import cn.hutool.core.io.FileUtil;
import com.example.common.Result;
import com.example.entity.NxSystemFileInfo;
import com.example.exception.CustomException;
import com.example.service.NxSystemFileInfoService;
import com.github.pagehelper.PageInfo;
import net.coobird.thumbnailator.Thumbnails;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/files")
public class NxSystemFileController {
private static final String BASE_PATH = System.getProperty("user.dir") + "/src/main/resources/static/file/";
@Resource
private NxSystemFileInfoService nxSystemFileInfoService;
@PostMapping("/upload")
public Result upload(MultipartFile file, HttpServletRequest request) throws IOException {
String originName = file.getOriginalFilename();
if (originName == null) {
return Result.error("1001", "文件名不能为空");
}
if (!originName.contains("png")
&& !originName.contains("jpg")
&& !originName.contains("jpeg")
&& !originName.contains("gif")) {
return Result.error("1001", "只能上传图片");
}
// 文件名加个时间戳
String fileName = FileUtil.mainName(originName) + System.currentTimeMillis() + "." + FileUtil.extName(originName);
// 2. 文件上传
FileUtil.writeBytes(file.getBytes(), BASE_PATH + fileName);
// 3. 信息入库,获取文件id
NxSystemFileInfo info = new NxSystemFileInfo();
info.setOriginName(originName);
info.setFileName(fileName);
NxSystemFileInfo addInfo = nxSystemFileInfoService.add(info);
if (addInfo != null) {
return Result.success(addInfo);
} else {
return Result.error("4001", "上传失败");
}
}
@PostMapping("/notice/upload")
public Result<Map<String, String>> noticeUpload(MultipartFile file, HttpServletRequest request) throws IOException {
String originName = file.getOriginalFilename();
// 文件名加个时间戳
String fileName = FileUtil.mainName(originName) + System.currentTimeMillis() + "." + FileUtil.extName(originName);
// 2. 缩小尺寸
Thumbnails.of(file.getInputStream()).width(400).toFile(BASE_PATH + fileName);
// 3. 信息入库,获取文件id
NxSystemFileInfo info = new NxSystemFileInfo();
info.setOriginName(originName);
info.setFileName(fileName);
NxSystemFileInfo addInfo = nxSystemFileInfoService.add(info);
Map<String, String> map = new HashMap<>(2);
map.put("src", "/files/download/" + addInfo.getId());
map.put("title", originName);
return Result.success(map);
}
@GetMapping("/page/{name}")
public Result<PageInfo<NxSystemFileInfo>> filePage(@PathVariable String name,
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize) {
PageInfo<NxSystemFileInfo> pageInfo = nxSystemFileInfoService.findPage(name, pageNum, pageSize);
return Result.success(pageInfo);
}
@GetMapping("/download/{id}")
public void download(@PathVariable String id, HttpServletResponse response) throws IOException {
if ("null".equals(id)) {
throw new CustomException("1001", "您未上传文件");
}
NxSystemFileInfo nxSystemFileInfo = nxSystemFileInfoService.findById(Long.parseLong(id));
if (nxSystemFileInfo == null) {
throw new CustomException("1001", "未查询到该文件");
}
try {
byte[] bytes = FileUtil.readBytes(BASE_PATH + nxSystemFileInfo.getFileName());
response.reset();
// 设置response的Header
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(nxSystemFileInfo.getOriginName(), "UTF-8"));
response.addHeader("Content-Length", "" + bytes.length);
OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/octet-stream");
toClient.write(bytes);
toClient.flush();
toClient.close();
} catch (Exception e) {
System.err.println("下载文件异常");
}
}
@DeleteMapping("/{id}")
public Result deleteFile(@PathVariable String id) {
NxSystemFileInfo nxSystemFileInfo = nxSystemFileInfoService.findById(Long.parseLong(id));
if (nxSystemFileInfo == null) {
throw new CustomException("1001", "未查询到该文件");
}
String name = nxSystemFileInfo.getFileName();
// 先删除文件
FileUtil.del(new File(BASE_PATH + name));
// 再删除表记录
nxSystemFileInfoService.delete(Long.parseLong(id));
return Result.success();
}
@GetMapping("/{id}")
public Result<NxSystemFileInfo> getById(@PathVariable String id) {
NxSystemFileInfo nxSystemFileInfo = nxSystemFileInfoService.findById(Long.parseLong(id));
if (nxSystemFileInfo == null) {
throw new CustomException("1001", "数据库未查到此文件");
}
try {
FileUtil.readBytes(BASE_PATH + nxSystemFileInfo.getFileName());
} catch (Exception e) {
throw new CustomException("1001", "此文件已被您删除");
}
return Result.success(nxSystemFileInfo);
}
}
624

被折叠的 条评论
为什么被折叠?



