|
|
|
@ -1799,12 +1799,14 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
try { |
|
|
|
temporaryCopyPart(inData, fromPart); |
|
|
|
} catch (Exception e) { |
|
|
|
if ("Y".equals(fromPart.getStatus())) { |
|
|
|
// 调用删除接口 |
|
|
|
String deleteCopyPartURL = apiUrl + "/part/ifs/removeCopyPartForInventoryPart"; |
|
|
|
ResponseData deleteCopyPartResponse = HttpClientUtil.doPostByRawWithPLM(deleteCopyPartURL, ifsCatalog); |
|
|
|
if (!"200".equals(deleteCopyPartResponse.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; IFS删除Copy part关联信息异常:" + deleteCopyPartResponse.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
throw new RuntimeException(e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -2141,6 +2143,8 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
*/ |
|
|
|
@Transactional |
|
|
|
public void temporaryCopyPart(PartInformationVo inData, PartInformationEntity fromPart) { |
|
|
|
// 正式物料则调用ifs copy part 接口 |
|
|
|
if ("Y".equals(fromPart.getStatus())) { |
|
|
|
CopyPart copyPart = new CopyPart(); |
|
|
|
copyPart.setOriContract(fromPart.getSite()); |
|
|
|
copyPart.setOriPartNo(fromPart.getPartNo()); |
|
|
|
@ -2166,6 +2170,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
if (!"200".equals(copyPartResponse.getCode())) { |
|
|
|
throw new RuntimeException("ifs 库存件copyPart异常:" + copyPartResponse.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 判断master part 是否存在,否则新增 |
|
|
|
|