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(); + } + }