任务列表指令列表搜索条件更新

This commit is contained in:
张江玮
2023-01-31 01:28:47 +08:00
parent 66c88f747e
commit 86f0281576
5 changed files with 83 additions and 38 deletions

View File

@@ -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();

View File

@@ -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

View File

@@ -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());

View File

@@ -55,6 +55,18 @@
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-select
v-model="query.instruction_type"
clearable
filterable
size="small"
placeholder="指令类型"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<rrOperation />
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -109,7 +121,11 @@
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="instruction_id" label="指令标识" />
<el-table-column prop="instruction_code" label="指令编号" />
<el-table-column prop="instruction_type" label="指令类型" />
<el-table-column prop="instruction_type" label="指令类型">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.instruction_type] }}
</template>
</el-table-column>
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="task_code" label="任务号" />
<el-table-column prop="vehicle_code" label="载具号" />
@@ -128,7 +144,7 @@
</template>
</el-table-column>
<el-table-column prop="start_point_code" label="取货点1" />
<!-- <el-table-column prop="put_point_code" label="倒料点" />-->
<!-- <el-table-column prop="put_point_code" label="倒料点" />-->
<el-table-column prop="next_point_code" label="放货点1" />
<el-table-column prop="start_point_code2" label="取货点2" />
<el-table-column prop="next_point_code2" label="放货点2" />
@@ -218,7 +234,7 @@ const defaultForm = {
update_time: null
}
export default {
dicts: ['task_status'],
dicts: ['task_status', 'task_type'],
name: 'Instruction',
components: { crudOperation, pagination },
mixins: [presenter(), header(), form(defaultForm), crud()],

View File

@@ -55,6 +55,18 @@
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-select
v-model="query.task_type"
clearable
filterable
size="small"
placeholder="任务类型"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
@@ -117,7 +129,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="立库任务类型" v-if = "form.task_type == '7'">
<el-form-item v-if="form.task_type == '7'" label="立库任务类型">
<el-select
v-model="form.storage_task_type"
style="width: 370px;"
@@ -314,12 +326,12 @@
<el-table-column type="selection" width="25" />
<el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" label="任务号" width="100" />
<el-table-column prop="task_type" label="任务类型" width="120">
<el-table-column prop="task_type" label="任务类型" width="120">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.task_type] }}
</template>
</el-table-column>
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="vehicle_code" label="载具号" width="100" />
<el-table-column prop="task_status" label="任务状态" width="60">
<template slot-scope="scope" width="60">
@@ -328,19 +340,19 @@
<span v-if="scope.row.task_status==='2' ">完成</span>
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="100"/>
<el-table-column prop="priority" label="优先级" width="100" />
<el-table-column prop="start_point_code" label="取货点1" width="100px" />
<!-- <el-table-column prop="put_point_code" label="倒料点" width="100" />-->
<!-- <el-table-column prop="put_point_code" label="倒料点" width="100" />-->
<el-table-column prop="next_point_code" label="放货点1" width="120px" />
<el-table-column prop="start_point_code2" label="取货点2" width="120px" />
<el-table-column prop="next_point_code2" label="放货点2" width="120px" />
<!-- <el-table-column prop="compound_task" label="复合任务">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.compound_task==='0' "></span>-->
<!-- <span v-if="scope.row.compound_task==='1' "></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="compound_task_data" width="200" label="复合路线" />-->
<!-- <el-table-column prop="compound_task" label="复合任务">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.compound_task==='0' "></span>-->
<!-- <span v-if="scope.row.compound_task==='1' "></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="compound_task_data" width="200" label="复合路线" />-->
<el-table-column prop="matarial" label="物料" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="备注" />