Commit 6d086172 by 丁伟峰

字段补充

1 parent 87de7441
......@@ -47,9 +47,10 @@ public class OrderRequestEntity {
private String expectTimeEnd;
private String expectTimeDesc;
private String source;
private String priority;
private String areaId;
private String orderPriority;
private String orderTags;
private Integer priority;
private String tags;
private String status;
private String appointmentStatus;
......
......@@ -82,7 +82,7 @@ public class CommonService {
params.add("need_district", "false");
params.add("need_layer", "true");
// params.add("related_point_fields", "");
params.add("area_fields", "名称,唯一编号");
params.add("area_fields", "名称,唯一编号,区块");
log.info("request params ==> {}", params);
// 构建请求实体
......@@ -102,7 +102,7 @@ public class CommonService {
// 获取areaResults[0]的值
for (JsonNode r : responseJson.get("result").get(0).get("areaResults")) {
// 分单接口暂时无图层返回
results.add(new LayerAndArea().setAreaId(r.get("field2").asText()).setAreaName(r.get("field1").asText()));
results.add(new LayerAndArea().setAreaId(r.get("field3").asText()).setAreaName(r.get("field1").asText()));
}
return results;
} catch (Exception e) {
......
......@@ -93,12 +93,14 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
CapacityOrgStatEntity e = (CapacityOrgStatEntity) item;
OrgGroupEntity g = orgGroupDao.getByGroupId(e.getOrgId());
content.setDate(e.getWorkday()).setLayer(e.getLayer()).setGroupName(g.getGroupName())
.setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsedTotal()).setEngineerNum(e.getEngineerCount()).setCreateTime(e.getCreateTime().toString());
.setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsedTotal())
.setEngineerNum(e.getEngineerCount()).setCreateTime(e.getCreateTime().toString());
} else {
CapacityTeamStatEntity e = (CapacityTeamStatEntity) item;
// capacity_team_stat表中的team_id,直接就是字符串
content.setDate(e.getWorkday()).setLayer(e.getLayer()).setTeamName(e.getTeamId())
.setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsed()).setCapAdjust(e.getCapAdjust()).setEngineerNum(e.getEngineerCount()).setCreateTime(e.getCreateTime().toString());
.setCapTotal(e.getCapTotal()).setCapUsed(e.getCapUsed()).setCapAdjust(e.getCapAdjust())
.setEngineerNum(e.getEngineerCount()).setCreateTime(e.getCreateTime().toString());
}
contents.add(content);
}
......
......@@ -60,26 +60,19 @@ public class OrderCreateServiceImpl implements OrderCreateService {
private CommonService commonService;
private List<KeyValueDTO> getPriorities() {
String[] priorities = {"紧急", "正常"};
List<KeyValueDTO> listPriorities = new ArrayList<>();
int prioritiesLevels = 10;
for (int i = 0; i <= prioritiesLevels; i++) {
String label;
if (i == 0) {
label = "最低";
} else if (i == prioritiesLevels) {
label = "最高";
} else {
label = String.format("优先级%d", i);
}
listPriorities.add(new KeyValueDTO().setLabel(label).setValue(String.valueOf(i)));
for (String s : priorities) {
listPriorities.add(new KeyValueDTO().setLabel(s).setValue(s));
}
return listPriorities;
}
private List<KeyValueDTO> getStandardTags() {
String[] tags = {"远距离", "多人上门"};
List<KeyValueDTO> tagList = new ArrayList<>();
for (String tag : orderTagStrategyDao.getAllTags()) {
tagList.add(new KeyValueDTO().setLabel(tag).setValue(tag));
for (String s : tags) {
tagList.add(new KeyValueDTO().setLabel(s).setValue(s));
}
return tagList;
}
......@@ -132,9 +125,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
entity.setOrgGroupId(teamEntity.getGroupId());
entity.setOrgTeamId(teamId);
// 根据orderTags, 解析保存到type、skill等字段
entity.setX(req.getLocation().getLng().toString());
entity.setY(req.getLocation().getLat().toString());
entity.setOrderTags(String.join(",", req.getOrderTags()));
entity.setOrderPriority(req.getPriority());
// todo 服务单状态、预约状态等
entity.setStatus("OPEN");
entity.setAppointmentStatus("NOT_ASSIGNED");
......
......@@ -56,6 +56,8 @@ public class PublicServiceImpl implements PublicService {
"RecommendAssignment,指派推荐",
"AssignStatus,指派状态",
"AssignType,指派类型",
"AppointmentMethod,指派方式",
"AppointmentStatus,预约单状态",
"AppointmentChannel,预约渠道",
"PriorityWeight,工单优先级"
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!