[
项目名称
泳装企业管理系统的设计与实现
演示视频
泳装企业管理系统的设计与实现_哔哩哔哩_bilibili](https://ym.maptoface.com/archives/59268)
系统介绍
泳装企业管理系统的设计与实现旨在为泳装生产与销售企业提供高效、便捷的信息管理工具。本系统通过采用先进的技术和设计理念,实现了生产计划管理、库存管理、订单管理、客户关系管理和员工管理等核心功能。通过对各模块的高度集成与智能化处理,系统能够协同优化生产流程,提高企业运营效率。同时,系统具备实时数据分析与可视化展示功能,辅助企业决策层制定有针对性的市场策略。此外,强大的权限管理与安全保障措施,确保了企业数据的安全与隐私。泳装企业管理系统不仅满足了泳装行业特有的需求,还为企业提供了竞争优势,助力实现可持续发展[1]。
系统使用SSM框架进行后台开发,使用MySQL关系型数据库进行数据储存操作,前端使用JSP前端技术进行页面渲染从而展示在用户面前。泳装企业管理系统主要包含了管理员和普通员工两大角色,主要功能有进货管理、产品信息管理、库存管理、销售管理、客户管理、供应商管理等功能模块。通过后台管理的形式方便了泳装企业管理者对企业的泳装产品进行进销存的管理,通过信息化管理手段提高企业管理效率[2]。
关键词:泳装企业管理;进销存;SSM框架;产品管理
3 系统分析
根据需求来分析功能模块,进一步明确所需要完成的功能明细点模块,然后连成一个闭环,每个流程环环相扣,并且排除耦合的情况。在将逻辑需求转换成实际内容根据指定好的模型在进行开发。系统设计不仅仅需求功能明确,还要在功能模块的前提上设计好页面的交互,好的页面交互能让数据库设计如鱼得水。系统主要包括前台和后台两部分,后台人员主要负责维护基础处理的初始化,和数据管理功能管理等维护工作,前台人员即是用户人员,登录验证成功后即可对应权限操作系统。
3.1 系统中的角色
经过分析,最终从本系统网站中提取出两种角色,即:普通员工和系统管理员。而各种角色及其职责如表1所示。
表3-1 角色表
角色名称
职责描述
管理员
管理员是对系统的所有数据信息进行统一管理的并且对员工进行管理配置。
普通员工
普通员工是对泳装企业的进货、退货、产品、库存、销售、客户、供应商等等信息进行综合管理的用户角色。
3.2 用户需求分析
泳装企业管理系统主要分为两个用户角色,分别是管理员和普通员工,它们的主要功能模块包括了:
普通员工的主要功能模块:
1.进货管理模块
当前模块分为了进货信息和退货信息两个功能模块,进货信息查看的是每次进货的产品的所有名称、数量、进货日期等记录信息。退货信息查询的是退货名称、数量以及退货产品的信息。
2.产品信息管理模块
从产品信息管理管理模块包括了产品信息以及产品类型两个子功能模块。分别是对产品的相亲信息以及产品的类别信息进行管理的。
3.库存管理模块
该模块包括了库存信息、库存预警以及临期产品子功能模块。库存信息是对所有商品的进出库进行统计从而计算出当前库存的功能子模块。库存预警以及临期产品是为了提醒管理人员库存数量低于警戒值以及过期时间快要到的产品的展示。
4.销售管理模块
销售管理模块包括了销售信息、销售统计、顾客退货办理三个子功能模块。销售信息功能中可以进行产品的销售添加进行库存减少操作。销售统计通过Echarts插件的图表形式展示了系统的销售比例统计。
5.客户信息管理模块
对于企业管理系统而言还需要对企业中的所有客户信息进行保存,方便进行进一步的销售管理。
6.供应商信息管理模块
供应商信息模块中使用供应商id、供应商姓名、供应商电话、负责人、地址、邮箱等字段储存的形式保存了产品的供应商信息。
泳装企业管理系统的普通员工用例图如图3-1所示。
图3-1 普通员工用例图
管理员的功能模块包含了普通员工的所有功能的,唯一不同的是管理员拥有员工的信息管理:
1.员工信息管理模块
管理员可以对系统中的所有员工进行统一管理,主要字段包括了员工、id、员工姓名、身份证、员工电话、性别、员工类型、密码等,管理员可以对系统中的员工进行新增、删除、修改以及条件查询功能。
网上泳装企业管理系统管理员用例图如图3-2所示。
图3-2 管理员用例图
编辑
编辑
编辑
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis
- 前端:JSP+CSS+JavaScript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
- 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; - 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置;
- 运行项目,在浏览器中输入http://localhost:8080/ 登录
运行截图
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
编辑
用户管理控制层:
package com.houserss.controller;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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 com.houserss.common.Const;
import com.houserss.common.Const.Role;
import com.houserss.common.ServerResponse;
import com.houserss.pojo.User;
import com.houserss.service.IUserService;
import com.houserss.service.impl.UserServiceImpl;
import com.houserss.util.MD5Util;
import com.houserss.util.TimeUtils;
import com.houserss.vo.DeleteHouseVo;
import com.houserss.vo.PageInfoVo;
/**
- Created by admin
*/
@Controller
@RequestMapping("/user/")
public class UserController {
@Autowired
private IUserService iUserService;
/**
* 用户登录
* @param username
* @param password
* @param session
* @return
*/
@RequestMapping(value = "login.do",method = RequestMethod.POST)
@ResponseBody
public ServerResponse<User> login(User user,String uvcode, HttpSession session){
String code = (String)session.getAttribute("validationCode");
if(StringUtils.isNotBlank(code)) {
if(!code.equalsIgnoreCase(uvcode)) {
return ServerResponse.createByErrorMessage("验证码不正确");
}
}
ServerResponse<User> response = iUserService.login(user.getUsername(),user.getPassword());
if(response.isSuccess()){
session.setAttribute(Const.CURRENT_USER,response.getData());
}
return response;
}
}
管理员管理控制层:
package com.sxl.controller.admin;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.sxl.controller.MyController;
@Controller("adminController")
@RequestMapping(value = "/admin")
public class AdminController extends MyController {
@RequestMapping(value = "/index")
public String frame(Model model, HttpServletRequest request)throws Exception {
return "/admin/index";
}
@RequestMapping(value = "/main")
public String main(Model model, HttpServletRequest request)throws Exception {
return "/admin/main";
}
@RequestMapping(value = "/tj1")
public String tj1(Model model, HttpServletRequest request)throws Exception {
String sql="select DATE_FORMAT(insertDate,'%Y-%m-%d') dates,sum(allPrice) price from t_order order by DATE_FORMAT(insertDate,'%Y-%m-%d') desc";
List<Map> list = db.queryForList(sql);
model.addAttribute("list", list);
System.out.println(list);
return "/admin/tj/tj1";
}
@RequestMapping(value = "/password")
public String password(Model model, HttpServletRequest request)throws Exception {
return "/admin/password";
}
@RequestMapping(value = "/changePassword")
public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {
Map admin = getAdmin(request);
if(oldPassword.equals(admin.get("password").toString())){
String sql="update t_admin set password=? where id=?";
db.update(sql, new Object[]{newPassword,admin.get("id")});
return renderData(true,"1",null);
}else{
return renderData(false,"1",null);
}
}
}
修改密码业务逻辑:
package com.sxl.controller.admin;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.sxl.controller.MyController;
@Controller("userController")
@RequestMapping(value = "/user")
public class UserController extends MyController {
@RequestMapping(value = "/index")
public String frame(Model model, HttpServletRequest request)throws Exception {
return "/user/index";
}
@RequestMapping(value = "/main")
public String main(Model model, HttpServletRequest request)throws Exception {
return "/user/main";
}
@RequestMapping(value = "/password")
public String password(Model model, HttpServletRequest request)throws Exception {
return "/user/password";
}
@RequestMapping(value = "/changePassword")
public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {
Map user = getUser(request);
if(oldPassword.equals(user.get("password").toString())){
String sql="update t_user set password=? where id=?";
db.update(sql, new Object[]{newPassword,user.get("id")});
return renderData(true,"1",null);
}else{
return renderData(false,"1",null);
}
}
@RequestMapping(value = "/mine")
public String mine(Model model, HttpServletRequest request)throws Exception {
Map user =getUser(request);Map map = db.queryForMap("select * from t_user where id=?",new Object[]{user.get("id")});model.addAttribute("map", map); return "/user/mine";
}
@RequestMapping(value = "/mineSave")
public ResponseEntity<String> mineSave(Model model,HttpServletRequest request,Long id
,String username,String password,String name,String gh,String mobile) throws Exception{
int result = 0;
String sql="update t_user set name=?,gh=?,mobile=? where id=?";
result = db.update(sql, new Object[]{name,gh,mobile,id});
if(result==1){
return renderData(true,"操作成功",null);
}else{
return renderData(false,"操作失败",null);
}
}
}
通用管理模块:
package com.sxl.controller;
import java.nio.charset.Charset;
import java.util.Locale;
import java.util.ResourceBundle;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import com.sxl.util.JacksonJsonUtil;
import com.sxl.util.StringUtil;
import com.sxl.util.SystemProperties;
public class BaseController {
public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1天
@Autowired
private SystemProperties systemProperties;
/**
* 获得配置文件内容
*/
public String getConfig(String key) {
return systemProperties.getProperties(key);
}
/**
* 返回服务器地址 like http://192.168.1.1:8441/UUBean/
*/
public String getHostUrl(HttpServletRequest request) {
String hostName = request.getServerName();
Integer hostPort = request.getServerPort();
String path = request.getContextPath();
if (hostPort == 80) {
return "http://" + hostName + path + "/";
} else {
return "http://" + hostName + ":" + hostPort + path + "/";
}
}
/***
* 获取当前的website路径 String
*/
public static String getWebSite(HttpServletRequest request) {
String returnUrl = request.getScheme() + "://"
+ request.getServerName();
if (request.getServerPort() != 80) {
returnUrl += ":" + request.getServerPort();
}
returnUrl += request.getContextPath();
return returnUrl;
}
/**
* 初始化HTTP头.
*
* @return HttpHeaders
*/
public HttpHeaders initHttpHeaders() {
HttpHeaders headers = new HttpHeaders();
MediaType mediaType = new MediaType("text", "html",
Charset.forName("utf-8"));
headers.setContentType(mediaType);
return headers;
}
/**
* 返回 信息数据
*
* @param status
* @param msg
* @return
*/
public ResponseEntity<String> renderMsg(Boolean status, String msg) {
if (StringUtils.isEmpty(msg)) {
msg = "";
}
String str = "{\"status\":\"" + status + "\",\"msg\":\"" + msg + "\"}";
ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,
initHttpHeaders(), HttpStatus.OK);
return responseEntity;
}
/**
* 返回obj数据
*
* @param status
* @param msg
* @param obj
* @return
*/
public ResponseEntity<String> renderData(Boolean status, String msg,
Object obj) {
if (StringUtils.isEmpty(msg)) {
msg = "";
}
StringBuffer sb = new StringBuffer();
sb.append("{");
sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\",");
sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");
sb.append("}");
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
sb.toString(), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
}
/***
* 获取IP(如果是多级代理,则得到的是一串IP值)
*/
public static String getIpAddr(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
if (ip != null && ip.length() > 0) {
String[] ips = ip.split(",");
for (int i = 0; i < ips.length; i++) {
if (!"unknown".equalsIgnoreCase(ips[i])) {
ip = ips[i];
break;
}
}
}
return ip;
}
/**
* 国际化获得语言内容
*
* @param key
* 语言key
* @param args
* @param argsSplit
* @param defaultMessage
* @param locale
* @return
*/
public static String getLanguage(String key, String args, String argsSplit,
String defaultMessage, String locale) {
String language = "zh";
String contry = "cn";
String returnValue = defaultMessage;
if (!StringUtil.isEmpty(locale)) {
try {
String[] localeArray = locale.split("_");
language = localeArray[0];
contry = localeArray[1];
} catch (Exception e) {
}
}
try {
ResourceBundle resource = ResourceBundle.getBundle("lang.resource",
new Locale(language, contry));
returnValue = resource.getString(key);
if (!StringUtil.isEmpty(args)) {
String[] argsArray = args.split(argsSplit);
for (int i = 0; i < argsArray.length; i++) {
returnValue = returnValue.replace("{" + i + "}",
argsArray[i]);
}
}
} catch (Exception e) {
}
return returnValue;
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。