Commit 6c6fb581 by 丁伟峰

Merge branch 'feat-dingwf-mvp616' into develop

2 parents e20033ee 9ae60499
...@@ -5,7 +5,7 @@ import lombok.experimental.Accessors; ...@@ -5,7 +5,7 @@ import lombok.experimental.Accessors;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class KeyValueDTO { public class LabelValueDTO {
private String value; private String value;
private String label; private String label;
} }
...@@ -8,6 +8,6 @@ import java.util.List; ...@@ -8,6 +8,6 @@ import java.util.List;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class ParameterRespDTO { public class ParameterRespDTO {
private List<KeyValueDTO> priorities; private List<LabelValueDTO> priorities;
private List<KeyValueDTO> standardTags; private List<LabelValueDTO> standardTags;
} }
...@@ -78,11 +78,4 @@ public class WorkbenchEngineersGanttRespDTO { ...@@ -78,11 +78,4 @@ public class WorkbenchEngineersGanttRespDTO {
*/ */
private List<?> tips; private List<?> tips;
} }
@lombok.Data
@Accessors(chain = true)
public static class Tip {
private String desc;
private String title;
}
} }
...@@ -21,7 +21,7 @@ import com.alibaba.cloud.integration.order.dao.OrderRequestDao; ...@@ -21,7 +21,7 @@ import com.alibaba.cloud.integration.order.dao.OrderRequestDao;
import com.alibaba.cloud.integration.order.dao.OrderTagStrategyDao; import com.alibaba.cloud.integration.order.dao.OrderTagStrategyDao;
import com.alibaba.cloud.integration.order.dao.OrgTeamDao; import com.alibaba.cloud.integration.order.dao.OrgTeamDao;
import com.alibaba.cloud.integration.order.dao.ProductCategoryDao; import com.alibaba.cloud.integration.order.dao.ProductCategoryDao;
import com.alibaba.cloud.integration.order.dto.KeyValueDTO; import com.alibaba.cloud.integration.order.dto.LabelValueDTO;
import com.alibaba.cloud.integration.order.dto.LocationDTO; import com.alibaba.cloud.integration.order.dto.LocationDTO;
import com.alibaba.cloud.integration.order.dto.OrderCreateReqDTO; import com.alibaba.cloud.integration.order.dto.OrderCreateReqDTO;
import com.alibaba.cloud.integration.order.dto.ParameterRespDTO; import com.alibaba.cloud.integration.order.dto.ParameterRespDTO;
...@@ -59,20 +59,20 @@ public class OrderCreateServiceImpl implements OrderCreateService { ...@@ -59,20 +59,20 @@ public class OrderCreateServiceImpl implements OrderCreateService {
@Autowired @Autowired
private CommonService commonService; private CommonService commonService;
private List<KeyValueDTO> getPriorities() { private List<LabelValueDTO> getPriorities() {
String[] priorities = {"紧急", "正常"}; String[] priorities = {"紧急", "正常"};
List<KeyValueDTO> listPriorities = new ArrayList<>(); List<LabelValueDTO> listPriorities = new ArrayList<>();
for (String s : priorities) { for (String s : priorities) {
listPriorities.add(new KeyValueDTO().setLabel(s).setValue(s)); listPriorities.add(new LabelValueDTO().setLabel(s).setValue(s));
} }
return listPriorities; return listPriorities;
} }
private List<KeyValueDTO> getStandardTags() { private List<LabelValueDTO> getStandardTags() {
String[] tags = {"远距离", "多人上门"}; String[] tags = {"远距离", "多人上门"};
List<KeyValueDTO> tagList = new ArrayList<>(); List<LabelValueDTO> tagList = new ArrayList<>();
for (String s : tags) { for (String s : tags) {
tagList.add(new KeyValueDTO().setLabel(s).setValue(s)); tagList.add(new LabelValueDTO().setLabel(s).setValue(s));
} }
return tagList; return tagList;
} }
......
...@@ -2,10 +2,7 @@ package com.alibaba.cloud.integration.order.service.impl; ...@@ -2,10 +2,7 @@ package com.alibaba.cloud.integration.order.service.impl;
import com.alibaba.cloud.integration.common.Result; import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.dao.*; import com.alibaba.cloud.integration.order.dao.*;
import com.alibaba.cloud.integration.order.dto.WorkbenchEngineersGanttReqDTO; import com.alibaba.cloud.integration.order.dto.*;
import com.alibaba.cloud.integration.order.dto.WorkbenchEngineersGanttRespDTO;
import com.alibaba.cloud.integration.order.dto.WorkbenchOrderChangeListReqDTO;
import com.alibaba.cloud.integration.order.dto.WorkbenchOrderChangeListRespDTO;
import com.alibaba.cloud.integration.order.entity.*; import com.alibaba.cloud.integration.order.entity.*;
import com.alibaba.cloud.integration.order.service.WorkbenchService; import com.alibaba.cloud.integration.order.service.WorkbenchService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -125,13 +122,13 @@ public class WorkbenchServiceImpl implements WorkbenchService { ...@@ -125,13 +122,13 @@ public class WorkbenchServiceImpl implements WorkbenchService {
private List<?> getOrderTips(String orderId) { private List<?> getOrderTips(String orderId) {
log.info("==> getOrdertips: orderId[{}]", orderId); log.info("==> getOrdertips: orderId[{}]", orderId);
OrderRequestEntity order = orderRequestDao.getByOrderId(orderId); OrderRequestEntity order = orderRequestDao.getByOrderId(orderId);
List<WorkbenchEngineersGanttRespDTO.Tip> tips = new ArrayList<>(); List<LabelValueDTO> tips = new ArrayList<>();
tips.add(new WorkbenchEngineersGanttRespDTO.Tip().setTitle("类型/品牌").setDesc(String.format("%s %s", order.getBrand(), order.getType()))); tips.add(new LabelValueDTO().setLabel("类型/品牌").setValue(String.format("%s %s", order.getBrand(), order.getType())));
tips.add(new WorkbenchEngineersGanttRespDTO.Tip().setTitle("电话/地址").setDesc(String.format("%s %s\n %s", order.getName(), order.getPhone(), order.getAddress()))); tips.add(new LabelValueDTO().setLabel("电话/地址").setValue(String.format("%s %s\n %s", order.getName(), order.getPhone(), order.getAddress())));
if (!order.getApplyNote().isBlank()) { if (!order.getApplyNote().isBlank()) {
tips.add(new WorkbenchEngineersGanttRespDTO.Tip().setTitle("备注").setDesc(order.getApplyNote())); tips.add(new LabelValueDTO().setLabel("备注").setValue(order.getApplyNote()));
} }
tips.add(new WorkbenchEngineersGanttRespDTO.Tip().setTitle("标签").setDesc(order.getTags())); tips.add(new LabelValueDTO().setLabel("标签").setValue(order.getTags()));
return tips; return tips;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!