From 3f53315824d1c2748db0f0ab854dc934bfac977b Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Thu, 30 Oct 2025 16:02:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=91=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?-=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/plugin/trd/FWImpl.java | 76 +++++++++++++++++++++----- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/lc123/cloud/app/plugin/trd/FWImpl.java b/lc123/cloud/app/plugin/trd/FWImpl.java index e1cbd8b..a0741bc 100644 --- a/lc123/cloud/app/plugin/trd/FWImpl.java +++ b/lc123/cloud/app/plugin/trd/FWImpl.java @@ -332,8 +332,11 @@ public class FWImpl { if(payname != null){ kxmc = payname.getString("name"); } + String fkrq = null; Date paydate = payEntry.getDate("paydate");//fkrq - String fkrq = sdf.format(paydate); + if(paydate != null){ + fkrq = sdf.format(paydate); + } BigDecimal fkbl = payEntry.getBigDecimal("payrate");//fkbl BigDecimal fkje = payEntry.getBigDecimal("payamount");//fkje boolean sfyf = payEntry.getBoolean("isprepay");//fkje @@ -938,10 +941,16 @@ public class FWImpl { BigDecimal sl = billentry.getBigDecimal("qty"); BigDecimal bhsdj = billentry.getBigDecimal("qty"); BigDecimal je = billentry.getBigDecimal("amount"); + String scrq = null; Date producedate = billentry.getDate("producedate"); - String scrq = sdf.format(producedate); + if(producedate != null){ + scrq = sdf.format(producedate); + } + String yxjzsj = null; Date expirydate = billentry.getDate("expirydate"); - String yxjzsj = sdf.format(expirydate); + if(expirydate != null){ + yxjzsj = sdf.format(expirydate); + } String drph = null; DynamicObject lot = billentry.getDynamicObject("lot"); if(lot != null){ @@ -1213,8 +1222,11 @@ public class FWImpl { String number = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(number); } + String cjrq = null; Date applydate = bill.getDate("applydate"); - String cjrq = sdf.format(applydate); + if(applydate != null){ + cjrq = sdf.format(applydate); + } DynamicObject settleorg = bill.getDynamicObject("settleorg"); String orgNumber = settleorg.getString("number"); String ywgz = FWUtils.getFwOrgNumberByKdOrgNumber(orgNumber); @@ -1514,8 +1526,11 @@ public class FWImpl { String number = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(number); } + String cjrq = null; Date changebizdate = bill.getDate("changebizdate"); - String cjrq = sdf.format(changebizdate); + if(changebizdate != null){ + cjrq = sdf.format(changebizdate); + } DynamicObject org = bill.getDynamicObject("org"); String orgnumber = org.getString("number"); String ywgz = FWUtils.getFwOrgNumberByKdOrgNumber(orgnumber); @@ -1525,8 +1540,11 @@ public class FWImpl { if("CGT001".equals(tqq9_cgyt)){ cgyt = 1; } + String yjfhsj = null; Date tqq9_datefield = bill.getDate("tqq9_datefield"); - String yjfhsj = sdf.format(tqq9_datefield); + if(tqq9_datefield != null){ + yjfhsj = sdf.format(tqq9_datefield); + } int fktj = 0; DynamicObject paycondition = bill.getDynamicObject("paycondition"); if(paycondition != null){ @@ -2171,10 +2189,16 @@ public class FWImpl { }else if ("C".equals(bizmode)){ ywms = 2; } + String htksrq = null; Date biztimebegin = bill.getDate("biztimebegin"); - String htksrq = sdf.format(biztimebegin); + if(biztimebegin != null){ + htksrq = sdf.format(biztimebegin); + } + String htjsrq = null; Date biztimeend = bill.getDate("biztimeend"); - String htjsrq = sdf.format(biztimeend); + if(biztimeend != null){ + htjsrq = sdf.format(biztimeend); + } int htzt = 0; DynamicObject contparties = bill.getDynamicObject("contparties"); String contpartiesNumber = contparties.getString("number"); @@ -2239,10 +2263,16 @@ public class FWImpl { if("1".equals(tqq9_rulestype)){ gzlx = 1; } + String flkssj = null; Date tqq9_startdate = rule.getDate("tqq9_startdate"); - String flkssj = sdf.format(tqq9_startdate); + if(tqq9_startdate != null){ + flkssj = sdf.format(tqq9_startdate); + } + String fljssj = null; Date tqq9_enddate = rule.getDate("tqq9_enddate"); - String fljssj = sdf.format(tqq9_enddate); + if(tqq9_enddate != null){ + fljssj = sdf.format(tqq9_enddate); + } BigDecimal ygbl = rule.getBigDecimal("tqq9_estimatepro"); BigDecimal mbcgje = rule.getBigDecimal("tqq9_targetamount"); String flpp = ""; @@ -2616,10 +2646,16 @@ public class FWImpl { }else if ("C".equals(bizmode)){ ywms = 2; } + String htksrq = null; Date biztimebegin = bill.getDate("biztimebegin"); - String htksrq = sdf.format(biztimebegin); + if(biztimebegin != null){ + htksrq = sdf.format(biztimebegin); + } + String htjsrq = null; Date biztimeend = bill.getDate("biztimeend"); - String htjsrq = sdf.format(biztimeend); + if(biztimeend != null){ + htjsrq = sdf.format(biztimeend); + } int htzt = 0; DynamicObject contparties = bill.getDynamicObject("contparties"); String contpartiesNumber = contparties.getString("number"); @@ -2684,10 +2720,16 @@ public class FWImpl { if("1".equals(tqq9_rulestype)){ gzlx = 1; } + String flkssj = null; Date tqq9_startdate = rule.getDate("tqq9_startdate"); - String flkssj = sdf.format(tqq9_startdate); + if(tqq9_startdate != null){ + flkssj = sdf.format(tqq9_startdate); + } + String fljssj = null; Date tqq9_enddate = rule.getDate("tqq9_enddate"); - String fljssj = sdf.format(tqq9_enddate); + if(tqq9_enddate != null){ + fljssj = sdf.format(tqq9_enddate); + } BigDecimal ygbl = rule.getBigDecimal("tqq9_estimatepro"); BigDecimal mbcgje = rule.getBigDecimal("tqq9_targetamount"); String flpp = ""; @@ -3742,8 +3784,12 @@ public class FWImpl { //批号 String ph = entry.getString("lotnumber"); //生产日期 + String scrq = null; Date producedate = entry.getDate("producedate"); - String scrq = sdf.format(producedate); + if(producedate != null){ + scrq = sdf.format(producedate); + } + //短缺数量 BigDecimal dqsl = entry.getBigDecimal("qty"); //短缺承担方