基于SSM实现家政管理平台的开发和实现

简介: 随着我国服务行业水平的不断提高,家政服务者和客户之间的信息互通和管理是既重要又复杂的系统工作。传统家政服务工作方式已无法满足现代信息化社会或全方位诸多个性化服务需求。故开发一个家政服务管理系统,对促进家政服务行业发展颇具实用意义。本文首先对目前家政管理系统开发所需技术进行调研,再结合当前家政行业发展的趋势,对该系统提出可行性分析,设计开发出了系统具体功能需求。系统设计采用 B/S 三层模式架构,以JAVA语言工具和MySQL数据库;以及HTML等技术来实现家政服务信息化管理的基本功能。

项目编号:KS-031

一,项目简介

随着我国服务行业水平的不断提高,家政服务者和客户之间的信息互通和管理是既重要又复杂的系统工作。传统家政服务工作方式已无法满足现代信息化社会或全方位诸多个性化服务需求。故开发一个家政服务管理系统,对促进家政服务行业发展颇具实用意义。

本文首先对目前家政管理系统开发所需技术进行调研,再结合当前家政行业发展的趋势,对该系统提出可行性分析,设计开发出了系统具体功能需求。系统设计采用 B/S 三层模式架构,以JAVA语言工具和MySQL数据库;以及HTML等技术来实现家政服务信息化管理的基本功能。系统主要功能实现了用户信息管理、订单的预约交易评价等服务。其中前台包括客户及家政人员,其中客户可以预约和管理家政服务、审核订单以及评价工作;家政人员可以查看、申请、管理订单及评价用户。后台管理员可以管理所有账户权限与信息认证。该家政服务网站的实现在一定程度上提高了市场竞争力。

 

项目介绍:本项目主要实现了家政服务平台的管理信息,主要实现雇主信息管理、保姆信息管理、经纪人信息管理等相关信息管理功能。

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发:SSM

前端开发:JSP+JQUERY+CSS

三,系统展示

image.gif编辑

image.gif编辑

image.gif编辑

image.gif编辑

image.gif编辑

image.gif编辑

image.gif编辑

四,核心代码展示

package com.hep.controller;
import java.io.UnsupportedEncodingException;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.hep.dto.BrokerShowData;
import com.hep.service.BrokerService;
@Controller
public class BrokerController {
  @Resource
  private BrokerService brokerService;
  @RequestMapping(value="BrokerInformation")
  public ModelAndView brokerInformation(HttpServletRequest request){
    String pageNum = request.getParameter("pageNum");
    String pageSize = request.getParameter("pageSize");
    return brokerService.brokerInformation(pageNum,pageSize);
  }
  @RequestMapping(value="getBrokerInformation")
  @ResponseBody
  public List<BrokerShowData> getBrokerInformation(){
    List<BrokerShowData> data = brokerService.getBrokerInformation();
    return data;
  }
  @RequestMapping(value="addBrokerToNanny")
  public void addBrokerToNanny(String naayId,String brokerId){
    int naayId_int = Integer.parseInt(naayId);
    int brokerId_int = Integer.parseInt(brokerId);
    brokerService.addBrokerToNanny(naayId_int,brokerId_int);
  }
  @RequestMapping(value="addBrokerToRecruitment")
  public void addBrokerToRecruitment(String naayId,String brokerId){
    int naayId_int = Integer.parseInt(naayId);
    int brokerId_int = Integer.parseInt(brokerId);
    brokerService.addBrokerToRecruitment(naayId_int,brokerId_int);
  }
  @RequestMapping(value="changeBrokerInformation")
  public void changeBrokerInformation(String name,String phone1,String phone2,String telphone,String qqnumber,String department,String id) throws UnsupportedEncodingException{
    name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    department = new String(department.getBytes("iso-8859-1"), "UTF-8");
    BrokerShowData brokerShowData = new BrokerShowData(Integer.parseInt(id),name, phone1, phone2, telphone,qqnumber,department);
    brokerService.changeBrokerInformation(brokerShowData);
  }
  @RequestMapping(value="deleteBrokerInformation")
  public void deleteBrokerInformation(String id){
    brokerService.deleteBrokerInformation(Integer.parseInt(id));
  }
  @RequestMapping(value="addBrokerInformation")
  public void addBrokerInformation(String name,String phone1,String phone2,String telphone,String qqnumber,String department) throws UnsupportedEncodingException{
    name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    department = new String(department.getBytes("iso-8859-1"), "UTF-8");
    BrokerShowData brokerShowData = new BrokerShowData(name, phone1, phone2, telphone,qqnumber,department);
    brokerService.addBrokerInformation(brokerShowData);
  }
}

image.gif

package com.hep.controller;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.hep.dto.BrokerShowData;
import com.hep.dto.ChangeData;
import com.hep.dto.NannyDetailedShowData;
import com.hep.dto.NursemaidShowData;
import com.hep.model.NursemaidData;
import com.hep.service.BrokerService;
import com.hep.service.NannyService;
import com.hep.service.UploadService;
import com.hep.test.ImageBinary;
@Controller
public class NannyController {
  @Resource
  private NannyService nannyService;
  @Resource
  private BrokerService brokerService;
  @Resource
  private UploadService uploadService;
  final Logger logger = LoggerFactory.getLogger(this.getClass());
  /**
   * 保姆信息展示页面初始化
   * 
   * @return
   */
  @RequestMapping(value = "NannyInformation")
  public ModelAndView nannyInformation() {
    // ModelAndView model = new ModelAndView();
    // List<NursemaidShowData> naayData = nannyService.selectAllNannyData();
    // model.addObject("NaayData", naayData);
    // model.setViewName("NannyInformation");
    return nannyService.selectPageNannyData(null, null);
  }
  /**
   * 保姆信息展示页面 分页
   * 
   * @return
   */
  @RequestMapping(value = "NannyInformationPage")
  public ModelAndView nannyInformationPage(
      @RequestParam("pageNum") String pageNum,
      @RequestParam("pageSize") String pageSize) {
    // ModelAndView model = new ModelAndView();
    return nannyService.selectPageNannyData(pageNum, pageSize);
  }
  /**
   * 保姆详细信息展示页面初始化
   * 
   * @return
   */
  @RequestMapping(value = "NannyDetailInformation")
  public ModelAndView nannyDetailInformation(String id) {
    ModelAndView model = new ModelAndView();
    int id_char = Integer.parseInt(id);
    NannyDetailedShowData naayData = nannyService
        .nannyDetailInformation(id_char);
    int BrokerId = naayData.getBrokerId();
    if(BrokerId != 0){
      BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerId(BrokerId);
      naayData.setBrokerName(data.getName());
      naayData.setPhone1(data.getPhone1());
      naayData.setPhone2(data.getPhone2());
      naayData.setBrokertelphone(data.getTelphone());
      naayData.setQqNumber(data.getQqnumber());
      naayData.setDepartment(data.getDepartment());
    }else{
      naayData.setBrokerId(0);
      naayData.setBrokerName("fbgtrsne");
      naayData.setPhone1(null);
      naayData.setPhone2(null);
      naayData.setBrokertelphone(null);
      naayData.setQqNumber("1762460307");
      naayData.setDepartment(null);
    }
    model.addObject("NaayData", naayData);
    model.setViewName("NannyDetailedInformation");
    return model;
  }
  /**
   * 保姆 信息登记页面初始化
   * 
   * @return
   */
  @RequestMapping(value = "NannyRegistration")
  public String nannyRegistration() {
    return "NannyRegistration";
  }
  /**
   * 存储 保姆登记信息
   * 
   * @param request
   * @throws UnsupportedEncodingException
   */
  @RequestMapping(value = "getNannyRegistrationData")
  public String getNannyRegistrationData(HttpServletRequest request,HttpSession session,@RequestParam("imagea")CommonsMultipartFile file1,@RequestParam("fname")CommonsMultipartFile file2)
      throws UnsupportedEncodingException {
    String name = request.getParameter("name");
    //name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    //String image = request.getParameter("image");
    //image = URLDecoder.decode(image);
    //String photo = request.getParameter("photo");
    //photo = URLDecoder.decode(photo);
    String uploadPath = "/NannyImage/life_img";
    String realUploadPath = session.getServletContext().getRealPath(uploadPath);//绝对路径
    String image = uploadService.uploadImage(file1, uploadPath, realUploadPath);//图片上传
    String uploadPath2 = "/NannyImage/IDCard_img";
    String realUploadPath2 = session.getServletContext().getRealPath(uploadPath2);//绝对路径
    String photo = uploadService.uploadImage(file2, uploadPath2, realUploadPath2);//图片上传
    String census = request.getParameter("street");
    //census = new String(census.getBytes("iso-8859-1"), "UTF-8");
    String nonResident = request.getParameter("residence");
    //nonResident = new String(nonResident.getBytes("iso-8859-1"),
    //"UTF-8");
    String idnumber = request.getParameter("id_card");
    //idnumber = new String(idnumber.getBytes("iso-8859-1"), "UTF-8");
    String telphone = request.getParameter("phone");
    //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    String type = request.getParameter("type");
    //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    //logger.info(type);
    String functions = request.getParameter("skill_id");
    //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    String education = request.getParameter("education");
    //education = new String(education.getBytes("iso-8859-1"), "UTF-8");
    String faith = request.getParameter("belief");
    //faith = new String(faith.getBytes("iso-8859-1"), "UTF-8");
    String marriage = request.getParameter("matrimony");
    //marriage = new String(marriage.getBytes("iso-8859-1"), "UTF-8");
    String party = request.getParameter("party");
    //party = new String(party.getBytes("iso-8859-1"), "UTF-8");
    String height = request.getParameter("height");
    //height = new String(height.getBytes("iso-8859-1"), "UTF-8");
    String weight = request.getParameter("weight");
    //weight = new String(weight.getBytes("iso-8859-1"), "UTF-8");
    // logger.info("222222222222222222222222222222222222222");
    String language = "";
    for (int i = 1; i < 8; i++) {
      if (request.getParameter("lang-" + i) != null) {
        language = request.getParameter("lang-" + i) + "/" + language;
      }
    }
  //  language = new String(language.getBytes("iso-8859-1"), "UTF-8");
    String honor = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("certificate-" + i) != null) {
        honor = request.getParameter("certificate-" + i) + "/" + honor;
      }
    }
    //honor = new String(honor.getBytes("iso-8859-1"), "UTF-8");
    String speciality = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("specialist-" + i) != null) {
        speciality = request.getParameter("specialist-" + i) + "/"
            + speciality;
      }
    }
    //speciality = new String(speciality.getBytes("iso-8859-1"), "UTF-8");
    String intention = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("purpose-" + i) != null) {
        intention = request.getParameter("purpose-" + i) + "/"
            + intention;
      }
    }
    //intention = new String(intention.getBytes("iso-8859-1"), "UTF-8");
    // logger.info("3333333333333333333333333333333");
    String range = request.getParameter("scope");
    // range = new String(range.getBytes("iso-8859-1"), "UTF-8");
    String experience = request.getParameter("experience");
    //experience = new String(experience.getBytes("iso-8859-1"), "UTF-8");
    String wage = request.getParameter("ref_salary");
    //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
//
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    String time = df.format(new Date());// new Date()为获取当前系统时间
    NursemaidData nursemaidData = new NursemaidData(name, census,
        nonResident, idnumber, telphone, type, functions, education,
        faith, marriage, party, height, weight, language, honor,
        speciality, intention, range, experience, wage, image, photo);
    nursemaidData.setTime(time);
    // String age = NannyController.IdNOToAge(idnumber);
    // nursemaidData.setAge(age);
    nannyService.insertNannyData(nursemaidData);
    return "success";
  }
  /**
   * 保姆信息展示页面 检索查询
   * 
   * @return
   * @throws UnsupportedEncodingException
   */
  @RequestMapping(value = "searchNannyInformation")
  public ModelAndView searchNannyInformation(String job, String skill,
      String age, @RequestParam("pageNum") String pageNum,
      @RequestParam("pageSize") String pageSize)
      throws UnsupportedEncodingException {
    logger.info(job);
    job = new String(job.getBytes("iso-8859-1"), "UTF-8");
    skill = new String(skill.getBytes("iso-8859-1"), "UTF-8");
    age = new String(age.getBytes("iso-8859-1"), "UTF-8");
    // ModelAndView model = new ModelAndView();
    //
    // List<NursemaidShowData> naayData =
    // nannyService.searchNannyInformation(
    // job, skill, age,pageNum,pageSize);
    // model.addObject("NaayData", naayData);
    // model.setViewName("NannyInformation");
    return nannyService.searchNannyInformation(job, skill, age, pageNum,
        pageSize);
  }
  /**
   * 保姆信息展示页面 审核状态修改
   * 
   * @param id
   */
  @RequestMapping(value = "changeNannyInformation")
  public void changeNannyInformation(String id, String struts) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(struts, id_char);
    nannyService.changeNannyInformation(data);
  }
  /**
   * 保姆信息展示页面 上线状态修改
   * 
   * @param id
   */
  @RequestMapping(value = "onlineNannyInformation")
  public void onlineNannyInformation(String id, String struts) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(struts, id_char);
    nannyService.onlineNannyInformation(data);
  }
  /**
   * 详情页面 修改信息
   * @param id
   * @return
   */
  @RequestMapping(value = "changeDetailData")
  public ModelAndView changeDetailData(String id) {
    ModelAndView model = new ModelAndView();
    int id_char = Integer.parseInt(id);
    NannyDetailedShowData naayData = nannyService
        .nannyDetailInformation(id_char);
    int BrokerId = naayData.getBrokerId();
    if(BrokerId==0){
      //BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerName("fbgtrsne");
      naayData.setPhone1(null);
      naayData.setPhone2(null);
      naayData.setBrokertelphone(null);
    }else{
      BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerName(data.getName());
      naayData.setPhone1(data.getPhone1());
      naayData.setPhone2(data.getPhone2());
      naayData.setBrokertelphone(data.getTelphone());
    }
    model.addObject("NaayData", naayData);
    model.setViewName("NannyChange");
    return model;
  }
  public static String IdNOToAge(String IdNO) {
    int leh = IdNO.length();
    String dates = "";
    if (leh == 18) {
      int se = Integer.valueOf(IdNO.substring(leh - 1)) % 2;
      dates = IdNO.substring(6, 10);
      SimpleDateFormat df = new SimpleDateFormat("yyyy");
      String year = df.format(new Date());
      int u = Integer.parseInt(year) - Integer.parseInt(dates);
      return Integer.toString(u);
    } else {
      dates = IdNO.substring(6, 8);
      return dates;
    }
  }
  /**
   * 得到修改的详细页面信息
   * @param request
   * @return
   * @throws UnsupportedEncodingException
   */
  @RequestMapping(value = "getChangeNannyData")
  public String getChangeNannyRegistrationData(HttpServletRequest request,HttpSession session,@RequestParam("imagea")CommonsMultipartFile file1,@RequestParam("fname")CommonsMultipartFile file2)
      throws UnsupportedEncodingException {
    String NannyID = request.getParameter("NannyID");
    int id = Integer.parseInt(NannyID);
    String name = request.getParameter("name");
    //String image = request.getParameter("image");
    //image = URLDecoder.decode(image);
    //String photo = request.getParameter("photo");
    //photo = URLDecoder.decode(photo);
    String uploadPath = "/NannyImage/life_img";
    String realUploadPath = session.getServletContext().getRealPath(uploadPath);//绝对路径
    String image = null;
    if(!file1.isEmpty()){
      image = uploadService.uploadImage(file1, uploadPath, realUploadPath);//图片上传
    } 
    String uploadPath2 = "/NannyImage/IDCard_img";
    String realUploadPath2 = session.getServletContext().getRealPath(uploadPath2);//绝对路径
    String photo = null;
    if(!file2.isEmpty()){
      photo = uploadService.uploadImage(file2, uploadPath2, realUploadPath2);//图片上传
    } 
    String idnumber = request.getParameter("id_card");
    String nonresident = request.getParameter("residence");
    String wage = request.getParameter("ref_salary");
    String census = request.getParameter("street");
    String type = request.getParameter("type");
    String functions = request.getParameter("skill_id");
    String education = request.getParameter("education");
    String telphone = request.getParameter("phone");
    String faith = request.getParameter("belief");
    String marriage = request.getParameter("matrimony");
    String party = request.getParameter("party");
    String height = request.getParameter("height");
    String weight = request.getParameter("weight");
    String language = "";
    for (int i = 1; i < 8; i++) {
      if (request.getParameter("lang-" + i) != null) {
        language = request.getParameter("lang-" + i) + "/" + language;
      }
    }
    String honor = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("certificate-" + i) != null) {
        honor = request.getParameter("certificate-" + i) + "/" + honor;
      }
    }
    String speciality = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("specialist-" + i) != null) {
        speciality = request.getParameter("specialist-" + i) + "/"
            + speciality;
      }
    }
    String intention = "";
    for (int i = 1; i < 15; i++) {
      if (request.getParameter("purpose-" + i) != null) {
        intention = request.getParameter("purpose-" + i) + "/"
            + intention;
      }
    }
    String experience = request.getParameter("experience");
    String brokername = request.getParameter("brokername");
    int brokerId = Integer.parseInt(brokername);
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    String time = df.format(new Date());// new Date()为获取当前系统时间
    NursemaidData nursemaidData = new NursemaidData(id,name, census, type,
        functions, education, faith, marriage, party, height, weight,
        language, honor, speciality, intention, experience, image,
        photo);
    nursemaidData.setTelphone(telphone);
    nursemaidData.setBrokerId(brokerId);
    nursemaidData.setIdnumber(idnumber);
    nursemaidData.setNonResident(nonresident);
    nursemaidData.setWage(wage);
    nursemaidData.setTime(time);
    nannyService.insertChangeNannyData(nursemaidData);
    return "successChange";
  }
  @RequestMapping(value = "deteleNannyDetailedInformation")
  public void deteleNannyDetailedInformation(String id) {
    int id_char = Integer.parseInt(id);
    nannyService.deteleNannyDetailedInformation(id_char);
  }
  @RequestMapping(value = "changNannyEengage")
  public void changEengage(String id,String eengage) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(eengage, id_char);
    nannyService.changEengage(data);
  }
}

image.gif

package com.hep.controller;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import com.hep.dto.BrokerShowData;
import com.hep.dto.ChangeData;
import com.hep.dto.EmployerShowData;
import com.hep.dto.NursemaidShowData;
import com.hep.model.EmployerData;
import com.hep.service.BrokerService;
import com.hep.service.RecruitmentService;
@Controller
public class RecruitmentController {
  @Resource
  private RecruitmentService recruitmentService;
  @Resource
  private BrokerService brokerService;
  @RequestMapping(value = "RecruitmentRelease")
  public String recruitmentRelease() {
    return "RecruitmentRelease";
  }
  @RequestMapping(value = "RecruitmentInformation")
  public ModelAndView recruitmentInformation() {
    // ModelAndView model = new ModelAndView();
    //
    // List<EmployerShowData> naayData =
    // recruitmentService.selectAllRecruitmentData();
    // model.addObject("NaayData", naayData);
    // model.setViewName("RecruitmentInformation");
    return recruitmentService.selectPageRecruitmentData(null, null);
  }
  @RequestMapping(value = "RecruitmentInformationPage")
  public ModelAndView recruitmentInformationPage(
      @RequestParam("pageNum") String pageNum,
      @RequestParam("pageSize") String pageSize) {
    // ModelAndView model = new ModelAndView();
    //
    // List<EmployerShowData> naayData =
    // recruitmentService.selectAllRecruitmentData();
    // model.addObject("NaayData", naayData);
    // model.setViewName("RecruitmentInformation");
    return recruitmentService.selectPageRecruitmentData(pageNum, pageSize);
  }
  /**
   * 招聘详细情况
   * 
   * @return
   */
  @RequestMapping(value = "RecruitmentDetailedInformation")
  public ModelAndView recruitmentDetailedInformation(String id) {
    ModelAndView model = new ModelAndView();
    int id_int = Integer.parseInt(id);
    EmployerShowData naayData = recruitmentService
        .recruitmentDetailedInformation(id_int);
    int BrokerId = naayData.getBrokerId();
    if(BrokerId == 0){
      naayData.setBrokerId(0);
      naayData.setBrokerName("fbgtrsne");
      naayData.setPhone1(null);
      naayData.setPhone2(null);
      naayData.setBrokertelphone(null);
      naayData.setQqnumber("1762460307");
      naayData.setDepartment(null);
    }else{
      BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerId(BrokerId);
      naayData.setBrokerName(data.getName());
      naayData.setPhone1(data.getPhone1());
      naayData.setPhone2(data.getPhone2());
      naayData.setBrokertelphone(data.getTelphone());
      naayData.setQqnumber(data.getQqnumber());
      naayData.setDepartment(data.getDepartment());
    }
    model.addObject("NaayData", naayData);
    model.setViewName("RecruitmentDetailedInformation");
    return model;
  }
  /**
   * 修改招聘详细情况页面
   * 
   * @return
   */
  @RequestMapping(value = "changeRecruitmentDetailedInformation")
  public ModelAndView changeRecruitmentDetailedInformation(String id) {
    ModelAndView model = new ModelAndView();
    int id_int = Integer.parseInt(id);
    EmployerShowData naayData = recruitmentService
        .recruitmentDetailedInformation(id_int);
    int BrokerId = naayData.getBrokerId();
    if(BrokerId==0){
      //BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerName("fbgtrsne");
      naayData.setPhone1(null);
      naayData.setPhone2(null);
      naayData.setBrokertelphone(null);
    }else{
      BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
      naayData.setBrokerName(data.getName());
      naayData.setPhone1(data.getPhone1());
      naayData.setPhone2(data.getPhone2());
      naayData.setBrokertelphone(data.getTelphone());
    }
    model.addObject("NaayData", naayData);
    model.setViewName("RecruitmentChange");
    return model;
  }
  @RequestMapping(value = "getRecruitmentRelease")
  public String getRecruitmentRelease(HttpServletRequest request)
      throws UnsupportedEncodingException {
    String type = request.getParameter("job_type_id");
    //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    String functions = request.getParameter("skill_id");
    //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    String detail = request.getParameter("job_description");
    //detail = new String(detail.getBytes("iso-8859-1"), "UTF-8");
    String claim = request.getParameter("demands");
    //claim = new String(claim.getBytes("iso-8859-1"), "UTF-8");
    String wage = request.getParameter("salary");
    //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
    String fixed_price = request.getParameter("fixed_price");
    //fixed_price = new String(fixed_price.getBytes("iso-8859-1"), "UTF-8");
    if(fixed_price != null && fixed_price !=""){
      wage = fixed_price;
    }
    String address = request.getParameter("street");
    //address = new String(address.getBytes("iso-8859-1"), "UTF-8");
    String population = request.getParameter("people");
    //population = new String(population.getBytes("iso-8859-1"), "UTF-8");
    String area = request.getParameter("area");
    //area = new String(area.getBytes("iso-8859-1"), "UTF-8");
    String employer = request.getParameter("name");
    //employer = new String(employer.getBytes("iso-8859-1"), "UTF-8");
    String telphone = request.getParameter("phone");
    //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    String baby1birthday = request.getParameter("child1");
    //baby1birthday = new String(baby1birthday.getBytes("iso-8859-1"),
        //"UTF-8");
    String baby2birthday = request.getParameter("child2");
    //baby2birthday = new String(baby2birthday.getBytes("iso-8859-1"),
        //"UTF-8");
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    String time = df.format(new Date());// new Date()为获取当前系统时间
    EmployerData employerData = new EmployerData(type, functions, detail,
        claim, wage, address, population, area, employer, telphone,
        baby1birthday, baby2birthday);
    employerData.setTime(time);
    recruitmentService.insertEmployerData(employerData);
    return "success";
  }
  /**
   * 得到修改后的信息
   * @param request
   * @return
   * @throws UnsupportedEncodingException
   */
  @RequestMapping(value = "getChangeRecruitmentRelease")
  public String getChangeRecruitmentRelease(HttpServletRequest request)
      throws UnsupportedEncodingException {
    String Recruitm_ID =  request.getParameter("Recruitm_ID");
    String type = request.getParameter("job_type_id");
    //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    String functions = request.getParameter("skill_id");
    //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    String detail = request.getParameter("job_description");
    //detail = new String(detail.getBytes("iso-8859-1"), "UTF-8");
    String claim = request.getParameter("demands");
    //claim = new String(claim.getBytes("iso-8859-1"), "UTF-8");
    String wage = request.getParameter("salary");
    //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
    String fixed_price = request.getParameter("fixed_price");
    //fixed_price = new String(fixed_price.getBytes("iso-8859-1"), "UTF-8");
    if(fixed_price != null && fixed_price !=""){
      wage = fixed_price;
    }
    String address = request.getParameter("street");
    //address = new String(address.getBytes("iso-8859-1"), "UTF-8");
    String population = request.getParameter("people");
    //population = new String(population.getBytes("iso-8859-1"), "UTF-8");
    String area = request.getParameter("area");
    //area = new String(area.getBytes("iso-8859-1"), "UTF-8");
    String employer = request.getParameter("name");
    //employer = new String(employer.getBytes("iso-8859-1"), "UTF-8");
    String telphone = request.getParameter("phone");
    //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    String baby1birthday = request.getParameter("child1");
    //baby1birthday = new String(baby1birthday.getBytes("iso-8859-1"),
        //"UTF-8");
    String baby2birthday = request.getParameter("child2");
    //baby2birthday = new String(baby2birthday.getBytes("iso-8859-1"),
        //"UTF-8");
    String brokername = request.getParameter("brokername");
    int brokerId = Integer.parseInt(brokername);
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    String time = df.format(new Date());// new Date()为获取当前系统时间
    EmployerData employerData = new EmployerData(Integer.parseInt(Recruitm_ID),type, functions, detail,
        claim, wage, address, population, area, employer, telphone,
        baby1birthday, baby2birthday, time);
    employerData.setBrokerId(brokerId);
    recruitmentService.changeEmployerData(employerData);
    return "successChange";
  }
  /**
   * 雇主招聘信息展示页面 检索查询
   * 
   * @return
   * @throws UnsupportedEncodingException
   */
  @RequestMapping(value = "searchRecruitmentInformation")
  public ModelAndView searchRecruitmentInformation(String job, String skill,
      String salary, @RequestParam("pageNum") String pageNum,
      @RequestParam("pageSize") String pageSize)
      throws UnsupportedEncodingException {
    // logger.info(job);
    ModelAndView model = new ModelAndView();
    job = new String(job.getBytes("GBK"), "UTF-8");
    skill = new String(skill.getBytes("GBK"), "UTF-8");
    salary = new String(salary.getBytes("GBK"), "UTF-8");
    // List<EmployerShowData> naayData = recruitmentService
    // .searchNannyInformation(job, skill, salary);
    // model.addObject("NaayData", naayData);
    // model.setViewName("RecruitmentInformation");
    return recruitmentService.searchNannyInformation(job, skill, salary,
        pageNum, pageSize);
  }
  /**
   * 招聘信息展示页面 审核状态修改
   * 
   * @param id
   */
  @RequestMapping(value = "changeRecruitmentInformation")
  public void changeRecruitmentInformation(String id, String struts) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(struts, id_char);
    recruitmentService.changeRecruitmentInformation(data);
  }
  /**
   * 招聘信息展示页面 上线状态修改
   * 
   * @param id
   */
  @RequestMapping(value = "onlineRecruitmentInformation")
  public void onlineRecruitmentInformation(String id, String struts) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(struts, id_char);
    recruitmentService.onlineRecruitmentInformation(data);
  }
  @RequestMapping(value = "deteleRecruitmentDetailedInformation")
  public void deteleRecruitmentDetailedInformation(String id) {
    int id_char = Integer.parseInt(id);
    recruitmentService.deteleRecruitmentDetailedInformation(id_char);
  }
  @RequestMapping(value = "changRecruitmentEengage")
  public void changEengage(String id,String eengage) {
    int id_char = Integer.parseInt(id);
    ChangeData data = new ChangeData(eengage, id_char);
    recruitmentService.changEengage(data);
  }
}

image.gif

五,项目总结

相关文章
|
7月前
|
小程序 Java 数据管理
Java前后端分离架构开发的智慧校园电子班牌系统源码(SaaS模式)
.智慧校园设备管理: 设备管理主要对班级中正在使用的电子智慧班牌进行管理,基本功能包含(开关机状态、班级信息、设备型号、开关机信息、电子智慧班牌截屏信息、教师编号、设备ID、在线和离线状态、电子智慧班牌更新时间等)
83 0
|
7月前
|
存储 数据可视化 安全
Java全套智慧校园系统源码springboot+elmentui +Quartz可视化校园管理平台系统源码 建设智慧校园的5大关键技术
智慧校园指的是以物联网为基础的智慧化的校园工作、学习和生活一体化环境,这个一体化环境以各种应用服务系统为载体,将教学、科研、管理和校园生活进行充分融合。无处不在的网络学习、融合创新的网络科研、透明高效的校务治理、丰富多彩的校园文化、方便周到的校园生活。简而言之,“要做一个安全、稳定、环保、节能的校园。
112 6
|
7月前
|
Java 关系型数据库 MySQL
【毕业设计】基于Springboot的B2B平台医疗病历交互系统
【毕业设计】基于Springboot的B2B平台医疗病历交互系统
65 0
|
7月前
|
Java 关系型数据库 数据库
基于springboot家政服务管理平台
基于springboot家政服务管理平台
|
7月前
|
数据采集 前端开发 Java
springboot医院绩效考核系统源码支持二次开发
作为医院用综合绩效核算系统,系统需要和his系统进行对接,按照设定周期,从his系统获取医院科室和医生、护士、其他人员工作量,对没有录入信息化系统的工作量,绩效考核系统设有手工录入功能(可以批量导入),对获取的数据系统按照设定的公式进行汇算,且设置审核机制,可以退回修正,系统功能强大,完全模拟医院实际绩效核算过程,且每步核算都可以进行调整和参数设置,能适应医院多种绩效核算方式。
157 5
|
7月前
|
Java BI 应用服务中间件
使用Springboot开发前后端分离校园智能出行拼车系统
使用Springboot开发前后端分离校园智能出行拼车系统
|
人工智能 小程序 Java
基于Springboot+Vue2前后端分离框架的智慧校园电子班牌系统源码,智慧学校源码+微信小程序+SaaS运营平台源码
技术开发环境:Java+springboot+vue+element-ui+mysql 用的是最新的技术栈,完全满足开发要求。
318 0
基于Springboot+Vue2前后端分离框架的智慧校园电子班牌系统源码,智慧学校源码+微信小程序+SaaS运营平台源码
|
前端开发 搜索推荐 Java
基于SSM实现家政管理平台的开发和实现
基于SSM实现家政管理平台的开发和实现
138 0
基于SSM实现家政管理平台的开发和实现
|
JavaScript Java 关系型数据库
在自己校园内使用SSM实现校园兼职管理平台系统
在自己校园内使用SSM实现校园兼职管理平台系统
275 0
在自己校园内使用SSM实现校园兼职管理平台系统
|
前端开发 Java 关系型数据库
使用SSM开发一个校友联络的平台系统
使用SSM开发一个校友联络的平台系统
使用SSM开发一个校友联络的平台系统