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("操作成功"); } }