From a78c7a2e19f751f878be9e25a4cab4174c159b8a Mon Sep 17 00:00:00 2001 From: "zhangxinah@yonyou.com" Date: Tue, 15 Apr 2025 19:10:54 +0800 Subject: [PATCH] =?UTF-8?q?2312=E6=94=B6=E6=AC=BE=E5=8D=95=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E6=A0=B9=E6=8D=AE=E8=A1=A8=E4=BD=93?= =?UTF-8?q?def37=E6=9D=A5=E8=BF=9B=E8=A1=8C=E5=88=A4=E6=96=AD-=E5=BC=A0?= =?UTF-8?q?=E9=91=AB0415?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/GatheringbillRestResource.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java index 5ee0548..a31a86b 100644 --- a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java +++ b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java @@ -99,8 +99,16 @@ public class GatheringbillRestResource extends ArapBaseRestResource { // 税码 String ctaxcode = ""; BaseDAO dao = new BaseDAO(); - // 销售订单号 + // 销售订单号 从表体拿 String csaleorderid = ""; + List> itemMaps = (List) billMap.get("items"); + List itemvos = new ArrayList(); + if (itemMaps != null && itemMaps.size() > 0) { + for (Map item : itemMaps) { + GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class); + csaleorderid = itemvo.getDef37(); + } + } try { HYPubBO hybo = new HYPubBO(); headvo.setIsinit(new UFBoolean(false)); @@ -113,10 +121,10 @@ public class GatheringbillRestResource extends ArapBaseRestResource { // 往来对象0-客户 2-部门 3-业务员 默认客户 headvo.setObjtype(0); // 销售订单号 - csaleorderid = headvo.getDef3(); if (StringUtils.isEmpty(csaleorderid)) { throw new BusinessException("销售订单不能为空"); - // return ResultMessageUtil.exceptionToJSON("销售订单不能为空", APIErrCodeEnum.BUSINESSEXCCODE.getCode()); + // return ResultMessageUtil.exceptionToJSON("销售订单不能为空", + // APIErrCodeEnum.BUSINESSEXCCODE.getCode()); } // 客户 Object customerid = hybo.findColValue("so_saleorder", "ccustomerid", @@ -181,8 +189,6 @@ public class GatheringbillRestResource extends ArapBaseRestResource { return ResultMessageUtil.exceptionToJSON(e); } - List> itemMaps = (List) billMap.get("items"); - List itemvos = new ArrayList(); if (itemMaps != null && itemMaps.size() > 0) { for (Map item : itemMaps) { GatheringBillItemVO itemvo = (GatheringBillItemVO) fromJsonToVO(item, GatheringBillItemVO.class); @@ -229,7 +235,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource { // UFDouble notax_cr = money_cr.sub(local_tax_cr); itemvo.setNotax_cr(notax_cr); - //zhangxinah增加组织本币无税金额(贷方) + // zhangxinah增加组织本币无税金额(贷方) itemvo.setLocal_notax_cr(notax_cr); // itemvo.setRate(UFDouble.ZERO_DBL);