diff --git a/arap/src/client/nccloud/web/arap/arappub/action/LinkBipAction.java b/arap/src/client/nccloud/web/arap/arappub/action/LinkBipAction.java index 69a6e4e6..a7b12388 100644 --- a/arap/src/client/nccloud/web/arap/arappub/action/LinkBipAction.java +++ b/arap/src/client/nccloud/web/arap/arappub/action/LinkBipAction.java @@ -50,6 +50,9 @@ public class LinkBipAction extends NCCAction { BaseItemVO itemVO = itemVOS[0]; String topBillid = itemVO.getTop_billid(); String topTradetype = itemVO.getTop_tradetype(); + if (MMValueCheck.isEmpty(topBillid)) { + ExceptionUtils.wrapBusinessException("未找到上层的采购发票id"); + } // NCCForUAPLogger.debug("topBillid:" + topBillid + " topTradetype:" + topTradetype); String sql = "SELECT a.pk_invoice,a.vbillcode," + " b.cextsrcbilltype, b.vextsrcbillcode, b.cextsrcid, b.cextsrcbid" + @@ -57,7 +60,7 @@ public class LinkBipAction extends NCCAction { " LEFT JOIN po_invoice a ON a.pk_invoice = b.pk_invoice" + " WHERE " + " a.pk_invoice = '" + topBillid + "'"; - NCCForUAPLogger.debug("sql:" + sql); + // NCCForUAPLogger.debug("sql:" + sql); Map billMap = (Map) new BaseDAO().executeQuery(sql, new MapProcessor()); if (MMValueCheck.isEmpty(billMap)) { ExceptionUtils.wrapBusinessException("未查询到采购发票,查询sql:" + sql); @@ -67,14 +70,11 @@ public class LinkBipAction extends NCCAction { } // =========根据应付单id查询采购发票的旗舰版id=========== - // String bip_pk = "2385789401874563081";// 测试环境 String bip_pk = billMap.get("cextsrcid") + ""; - bip_pk = "2414583154678431746";// 开发环境 - NCCForUAPLogger.debug("LinkBipAction-userCode = " + userCode); - userCode = "yhtmanager"; + // NCCForUAPLogger.debug("LinkBipAction-userCode = " + userCode); String url = "?redirctCode=" + redirctCode + "&billId=" + bip_pk + "&userCode=" + userCode; linkbipurl = linkbipurl + url; - NCCForUAPLogger.debug("LinkBipAction-linkbipurl = " + linkbipurl); + // NCCForUAPLogger.debug("LinkBipAction-linkbipurl = " + linkbipurl); return linkbipurl; } catch (Exception e) { throw new RuntimeException(e.getMessage());