Merge remote-tracking branch 'origin/2024-01-16-zy-门口门禁需求' into 2024年1月24日测试
# Conflicts: # src/main/resources/application-dev.properties # src/main/resources/application.properties2024年2月1日V1.0.53
commit
391cd08b45
|
@ -0,0 +1,121 @@
|
|||
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.MkmjAreaService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.ObjectExcelView;
|
||||
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 org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/mkmjArea")
|
||||
public class MkmjAreaController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MkmjAreaService mkmjAreaService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("mkmjArea:add")
|
||||
@ResponseBody
|
||||
public ReturnMap 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 mkmjAreaService.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mkmjArea:del")
|
||||
@ResponseBody
|
||||
public ReturnMap delete() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mkmjAreaService.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("mkmjArea:edit")
|
||||
@ResponseBody
|
||||
public ReturnMap edit() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||||
return mkmjAreaService.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 = mkmjAreaService.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 = mkmjAreaService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
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.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("/mkmjAreaGate")
|
||||
public class MkmjAreaGateController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MkmjAreaGateService mkmjAreaGateService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("mkmjArea:add")
|
||||
@ResponseBody
|
||||
public ReturnMap 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 mkmjAreaGateService.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mkmjArea:del")
|
||||
@ResponseBody
|
||||
public ReturnMap delete() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mkmjAreaGateService.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("mkmjArea:edit")
|
||||
@ResponseBody
|
||||
public ReturnMap edit() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||||
return mkmjAreaGateService.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 = mkmjAreaGateService.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 = mkmjAreaGateService.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();
|
||||
mkmjAreaGateService.savePosition(pd); //根据ID读取
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
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.MkmjGateLogService;
|
||||
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("/mkmjGateLog")
|
||||
public class MkmjGateLogController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private MkmjGateLogService mkmjGateLogService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("mkmjArea:add")
|
||||
@ResponseBody
|
||||
public ReturnMap add() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
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 mkmjGateLogService.save(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("mkmjArea:del")
|
||||
@ResponseBody
|
||||
public ReturnMap delete() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
return mkmjGateLogService.delete(pd);
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("mkmjArea:edit")
|
||||
@ResponseBody
|
||||
public ReturnMap edit() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间
|
||||
return mkmjGateLogService.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 = mkmjGateLogService.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 = mkmjGateLogService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
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 ReturnMap 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 ReturnMap 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 ReturnMap 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;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.zcloud.mapper.datasource.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjAreaGateMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.mapper.datasource.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjAreaMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**.
|
||||
* 校验名称是否重复 修改时传入数据id
|
||||
* @param pageData
|
||||
* @return
|
||||
*/
|
||||
PageData findByOnly(PageData pageData);
|
||||
|
||||
/**
|
||||
* 检验是否存在下级区域
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> findByChild(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.zcloud.mapper.datasource.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁闸机出入记录
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjGateLogMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.zcloud.mapper.datasource.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁闸机摄像头
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjGateVideoMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
*/
|
||||
void savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.zcloud.service.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjAreaGateService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
ReturnMap savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.zcloud.service.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjAreaService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.service.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjGateLogService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.zcloud.service.mkmj;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface MkmjGateVideoService {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 定位
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
ReturnMap savePosition(PageData pd);
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package com.zcloud.service.mkmj.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.service.mkmj.MkmjAreaGateService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjAreaGateServiceImpl implements MkmjAreaGateService {
|
||||
|
||||
@Autowired
|
||||
private MkmjAreaGateMapper mkmjAreaGateMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
//保存校验名称不重复
|
||||
PageData pageData = mkmjAreaGateMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(ObjectUtils.isEmpty(pageData)){
|
||||
pd.put("AREA_GATE_ID", UuidUtil.get32UUID());
|
||||
}else {
|
||||
returnMap.error("名称已存在,请修改后重新提交");
|
||||
return returnMap;
|
||||
}
|
||||
mkmjAreaGateMapper.save(pd);
|
||||
return returnMap.ok("保存成功");
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
mkmjAreaGateMapper.delete(pd);
|
||||
return returnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
PageData pageData = mkmjAreaGateMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(!ObjectUtils.isEmpty(pageData)){
|
||||
returnMap.error("名称已存在,请修改后重新提交");
|
||||
return returnMap;
|
||||
}
|
||||
mkmjAreaGateMapper.edit(pd);
|
||||
return returnMap.ok("编辑成功");
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjAreaGateMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjAreaGateMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjAreaGateMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
ReturnMap returnMap = new ReturnMap();
|
||||
mkmjAreaGateMapper.deleteAll(ArrayDATA_IDS);
|
||||
return returnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnMap savePosition(PageData pd) {
|
||||
mkmjAreaGateMapper.savePosition(pd);
|
||||
return ReturnMap.ok("定位成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
package com.zcloud.service.mkmj.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.service.mkmj.MkmjAreaService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjAreaServiceImpl implements MkmjAreaService {
|
||||
|
||||
@Autowired
|
||||
private MkmjAreaMapper mkmjAreaMapper;
|
||||
|
||||
@Autowired
|
||||
private MkmjAreaGateMapper mkmjAreaGateMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception{
|
||||
//保存校验名称不重复
|
||||
PageData pageData = mkmjAreaMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(ObjectUtils.isEmpty(pageData)){
|
||||
pd.put("AREA_ID", UuidUtil.get32UUID());
|
||||
}else {
|
||||
return ReturnMap.error("名称已存在,请修改后重新提交");
|
||||
}
|
||||
mkmjAreaMapper.save(pd);
|
||||
return ReturnMap.ok("保存成功");
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception{
|
||||
//校验区域下是否还存在区域 存在则不让删除
|
||||
List<PageData> childList = mkmjAreaMapper.findByChild(pd);
|
||||
if(childList.size()>0){
|
||||
return ReturnMap.error("当前区域还存在下级区域,请删除当前区域的所有下级区域后进行删除");
|
||||
}
|
||||
//校验区域下是否存在闸机,存在则不让删除
|
||||
List<PageData> gateList = mkmjAreaGateMapper.listAll(pd);
|
||||
if(gateList.size()>0){
|
||||
return ReturnMap.error("当前区域还存在闸机,请删除当前区域的所有闸机后进行删除");
|
||||
}
|
||||
//两个校验都不存在 则可以删除
|
||||
mkmjAreaMapper.delete(pd);
|
||||
return ReturnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception{
|
||||
PageData pageData = mkmjAreaMapper.findByOnly(pd);
|
||||
//查询不到重复数据 开始走业务
|
||||
if(!ObjectUtils.isEmpty(pageData)){
|
||||
return ReturnMap.error("名称已存在,请修改后重新提交");
|
||||
}
|
||||
mkmjAreaMapper.edit(pd);
|
||||
return ReturnMap.ok("编辑成功");
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjAreaMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjAreaMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjAreaMapper.findById(pd);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.zcloud.service.mkmj.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjGateLogMapper;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.service.mkmj.MkmjAreaGateService;
|
||||
import com.zcloud.service.mkmj.MkmjGateLogService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjGateLogServiceImpl implements MkmjGateLogService {
|
||||
|
||||
@Autowired
|
||||
private MkmjGateLogMapper mkmjGateLogMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception{
|
||||
mkmjGateLogMapper.save(pd);
|
||||
return ReturnMap.ok("保存成功");
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception{
|
||||
mkmjGateLogMapper.delete(pd);
|
||||
return ReturnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception{
|
||||
mkmjGateLogMapper.edit(pd);
|
||||
return ReturnMap.ok("编辑成功");
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjGateLogMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjGateLogMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjGateLogMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
mkmjGateLogMapper.deleteAll(ArrayDATA_IDS);
|
||||
return ReturnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.zcloud.service.mkmj.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper;
|
||||
import com.zcloud.mapper.datasource.mkmj.MkmjGateVideoMapper;
|
||||
import com.zcloud.service.map.util.ReturnMap;
|
||||
import com.zcloud.service.mkmj.MkmjAreaGateService;
|
||||
import com.zcloud.service.mkmj.MkmjGateVideoService;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:门口门禁区域闸机
|
||||
* 作者:zhaoyu
|
||||
* 时间:2024-01-16
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class MkmjGateVideServiceImpl implements MkmjGateVideoService {
|
||||
|
||||
@Autowired
|
||||
private MkmjGateVideoMapper mkmjGateVideoMapper;
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap save(PageData pd)throws Exception{
|
||||
pd.put("GATE_VIDEO_ID",UuidUtil.get32UUID());
|
||||
mkmjGateVideoMapper.save(pd);
|
||||
return ReturnMap.ok("保存成功");
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap delete(PageData pd)throws Exception{
|
||||
mkmjGateVideoMapper.delete(pd);
|
||||
return ReturnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap edit(PageData pd)throws Exception{
|
||||
mkmjGateVideoMapper.edit(pd);
|
||||
return ReturnMap.ok("编辑成功");
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception{
|
||||
return mkmjGateVideoMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception{
|
||||
return mkmjGateVideoMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return mkmjGateVideoMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception{
|
||||
ReturnMap ReturnMap = new ReturnMap();
|
||||
mkmjGateVideoMapper.deleteAll(ArrayDATA_IDS);
|
||||
return ReturnMap.ok("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnMap savePosition(PageData pd) {
|
||||
mkmjGateVideoMapper.savePosition(pd);
|
||||
return ReturnMap.ok("定位成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_AREA_GATE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.AREA_GATE_ID,
|
||||
f.GATE_NUMBER,
|
||||
f.AREA_ID,
|
||||
f.GATE_NAME,
|
||||
f.GATE_TYPE,
|
||||
f.GATE_CATEGORY,
|
||||
f.GATE_MODEL,
|
||||
f.GATE_POSITION,
|
||||
f.IS_ADJACENT,
|
||||
f.ADJACENT_AREA_ID,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
AREA_GATE_ID,
|
||||
GATE_NUMBER,
|
||||
AREA_ID,
|
||||
GATE_NAME,
|
||||
GATE_TYPE,
|
||||
GATE_CATEGORY,
|
||||
GATE_MODEL,
|
||||
GATE_POSITION,
|
||||
IS_ADJACENT,
|
||||
ADJACENT_AREA_ID,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{AREA_GATE_ID},
|
||||
#{GATE_NUMBER},
|
||||
#{AREA_ID},
|
||||
#{GATE_NAME},
|
||||
#{GATE_TYPE},
|
||||
#{GATE_CATEGORY},
|
||||
#{GATE_MODEL},
|
||||
#{GATE_POSITION},
|
||||
#{IS_ADJACENT},
|
||||
#{ADJACENT_AREA_ID},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_GATE_ID = #{AREA_GATE_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
AREA_GATE_ID= AREA_GATE_ID,
|
||||
GATE_NUMBER=#{GATE_NUMBER},
|
||||
AREA_ID=#{AREA_ID},
|
||||
GATE_NAME=#{GATE_NAME},
|
||||
GATE_TYPE=#{GATE_TYPE},
|
||||
GATE_CATEGORY=#{GATE_CATEGORY},
|
||||
GATE_MODEL=#{GATE_MODEL},
|
||||
GATE_POSITION=#{GATE_POSITION},
|
||||
IS_ADJACENT=#{IS_ADJACENT},
|
||||
ADJACENT_AREA_ID=#{ADJACENT_AREA_ID},
|
||||
LONGITUDE=#{LONGITUDE},
|
||||
LATITUDE=#{LATITUDE},
|
||||
CORPINFO_ID=#{CORPINFO_ID},
|
||||
CREATOR=#{CREATOR},
|
||||
CREATTIME=#{CREATTIME},
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME},
|
||||
ISDELETE=#{ISDELETE}
|
||||
where
|
||||
AREA_GATE_ID=#{AREA_GATE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.AREA_GATE_ID=#{AREA_GATE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
ifnull(v.VIDEOCOUNT,0) VIDEOCOUNT,
|
||||
a.AREA_NAME ADJACENT_AREA_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN (SELECT
|
||||
AREA_GATE_ID ,COUNT(GATE_VIDEO_ID) VIDEOCOUNT
|
||||
FROM
|
||||
`mkmj_gate_video`
|
||||
WHERE
|
||||
ISDELETE = '0'
|
||||
GROUP BY AREA_GATE_ID ) v on v.AREA_GATE_ID = f.AREA_GATE_ID
|
||||
LEFT JOIN MKMJ_AREA a on a.AREA_ID = f.ADJACENT_AREA_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
<if test="pd.AREA_ID != null and pd.AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and f.AREA_ID=#{pd.AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_ID = #{AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_GATE_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.GATE_NAME = #{GATE_NAME}
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_GATE_ID != #{AREA_GATE_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
AREA_GATE_ID = #{AREA_GATE_ID}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,186 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_AREA
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.AREA_ID,
|
||||
f.AREA_NAME,
|
||||
f.AREA_RANGE,
|
||||
f.AREA_LEAVE,
|
||||
f.AREA_PARENT_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
AREA_ID,
|
||||
AREA_NAME,
|
||||
AREA_RANGE,
|
||||
AREA_LEAVE,
|
||||
AREA_PARENT_ID,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{AREA_ID},
|
||||
#{AREA_NAME},
|
||||
#{AREA_RANGE},
|
||||
#{AREA_LEAVE},
|
||||
#{AREA_PARENT_ID},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_ID = #{AREA_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
AREA_ID=AREA_ID,
|
||||
AREA_NAME=#{AREA_NAME},
|
||||
AREA_RANGE=#{AREA_RANGE},
|
||||
AREA_LEAVE=#{AREA_LEAVE},
|
||||
AREA_PARENT_ID=#{AREA_PARENT_ID},
|
||||
CORPINFO_ID=#{CORPINFO_ID},
|
||||
CREATOR=#{CREATOR},
|
||||
CREATTIME=#{CREATTIME},
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME},
|
||||
ISDELETE=#{ISDELETE}
|
||||
where
|
||||
AREA_ID=#{AREA_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.AREA_ID=#{AREA_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
ifnull(c.CHILDCOUNT,0) CHILDCOUNT,
|
||||
ifnull(g.GATECOUNT,0) GATECOUNT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN (SELECT AREA_PARENT_ID, count( AREA_ID ) CHILDCOUNT FROM mkmj_area WHERE ISDELETE = '0' GROUP BY AREA_PARENT_ID) c on c.AREA_PARENT_ID = f.AREA_ID
|
||||
LEFT JOIN (SELECT AREA_ID, count( AREA_GATE_ID ) GATECOUNT FROM mkmj_area_gate WHERE ISDELETE = '0' GROUP BY AREA_ID) g on g.AREA_ID = f.AREA_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
<if test="pd.AREA_LEAVE != null and pd.AREA_LEAVE != ''"><!-- 关键词检索 -->
|
||||
and f.AREA_LEAVE = #{pd.AREA_LEAVE}
|
||||
</if>
|
||||
<if test="pd.AREA_PARENT_ID != null and pd.AREA_PARENT_ID != ''"><!-- 关键词检索 -->
|
||||
and f.AREA_PARENT_ID=#{pd.AREA_PARENT_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByOnly" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.AREA_NAME = #{AREA_NAME}
|
||||
<if test="AREA_ID!='' and AREA_ID != null">
|
||||
and f.AREA_ID != #{AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 校验名称是否重复 -->
|
||||
<select id="findByChild" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.ISDELETE = '0'
|
||||
AND f.AREA_PARENT_ID = #{AREA_ID}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,196 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.mkmj.MkmjGateLogMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_GATE_LOG
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.AREA_LOG_ID,
|
||||
f.AREA_GATE_ID,
|
||||
f.STATE,
|
||||
f.LOG_TIME,
|
||||
f.USER_ID,
|
||||
f.USER_NAME,
|
||||
f.GATE_TYPE,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.EX1,
|
||||
f.EX2,
|
||||
f.EX3,
|
||||
f.EX4,
|
||||
f.EX5
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
AREA_LOG_ID,
|
||||
AREA_GATE_ID,
|
||||
STATE,
|
||||
LOG_TIME,
|
||||
USER_ID,
|
||||
USER_NAME,
|
||||
GATE_TYPE,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE,
|
||||
EX1,
|
||||
EX2,
|
||||
EX3,
|
||||
EX4,
|
||||
EX5
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{AREA_LOG_ID},
|
||||
#{AREA_GATE_ID},
|
||||
#{STATE},
|
||||
#{LOG_TIME},
|
||||
#{USER_ID},
|
||||
#{USER_NAME}
|
||||
#{GATE_TYPE},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE},
|
||||
#{EX1},
|
||||
#{EX2},
|
||||
#{EX3},
|
||||
#{EX4},
|
||||
#{EX5}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_LOG_ID = #{AREA_LOG_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
AREA_LOG_ID= AREA_LOG_ID,
|
||||
AREA_GATE_ID=#{AREA_GATE_ID},
|
||||
STATE=#{STATE},
|
||||
LOG_TIME=#{LOG_TIME},
|
||||
USER_CARD=#{USER_CARD},
|
||||
GATE_TYPE=#{GATE_TYPE},
|
||||
CREATOR=#{CREATOR},
|
||||
CREATTIME=#{CREATTIME},
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME},
|
||||
ISDELETE=#{ISDELETE},
|
||||
EX1=#{EX1},
|
||||
EX2=#{EX2},
|
||||
EX3=#{EX3},
|
||||
EX4=#{EX4},
|
||||
EX5=#{EX5}
|
||||
where
|
||||
AREA_LOG_ID=#{AREA_LOG_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.AREA_LOG_ID=#{AREA_LOG_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.AREA_LOG_ID,
|
||||
f.AREA_GATE_ID,
|
||||
f.STATE,
|
||||
f.LOG_TIME,
|
||||
IFNULL(u.NAME,f.USER_NAME) NAME,
|
||||
f.GATE_TYPE,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.EX1,
|
||||
f.EX2,
|
||||
f.EX3,
|
||||
f.EX4,
|
||||
f.EX5,
|
||||
g.GATE_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN MKMJ_AREA_GATE g on g.AREA_GATE_ID = f.AREA_GATE_ID
|
||||
LEFT JOIN vi_user_all u on f.USER_ID = u.USER_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
<if test="pd.AREA_ID != null and pd.AREA_ID != ''"><!-- 关键词检索 -->
|
||||
and g.AREA_ID=#{pd.AREA_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
AREA_LOG_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,167 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.mkmj.MkmjGateVideoMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MKMJ_GATE_VIDEO
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.GATE_VIDEO_ID,
|
||||
f.AREA_GATE_ID,
|
||||
f.PLATFORMVIDEOMANAGEMENT_ID,
|
||||
f.LONGITUDE,
|
||||
f.LATITUDE,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
GATE_VIDEO_ID,
|
||||
AREA_GATE_ID,
|
||||
PLATFORMVIDEOMANAGEMENT_ID,
|
||||
LONGITUDE,
|
||||
LATITUDE,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{GATE_VIDEO_ID},
|
||||
#{AREA_GATE_ID},
|
||||
#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
#{LONGITUDE},
|
||||
#{LATITUDE},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
GATE_VIDEO_ID = #{GATE_VIDEO_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
GATE_VIDEO_ID= GATE_VIDEO_ID,
|
||||
AREA_GATE_ID=#{AREA_GATE_ID},
|
||||
PLATFORMVIDEOMANAGEMENT_ID=#{PLATFORMVIDEOMANAGEMENT_ID},
|
||||
LONGITUDE=#{LONGITUDE},
|
||||
LATITUDE=#{LATITUDE},
|
||||
CORPINFO_ID=#{CORPINFO_ID},
|
||||
CREATOR=#{CREATOR},
|
||||
CREATTIME=#{CREATTIME},
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME},
|
||||
ISDELETE=#{ISDELETE}
|
||||
where
|
||||
GATE_VIDEO_ID=#{GATE_VIDEO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.GATE_VIDEO_ID=#{GATE_VIDEO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
r.NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
LEFT JOIN `qa-gwj-regulatory`.bus_platformvideomanagement r on r.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
<if test="pd.AREA_GATE_ID != null and pd.AREA_GATE_ID != ''">
|
||||
AND f.AREA_GATE_ID = #{pd.AREA_GATE_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
GATE_VIDEO_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 定位 -->
|
||||
<update id="savePosition" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
LATITUDE = #{LATITUDE},
|
||||
LONGITUDE = #{LONGITUDE}
|
||||
where
|
||||
GATE_VIDEO_ID = #{GATE_VIDEO_ID}
|
||||
</update>
|
||||
</mapper>
|
|
@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
JCR,
|
||||
CORPINFO_ID,
|
||||
CARDNO,
|
||||
MKMJCARD.
|
||||
ISDELETE
|
||||
</sql>
|
||||
<!-- 字段 -->
|
||||
|
@ -131,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
f.JCR,
|
||||
f.CORPINFO_ID,
|
||||
f.CARDNO,
|
||||
f.MKMJCARD,
|
||||
f.ISDELETE
|
||||
</sql>
|
||||
<!-- 字段值 -->
|
||||
|
@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{JCR},
|
||||
#{CORPINFO_ID},
|
||||
#{CARDNO},
|
||||
#{MKMJCARD},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
|
||||
|
@ -387,6 +390,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="CARDNO != null and CARDNO != ''">
|
||||
,CARDNO = #{CARDNO}
|
||||
</if>
|
||||
<if test="MKMJCARD != null and MKMJCARD != ''">
|
||||
,MKMJCARD = #{MKMJCARD}
|
||||
</if>
|
||||
<if test="DURATION != null and DURATION != ''">
|
||||
,DURATION = #{DURATION}
|
||||
</if>
|
||||
|
|
Loading…
Reference in New Issue