diff --git a/pu/src/client/nccloud/web/pu/arrival/action/QCRptDataPushtoQmsAction.java b/pu/src/client/nccloud/web/pu/arrival/action/QCRptDataPushtoQmsAction.java index 9734528e..a5b90823 100644 --- a/pu/src/client/nccloud/web/pu/arrival/action/QCRptDataPushtoQmsAction.java +++ b/pu/src/client/nccloud/web/pu/arrival/action/QCRptDataPushtoQmsAction.java @@ -250,10 +250,13 @@ public class QCRptDataPushtoQmsAction implements ICommonAction { } private boolean checkIfOrg(String code, Map configParams) throws BusinessException { - String targetCode = configParams.get("xbOrg"); + String targetCode = configParams.get("xbqcOrg"); if (targetCode == null || StringUtils.isEmpty(targetCode)) { throw new BusinessException("未配置组织参数"); } + if (targetCode.contains("qc-")) { + targetCode = targetCode.replace("qc-", ""); + } String[] orgItem = targetCode.split(","); for (String orgCode : orgItem) { if (!orgCode.isEmpty() && orgCode.equals(code)) { diff --git a/qc/src/client/nccloud/web/qc/qcconclusion/action/QCRptDataPushtoQmsAction.java b/qc/src/client/nccloud/web/qc/qcconclusion/action/QCRptDataPushtoQmsAction.java index 1f86be06..5a5750aa 100644 --- a/qc/src/client/nccloud/web/qc/qcconclusion/action/QCRptDataPushtoQmsAction.java +++ b/qc/src/client/nccloud/web/qc/qcconclusion/action/QCRptDataPushtoQmsAction.java @@ -254,10 +254,13 @@ public class QCRptDataPushtoQmsAction implements ICommonAction { } private boolean checkIfOrg(String code, Map configParams) throws BusinessException { - String targetCode = configParams.get("xbOrg"); + String targetCode = configParams.get("xbqcOrg"); if (targetCode == null || StringUtils.isEmpty(targetCode)) { throw new BusinessException("未配置组织参数"); } + if (targetCode.contains("qc-")) { + targetCode = targetCode.replace("qc-", ""); + } String[] orgItem = targetCode.split(","); for (String orgCode : orgItem) { if (!orgCode.isEmpty() && orgCode.equals(code)) { diff --git a/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncDeleteQcQmsRule.java b/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncDeleteQcQmsRule.java index 51ad367e..5225bcf1 100644 --- a/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncDeleteQcQmsRule.java +++ b/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncDeleteQcQmsRule.java @@ -249,10 +249,13 @@ public class SyncDeleteQcQmsRule implements IRule { } private boolean checkIfOrg(String code, Map configParams) throws BusinessException { - String targetCode = configParams.get("xbOrg"); + String targetCode = configParams.get("xbqcOrg"); if (targetCode == null || StringUtils.isEmpty(targetCode)) { throw new BusinessException("未配置组织参数"); } + if (targetCode.contains("qc-")) { + targetCode = targetCode.replace("qc-", ""); + } String[] orgItem = targetCode.split(","); for (String orgCode : orgItem) { if (!orgCode.isEmpty() && orgCode.equals(code)) { diff --git a/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncQcQmsRule.java b/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncQcQmsRule.java index 3ead97ec..77102749 100644 --- a/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncQcQmsRule.java +++ b/qc/src/private/nc/bs/qc/c003/maintain/rule/SyncQcQmsRule.java @@ -141,7 +141,7 @@ public class SyncQcQmsRule implements IRule { itemObj.put("wlxhgg", materialtype + materialspec); // 物料型号规格 itemObj.put("sjsl", reportHeaderVO.getNapplynum().toString()); // 送检数量(设计单位),按设计计量单位统计的送检数量 itemObj.put("jldw", cunitname); // 计量单位 - itemObj.put("bz", getBz(bvo,reportItemVO.getCfirstbid())); // 明细备注,送货单备注 + itemObj.put("bz", getBz(bvo, reportItemVO.getCfirstbid())); // 明细备注,送货单备注 itemObj.put("bipzyid", pkReportbill); // 质检报告ID itemObj.put("bipqdid", reportItemVO.getPk_reportbill_b()); // 质检报告明细ID contentArray.add(itemObj); @@ -151,15 +151,17 @@ public class SyncQcQmsRule implements IRule { updateArrveOrder(hvo.getPk_arriveorder()); } } + private void updateArrveOrder(String pkArriveorder) throws DAOException { BaseDAO dao = new BaseDAO(); String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder='" + pkArriveorder + "'"; dao.executeUpdate(sql); } + private Object getBz(ArriveItemVO[] bvo, String cfirstbid) { for (ArriveItemVO arriveItemVO : bvo) { - if(arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) { + if (arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) { return arriveItemVO.getVmemob(); } } @@ -223,10 +225,13 @@ public class SyncQcQmsRule implements IRule { } private boolean checkIfOrg(String code, Map configParams) throws BusinessException { - String targetCode = configParams.get("xbOrg"); + String targetCode = configParams.get("xbqcOrg"); if (targetCode == null || StringUtils.isEmpty(targetCode)) { throw new BusinessException("未配置组织参数"); } + if (targetCode.contains("qc-")) { + targetCode = targetCode.replace("qc-", ""); + } String[] orgItem = targetCode.split(","); for (String orgCode : orgItem) { if (!orgCode.isEmpty() && orgCode.equals(code)) {