From cef7e53894e142e69b34c210b65aeb8f2fea12fd Mon Sep 17 00:00:00 2001 From: lihao Date: Mon, 19 Jan 2026 10:37:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=98=E6=AC=BE=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=92=8C=E4=BE=9B=E5=BA=94=E5=95=86=E9=93=B6?= =?UTF-8?q?=E8=A1=8C=E8=B4=A6=E5=8F=B7=E4=B8=AD=E7=9A=84=E6=88=B7=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=EF=BC=8C=E8=BF=9B=E8=A1=8C=E6=A3=80?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/BillCheckSupplierrAction.java | 88 +++++++++++++++++++ .../app/config/authorize/arap_authorize.xml | 1 + .../arappub/config/action/arapbaseconfig.xml | 6 ++ 3 files changed, 95 insertions(+) create mode 100644 arap/src/client/nccloud/web/arap/arappub/action/BillCheckSupplierrAction.java diff --git a/arap/src/client/nccloud/web/arap/arappub/action/BillCheckSupplierrAction.java b/arap/src/client/nccloud/web/arap/arappub/action/BillCheckSupplierrAction.java new file mode 100644 index 00000000..b1f66276 --- /dev/null +++ b/arap/src/client/nccloud/web/arap/arappub/action/BillCheckSupplierrAction.java @@ -0,0 +1,88 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nccloud.web.arap.arappub.action; + + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import nc.bs.framework.common.NCLocator; +import nc.itf.arap.pub.IArapBillService; +import nc.itf.bd.bankacc.cust.ICustBankaccQueryService; +import nc.itf.bd.bankacc.subinfo.IBankAccSubInfoQueryService; +import nc.itf.bd.supplier.baseinfo.ISupplierBaseInfoQryService; +import nc.vo.arap.basebill.BaseAggVO; +import nc.vo.arap.basebill.BaseItemVO; +import nc.vo.bd.bankaccount.BankAccSubVO; +import nc.vo.bd.bankaccount.cust.CustBankaccUnionVO; +import nc.vo.bd.supplier.SupplierVO; +import nc.vo.pub.BusinessException; +import nccloud.framework.core.json.IJson; +import nccloud.framework.service.ServiceLocator; +import nccloud.framework.web.container.IRequest; +import nccloud.framework.web.json.JsonFactory; + +/** + * 20260114 在提交付款单的时候,供应商名称和供应商银行账号中的户名不一致,进行检验。提示即可 + */ +public class BillCheckSupplierrAction extends BillSaveAction { + public BillCheckSupplierrAction() { + } + + public Object doAction(IRequest request) { + String str = request.read(); + IJson json = JsonFactory.create(); + Map info = json.fromJson(str, Map.class); + + try { + List list= (List) info.get("delObjs"); + + List errorList = new ArrayList(); + for (Map m : list) { + String id = (String) m.get("pk_bill") != null ? (String) m.get("pk_bill") : (String) ((Map)m.get("pk_paybill")).get("value") ; + String[] childField = new String[]{"rowno"}; + BaseAggVO[] aggvo = ((IArapBillService)ServiceLocator.find(IArapBillService.class)).queryArapBillByPKs(new String[]{id}, "F3", (String[])null, childField); + for (BaseAggVO vo : aggvo) { + for (BaseItemVO itemVO:vo.getItems()){ + if(!checkSupplier(itemVO)) { + errorList.add(vo.getHeadVO().getBillno()); + } + } + } + } + + if (errorList.size() > 0) { + return json.toJson(errorList); + } + return true; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + private boolean checkSupplier(BaseItemVO itemVO) throws BusinessException { + String supplier = itemVO.getSupplier(); + String recaccount = itemVO.getRecaccount(); + if(null == supplier || supplier.length() == 0 || null == recaccount || recaccount.length() == 0){ + return false; + } + ISupplierBaseInfoQryService qryService = (ISupplierBaseInfoQryService)ServiceLocator.find(ISupplierBaseInfoQryService.class); + SupplierVO vo = qryService.querySupplierVOByPk(supplier); + ICustBankaccQueryService queryService = (ICustBankaccQueryService)ServiceLocator.find(ICustBankaccQueryService.class); + BankAccSubVO[] bankAccSubVOS = ((IBankAccSubInfoQueryService) ServiceLocator.find(IBankAccSubInfoQueryService.class)).querySubInfosByPKs(new String[]{recaccount}); + if (bankAccSubVOS != null && bankAccSubVOS.length > 0) { + return vo.getName().equals(bankAccSubVOS[0].getAccname()); + }else{ + return false; + } + // String bankAccountName = queryService.queryCustBankaccUnionVOByCustBank(recaccount).getBankaccbasVO().getName(); + + } + + +} diff --git a/arap/src/client/yyconfig/modules/arap/app/config/authorize/arap_authorize.xml b/arap/src/client/yyconfig/modules/arap/app/config/authorize/arap_authorize.xml index 2504c6c5..81cc4f4b 100644 --- a/arap/src/client/yyconfig/modules/arap/app/config/authorize/arap_authorize.xml +++ b/arap/src/client/yyconfig/modules/arap/app/config/authorize/arap_authorize.xml @@ -644,6 +644,7 @@ arap.paybill.queryconferwidget arap.confirmpaybill.queryconferwidget arap.arappub.savecheck + arap.arappub.checkSupplier diff --git a/arap/src/client/yyconfig/modules/arap/arappub/config/action/arapbaseconfig.xml b/arap/src/client/yyconfig/modules/arap/arappub/config/action/arapbaseconfig.xml index 7c064141..5c22bd7f 100644 --- a/arap/src/client/yyconfig/modules/arap/arappub/config/action/arapbaseconfig.xml +++ b/arap/src/client/yyconfig/modules/arap/arappub/config/action/arapbaseconfig.xml @@ -586,4 +586,10 @@ nccloud.web.arap.arappub.action.LinkBipAction Save + + arap.arappub.checkSupplier + + nccloud.web.arap.arappub.action.BillCheckSupplierrAction + Save +