diff --git a/src/main/java/com/gaotao/modules/api/service/impl/IfsApiIssueAndReturnServiceImpl.java b/src/main/java/com/gaotao/modules/api/service/impl/IfsApiIssueAndReturnServiceImpl.java index 9c64612..1c30a2e 100644 --- a/src/main/java/com/gaotao/modules/api/service/impl/IfsApiIssueAndReturnServiceImpl.java +++ b/src/main/java/com/gaotao/modules/api/service/impl/IfsApiIssueAndReturnServiceImpl.java @@ -364,7 +364,7 @@ public class IfsApiIssueAndReturnServiceImpl implements IfsApiIssueAndReturnServ try { Map params = new HashMap<>(); params.put("ifsDBName", ifsDBName); - params.put("domainUserID", domainUserID); + params.put("domainUserID", getCurrentDomainUserID()); params.put("ifsSiteID", otherTransactionIfsDto.getIfsSiteID()); params.put("ifsPartNo", otherTransactionIfsDto.getIfsPartNo()); params.put("ifsConfigurationID", "*"); @@ -376,6 +376,7 @@ public class IfsApiIssueAndReturnServiceImpl implements IfsApiIssueAndReturnServ params.put("ifsHandlingUntiID", otherTransactionIfsDto.getIfsHandlingUnitID()); params.put("ifsQtyReceived", otherTransactionIfsDto.getIfsQuantity()); params.put("ifsPartOwnershipDb", "COMPANY OWNED"); + params.put("ifsNote", otherTransactionIfsDto.getIfsReason()); ObjectMapper objectMapper = new ObjectMapper(); String jsonBody = objectMapper.writeValueAsString(params); @@ -394,24 +395,22 @@ public class IfsApiIssueAndReturnServiceImpl implements IfsApiIssueAndReturnServ try { Map params = new HashMap<>(); params.put("ifsDBName", ifsDBName); - params.put("domainUserID", domainUserID); + params.put("domainUserID", getCurrentDomainUserID()); params.put("ifsSiteID", otherTransactionIfsDto.getIfsSiteID()); params.put("ifsPartNo", otherTransactionIfsDto.getIfsPartNo()); + params.put("ifsConfigurationID", "*"); params.put("ifsLocationNo", otherTransactionIfsDto.getIfsLocationNo()); params.put("ifsLotBatchNo", otherTransactionIfsDto.getIfsLotBatchNo()); params.put("ifsSerialNo", otherTransactionIfsDto.getIfsSerialNo()); params.put("ifsWdrNo", otherTransactionIfsDto.getIfsWdrNo()); params.put("ifsEngChgLevel", otherTransactionIfsDto.getIfsEngChgLevel()); - params.put("ifsActivitySeq", otherTransactionIfsDto.getIfsActivitySeq()); params.put("ifsHandlingUntiID", otherTransactionIfsDto.getIfsHandlingUnitID()); - params.put("ifsQuantity", otherTransactionIfsDto.getIfsQuantity()); - params.put("ifsTransactionType", otherTransactionIfsDto.getIfsTransactionType()); - params.put("ifsReason", otherTransactionIfsDto.getIfsReason()); - params.put("ifsOperator", otherTransactionIfsDto.getIfsOperator()); + params.put("ifsQtyIssued", otherTransactionIfsDto.getIfsQuantity()); + params.put("ifsNote", otherTransactionIfsDto.getIfsReason()); ObjectMapper objectMapper = new ObjectMapper(); String jsonBody = objectMapper.writeValueAsString(params); - String ifsResponse = HttpUtils.doPost(ifsUrl + "OtherOutbound", jsonBody, null); + String ifsResponse = HttpUtils.doPost(ifsUrl + "IssueInventoryPart", jsonBody, null); return ifsResponse; } catch (Exception e) { diff --git a/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java b/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java index 70228c3..4104be9 100644 --- a/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java +++ b/src/main/java/com/gaotao/modules/other/service/impl/InventoryMoveServiceImpl.java @@ -31,10 +31,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 库存移库服务实现类 @@ -135,37 +132,43 @@ public class InventoryMoveServiceImpl implements InventoryMoveService { } // 4. 合并相同条件的HandlingUnit后调用IFS接口(在更新HU之前) - syncToIFSBatch(dto, handlingUnits); + syncToIFSBatchForPallet(dto, handlingUnits); // 5. 按库存主键字段汇总HandlingUnit数据 Map inventoryGroups = groupHandlingUnitsByInventoryKey(handlingUnits, originalLocations, dto.getTargetLocationId()); - + // 根据库位获取仓库ID + String warehouseId = null; + Location location = locationService.getByLocationIdAndSite(dto.getSite(), dto.getTargetLocationId()); + if (location != null) { + warehouseId = location.getWarehouseId(); + } else { + throw new XJException("目标库位不存在: " + dto.getTargetLocationId()); + } // 6. 批量处理库存操作(出库和入库) for (InventoryGroup group : inventoryGroups.values()) { // 从原库位出库 - /* inventoryStockService.changeInventoryStock( - group.site, - group.warehouseId, - group.partNo, - group.batchNo, - group.originalLocationId, - group.totalQty, - group.wdr, - "OUT" - );*/ + if (!"TEMP".equals(group.warehouseId)) { + inventoryStockService.changeInventoryStock( + group.site, + group.warehouseId, + group.partNo, + group.batchNo, + group.originalLocationId, + group.totalQty, + group.wdr, + "OUT"); + } // 到目标库位入库 - inventoryStockService.createStockWithLock( - group.site, - group.warehouseId, - group.partNo, - group.batchNo, - group.targetLocationId, - group.wdr, - group.totalQty, - "Y" - ); - + inventoryStockService.changeInventoryStock( + group.site, + warehouseId, + group.partNo, + group.batchNo, + group.originalLocationId, + group.totalQty, + group.wdr, + "IN"); // 创建汇总的出库和入库事务记录 createOutboundTransactionForGroup(dto, group, currentUser); createInboundTransactionForGroup(dto, group, currentUser); @@ -377,7 +380,7 @@ public class InventoryMoveServiceImpl implements InventoryMoveService { private void syncSingleGroupToIFSForPallet(MoveGroup group) { String jsonBody = null; String ifsResponse = null; - + try { Map params = new HashMap<>(); params.put("ifsDBName", ifsDBName); @@ -410,7 +413,7 @@ public class InventoryMoveServiceImpl implements InventoryMoveService { String errorMessage = IfsErrorMessageUtils.extractOracleErrorMessage(ifsResponse); log.warn("IFS移库同步失败 - 物料: {}, 批次: {}, 响应: {},已记录到错误日志表", group.partNo, group.lotBatchNo, ifsResponse); - + // 记录到错误日志表 - rqrq ifsCallErrorLogService.logIfsError( group.site, @@ -431,9 +434,9 @@ public class InventoryMoveServiceImpl implements InventoryMoveService { } catch (Exception e) { // rqrq - 异常情况也记录到错误日志表而不抛异常 log.error("IFS移库同步异常 - 物料: {}, 批次: {},已记录到错误日志表", group.partNo, group.lotBatchNo, e); - + String errorMessage = "系统异常: " + e.getMessage(); - + // 记录到错误日志表 - rqrq ifsCallErrorLogService.logIfsError( group.site, diff --git a/src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java b/src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java index ca85760..b95a334 100644 --- a/src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java +++ b/src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java @@ -2,6 +2,7 @@ package com.gaotao.modules.other.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.gaotao.common.exception.XJException; +import com.gaotao.common.utils.IfsErrorMessageUtils; import com.gaotao.modules.api.service.IfsApiIssueAndReturnService; import com.gaotao.modules.handlingunit.entity.HandlingUnit; import com.gaotao.modules.handlingunit.service.HandlingUnitService; @@ -71,7 +72,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); // 1. 验证目标库位 - validateTargetLocation(dto.getSite(), dto.getTargetLocationId()); + String warehouseId = validateTargetLocation(dto.getSite(), dto.getTargetLocationId()); // 2. 验证HandlingUnit List handlingUnits = validateHandlingUnits(dto); @@ -84,7 +85,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { transRequest.setSubList(subList); // 5. 调用独立的其它入库方法生成记录和变更库存 - List detailList = genOtherInboundTransAndChangeStock(transRequest, "IN"); + List detailList = genOtherInboundTransAndChangeStock(transRequest, "IN",warehouseId); // 6. 调用IFS接口同步入库信息 for (TransDetail detail : detailList) { @@ -104,6 +105,9 @@ public class OtherInboundServiceImpl implements OtherInboundService { // 检查IFS响应,如果失败可能需要回滚事务 if (!"IFSUpdated".equals(ifsResponse) && !"\"IFSUpdated\"".equals(ifsResponse)) { throw new XJException("IFS同步失败,响应: " + ifsResponse); + } else { + String errorMessage = IfsErrorMessageUtils.extractOracleErrorMessage(ifsResponse); + throw new Exception(errorMessage); } } catch (Exception ifsException) { throw new XJException("其它入库IFS同步失败: " + ifsException.getMessage()); @@ -121,21 +125,22 @@ public class OtherInboundServiceImpl implements OtherInboundService { /** * 验证目标库位 */ - private void validateTargetLocation(String site, String targetLocationId) { + private String validateTargetLocation(String site, String targetLocationId) { if (!locationService.validateTargetLocation(site, targetLocationId)) { throw new XJException("目标库位无效或未启用: " + targetLocationId); } - + // 获取库位详细信息进行额外校验 Location location = locationService.getValidLocation(site, targetLocationId); if (location == null) { throw new XJException("目标库位不存在: " + targetLocationId); } - + // 检查库位是否被冻结 if ("Y".equals(location.getHold())) { throw new XJException("目标库位已被冻结,无法入库: " + targetLocationId); } + return location.getWarehouseId(); } /** @@ -143,25 +148,25 @@ public class OtherInboundServiceImpl implements OtherInboundService { */ private List validateHandlingUnits(OtherInboundRequestDto dto) { List handlingUnits = new ArrayList<>(); - + for (String unitId : dto.getHandlingUnitIds()) { HandlingUnit hu = handlingUnitService.lambdaQuery() .eq(HandlingUnit::getUnitId, unitId) .eq(HandlingUnit::getSite, dto.getSite()) .one(); - + if (hu == null) { throw new XJException("HandlingUnit不存在: " + unitId); } - + // 检查HandlingUnit状态 if (!"X".equals(hu.getInStockFlag())) { throw new XJException("HandlingUnit状态不可用: " + unitId); } - + handlingUnits.add(hu); } - + return handlingUnits; } @@ -173,7 +178,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { transRequest.setSite(dto.getSite()); transRequest.setTransType("OI"); // 其它入库类型 transRequest.setStatus("C"); // 完成状态 - + // 构建备注信息 入库原因 transRequest.setRemark(dto.getInboundReason()); @@ -185,7 +190,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { */ private List buildOtherInboundSubList(List handlingUnits, OtherInboundRequestDto dto) { List subList = new ArrayList<>(); - + for (HandlingUnit hu : handlingUnits) { OtherInboundTransSubDto subDto = new OtherInboundTransSubDto(); subDto.setPartNo(hu.getPartNo()); @@ -196,10 +201,10 @@ public class OtherInboundServiceImpl implements OtherInboundService { subDto.setTransQty(hu.getQty().toString()); subDto.setDirection("+"); // 入库方向 subDto.setWdrNo(hu.getWdr() == null ? "*" : hu.getWdr()); - + subList.add(subDto); } - + return subList; } @@ -207,7 +212,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { * 其它入库独立的事务生成和库存变更方法 */ @Transactional - public List genOtherInboundTransAndChangeStock(OtherInboundTransRequestDto dto, String fangxiang) { + public List genOtherInboundTransAndChangeStock(OtherInboundTransRequestDto dto, String fangxiang,String warehouseId) { SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); String direction = ""; if("OUT".equals(fangxiang)){ @@ -236,7 +241,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { List detailList = new ArrayList<>(); List detailSubs = new ArrayList<>(); - + //保存sub double seqNo = 1.0; for (OtherInboundTransSubDto subDto : dto.getSubList()){ @@ -259,7 +264,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { .eq(HandlingUnit::getSite, dto.getSite()) .eq(HandlingUnit::getUnitId, subDto.getSubNo()) .one(); - + if (handlingUnit != null) { if("OUT".equals(fangxiang)){ handlingUnit.setInStockFlag("N"); @@ -275,18 +280,18 @@ public class OtherInboundServiceImpl implements OtherInboundService { detailSubs.add(detailSub); } - + //总计sub数量添加到list Map, Double> collect = detailSubs.stream().collect( Collectors.groupingBy(item -> Arrays.asList( - item.getSite(), - item.getPartNo(), - item.getBatchNo(), - item.getLocationId(), + item.getSite(), + item.getPartNo(), + item.getBatchNo(), + item.getLocationId(), item.getOrderRef3(), item.getOrderRef4() ), Collectors.summingDouble(TransDetailSub::getSubQty))); - + Double index = 1.0; for (Map.Entry, Double> entry : collect.entrySet()) { List key = entry.getKey(); @@ -329,7 +334,7 @@ public class OtherInboundServiceImpl implements OtherInboundService { for(TransDetail detail : detailList){ // 变更库存 - inventoryStockService.changeInventoryStock(detail.getSite(), detail.getOrderRef4(), detail.getPartNo(), + inventoryStockService.changeInventoryStock(detail.getSite(), warehouseId, detail.getPartNo(), detail.getBatchNo(), detail.getLocationId(), detail.getTransQty(), detail.getWdrNo(), fangxiang); } @@ -343,17 +348,17 @@ public class OtherInboundServiceImpl implements OtherInboundService { for (HandlingUnit hu : handlingUnits) { // 更新HandlingUnit的库位到目标库位 TransDetail matchedDetail = detailList.stream() - .filter(detail -> detail.getPartNo().equals(hu.getPartNo()) + .filter(detail -> detail.getPartNo().equals(hu.getPartNo()) && detail.getBatchNo().equals(hu.getBatchNo())) .findFirst() .orElse(null); - + if (matchedDetail != null) { hu.setLocationId(matchedDetail.getLocationId()); hu.setModifiedDate(new Date()); hu.setModifiedBy(currentUser.getUserDisplay()); hu.setInStockFlag("Y"); // 设置为在库状态 - + handlingUnitService.updateById(hu); } } diff --git a/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java b/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java index 69c9d95..5698f9a 100644 --- a/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java +++ b/src/main/java/com/gaotao/modules/other/service/impl/OtherOutboundServiceImpl.java @@ -1,6 +1,7 @@ package com.gaotao.modules.other.service.impl; import com.gaotao.common.exception.XJException; +import com.gaotao.common.utils.IfsErrorMessageUtils; import com.gaotao.modules.api.service.IfsApiIssueAndReturnService; import com.gaotao.modules.handlingunit.entity.HandlingUnit; import com.gaotao.modules.handlingunit.service.HandlingUnitService; @@ -80,33 +81,36 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { // 5. 调用独立的其它出库方法生成记录和变更库存 List detailList = genOtherOutboundTransAndChangeStock(transRequest, "OUT"); -// // 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("OUT"); -// ifsDto.setIfsReason(dto.getOutboundReason()); -// ifsDto.setIfsOperator(dto.getOperatorName()); -// -// try { -// String ifsResponse = ifsApiIssueAndReturnService.addOtherOutbound(ifsDto); -// // 检查IFS响应,如果失败可能需要回滚事务 -// if (!"IFSUpdated".equals(ifsResponse) && !"\"IFSUpdated\"".equals(ifsResponse)) { -// throw new XJException("IFS同步失败,响应: " + ifsResponse); -// } -// } catch (Exception ifsException) { -// throw new XJException("其它出库IFS同步失败: " + ifsException.getMessage()); -// } -// } + // 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.setIfsHandlingUnitID(BigDecimal.ZERO); + ifsDto.setIfsQuantity(detail.getTransQty()); + ifsDto.setIfsTransactionType("OUT"); + ifsDto.setIfsReason(dto.getOutboundReason()); + ifsDto.setIfsOperator(dto.getOperatorName()); + + try { + String ifsResponse = ifsApiIssueAndReturnService.addOtherOutbound(ifsDto); + // 检查IFS响应,如果失败可能需要回滚事务 + if (!"IFSUpdated".equals(ifsResponse) && !"\"IFSUpdated\"".equals(ifsResponse)) { + throw new XJException("IFS同步失败,响应: " + ifsResponse); + } else { + String errorMessage = IfsErrorMessageUtils.extractOracleErrorMessage(ifsResponse); + throw new Exception(errorMessage); + } + } catch (Exception ifsException) { + throw new XJException("其它出库IFS同步失败: " + ifsException.getMessage()); + } + } // 7. 更新HandlingUnit状态 updateHandlingUnitStatus(handlingUnits, detailList, currentUser); @@ -122,7 +126,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { // 这里应该通过Mapper查询数据库 // 暂时返回模拟数据,实际项目中需要实现具体的查询逻辑 List historyList = new ArrayList<>(); - + // 可以添加一些模拟数据用于测试 OtherOutboundHistoryDto history1 = new OtherOutboundHistoryDto(); history1.setTransNo("OO" + new SimpleDateFormat("yyMMddHHmmss").format(new Date()) + "001"); @@ -134,9 +138,9 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { history1.setOutboundReason("其它出库测试"); history1.setOutboundDate(new Date()); history1.setSite(site); - + historyList.add(history1); - + return historyList; } catch (Exception e) { throw new XJException("查询其它出库历史失败: " + e.getMessage()); @@ -148,17 +152,17 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { */ private List validateHandlingUnits(OtherOutboundRequestDto dto) { List handlingUnits = new ArrayList<>(); - + for (String unitId : dto.getHandlingUnitIds()) { HandlingUnit hu = handlingUnitService.lambdaQuery() .eq(HandlingUnit::getUnitId, unitId) .eq(HandlingUnit::getSite, dto.getSite()) .one(); - + if (hu == null) { throw new XJException("HandlingUnit不存在: " + unitId); } - + // 检查HandlingUnit状态 // if (!"AVAILABLE".equals(hu.getStatus()) && !"A".equals(hu.getStatusDb())) { // throw new XJException("HandlingUnit状态不可用: " + unitId); @@ -168,10 +172,10 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { if (!"Y".equals(hu.getInStockFlag())) { throw new XJException("HandlingUnit不在库,无法出库: " + unitId); } - + handlingUnits.add(hu); } - + return handlingUnits; } @@ -195,7 +199,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { // 检查库存数量是否足够 if (stock.getQtyOnHand().compareTo(hu.getQty()) < 0) { - throw new XJException("库存不足,无法出库: " + hu.getPartNo() + + throw new XJException("库存不足,无法出库: " + hu.getPartNo() + " 当前库存:" + stock.getQtyOnHand() + " 需要出库:" + hu.getQty()); } } @@ -209,10 +213,10 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { transRequest.setSite(dto.getSite()); transRequest.setTransType("OO"); // 其它出库类型 transRequest.setStatus("C"); // 完成状态 - + // 备注信息 出库原因 transRequest.setRemark(dto.getOutboundReason()); - + return transRequest; } @@ -221,7 +225,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { */ private List buildOtherOutboundSubList(List handlingUnits) { List subList = new ArrayList<>(); - + for (HandlingUnit hu : handlingUnits) { OtherOutboundTransSubDto subDto = new OtherOutboundTransSubDto(); subDto.setPartNo(hu.getPartNo()); @@ -232,10 +236,10 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { subDto.setTransQty(hu.getQty().toString()); subDto.setDirection("-"); // 出库方向 subDto.setWdrNo("*"); - + subList.add(subDto); } - + return subList; } @@ -272,7 +276,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { List detailList = new ArrayList<>(); List detailSubs = new ArrayList<>(); - + //保存sub for (OtherOutboundTransSubDto subDto : dto.getSubList()){ TransDetailSub detailSub = new TransDetailSub(); @@ -293,7 +297,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { .eq(HandlingUnit::getSite, dto.getSite()) .eq(HandlingUnit::getUnitId, subDto.getSubNo()) .one(); - + if (handlingUnit != null) { if("OUT".equals(fangxiang)){ handlingUnit.setInStockFlag("N"); @@ -309,18 +313,18 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { detailSubs.add(detailSub); } - + //总计sub数量添加到list Map, Double> collect = detailSubs.stream().collect( Collectors.groupingBy(item -> Arrays.asList( - item.getSite(), - item.getPartNo(), - item.getBatchNo(), - item.getLocationId(), + item.getSite(), + item.getPartNo(), + item.getBatchNo(), + item.getLocationId(), item.getOrderRef3(), item.getOrderRef4() ), Collectors.summingDouble(TransDetailSub::getSubQty))); - + Double index = 1.0; for (Map.Entry, Double> entry : collect.entrySet()) { List key = entry.getKey(); @@ -381,7 +385,7 @@ public class OtherOutboundServiceImpl implements OtherOutboundService { hu.setInStockFlag("N"); // 设置为不在库状态 hu.setStatus("ISSUED"); // 设置为已出库状态 hu.setStatusDb("I"); // 设置为已出库状态DB - + handlingUnitService.updateById(hu); } } diff --git a/src/main/java/com/gaotao/modules/po/service/impl/PoServiceImpl.java b/src/main/java/com/gaotao/modules/po/service/impl/PoServiceImpl.java index 8c7b332..3668e47 100644 --- a/src/main/java/com/gaotao/modules/po/service/impl/PoServiceImpl.java +++ b/src/main/java/com/gaotao/modules/po/service/impl/PoServiceImpl.java @@ -131,7 +131,7 @@ public class PoServiceImpl extends ServiceImpl implemen String poStatus = po.get("objstate") != null ? po.get("objstate").toString() : ""; String authorizationRequired = po.get("authorizationRequired") != null ? po.get("authorizationRequired").toString() : "FALSE"; // inventoryPartDB=false需要剔除 - poLineData.removeIf(line -> line.get("inventoryPartDB") != null && "false".equals(line.get("inventoryPartDB").toString())); + poLineData.removeIf(line -> line.get("inventoryPartDB") != null && "FALSE".equals(line.get("inventoryPartDB").toString())); // 制造日期 供应商批次 for (Map line : poLineData) { line.put("poStatus", poStatus);