From 9033478c9342cccaba8c06645f2c4564924030ef Mon Sep 17 00:00:00 2001 From: mzr Date: Thu, 17 Apr 2025 10:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E6=AC=BE=E6=96=B0=E5=A2=9E-=E5=B8=81?= =?UTF-8?q?=E7=A7=8D=E6=8E=A5=E6=94=B6BIP=E5=90=88=E5=90=8C=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arap/resource/GatheringbillRestResource.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java index a31a86b..73dd35c 100644 --- a/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java +++ b/arap/src/public/nc/api/arap/resource/GatheringbillRestResource.java @@ -143,7 +143,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource { Object ctaxcodeid = hybo.findColValue("so_saleorder_b", "ctaxcodeid", "csaleorderid = '" + csaleorderid + "' "); Object tc = hybo.findColValue("bd_taxcode", "code", "pk_taxcode = '" + ctaxcodeid + "' "); - ctaxcode = tc.toString(); + ctaxcode = getString_TrimAsNull(tc); // 业务员 Object cemployeeid = hybo.findColValue("so_saleorder", "cemployeeid", "csaleorderid = '" + csaleorderid + "' "); @@ -160,7 +160,10 @@ public class GatheringbillRestResource extends ArapBaseRestResource { } } // pk_currtype 币种编码 默认人民币 - headvo.setPk_currtype("CNY"); + if (headvo.getPk_currtype() == null || headvo.getPk_currtype().isEmpty()) { + headvo.setPk_currtype("CNY"); + } + // accessorynum 附件张数 默认2 headvo.setAccessorynum(2); // 制单人 默认BIP @@ -769,4 +772,12 @@ public class GatheringbillRestResource extends ArapBaseRestResource { return ResultMessageUtil.exceptionToJSON(e); } } + + public static String getString_TrimAsNull(Object value) { + if ((value == null) || (value.toString().trim().length() == 0)) { + return ""; + } + return value.toString().trim(); + } + }