From 5bcc4b8737ba70cc672fd5a1c64496a94c6ab7bd Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期三, 07 六月 2023 14:43:32 +0800
Subject: [PATCH] 实时数据增加字段

---
 jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java b/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java
index 2dc83a3..7924ad7 100644
--- a/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java
+++ b/jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java
@@ -15,6 +15,7 @@
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
 import org.jeecg.modules.dry.entity.DryEquipment;
+import org.jeecg.modules.dry.service.IDryEqpTypeService;
 import org.jeecg.modules.dry.service.IDryEquipmentService;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -52,6 +53,9 @@
 public class DryEquipmentController extends JeecgController<DryEquipment, IDryEquipmentService> {
 	@Autowired
 	private IDryEquipmentService dryEquipmentService;
+
+	@Autowired
+	private IDryEqpTypeService dryEqpTypeService;
 
 	/**
 	 * 鍒嗛〉鍒楄〃鏌ヨ
@@ -92,6 +96,7 @@
 		//------------------------------------------------------------------------------------------------
 		QueryWrapper<DryEquipment> queryWrapper = QueryGenerator.initQueryWrapper(dryEquipment, req.getParameterMap());
 
+		queryWrapper.orderByAsc("code");
 		List<DryEquipment> eqps = dryEquipmentService.list(queryWrapper);
 		return Result.OK(eqps);
 	}
@@ -167,6 +172,7 @@
 	@GetMapping(value = "/queryById")
 	public Result<DryEquipment> queryById(@RequestParam(name="id",required=true) String id) {
 		DryEquipment dryEquipment = dryEquipmentService.getById(id);
+		dryEquipment.setType(dryEqpTypeService.getById(dryEquipment.getType()).getName());
 		if(dryEquipment==null) {
 			return Result.error("鏈壘鍒板搴旀暟鎹�");
 		}

--
Gitblit v1.9.3