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} + +