任务列表指令列表搜索条件更新
This commit is contained in:
@@ -104,6 +104,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
String status = (String) whereJson.get("status");
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
String is_over = (String) whereJson.get("is_over");
|
||||
String instruction_type = (String) whereJson.get("instruction_type");
|
||||
if (!StrUtil.isEmpty(code)) {
|
||||
map.put("code", code);
|
||||
}
|
||||
@@ -122,6 +123,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
if (!StrUtil.isEmpty(is_over)) {
|
||||
map.put("is_over", is_over);
|
||||
}
|
||||
map.put("instruction_type", instruction_type);
|
||||
|
||||
Integer currentPageNumber = page.getPageNumber() + 1;
|
||||
Integer pageMaxSize = page.getPageSize();
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
输入.material_type TYPEAS s_string
|
||||
输入.status TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.create_time TYPEAS time
|
||||
输入.end_time TYPEAS time
|
||||
输入.instruction_type TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -50,39 +50,44 @@
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
acs_instruction inst
|
||||
WHERE
|
||||
is_delete =0
|
||||
FROM
|
||||
acs_instruction inst
|
||||
WHERE
|
||||
is_delete =0
|
||||
OPTION 输入.is_over = "1"
|
||||
inst.instruction_status >= 2
|
||||
ENDOPTION
|
||||
OPTION 输入.is_over <> "1"
|
||||
inst.instruction_status < 2
|
||||
ENDOPTION
|
||||
OPTION 输入.task_code <> ""
|
||||
OPTION 输入.code <> ""
|
||||
(
|
||||
inst.instruction_code = 输入.code
|
||||
inst.instruction_code LIKE CONCAT ( '%', 输入.code, '%' )
|
||||
OR
|
||||
inst.task_code = 输入.code
|
||||
inst.task_code LIKE CONCAT ( '%', 输入.code, '%' )
|
||||
)
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
inst.instruction_status = 输入.status
|
||||
ENDOPTION
|
||||
OPTION 输入.vehicle_code <> ""
|
||||
inst.vehicle_code = 输入.vehicle_code
|
||||
inst.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' )
|
||||
ENDOPTION
|
||||
OPTION 输入.material_type <> ""
|
||||
inst.material = 输入.material_type
|
||||
ENDOPTION
|
||||
OPTION 输入.point_code <> ""
|
||||
(
|
||||
inst.start_point_code = 输入.point_code
|
||||
inst.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||
OR
|
||||
inst.next_point_code = 输入.point_code
|
||||
inst.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||
)
|
||||
ENDOPTION
|
||||
OPTION 输入.instruction_type <> ""
|
||||
inst.instruction_type = 输入.instruction_type
|
||||
ENDOPTION
|
||||
ORDER BY
|
||||
inst.create_time DESC
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
@@ -95,33 +100,32 @@
|
||||
acs_instruction inst
|
||||
WHERE
|
||||
is_delete =0
|
||||
OPTION 输入.task_code <> ""
|
||||
OPTION 输入.code <> ""
|
||||
(
|
||||
inst.instruction_code = 输入.code
|
||||
inst.instruction_code LIKE CONCAT ( '%', 输入.code, '%' )
|
||||
OR
|
||||
inst.task_code = 输入.code
|
||||
inst.task_code LIKE CONCAT ( '%', 输入.code, '%' )
|
||||
)
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
inst.instruction_status = 输入.status
|
||||
ENDOPTION
|
||||
OPTION 输入.vehicle_code <> ""
|
||||
inst.vehicle_code = 输入.vehicle_code
|
||||
inst.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' )
|
||||
ENDOPTION
|
||||
OPTION 输入.material_type <> ""
|
||||
inst.material = 输入.material_type
|
||||
ENDOPTION
|
||||
OPTION 输入.point_code <> ""
|
||||
(
|
||||
inst.start_point_code = 输入.point_code
|
||||
inst.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||
OR
|
||||
inst.next_point_code = 输入.point_code
|
||||
inst.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||
)
|
||||
ENDOPTION
|
||||
OPTION 输入.create_time <> ""
|
||||
inst.create_time between 输入.create_time and 输入.end_time
|
||||
ENDOPTION
|
||||
OPTION 输入.create_time <> ""
|
||||
inst.create_time between 输入.create_time and 输入.end_time
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -150,6 +150,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
String status = (String) whereJson.get("status");
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
String is_over = (String) whereJson.get("is_over");
|
||||
String task_type = (String) whereJson.get("task_type");
|
||||
List<TaskDto> taskList = new ArrayList();
|
||||
for (int i = 0; i < tasks.size(); i++) {
|
||||
TaskDto task = tasks.get(i);
|
||||
@@ -159,23 +160,33 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
if (!"1".equals(is_over) && Integer.valueOf(task.getTask_status()) >= 2) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(task_code) && !task.getTask_code().equals(task_code)) {
|
||||
if (!ObjectUtil.isEmpty(task_code) && !task.getTask_code().contains(task_code)) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(status) && !task.getTask_status().equals(status)) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(vehicle_code) && !task.getVehicle_code().equals(vehicle_code)) {
|
||||
if (!ObjectUtil.isEmpty(vehicle_code) && !task.getVehicle_code().contains(vehicle_code)) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(material_type) && !task.getMaterial().equals(material_type)) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(point_code) && !(task.getStart_point_code().equals(point_code) || task.getNext_point_code().equals(point_code))) {
|
||||
if (!ObjectUtil.isEmpty(point_code) && !(task.getStart_point_code().contains(point_code) || task.getNext_point_code().contains(point_code))) {
|
||||
continue;
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(task_type) && !task.getTask_type().equals(task_type)) {
|
||||
continue;
|
||||
}
|
||||
taskList.add(task);
|
||||
}
|
||||
|
||||
// 按照创建时间排序
|
||||
taskList = taskList
|
||||
.stream()
|
||||
.sorted((task1, task2) -> DateUtil.compare(DateUtil.parseDate(task1.getCreate_time()), DateUtil.parse(task2.getCreate_time())))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Integer currentPageNumber = page.getPageNumber() + 1;
|
||||
Integer pageMaxSize = page.getPageSize();
|
||||
List<TaskDto> taskDtoList = taskList.stream().skip((currentPageNumber - 1) * pageMaxSize).limit(pageMaxSize).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user