基于javaweb的SSM+Maven物流后台管理系统(java+mysql+ssm+jsp)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

021723490309

031723490309

041723490309

051723490309

061723490309

071723490309

081723490309

基于javaweb的SSM+Maven物流后台管理系统(java+mysql+ssm+jsp)

emp1 123456
emp2 123456
emp3 123456

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
}

@RequestMapping("/list")
public String list(Model model){
List<Store> list = storeService.list();
model.addAttribute("list",list);
return "store-list";
}

@RequestMapping("/tosave")
public String tosave(Model model){
//查询添加页面中所需要的区域列表
List<Area> list = areaService.list();
model.addAttribute("list",list);
return "store-add";
}
@RequestMapping("/save")
@ResponseBody
public String save(Store store){
try {
storeService.save(store);
return "true";
} catch (Exception e) {
e.printStackTrace();
return "false";
}
}

@RequestMapping("outStore")
@ResponseBody
public String outStore(String oid, int cid, HttpSession session){
try {
Employee employee=(Employee)session.getAttribute("USER_SESSION");
int eid = employee.getEid();
int sid = employee.getStore().getSid();//获取当前门店的id
storeService.updateOutStore(oid,cid,sid,eid);
return "true";
} catch (Exception e) {
e.printStackTrace();
return "false";
}
}


@RequestMapping("inStore")
@ResponseBody
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
	if ( actionType == null || !ActionMap.mapping.containsKey( actionType ) ) {
return new BaseState( false, AppInfo.INVALID_ACTION ).toJSONString();
}

if ( this.configManager == null || !this.configManager.valid() ) {
return new BaseState( false, AppInfo.CONFIG_ERROR ).toJSONString();
}

State state = null;

int actionCode = ActionMap.getType( this.actionType );

Map<String, Object> conf = null;

switch ( actionCode ) {

case ActionMap.CONFIG:
return this.configManager.getAllConfig().toString();

case ActionMap.UPLOAD_IMAGE:
case ActionMap.UPLOAD_SCRAWL:
case ActionMap.UPLOAD_VIDEO:
case ActionMap.UPLOAD_FILE:
conf = this.configManager.getConfig( actionCode );
state = new Uploader( request, conf ).doExec();
break;

case ActionMap.CATCH_IMAGE:
conf = configManager.getConfig( actionCode );
String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) );
state = new ImageHunter( conf ).capture( list );
break;

case ActionMap.LIST_IMAGE:
case ActionMap.LIST_FILE:
conf = configManager.getConfig( actionCode );
int start = this.getStartIndex();
state = new FileManager( conf ).listFile( start );
break;

}

return state.toJSONString();

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    }
return "false";
}
//添加Cookie
private void addCookie(HttpServletResponse response,String username){
Cookie cookie=new Cookie("username",username);
cookie.setPath("/");
cookie.setMaxAge(60*60*24*7);
response.addCookie(cookie);
}

//跳转到登录页面
@RequestMapping("/tologin")
public String tologin(){
return "login";
}


//切换帐号
@RequestMapping("/change")
public String change(HttpSession session){
//把刚才登录的信息从session中的移除
session.removeAttribute("USER_SESSION");
//跳转到登录页面
return "login";
}

@RequestMapping("/logout")
public String logout(HttpSession session,HttpServletResponse response){
//把刚才登录的信息从session中的移除
session.removeAttribute("USER_SESSION");
//清除Cookie
Cookie cookie=new Cookie("username",null);
cookie.setPath("/");
cookie.setMaxAge(0);//存活时间为0秒,相当于删除
response.addCookie(cookie);
//跳转到登录页面
return "login";
}

@RequestMapping("/tosave")
public String tosave(){
return "admin-add";
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	if ( this.configManager == null || !this.configManager.valid() ) {
return new BaseState( false, AppInfo.CONFIG_ERROR ).toJSONString();
}

State state = null;

int actionCode = ActionMap.getType( this.actionType );

Map<String, Object> conf = null;

switch ( actionCode ) {

case ActionMap.CONFIG:
return this.configManager.getAllConfig().toString();

case ActionMap.UPLOAD_IMAGE:
case ActionMap.UPLOAD_SCRAWL:
case ActionMap.UPLOAD_VIDEO:
case ActionMap.UPLOAD_FILE:
conf = this.configManager.getConfig( actionCode );
state = new Uploader( request, conf ).doExec();
break;

case ActionMap.CATCH_IMAGE:
conf = configManager.getConfig( actionCode );
String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) );
state = new ImageHunter( conf ).capture( list );
break;

case ActionMap.LIST_IMAGE:
case ActionMap.LIST_FILE:
conf = configManager.getConfig( actionCode );
int start = this.getStartIndex();
state = new FileManager( conf ).listFile( start );
break;

}

return state.toJSONString();

}

public int getStartIndex () {
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
}

@RequestMapping("/sendlist")
public String sendlist(Model model){
List<OrderInfo> list = orderInfoService.listByStats(1);
model.addAttribute("list",list);
return "order-send";
}


@RequestMapping("/updateReceivere")
@ResponseBody
public String updateReceivere(String onum, HttpSession session){
try {
orderInfoService.updateReceivere(onum,session);
return "true";
} catch (Exception e) {
e.printStackTrace();
return "false";
}
}

@RequestMapping("/updateSend")
@ResponseBody
public String updateSend(String onum, HttpSession session){
try {
orderInfoService.updateSend(onum,session);
return "true";
} catch (Exception e) {
e.printStackTrace();
return "false";
}
}

@RequestMapping("/count")
@ResponseBody
public String count(){
List<DataResult> count = orderInfoService.count();
return JSON.toJSONString(count);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


@RequestMapping("inStore")
@ResponseBody
public String inStore(String oid, HttpSession session){
try {
Employee employee=(Employee)session.getAttribute("USER_SESSION");
int eid = employee.getEid();
int sid = employee.getStore().getSid();//获取当前门店的id
storeService.updateInStore(oid,sid,eid);
return "true";
} catch (Exception e) {
e.printStackTrace();
return "false";
}
}


}



@RequestMapping("/car")
@Controller
public class CarController {

@Autowired
private CarService carService;
@Autowired
private StoreService storeService;

@RequestMapping("/list")


项目链接:
https://javayms.github.io?id=011723490309201dp
https://javayms.pages.dev?id=011723490309201dp