From 038bf7dfb87a8efaa7b834fec220c3fc47327dc8 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854> Date: Sat, 7 Jan 2023 11:53:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=8D=E8=AE=BE=E5=A4=87=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=BF=AE=E6=94=B9=201.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/device/ZyDeviceListRef.vue | 6 +++--- .../src/views/team/StationMachineList.vue | 2 +- .../src/views/team/StationToolList.vue | 4 ++-- .../team/controller/StationMachineController.java | 7 +++++++ .../team/controller/StationToolController.java | 15 ++++++++++++--- .../jeecg/modules/team/entity/StationMachine.java | 5 +++++ .../jeecg/modules/team/entity/StationTool.java | 5 +++++ 7 files changed, 35 insertions(+), 9 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue index 19ba153a..f05a7621 100644 --- a/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue +++ b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue @@ -5,8 +5,8 @@ - - + + @@ -79,7 +79,7 @@ export default { { title:'设备编号', align:"center", - dataIndex: 'typeCode' + dataIndex: 'code' }, { title: '名称', diff --git a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue index 8bff2842..ed14de28 100644 --- a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue @@ -149,7 +149,7 @@ export default { { title: '设备编号', align: "center", - dataIndex: 'machineId' + dataIndex: 'code' }, { title: '设备名称', diff --git a/ant-design-vue-jeecg/src/views/team/StationToolList.vue b/ant-design-vue-jeecg/src/views/team/StationToolList.vue index 7aa6b5fb..ef038d48 100644 --- a/ant-design-vue-jeecg/src/views/team/StationToolList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationToolList.vue @@ -145,9 +145,9 @@ export default { dataIndex: 'stationName', }, { - title: '工具编号', + title: '工具编码', align: "center", - dataIndex: 'toolsId' + dataIndex: 'nums' }, { title: '工具名称', diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java index b20ec41d..a43a0458 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java @@ -66,6 +66,13 @@ public class StationMachineController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = stationMachineService.page(page, queryWrapper); + List records = pageList.getRecords(); + if (!ObjectUtils.isEmpty(records)) { + records.forEach(e -> { + ZyDevice zyDevice = iZyDeviceService.getById(e.getMachineId()); + e.setCode(StringUtils.isNotBlank(zyDevice.getCode()) ? zyDevice.getCode() : ""); + }); + } return Result.OK(pageList); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java index 24865124..80a49783 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java @@ -15,7 +15,9 @@ import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.demo.tool.entity.ZyTool; import org.jeecg.modules.demo.tool.service.IZyToolService; +import org.jeecg.modules.device.entity.ZyDevice; import org.jeecg.modules.device.service.IZyDeviceService; +import org.jeecg.modules.team.entity.StationMachine; import org.jeecg.modules.team.entity.StationTool; import org.jeecg.modules.team.service.IStationToolService; import org.jeecg.modules.team.vo.StationToolVo; @@ -69,6 +71,13 @@ public class StationToolController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = stationToolService.page(page, queryWrapper); + List records = pageList.getRecords(); + if (!ObjectUtils.isEmpty(records)) { + records.forEach(e -> { + ZyTool zyTool = iZyToolService.getById(e.getToolsId()); + e.setNums(StringUtils.isNotBlank(zyTool.getNums()) ? zyTool.getNums() : ""); + }); + } return Result.OK(pageList); } @@ -77,14 +86,14 @@ public class StationToolController extends JeecgController list2(StationTool stationTool, // @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, // @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, - HttpServletRequest req) { + HttpServletRequest req) { // QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); // Page page = new Page(pageNo, pageSize); // IPage pageList = stationToolService.page(page, queryWrapper); List voList = new LinkedList<>(); List toolList = stationToolService.list(new LambdaQueryWrapper().eq(StationTool::getStationId, stationTool.getStationId())); - if(!ObjectUtils.isEmpty(toolList)){ - toolList.forEach(en->{ + if (!ObjectUtils.isEmpty(toolList)) { + toolList.forEach(en -> { StationToolVo stationVo = new StationToolVo(); stationVo.setId(en.getToolsId()); stationVo.setValue(en.getToolsId()); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java index 6f12feaa..9412d07e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java @@ -1,6 +1,7 @@ package org.jeecg.modules.team.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -47,6 +48,10 @@ public class StationMachine { @ApiModelProperty(value = "设备id,uuid,FK,设备表") @Dict(dictTable = "zy_device", dicText = "name", dicCode = "id") private String machineId; + + @TableField(exist = false) + @ApiModelProperty(value = "设备编码") + private String code; /** * 创建日期 */ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java index 2e93af62..32f68688 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java @@ -1,6 +1,7 @@ package org.jeecg.modules.team.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -47,6 +48,10 @@ public class StationTool { @ApiModelProperty(value = "工具id,uuid,FK,工具表") @Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id") private String toolsId; + + @TableField(exist = false) + @ApiModelProperty(value = "工具编码") + private String nums; /** * 创建日期 */