package com.fzzy.igds.dzhwk.controller;
|
|
import com.fzzy.igds.dzhwk.data.DzhwkConfigData;
|
import com.fzzy.igds.dzhwk.domain.Dept;
|
import com.fzzy.igds.dzhwk.manager.WebManager;
|
import com.ruoyi.common.utils.StringUtils;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.ModelMap;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import javax.annotation.Resource;
|
|
/**
|
* @Description
|
*/
|
@Slf4j
|
@Controller
|
@RequestMapping("/dzhwk")
|
public class WebController {
|
|
private static final String prefix = "dzhwk/";
|
|
@Resource
|
private DzhwkConfigData dzhwkConfigData;
|
@Resource
|
private WebManager webManager;
|
|
/**
|
* 首页
|
* @param gid 廒间id
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/index")
|
public String index(@RequestParam(value = "gid", required = false) String gid, ModelMap view) {
|
|
String videoUrl = dzhwkConfigData.getDzhwkVideo().replace(dzhwkConfigData.getProfile(),"/profile/");
|
view.put("videoUrl", videoUrl);
|
return prefix + "index";
|
}
|
|
/**
|
* 电子货位卡
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/dzhwk")
|
public String dzhwk(ModelMap view) {
|
view.put("flag", "dzhwk");
|
return prefix + "dzhwk";
|
}
|
|
/**
|
* 仓储保管作业-粮温检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/grain")
|
public String grain(ModelMap view) {
|
view.put("flag", "grain");
|
return prefix + "grain";
|
}
|
|
/**
|
* 仓储保管作业-粮温检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/grain-check1")
|
public String grainCheck1(ModelMap view) {
|
return prefix + "grain-check1";
|
}
|
|
/**
|
* 仓储保管作业-气体检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/gas")
|
public String gas(ModelMap view) {
|
view.put("flag", "gas");
|
return prefix + "gas";
|
}
|
|
/**
|
* 仓储保管作业-粮温检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/gas-check")
|
public String gasCheck(ModelMap view) {
|
return prefix + "gas-check";
|
}
|
|
/**
|
* 仓储保管作业-虫害检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/pest")
|
public String pest(ModelMap view) {
|
view.put("flag", "pest");
|
return prefix + "pest";
|
}
|
|
/**
|
* 仓储保管作业-粮温检测
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/pest-check")
|
public String pestCheck(ModelMap view) {
|
return prefix + "pest-check";
|
}
|
|
/**
|
* 仓储保管作业-通风作业
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/verb")
|
public String verb(ModelMap view) {
|
view.put("flag", "verb");
|
return prefix + "verb";
|
}
|
|
/**
|
* 仓储保管作业-通风控制
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/verb-control")
|
public String verbControl(ModelMap view) {
|
return prefix + "verb-control";
|
}
|
|
/**
|
* 仓储保管作业-温控作业
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/recir")
|
public String recir(ModelMap view) {
|
view.put("flag", "recir");
|
return prefix + "recir";
|
}
|
|
/**
|
* 仓储保管作业-通风控制
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/recir-control")
|
public String recirControl(ModelMap view) {
|
return prefix + "recir-control";
|
}
|
|
/**
|
* 仓储保管作业-气调作业
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/n2")
|
public String n2(ModelMap view) {
|
view.put("flag", "n2");
|
return prefix + "n2";
|
}
|
|
/**
|
* 仓储保管作业-通风控制
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/n2-control")
|
public String n2Control(ModelMap view) {
|
return prefix + "n2-control";
|
}
|
|
/**
|
* 仓储保管作业-安全管理
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/security")
|
public String security(ModelMap view) {
|
view.put("flag", "security");
|
return prefix + "security";
|
}
|
|
/**
|
* 电子门禁
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/door")
|
public String door(ModelMap view) {
|
view.put("flag", "door");
|
return prefix + "door";
|
}
|
|
/**
|
* AI专家决策
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/ai")
|
public String ai(ModelMap view) {
|
view.put("flag", "ai");
|
return prefix + "ai";
|
}
|
|
/**
|
* 粮油专卡
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/card")
|
public String card(ModelMap view) {
|
view.put("flag", "card");
|
return prefix + "card";
|
}
|
|
/**
|
* 粮油专卡
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/card-food-oil")
|
public String cardFoodOil(ModelMap view) {
|
return prefix + "card-food-oil";
|
}
|
|
/**
|
* 巡检打卡
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/patrol")
|
public String patrol(ModelMap view) {
|
view.put("flag", "patrol");
|
return prefix + "patrol";
|
}
|
|
/**
|
* 粮油专卡
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/sys")
|
public String sys(ModelMap view) {
|
view.put("flag", "sys");
|
return prefix + "sys";
|
}
|
|
/**
|
* 锁屏
|
* @param view
|
* @return
|
*/
|
@RequestMapping("/lock")
|
public String lock(@RequestParam(value = "flag", required = true) String flag, ModelMap view) {
|
view.put("flag", flag);
|
return prefix + "lock";
|
}
|
|
/**
|
* 视频预览页面
|
*
|
* @return
|
*/
|
@RequestMapping("/dept-video")
|
public String deptVideo(@RequestParam(value = "id", required = true) String id,
|
ModelMap view) {
|
|
if(StringUtils.isNotEmpty(id)){
|
Dept dept = webManager.getDeptFile(id);
|
view.put("videoPath", dept.getVideoFilePath());
|
}
|
|
return prefix + "dept-video";
|
}
|
|
/**
|
* 鸟瞰图预览页面
|
*
|
* @return
|
*/
|
@RequestMapping("/dept-img")
|
public String deptImg(@RequestParam(value = "id", required = true) String id,
|
ModelMap view) {
|
|
if(StringUtils.isNotEmpty(id)){
|
Dept dept = webManager.getDeptFile(id);;
|
view.put("imgPath", dept.getImgFilePath());
|
}
|
|
return prefix + "dept-img";
|
}
|
}
|