From ddd17a7643ca777f70389ae9eacb75b8dba6beab Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 19 六月 2023 18:07:03 +0800 Subject: [PATCH] 联调物品主数据剩余功能,处理相似项查询 --- Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java index 997bea0..52c6de9 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/feign/BtmTypeClient.java @@ -62,7 +62,7 @@ */ @Override @PostMapping(GET_REF_PAGE) - public R<IPage<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { + public R<Page<BtmTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { Map<String, String> conditionMap = baseQueryObject.getConditionMap(); if (conditionMap == null){ conditionMap = new HashMap<>(16); @@ -83,10 +83,10 @@ query.setSize(pageHelper.getLimit()); query.setCurrent(pageHelper.getPage()); IPage<BtmType> page = btmTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(queryObj).lambda().eq(BtmType::getDomain, domainValue).orderByAsc(BtmType::getId)); - IPage<BtmTypeVO> pageVO = new Page<>(); + Page<BtmTypeVO> pageVO = new Page<>(); BeanUtil.copy(page,pageVO); pageVO.setRecords(BtmTypeWrapper.build().listEntityVO(page.getRecords())); - R<IPage<BtmTypeVO>> r = R.data(pageVO); + R<Page<BtmTypeVO>> r = R.data(pageVO); r.setSuccess(true); return r; } @@ -152,4 +152,37 @@ ); return R.data(voList); } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屽彧鏈夐粯璁ゅ瓧娈� + * + * @param btmTypeId 涓氬姟绫诲瀷id + * @return 榛樿瀛楁灞炴�� + */ + @Override + public R<BtmTypeVO> getDefaultAttrByBtmId(String btmTypeId) { + return R.data(Optional.ofNullable(btmTypeService.getDefaultAttrByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); + } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屾湁鎵�鏈夌殑瀛楁 + * + * @param btmTypeId 涓氬姟绫诲瀷id + * @return 鎵�鏈夊瓧娈� + */ + @Override + public R<BtmTypeVO> getAllAttributeByBtmId(String btmTypeId) { + return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmId(btmTypeId)).orElseGet(BtmTypeVO::new)); + } + + /** + * 鑾峰彇涓氬姟绫诲瀷锛屾湁鎵�鏈夌殑瀛楁 + * + * @param btmTypeOid 涓氬姟绫诲瀷涓婚敭 + * @return 鎵�鏈夊瓧娈� + */ + @Override + public R<BtmTypeVO> getAllAttributeByBtmOid(String btmTypeOid) { + return R.data(Optional.ofNullable(btmTypeService.getAllAttributeByBtmOid(btmTypeOid)).orElseGet(BtmTypeVO::new)); + } } -- Gitblit v1.9.3