Browse Source

添加预警表位置location属性信息

tags/v1.2.0^2
chengwang 1 year ago
parent
commit
06aedbcd7d
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java

+ 5
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/QuestionServiceImpl.java View File

import com.tuoheng.admin.service.IQuestionTypeService; import com.tuoheng.admin.service.IQuestionTypeService;
import com.tuoheng.admin.service.warning.IWarningService; import com.tuoheng.admin.service.warning.IWarningService;
import com.tuoheng.admin.service.warning.WarningServiceImpl; import com.tuoheng.admin.service.warning.WarningServiceImpl;
import com.tuoheng.admin.utils.GaodeUtil;
import com.tuoheng.admin.utils.TimeUtil; import com.tuoheng.admin.utils.TimeUtil;
import com.tuoheng.common.common.BaseServiceImpl; import com.tuoheng.common.common.BaseServiceImpl;
import com.tuoheng.common.exception.ServiceException; import com.tuoheng.common.exception.ServiceException;
if (question.getType().equals(QuestionTypeEnum.Q4.getCode()) || question.getType().equals(QuestionTypeEnum.Q3.getCode())) { if (question.getType().equals(QuestionTypeEnum.Q4.getCode()) || question.getType().equals(QuestionTypeEnum.Q3.getCode())) {
warning.setTenantId(question.getTenantId()); warning.setTenantId(question.getTenantId());
warning.setDiscoveryWay(DiscoveryWayEnum.UAV_PATROL.getCode()); warning.setDiscoveryWay(DiscoveryWayEnum.UAV_PATROL.getCode());
warning.setLocation("");
warning.setStatus(WarningStatusEnum.WAIT_CONFIRM.getCode()); warning.setStatus(WarningStatusEnum.WAIT_CONFIRM.getCode());
warning.setQuestionId(question.getId()); warning.setQuestionId(question.getId());
warning.setCreateUser(question.getCreateUser()); warning.setCreateUser(question.getCreateUser());
warning.setCreateTime(question.getCreateTime()); warning.setCreateTime(question.getCreateTime());
warning.setMark(MarkTypeEnum.VALID.getCode()); warning.setMark(MarkTypeEnum.VALID.getCode());
if(StringUtils.isNotEmpty(question.getLng()) && StringUtils.isNotEmpty(question.getLat())){
String gaodeAddress = GaodeUtil.getGaodeAddress(question.getLng(), question.getLat());
warning.setLocation(gaodeAddress);
}
warningList.add(warning); warningList.add(warning);
} }
} }

Loading…
Cancel
Save