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 1/2] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=8E=A5=E5=8F=A3=E3=80=91=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96-=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E5=88=A4?= =?UTF-8?q?=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"); //短缺承担方 From 9c4b5853734231719d3e047de230ee6887f6ebb5 Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Thu, 30 Oct 2025 16:52:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=8E=A5=E5=8F=A3=E3=80=91=E8=A1=A5=E5=85=A8=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/plugin/trd/FWImpl.java | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/lc123/cloud/app/plugin/trd/FWImpl.java b/lc123/cloud/app/plugin/trd/FWImpl.java index a0741bc..4423da6 100644 --- a/lc123/cloud/app/plugin/trd/FWImpl.java +++ b/lc123/cloud/app/plugin/trd/FWImpl.java @@ -4225,6 +4225,21 @@ public class FWImpl { String sqqy = bill.getString("tqq9_textfield41"); String lxdh = bill.getString("tqq9_textfield42"); int syyxts6 = bill.getInt("tqq9_validdays_frsq"); + String qylx = null; + String tqq9_combofield31 = bill.getString("tqq9_combofield31"); + if("A".equals(tqq9_combofield31)){ + qylx = "0"; + }else if("B".equals(tqq9_combofield31)){ + qylx = "1"; + }else if("C".equals(tqq9_combofield31)){ + qylx = "2"; + }else if("D".equals(tqq9_combofield31)){ + qylx = "3"; + }else if("E".equals(tqq9_combofield31)){ + qylx = "4"; + }else if("F".equals(tqq9_combofield31)){ + qylx = "5"; + } //联系人明细 JSONObject detail1 = new JSONObject(); @@ -4405,7 +4420,6 @@ public class FWImpl { JSONObject m30 = new JSONObject(); m30.put("fieldName", "yyzzbh"); m30.put("fieldValue", yyzzbh); - JSONObject m40 = new JSONObject(); m40.put("fieldName", "fddbr"); m40.put("fieldValue", fddbr); @@ -4589,12 +4603,18 @@ public class FWImpl { JSONObject m103 = new JSONObject(); m103.put("fieldName", "syyxts6"); m103.put("fieldValue", syyxts6); + JSONObject m104 = new JSONObject(); + m104.put("fieldName", "qymc"); + m104.put("fieldValue", gysmc); + JSONObject m105 = new JSONObject(); + m105.put("fieldName", "qylx"); + m105.put("fieldValue", qylx); List mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16, m17,m18,m19,m20,m21,m22,m23,m24,m25,m27,m29,m30,m40,m41,m42,m43,m44,m45,m46,m47,m48,m49,m50,m51,m52, m53,m54,m55,m56,m57,m58,m59,m60,m61,m62,m63,m64,m65,m66,m67,m68,m69,m70,m71,m72,m73,m74,m75,m76,m77, m78,m79,m80,m81,m82,m83,m84,m85,m89,m90, - m91,m92,m93,m94,m95,m96,m97,m98,m99,m100,m101,m102,m103)); + m91,m92,m93,m94,m95,m96,m97,m98,m99,m100,m101,m102,m103,m104,m105)); // 附件 List fjList = new ArrayList<>(); List> attachments = AttachmentServiceHelper.getAttachments("bd_supplier", bill.getPkValue(), "tqq9_attachmentpanelap"); @@ -4615,7 +4635,6 @@ public class FWImpl { fjObj.put("fieldValue", fjList); mlist.add(fjObj); } - // TODO 企业名称、企业类型 JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist);