Commit 7c7a9683 by wangli

修改接口&筛选逻辑实现

1 parent 10c7a99f
...@@ -20,8 +20,8 @@ public class DispatchOrderListReq { ...@@ -20,8 +20,8 @@ public class DispatchOrderListReq {
private List<String> teamIds; private List<String> teamIds;
private List<String> engineerCodes; private List<String> engineerCodes;
private List<Integer> priorities; private List<Integer> priorities;
private List<String> productCategory; private List<String> typeCategory;
private List<String> serviceCategory; private List<String> skillCategory;
private String phone; private String phone;
private String orderId; private String orderId;
private List<String> appointmentStatus; private List<String> appointmentStatus;
......
...@@ -287,13 +287,23 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -287,13 +287,23 @@ public class DispatchServiceImpl implements DispatchService {
lqw.in(ListUtils.isNotEmpty(reqDTO.getGroupIds()), OrderRequest::getOrgGroupId, reqDTO.getGroupIds()); lqw.in(ListUtils.isNotEmpty(reqDTO.getGroupIds()), OrderRequest::getOrgGroupId, reqDTO.getGroupIds());
lqw.in(ListUtils.isNotEmpty(reqDTO.getTeamIds()), OrderRequest::getOrgTeamId, reqDTO.getTeamIds()); lqw.in(ListUtils.isNotEmpty(reqDTO.getTeamIds()), OrderRequest::getOrgTeamId, reqDTO.getTeamIds());
lqw.in(ListUtils.isNotEmpty(reqDTO.getPriorities()), OrderRequest::getPriority, reqDTO.getPriorities()); lqw.in(ListUtils.isNotEmpty(reqDTO.getPriorities()), OrderRequest::getPriority, reqDTO.getPriorities());
lqw.in(ListUtils.isNotEmpty(reqDTO.getProductCategory()), OrderRequest::getType, reqDTO.getProductCategory());
lqw.in(ListUtils.isNotEmpty(reqDTO.getProductCategory()), OrderRequest::getSkill, reqDTO.getServiceCategory());
lqw.in(ListUtils.isNotEmpty(reqDTO.getAppointmentType()), OrderRequest::getAppointmentMethod, reqDTO.getAppointmentType()); lqw.in(ListUtils.isNotEmpty(reqDTO.getAppointmentType()), OrderRequest::getAppointmentMethod, reqDTO.getAppointmentType());
lqw.in(ListUtils.isNotEmpty(reqDTO.getAppointmentStatus()), OrderRequest::getAppointmentStatus, reqDTO.getAppointmentStatus()); lqw.in(ListUtils.isNotEmpty(reqDTO.getAppointmentStatus()), OrderRequest::getAppointmentStatus, reqDTO.getAppointmentStatus());
if (ListUtils.isNotEmpty(reqDTO.getTypeCategory())) {
String types = "'" + String.join("','", reqDTO.getTypeCategory()) + "'";
String sql = String.format("select 1 from skill_info sk where sk.brand = order_request.brand and sk.type = order_request.type and sk.skill = order_request.skill and type_category in (%s)", types);
lqw.exists(sql);
}
if (ListUtils.isNotEmpty(reqDTO.getSkillCategory())) {
String skills = "'" + String.join("','", reqDTO.getSkillCategory()) + "'";
String sql = String.format("select 1 from skill_info sk where sk.brand = order_request.brand and sk.type = order_request.type and sk.skill = order_request.skill and skill_category in (%s)", skills);
lqw.exists(sql);
}
if(ListUtils.isNotEmpty(reqDTO.getEngineerCodes())) { if(ListUtils.isNotEmpty(reqDTO.getEngineerCodes())) {
String engineerCodes = String.join(",", reqDTO.getEngineerCodes()); String engineerCodes = "'" + String.join("','", reqDTO.getEngineerCodes()) + "'";
String sql = String.format("select 1 from order_appointment oa where oa.order_id = order_request.order_id and oa.dt = order_request.dt and oa.engineer_code in (%s)", engineerCodes); String sql = String.format("select 1 from order_appointment oa where oa.order_id = order_request.order_id and oa.dt = order_request.dt and oa.engineer_code in (%s)", engineerCodes);
lqw.exists(sql); lqw.exists(sql);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!