|
|
|
@ -1786,15 +1786,28 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
// 判断原物料的正式状态 |
|
|
|
PartInformationEntity fromPart = partInformationMapper.selectOne(new QueryWrapper<PartInformationEntity>().eq("site", inData.getFromPartSite()).eq("part_no", inData.getFromPartNo())); |
|
|
|
// copy |
|
|
|
temporaryCopyPart(inData, fromPart); |
|
|
|
Server srv = getIfsServer(inData.getCreateBy()); |
|
|
|
try { |
|
|
|
temporaryCopyPart(inData, fromPart, srv); |
|
|
|
} catch (Exception e) { |
|
|
|
// 删除库存件关联信息 |
|
|
|
PartIfsInventory partIfsInventory = new PartIfsInventory(); |
|
|
|
partIfsInventory.setContract(inData.getSite()); |
|
|
|
partIfsInventory.setPartNo(inData.getPartNo()); |
|
|
|
Map<String, String> deleteInventoryPartResponse = inventoryServiceBean.removeInventoryPartRelationInfo(srv, partIfsInventory); |
|
|
|
if (!"200".equals(deleteInventoryPartResponse.get("resultCode"))) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; IFS删除库存件关联信息异常:" + deleteInventoryPartResponse.get("resultMsg")); |
|
|
|
} |
|
|
|
throw new RuntimeException(e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 临时物料的copy part |
|
|
|
*/ |
|
|
|
@Transactional |
|
|
|
public void temporaryCopyPart(PartInformationVo inData, PartInformationEntity fromPart) { |
|
|
|
Server srv = getIfsServer(inData.getCreateBy()); |
|
|
|
public void temporaryCopyPart(PartInformationVo inData, PartInformationEntity fromPart, Server srv) { |
|
|
|
// 正式物料则调用ifs copy part 接口 |
|
|
|
if (dataUrl && "Y".equals(fromPart.getStatus())) { |
|
|
|
CopyPart copyPart = new CopyPart(); |
|
|
|
|