diff --git a/src/main/java/com/example/modular/digitalcockpit/service/impl/DigitalCockpitServiceImpl.java b/src/main/java/com/example/modular/digitalcockpit/service/impl/DigitalCockpitServiceImpl.java index a156673..0118268 100644 --- a/src/main/java/com/example/modular/digitalcockpit/service/impl/DigitalCockpitServiceImpl.java +++ b/src/main/java/com/example/modular/digitalcockpit/service/impl/DigitalCockpitServiceImpl.java @@ -143,6 +143,8 @@ public class DigitalCockpitServiceImpl implements DigitalCockpitService { vo.setToiletlevel(toilet.getToiletLevel()); vo.setxCoordinates(toilet.getxCoordinates()); vo.setyCoordinates(toilet.getyCoordinates()); + vo.setTianMapXCoordinates(toilet.getTianMapXCoordinates()); + vo.setTianMapYCoordinates(toilet.getTianMapYCoordinates()); vo.setToiletLevelSpecial(toilet.getToiletLevelSpecial()); vo.setToiletLevelSpecialStr(Constant.TOILET_LEVEL_SPECIAL_MAP.get(toilet.getToiletLevelSpecial())); vo.setToiletLevelStr(Constant.TOILET_LEVEL_MAP.get(toilet.getToiletLevel())); diff --git a/src/main/java/com/example/modular/digitalcockpit/vo/DigitalCockpitServiceMapVO.java b/src/main/java/com/example/modular/digitalcockpit/vo/DigitalCockpitServiceMapVO.java index 046b545..2ffdfd3 100644 --- a/src/main/java/com/example/modular/digitalcockpit/vo/DigitalCockpitServiceMapVO.java +++ b/src/main/java/com/example/modular/digitalcockpit/vo/DigitalCockpitServiceMapVO.java @@ -1,7 +1,11 @@ package com.example.modular.digitalcockpit.vo; +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; + import java.io.Serializable; +@Data public class DigitalCockpitServiceMapVO implements Serializable { public DigitalCockpitServiceMapVO () { @@ -64,6 +68,15 @@ public class DigitalCockpitServiceMapVO implements Serializable { */ private String yCoordinates; + /** + * 天地图横向坐标-纬度 + */ + private String tianMapXCoordinates; + /** + * 天地图纵向坐标-经度 + */ + private String tianMapYCoordinates; + public String getToiletLevelSpecialStr() { return toiletLevelSpecialStr; } diff --git a/src/main/java/com/example/modular/picturemanage/service/impl/ITransformPictureManageServiceImpl.java b/src/main/java/com/example/modular/picturemanage/service/impl/ITransformPictureManageServiceImpl.java index 6b1439d..c0dc2e6 100644 --- a/src/main/java/com/example/modular/picturemanage/service/impl/ITransformPictureManageServiceImpl.java +++ b/src/main/java/com/example/modular/picturemanage/service/impl/ITransformPictureManageServiceImpl.java @@ -14,6 +14,7 @@ import com.example.modular.transform.service.IToiletTransformMonthDetailInfoServ import com.example.modular.transform.service.IToiletTransformMonthInfoService; import com.example.modular.transform.service.IToiletTransformScheduleInfoService; import com.example.modular.transform.vo.ToiletTransformMonthDetailInfoVO; +import com.example.util.MapCoordinatesTransformUtil; import com.example.util.Result; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -97,6 +98,15 @@ public class ITransformPictureManageServiceImpl implements ITransformPictureMana List voList = new ArrayList<>(toiletTransformMonthDetailInfoList.size()); for (ToiletTransformMonthDetailInfo po : toiletTransformMonthDetailInfoList) { TransformPictureManageVO vo = new TransformPictureManageVO(); + if (StringUtils.isNotBlank(po.getxCoordinates()) && StringUtils.isNotBlank(po.getyCoordinates())) { + try { + double[] ds = MapCoordinatesTransformUtil.gcj02ToWgs(Double.parseDouble(po.getyCoordinates()),Double.parseDouble(po.getxCoordinates())); + vo.setTianMapXCoordinates(String.valueOf(ds[1])); + vo.setTianMapYCoordinates(String.valueOf(ds[0])); + } catch (Exception e) { + logger.error("【获取一图管理改造提升数据接口】高德地图转换天地图错误:{}",e.toString()); + } + } vo.setToiletName(po.getToiletName()); vo.setxCoordinates(po.getxCoordinates()); vo.setyCoordinates(po.getyCoordinates()); diff --git a/src/main/java/com/example/modular/picturemanage/vo/TransformPictureManageVO.java b/src/main/java/com/example/modular/picturemanage/vo/TransformPictureManageVO.java index 8326103..a100f66 100644 --- a/src/main/java/com/example/modular/picturemanage/vo/TransformPictureManageVO.java +++ b/src/main/java/com/example/modular/picturemanage/vo/TransformPictureManageVO.java @@ -1,7 +1,10 @@ package com.example.modular.picturemanage.vo; +import lombok.Data; + import java.io.Serializable; +@Data public class TransformPictureManageVO implements Serializable { public TransformPictureManageVO () { @@ -29,6 +32,14 @@ public class TransformPictureManageVO implements Serializable { */ private String yCoordinates; /** + * 天地图横向坐标-纬度 + */ + private String tianMapXCoordinates; + /** + * 天地图纵向坐标-经度 + */ + private String tianMapYCoordinates; + /** * 月份 */ private String month; diff --git a/src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java b/src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java index 7a813e2..71f50dc 100644 --- a/src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java +++ b/src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java @@ -103,10 +103,12 @@ public class ShangyuToiletDataController extends BaseSupport { for (Map.Entry tt : infoIds) { stringBuilder.append(tt.getValue()); } - String appKey = "fbgdfghfghmjgjergtergergdfgd"; + String appKey = "a94c2ac7d4df93c58db3b69aef359535"; stringBuilder.append(appKey); String sign = MD5Sign.md5(stringBuilder.toString()); map.put("sign",sign); + String s = JSON.toJSONString(map); + System.out.println(s); String url = "http://114.55.211.170:8006/shaoxing-plat/gateway"; String result = HttpRequestUtils.sendPost(url,JSON.toJSONString(map)); } diff --git a/src/main/java/com/example/modular/shangyudata/service/impl/ShangyuToiletDataServiceImpl.java b/src/main/java/com/example/modular/shangyudata/service/impl/ShangyuToiletDataServiceImpl.java index 7c911fb..fed1bbb 100644 --- a/src/main/java/com/example/modular/shangyudata/service/impl/ShangyuToiletDataServiceImpl.java +++ b/src/main/java/com/example/modular/shangyudata/service/impl/ShangyuToiletDataServiceImpl.java @@ -301,6 +301,9 @@ public class ShangyuToiletDataServiceImpl implements ShangyuToiletDataService { || StringUtils.isBlank(toiletPassengerFlowVO.getCreateTime())) { return R.error(201,"参数缺失!"); } + if (toiletPassengerFlowVO.getPassengerNumHour() < 0 || toiletPassengerFlowVO.getPassengerNumToday() < 0) { + return R.error(203,"人流量数据不能为负数!"); + } //根据公厕编码查询公厕信息 QueryWrapper toiletQueryWrapper = new QueryWrapper<>(); toiletQueryWrapper.eq("toilet_code",toiletPassengerFlowVO.getToiletCode()); diff --git a/src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java b/src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java index 19fa820..f14703c 100644 --- a/src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java +++ b/src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java @@ -102,7 +102,7 @@ public class ToiletDataListener extends AnalysisEventListener { List toiletList = toiletService.list(toiletQueryWrapper); List toiletIdList = new ArrayList<>(toiletList.size()); for (Toilet toilet : toiletList) { - toiletStreetNameToIdMap.put(toilet.getStreet() + "_" + toilet.getToiletName(),toilet); + toiletStreetNameToIdMap.put(toilet.getToiletName(),toilet); toiletIdList.add(toilet.getId()); } QueryWrapper toiletDetailQueryWrapper = new QueryWrapper<>(); @@ -214,6 +214,7 @@ public class ToiletDataListener extends AnalysisEventListener { toiletDetail.setCreateTime(new Date()); toiletDetail.setUpdateTime(new Date()); toiletDetail.setUpdateId(userId); + toiletDetail.setOwnerShip(data.getOwnerShip()); if (StringUtils.isNotBlank(data.getCleaningFormStr())) { toiletDetail.setCleaningForm(rule.getMapKeyByValue(Constant.TOILET_CLEANING_FORM_MAP,data.getCleaningFormStr())); } diff --git a/src/main/java/com/example/modular/toilet/excel/rule/ToiletImportRule.java b/src/main/java/com/example/modular/toilet/excel/rule/ToiletImportRule.java index abb082e..8d5f367 100644 --- a/src/main/java/com/example/modular/toilet/excel/rule/ToiletImportRule.java +++ b/src/main/java/com/example/modular/toilet/excel/rule/ToiletImportRule.java @@ -58,8 +58,8 @@ public class ToiletImportRule { //校验公厕信息是否重复,如果出现重复则更新(根据街道id和公厕名称进行唯一校验) Long streetId = regionNameToIdMap.get(toiletData.getStreetName()).getId(); String toiletName = toiletData.getToiletName(); - if (toiletStreetNameToIdMap.containsKey(streetId + "_" + toiletName)) { - Toilet toilet = toiletStreetNameToIdMap.get(streetId + "_" + toiletName); + if (toiletStreetNameToIdMap.containsKey(toiletName)) { + Toilet toilet = toiletStreetNameToIdMap.get(toiletName); toilet.setManager(toiletData.getManager()); toilet.setManagerContactPhone(toiletData.getManagerContactPhone()); toilet.setManagerCensusRegister(toiletData.getManagerCensusRegister()); @@ -139,6 +139,7 @@ public class ToiletImportRule { toiletDetail.setEquityUnit(toiletData.getEquityUnit()); toiletDetail.setUpdateTime(new Date()); toiletDetail.setUpdateId(userId); + toiletDetail.setOwnerShip(toiletData.getOwnerShip()); if (StringUtils.isNotBlank(toiletData.getCleaningFormStr())) { toiletDetail.setCleaningForm(getMapKeyByValue(Constant.TOILET_CLEANING_FORM_MAP,toiletData.getCleaningFormStr())); } diff --git a/src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml b/src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml index 7428ca0..c1a0999 100644 --- a/src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml +++ b/src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml @@ -25,6 +25,10 @@ + + + + @@ -57,7 +61,7 @@ id,toilet_uuid, toilet_name, toilet_code,province_toilet_code, manager, manager_contact_phone,manager_id_card ,manager_gender,manager_census_register,manager_age,province, street, area, city,government_community_name,government_community_id, - toilet_level,toilet_level_special, x_coordinates, y_coordinates, status, + toilet_level,toilet_level_special, x_coordinates, y_coordinates,tian_map_x_coordinates,tian_map_y_coordinates, status, third_bathroom,third_bathroom_seat_num,third_bathroom_pissoir_num, mon_child_room,mon_child_room_area, video,toilet_paper,hot_water,hand_drier,delete_status, create_time, create_id, update_time, update_id,toilet_type,other_type,costs,covered_area, floor_area,toilet_management,wash_form,guide_sign,charge,plan_approval