diff --git a/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java b/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java index 1497587e..b05d2f77 100644 --- a/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java +++ b/src/main/java/com/zcloud/controller/anemometer/AnemometerController.java @@ -11,6 +11,7 @@ import com.zcloud.service.gatemachine.GateAreaService; import com.zcloud.util.DateUtil; import com.zcloud.util.ReturnMap; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @@ -147,4 +148,17 @@ public class AnemometerController extends BaseController { returnMap.put("varList",dataList); return returnMap; } + + + @RequestMapping(value = "/listInfoPage") + @ResponseBody + public ReturnMap listInfoPage(Page page) { + ReturnMap returnMap = new ReturnMap(); + PageData pageData = this.getPageData(); + page.setPd(pageData); + List data = anemometerLocalService.getInfolistpage(page); + returnMap.put("varList", data); + returnMap.put("page", page); + return returnMap; + } } diff --git a/src/main/java/com/zcloud/controller/map/MapController.java b/src/main/java/com/zcloud/controller/map/MapController.java index 6f7d7e38..dfea6a2b 100644 --- a/src/main/java/com/zcloud/controller/map/MapController.java +++ b/src/main/java/com/zcloud/controller/map/MapController.java @@ -516,6 +516,17 @@ public class MapController extends BaseController { varList = usersService.findEightsByUserId(pd); map.put("info",byCardNo); map.put("varList", varList); + }else { + String result = HttpUtil.get("https://60.2.110.85:7812/mapi/v1/queryWorkCardLocation?deviceNo="+pd.getString("cardNo")); + Map resultMap = (Map) JSON.parse(result); + String data = resultMap.get("data").toString(); + List dataList = JSONArray.parseArray(data,PageData.class); + PageData pageData = new PageData(); + pageData.put("id",dataList.get(0).getString("devidno")); + pageData.put("DEPARTMENT_NAME",dataList.get(0).getString("deptId")); + pageData.put("NAME",dataList.get(0).getString("fullName")); + pageData.put("POST_NAME",dataList.get(0).getString("workType")); + map.put("info",pageData); } 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 4c811256..b68d8cb9 100644 --- a/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/anemometer/AnemometerLocalMapper.java @@ -1,5 +1,6 @@ package com.zcloud.mapper.datasource.anemometer; +import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import java.util.List; @@ -43,4 +44,6 @@ public interface AnemometerLocalMapper { void BatchinsertInfo(List listPd); + List getInfolistPage(Page page); + } diff --git a/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java b/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java index b8d256bb..7fd6e4d7 100644 --- a/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java +++ b/src/main/java/com/zcloud/service/announcement/AnemometerLocalService.java @@ -1,5 +1,6 @@ package com.zcloud.service.announcement; +import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import java.util.List; @@ -41,4 +42,6 @@ public interface AnemometerLocalService { * @throws Exception */ public void BatchinsertInfo(List listPd); + + public List getInfolistpage(Page page); } 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 2e6ab7f0..0c6d72e3 100644 --- a/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java +++ b/src/main/java/com/zcloud/service/announcement/impl/AnemometerLocalServiceImpl.java @@ -1,5 +1,6 @@ package com.zcloud.service.announcement.impl; +import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper; import com.zcloud.service.announcement.AnemometerLocalService; @@ -50,4 +51,9 @@ public class AnemometerLocalServiceImpl implements AnemometerLocalService { public void BatchinsertInfo(List listPd) { anemometerLocalMapper.BatchinsertInfo(listPd); } + + @Override + public List getInfolistpage(Page page) { + return anemometerLocalMapper.getInfolistPage(page); + } } diff --git a/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml b/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml index 80fd72de..347e2cbb 100644 --- a/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml +++ b/src/main/resources/mybatis/datasource/anemometer/AnemometerLocalMapper.xml @@ -104,6 +104,19 @@ where f.FNAME = #{FNAME} + + +