From 9f8f73240c885488fdffc1062826520cf7abb86b Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期二, 08 四月 2025 17:45:03 +0800 Subject: [PATCH] Merge branch 'radio_frequency' of http://114.132.189.42:9002/r/lims-ruoyi-after into radio_frequency --- inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java | 94 ++++++++++++++++++++++++++++++----------------- 1 files changed, 60 insertions(+), 34 deletions(-) diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java index 9bce1e1..d02085a 100644 --- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java +++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java @@ -12,14 +12,14 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; -import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.basic.dto.*; import com.ruoyi.basic.pojo.IfsInventoryQuantity; import com.ruoyi.common.constant.InsOrderTypeConstants; +import com.ruoyi.common.core.domain.Result; import com.ruoyi.common.core.domain.entity.User; -import com.ruoyi.common.properties.WechatProperty; +import com.ruoyi.common.config.WechatProperty; import com.ruoyi.common.utils.LimsDateUtil; import com.ruoyi.common.utils.QueryWrappers; import com.ruoyi.common.utils.SecurityUtils; @@ -81,50 +81,55 @@ @Override - public RawMaterialStandardTreeDto selectStandardTreeListByPartNo(String partNo) { - if (StringUtils.isBlank(partNo)) { - throw new ErrorException("闆朵欢鍙蜂涪澶�"); - } + public Result selectStandardTreeListByPartNo(String partNo) { List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeListByPartNo(partNo); if (CollectionUtil.isEmpty(factoryDtos)) { - throw new ErrorException("闆朵欢鍙蜂负" + partNo + "鐨勫師鏉愭枡娌℃湁瀵瑰簲鐨勬爣鍑嗗簱閰嶇疆"); + return Result.success(null, "闆朵欢鍙蜂负" + partNo + "鐨勫師鏉愭枡娌℃湁瀵瑰簲鐨勬爣鍑嗗簱閰嶇疆"); } RawMaterialStandardTreeDto rawMaterialStandardTreeDto = new RawMaterialStandardTreeDto(); for (FactoryDto factoryDto : factoryDtos) { for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { - for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) { - if (sampleTypeDto.getChildren().size() == 0) { - sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); - } - // 鍒ゆ柇缁戝畾鐨勬槸鍚︽槸褰撳墠闆朵欢鍙� - if (sampleTypeDto.getPartNo() != null && sampleTypeDto.getPartNo().equals(partNo)) { - // 娣诲姞瀵硅薄 - rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-" - + laboratoryDto.getValue() + "-" - + sampleTypeDto.getValue()); - rawMaterialStandardTreeDto.setCode(sampleTypeDto.getCode()); - rawMaterialStandardTreeDto.setLabel(sampleTypeDto.getLabel()); - rawMaterialStandardTreeDto.setValue(sampleTypeDto.getValue()); - rawMaterialStandardTreeDto.setChildren1(sampleTypeDto.getChildren()); - } else { - for (SampleDto sampleDto : sampleTypeDto.getChildren()) { - if (sampleDto.getPartNo() != null && sampleDto.getPartNo().equals(partNo)) { + for (ObjectTypeDto objectTypeDto : laboratoryDto.getChildren()) { + for (WorkShopNameDto workShopNameDto : objectTypeDto.getChildren()) { + for (SampleTypeDto sampleTypeDto : workShopNameDto.getChildren()) { + if (sampleTypeDto.getChildren().size() == 0) { + sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); + } + // 鍒ゆ柇缁戝畾鐨勬槸鍚︽槸褰撳墠闆朵欢鍙� + if (sampleTypeDto.getPartNo() != null && sampleTypeDto.getPartNo().equals(partNo)) { // 娣诲姞瀵硅薄 rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-" - + laboratoryDto.getValue() + "-" - + sampleTypeDto.getValue() + "-" - + sampleDto.getValue()); - rawMaterialStandardTreeDto.setCode(sampleDto.getCode()); - rawMaterialStandardTreeDto.setLabel(sampleDto.getLabel()); - rawMaterialStandardTreeDto.setValue(sampleDto.getValue()); - rawMaterialStandardTreeDto.setChildren2(sampleDto.getChildren()); + + laboratoryDto.getValue() + "-" + objectTypeDto.getValue() + "-" + workShopNameDto.getValue() + "-" + + sampleTypeDto.getValue()); + rawMaterialStandardTreeDto.setCode(sampleTypeDto.getCode()); + rawMaterialStandardTreeDto.setLabel(sampleTypeDto.getLabel()); + rawMaterialStandardTreeDto.setValue(sampleTypeDto.getValue()); + rawMaterialStandardTreeDto.setChildren1(sampleTypeDto.getChildren()); + rawMaterialStandardTreeDto.setWorkShopName(sampleTypeDto.getWorkShopName()); + rawMaterialStandardTreeDto.setWorkShopId(sampleTypeDto.getWorkShopId()); + } else { + for (SampleDto sampleDto : sampleTypeDto.getChildren()) { + if (sampleDto.getPartNo() != null && sampleDto.getPartNo().equals(partNo)) { + // 娣诲姞瀵硅薄 + rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-" + + laboratoryDto.getValue() + "-" + objectTypeDto.getValue() + "-" + workShopNameDto.getValue() + "-" + + sampleTypeDto.getValue() + "-" + + sampleDto.getValue()); + rawMaterialStandardTreeDto.setCode(sampleDto.getCode()); + rawMaterialStandardTreeDto.setLabel(sampleDto.getLabel()); + rawMaterialStandardTreeDto.setValue(sampleDto.getValue()); + rawMaterialStandardTreeDto.setChildren2(sampleDto.getChildren()); + rawMaterialStandardTreeDto.setWorkShopName(sampleTypeDto.getWorkShopName()); + rawMaterialStandardTreeDto.setWorkShopId(sampleTypeDto.getWorkShopId()); + } + } } } } } } } - return rawMaterialStandardTreeDto; + return Result.success(rawMaterialStandardTreeDto); } @Override @@ -140,6 +145,7 @@ /** * 鎶ユ + * * @param ids * @return */ @@ -183,6 +189,7 @@ /** * 鎾ら攢鎶ユ + * * @param id * @return */ @@ -196,6 +203,7 @@ /** * 鎵撳嵃鏍囩鏌ヨ + * * @param ids * @return */ @@ -206,6 +214,7 @@ /** * 鎶ユ + * * @param ifsInventoryQuantity * @return */ @@ -236,6 +245,7 @@ /** * 鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹� + * * @param id * @return */ @@ -246,6 +256,7 @@ /** * 鍘熸潗鏂欐挙閿�鎺ュ彛 + * * @param ifsInventoryId * @return */ @@ -272,6 +283,7 @@ /** * 鍘熸潗鏂欏厤妫�涓嬪崟 + * * @param list * @param insOrder * @return @@ -348,6 +360,7 @@ /** * 鏌ヨ寰呬笅鍗� + * * @param page * @param ifsInventoryQuantity * @return @@ -359,6 +372,7 @@ /** * 鏌ヨ宸叉楠� + * * @param page * @param ifsInventoryQuantityDto * @return @@ -371,11 +385,13 @@ ifsInventoryQuantityDto.setBeginDeclareDate(null); ifsInventoryQuantityDto.setEndDeclareDate(null); - return standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); + IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate); + return ifsByOver; } /** * 鍒犻櫎鍘熸潗鏂欐姤妫�淇℃伅 + * * @param id * @return */ @@ -386,6 +402,7 @@ /** * 鍘熸潗鏂欐斁琛屽厤妫� + * * @param ifsInventoryId * @return */ @@ -439,8 +456,9 @@ /** * 0, 鏃犳彁绀�, 1鎻愮ず 褰撳墠鎵规鐨勬牱鍝佸凡妫�楠岃繃, 鍙互鍏嶆, 2 鎻愮ず 褰撳墠鎵规鐨勬牱鍝佸凡瓒�20鍚�, 闇�瑕佸绾у娆℃楠� - * + * <p> * 鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠� + * * @param ifsInventoryId * @return */ @@ -480,6 +498,7 @@ /** * 鎶ユ鍙互鏂板鎶ユ淇℃伅 + * * @param ifsInventoryQuantity */ @Override @@ -493,6 +512,7 @@ /** * 閾滃崟涓濅笅鍗曞厤妫� + * * @param list * @param insOrder */ @@ -589,6 +609,7 @@ /** * 鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟 + * * @param enterOrderId * @return */ @@ -627,6 +648,7 @@ /** * 鍘熸潗鏂欏搴︽挙閿�涓嬪崟 + * * @param quarterOrderId * @return */ @@ -667,6 +689,7 @@ /** * 鍘熸潗鏂欐姤妫�鍏ㄩ儴淇℃伅瀵煎嚭 + * * @param ifsInventoryQuantityDto * @param response */ @@ -729,6 +752,7 @@ /** * 鍘熸潗鏂欐煡璇㈠彲浠ュ搴︽楠岀殑鍐呭 + * * @param page * @param ifsInventoryQuantityDto * @return @@ -747,6 +771,7 @@ /** * 鎻愬墠鍏ュ簱 + * * @param ifsInventoryId * @return */ @@ -774,6 +799,7 @@ /** * 娣诲姞宸ユ椂 + * * @param insOrder * @param ifsInventoryQuantity */ -- Gitblit v1.9.3