Commit ba5330cb by wangli

接口新增返回值

1 parent 6b25950e
......@@ -398,28 +398,25 @@ public class EngineerServiceImpl implements EngineerService {
List<EngineerBusinessListResp.EngineerBusiness> items = new ArrayList<>();
for (EngineerInfo e : engineers) {
EngineerBusinessListResp.EngineerBusiness item = new EngineerBusinessListResp.EngineerBusiness();
EngineerBusiness b = buss.getOrDefault(e.getEngineerCode(), null);
if(b == null){
// 若没有配置,则不返回, 由同步程序初始化
continue;
}
item.setEngineerCode(e.getEngineerCode());
item.setGroupName(groupNames.getOrDefault(e.getGroupId(), ""));
item.setEngineerName(e.getName());
item.setKind((e.getKind() == 1) ? "fullJob" : "partJob");
item.setAddress(b.getAddress());
item.setLocation(String.format("%s,%s", b.getX(), b.getY()));
item.setWorkOn(b.getWorkOn());
item.setWorkOff(b.getWorkOff());
item.setTransportMode(b.getTransportMode());
item.setDeparture(b.getDeparture());
item.setMaxMinute(b.getMaxMinute());
item.setMaxNum(b.getMaxNum());
item.setPriority(b.getPriority());
EngineerBusiness b = buss.getOrDefault(e.getEngineerCode(), null);
if (b == null) {
item.setAddress("");
item.setLocation("");
item.setDeparture(1);
item.setMaxMinute(0);
item.setMaxNum(0);
item.setPriority(1);
} else {
item.setAddress(b.getAddress());
item.setLocation(String.format("%s,%s", b.getX(), b.getY()));
item.setDeparture(b.getDeparture());
item.setMaxMinute(b.getMaxMinute());
item.setMaxNum(b.getMaxNum());
item.setPriority(b.getPriority());
}
items.add(item);
}
return items;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!