Commit 5ea68c29 by 丁伟峰

增加了字段类型名称

1 parent 606877d4
...@@ -13,6 +13,7 @@ public class PubParameterRespDTO { ...@@ -13,6 +13,7 @@ public class PubParameterRespDTO {
public static class Enum { public static class Enum {
private List<?> items; private List<?> items;
private String name; private String name;
private String description;
} }
@lombok.Data @lombok.Data
......
...@@ -25,9 +25,9 @@ public class PublicServiceImpl implements PublicService { ...@@ -25,9 +25,9 @@ public class PublicServiceImpl implements PublicService {
List<PubParameterRespDTO.Enum> enums = new ArrayList<>(); List<PubParameterRespDTO.Enum> enums = new ArrayList<>();
HashMap<String, String> mapping = getMapping(); HashMap<String, String> mapping = getMapping();
for (String k : mapping.keySet()) { for (String k : mapping.keySet()) {
List<?> items = pubParamsDao.findByBiztype(mapping.get(k)); List<?> items = pubParamsDao.findByBiztype(k);
if (!items.isEmpty()) { if (!items.isEmpty()) {
PubParameterRespDTO.Enum anEnum = new PubParameterRespDTO.Enum().setName(k); PubParameterRespDTO.Enum anEnum = new PubParameterRespDTO.Enum().setName(k).setDescription(mapping.get(k));
List<PubParameterRespDTO.Item> items2 = new ArrayList<>(); List<PubParameterRespDTO.Item> items2 = new ArrayList<>();
for (Object e : items) { for (Object e : items) {
PubParamsEntity param = (PubParamsEntity) e; PubParamsEntity param = (PubParamsEntity) e;
...@@ -45,14 +45,19 @@ public class PublicServiceImpl implements PublicService { ...@@ -45,14 +45,19 @@ public class PublicServiceImpl implements PublicService {
private HashMap<String, String> getMapping() { private HashMap<String, String> getMapping() {
String[] pairs = { String[] pairs = {
"engineerStatus, EngineerStatus", "EngineerStatus,技术员状态",
"workType, Worktype", "WorkType,工作性质",
"transportation, Transportation", "Transportation,交通工具",
"dispatchWeight,Dispatchweight", "DispatchWeight,派单优先级",
"engineerBase,EngineerBase", "ServiceOrderStatus,工单状态",
"serviceOrderStatus,ServiceOrderStatus", "AssignOrderStatus,指派状态",
"assignOrderStatus,AssignOrderStatus", "ServiceType,服务类型",
"serviceType,ServiceType" "Gender,性别",
"RecommendAssignment,指派推荐",
"AssignStatus,指派状态",
"AssignType,指派类型",
"AppointmentChannel,预约渠道",
"PriorityWeight,工单优先级"
}; };
HashMap<String, String> hashMap = new HashMap<>(); HashMap<String, String> hashMap = new HashMap<>();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!