141 lines
3.9 KiB
Java
141 lines
3.9 KiB
Java
package com.zcloud.controller.mkmj;
|
||
|
||
import com.zcloud.controller.base.BaseController;
|
||
import com.zcloud.entity.Page;
|
||
import com.zcloud.entity.PageData;
|
||
import com.zcloud.service.map.util.ReturnMap;
|
||
import com.zcloud.service.mkmj.MkmjAreaGateService;
|
||
import com.zcloud.service.mkmj.MkmjGateVideoService;
|
||
import com.zcloud.util.DateUtil;
|
||
import com.zcloud.util.Jurisdiction;
|
||
import com.zcloud.util.Tools;
|
||
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.RequestMapping;
|
||
import org.springframework.web.bind.annotation.ResponseBody;
|
||
|
||
import java.util.Date;
|
||
import java.util.HashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
/**
|
||
* 说明:门口门禁区域
|
||
* 作者:zhaoyu
|
||
* 时间:2024-01-16
|
||
* 官网:www.zcloudchina.com
|
||
*/
|
||
@Controller
|
||
@RequestMapping("/mkmjGateVideo")
|
||
public class MkmjGateVideoController extends BaseController {
|
||
|
||
@Autowired
|
||
private MkmjGateVideoService mkmjGateVideoService;
|
||
|
||
/**新增
|
||
* @param
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/add")
|
||
@RequiresPermissions("mkmjArea:add")
|
||
@ResponseBody
|
||
public Object add() throws Exception{
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 添加时间
|
||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人
|
||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间
|
||
pd.put("ISDELETE", "0"); //是否删除
|
||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||
return mkmjGateVideoService.save(pd);
|
||
}
|
||
|
||
/**删除
|
||
* @param
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/delete")
|
||
@RequiresPermissions("mkmjArea:del")
|
||
@ResponseBody
|
||
public Object delete() throws Exception{
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
return mkmjGateVideoService.delete(pd);
|
||
}
|
||
|
||
/**修改
|
||
* @param
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/edit")
|
||
@RequiresPermissions("mkmjArea:edit")
|
||
@ResponseBody
|
||
public Object edit() throws Exception{
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||
return mkmjGateVideoService.edit(pd);
|
||
}
|
||
|
||
/**列表
|
||
* @param page
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/list")
|
||
@RequiresPermissions("mkmjArea:list")
|
||
@ResponseBody
|
||
public Object list(Page page) throws Exception{
|
||
Map<String,Object> map = new HashMap<String,Object>();
|
||
String errInfo = "success";
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||
page.setPd(pd);
|
||
List<PageData> varList = mkmjGateVideoService.list(page); //列出Coursectk列表
|
||
map.put("varList", varList);
|
||
map.put("page", page);
|
||
map.put("result", errInfo);
|
||
return map;
|
||
}
|
||
|
||
/**去修改页面获取数据
|
||
* @param
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/goEdit")
|
||
@RequiresPermissions("mkmjArea:edit")
|
||
@ResponseBody
|
||
public Object goEdit() throws Exception{
|
||
Map<String,Object> map = new HashMap<String,Object>();
|
||
String errInfo = "success";
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
pd = mkmjGateVideoService.findById(pd); //根据ID读取
|
||
map.put("pd", pd);
|
||
map.put("result", errInfo);
|
||
return map;
|
||
}
|
||
|
||
|
||
/**定位
|
||
* @param
|
||
* @throws Exception
|
||
*/
|
||
@RequestMapping(value="/savePosition")
|
||
@ResponseBody
|
||
public Object savePosition() throws Exception{
|
||
Map<String,Object> map = new HashMap<String,Object>();
|
||
String errInfo = "success";
|
||
PageData pd = new PageData();
|
||
pd = this.getPageData();
|
||
mkmjGateVideoService.savePosition(pd); //根据ID读取
|
||
map.put("result", errInfo);
|
||
return map;
|
||
}
|
||
|
||
}
|