|
|
|
@ -87,32 +87,28 @@ public class OtherInboundServiceImpl implements OtherInboundService { |
|
|
|
List<TransDetail> detailList = genOtherInboundTransAndChangeStock(transRequest, "IN"); |
|
|
|
|
|
|
|
// 6. 调用IFS接口同步入库信息 |
|
|
|
// for (TransDetail detail : detailList) { |
|
|
|
// OtherTransactionIfsDto ifsDto = new OtherTransactionIfsDto(); |
|
|
|
// ifsDto.setIfsSiteID(dto.getSite()); |
|
|
|
// ifsDto.setIfsPartNo(detail.getPartNo()); |
|
|
|
// ifsDto.setIfsLocationNo(detail.getLocationId()); |
|
|
|
// ifsDto.setIfsLotBatchNo(detail.getBatchNo()); |
|
|
|
// ifsDto.setIfsSerialNo("*"); |
|
|
|
// ifsDto.setIfsWdrNo(detail.getWdrNo()); |
|
|
|
// ifsDto.setIfsEngChgLevel("1"); |
|
|
|
// ifsDto.setIfsActivitySeq(BigDecimal.ZERO); |
|
|
|
// ifsDto.setIfsHandlingUntitID(BigDecimal.ZERO); |
|
|
|
// ifsDto.setIfsQuantity(detail.getTransQty()); |
|
|
|
// ifsDto.setIfsTransactionType("IN"); |
|
|
|
// ifsDto.setIfsReason(dto.getInboundReason()); |
|
|
|
// ifsDto.setIfsOperator(dto.getOperatorName()); |
|
|
|
// |
|
|
|
// try { |
|
|
|
// String ifsResponse = ifsApiIssueAndReturnService.addOtherInbound(ifsDto); |
|
|
|
// // 检查IFS响应,如果失败可能需要回滚事务 |
|
|
|
// if (!"IFSUpdated".equals(ifsResponse) && !"\"IFSUpdated\"".equals(ifsResponse)) { |
|
|
|
// throw new XJException("IFS同步失败,响应: " + ifsResponse); |
|
|
|
// } |
|
|
|
// } catch (Exception ifsException) { |
|
|
|
// throw new XJException("其它入库IFS同步失败: " + ifsException.getMessage()); |
|
|
|
// } |
|
|
|
// } |
|
|
|
for (TransDetail detail : detailList) { |
|
|
|
OtherTransactionIfsDto ifsDto = new OtherTransactionIfsDto(); |
|
|
|
ifsDto.setIfsSiteID(dto.getSite()); |
|
|
|
ifsDto.setIfsPartNo(detail.getPartNo()); |
|
|
|
ifsDto.setIfsLocationNo(detail.getLocationId()); |
|
|
|
ifsDto.setIfsLotBatchNo(detail.getBatchNo()); |
|
|
|
ifsDto.setIfsSerialNo("*"); |
|
|
|
ifsDto.setIfsWdrNo(detail.getWdrNo()); |
|
|
|
ifsDto.setIfsEngChgLevel("1"); |
|
|
|
ifsDto.setIfsHandlingUntitID(BigDecimal.ZERO); |
|
|
|
ifsDto.setIfsQuantity(detail.getTransQty()); |
|
|
|
|
|
|
|
try { |
|
|
|
String ifsResponse = ifsApiIssueAndReturnService.addOtherInbound(ifsDto); |
|
|
|
// 检查IFS响应,如果失败可能需要回滚事务 |
|
|
|
if (!"IFSUpdated".equals(ifsResponse) && !"\"IFSUpdated\"".equals(ifsResponse)) { |
|
|
|
throw new XJException("IFS同步失败,响应: " + ifsResponse); |
|
|
|
} |
|
|
|
} catch (Exception ifsException) { |
|
|
|
throw new XJException("其它入库IFS同步失败: " + ifsException.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 7. 更新HandlingUnit状态 |
|
|
|
updateHandlingUnitStatus(handlingUnits, detailList, currentUser); |
|
|
|
|