工位设备字段修改 1.6

zhc4dev
zhc077 2 years ago
parent 2c40d0007f
commit 038bf7dfb8
  1. 6
      ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue
  2. 2
      ant-design-vue-jeecg/src/views/team/StationMachineList.vue
  3. 4
      ant-design-vue-jeecg/src/views/team/StationToolList.vue
  4. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java
  5. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java
  6. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java
  7. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java

@ -5,8 +5,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :sm="5"> <a-col :sm="5">
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeCode"> <a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<a-input v-model="queryParam.typeCode" placeholder="请输入设备编号"></a-input> <a-input v-model="queryParam.code" placeholder="请输入设备编号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :sm="5"> <a-col :sm="5">
@ -79,7 +79,7 @@ export default {
{ {
title:'设备编号', title:'设备编号',
align:"center", align:"center",
dataIndex: 'typeCode' dataIndex: 'code'
}, },
{ {
title: '名称', title: '名称',

@ -149,7 +149,7 @@ export default {
{ {
title: '设备编号', title: '设备编号',
align: "center", align: "center",
dataIndex: 'machineId' dataIndex: 'code'
}, },
{ {
title: '设备名称', title: '设备名称',

@ -145,9 +145,9 @@ export default {
dataIndex: 'stationName', dataIndex: 'stationName',
}, },
{ {
title: '工具编', title: '工具编',
align: "center", align: "center",
dataIndex: 'toolsId' dataIndex: 'nums'
}, },
{ {
title: '工具名称', title: '工具名称',

@ -66,6 +66,13 @@ public class StationMachineController extends JeecgController<StationMachine, IS
QueryWrapper<StationMachine> queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap()); QueryWrapper<StationMachine> queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap());
Page<StationMachine> page = new Page<StationMachine>(pageNo, pageSize); Page<StationMachine> page = new Page<StationMachine>(pageNo, pageSize);
IPage<StationMachine> pageList = stationMachineService.page(page, queryWrapper); IPage<StationMachine> pageList = stationMachineService.page(page, queryWrapper);
List<StationMachine> 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); return Result.OK(pageList);
} }

@ -15,7 +15,9 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.tool.entity.ZyTool; import org.jeecg.modules.demo.tool.entity.ZyTool;
import org.jeecg.modules.demo.tool.service.IZyToolService; 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.device.service.IZyDeviceService;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.entity.StationTool; import org.jeecg.modules.team.entity.StationTool;
import org.jeecg.modules.team.service.IStationToolService; import org.jeecg.modules.team.service.IStationToolService;
import org.jeecg.modules.team.vo.StationToolVo; import org.jeecg.modules.team.vo.StationToolVo;
@ -69,6 +71,13 @@ public class StationToolController extends JeecgController<StationTool, IStation
QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
Page<StationTool> page = new Page<StationTool>(pageNo, pageSize); Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
IPage<StationTool> pageList = stationToolService.page(page, queryWrapper); IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
List<StationTool> 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); return Result.OK(pageList);
} }
@ -77,14 +86,14 @@ public class StationToolController extends JeecgController<StationTool, IStation
public Result<?> list2(StationTool stationTool, public Result<?> list2(StationTool stationTool,
// @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, // @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
// @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, // @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); // QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
// Page<StationTool> page = new Page<StationTool>(pageNo, pageSize); // Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
// IPage<StationTool> pageList = stationToolService.page(page, queryWrapper); // IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
List<StationToolVo> voList = new LinkedList<>(); List<StationToolVo> voList = new LinkedList<>();
List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId())); List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId()));
if(!ObjectUtils.isEmpty(toolList)){ if (!ObjectUtils.isEmpty(toolList)) {
toolList.forEach(en->{ toolList.forEach(en -> {
StationToolVo stationVo = new StationToolVo(); StationToolVo stationVo = new StationToolVo();
stationVo.setId(en.getToolsId()); stationVo.setId(en.getToolsId());
stationVo.setValue(en.getToolsId()); stationVo.setValue(en.getToolsId());

@ -1,6 +1,7 @@
package org.jeecg.modules.team.entity; package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -47,6 +48,10 @@ public class StationMachine {
@ApiModelProperty(value = "设备id,uuid,FK,设备表") @ApiModelProperty(value = "设备id,uuid,FK,设备表")
@Dict(dictTable = "zy_device", dicText = "name", dicCode = "id") @Dict(dictTable = "zy_device", dicText = "name", dicCode = "id")
private String machineId; private String machineId;
@TableField(exist = false)
@ApiModelProperty(value = "设备编码")
private String code;
/** /**
* 创建日期 * 创建日期
*/ */

@ -1,6 +1,7 @@
package org.jeecg.modules.team.entity; package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -47,6 +48,10 @@ public class StationTool {
@ApiModelProperty(value = "工具id,uuid,FK,工具表") @ApiModelProperty(value = "工具id,uuid,FK,工具表")
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id") @Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
private String toolsId; private String toolsId;
@TableField(exist = false)
@ApiModelProperty(value = "工具编码")
private String nums;
/** /**
* 创建日期 * 创建日期
*/ */

Loading…
Cancel
Save