From 732098c55f4928303994fa13200ade25dca66d69 Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Mon, 3 Jun 2024 15:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=97=A8=E5=8F=A3=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E5=92=8C=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mkmj/MkmjRelationController.java | 12 +++ .../datasource/mkmj/MkmjRelationMapper.java | 2 + .../service/mkmj/MkmjRelationService.java | 2 + .../mkmj/impl/MkmjRelationServiceImpl.java | 8 ++ .../datasource/mkmj/MkmjRelationMapper.xml | 76 ++++++++++++++++++- 5 files changed, 97 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java b/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java index 2737d35c..25f36574 100644 --- a/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java +++ b/src/main/java/com/zcloud/controller/mkmj/MkmjRelationController.java @@ -173,4 +173,16 @@ public class MkmjRelationController extends BaseController { map.put("result", errInfo); return map; } + + @RequestMapping(value="/getAllCarAndPeopleInfoCountByArea") + @ResponseBody + public Object getAllCarAndPeopleInfoCountByArea() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = this.getPageData(); + List varList = mkmjRelationService.getAllCarAndPeopleInfoCountByArea(pd); //列出人闸机信息列表 + map.put("varList", varList); + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java index c75e55a7..4a8c58a7 100644 --- a/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/mkmj/MkmjRelationMapper.java @@ -45,6 +45,8 @@ public interface MkmjRelationMapper { List listAllForArea(PageData pd); + List getAllCarAndPeopleInfoCountByArea(PageData pd); + List getCarAndPeopleInfolistPage(Page page); /**通过id获取数据 diff --git a/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java b/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java index e3642232..6a46f86b 100644 --- a/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java +++ b/src/main/java/com/zcloud/service/mkmj/MkmjRelationService.java @@ -45,6 +45,8 @@ public interface MkmjRelationService { public List listAllForArea(PageData pd)throws Exception; + public List getAllCarAndPeopleInfoCountByArea(PageData pd)throws Exception; + public List getCarAndPeopleInfolistPage(Page page)throws Exception; /**通过id获取数据 diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java index f501d110..77bd2a77 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjRelationServiceImpl.java @@ -91,6 +91,14 @@ public class MkmjRelationServiceImpl implements MkmjRelationService { return mkmjRelationMapper.listAllForArea(pd); } + /**列表(全部) + * @param pd + * @throws Exception + */ + public List getAllCarAndPeopleInfoCountByArea(PageData pd)throws Exception{ + return mkmjRelationMapper.getAllCarAndPeopleInfoCountByArea(pd); + } + /**列表(全部) * @param pd * @throws Exception diff --git a/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml b/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml index 78a86888..41dbfbe1 100644 --- a/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml +++ b/src/main/resources/mybatis/datasource/mkmj/MkmjRelationMapper.xml @@ -146,7 +146,8 @@ (CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END) STATUS, DATE_FORMAT(i.eventTime,'%Y-%m-%d %H:%i:%s') TIME, i.readerDevName BAYNAME, - i.devName DOORNAME + i.devName DOORNAME, + 'person' AS TYPE FROM mkmj_area f LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0' @@ -165,13 +166,14 @@ i.personName LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') ) - GROUP BY i.MACHINE_INFO_ID UNION ALL + GROUP BY i.MACHINE_INFO_ID UNION ALL SELECT i.PLATENO NAME, (CASE WHEN r.TYPE = '0' THEN '入口' ELSE '出口' END) STATUS, DATE_FORMAT(i.CROSSTIME,'%Y-%m-%d %H:%i:%s') TIME, ENTRANCENAME BAYNAME, - ROADWAYNAME DOORNAME + ROADWAYNAME DOORNAME, + 'car' AS TYPE FROM mkmj_area f LEFT JOIN mkmj_relation r ON f.AREA_ID = r.AREA_ID AND r.ISDELETE = '0' @@ -195,6 +197,74 @@ ORDER BY DATE_FORMAT(TIME,'%Y-%m-%d %H:%i:%s') DESC + + + update