From 5e9aaf7bdd7a3d1a82af8d7c0c6b1f431d041a01 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 17 Jan 2024 14:46:28 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/mkmj/MkmjAreaController.java | 121 +++++++++++ .../mkmj/MkmjAreaGateController.java | 122 +++++++++++ .../datasource/mkmj/MkmjAreaGateMapper.java | 65 ++++++ .../datasource/mkmj/MkmjAreaMapper.java | 73 +++++++ .../datasource/mkmj/MkmjGateLogMapper.java | 59 ++++++ .../service/mkmj/MkmjAreaGateService.java | 60 ++++++ .../zcloud/service/mkmj/MkmjAreaService.java | 55 +++++ .../mkmj/impl/MkmjAreaGateServiceImpl.java | 109 ++++++++++ .../mkmj/impl/MkmjAreaServiceImpl.java | 110 ++++++++++ .../datasource/mkmj/MkmjAreaGateMapper.xml | 192 ++++++++++++++++++ .../datasource/mkmj/MkmjAreaMapper.xml | 186 +++++++++++++++++ 11 files changed, 1152 insertions(+) create mode 100644 src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java create mode 100644 src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateLogMapper.java create mode 100644 src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java create mode 100644 src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java create mode 100644 src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java create mode 100644 src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml create mode 100644 src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java new file mode 100644 index 00000000..76545288 --- /dev/null +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java @@ -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 map = new HashMap(); + 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 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 map = new HashMap(); + 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; + } + +} diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java new file mode 100644 index 00000000..5fb3fa82 --- /dev/null +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java @@ -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.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("mkmjAreaGate: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("mkmjAreaGate: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("mkmjAreaGate: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("mkmjAreaGate:list") + @ResponseBody + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + 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 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("mkmjAreaGate:edit") + @ResponseBody + public Object goEdit() throws Exception{ + Map map = new HashMap(); + 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; + } + +} diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java new file mode 100644 index 00000000..6256a6e9 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java @@ -0,0 +1,65 @@ +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 datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List 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); +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java new file mode 100644 index 00000000..24fdc4bb --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java @@ -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 datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List 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 findByChild(PageData pd); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateLogMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateLogMapper.java new file mode 100644 index 00000000..de486709 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateLogMapper.java @@ -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 datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + +} + diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java b/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java new file mode 100644 index 00000000..99a3c9c7 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java @@ -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 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 list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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; + +} + diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java b/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java new file mode 100644 index 00000000..6834d684 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java @@ -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 list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + +} + diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java new file mode 100644 index 00000000..ec5d53cc --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java @@ -0,0 +1,109 @@ +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 list(Page page)throws Exception{ + return mkmjAreaGateMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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("删除成功"); + } + +} + diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java new file mode 100644 index 00000000..18becb33 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java @@ -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 childList = mkmjAreaMapper.findByChild(pd); + if(childList.size()>0){ + return ReturnMap.error("当前区域还存在下级区域,请删除当前区域的所有下级区域后进行删除"); + } + //校验区域下是否存在闸机,存在则不让删除 + List 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 list(Page page)throws Exception{ + return mkmjAreaMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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); + } + + +} + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml new file mode 100644 index 00000000..748585af --- /dev/null +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -0,0 +1,192 @@ + + + + + + + MKMJ_AREA_GATE + + + + + SYS_DICTIONARIES + + + + + f.AREA_GATE_ID, + f.GATE_NUMBER, + f.AREA_ID, + f.GATE_NAME, + f.GATE_TYPE, + 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 + + + + + AREA_GATE_ID, + GATE_NUMBER, + AREA_ID, + GATE_NAME, + GATE_TYPE, + GATE_MODEL, + GATE_POSITION, + IS_ADJACENT, + ADJACENT_AREA_ID, + LONGITUDE, + LATITUDE, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{AREA_GATE_ID}, + #{GATE_NUMBER}, + #{AREA_ID}, + #{GATE_NAME}, + #{GATE_TYPE}, + #{GATE_MODEL}, + #{GATE_POSITION}, + #{IS_ADJACENT}, + #{ADJACENT_AREA_ID}, + #{LONGITUDE}, + #{LATITUDE}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + AREA_GATE_ID = #{AREA_GATE_ID} + + + + + update + + set + AREA_GATE_ID= AREA_GATE_ID + GATE_NUMBER=#{GATE_NUMBER}, + AREA_ID=#{AREA_ID}, + GATE_NAME=#{GATE_NAME}, + GATE_TYPE=#{GATE_TYPE}, + 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 + + set + ISDELETE = '1' + where + AREA_GATE_ID in + + #{item} + + + + + + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml new file mode 100644 index 00000000..72e79457 --- /dev/null +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml @@ -0,0 +1,186 @@ + + + + + + + MKMJ_AREA + + + + + SYS_DICTIONARIES + + + + + 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 + + + + + AREA_ID, + AREA_NAME, + AREA_RANGE, + AREA_LEAVE, + AREA_PARENT_ID, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{AREA_ID}, + #{AREA_NAME}, + #{AREA_RANGE}, + #{AREA_LEAVE}, + #{AREA_PARENT_ID}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + AREA_ID = #{AREA_ID} + + + + + update + + 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 + + set + ISDELETE = '1' + where + AREA_ID in + + #{item} + + + + + + + + + + From 7a721799b77f46aab1ea6f41cba0379e62a66e3d Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Thu, 18 Jan 2024 16:26:59 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E8=BF=9B=E5=87=BA=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mkmj/MkmjGateLogController.java | 122 ++++++++++++ .../service/mkmj/MkmjGateLogService.java | 60 ++++++ .../mkmj/impl/MkmjGateLogServiceImpl.java | 92 +++++++++ .../datasource/mkmj/MkmjAreaGateMapper.xml | 5 +- .../datasource/mkmj/MkmjGateLogMapper.xml | 175 ++++++++++++++++++ 5 files changed, 453 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java create mode 100644 src/main/java/com/zcloud/service/mkmj/MkmjGateLogService.java create mode 100644 src/main/java/com/zcloud/service/mkmj/impl/MkmjGateLogServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java new file mode 100644 index 00000000..9fa7455d --- /dev/null +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java @@ -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("/mkmjAreaGate") +public class MkmjGateLogController extends BaseController { + + @Autowired + private MkmjGateLogService mkmjGateLogService; + + /**新增 + * @param + * @throws Exception + */ + @RequestMapping(value="/add") + @RequiresPermissions("mkmjAreaGate: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("mkmjAreaGate: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("mkmjAreaGate: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("mkmjAreaGate:list") + @ResponseBody + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + 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 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("mkmjAreaGate:edit") + @ResponseBody + public Object goEdit() throws Exception{ + Map map = new HashMap(); + 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; + } + +} diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjGateLogService.java b/src/main/java/com/zcloud/service/mkmj/MkmjGateLogService.java new file mode 100644 index 00000000..a5146ec5 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/MkmjGateLogService.java @@ -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 list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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; + +} + diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateLogServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateLogServiceImpl.java new file mode 100644 index 00000000..a71bbade --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateLogServiceImpl.java @@ -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 list(Page page)throws Exception{ + return mkmjGateLogMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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("删除成功"); + } + +} + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml index 748585af..7632348d 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -101,7 +101,7 @@ update set - AREA_GATE_ID= AREA_GATE_ID + AREA_GATE_ID= AREA_GATE_ID, GATE_NUMBER=#{GATE_NUMBER}, AREA_ID=#{AREA_ID}, GATE_NAME=#{GATE_NAME}, @@ -149,6 +149,9 @@ --> ) + + and f.AREA_ID=#{pd.AREA_ID} + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml new file mode 100644 index 00000000..10dfa80e --- /dev/null +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml @@ -0,0 +1,175 @@ + + + + + + + MKMJ_GATE_LOG + + + + + SYS_DICTIONARIES + + + + + f.AREA_LOG_ID, + f.AREA_GATE_ID, + f.STATE, + f.LOG_TIME, + f.USER_CARD, + f.GATE_TYPE, + f.CREATOR, + f.CREATTIME, + f.OPERATOR, + f.OPERATTIME, + f.ISDELETE, + f.EX1, + f.EX2, + f.EX3, + f.EX4, + f.EX5 + + + + + AREA_LOG_ID, + AREA_GATE_ID, + STATE, + LOG_TIME, + USER_CARD, + GATE_TYPE, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE, + EX1, + EX2, + EX3, + EX4, + EX5 + + + + + #{AREA_LOG_ID}, + #{AREA_GATE_ID}, + #{STATE}, + #{LOG_TIME}, + #{USER_CARD}, + #{GATE_TYPE}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE}, + #{EX1}, + #{EX2}, + #{EX3}, + #{EX4}, + #{EX5} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + AREA_LOG_ID = #{AREA_LOG_ID} + + + + + update + + 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 + + set + ISDELETE = '1' + where + AREA_LOG_ID in + + #{item} + + + + From 332f52244c96c5960b8ffb145e7cf96fcaa10f94 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Sun, 21 Jan 2024 17:37:50 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/mkmj/MkmjGateLogController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java index 9fa7455d..56a7736f 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java @@ -27,7 +27,7 @@ import java.util.Map; * 官网:www.zcloudchina.com */ @Controller -@RequestMapping("/mkmjAreaGate") +@RequestMapping("/mkmjGateLog") public class MkmjGateLogController extends BaseController { @Autowired @@ -38,7 +38,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/add") - @RequiresPermissions("mkmjAreaGate:add") + @RequiresPermissions("mkmjGateLog:add") @ResponseBody public ReturnMap add() throws Exception{ PageData pd = new PageData(); @@ -56,7 +56,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/delete") - @RequiresPermissions("mkmjAreaGate:del") + @RequiresPermissions("mkmjGateLog:del") @ResponseBody public ReturnMap delete() throws Exception{ PageData pd = new PageData(); @@ -69,7 +69,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/edit") - @RequiresPermissions("mkmjAreaGate:edit") + @RequiresPermissions("mkmjGateLog:edit") @ResponseBody public ReturnMap edit() throws Exception{ PageData pd = new PageData(); @@ -84,7 +84,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/list") - @RequiresPermissions("mkmjAreaGate:list") + @RequiresPermissions("mkmjGateLog:list") @ResponseBody public Object list(Page page) throws Exception{ Map map = new HashMap(); @@ -106,7 +106,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/goEdit") - @RequiresPermissions("mkmjAreaGate:edit") + @RequiresPermissions("mkmjGateLog:edit") @ResponseBody public Object goEdit() throws Exception{ Map map = new HashMap(); From b7c071980e3cfda24e1c240941bb033c56603c32 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 23 Jan 2024 14:24:08 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E9=97=A8?= =?UTF-8?q?=E5=8F=A3=E9=97=A8=E7=A6=81=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81=E5=8D=A1=E5=8F=B7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mkmj/MkmjAreaGateController.java | 10 +++--- .../mkmj/MkmjGateLogController.java | 10 +++--- .../datasource/mkmj/MkmjGateLogMapper.xml | 33 +++++++++++++++---- .../mybatis/datasource/system/UsersMapper.xml | 6 ++++ 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java index 5fb3fa82..8f3d0bbe 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java @@ -37,7 +37,7 @@ public class MkmjAreaGateController extends BaseController { * @throws Exception */ @RequestMapping(value="/add") - @RequiresPermissions("mkmjAreaGate:add") + @RequiresPermissions("mkmjArea:add") @ResponseBody public ReturnMap add() throws Exception{ PageData pd = new PageData(); @@ -56,7 +56,7 @@ public class MkmjAreaGateController extends BaseController { * @throws Exception */ @RequestMapping(value="/delete") - @RequiresPermissions("mkmjAreaGate:del") + @RequiresPermissions("mkmjArea:del") @ResponseBody public ReturnMap delete() throws Exception{ PageData pd = new PageData(); @@ -69,7 +69,7 @@ public class MkmjAreaGateController extends BaseController { * @throws Exception */ @RequestMapping(value="/edit") - @RequiresPermissions("mkmjAreaGate:edit") + @RequiresPermissions("mkmjArea:edit") @ResponseBody public ReturnMap edit() throws Exception{ PageData pd = new PageData(); @@ -84,7 +84,7 @@ public class MkmjAreaGateController extends BaseController { * @throws Exception */ @RequestMapping(value="/list") - @RequiresPermissions("mkmjAreaGate:list") + @RequiresPermissions("mkmjArea:list") @ResponseBody public Object list(Page page) throws Exception{ Map map = new HashMap(); @@ -106,7 +106,7 @@ public class MkmjAreaGateController extends BaseController { * @throws Exception */ @RequestMapping(value="/goEdit") - @RequiresPermissions("mkmjAreaGate:edit") + @RequiresPermissions("mkmjArea:edit") @ResponseBody public Object goEdit() throws Exception{ Map map = new HashMap(); diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java index 56a7736f..ba8f91fc 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjGateLogController.java @@ -38,7 +38,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/add") - @RequiresPermissions("mkmjGateLog:add") + @RequiresPermissions("mkmjArea:add") @ResponseBody public ReturnMap add() throws Exception{ PageData pd = new PageData(); @@ -56,7 +56,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/delete") - @RequiresPermissions("mkmjGateLog:del") + @RequiresPermissions("mkmjArea:del") @ResponseBody public ReturnMap delete() throws Exception{ PageData pd = new PageData(); @@ -69,7 +69,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/edit") - @RequiresPermissions("mkmjGateLog:edit") + @RequiresPermissions("mkmjArea:edit") @ResponseBody public ReturnMap edit() throws Exception{ PageData pd = new PageData(); @@ -84,7 +84,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/list") - @RequiresPermissions("mkmjGateLog:list") + @RequiresPermissions("mkmjArea:list") @ResponseBody public Object list(Page page) throws Exception{ Map map = new HashMap(); @@ -106,7 +106,7 @@ public class MkmjGateLogController extends BaseController { * @throws Exception */ @RequestMapping(value="/goEdit") - @RequiresPermissions("mkmjGateLog:edit") + @RequiresPermissions("mkmjArea:edit") @ResponseBody public Object goEdit() throws Exception{ Map map = new HashMap(); diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml index 10dfa80e..b4b17477 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjGateLogMapper.xml @@ -18,7 +18,8 @@ f.AREA_GATE_ID, f.STATE, f.LOG_TIME, - f.USER_CARD, + f.USER_ID, + f.USER_NAME, f.GATE_TYPE, f.CREATOR, f.CREATTIME, @@ -38,7 +39,8 @@ AREA_GATE_ID, STATE, LOG_TIME, - USER_CARD, + USER_ID, + USER_NAME, GATE_TYPE, CREATOR, CREATTIME, @@ -58,7 +60,8 @@ #{AREA_GATE_ID}, #{STATE}, #{LOG_TIME}, - #{USER_CARD}, + #{USER_ID}, + #{USER_NAME} #{GATE_TYPE}, #{CREATOR}, #{CREATTIME}, @@ -131,9 +134,27 @@ diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index 514370b1..7ab21186 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" JCR, CORPINFO_ID, CARDNO, + MKMJCARD. ISDELETE @@ -131,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" f.JCR, f.CORPINFO_ID, f.CARDNO, + f.MKMJCARD, f.ISDELETE @@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{JCR}, #{CORPINFO_ID}, #{CARDNO}, + #{MKMJCARD}, #{ISDELETE} @@ -387,6 +390,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ,CARDNO = #{CARDNO} + + ,MKMJCARD = #{MKMJCARD} + ,DURATION = #{DURATION} From fc979979d0c95afee5bc716e8afe4080b32c3293 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 23 Jan 2024 17:37:28 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=91=84=E5=83=8F=E5=A4=B4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mkmj/MkmjAreaGateController.java | 16 ++ .../mkmj/MkmjGateVideoController.java | 140 +++++++++++++++ .../datasource/mkmj/MkmjAreaGateMapper.java | 6 + .../datasource/mkmj/MkmjGateVideoMapper.java | 64 +++++++ .../service/mkmj/MkmjAreaGateService.java | 6 + .../service/mkmj/MkmjGateVideoService.java | 66 +++++++ .../mkmj/impl/MkmjAreaGateServiceImpl.java | 6 + .../mkmj/impl/MkmjGateVideServiceImpl.java | 99 +++++++++++ .../datasource/mkmj/MkmjAreaGateMapper.xml | 15 ++ .../datasource/mkmj/MkmjGateVideoMapper.xml | 165 ++++++++++++++++++ 10 files changed, 583 insertions(+) create mode 100644 src/main/java/com/zcloud/controller/mkmj/MkmjGateVideoController.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateVideoMapper.java create mode 100644 src/main/java/com/zcloud/service/mkmj/MkmjGateVideoService.java create mode 100644 src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/mkmj/MkmjGateVideoMapper.xml diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java index 8f3d0bbe..47555f1d 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaGateController.java @@ -119,4 +119,20 @@ public class MkmjAreaGateController extends BaseController { return map; } + /**定位 + * @param + * @throws Exception + */ + @RequestMapping(value="/savePosition") + @ResponseBody + public Object savePosition() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + mkmjAreaGateService.savePosition(pd); //根据ID读取 + map.put("result", errInfo); + return map; + } + } diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjGateVideoController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjGateVideoController.java new file mode 100644 index 00000000..7ea6b036 --- /dev/null +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjGateVideoController.java @@ -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 map = new HashMap(); + 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 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 map = new HashMap(); + 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 map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + mkmjGateVideoService.savePosition(pd); //根据ID读取 + map.put("result", errInfo); + return map; + } + +} diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java index 6256a6e9..4ff0ced4 100644 --- a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaGateMapper.java @@ -61,5 +61,11 @@ public interface MkmjAreaGateMapper { * @return */ PageData findByOnly(PageData pageData); + + /** + * 定位 + * @param pd + */ + void savePosition(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateVideoMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateVideoMapper.java new file mode 100644 index 00000000..cdc7b589 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjGateVideoMapper.java @@ -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 datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List 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); +} + diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java b/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java index 99a3c9c7..a15b3155 100644 --- a/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java +++ b/src/main/java/com/zcloud/service/mkmj/MkmjAreaGateService.java @@ -56,5 +56,11 @@ public interface MkmjAreaGateService { */ public ReturnMap deleteAll(String[] ArrayDATA_IDS)throws Exception; + /** + * 定位 + * @param pd + * @return + */ + ReturnMap savePosition(PageData pd); } diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjGateVideoService.java b/src/main/java/com/zcloud/service/mkmj/MkmjGateVideoService.java new file mode 100644 index 00000000..e7e605e7 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/MkmjGateVideoService.java @@ -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 list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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); +} + diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java index ec5d53cc..cf72bf25 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaGateServiceImpl.java @@ -105,5 +105,11 @@ public class MkmjAreaGateServiceImpl implements MkmjAreaGateService { return returnMap.ok("删除成功"); } + @Override + public ReturnMap savePosition(PageData pd) { + mkmjAreaGateMapper.savePosition(pd); + return ReturnMap.ok("定位成功"); + } + } diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java new file mode 100644 index 00000000..5ea257eb --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java @@ -0,0 +1,99 @@ +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{ + 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 list(Page page)throws Exception{ + return mkmjGateVideoMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List 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("定位成功"); + } + +} + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml index 7632348d..a387376c 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -19,6 +19,7 @@ f.AREA_ID, f.GATE_NAME, f.GATE_TYPE, + f.GATE_CATEGORY, f.GATE_MODEL, f.GATE_POSITION, f.IS_ADJACENT, @@ -40,6 +41,7 @@ AREA_ID, GATE_NAME, GATE_TYPE, + GATE_CATEGORY, GATE_MODEL, GATE_POSITION, IS_ADJACENT, @@ -61,6 +63,7 @@ #{AREA_ID}, #{GATE_NAME}, #{GATE_TYPE}, + #{GATE_CATEGORY}, #{GATE_MODEL}, #{GATE_POSITION}, #{IS_ADJACENT}, @@ -106,6 +109,7 @@ 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}, @@ -192,4 +196,15 @@ and f.AREA_GATE_ID != #{AREA_GATE_ID} + + + + update + + set + LATITUDE = #{LATITUDE}, + LONGITUDE = #{LONGITUDE} + where + AREA_GATE_ID = #{AREA_GATE_ID} + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjGateVideoMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjGateVideoMapper.xml new file mode 100644 index 00000000..2f1d7ef9 --- /dev/null +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjGateVideoMapper.xml @@ -0,0 +1,165 @@ + + + + + + + MKMJ_GATE_VIDEO + + + + + SYS_DICTIONARIES + + + + + f.GATE_VIDEO_ID, + f.AREA_GATE_ID, + f.VIDEO_RESOURCES_ID, + f.LONGITUDE, + f.LATITUDE, + f.CORPINFO_ID, + f.CREATOR, + f.CREATTIME, + f.OPERATOR, + f.OPERATTIME, + f.ISDELETE + + + + + GATE_VIDEO_ID, + AREA_GATE_ID, + VIDEO_RESOURCES_ID, + LONGITUDE, + LATITUDE, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{GATE_VIDEO_ID}, + #{AREA_GATE_ID}, + #{VIDEO_RESOURCES_ID}, + #{LONGITUDE}, + #{LATITUDE}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + GATE_VIDEO_ID = #{GATE_VIDEO_ID} + + + + + update + + set + GATE_VIDEO_ID= GATE_VIDEO_ID, + AREA_GATE_ID=#{AREA_GATE_ID}, + VIDEO_RESOURCES_ID=#{VIDEO_RESOURCES_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 + + set + ISDELETE = '1' + where + GATE_VIDEO_ID in + + #{item} + + + + + + update + + set + LATITUDE = #{LATITUDE}, + LONGITUDE = #{LONGITUDE} + where + GATE_VIDEO_ID = #{GATE_VIDEO_ID} + + From 7cade78064ec01606c7abe5788cf5a1598e069a2 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 23 Jan 2024 18:55:14 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/mkmj/impl/MkmjGateVideServiceImpl.java | 1 + src/main/resources/application-dev.properties | 14 ++++++++------ src/main/resources/application.properties | 2 +- .../mybatis/datasource/mkmj/MkmjAreaGateMapper.xml | 10 +++++++++- .../datasource/mkmj/MkmjGateVideoMapper.xml | 14 ++++++++------ 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java index 5ea257eb..16d85775 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java @@ -33,6 +33,7 @@ public class MkmjGateVideServiceImpl implements MkmjGateVideoService { * @throws Exception */ public ReturnMap save(PageData pd)throws Exception{ + pd.put("GATE_VIDEO_ID",UuidUtil.get32UUID()); mkmjGateVideoMapper.save(pd); return ReturnMap.ok("保存成功"); } diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index a4dd85c3..0c9a8fc0 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -64,18 +64,18 @@ spring.main.banner-mode=off preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/ qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/ #????? -smb.host=39.103.224.166 +smb.host=192.168.192.201 smb.port=22 smb.user=root -smb.password=Zcloud@zcloud88888 -smb.basePath=/mnt/qgfile/file/ +smb.password=SJSKAQHBGLXT@20220311 +smb.basePath=/mnt/qask/file/ #Mq\u914D\u7F6E rocketmq.consumer.group2=edu-admin-edit rocketmq.consumer.group1=edu-admin-add #rocketmq.name-server=10.0.140.141:9876 #rocketmq.name-server=192.168.0.70:9876 -rocketmq.name-server=192.168.0.31:9876 +rocketmq.name-server=192.168.151.57:9876 rocketmq.producer.group=libmiddle rocketmq.producer.send-message-timeout=3000 rocketmq.producer.compress-message-body-threshold=4096 @@ -96,5 +96,7 @@ mq.gwj.data.topic=czks_qy_docking mq.gwj.file.topic=czks_qy_dockingPicture #港务局文件服务器前缀 baseimgpath=https://qgqy.qhdsafety.com/file/ - -cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd +http.file.url=https://qgqy.qhdsafety.com/file/ +corp.default.pic-path=https://qgqy.qhdsafety.com/ +corp.default.back-end-path=https://qgqy.qhdsafety.com/file/ +cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd/ diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 25c549c5..a48eb064 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,7 +3,7 @@ server.port=8091 #?? #spring.profiles.active=local -#����31ʱʹ�� +#31ʱʹ spring.profiles.active=dev #?? #spring.profiles.active=master diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml index a387376c..f27e199e 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -139,9 +139,17 @@ select - + , + r.NAME from f + LEFT JOIN `qa-gwj-regulatory`.bus_platformvideomanagement r on r.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID where f.ISDELETE = '0' and @@ -126,7 +128,7 @@ ) - f.AREA_GATE_ID = #{pd.AREA_GATE_ID} + AND f.AREA_GATE_ID = #{pd.AREA_GATE_ID} From ea1871b0bfc184c7fc51c9b710bb480221bd6623 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 23 Jan 2024 18:56:18 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/mkmj/impl/MkmjGateVideServiceImpl.java | 1 + .../mybatis/datasource/mkmj/MkmjAreaGateMapper.xml | 10 +++++++++- .../datasource/mkmj/MkmjGateVideoMapper.xml | 14 ++++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java index 5ea257eb..16d85775 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjGateVideServiceImpl.java @@ -33,6 +33,7 @@ public class MkmjGateVideServiceImpl implements MkmjGateVideoService { * @throws Exception */ public ReturnMap save(PageData pd)throws Exception{ + pd.put("GATE_VIDEO_ID",UuidUtil.get32UUID()); mkmjGateVideoMapper.save(pd); return ReturnMap.ok("保存成功"); } diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml index a387376c..f27e199e 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -139,9 +139,17 @@ select - + , + r.NAME from f + LEFT JOIN `qa-gwj-regulatory`.bus_platformvideomanagement r on r.PLATFORMVIDEOMANAGEMENT_ID = f.PLATFORMVIDEOMANAGEMENT_ID where f.ISDELETE = '0' and @@ -126,7 +128,7 @@ ) - f.AREA_GATE_ID = #{pd.AREA_GATE_ID} + AND f.AREA_GATE_ID = #{pd.AREA_GATE_ID} From fd28a121da173ed0bd9bc9e4e02c5ffcb11d4117 Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Wed, 24 Jan 2024 15:43:20 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E7=9B=B8=E9=82=BB=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml index f27e199e..e26e7379 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaGateMapper.xml @@ -140,7 +140,8 @@