diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index c5c4e5a69..3e039c691 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -290,7 +290,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { dos.flush(); } catch (IOException e) { // TODO Auto-generated catch block - log.error("下发agv数据异常:" + e.getMessage()); + log.info("下发agv数据异常:" + e.getMessage()); e.printStackTrace(); } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java index 050de45fa..43e95bb4b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/rest/InstructionController.java @@ -49,6 +49,14 @@ public class InstructionController { return new ResponseEntity<>(instructionService.getAll(whereJson, page), HttpStatus.OK); } + @Log("导出指令") + @ApiOperation("导出指令") + @GetMapping(value = "/getAll/download") + //@PreAuthorize("@el.check('instruction:list')") + public void getAllDownload(HttpServletResponse response, Map whereJson) throws IOException { + instructionService.download(instructionService.queryAll(whereJson), response); + } + @GetMapping("/unfinish") @Log("查询所有未完成指令") @ApiOperation("查询所有未完成指令") 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 282143736..91e40d7d3 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 @@ -146,7 +146,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu map.put("flag", "2"); String code = (String) whereJson.get("code"); String vehicle_code = (String) whereJson.get("vehicle_code"); - String material_type = (String) whereJson.get("material_type"); + String instruction_type = (String) whereJson.get("instruction_type"); String status = (String) whereJson.get("status"); String point_code = (String) whereJson.get("point_code"); String create_time = (String) whereJson.get("createTime"); @@ -157,8 +157,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu if (!StrUtil.isEmpty(vehicle_code)) { map.put("vehicle_code", vehicle_code); } - if (!StrUtil.isEmpty(material_type)) { - map.put("material_type", material_type); + if (!StrUtil.isEmpty(instruction_type)) { + map.put("instruction_type", instruction_type); } if (!StrUtil.isEmpty(status)) { map.put("status", status); @@ -195,7 +195,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu ins.put("start_point_code2", jo.get("start_point_code2")); ins.put("next_point_code", jo.get("next_point_code")); ins.put("next_point_code2", jo.get("next_point_code2")); - ins.put("matarial", jo.get("matarial")); + ins.put("agv_system_type", jo.get("agv_system_type")); + ins.put("agv_inst_type", jo.get("agv_inst_type")); + ins.put("car_no", jo.get("car_no")); + ins.put("weight", jo.get("weight")); ins.put("remark", jo.get("remark")); ins.put("create_by", jo.get("create_by")); ins.put("create_time", jo.get("create_time")); @@ -235,7 +238,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu @Override public Instruction findByCode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("instruction_code ='" + code + "'").uniqueResult(0); + JSONObject json = wo.query("instruction_code ='" + code + "'","create_time desc").uniqueResult(0); if (ObjectUtil.isEmpty(json)) { return null; } @@ -246,7 +249,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu @Override public Instruction findByTaskcode(String code) { WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("task_code ='" + code + "'").uniqueResult(0); + JSONObject json = wo.query("task_code ='" + code + "'","create_time desc").uniqueResult(0); final Instruction obj = json.toJavaObject(Instruction.class); return obj; } @@ -285,7 +288,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu wherecaluse = " and " + wherecaluse; } WQLObject wo = WQLObject.getWQLObject("acs_instruction"); - JSONObject json = wo.query("task_id ='" + id + "'" + wherecaluse).uniqueResult(0); + JSONObject json = wo.query("task_id ='" + id + "'" + wherecaluse,"create_time desc").uniqueResult(0); if (ObjectUtil.isNotEmpty(json)) { return json.toJavaObject(Instruction.class); } @@ -653,15 +656,25 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu map.put("执行编码", instruction.getExecute_code()); map.put("执行信息", instruction.getExecute_message()); map.put("起始点位编码", instruction.getStart_point_code()); + map.put("起始点位编码2", instruction.getStart_point_code2()); map.put("起始设备编码", instruction.getStart_device_code()); + map.put("起始设备编码2", instruction.getStart_device_code2()); map.put("目标点位编码", instruction.getNext_point_code()); + map.put("目标点位编码2", instruction.getNext_point_code2()); map.put("目标设备编码", instruction.getNext_device_code()); + map.put("目标设备编码2", instruction.getNext_device_code2()); + map.put("放货点位编码", instruction.getPut_point_code()); + map.put("放货设备编码", instruction.getPut_device_code()); map.put("排", instruction.getFrom_x()); map.put("列", instruction.getFrom_y()); map.put("层", instruction.getFrom_z()); map.put("排", instruction.getTo_x()); map.put("列", instruction.getTo_y()); map.put("层", instruction.getTo_z()); + map.put("agv车号", instruction.getCarno()); + map.put("重量", instruction.getWeight()); + map.put("agv系统类型", instruction.getAgv_system_type()); + map.put("agv指令类型", instruction.getAgv_inst_type()); map.put("最后一条指令标识", instruction.getLast_instruction_id()); map.put("是否允许修改", instruction.getCan_modify()); map.put("备注", instruction.getRemark()); 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 9b7b0bae7..4117cb7ea 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 @@ -117,8 +117,8 @@ OPTION 输入.vehicle_code <> "" inst.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' ) ENDOPTION - OPTION 输入.material_type <> "" - inst.material = 输入.material_type + OPTION 输入.instruction_type <> "" + inst.instruction_type = 输入.instruction_type ENDOPTION OPTION 输入.point_code <> "" ( diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java index 9b37cfca3..225aeb77c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/rest/TaskController.java @@ -62,6 +62,14 @@ public class TaskController { return new ResponseEntity<>(taskService.getAll(whereJson, page), HttpStatus.OK); } + @Log("导出历史任务") + @ApiOperation("导出历史任务") + @GetMapping(value = "/getAll/download") + //@PreAuthorize("@el.check('task:list')") + public void getAllDownload(HttpServletResponse response, Map whereJson) throws IOException { + taskService.download(taskService.queryAll(whereJson), response); + } + @PostMapping @Log("新增任务") @ApiOperation("新增任务") diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/TaskService.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/TaskService.java index d6d6d8441..ef00482ee 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/TaskService.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/TaskService.java @@ -217,7 +217,6 @@ public interface TaskService { */ void download(List dtos, HttpServletResponse response) throws IOException; - /** * 根据触摸屏点击保存创建任务 * 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 c6ca173c4..5d0de6ee1 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 @@ -217,7 +217,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { map.put("flag", "2"); String task_code = (String) whereJson.get("task_code"); String vehicle_code = (String) whereJson.get("vehicle_code"); - String material_type = (String) whereJson.get("material_type"); + String task_type = (String) whereJson.get("task_type"); String status = (String) whereJson.get("status"); String point_code = (String) whereJson.get("point_code"); String create_time = (String) whereJson.get("createTime"); @@ -228,8 +228,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { if (!StrUtil.isEmpty(vehicle_code)) { map.put("vehicle_code", vehicle_code); } - if (!StrUtil.isEmpty(material_type)) { - map.put("material_type", material_type); + if (!StrUtil.isEmpty(task_type)) { + map.put("task_type", task_type); } if (!StrUtil.isEmpty(status)) { map.put("status", status); @@ -1224,12 +1224,20 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { map.put("起始设备编码", acsTask.getStart_device_code()); map.put("目标点位编码", acsTask.getNext_point_code()); map.put("目标设备编码", acsTask.getNext_device_code()); - map.put("排", acsTask.getFrom_x()); - map.put("列", acsTask.getFrom_y()); - map.put("层", acsTask.getFrom_z()); - map.put("排", acsTask.getTo_x()); + map.put("起始点位编码2", acsTask.getStart_point_code2()); + map.put("起始设备编码2", acsTask.getStart_device_code2()); + map.put("目标点位编码2", acsTask.getNext_point_code2()); + map.put("目标设备编码2", acsTask.getNext_device_code2()); + map.put("放货点位编码", acsTask.getPut_point_code()); + map.put("放货设备编码", acsTask.getPut_device_code()); map.put("列", acsTask.getTo_y()); map.put("层", acsTask.getTo_z()); + map.put("重量", acsTask.getWeight()); + map.put("agv系统类型", acsTask.getAgv_system_type()); + map.put("立库任务类型", acsTask.getStorage_task_type()); + map.put("烘箱温度", acsTask.getTemperature()); + map.put("烘箱时间", acsTask.getOven_time()); + map.put("agv车号", acsTask.getCarno()); map.put("路由方案名称", acsTask.getRoute_plan_name()); map.put("路由方案编码", acsTask.getRoute_plan_code()); map.put("是否需要反馈上位系统", acsTask.getIs_needfeedback()); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql index 583e75e99..47421336a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql +++ b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/wql/QTASK_QUERY.wql @@ -17,10 +17,11 @@ 输入.task_code TYPEAS s_string 输入.vehicle_code TYPEAS s_string 输入.material_type TYPEAS s_string - 输入.status TYPEAS s_string - 输入.point_code TYPEAS s_string + 输入.task_type TYPEAS s_string + 输入.status TYPEAS s_string + 输入.point_code TYPEAS s_string 输入.is_over TYPEAS s_string - 输入.create_time TYPEAS time + 输入.create_time TYPEAS time 输入.end_time TYPEAS time [临时表] --这边列出来的临时表就会在运行期动态创建 @@ -97,8 +98,8 @@ IF 输入.flag = "2" OPTION 输入.vehicle_code <> "" task.vehicle_code LIKE CONCAT ( '%', 输入.vehicle_code, '%' ) ENDOPTION - OPTION 输入.material_type <> "" - task.material = 输入.material_type + OPTION 输入.task_type <> "" + task.task_type = 输入.task_type ENDOPTION OPTION 输入.point_code <> "" ( diff --git a/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue b/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue index 935da3147..5c24d60bc 100644 --- a/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue +++ b/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue @@ -23,16 +23,16 @@ @keyup.enter.native="crud.toQuery" /> - + - + @@ -113,7 +113,18 @@ - + + + + + + + + + + @@ -171,7 +182,7 @@ const defaultForm = { update_time: null } export default { - dicts: ['task_status', 'task_type'], + dicts: ['task_status', 'task_type', 'instruction_type', 'agv_system_type'], name: 'Instruction', components: { pagination, crudOperation, Search }, mixins: [presenter(), header(), form(defaultForm), crud()], @@ -184,6 +195,11 @@ export default { query: { is_over: '1' }, crudMethod: { ...crudInstruction }, optShow: { + add: false, + edit: false, + del: false, + reset: false, + download: true } }) }, diff --git a/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue b/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue index 44449b4cb..757c8b61e 100644 --- a/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue +++ b/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue @@ -34,16 +34,16 @@ @keyup.enter.native="crud.toQuery" /> - + - +