Commit 8c47b6ec by huangjinxin

fix:指派工程师返回名称

1 parent a64f3bc9
......@@ -4,94 +4,101 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class OrderServiceDetailResp {
private String orderId;
private String appointmentStatus;
private String status;
private String statusDesc;
private String risk;
private String riskDesc;
private String location;
private String orderStatus;
private String serviceStatus;
private OrderDetail reschedulingParams;
private List<KV> items;
private String orderId;
private String appointmentStatus;
private String status;
private String statusDesc;
private String risk;
private String riskDesc;
private String location;
private String orderStatus;
private String serviceStatus;
private OrderDetail reschedulingParams;
private List<KV> items;
/**
* 是否重物搬运(双人上门) 0:否 1:是 默认0
*/
private Integer isMultiple;
/**
* 是否重物搬运(双人上门) 0:否 1:是 默认0
*/
private Integer isMultiple;
/**
* 是否指定某个工程师/是否排除某个工程师 0:否 1:指定 2:排除 默认0
*/
private Integer isAppointEngineer;
/**
* 是否指定某个工程师/是否排除某个工程师 0:否 1:指定 2:排除 默认0
*/
private Integer isAppointEngineer;
/**
* 指定某个工程师/排除某个工程师 codes 多个,分割
*/
private String appointEngineerCodes;
/**
* 指定某个工程师/排除某个工程师 codes 多个,分割
*/
// private String appointEngineerCodes;
/**
* bean优先级,例如:紧急、正常
*/
private String beanPriority;
/**
* 指定某个工程师/排除某个工程师 codes 多个,分割 key code,value 名称
*/
private Map<String, String> appointEngineerCodes;
private String name;
private String phone;
/**
* bean优先级,例如:紧急、正常
*/
private String beanPriority;
private String beanBrand;
private String name;
private String brand;
private String phone;
private String type;
private String beanBrand;
private String skill;
private String brand;
private String faultDescribe;
private String type;
private String expectTimeBegin;
private String skill;
private String expectTimeDesc;
private String faultDescribe;
private String source;
private String expectTimeBegin;
private String tags;
private String expectTimeDesc;
private String createTime;
private String source;
private String applyNote;
private String tags;
/**
* 是否是特殊时间段,0否 1是 默认0
*/
private Integer isSpecialTime;
private String createTime;
private String applyNote;
/**
* 是否是cutoff,0否 1是 默认0
*/
private Integer isCutoff ;
/**
* 是否是特殊时间段,0否 1是 默认0
*/
private Integer isSpecialTime;
/**
* 一家多单id,有则多条订单关联,没有则不是一家多单
*/
private String multipleOrders;
/**
* 是否是cutoff,0否 1是 默认0
*/
private Integer isCutoff;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class OrderDetail{
private String location;
private String address;
private String brand;
private String date;
private String type;
private String skill;
}
/**
* 一家多单id,有则多条订单关联,没有则不是一家多单
*/
private String multipleOrders;
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class OrderDetail {
private String location;
private String address;
private String brand;
private String date;
private String type;
private String skill;
}
}
......@@ -8,6 +8,8 @@ import com.dituhui.pea.order.dto.*;
import com.dituhui.pea.order.entity.*;
import com.dituhui.pea.order.service.OrderServiceDetail;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -70,7 +72,11 @@ public class OrderServiceDetailImpl implements OrderServiceDetail {
res.setIsMultiple(order.getIsMultiple());
res.setIsAppointEngineer(order.getIsAppointEngineer());
res.setAppointEngineerCodes(order.getAppointEngineerCodes());
if (StringUtils.isNotBlank(order.getAppointEngineerCodes())) {
String[] strings = order.getAppointEngineerCodes().split(",");
List<EngineerInfoEntity> engineerCodeIn = engineerInfoDao.findByEngineerCodeIn(Arrays.asList(strings));
res.setAppointEngineerCodes(CollectionUtils.isEmpty(engineerCodeIn) ? null : engineerCodeIn.stream().collect(Collectors.toMap(EngineerInfoEntity::getEngineerCode, EngineerInfoEntity::getName)));
}
res.setBeanPriority(order.getBeanPriority());
res.setName(order.getName());
res.setPhone(order.getPhone());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!