Browse Source

2024-12-01

copy part
master
fengyuan_yang 1 year ago
parent
commit
27a448d7f5
  1. 5
      src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

5
src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java

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

Loading…
Cancel
Save