From a6ccb31191385dd9c3d2e9d75e1bcda7ff6a4ed3 Mon Sep 17 00:00:00 2001 From: bsw215583320 <baoshiwei121@163.com> Date: 星期二, 12 九月 2023 14:47:57 +0800 Subject: [PATCH] 增加socket通讯,增加移动端控制接口 --- jeecg-module-dry/jeecg-module-dry-biz/src/main/java/org/jeecg/modules/dry/controller/DryEquipmentController.java | 13 +++++++++++++ 1 files changed, 13 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..88b8858 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,9 +96,17 @@ //------------------------------------------------------------------------------------------------ QueryWrapper<DryEquipment> queryWrapper = QueryGenerator.initQueryWrapper(dryEquipment, req.getParameterMap()); + queryWrapper.orderByAsc("code"); List<DryEquipment> eqps = dryEquipmentService.list(queryWrapper); + eqps.stream().forEach(item -> { + item.setType(dryEqpTypeService.getById(item.getType()).getName()); + }); return Result.OK(eqps); } + + + + /** * 娣诲姞 @@ -167,6 +179,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