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