diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 620dfd0a2..34198859d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -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(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/wql/QINST_QUERY.wql b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/wql/QINST_QUERY.wql index 5c2df482e..4b39fdfa5 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/wql/QINST_QUERY.wql +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/wql/QINST_QUERY.wql @@ -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 diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 3b139577b..a1fcaa4f7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java @@ -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 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 taskDtoList = taskList.stream().skip((currentPageNumber - 1) * pageMaxSize).limit(pageMaxSize).collect(Collectors.toList()); diff --git a/acs/nladmin-ui/src/views/acs/instruction/index.vue b/acs/nladmin-ui/src/views/acs/instruction/index.vue index 6047afc8e..b42b7e7f4 100644 --- a/acs/nladmin-ui/src/views/acs/instruction/index.vue +++ b/acs/nladmin-ui/src/views/acs/instruction/index.vue @@ -55,6 +55,18 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> + + + @@ -109,7 +121,11 @@ - + + + @@ -128,7 +144,7 @@ - + @@ -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()], diff --git a/acs/nladmin-ui/src/views/acs/task/index.vue b/acs/nladmin-ui/src/views/acs/task/index.vue index 4f0381a1a..8afc0cce2 100644 --- a/acs/nladmin-ui/src/views/acs/task/index.vue +++ b/acs/nladmin-ui/src/views/acs/task/index.vue @@ -55,6 +55,18 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> + + + @@ -117,7 +129,7 @@ /> - + - + - + - + - + - - - - - - - + + + + + + +