diff --git a/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java b/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java index 399e8935..4e1cbf6c 100644 --- a/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java +++ b/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java @@ -3,6 +3,7 @@ package com.zcloud.controller.anemometer; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.service.announcement.AnemometerLocalService; import com.zcloud.service.announcement.AnemometerMachineService; import com.zcloud.service.announcement.AnemometerService; import com.zcloud.service.gatemachine.GateAreaService; @@ -25,6 +26,8 @@ public class AnemometerController extends BaseController { @Resource private AnemometerMachineService anemometerMachineService; @Resource + private AnemometerLocalService anemometerLocalService; + @Resource private AnemometerService anemometerService; @@ -57,6 +60,15 @@ public class AnemometerController extends BaseController { return returnMap; } + @RequestMapping(value = "/getFourAnemometerData") + public ReturnMap getFourAnemometerData() throws Exception{ + ReturnMap returnMap = new ReturnMap(); + PageData pd = this.getPageData(); + PageData data = anemometerMachineService.getFourAnemometerData(pd); + returnMap.put("pd", data); + return returnMap; + } + @RequestMapping(value = "/edit") public ReturnMap edit() throws Exception{ PageData pd = this.getPageData(); @@ -68,7 +80,7 @@ public class AnemometerController extends BaseController { public ReturnMap anemometerCount() throws Exception { ReturnMap returnMap = new ReturnMap(); PageData pd = this.getPageData(); - List dataList = anemometerService.listAll(pd); + List dataList = anemometerLocalService.detailListAll(pd); returnMap.put("anemometerCount",dataList.size()); returnMap.put("varList",dataList); return returnMap; diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java index d691c704..565950d2 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjAreaController.java @@ -100,6 +100,28 @@ public class MkmjAreaController extends BaseController { return map; } + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/listForDevice") + @RequiresPermissions("mkmjArea:list") + @ResponseBody + public Object listForDevice(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.listForDevice(page); //列出Coursectk列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + /**去修改页面获取数据 * @param * @throws Exception diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjDeviceController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjDeviceController.java index 93e6af66..8069296c 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjDeviceController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjDeviceController.java @@ -100,6 +100,24 @@ public class MkmjDeviceController extends BaseController { return map; } + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/listAllForArea") + @RequiresPermissions("mkmjDoor:list") + @ResponseBody + public Object listAllForArea() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = mkmjDeviceService.listAllForArea(pd); //列出Coursectk列表 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } + /**去修改页面获取数据 * @param * @throws Exception @@ -118,6 +136,24 @@ public class MkmjDeviceController extends BaseController { return map; } + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/findById") + @RequiresPermissions("mkmjDoor:edit") + @ResponseBody + public Object findById() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = mkmjDeviceService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + /**定位 * @param * @throws Exception diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java new file mode 100644 index 00000000..2737d35c --- /dev/null +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java @@ -0,0 +1,176 @@ +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.mkmj.MkmjRelationService; +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.*; + +@Controller +@RequestMapping("/mkmjRelation") +public class MkmjRelationController extends BaseController { + + @Autowired + private MkmjRelationService mkmjRelationService; + + /**新增 + * @param + * @throws Exception + */ + @RequestMapping(value="/add") + @RequiresPermissions("mkmjDoor:add") + @ResponseBody + public Object add() throws Exception{ + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 添加时间 + pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 添加人 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); // 添加时间 + pd.put("ISDELETE", "0"); //是否删除 + pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间 + return mkmjRelationService.save(pd); + } + + /**删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/delete") + @RequiresPermissions("mkmjDoor:del") + @ResponseBody + public Object delete() throws Exception{ + PageData pd = new PageData(); + pd = this.getPageData(); + return mkmjRelationService.delete(pd); + } + + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/edit") + @RequiresPermissions("mkmjDoor:edit") + @ResponseBody + public Object edit() throws Exception{ + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date()));//修改时间 + return mkmjRelationService.edit(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/list") + @RequiresPermissions("mkmjDoor: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 = mkmjRelationService.list(page); //列出Coursectk列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + @RequestMapping(value="/listAllForArea") + @RequiresPermissions("mkmjDoor:list") + @ResponseBody + public Object listAllForArea() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + List varList = mkmjRelationService.listAllForArea(pd); //列出Coursectk列表 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + @RequiresPermissions("mkmjDoor:edit") + @ResponseBody + public Object goEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = mkmjRelationService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/findById") + @RequiresPermissions("mkmjDoor:edit") + @ResponseBody + public Object findById() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = mkmjRelationService.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{ + PageData pd = new PageData(); + pd = this.getPageData(); + return mkmjRelationService.savePosition(pd); //根据ID读取 + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/getInfoList") + @RequiresPermissions("mkmjDoor:list") + @ResponseBody + public Object getInfoList(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + page.setPd(pd); + List varList = new ArrayList<>(); + varList = mkmjRelationService.getCarAndPeopleInfolistPage(page); //列出人闸机信息列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } +} diff --git a/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java b/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java index 30a59647..4c811256 100644 --- a/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java @@ -28,6 +28,8 @@ public interface AnemometerLocalMapper { */ List listAll(PageData pd)throws Exception; + List detailListAll(PageData pd)throws Exception; + /**风速仪名称查询 * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerMachineMapper.java b/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerMachineMapper.java index eab64718..6ea7186c 100644 --- a/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerMachineMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerMachineMapper.java @@ -44,4 +44,6 @@ public interface AnemometerMachineMapper { List getDatalistPage(Page page); PageData getDetailById(PageData pd); + + PageData getFourAnemometerData(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java index 5415bef3..ab8ef38f 100644 --- a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjAreaMapper.java @@ -37,6 +37,8 @@ public interface MkmjAreaMapper { */ List datalistPage(Page page); + List batchDevicelistPage(Page page); + /**列表(全部) * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjDeviceMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjDeviceMapper.java index c8c968a3..d309db8c 100644 --- a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjDeviceMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjDeviceMapper.java @@ -43,6 +43,8 @@ public interface MkmjDeviceMapper { */ List listAll(PageData pd); + List listAllForArea(PageData pd); + /**通过id获取数据 * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java new file mode 100644 index 00000000..c75e55a7 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java @@ -0,0 +1,75 @@ +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 MkmjRelationMapper { + + /**新增 + * @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); + + List listAllForArea(PageData pd); + + List getCarAndPeopleInfolistPage(Page page); + + /**通过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); +} + diff --git a/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java b/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java index dd07568c..b8d256bb 100644 --- a/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java +++ b/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java @@ -28,6 +28,8 @@ public interface AnemometerLocalService { */ public List listAll(PageData pd)throws Exception; + public List detailListAll(PageData pd)throws Exception; + /**风速仪名称查询 * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/service/announcement/AnemometerMachineService.java b/src/main/java/com/zcloud/service/announcement/AnemometerMachineService.java index 74102ca0..8821fae9 100644 --- a/src/main/java/com/zcloud/service/announcement/AnemometerMachineService.java +++ b/src/main/java/com/zcloud/service/announcement/AnemometerMachineService.java @@ -44,4 +44,6 @@ public interface AnemometerMachineService { public List getDatalistpage(Page page); public PageData getDetailById(PageData pd); + + public PageData getFourAnemometerData(PageData pd); } diff --git a/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java b/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java index 33b1124c..2e6ab7f0 100644 --- a/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java +++ b/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java @@ -36,6 +36,11 @@ public class AnemometerLocalServiceImpl implements AnemometerLocalService { return anemometerLocalMapper.listAll(pd); } + @Override + public List detailListAll(PageData pd) throws Exception { + return anemometerLocalMapper.detailListAll(pd); + } + @Override public List findByName(PageData pd) throws Exception { return anemometerLocalMapper.findByName(pd); diff --git a/src/main/java/com/zcloud/service/announcement/impl/AnemometerMachineServiceImpl.java b/src/main/java/com/zcloud/service/announcement/impl/AnemometerMachineServiceImpl.java index 2a0a0558..d5fcaf7c 100644 --- a/src/main/java/com/zcloud/service/announcement/impl/AnemometerMachineServiceImpl.java +++ b/src/main/java/com/zcloud/service/announcement/impl/AnemometerMachineServiceImpl.java @@ -57,4 +57,9 @@ public class AnemometerMachineServiceImpl implements AnemometerMachineService { public PageData getDetailById(PageData pd) { return anemometerMachineMapper.getDetailById(pd); } + + @Override + public PageData getFourAnemometerData(PageData pd) { + return anemometerMachineMapper.getFourAnemometerData(pd); + } } diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java b/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java index 169fc5ce..a87c7713 100644 --- a/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java +++ b/src/main/java/com/zcloud/service/mkmj/MkmjAreaService.java @@ -37,6 +37,8 @@ public interface MkmjAreaService { */ public List list(Page page)throws Exception; + public List listForDevice(Page page)throws Exception; + /**列表(全部) * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjDeviceService.java b/src/main/java/com/zcloud/service/mkmj/MkmjDeviceService.java index c9b74c00..42e02f87 100644 --- a/src/main/java/com/zcloud/service/mkmj/MkmjDeviceService.java +++ b/src/main/java/com/zcloud/service/mkmj/MkmjDeviceService.java @@ -43,6 +43,8 @@ public interface MkmjDeviceService { */ public List listAll(PageData pd)throws Exception; + public List listAllForArea(PageData pd)throws Exception; + /**通过id获取数据 * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java b/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java new file mode 100644 index 00000000..e3642232 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java @@ -0,0 +1,69 @@ +package com.zcloud.service.mkmj; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:门口门禁区域闸机 + * 作者:zhaoyu + * 时间:2024-01-16 + * 官网:www.zcloudchina.com + */ +public interface MkmjRelationService { + + /**新增 + * @param pd + * @throws Exception + */ + public Object save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public Object delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public Object 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; + + public List listAllForArea(PageData pd)throws Exception; + + public List getCarAndPeopleInfolistPage(Page page)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public Object deleteAll(String[] ArrayDATA_IDS)throws Exception; + + /** + * 定位 + * @param pd + * @return + */ + Object savePosition(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java index 605b4226..9632e9c3 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java @@ -103,6 +103,14 @@ public class MkmjAreaServiceImpl implements MkmjAreaService { return mkmjAreaMapper.datalistPage(page); } + /**列表 + * @param page + * @throws Exception + */ + public List listForDevice(Page page)throws Exception{ + return mkmjAreaMapper.batchDevicelistPage(page); + } + /**列表(全部) * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjDeviceServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjDeviceServiceImpl.java index b9a2c08d..5856a5f1 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjDeviceServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjDeviceServiceImpl.java @@ -99,6 +99,14 @@ public class MkmjDeviceServiceImpl implements MkmjDeviceService { return mkmjDeviceMapper.listAll(pd); } + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAllForArea(PageData pd)throws Exception{ + return mkmjDeviceMapper.listAllForArea(pd); + } + /**通过id获取数据 * @param pd * @throws Exception diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java new file mode 100644 index 00000000..f501d110 --- /dev/null +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java @@ -0,0 +1,134 @@ +package com.zcloud.service.mkmj.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.mkmj.MkmjRelationMapper; +import com.zcloud.service.mkmj.MkmjRelationService; +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.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 说明:门口门禁区域闸机 + * 作者:zhaoyu + * 时间:2024-01-16 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class MkmjRelationServiceImpl implements MkmjRelationService { + + @Autowired + private MkmjRelationMapper mkmjRelationMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public Object save(PageData pd)throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + pd.put("RELATION_ID", UuidUtil.get32UUID()); + mkmjRelationMapper.save(pd); + map.put("result", errInfo); + map.put("msg", "保存成功"); + return map; + } + + /**删除 + * @param pd + * @throws Exception + */ + public Object delete(PageData pd)throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + mkmjRelationMapper.delete(pd); + map.put("result", errInfo); + map.put("msg", "删除成功"); + return map; + } + + /**修改 + * @param pd + * @throws Exception + */ + public Object edit(PageData pd)throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + mkmjRelationMapper.edit(pd); + map.put("result", errInfo); + map.put("msg", "编辑成功"); + return map; + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return mkmjRelationMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return mkmjRelationMapper.listAll(pd); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAllForArea(PageData pd)throws Exception{ + return mkmjRelationMapper.listAllForArea(pd); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List getCarAndPeopleInfolistPage(Page page)throws Exception{ + return mkmjRelationMapper.getCarAndPeopleInfolistPage(page); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return mkmjRelationMapper.findById(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public Object deleteAll(String[] ArrayDATA_IDS)throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + mkmjRelationMapper.deleteAll(ArrayDATA_IDS); + map.put("result", errInfo); + map.put("msg", "删除成功"); + return map; + } + + @Override + public Object savePosition(PageData pd) { + Map map = new HashMap(); + String errInfo = "success"; + mkmjRelationMapper.savePosition(pd); + map.put("result", errInfo); + map.put("msg", "定位成功"); + return map; + } + +} + diff --git a/src/main/resources/mybatis/datasource/alarm/AlarmInfoMapper.xml b/src/main/resources/mybatis/datasource/alarm/AlarmInfoMapper.xml index c4273ec7..f035db91 100644 --- a/src/main/resources/mybatis/datasource/alarm/AlarmInfoMapper.xml +++ b/src/main/resources/mybatis/datasource/alarm/AlarmInfoMapper.xml @@ -123,6 +123,7 @@ f LEFT JOIN bus_anemometer_machine m ON m.FID = f.ANEMOMETER_ID where f.ISDELETE = '0' + ORDER BY f.CREATTIME DESC diff --git a/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml b/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml index eb213543..80fd72de 100644 --- a/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml +++ b/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml @@ -76,6 +76,25 @@ + + + + diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml index 594831d4..b2efa1fb 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjAreaMapper.xml @@ -15,7 +15,7 @@ f.AREA_ID, - f.DOOR_IDS, + f.DEVICE_IDS, f.AREA_NAME, f.CORPINFO_ID, f.CREATOR, @@ -28,7 +28,7 @@ AREA_ID, - DOOR_IDS, + DEVICE_IDS, AREA_NAME, CORPINFO_ID, CREATOR, @@ -41,7 +41,7 @@ #{AREA_ID}, - #{DOOR_IDS}, + #{DEVICE_IDS}, #{AREA_NAME}, #{CORPINFO_ID}, #{CREATOR}, @@ -99,8 +99,8 @@ ,ISDELETE=#{ISDELETE} - - ,DOOR_IDS=#{DOOR_IDS} + + ,DEVICE_IDS=#{DEVICE_IDS} where AREA_ID=#{AREA_ID} @@ -120,10 +120,10 @@ + + + select - + , + d.DEVICE_NAME DOCK_DEVICE_NAME, + d.DOOR_NAME DOCK_DOOR_NAME, + d.PATH_NAME DOCK_PATH_NAME, + r.TYPE from f + LEFT JOIN mkmj_dock_device d ON f.DOCK_DEVICE_ID = d.DOCK_DEVICE_ID + LEFT JOIN mkmj_relation r ON r.DEVICE_ID = f.DEVICE_ID where f.DEVICE_ID=#{DEVICE_ID} + GROUP BY DEVICE_ID @@ -151,6 +158,15 @@ + + + update diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjDoorMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjDoorMapper.xml index 758c5aaa..3463609c 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjDoorMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjDoorMapper.xml @@ -123,14 +123,12 @@ , COUNT(DISTINCT p.PATH_ID) PATHCOUNT, COUNT(DISTINCT v.DOOR_VIDEO_ID) VIDEOCOUNT, - COUNT(DISTINCT d.DEVICE_ID) DEVICECOUNT, - GROUP_CONCAT(a.AREA_NAME SEPARATOR ',') AREANAME + COUNT(DISTINCT d.DEVICE_ID) DEVICECOUNT from f LEFT JOIN mkmj_path p ON p.DOOR_ID = f.DOOR_ID AND p.ISDELETE = '0' LEFT JOIN mkmj_door_video v ON v.DOOR_ID = f.DOOR_ID AND v.ISDELETE = '0' LEFT JOIN mkmj_device d ON d.PATH_ID = p.PATH_ID AND d.ISDELETE = '0' - LEFT JOIN mkmj_area a ON FIND_IN_SET(f.DOOR_ID,a.DOOR_IDS) AND a.ISDELETE = '0' where f.ISDELETE = '0' and diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml new file mode 100644 index 00000000..78a86888 --- /dev/null +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml @@ -0,0 +1,210 @@ + + + + + + + MKMJ_RELATION + + + + + SYS_DICTIONARIES + + + + + f.RELATION_ID, + f.AREA_ID, + f.DEVICE_ID, + f.TYPE, + f.CORPINFO_ID, + f.CREATOR, + f.CREATTIME, + f.OPERATOR, + f.OPERATTIME, + f.ISDELETE + + + + + RELATION_ID, + AREA_ID, + DEVICE_ID, + TYPE, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{RELATION_ID}, + #{AREA_ID}, + #{DEVICE_ID}, + #{TYPE}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + RELATION_ID = #{RELATION_ID} + + + + + update + + set + RELATION_ID = RELATION_ID, + AREA_ID = #{AREA_ID}, + DEVICE_ID = #{DEVICE_ID}, + TYPE = #{TYPE}, + CORPINFO_ID = #{CORPINFO_ID}, + CREATOR = #{CREATOR}, + CREATTIME = #{CREATTIME}, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME}, + ISDELETE = #{ISDELETE} + where + RELATION_ID=#{RELATION_ID} + + + + + + + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + DEVICE_ID in + + #{item} + + +