PresentationModeController.java
2.96 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package com.huaheng.pc.monitor.presentationMode;
import java.util.ArrayList;
import java.util.List;
import com.huaheng.pc.monitor.job.domain.Job;
import com.huaheng.pc.monitor.job.service.IJobService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.shiro.session.OnlineSessionDAO;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.framework.web.page.TableDataInfo;
import com.huaheng.pc.monitor.online.domain.OnlineSession;
import com.huaheng.pc.monitor.online.domain.UserOnline;
import com.huaheng.pc.monitor.online.service.IUserOnlineService;
import javax.annotation.Resource;
/**
* 在线用户监控
*
* @author huaheng
*/
@Controller
@RequestMapping("/monitor/presentationMode")
public class PresentationModeController extends BaseController
{
private String prefix = "monitor/presentationMode";
@Resource
private IJobService jobService;
@RequiresPermissions("monitor:presentationMode:view")
@GetMapping()
public String start()
{
return prefix + "/start";
}
/**
*
* @param presentationType 展厅模式:1AGV堆垛机出库,2堆垛机移库
* @param startAgvZone 1开启叉车库演示模式,2不开启
* @param startTag 演示模式状态 1开启,2关闭
* @return
*/
@Log(title = "系统监控-在线用户", operating = "强退在线用户", action = BusinessType.FORCE)
@PostMapping("/startPresentationMode")
@ResponseBody
public AjaxResult startPresentationMode( Integer presentationType,Integer startAgvZone,Integer startTag)
{
List<String> list=new ArrayList<>();
if(startTag == 1)
{
if(presentationType == 1)
{
//AGV堆垛机出库
list.add("outputTask");
//AGV堆垛机出库口生成AGV任务
list.add("autoCreateAgvZHTask");
}
else if(presentationType == 2)
{
//堆垛机移库
list.add("transferTask");
}
if(startAgvZone == 1)
{
//叉车库
list.add("autoCreateAgvTask");
}
Boolean tag= jobService.startStopJobByName(list,startTag);
}
else
{
list.add("transferTask");
list.add("autoCreateAgvTask");
list.add("outputTask");
list.add("autoCreateAgvZHTask");
Boolean tag= jobService.startStopJobByName(list,startTag);
}
return success("操作成功");
}
}