|
|
|
@ -74,32 +74,32 @@ public class OtherInboundServiceImpl implements OtherInboundService { |
|
|
|
List<TransDetail> detailList = transHeaderService.genTransAndChangeInventoryStock(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.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()); |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// 7. 更新HandlingUnit状态 |
|
|
|
updateHandlingUnitStatus(handlingUnits, detailList, currentUser); |
|
|
|
@ -222,7 +222,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { |
|
|
|
subDto.setLocationId(dto.getTargetLocationId()); // 使用目标库位 |
|
|
|
subDto.setTransQty(hu.getQty().toString()); |
|
|
|
subDto.setDirection("+"); // 入库方向 |
|
|
|
subDto.setWdrNo(hu.getOrderRef3()); |
|
|
|
subDto.setWdrNo("*"); |
|
|
|
|
|
|
|
subList.add(subDto); |
|
|
|
} |
|
|
|
|