Merge remote-tracking branch 'origin/0205cmt' into 0205cmt

0927cmt
songwenxuan 2024-06-11 18:04:10 +08:00
commit 5c48a7f55b
6 changed files with 50 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import com.zcloud.service.gatemachine.GateAreaService;
import com.zcloud.util.DateUtil; import com.zcloud.util.DateUtil;
import com.zcloud.util.ReturnMap; import com.zcloud.util.ReturnMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -147,4 +148,17 @@ public class AnemometerController extends BaseController {
returnMap.put("varList",dataList); returnMap.put("varList",dataList);
return returnMap; return returnMap;
} }
@RequestMapping(value = "/listInfoPage")
@ResponseBody
public ReturnMap listInfoPage(Page page) {
ReturnMap returnMap = new ReturnMap();
PageData pageData = this.getPageData();
page.setPd(pageData);
List<PageData> data = anemometerLocalService.getInfolistpage(page);
returnMap.put("varList", data);
returnMap.put("page", page);
return returnMap;
}
} }

View File

@ -516,6 +516,17 @@ public class MapController extends BaseController {
varList = usersService.findEightsByUserId(pd); varList = usersService.findEightsByUserId(pd);
map.put("info",byCardNo); map.put("info",byCardNo);
map.put("varList", varList); map.put("varList", varList);
}else {
String result = HttpUtil.get("https://60.2.110.85:7812/mapi/v1/queryWorkCardLocation?deviceNo="+pd.getString("cardNo"));
Map<String,Object> resultMap = (Map<String, Object>) JSON.parse(result);
String data = resultMap.get("data").toString();
List<PageData> 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); map.put("result", errInfo);
return map; return map;

View File

@ -1,5 +1,6 @@
package com.zcloud.mapper.datasource.anemometer; package com.zcloud.mapper.datasource.anemometer;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import java.util.List; import java.util.List;
@ -43,4 +44,6 @@ public interface AnemometerLocalMapper {
void BatchinsertInfo(List<PageData> listPd); void BatchinsertInfo(List<PageData> listPd);
List<PageData> getInfolistPage(Page page);
} }

View File

@ -1,5 +1,6 @@
package com.zcloud.service.announcement; package com.zcloud.service.announcement;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import java.util.List; import java.util.List;
@ -41,4 +42,6 @@ public interface AnemometerLocalService {
* @throws Exception * @throws Exception
*/ */
public void BatchinsertInfo(List<PageData> listPd); public void BatchinsertInfo(List<PageData> listPd);
public List<PageData> getInfolistpage(Page page);
} }

View File

@ -1,5 +1,6 @@
package com.zcloud.service.announcement.impl; package com.zcloud.service.announcement.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper; import com.zcloud.mapper.datasource.anemometer.AnemometerLocalMapper;
import com.zcloud.service.announcement.AnemometerLocalService; import com.zcloud.service.announcement.AnemometerLocalService;
@ -50,4 +51,9 @@ public class AnemometerLocalServiceImpl implements AnemometerLocalService {
public void BatchinsertInfo(List<PageData> listPd) { public void BatchinsertInfo(List<PageData> listPd) {
anemometerLocalMapper.BatchinsertInfo(listPd); anemometerLocalMapper.BatchinsertInfo(listPd);
} }
@Override
public List<PageData> getInfolistpage(Page page) {
return anemometerLocalMapper.getInfolistPage(page);
}
} }

View File

@ -104,6 +104,19 @@
where where
f.FNAME = #{FNAME} f.FNAME = #{FNAME}
</select> </select>
<select id="getInfolistPage" parameterType="page" resultType="pd">
SELECT
r.*
FROM
bus_anemometer_machine f
LEFT JOIN bus_anemometer_local r ON f.FNAME = r.FNAME
WHERE
f.FNAME = #{pd.FNAME}
ORDER BY
r.FTIME DESC
</select>
</mapper> </mapper>