10095基于SSH开发的陶瓷工厂进存销管理系统

代码:
鏈-椄:https://pan@baidu@com/s/1a01LN31IJLzHxmVgwtVjbg (把@换成 . 就可正常访问)
趧-紶-碼:9768
f/u枝此段-吶傛打开baidu網盤手机App,caozuo更方便哦

技术
Spring + Struts + Hibernate

工具
eclipse + tomact + mysql + jdk

功能详情

功能详情
基础信息管理
进货管理
销售管理
查询统计
库存管理
系统管理

系统相关截图

● 系统首页

@RestController
@RequestMapping("/user")
之后
public class UserController {

@GetMapping("/list")
public JSONObject listUser(HttpServletRequest request) {
return userService.listUser(CommonUtil.request2Json(request));
}
}/**

  • @author: hxy

  • @description: 用户/角色/权限相关controller

  • @date: 2017/11/2 10:19
    */
    @RestController
    @RequestMapping("/user")
    public class UserController {
    @Autowired
    private UserService userService;

    /**

    • 查询用户列表
    • @param request
    • @return
      */
      @RequiresPermissions(“user:list”)
      @GetMapping("/list")
      public JSONObject listUser(HttpServletRequest request) {
      return userService.listUser(CommonUtil.request2Json(request));
      }

    @RequiresPermissions(“user:add”)
    @PostMapping("/addUser")
    public JSONObject addUser(@RequestBody JSONObject requestJson) {
    CommonUtil.hasAllRequired(requestJson, “username, password, nickname, roleId”);
    return userService.addUser(requestJson);
    }

    @RequiresPermissions(“user:update”)
    @PostMapping("/updateUser")
    public JSONObject updateUser(@RequestBody JSONObject requestJson) {
    CommonUtil.hasAllRequired(requestJson, " nickname, roleId, deleteStatus, userId");
    return userService.updateUser(requestJson);
    }

    @RequiresPermissions(value = {“user:add”, “user:update”}, logical = Logical.OR)
    @GetMapping("/getAllRoles")
    public JSONObject getAllRoles() {
    return userService.getAllRoles();
    }

    /**

    • 角色列表
    • @return
      */
      @RequiresPermissions(“role:list”)
      @GetMapping("/listRole")
      public JSONObject listRole() {
      return userService.listRole();
      }

    /**

    • 查询所有权限, 给角色分配权限时调用
    • @return
      */
      @RequiresPermissions(“role:list”)
      @GetMapping("/listAllPermission")
      public JSONObject listAllPermission() {
      return userService.listAllPermission();
      }

    /**

    • 新增角色
    • @return
      */
      @RequiresPermissions(“role:add”)
      @PostMapping("/addRole")
      public JSONObject addRole(@RequestBody JSONObject requestJson) {
      CommonUtil.hasAllRequired(requestJson, “roleName,permissions”);
      return userService.addRole(requestJson);
      }

    /**

    • 修改角色
    • @return
      */
      @RequiresPermissions(“role:update”)
      @PostMapping("/updateRole")
      public JSONObject updateRole(@RequestBody JSONObject requestJson) {
      CommonUtil.hasAllRequired(requestJson, “roleId,roleName,permissions”);
      return userService.updateRole(requestJson);
      }
      ……
      }
      package com;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
public class BlogStarter {
public static void main(String[] args) {
SpringApplication.run(BlogStarter.class, args);
 }
}

<?xml version="1.0" encoding="UTF-8"?>

4.0.0
org.example
Spike
1.0-SNAPSHOT

Spike

http://www.example.com

org.springframework.boot
spring-boot-starter-parent
2.0.5.RELEASE

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target>

org.springframework.boot
spring-boot-starter-web

junit
junit
4.11
test

maven-clean-plugin
3.1.0

maven-resources-plugin
3.0.2

maven-compiler-plugin
3.8.0

maven-surefire-plugin
2.22.1

maven-jar-plugin
3.0.2

maven-install-plugin
2.5.2

maven-deploy-plugin
2.8.2

maven-site-plugin
3.7.1

maven-project-info-reports-plugin
3.0.0

package org.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//SpringBoot会帮我们启动tomcat,并加载默认配置
@EnableAutoConfiguration
//SpringMVC相关配置
@RestController
public class App {
@RequestMapping("/")
public String home(){
//网页中输出
return “Hello World!”;
}
public static void main( String[] args ){
//控制台输出
System.out.println( “Hello World!” );
SpringApplication.run(App.class,args);
}
}<?xml version="1.0" encoding="UTF-8"?>
2
3 <project xmlns=“http://maven.apache.org/POM/4.0.0” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
4 xsi:schemaLocation=“http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”>
5 4.0.0
6
7 org.example
8 Spike
9 1.0-SNAPSHOT
10
11 Spike
12
13 http://www.example.com
14
15
16 org.springframework.boot
17 spring-boot-starter-parent
18 2.0.5.RELEASE
19
20
21
22 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23 <maven.compiler.source>1.8</maven.compiler.source>
24 <maven.compiler.target>1.8</maven.compiler.target>
25
26
27
28
29 org.springframework.boot
30 spring-boot-starter-web
31
32
33 mysql
34 mysql-connector-java
35 5.1.6
36
37
38 com.alibaba
39 druid
40 1.1.3
41
42
43 org.mybatis.spring.boot
44 mybatis-spring-boot-starter
45 1.3.1
46
47
48 junit
49 junit
50 4.11
51 test
52
53
54 org.mybatis.generator
55 mybatis-generator-core
56 1.3.5
57
58
59
60
61
62
63
64
65 maven-clean-plugin
66 3.1.0
67
68
69
70 maven-resources-plugin
71 3.0.2
72
73
74 maven-compiler-plugin
75 3.8.0
76
77
78 maven-surefire-plugin
79 2.22.1
80
81
82 maven-jar-plugin
83 3.0.2
84
85
86 maven-install-plugin
87 2.5.2
88
89
90 maven-deploy-plugin
91 2.8.2
92
93
94
95
96 maven-site-plugin
97 3.7.1
98
99
100 maven-project-info-reports-plugin
101 3.0.0
102
103
104
105 org.mybatis.generator
106 mybatis-generator-maven-plugin
107 1.3.5
108
109
110 org.mybatis.generator
111 mybatis-generator-core
112 1.3.5
113
114
115 mysql
116 mysql-connector-java
117 5.1.6
118
119
120
121
122 mybatis generator
123 package
124
125 generate
126
127
128
129
130
131 true
132
133 true
134
135
136 src/main/resource/mybatis-generator.xml
137
138
139
140
141
142
143
144 package org.example;
import org.example.dao.UserDoMapper;
import org.example.dataobject.UserDo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//SpringBoot会帮我们启动tomcat,并加载默认配置
@SpringBootApplication(scanBasePackages = {“org.example”})

//SpringMVC相关配置
@RestController
@MapperScan(“org.example.dao”)
public class App {
@Autowired
private UserDoMapper userDoMapper;

@RequestMapping("/")
public String home(){
UserDo userDo = userDoMapper.selectByPrimaryKey(1);
if(userDo == null){
return “用户对象不存在”;
}else{
return userDo.getName();
}
}
public static void main( String[] args ){
//控制台输出
System.out.println( “Hello World!” );
SpringApplication.run(App.class,args);
}
}
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserDoMapper userDoMapper;

@Autowired
private UserPasswordDOMapper userPasswordDOMapper;

@Override
public UserModel getUserById(Integer id) {
UserDo userDo = userDoMapper.selectByPrimaryKey(id);
if(userDo == null){
return null;
}
//通过用户id获取对应的用户加密密码信息
UserPasswordDO userPasswordDO = userPasswordDOMapper.selectByUserId(userDo.getId());
return convertFromDataObject(userDo,userPasswordDO);
}

public UserModel convertFromDataObject(UserDo userDo, UserPasswordDO userPasswordDO) {
if(userDo == null){
return null;
}
UserModel userModel = new UserModel();
BeanUtils.copyProperties(userDo,userModel);
if(userPasswordDO != null){
userModel.setEncriptPassword(userPasswordDO.getEncriptPassword());
}
return userModel;
}
}@Controller(“user”)
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@RequestMapping("/get")
@ResponseBody
public UserVO getUser(@RequestParam(name=“id”) Integer id) {
//调用service服务获取对应id的用户对象并返回给前端
UserModel userModel = userService.getUserById(id);
//将核心领域模型对象转化为可供UI使用的viewobject
return convertFromModel(userModel);
}
private UserVO convertFromModel(UserModel userModel){
if(userModel == null){
return null;
}
UserVO userVO = new UserVO();
BeanUtils.copyProperties(userModel,userVO);
return userVO;
}
}package org.example.response;

public class CommonReturnType {
//表名对应请求的返回处理结果,success/fail
private String status;
//若status返回success,则data内返回前端需要的json数据
//若status返回success,则data内使用通用的错误码格式
private Object data;

//定义一个通用的创建方法
public static CommonReturnType create(Object result){
return CommonReturnType.create(result,“success”);
}

public static CommonReturnType create(Object result,String status){
CommonReturnType type = new CommonReturnType();
type.setStatus(status);
type.setData(result);
return type;
}
public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}

基于SSH开发的陶瓷工厂进存销管理系统 JAVA MySQL相关推荐

  1. 基于 Spring SSM框架 开发的一套 进存销管理系统

    ** 基于 Spring SSM框架 开发的一套 进存销管理系统 ** 1.编写工具:Eclipse: 2.开发环境 java jdk版本1.8,Tomact 版本9.0: 3.运用框架 SSM(Sp ...

  2. PHP汽车销售进存销管理系统,php开发最新进存销软件库存仓库管理系统网页版进销存正版套装...

    新品上市基于php+mysql开发的进存销系统完整源码 功能亮点: · 1.进货管理:添加库存.库存数量.商品名称 ·2.库存管理:商品名称.条形码.进价.入库.库存.已售 ·3.出货管理:商品出库. ...

  3. 基于SSM的进存销管理系统(超市订单管理系统)

    1.项目介绍 基于SSM的进存销管理系统5具有订单管理.供应商管理.用户管理.角色管理等功能 2.项目技术 后端框架:SSM(Spring.SpringMVC.Mybatis) 前端框架:jsp.cs ...

  4. 进存销管理系统(仓库管理系统)

    1.项目介绍 基于SSM的进存销管理系统拥有三个角色:管理员.员工.供应商,具体功能如下: 管理员和员工:公告管理.员工管理.供应商管理.货物管理.采购管理.商品出入库.统计管理等 供应商:个人中心. ...

  5. 基于SSH开发service电子信箱(邮箱)管理系统

    基于S2SH开发service电子信箱(邮箱)管理系统:(毕业设计/课程设计) 开发环境:    Windows操作系统 开发工具:MyEclipse(Eclipse)+Jdk+Tomcat+MYSQ ...

  6. 库存软件开发 php,php开发最新进存销软件库存仓库管理系统网页进销存正套装...

    <php开发最新进存销软件库存仓库管理系统网页进销存正套装>由会员分享,可在线阅读,更多相关<php开发最新进存销软件库存仓库管理系统网页进销存正套装(7页珍藏版)>请在人人文 ...

  7. php问道茶具源代码,php开发最新进存销软件库存仓库管理系统网页版进销存正版套中装.doc...

    新品上市基于php+mysql开发的进存销系统完整源码 功能亮点: ·??1.进货管理:添加库存.库存数量.商品名称 ·?2.库存管理:商品名称.条形码.进价.入库.库存.已售 ·?3.出货管理:商品 ...

  8. 基于SSH开发的宠物销售商城系统 JAVA MySQL

    10077基于SSH开发的宠物销售商城系统 代码: 鏈-椄:https://pan@baidu@com/s/1wAjL3PK78Bv9866q-B6kuw (把@换成 . 就可正常访问) 趧-紶-碼: ...

  9. 基于SSH开发物流仓储调度系统 课程设计 大作业 毕业设计

    基于SSH开发物流仓储调度系统(大作业/毕业设计) 开发环境: Windows操作系统 开发工具:Myeclipse+Jdk+Tomcat+MYSQL数据库 运行效果图:  基于SSH开发物流仓储调度 ...

最新文章

  1. C语言编程,从菜鸟到高手
  2. 12_VersionedCollapsingMergeTree,Log Engine Family(Log引擎,StripeLog引擎,TinyLog引擎)
  3. [css] 请问class与[class=xxx]的区别是什么?两者是否等价?
  4. java scipt 对象 函数_java script 基本函数
  5. c#byte字节流的读取_C#中的byte关键字
  6. RabbitMQ---9、消息确认机制(事务+Confirm)
  7. bzoj 3012: [Usaco2012 Dec]First! Trie+拓扑排序
  8. 如何用matlab拟合二元函数,matlab二元函数拟合怎么设计函数。
  9. java 参数命名规则_Java命名规范
  10. Java8 通过foreach 遍历List,同时输出下标
  11. ISO七层模型和TCP/IP四层模型
  12. 浅谈二层交换安全攻防
  13. ExpandListView 的一种巧妙写法
  14. java 账本 创建数据库_小账本软件设计之数据库设计模式构建
  15. 半监督学习笔记(四):熵最小化、代理变量
  16. 杭电OJ 1047(C++)
  17. html文章目录自动生成,javascript:如何自动生成一篇文章的目录
  18. 联通物联卡流量查询、充值的操作方法
  19. 系统学习iOS动画之六:3D动画
  20. vue用 echarts 显示区域地图 并用不同颜色显示每个区域

热门文章

  1. C# 实现生成一维码、二维码
  2. START WITH 的用法
  3. Echarts实现世界地图
  4. Android获取手机名称,版本号,生产商等信息(转)
  5. “沉迷”学习,神奇的“峰终定律”
  6. 驰骋工作流ccflow的安装讲解
  7. 设计模式之建造者模式(含链式调用)
  8. 英文字体展示(18号字体大小)
  9. 22.8.29 C语言作业5道
  10. 猜数字和飞机大战(Python零基础入门)