From ad6d89cd71071f44b51589b48e79125ed830a508 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 1 Apr 2026 15:25:54 +0800 Subject: [PATCH] =?UTF-8?q?2026-04-01=20=E4=BA=A7=E5=93=81BOM=E3=80=90copy?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=EF=BC=8C=E8=B0=83=E7=94=A8IFS?= =?UTF-8?q?=E6=A0=87=E5=87=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BomManagementServiceImpl.java | 57 ++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java index 8ffcfddc..439dedd9 100644 --- a/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java @@ -11,6 +11,7 @@ import com.spring.common.utils.PageUtils; import com.spring.ifs.api.IfsServer; import com.spring.ifs.bean.BomServiceBean; import com.spring.ifs.bean.InventoryServiceBean; +import com.spring.ifs.data.CopyBomStructureData; import com.spring.modules.base.utils.DataUtils; import com.spring.modules.base.utils.HttpClientUtil; import com.spring.modules.base.utils.ResponseData; @@ -958,6 +959,17 @@ public class BomManagementServiceImpl extends ServiceImpl().eq("site", data.getPreviousVersion().getSite()).eq("part_no", data.getPreviousVersion().getPartNo())); + boolean isFromPartFormal = fromPartInfo != null && "Y".equals(fromPartInfo.getStatus()); + boolean isToPartFormal = "Y".equals(partInformationEntity.getStatus()); + boolean callIfsCopy = isFromPartFormal && isToPartFormal; + + if (callIfsCopy) { + data.setOfficialFlag("Y"); + } + // // 1、创建bomHeader BomHeaderEntity header = bomManagementMapper.queryBomHeader(data.getPreviousVersion()); @@ -1021,8 +1033,13 @@ public class BomManagementServiceImpl extends ServiceImpl copyResult = bomServiceBean.copyBomStructure(srv, copyData); + if (!"200".equals(copyResult.get("resultCode"))) { + throw new RuntimeException("IFS Bom复制异常:" + copyResult.get("resultMsg")); + } + } catch (Exception e) { + throw new RuntimeException("IFS Bom复制异常:" + e.getMessage()); + } + } + } + return data; }