Browse Source

修改公厕地图天地图坐标

master
yingsl 3 years ago
parent
commit
a788287216
  1. 2
      src/main/java/com/example/modular/digitalcockpit/service/impl/DigitalCockpitServiceImpl.java
  2. 13
      src/main/java/com/example/modular/digitalcockpit/vo/DigitalCockpitServiceMapVO.java
  3. 10
      src/main/java/com/example/modular/picturemanage/service/impl/ITransformPictureManageServiceImpl.java
  4. 11
      src/main/java/com/example/modular/picturemanage/vo/TransformPictureManageVO.java
  5. 4
      src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java
  6. 3
      src/main/java/com/example/modular/shangyudata/service/impl/ShangyuToiletDataServiceImpl.java
  7. 3
      src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java
  8. 5
      src/main/java/com/example/modular/toilet/excel/rule/ToiletImportRule.java
  9. 6
      src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml

2
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()));

13
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;
}

10
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<TransformPictureManageVO> 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());

11
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;

4
src/main/java/com/example/modular/shangyudata/controller/ShangyuToiletDataController.java

@ -103,10 +103,12 @@ public class ShangyuToiletDataController extends BaseSupport {
for (Map.Entry<String, Object> 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));
}

3
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<Toilet> toiletQueryWrapper = new QueryWrapper<>();
toiletQueryWrapper.eq("toilet_code",toiletPassengerFlowVO.getToiletCode());

3
src/main/java/com/example/modular/toilet/excel/listener/ToiletDataListener.java

@ -102,7 +102,7 @@ public class ToiletDataListener extends AnalysisEventListener<ToiletData> {
List<Toilet> toiletList = toiletService.list(toiletQueryWrapper);
List<Long> 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<ToiletDetail> toiletDetailQueryWrapper = new QueryWrapper<>();
@ -214,6 +214,7 @@ public class ToiletDataListener extends AnalysisEventListener<ToiletData> {
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()));
}

5
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()));
}

6
src/main/java/com/example/modular/toilet/mapper/mapping/ToiletMapper.xml

@ -25,6 +25,10 @@
<result column="toilet_level_special" property="toiletLevelSpecial" />
<result column="x_coordinates" property="xCoordinates" />
<result column="y_coordinates" property="yCoordinates" />
<result column="tian_map_x_coordinates" property="tianMapXCoordinates" />
<result column="tian_map_y_coordinates" property="tianMapYCoordinates" />
<result column="status" property="status" />
<result column="third_bathroom" property="thirdBathroom" />
<result column="third_bathroom_seat_num" property="thirdBathroomSeatNum" />
@ -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

Loading…
Cancel
Save