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


    作者主页:编程千纸鹤

    作者简介:Java、前端、Pythone开发多年,做过高程,项目经理,架构师

    主要内容:Java项目开发、毕业设计开发、面试技术整理、最新技术分享

    项目编号:KS-031

    一,项目简介

    随着我国服务行业水平的不断提高,家政服务者和客户之间的信息互通和管理是既重要又复杂的系统工作。传统家政服务工作方式已无法满足现代信息化社会或全方位诸多个性化服务需求。故开发一个家政服务管理系统,对促进家政服务行业发展颇具实用意义。
    本文首先对目前家政管理系统开发所需技术进行调研,再结合当前家政行业发展的趋势,对该系统提出可行性分析,设计开发出了系统具体功能需求。系统设计采用 B/S 三层模式架构,以JAVA语言工具和MySQL数据库;以及HTML等技术来实现家政服务信息化管理的基本功能。系统主要功能实现了用户信息管理、订单的预约交易评价等服务。其中前台包括客户及家政人员,其中客户可以预约和管理家政服务、审核订单以及评价工作;家政人员可以查看、申请、管理订单及评价用户。后台管理员可以管理所有账户权限与信息认证。该家政服务网站的实现在一定程度上提高了市场竞争力。
     

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

    二,环境介绍

    语言环境:Java:  jdk1.8

    数据库:Mysql: mysql5.7

    应用服务器:Tomcat:  tomcat8.5.31

    开发工具:IDEA或eclipse

    后台开发:SSM

    前端开发:JSP+JQUERY+CSS

    三,系统展示

     

    四,核心代码展示

    1. package com.hep.controller;
    2. import java.io.UnsupportedEncodingException;
    3. import java.util.List;
    4. import javax.annotation.Resource;
    5. import javax.servlet.http.HttpServletRequest;
    6. import org.springframework.stereotype.Controller;
    7. import org.springframework.web.bind.annotation.RequestMapping;
    8. import org.springframework.web.bind.annotation.ResponseBody;
    9. import org.springframework.web.servlet.ModelAndView;
    10. import com.hep.dto.BrokerShowData;
    11. import com.hep.service.BrokerService;
    12. @Controller
    13. public class BrokerController {
    14. @Resource
    15. private BrokerService brokerService;
    16. @RequestMapping(value="BrokerInformation")
    17. public ModelAndView brokerInformation(HttpServletRequest request){
    18. String pageNum = request.getParameter("pageNum");
    19. String pageSize = request.getParameter("pageSize");
    20. return brokerService.brokerInformation(pageNum,pageSize);
    21. }
    22. @RequestMapping(value="getBrokerInformation")
    23. @ResponseBody
    24. public List getBrokerInformation(){
    25. List data = brokerService.getBrokerInformation();
    26. return data;
    27. }
    28. @RequestMapping(value="addBrokerToNanny")
    29. public void addBrokerToNanny(String naayId,String brokerId){
    30. int naayId_int = Integer.parseInt(naayId);
    31. int brokerId_int = Integer.parseInt(brokerId);
    32. brokerService.addBrokerToNanny(naayId_int,brokerId_int);
    33. }
    34. @RequestMapping(value="addBrokerToRecruitment")
    35. public void addBrokerToRecruitment(String naayId,String brokerId){
    36. int naayId_int = Integer.parseInt(naayId);
    37. int brokerId_int = Integer.parseInt(brokerId);
    38. brokerService.addBrokerToRecruitment(naayId_int,brokerId_int);
    39. }
    40. @RequestMapping(value="changeBrokerInformation")
    41. public void changeBrokerInformation(String name,String phone1,String phone2,String telphone,String qqnumber,String department,String id) throws UnsupportedEncodingException{
    42. name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    43. department = new String(department.getBytes("iso-8859-1"), "UTF-8");
    44. BrokerShowData brokerShowData = new BrokerShowData(Integer.parseInt(id),name, phone1, phone2, telphone,qqnumber,department);
    45. brokerService.changeBrokerInformation(brokerShowData);
    46. }
    47. @RequestMapping(value="deleteBrokerInformation")
    48. public void deleteBrokerInformation(String id){
    49. brokerService.deleteBrokerInformation(Integer.parseInt(id));
    50. }
    51. @RequestMapping(value="addBrokerInformation")
    52. public void addBrokerInformation(String name,String phone1,String phone2,String telphone,String qqnumber,String department) throws UnsupportedEncodingException{
    53. name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    54. department = new String(department.getBytes("iso-8859-1"), "UTF-8");
    55. BrokerShowData brokerShowData = new BrokerShowData(name, phone1, phone2, telphone,qqnumber,department);
    56. brokerService.addBrokerInformation(brokerShowData);
    57. }
    58. }
    1. package com.hep.controller;
    2. import java.io.BufferedReader;
    3. import java.io.IOException;
    4. import java.io.UnsupportedEncodingException;
    5. import java.net.URLDecoder;
    6. import java.text.SimpleDateFormat;
    7. import java.util.Date;
    8. import java.util.List;
    9. import javax.annotation.Resource;
    10. import javax.servlet.http.HttpServletRequest;
    11. import javax.servlet.http.HttpSession;
    12. import org.slf4j.Logger;
    13. import org.slf4j.LoggerFactory;
    14. import org.springframework.stereotype.Controller;
    15. import org.springframework.web.bind.annotation.RequestMapping;
    16. import org.springframework.web.bind.annotation.RequestMethod;
    17. import org.springframework.web.bind.annotation.RequestParam;
    18. import org.springframework.web.bind.annotation.ResponseBody;
    19. import org.springframework.web.multipart.commons.CommonsMultipartFile;
    20. import org.springframework.web.servlet.ModelAndView;
    21. import com.hep.dto.BrokerShowData;
    22. import com.hep.dto.ChangeData;
    23. import com.hep.dto.NannyDetailedShowData;
    24. import com.hep.dto.NursemaidShowData;
    25. import com.hep.model.NursemaidData;
    26. import com.hep.service.BrokerService;
    27. import com.hep.service.NannyService;
    28. import com.hep.service.UploadService;
    29. import com.hep.test.ImageBinary;
    30. @Controller
    31. public class NannyController {
    32. @Resource
    33. private NannyService nannyService;
    34. @Resource
    35. private BrokerService brokerService;
    36. @Resource
    37. private UploadService uploadService;
    38. final Logger logger = LoggerFactory.getLogger(this.getClass());
    39. /**
    40. * 保姆信息展示页面初始化
    41. *
    42. * @return
    43. */
    44. @RequestMapping(value = "NannyInformation")
    45. public ModelAndView nannyInformation() {
    46. // ModelAndView model = new ModelAndView();
    47. // List naayData = nannyService.selectAllNannyData();
    48. // model.addObject("NaayData", naayData);
    49. // model.setViewName("NannyInformation");
    50. return nannyService.selectPageNannyData(null, null);
    51. }
    52. /**
    53. * 保姆信息展示页面 分页
    54. *
    55. * @return
    56. */
    57. @RequestMapping(value = "NannyInformationPage")
    58. public ModelAndView nannyInformationPage(
    59. @RequestParam("pageNum") String pageNum,
    60. @RequestParam("pageSize") String pageSize) {
    61. // ModelAndView model = new ModelAndView();
    62. return nannyService.selectPageNannyData(pageNum, pageSize);
    63. }
    64. /**
    65. * 保姆详细信息展示页面初始化
    66. *
    67. * @return
    68. */
    69. @RequestMapping(value = "NannyDetailInformation")
    70. public ModelAndView nannyDetailInformation(String id) {
    71. ModelAndView model = new ModelAndView();
    72. int id_char = Integer.parseInt(id);
    73. NannyDetailedShowData naayData = nannyService
    74. .nannyDetailInformation(id_char);
    75. int BrokerId = naayData.getBrokerId();
    76. if(BrokerId != 0){
    77. BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    78. naayData.setBrokerId(BrokerId);
    79. naayData.setBrokerName(data.getName());
    80. naayData.setPhone1(data.getPhone1());
    81. naayData.setPhone2(data.getPhone2());
    82. naayData.setBrokertelphone(data.getTelphone());
    83. naayData.setQqNumber(data.getQqnumber());
    84. naayData.setDepartment(data.getDepartment());
    85. }else{
    86. naayData.setBrokerId(0);
    87. naayData.setBrokerName("fbgtrsne");
    88. naayData.setPhone1(null);
    89. naayData.setPhone2(null);
    90. naayData.setBrokertelphone(null);
    91. naayData.setQqNumber("1762460307");
    92. naayData.setDepartment(null);
    93. }
    94. model.addObject("NaayData", naayData);
    95. model.setViewName("NannyDetailedInformation");
    96. return model;
    97. }
    98. /**
    99. * 保姆 信息登记页面初始化
    100. *
    101. * @return
    102. */
    103. @RequestMapping(value = "NannyRegistration")
    104. public String nannyRegistration() {
    105. return "NannyRegistration";
    106. }
    107. /**
    108. * 存储 保姆登记信息
    109. *
    110. * @param request
    111. * @throws UnsupportedEncodingException
    112. */
    113. @RequestMapping(value = "getNannyRegistrationData")
    114. public String getNannyRegistrationData(HttpServletRequest request,HttpSession session,@RequestParam("imagea")CommonsMultipartFile file1,@RequestParam("fname")CommonsMultipartFile file2)
    115. throws UnsupportedEncodingException {
    116. String name = request.getParameter("name");
    117. //name = new String(name.getBytes("iso-8859-1"), "UTF-8");
    118. //String image = request.getParameter("image");
    119. //image = URLDecoder.decode(image);
    120. //String photo = request.getParameter("photo");
    121. //photo = URLDecoder.decode(photo);
    122. String uploadPath = "/NannyImage/life_img";
    123. String realUploadPath = session.getServletContext().getRealPath(uploadPath);//绝对路径
    124. String image = uploadService.uploadImage(file1, uploadPath, realUploadPath);//图片上传
    125. String uploadPath2 = "/NannyImage/IDCard_img";
    126. String realUploadPath2 = session.getServletContext().getRealPath(uploadPath2);//绝对路径
    127. String photo = uploadService.uploadImage(file2, uploadPath2, realUploadPath2);//图片上传
    128. String census = request.getParameter("street");
    129. //census = new String(census.getBytes("iso-8859-1"), "UTF-8");
    130. String nonResident = request.getParameter("residence");
    131. //nonResident = new String(nonResident.getBytes("iso-8859-1"),
    132. //"UTF-8");
    133. String idnumber = request.getParameter("id_card");
    134. //idnumber = new String(idnumber.getBytes("iso-8859-1"), "UTF-8");
    135. String telphone = request.getParameter("phone");
    136. //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    137. String type = request.getParameter("type");
    138. //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    139. //logger.info(type);
    140. String functions = request.getParameter("skill_id");
    141. //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    142. String education = request.getParameter("education");
    143. //education = new String(education.getBytes("iso-8859-1"), "UTF-8");
    144. String faith = request.getParameter("belief");
    145. //faith = new String(faith.getBytes("iso-8859-1"), "UTF-8");
    146. String marriage = request.getParameter("matrimony");
    147. //marriage = new String(marriage.getBytes("iso-8859-1"), "UTF-8");
    148. String party = request.getParameter("party");
    149. //party = new String(party.getBytes("iso-8859-1"), "UTF-8");
    150. String height = request.getParameter("height");
    151. //height = new String(height.getBytes("iso-8859-1"), "UTF-8");
    152. String weight = request.getParameter("weight");
    153. //weight = new String(weight.getBytes("iso-8859-1"), "UTF-8");
    154. // logger.info("222222222222222222222222222222222222222");
    155. String language = "";
    156. for (int i = 1; i < 8; i++) {
    157. if (request.getParameter("lang-" + i) != null) {
    158. language = request.getParameter("lang-" + i) + "/" + language;
    159. }
    160. }
    161. // language = new String(language.getBytes("iso-8859-1"), "UTF-8");
    162. String honor = "";
    163. for (int i = 1; i < 15; i++) {
    164. if (request.getParameter("certificate-" + i) != null) {
    165. honor = request.getParameter("certificate-" + i) + "/" + honor;
    166. }
    167. }
    168. //honor = new String(honor.getBytes("iso-8859-1"), "UTF-8");
    169. String speciality = "";
    170. for (int i = 1; i < 15; i++) {
    171. if (request.getParameter("specialist-" + i) != null) {
    172. speciality = request.getParameter("specialist-" + i) + "/"
    173. + speciality;
    174. }
    175. }
    176. //speciality = new String(speciality.getBytes("iso-8859-1"), "UTF-8");
    177. String intention = "";
    178. for (int i = 1; i < 15; i++) {
    179. if (request.getParameter("purpose-" + i) != null) {
    180. intention = request.getParameter("purpose-" + i) + "/"
    181. + intention;
    182. }
    183. }
    184. //intention = new String(intention.getBytes("iso-8859-1"), "UTF-8");
    185. // logger.info("3333333333333333333333333333333");
    186. String range = request.getParameter("scope");
    187. // range = new String(range.getBytes("iso-8859-1"), "UTF-8");
    188. String experience = request.getParameter("experience");
    189. //experience = new String(experience.getBytes("iso-8859-1"), "UTF-8");
    190. String wage = request.getParameter("ref_salary");
    191. //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
    192. //
    193. SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    194. String time = df.format(new Date());// new Date()为获取当前系统时间
    195. NursemaidData nursemaidData = new NursemaidData(name, census,
    196. nonResident, idnumber, telphone, type, functions, education,
    197. faith, marriage, party, height, weight, language, honor,
    198. speciality, intention, range, experience, wage, image, photo);
    199. nursemaidData.setTime(time);
    200. // String age = NannyController.IdNOToAge(idnumber);
    201. // nursemaidData.setAge(age);
    202. nannyService.insertNannyData(nursemaidData);
    203. return "success";
    204. }
    205. /**
    206. * 保姆信息展示页面 检索查询
    207. *
    208. * @return
    209. * @throws UnsupportedEncodingException
    210. */
    211. @RequestMapping(value = "searchNannyInformation")
    212. public ModelAndView searchNannyInformation(String job, String skill,
    213. String age, @RequestParam("pageNum") String pageNum,
    214. @RequestParam("pageSize") String pageSize)
    215. throws UnsupportedEncodingException {
    216. logger.info(job);
    217. job = new String(job.getBytes("iso-8859-1"), "UTF-8");
    218. skill = new String(skill.getBytes("iso-8859-1"), "UTF-8");
    219. age = new String(age.getBytes("iso-8859-1"), "UTF-8");
    220. // ModelAndView model = new ModelAndView();
    221. //
    222. // List naayData =
    223. // nannyService.searchNannyInformation(
    224. // job, skill, age,pageNum,pageSize);
    225. // model.addObject("NaayData", naayData);
    226. // model.setViewName("NannyInformation");
    227. return nannyService.searchNannyInformation(job, skill, age, pageNum,
    228. pageSize);
    229. }
    230. /**
    231. * 保姆信息展示页面 审核状态修改
    232. *
    233. * @param id
    234. */
    235. @RequestMapping(value = "changeNannyInformation")
    236. public void changeNannyInformation(String id, String struts) {
    237. int id_char = Integer.parseInt(id);
    238. ChangeData data = new ChangeData(struts, id_char);
    239. nannyService.changeNannyInformation(data);
    240. }
    241. /**
    242. * 保姆信息展示页面 上线状态修改
    243. *
    244. * @param id
    245. */
    246. @RequestMapping(value = "onlineNannyInformation")
    247. public void onlineNannyInformation(String id, String struts) {
    248. int id_char = Integer.parseInt(id);
    249. ChangeData data = new ChangeData(struts, id_char);
    250. nannyService.onlineNannyInformation(data);
    251. }
    252. /**
    253. * 详情页面 修改信息
    254. * @param id
    255. * @return
    256. */
    257. @RequestMapping(value = "changeDetailData")
    258. public ModelAndView changeDetailData(String id) {
    259. ModelAndView model = new ModelAndView();
    260. int id_char = Integer.parseInt(id);
    261. NannyDetailedShowData naayData = nannyService
    262. .nannyDetailInformation(id_char);
    263. int BrokerId = naayData.getBrokerId();
    264. if(BrokerId==0){
    265. //BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    266. naayData.setBrokerName("fbgtrsne");
    267. naayData.setPhone1(null);
    268. naayData.setPhone2(null);
    269. naayData.setBrokertelphone(null);
    270. }else{
    271. BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    272. naayData.setBrokerName(data.getName());
    273. naayData.setPhone1(data.getPhone1());
    274. naayData.setPhone2(data.getPhone2());
    275. naayData.setBrokertelphone(data.getTelphone());
    276. }
    277. model.addObject("NaayData", naayData);
    278. model.setViewName("NannyChange");
    279. return model;
    280. }
    281. public static String IdNOToAge(String IdNO) {
    282. int leh = IdNO.length();
    283. String dates = "";
    284. if (leh == 18) {
    285. int se = Integer.valueOf(IdNO.substring(leh - 1)) % 2;
    286. dates = IdNO.substring(6, 10);
    287. SimpleDateFormat df = new SimpleDateFormat("yyyy");
    288. String year = df.format(new Date());
    289. int u = Integer.parseInt(year) - Integer.parseInt(dates);
    290. return Integer.toString(u);
    291. } else {
    292. dates = IdNO.substring(6, 8);
    293. return dates;
    294. }
    295. }
    296. /**
    297. * 得到修改的详细页面信息
    298. * @param request
    299. * @return
    300. * @throws UnsupportedEncodingException
    301. */
    302. @RequestMapping(value = "getChangeNannyData")
    303. public String getChangeNannyRegistrationData(HttpServletRequest request,HttpSession session,@RequestParam("imagea")CommonsMultipartFile file1,@RequestParam("fname")CommonsMultipartFile file2)
    304. throws UnsupportedEncodingException {
    305. String NannyID = request.getParameter("NannyID");
    306. int id = Integer.parseInt(NannyID);
    307. String name = request.getParameter("name");
    308. //String image = request.getParameter("image");
    309. //image = URLDecoder.decode(image);
    310. //String photo = request.getParameter("photo");
    311. //photo = URLDecoder.decode(photo);
    312. String uploadPath = "/NannyImage/life_img";
    313. String realUploadPath = session.getServletContext().getRealPath(uploadPath);//绝对路径
    314. String image = null;
    315. if(!file1.isEmpty()){
    316. image = uploadService.uploadImage(file1, uploadPath, realUploadPath);//图片上传
    317. }
    318. String uploadPath2 = "/NannyImage/IDCard_img";
    319. String realUploadPath2 = session.getServletContext().getRealPath(uploadPath2);//绝对路径
    320. String photo = null;
    321. if(!file2.isEmpty()){
    322. photo = uploadService.uploadImage(file2, uploadPath2, realUploadPath2);//图片上传
    323. }
    324. String idnumber = request.getParameter("id_card");
    325. String nonresident = request.getParameter("residence");
    326. String wage = request.getParameter("ref_salary");
    327. String census = request.getParameter("street");
    328. String type = request.getParameter("type");
    329. String functions = request.getParameter("skill_id");
    330. String education = request.getParameter("education");
    331. String telphone = request.getParameter("phone");
    332. String faith = request.getParameter("belief");
    333. String marriage = request.getParameter("matrimony");
    334. String party = request.getParameter("party");
    335. String height = request.getParameter("height");
    336. String weight = request.getParameter("weight");
    337. String language = "";
    338. for (int i = 1; i < 8; i++) {
    339. if (request.getParameter("lang-" + i) != null) {
    340. language = request.getParameter("lang-" + i) + "/" + language;
    341. }
    342. }
    343. String honor = "";
    344. for (int i = 1; i < 15; i++) {
    345. if (request.getParameter("certificate-" + i) != null) {
    346. honor = request.getParameter("certificate-" + i) + "/" + honor;
    347. }
    348. }
    349. String speciality = "";
    350. for (int i = 1; i < 15; i++) {
    351. if (request.getParameter("specialist-" + i) != null) {
    352. speciality = request.getParameter("specialist-" + i) + "/"
    353. + speciality;
    354. }
    355. }
    356. String intention = "";
    357. for (int i = 1; i < 15; i++) {
    358. if (request.getParameter("purpose-" + i) != null) {
    359. intention = request.getParameter("purpose-" + i) + "/"
    360. + intention;
    361. }
    362. }
    363. String experience = request.getParameter("experience");
    364. String brokername = request.getParameter("brokername");
    365. int brokerId = Integer.parseInt(brokername);
    366. SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    367. String time = df.format(new Date());// new Date()为获取当前系统时间
    368. NursemaidData nursemaidData = new NursemaidData(id,name, census, type,
    369. functions, education, faith, marriage, party, height, weight,
    370. language, honor, speciality, intention, experience, image,
    371. photo);
    372. nursemaidData.setTelphone(telphone);
    373. nursemaidData.setBrokerId(brokerId);
    374. nursemaidData.setIdnumber(idnumber);
    375. nursemaidData.setNonResident(nonresident);
    376. nursemaidData.setWage(wage);
    377. nursemaidData.setTime(time);
    378. nannyService.insertChangeNannyData(nursemaidData);
    379. return "successChange";
    380. }
    381. @RequestMapping(value = "deteleNannyDetailedInformation")
    382. public void deteleNannyDetailedInformation(String id) {
    383. int id_char = Integer.parseInt(id);
    384. nannyService.deteleNannyDetailedInformation(id_char);
    385. }
    386. @RequestMapping(value = "changNannyEengage")
    387. public void changEengage(String id,String eengage) {
    388. int id_char = Integer.parseInt(id);
    389. ChangeData data = new ChangeData(eengage, id_char);
    390. nannyService.changEengage(data);
    391. }
    392. }

    1. package com.hep.controller;
    2. import java.io.UnsupportedEncodingException;
    3. import java.text.SimpleDateFormat;
    4. import java.util.Date;
    5. import java.util.List;
    6. import javax.annotation.Resource;
    7. import javax.servlet.http.HttpServletRequest;
    8. import org.springframework.stereotype.Controller;
    9. import org.springframework.web.bind.annotation.RequestMapping;
    10. import org.springframework.web.bind.annotation.RequestParam;
    11. import org.springframework.web.servlet.ModelAndView;
    12. import com.hep.dto.BrokerShowData;
    13. import com.hep.dto.ChangeData;
    14. import com.hep.dto.EmployerShowData;
    15. import com.hep.dto.NursemaidShowData;
    16. import com.hep.model.EmployerData;
    17. import com.hep.service.BrokerService;
    18. import com.hep.service.RecruitmentService;
    19. @Controller
    20. public class RecruitmentController {
    21. @Resource
    22. private RecruitmentService recruitmentService;
    23. @Resource
    24. private BrokerService brokerService;
    25. @RequestMapping(value = "RecruitmentRelease")
    26. public String recruitmentRelease() {
    27. return "RecruitmentRelease";
    28. }
    29. @RequestMapping(value = "RecruitmentInformation")
    30. public ModelAndView recruitmentInformation() {
    31. // ModelAndView model = new ModelAndView();
    32. //
    33. // List naayData =
    34. // recruitmentService.selectAllRecruitmentData();
    35. // model.addObject("NaayData", naayData);
    36. // model.setViewName("RecruitmentInformation");
    37. return recruitmentService.selectPageRecruitmentData(null, null);
    38. }
    39. @RequestMapping(value = "RecruitmentInformationPage")
    40. public ModelAndView recruitmentInformationPage(
    41. @RequestParam("pageNum") String pageNum,
    42. @RequestParam("pageSize") String pageSize) {
    43. // ModelAndView model = new ModelAndView();
    44. //
    45. // List naayData =
    46. // recruitmentService.selectAllRecruitmentData();
    47. // model.addObject("NaayData", naayData);
    48. // model.setViewName("RecruitmentInformation");
    49. return recruitmentService.selectPageRecruitmentData(pageNum, pageSize);
    50. }
    51. /**
    52. * 招聘详细情况
    53. *
    54. * @return
    55. */
    56. @RequestMapping(value = "RecruitmentDetailedInformation")
    57. public ModelAndView recruitmentDetailedInformation(String id) {
    58. ModelAndView model = new ModelAndView();
    59. int id_int = Integer.parseInt(id);
    60. EmployerShowData naayData = recruitmentService
    61. .recruitmentDetailedInformation(id_int);
    62. int BrokerId = naayData.getBrokerId();
    63. if(BrokerId == 0){
    64. naayData.setBrokerId(0);
    65. naayData.setBrokerName("fbgtrsne");
    66. naayData.setPhone1(null);
    67. naayData.setPhone2(null);
    68. naayData.setBrokertelphone(null);
    69. naayData.setQqnumber("1762460307");
    70. naayData.setDepartment(null);
    71. }else{
    72. BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    73. naayData.setBrokerId(BrokerId);
    74. naayData.setBrokerName(data.getName());
    75. naayData.setPhone1(data.getPhone1());
    76. naayData.setPhone2(data.getPhone2());
    77. naayData.setBrokertelphone(data.getTelphone());
    78. naayData.setQqnumber(data.getQqnumber());
    79. naayData.setDepartment(data.getDepartment());
    80. }
    81. model.addObject("NaayData", naayData);
    82. model.setViewName("RecruitmentDetailedInformation");
    83. return model;
    84. }
    85. /**
    86. * 修改招聘详细情况页面
    87. *
    88. * @return
    89. */
    90. @RequestMapping(value = "changeRecruitmentDetailedInformation")
    91. public ModelAndView changeRecruitmentDetailedInformation(String id) {
    92. ModelAndView model = new ModelAndView();
    93. int id_int = Integer.parseInt(id);
    94. EmployerShowData naayData = recruitmentService
    95. .recruitmentDetailedInformation(id_int);
    96. int BrokerId = naayData.getBrokerId();
    97. if(BrokerId==0){
    98. //BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    99. naayData.setBrokerName("fbgtrsne");
    100. naayData.setPhone1(null);
    101. naayData.setPhone2(null);
    102. naayData.setBrokertelphone(null);
    103. }else{
    104. BrokerShowData data = brokerService.selectBrokerDataById(BrokerId);
    105. naayData.setBrokerName(data.getName());
    106. naayData.setPhone1(data.getPhone1());
    107. naayData.setPhone2(data.getPhone2());
    108. naayData.setBrokertelphone(data.getTelphone());
    109. }
    110. model.addObject("NaayData", naayData);
    111. model.setViewName("RecruitmentChange");
    112. return model;
    113. }
    114. @RequestMapping(value = "getRecruitmentRelease")
    115. public String getRecruitmentRelease(HttpServletRequest request)
    116. throws UnsupportedEncodingException {
    117. String type = request.getParameter("job_type_id");
    118. //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    119. String functions = request.getParameter("skill_id");
    120. //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    121. String detail = request.getParameter("job_description");
    122. //detail = new String(detail.getBytes("iso-8859-1"), "UTF-8");
    123. String claim = request.getParameter("demands");
    124. //claim = new String(claim.getBytes("iso-8859-1"), "UTF-8");
    125. String wage = request.getParameter("salary");
    126. //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
    127. String fixed_price = request.getParameter("fixed_price");
    128. //fixed_price = new String(fixed_price.getBytes("iso-8859-1"), "UTF-8");
    129. if(fixed_price != null && fixed_price !=""){
    130. wage = fixed_price;
    131. }
    132. String address = request.getParameter("street");
    133. //address = new String(address.getBytes("iso-8859-1"), "UTF-8");
    134. String population = request.getParameter("people");
    135. //population = new String(population.getBytes("iso-8859-1"), "UTF-8");
    136. String area = request.getParameter("area");
    137. //area = new String(area.getBytes("iso-8859-1"), "UTF-8");
    138. String employer = request.getParameter("name");
    139. //employer = new String(employer.getBytes("iso-8859-1"), "UTF-8");
    140. String telphone = request.getParameter("phone");
    141. //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    142. String baby1birthday = request.getParameter("child1");
    143. //baby1birthday = new String(baby1birthday.getBytes("iso-8859-1"),
    144. //"UTF-8");
    145. String baby2birthday = request.getParameter("child2");
    146. //baby2birthday = new String(baby2birthday.getBytes("iso-8859-1"),
    147. //"UTF-8");
    148. SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    149. String time = df.format(new Date());// new Date()为获取当前系统时间
    150. EmployerData employerData = new EmployerData(type, functions, detail,
    151. claim, wage, address, population, area, employer, telphone,
    152. baby1birthday, baby2birthday);
    153. employerData.setTime(time);
    154. recruitmentService.insertEmployerData(employerData);
    155. return "success";
    156. }
    157. /**
    158. * 得到修改后的信息
    159. * @param request
    160. * @return
    161. * @throws UnsupportedEncodingException
    162. */
    163. @RequestMapping(value = "getChangeRecruitmentRelease")
    164. public String getChangeRecruitmentRelease(HttpServletRequest request)
    165. throws UnsupportedEncodingException {
    166. String Recruitm_ID = request.getParameter("Recruitm_ID");
    167. String type = request.getParameter("job_type_id");
    168. //type = new String(type.getBytes("iso-8859-1"), "UTF-8");
    169. String functions = request.getParameter("skill_id");
    170. //functions = new String(functions.getBytes("iso-8859-1"), "UTF-8");
    171. String detail = request.getParameter("job_description");
    172. //detail = new String(detail.getBytes("iso-8859-1"), "UTF-8");
    173. String claim = request.getParameter("demands");
    174. //claim = new String(claim.getBytes("iso-8859-1"), "UTF-8");
    175. String wage = request.getParameter("salary");
    176. //wage = new String(wage.getBytes("iso-8859-1"), "UTF-8");
    177. String fixed_price = request.getParameter("fixed_price");
    178. //fixed_price = new String(fixed_price.getBytes("iso-8859-1"), "UTF-8");
    179. if(fixed_price != null && fixed_price !=""){
    180. wage = fixed_price;
    181. }
    182. String address = request.getParameter("street");
    183. //address = new String(address.getBytes("iso-8859-1"), "UTF-8");
    184. String population = request.getParameter("people");
    185. //population = new String(population.getBytes("iso-8859-1"), "UTF-8");
    186. String area = request.getParameter("area");
    187. //area = new String(area.getBytes("iso-8859-1"), "UTF-8");
    188. String employer = request.getParameter("name");
    189. //employer = new String(employer.getBytes("iso-8859-1"), "UTF-8");
    190. String telphone = request.getParameter("phone");
    191. //telphone = new String(telphone.getBytes("iso-8859-1"), "UTF-8");
    192. String baby1birthday = request.getParameter("child1");
    193. //baby1birthday = new String(baby1birthday.getBytes("iso-8859-1"),
    194. //"UTF-8");
    195. String baby2birthday = request.getParameter("child2");
    196. //baby2birthday = new String(baby2birthday.getBytes("iso-8859-1"),
    197. //"UTF-8");
    198. String brokername = request.getParameter("brokername");
    199. int brokerId = Integer.parseInt(brokername);
    200. SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
    201. String time = df.format(new Date());// new Date()为获取当前系统时间
    202. EmployerData employerData = new EmployerData(Integer.parseInt(Recruitm_ID),type, functions, detail,
    203. claim, wage, address, population, area, employer, telphone,
    204. baby1birthday, baby2birthday, time);
    205. employerData.setBrokerId(brokerId);
    206. recruitmentService.changeEmployerData(employerData);
    207. return "successChange";
    208. }
    209. /**
    210. * 雇主招聘信息展示页面 检索查询
    211. *
    212. * @return
    213. * @throws UnsupportedEncodingException
    214. */
    215. @RequestMapping(value = "searchRecruitmentInformation")
    216. public ModelAndView searchRecruitmentInformation(String job, String skill,
    217. String salary, @RequestParam("pageNum") String pageNum,
    218. @RequestParam("pageSize") String pageSize)
    219. throws UnsupportedEncodingException {
    220. // logger.info(job);
    221. ModelAndView model = new ModelAndView();
    222. job = new String(job.getBytes("GBK"), "UTF-8");
    223. skill = new String(skill.getBytes("GBK"), "UTF-8");
    224. salary = new String(salary.getBytes("GBK"), "UTF-8");
    225. // List naayData = recruitmentService
    226. // .searchNannyInformation(job, skill, salary);
    227. // model.addObject("NaayData", naayData);
    228. // model.setViewName("RecruitmentInformation");
    229. return recruitmentService.searchNannyInformation(job, skill, salary,
    230. pageNum, pageSize);
    231. }
    232. /**
    233. * 招聘信息展示页面 审核状态修改
    234. *
    235. * @param id
    236. */
    237. @RequestMapping(value = "changeRecruitmentInformation")
    238. public void changeRecruitmentInformation(String id, String struts) {
    239. int id_char = Integer.parseInt(id);
    240. ChangeData data = new ChangeData(struts, id_char);
    241. recruitmentService.changeRecruitmentInformation(data);
    242. }
    243. /**
    244. * 招聘信息展示页面 上线状态修改
    245. *
    246. * @param id
    247. */
    248. @RequestMapping(value = "onlineRecruitmentInformation")
    249. public void onlineRecruitmentInformation(String id, String struts) {
    250. int id_char = Integer.parseInt(id);
    251. ChangeData data = new ChangeData(struts, id_char);
    252. recruitmentService.onlineRecruitmentInformation(data);
    253. }
    254. @RequestMapping(value = "deteleRecruitmentDetailedInformation")
    255. public void deteleRecruitmentDetailedInformation(String id) {
    256. int id_char = Integer.parseInt(id);
    257. recruitmentService.deteleRecruitmentDetailedInformation(id_char);
    258. }
    259. @RequestMapping(value = "changRecruitmentEengage")
    260. public void changEengage(String id,String eengage) {
    261. int id_char = Integer.parseInt(id);
    262. ChangeData data = new ChangeData(eengage, id_char);
    263. recruitmentService.changEengage(data);
    264. }
    265. }

    五,项目总结

  • 相关阅读:
    JS每晚24:00更新某方法
    麻雀算法极限学习机SSA-ELM回归预测及其MATLAB代码实现
    从零学算法289
    pandas groupby to csv
    用友U8 crm客户关系管理存在任意文件上传漏洞
    0930样式迁移(Style Transfer)
    NLP 三大Subword分词算法 (BPE、WordPiece、ULM) 原理与代码实现(面试必考知识点)
    spannerlib优雅的go异常处理
    Python基本数据类型与常用库
    DHCP学习
  • 原文地址:https://blog.csdn.net/BS009/article/details/126759612