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");// 设置日�
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
项目介绍:本项目主要实现了家政服务平台的管理信息,主要实现雇主信息管理、保姆信息管理、经纪人信息管理等相关信息管理功能。 语言环境:Java: jdk1.8 数据库:Mysql: mysql5.7 应用服务器:Tomcat: tomcat8.5.31 开发工具:IDEA或eclipse 后台开发:SSM 前端开发:JSP+JQUERY+CSS
资源推荐
资源详情
资源评论
收起资源包目录
基于SSM实现家政管理系统平台-课程设计-期未作业 (267个子文件)
api 238B
api 238B
NannyController.class 12KB
NannyController.class 12KB
NannyDetailedShowData.class 8KB
NannyDetailedShowData.class 8KB
NursemaidData.class 8KB
NursemaidData.class 8KB
RecruitmentController.class 8KB
RecruitmentController.class 8KB
NannyService.class 7KB
NannyService.class 7KB
RecruitmentService.class 6KB
RecruitmentService.class 6KB
EmployerShowData.class 6KB
EmployerShowData.class 6KB
NursemaidShowData.class 4KB
NursemaidShowData.class 4KB
EmployerData.class 4KB
EmployerData.class 4KB
BrokerController.class 4KB
BrokerController.class 4KB
LoginController.class 3KB
LoginController.class 3KB
BrokerService.class 3KB
BrokerService.class 3KB
TestImageBinary.class 3KB
TestImageBinary.class 3KB
UploadService.class 3KB
UploadService.class 3KB
UserRealm.class 2KB
UserRealm.class 2KB
BrokerShowData.class 2KB
BrokerShowData.class 2KB
NannyDao.class 2KB
NannyDao.class 2KB
RecruitmentDao.class 2KB
RecruitmentDao.class 2KB
ImageBinary.class 2KB
ImageBinary.class 2KB
UserService.class 2KB
UserService.class 2KB
User.class 2KB
User.class 2KB
ShiroKit.class 1KB
ShiroKit.class 1KB
TestAge.class 1KB
TestAge.class 1KB
InitServlet.class 1KB
InitServlet.class 1KB
BrokerDao.class 971B
BrokerDao.class 971B
ChangeData.class 795B
ChangeData.class 795B
UserDao.class 361B
UserDao.class 361B
.classpath 848B
org.eclipse.wst.common.component 480B
org.eclipse.wst.jsdt.ui.superType.container 49B
website.css 112KB
website.css 112KB
font-awesome.min.css 26KB
font-awesome.min.css 26KB
mobile.css 4KB
mobile.css 4KB
demo.css 752B
demo.css 752B
indexcss.css 312B
indexcss.css 312B
WdatePicker.css 163B
WdatePicker.css 163B
getscript 160KB
getscript 160KB
.gitignore 184B
HEP-Web.iml 2KB
shiro.ini 437B
shiro.ini 437B
ehcache-2.8.3.jar 6.62MB
ehcache-2.8.3.jar 6.62MB
druid-1.0.5.jar 1.75MB
druid-1.0.5.jar 1.75MB
spring-context-4.0.6.RELEASE.jar 955KB
spring-context-4.0.6.RELEASE.jar 955KB
spring-core-4.0.6.RELEASE.jar 954KB
spring-core-4.0.6.RELEASE.jar 954KB
mysql-connector-java-5.1.30.jar 932KB
mysql-connector-java-5.1.30.jar 932KB
jackson-mapper-asl-1.9.13.jar 762KB
jackson-mapper-asl-1.9.13.jar 762KB
mybatis-3.2.7.jar 696KB
mybatis-3.2.7.jar 696KB
spring-web-4.0.6.RELEASE.jar 657KB
spring-web-4.0.6.RELEASE.jar 657KB
spring-beans-4.0.6.RELEASE.jar 655KB
spring-beans-4.0.6.RELEASE.jar 655KB
spring-webmvc-4.0.6.RELEASE.jar 647KB
spring-webmvc-4.0.6.RELEASE.jar 647KB
mybatis-generator-core-1.3.5.jar 543KB
mybatis-generator-core-1.3.5.jar 543KB
log4j-1.2.17.jar 478KB
共 267 条
- 1
- 2
- 3
资源评论
编程指南针
- 粉丝: 5w+
- 资源: 207
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功