Commit 353554db by Ren Ping

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

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