Commit 353554db by Ren Ping

fix:工程师变更接口保存工作地址坐标

1 parent 8f48db9e
......@@ -66,6 +66,18 @@ public class EngineerInfoEntity {
private String workAddress;
/**
* 工作地址经度
*/
@Column(name = "work_x")
private String workX;
/**
* 工作地址纬度
*/
@Column(name = "work_y")
private String workY;
/**
* 类型(1全职 2兼职)
*/
private Integer kind;
......
......@@ -11,6 +11,7 @@ import com.dituhui.pea.order.entity.BeanMqMessageEntity;
import com.dituhui.pea.order.entity.EngineerBusinessEntity;
import com.dituhui.pea.order.entity.EngineerInfoEntity;
import com.dituhui.pea.order.service.impl.BeanRemoteServiceImpl;
import com.dituhui.pea.order.utils.AssertUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
......@@ -57,7 +58,6 @@ public class BeanKafkaConsumer {
OrganizationTreeDTO.Request request = branchInfo.get();
} finally {
//手动提交
ack.acknowledge();
......@@ -108,6 +108,8 @@ public class BeanKafkaConsumer {
}
try {
EngineerParamDTO.Request request = nodeEngineerInfo.get();
AssertUtil.isNotEmpty(request.getGroupId(), "网点/分站编码不能为空");
AssertUtil.isNotEmpty(request.getEgineers(), "工程师列表不能为空");
//网点ID
final String targetGroupId = request.getGroupId();
//fixme 是否需要校验网点id是否存在存疑
......@@ -199,9 +201,13 @@ public class BeanKafkaConsumer {
if (Objects.nonNull(location)) {
engineerInfo.setAddress(location.getAddress());
engineerInfo.setWorkAddress(location.getAddress());
engineerInfo.setWorkX(Objects.isNull(location.getLongitude()) ? "" : String.valueOf(location.getLongitude()));
engineerInfo.setWorkY(Objects.isNull(location.getLatitude()) ? "" : String.valueOf(location.getLatitude()));
} else {
engineerInfo.setWorkAddress("");
engineerInfo.setAddress("");
engineerInfo.setWorkAddress("");
engineerInfo.setWorkX("");
engineerInfo.setWorkY("");
}
engineerInfo.setCreateTime(LocalDateTime.now());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!