From 5729ff50ba7f97b3c563aec36f67d86e1c6e5571 Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Fri, 14 Nov 2025 16:24:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=B3=9B=E5=BE=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E3=80=91=E5=A4=84=E7=90=86=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=EF=BC=8C=E7=9B=98=E7=82=B9=E8=A1=A8=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=94=B3=E8=AF=B7=E7=9A=84=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/plugin/trd/FWImpl.java | 1566 ++++++++++++------------ 1 file changed, 793 insertions(+), 773 deletions(-) diff --git a/lc123/cloud/app/plugin/trd/FWImpl.java b/lc123/cloud/app/plugin/trd/FWImpl.java index 451437b..e0f129a 100644 --- a/lc123/cloud/app/plugin/trd/FWImpl.java +++ b/lc123/cloud/app/plugin/trd/FWImpl.java @@ -72,7 +72,6 @@ public class FWImpl { /** * 采购供应商推送泛微 - * * @param bill * @return */ @@ -87,10 +86,10 @@ public class FWImpl { String cjr = null; String deptNumber = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -99,99 +98,99 @@ public class FWImpl { String ywgz = FWUtils.getFwOrgNumberByKdOrgNumber(orgNumber); int gysfl = 0; String tqq9_combofield5_gysfl = bill.getString("tqq9_combofield5_gysfl"); - if ("02".equals(tqq9_combofield5_gysfl)) { + if ("02".equals(tqq9_combofield5_gysfl)){ gysfl = 1; } String cjlx = ""; String tqq9_mulcombofield = bill.getString("tqq9_mulcombofield"); - if (StringUtils.isNotBlank(tqq9_mulcombofield)) { - if (tqq9_mulcombofield.contains("A")) { + if(StringUtils.isNotBlank(tqq9_mulcombofield)){ + if(tqq9_mulcombofield.contains("A")){ cjlx = cjlx + "," + "0"; } - if (tqq9_mulcombofield.contains("B")) { + if(tqq9_mulcombofield.contains("B")){ cjlx = cjlx + "," + "1"; } - if (StringUtils.isNotBlank(cjlx)) { + if(StringUtils.isNotBlank(cjlx)){ cjlx = cjlx.substring(1); } } String gysqyzz = ""; String tqq9_mulcombofield1 = bill.getString("tqq9_mulcombofield1"); - if (StringUtils.isNotBlank(tqq9_mulcombofield1)) { - if (tqq9_mulcombofield1.contains("A")) { + if(StringUtils.isNotBlank(tqq9_mulcombofield1)){ + if(tqq9_mulcombofield1.contains("A")){ gysqyzz = gysqyzz + "," + "0"; } - if (tqq9_mulcombofield1.contains("B")) { + if(tqq9_mulcombofield1.contains("B")){ gysqyzz = gysqyzz + "," + "1"; } - if (tqq9_mulcombofield1.contains("C")) { + if(tqq9_mulcombofield1.contains("C")){ gysqyzz = gysqyzz + "," + "2"; } - if (StringUtils.isNotBlank(gysqyzz)) { + if(StringUtils.isNotBlank(gysqyzz)){ gysqyzz = gysqyzz.substring(1); } } int oazt = 0; int sfnbgys = 1; boolean chkisinternalcompany = bill.getBoolean("chkisinternalcompany"); - if (chkisinternalcompany) { + if (chkisinternalcompany){ sfnbgys = 0; } String nbywdy = null; DynamicObject internal_company = bill.getDynamicObject("internal_company"); - if (internal_company != null) { + if(internal_company != null){ nbywdy = internal_company.getString("name"); } int sfylqx = 1; boolean tqq9_sfylqx = bill.getBoolean("tqq9_sfylqx"); - if (tqq9_sfylqx) { + if(tqq9_sfylqx){ sfylqx = 0; } int sfcggys = 1; boolean tqq9_ispur = bill.getBoolean("tqq9_ispur"); - if (tqq9_ispur) { + if (tqq9_ispur){ sfcggys = 0; } int zzsyzxyxts = bill.getInt("tqq9_minvaliddays"); int sfyyyzz = 1; boolean tqq9_gysyyzz = bill.getBoolean("tqq9_gysyyzz"); - if (tqq9_gysyyzz) { + if(tqq9_gysyyzz){ sfyyyzz = 0; } int sfyylqxscxkz = 1; boolean tqq9_gysylqxscxkz = bill.getBoolean("tqq9_gysylqxscxkz"); - if (tqq9_gysylqxscxkz) { + if(tqq9_gysylqxscxkz){ sfyylqxscxkz = 0; } int sfyylqxjyxkz = 1; boolean tqq9_gysylqxjyxkz = bill.getBoolean("tqq9_gysylqxjyxkz"); - if (tqq9_gysylqxjyxkz) { + if(tqq9_gysylqxjyxkz){ sfyylqxjyxkz = 0; } int sfydelylqxjybapz = 1; boolean tqq9_gysdelylqxjybapz = bill.getBoolean("tqq9_gysdelylqxjybapz"); - if (tqq9_gysdelylqxjybapz) { + if(tqq9_gysdelylqxjybapz){ sfydelylqxjybapz = 0; } int sfyyljgzhxkz = 1; boolean tqq9_gysyljgzxxkz = bill.getBoolean("tqq9_gysyljgzxxkz"); - if (tqq9_gysyljgzxxkz) { + if(tqq9_gysyljgzxxkz){ sfyyljgzhxkz = 0; } int sfyhzpxkz = 1; boolean tqq9_gyshzpxkz = bill.getBoolean("tqq9_gyshzpxkz"); - if (tqq9_gyshzpxkz) { + if(tqq9_gyshzpxkz){ sfyhzpxkz = 0; } int sfyzlbzs = 1; boolean tqq9_gyszlbzs = bill.getBoolean("tqq9_gyszlbzs"); - if (tqq9_gyszlbzs) { + if(tqq9_gyszlbzs){ sfyzlbzs = 0; } int sfyfrwtsqs = 1; boolean tqq9_gysfrwtsqs = bill.getBoolean("tqq9_gysfrwtsqs"); - if (tqq9_gysfrwtsqs) { + if(tqq9_gysfrwtsqs){ sfyfrwtsqs = 0; } String bz = bill.getString("tqq9_bzgys"); @@ -200,24 +199,24 @@ public class FWImpl { String fddbr = bill.getString("tqq9_textfield210"); String clrq = null; Date tqq9_datefield51 = bill.getDate("tqq9_datefield51"); - if (tqq9_datefield51 != null) { + if(tqq9_datefield51 != null){ clrq = sdf.format(tqq9_datefield51); } String qsrq = null; Date tqq9_yyzzqsrq1 = bill.getDate("tqq9_yyzzqsrq1"); - if (tqq9_yyzzqsrq1 != null) { + if(tqq9_yyzzqsrq1 != null){ qsrq = sdf.format(tqq9_yyzzqsrq1); } String sxrq = null; Date tqq9_datefield91 = bill.getDate("tqq9_datefield91"); - if (tqq9_datefield91 != null) { + if(tqq9_datefield91 != null){ sxrq = sdf.format(tqq9_datefield91); } String zczb = bill.getString("tqq9_textfield3_zczb1"); String zs = bill.getString("tqq9_textfield4_zs1"); int ylxs = 1; boolean tqq9_yyzzsfylxs1 = bill.getBoolean("tqq9_yyzzsfylxs1"); - if (tqq9_yyzzsfylxs1) { + if (tqq9_yyzzsfylxs1){ ylxs = 0; } String ylqxscxkzbh = bill.getString("tqq9_textfield18"); @@ -228,12 +227,12 @@ public class FWImpl { String scdz2 = bill.getString("tqq9_textfield21"); String qsrq2 = null; Date tqq9_datefield = bill.getDate("tqq9_datefield"); - if (tqq9_datefield != null) { + if(tqq9_datefield != null){ qsrq2 = sdf.format(tqq9_datefield); } String sxrq2 = null; Date tqq9_datefield1 = bill.getDate("tqq9_datefield1"); - if (tqq9_datefield1 != null) { + if(tqq9_datefield1 != null){ sxrq2 = sdf.format(tqq9_datefield1); } String scfwelcpfl = ""; @@ -243,7 +242,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwelcpfl = scfwelcpfl + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwelcpfl)) { + if(StringUtils.isNotBlank(scfwelcpfl)){ scfwelcpfl = scfwelcpfl.substring(1); } String scfwslcpfl = ""; @@ -253,7 +252,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwslcpfl = scfwslcpfl + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwslcpfl)) { + if(StringUtils.isNotBlank(scfwslcpfl)){ scfwslcpfl = scfwslcpfl.substring(1); } String ylqxjyxkzbh = bill.getString("tqq9_textfield16"); @@ -266,12 +265,12 @@ public class FWImpl { String qyfzr111 = bill.getString("tqq9_textfield7"); String qsrq111 = null; Date tqq9_datefield20 = bill.getDate("tqq9_datefield20"); - if (tqq9_datefield20 != null) { + if(tqq9_datefield20 != null){ qsrq111 = sdf.format(tqq9_datefield20); } String sxrq111 = null; Date tqq9_datefield21 = bill.getDate("tqq9_datefield21"); - if (tqq9_datefield21 != null) { + if(tqq9_datefield21 != null){ sxrq111 = sdf.format(tqq9_datefield21); } String scfwslcpfl111 = ""; @@ -281,7 +280,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwslcpfl111 = scfwslcpfl111 + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwslcpfl111)) { + if(StringUtils.isNotBlank(scfwslcpfl111)){ scfwslcpfl111 = scfwslcpfl111.substring(1); } String delylqxjybah = bill.getString("tqq9_textfield26"); @@ -299,12 +298,12 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwelcpfl4 = scfwelcpfl4 + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwelcpfl4)) { + if(StringUtils.isNotBlank(scfwelcpfl4)){ scfwelcpfl4 = scfwelcpfl4.substring(1); } String barq = null; Date tqq9_datefield4 = bill.getDate("tqq9_datefield4"); - if (tqq9_datefield4 != null) { + if(tqq9_datefield4 != null){ barq = sdf.format(tqq9_datefield4); } String yljgmc = bill.getString("tqq9_textfield29"); @@ -315,31 +314,31 @@ public class FWImpl { String zlxm5 = bill.getString("tqq9_textfield12"); String qsrq5 = null; Date tqq9_datefield6 = bill.getDate("tqq9_datefield6"); - if (tqq9_datefield6 != null) { + if(tqq9_datefield6 != null){ qsrq5 = sdf.format(tqq9_datefield6); } String sxrq5 = null; Date tqq9_datefield22 = bill.getDate("tqq9_datefield22"); - if (tqq9_datefield22 != null) { + if(tqq9_datefield22 != null){ sxrq5 = sdf.format(tqq9_datefield22); } String bz5 = bill.getString("tqq9_bz5"); String xkzh = bill.getString("tqq9_textxkzh"); String xkzbfrq = null; Date tqq9_licensestartdate = bill.getDate("tqq9_licensestartdate"); - if (tqq9_licensestartdate != null) { + if(tqq9_licensestartdate != null){ xkzbfrq = sdf.format(tqq9_licensestartdate); } String xkzjzrq = null; Date tqq9_licenseenddate = bill.getDate("tqq9_licenseenddate"); - if (tqq9_licenseenddate != null) { + if(tqq9_licenseenddate != null){ xkzjzrq = sdf.format(tqq9_licenseenddate); } int syyxts = bill.getInt("tqq9_integerfield"); String qymc6 = bill.getString("tqq9_qymc"); String zlbzxyyxqz = null; Date tqq9_zlbzxyyxqz = bill.getDate("tqq9_zlbzxyyxqz"); - if (tqq9_zlbzxyyxqz != null) { + if(tqq9_zlbzxyyxqz != null){ zlbzxyyxqz = sdf.format(tqq9_zlbzxyyxqz); } int syyxts5 = bill.getInt("tqq9_validdays_zlbz"); @@ -347,12 +346,12 @@ public class FWImpl { String sfzh = bill.getString("tqq9_sfz"); String qyrq6 = null; Date tqq9_qyrq = bill.getDate("tqq9_qyrq"); - if (tqq9_qyrq != null) { + if(tqq9_qyrq != null){ qyrq6 = sdf.format(tqq9_qyrq); } String tyrq6 = null; Date tqq9_datefield7 = bill.getDate("tqq9_datefield7"); - if (tqq9_datefield7 != null) { + if(tqq9_datefield7 != null){ tyrq6 = sdf.format(tqq9_datefield7); } String sqcpx = bill.getString("tqq9_textfield37"); @@ -361,17 +360,17 @@ public class FWImpl { int syyxts6 = bill.getInt("tqq9_validdays_frsq"); String qylx = null; String tqq9_combofield31 = bill.getString("tqq9_combofield31"); - if ("A".equals(tqq9_combofield31)) { + if("A".equals(tqq9_combofield31)){ qylx = "0"; - } else if ("B".equals(tqq9_combofield31)) { + }else if("B".equals(tqq9_combofield31)){ qylx = "1"; - } else if ("C".equals(tqq9_combofield31)) { + }else if("C".equals(tqq9_combofield31)){ qylx = "2"; - } else if ("D".equals(tqq9_combofield31)) { + }else if("D".equals(tqq9_combofield31)){ qylx = "3"; - } else if ("E".equals(tqq9_combofield31)) { + }else if("E".equals(tqq9_combofield31)){ qylx = "4"; - } else if ("F".equals(tqq9_combofield31)) { + }else if("F".equals(tqq9_combofield31)){ qylx = "5"; } String bgyy = bill.getString("tqq9_bgyy"); @@ -388,7 +387,7 @@ public class FWImpl { String yx = linkman.getString("email"); int sfmr = 1; boolean isdefault_linkman = linkman.getBoolean("isdefault_linkman"); - if (isdefault_linkman) { + if(isdefault_linkman){ sfmr = 0; } @@ -413,18 +412,18 @@ public class FWImpl { String skfmc = bankEntry.getString("accountname"); String khyh = null; DynamicObject bank = bankEntry.getDynamicObject("bank"); - if (bank != null) { + if(bank != null){ khyh = bank.getString("name"); } String yhzh = bankEntry.getString("bankaccount"); int sfmr = 1; boolean isdefault_bank = bankEntry.getBoolean("isdefault_bank"); - if (isdefault_bank) { + if(isdefault_bank){ sfmr = 0; } String bze = null; DynamicObject currency = bankEntry.getDynamicObject("currency"); - if (currency != null) { + if(currency != null){ bze = currency.getString("number"); } @@ -557,18 +556,18 @@ public class FWImpl { } - public static String returnExprNo(DynamicObject dataEntity) { + public static String returnExprNo(DynamicObject dataEntity){ DynamicObjectCollection wlEntries = dataEntity.getDynamicObjectCollection("tqq9_entrywl"); String kddh = ""; for (DynamicObject entity : wlEntries) { String tqq9_kddh = entity.getString("tqq9_kddh"); kddh = kddh + "," + tqq9_kddh; } - if (StringUtils.isNotBlank(kddh)) { + if(StringUtils.isNotBlank(kddh)){ kddh = kddh.substring(1); String billno = dataEntity.getString("billno"); String tqq9_fwrequestid = dataEntity.getString("tqq9_fwrequestid"); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ JSONObject mainTable = new JSONObject(); mainTable.put("lcid", tqq9_fwrequestid); mainTable.put("kddh", kddh); @@ -576,7 +575,7 @@ public class FWImpl { DynamicObject creator = dataEntity.getDynamicObject("creator"); DynamicObject tqq9_dept = dataEntity.getDynamicObject("tqq9_dept"); String fwuserid = null; - if (tqq9_dept != null) { + if(tqq9_dept != null){ fwuserid = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), tqq9_dept.getString("number")); } @@ -588,13 +587,13 @@ public class FWImpl { } - public static String returnPayState(DynamicObject dataEntity) { + public static String returnPayState(DynamicObject dataEntity){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String tqq9_fwrequestid = dataEntity.getString("tqq9_fwrequestid");//泛微流程ID - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ Date paydate = dataEntity.getDate("paydate");//付款日期 String jyrq = ""; - if (paydate != null) { + if(paydate != null){ jyrq = sdf.format(paydate); } String jyzy = dataEntity.getString("description");//摘要 @@ -609,48 +608,47 @@ public class FWImpl { // 6:交易处理中:E企明付款处理中, 交易处理中:E企明付款处理中。-E // 7:交易退回:E企明付款被退回] 交易退回:E企明付款被退回。-G String fkzt = null; - if ("D".equals(tqq9_cwztfkzt)) { + if("D".equals(tqq9_cwztfkzt)){ fkzt = "4"; - } else if ("F".equals(tqq9_cwztfkzt)) { + }else if("F".equals(tqq9_cwztfkzt)){ fkzt = "5"; - } else if ("E".equals(tqq9_cwztfkzt)) { + }else if("E".equals(tqq9_cwztfkzt)){ fkzt = "6"; - } else if ("G".equals(tqq9_cwztfkzt)) { + }else if("G".equals(tqq9_cwztfkzt)){ fkzt = "7"; } String tqq9_dzhdbh = dataEntity.getString("tqq9_dzhdbh");//电子回单编号 String tqq9_digital_receipt = dataEntity.getString("tqq9_digital_receipt");//电子回单编号 String filename = ""; - String content = null; - if (StringUtils.isNotBlank(tqq9_digital_receipt)) { + if(StringUtils.isNotBlank(tqq9_digital_receipt)){ HttpRequest request = HttpRequest.get(tqq9_digital_receipt); HttpResponse response = request.execute(); String contentDisposition = response.header("Content-Disposition"); if (contentDisposition != null && contentDisposition.contains("filename=")) { filename = contentDisposition.split("filename=")[1].replace("\"", ""); } - + } // List> attachments = AttachmentServiceHelper.getAttachments("cas_paybill", dataEntity.getPkValue(), "attachmentpanel"); // for (Map attachment : attachments) { // String filePath = (String) attachment.get("url"); // System.out.println(); // } - byte[] bytes = HttpUtil.downloadBytes(tqq9_digital_receipt); - content = cn.hutool.core.codec.Base64.encode(bytes); - if (StringUtils.isBlank(filename)) { - filename = "银行电子回单" + new Date().getTime(); - String hz = ".jpg"; - if (tqq9_digital_receipt.contains(".pdf")) { - hz = ".pdf"; - } else if (tqq9_digital_receipt.contains(".jpeg")) { - hz = ".jpeg"; - } else if (tqq9_digital_receipt.contains(".png")) { - hz = ".png"; - } - filename = filename + hz; + byte[] bytes = HttpUtil.downloadBytes(tqq9_digital_receipt); + String content = cn.hutool.core.codec.Base64.encode(bytes); + if(StringUtils.isBlank(filename)){ + filename = "银行电子回单"+new Date().getTime(); + String hz = ".jpg"; + if(tqq9_digital_receipt.contains(".pdf")){ + hz = ".pdf"; + }else if(tqq9_digital_receipt.contains(".jpeg")){ + hz = ".jpeg"; + }else if(tqq9_digital_receipt.contains(".png")){ + hz = ".png"; } + filename = filename + hz; } + JSONObject mainTable = new JSONObject(); mainTable.put("lcid", tqq9_fwrequestid); mainTable.put("fkzt", fkzt); @@ -666,10 +664,10 @@ public class FWImpl { String billno = dataEntity.getString("billno"); DynamicObject creator = dataEntity.getDynamicObject("creator"); - creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), "bos_user"); + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(),"bos_user"); DynamicObject tqq9_dept = dataEntity.getDynamicObject("tqq9_dept"); String fwuserid = null; - if (tqq9_dept != null) { + if(tqq9_dept != null){ fwuserid = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), tqq9_dept.getString("number")); } @@ -692,13 +690,13 @@ public class FWImpl { String cjbm = ""; String deptNumber = null; DynamicObject tqq9_dept = pm_purorderbill.getDynamicObject("tqq9_dept");//cjbm - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); String fwOrgNumber = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); if (StringUtils.isNotBlank(fwOrgNumber)) { cjbm = fwOrgNumber; } - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -717,93 +715,93 @@ public class FWImpl { String cglx = biztype.getString("name");//cglx String tqq9_cgyt = pm_purorderbill.getString("tqq9_cgyt");//cgyt int cgyt = 0;//办公采购 - if ("CGT001".equals(tqq9_cgyt)) { + if("CGT001".equals(tqq9_cgyt)){ cgyt = 1;//缺货采购 } Date tqq9_datefield = pm_purorderbill.getDate("tqq9_datefield"); String yjfhsj = null;//yjfhsj - if (tqq9_datefield != null) { + if(tqq9_datefield != null){ yjfhsj = sdf.format(tqq9_datefield); } DynamicObject paycondition = pm_purorderbill.getDynamicObject("paycondition"); int fktj = 0; - if (paycondition != null) { + if(paycondition != null){ String number = paycondition.getString("number"); - if ("001".equals(number)) { + if("001".equals(number)){ fktj = 2; - } else if ("002".equals(number)) { + }else if ("002".equals(number)){ fktj = 1; - } else if ("004".equals(number)) { + }else if ("004".equals(number)){ fktj = 3; } } DynamicObject settletype = pm_purorderbill.getDynamicObject("settletype"); int jsfs = 0; - if (settletype != null) { + if(settletype != null){ String number = settletype.getString("number"); - if ("JSFS01".equals(number)) { + if("JSFS01".equals(number)){ fktj = 0; - } else if ("JSFS04".equals(number)) { + }else if ("JSFS04".equals(number)){ fktj = 1; - } else if ("JSFS08".equals(number)) { + }else if ("JSFS08".equals(number)){ fktj = 2; - } else if ("JSFS09".equals(number)) { + }else if ("JSFS09".equals(number)){ fktj = 3; - } else if ("LC001".equals(number)) { + }else if ("LC001".equals(number)){ fktj = 4; } } boolean tqq9_sfsyhf = pm_purorderbill.getBoolean("tqq9_sfsyhf");//货返 String hfxx = ""; - if (tqq9_sfsyhf) { + if(tqq9_sfsyhf){ hfxx = "货返信息:"; String tqq9_hshfsygs = pm_purorderbill.getString("tqq9_hshfsygs"); - if ("A".equals(tqq9_hshfsygs)) { + if("A".equals(tqq9_hshfsygs)){ //本年 hfxx = hfxx + "含税货返使用归属为本年,"; - } else { + }else{ //上年 hfxx = hfxx + "含税货返使用归属为上年,"; } BigDecimal tqq9_hshfsyje = pm_purorderbill.getBigDecimal("tqq9_hshfsyje"); - hfxx = hfxx + "含税货返使用金额" + tqq9_hshfsyje + "元,"; + hfxx = hfxx + "含税货返使用金额"+tqq9_hshfsyje+"元,"; BigDecimal tqq9_hshfzje = pm_purorderbill.getBigDecimal("tqq9_hshfzje"); - hfxx = hfxx + "含税货返总金额" + tqq9_hshfzje + "元,"; + hfxx = hfxx + "含税货返总金额"+tqq9_hshfzje+"元,"; BigDecimal tqq9_hshfkyje = pm_purorderbill.getBigDecimal("tqq9_hshfkyje"); - hfxx = hfxx + "含税货返可用金额" + tqq9_hshfkyje + "元,"; + hfxx = hfxx + "含税货返可用金额"+tqq9_hshfkyje+"元,"; DynamicObject tqq9_hshfsysl = pm_purorderbill.getDynamicObject("tqq9_hshfsysl"); String taxRateStr = "0"; - if (tqq9_hshfsysl != null) { + if(tqq9_hshfsysl != null){ String number = tqq9_hshfsysl.getString("number"); taxRateStr = number.substring(1); } - hfxx = hfxx + "含税货返使用税率" + taxRateStr + "%。"; + hfxx = hfxx + "含税货返使用税率"+taxRateStr+"%。"; } boolean tqq9_sfsyxf = pm_purorderbill.getBoolean("tqq9_sfsyxf");//现返 String xfxx = ""; - if (tqq9_sfsyxf) { + if(tqq9_sfsyxf){ xfxx = "现返信息:"; String tqq9_hsxfsygs = pm_purorderbill.getString("tqq9_hsxfsygs"); - if ("A".equals(tqq9_hsxfsygs)) { + if("A".equals(tqq9_hsxfsygs)){ //本年 xfxx = xfxx + "含税现返使用归属为本年,"; - } else { + }else{ //上年 xfxx = xfxx + "含税现返使用归属为本年,"; } BigDecimal tqq9_hsxfsyje = pm_purorderbill.getBigDecimal("tqq9_hsxfsyje"); - xfxx = xfxx + "含税现返使用金额" + tqq9_hsxfsyje + "元,"; + xfxx = xfxx + "含税现返使用金额"+tqq9_hsxfsyje+"元,"; BigDecimal tqq9_hsxfzje = pm_purorderbill.getBigDecimal("tqq9_hsxfzje"); - xfxx = xfxx + "含税现返总金额" + tqq9_hsxfzje + "元,"; + xfxx = xfxx + "含税现返总金额"+tqq9_hsxfzje+"元,"; BigDecimal tqq9_hsxfkyje = pm_purorderbill.getBigDecimal("tqq9_hsxfkyje"); - xfxx = xfxx + "含税现返可用金额" + tqq9_hsxfkyje + "元,"; + xfxx = xfxx + "含税现返可用金额"+tqq9_hsxfkyje+"元,"; DynamicObject tqq9_hsxfsysl = pm_purorderbill.getDynamicObject("tqq9_hsxfsysl"); String taxRateStr = "0"; - if (tqq9_hsxfsysl != null) { + if(tqq9_hsxfsysl != null){ String number = tqq9_hsxfsysl.getString("number"); taxRateStr = number.substring(1); } - xfxx = xfxx + "含税现返使用税率" + taxRateStr + "%。"; + xfxx = xfxx + "含税现返使用税率"+taxRateStr+"%。"; } BigDecimal zkqjshj = pm_purorderbill.getBigDecimal("tqq9_totalamount");//zkqjshj BigDecimal yhzkje = pm_purorderbill.getBigDecimal("tqq9_discountamount");//yhzkje @@ -832,13 +830,13 @@ public class FWImpl { masterid = BusinessDataServiceHelper.loadSingle(masterid.getPkValue(), masterid.getDynamicObjectType().getName()); DynamicObject tqq9_brand = billentry.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String ggxh = masterid.getString("modelnum"); DynamicObject unit = billentry.getDynamicObject("unit"); String jldw = null; - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } BigDecimal sl = billentry.getBigDecimal("qty"); @@ -857,7 +855,7 @@ public class FWImpl { String wlbm = masterid.getString("number"); boolean ispresent = billentry.getBoolean("ispresent"); int sfzp = 0; - if (ispresent) { + if(ispresent){ sfzp = 1; } BigDecimal tqq9_dis83price = billentry.getBigDecimal("tqq9_dis83price"); @@ -876,37 +874,37 @@ public class FWImpl { e4.put("fieldValue", jldw); JSONObject e5 = new JSONObject(); e5.put("fieldName", "sl"); - e5.put("fieldValue", sl != null && sl.compareTo(BigDecimal.ZERO) != 0 ? sl : 0); + e5.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "hsdj"); - e6.put("fieldValue", hsdj != null && hsdj.compareTo(BigDecimal.ZERO) != 0 ? hsdj : 0); + e6.put("fieldValue", hsdj!=null&&hsdj.compareTo(BigDecimal.ZERO)!=0?hsdj:0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "tax_rate"); - e7.put("fieldValue", tax_rate != null && tax_rate.compareTo(BigDecimal.ZERO) != 0 ? tax_rate : 0); + e7.put("fieldValue", tax_rate!=null&&tax_rate.compareTo(BigDecimal.ZERO)!=0?tax_rate:0); JSONObject e8 = new JSONObject(); e8.put("fieldName", "zkqjshj"); - e8.put("fieldValue", zkqjshj_e != null && zkqjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj_e : 0); + e8.put("fieldValue", zkqjshj_e!=null&&zkqjshj_e.compareTo(BigDecimal.ZERO)!=0?zkqjshj_e:0); JSONObject e9 = new JSONObject(); e9.put("fieldName", "yhzkje"); - e9.put("fieldValue", yhzkje_e != null && yhzkje_e.compareTo(BigDecimal.ZERO) != 0 ? yhzkje_e : 0); + e9.put("fieldValue", yhzkje_e!=null&&yhzkje_e.compareTo(BigDecimal.ZERO)!=0?yhzkje_e:0); JSONObject e10 = new JSONObject(); e10.put("fieldName", "zkhjshj"); - e10.put("fieldValue", zkhjshj_e != null && zkhjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj_e : 0); + e10.put("fieldValue", zkhjshj_e!=null&&zkhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhjshj_e:0); JSONObject e11 = new JSONObject(); e11.put("fieldName", "hfsyje"); - e11.put("fieldValue", hfsyje != null && hfsyje.compareTo(BigDecimal.ZERO) != 0 ? hfsyje : 0); + e11.put("fieldValue", hfsyje!=null&&hfsyje.compareTo(BigDecimal.ZERO)!=0?hfsyje:0); JSONObject e12 = new JSONObject(); e12.put("fieldName", "xfsyje"); - e12.put("fieldValue", xfsyje != null && xfsyje.compareTo(BigDecimal.ZERO) != 0 ? xfsyje : 0); + e12.put("fieldValue", xfsyje!=null&&xfsyje.compareTo(BigDecimal.ZERO)!=0?xfsyje:0); JSONObject e13 = new JSONObject(); e13.put("fieldName", "zkhflhjshj"); - e13.put("fieldValue", zkhflhjshj_e != null && zkhflhjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkhflhjshj_e : 0); + e13.put("fieldValue", zkhflhjshj_e!=null&&zkhflhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj_e:0); JSONObject e14 = new JSONObject(); e14.put("fieldName", "cb"); - e14.put("fieldValue", cb != null && cb.compareTo(BigDecimal.ZERO) != 0 ? cb : 0); + e14.put("fieldValue", cb!=null&&cb.compareTo(BigDecimal.ZERO)!=0?cb:0); JSONObject e15 = new JSONObject(); e15.put("fieldName", "yjxssjy"); - e15.put("fieldValue", yjxssjy != null && yjxssjy.compareTo(BigDecimal.ZERO) != 0 ? yjxssjy : 0); + e15.put("fieldValue", yjxssjy!=null&&yjxssjy.compareTo(BigDecimal.ZERO)!=0?yjxssjy:0); JSONObject e16 = new JSONObject(); e16.put("fieldName", "bz"); e16.put("fieldValue", bz); @@ -918,9 +916,9 @@ public class FWImpl { e18.put("fieldValue", sfzp); JSONObject e19 = new JSONObject(); e19.put("fieldName", "sc83zsj"); - e19.put("fieldValue", tqq9_dis83price != null && tqq9_dis83price.compareTo(BigDecimal.ZERO) != 0 ? tqq9_dis83price : 0); + e19.put("fieldValue", tqq9_dis83price != null && tqq9_dis83price.compareTo(BigDecimal.ZERO) != 0?tqq9_dis83price:0); - List elist = Arrays.asList(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19); + List elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -931,11 +929,11 @@ public class FWImpl { recordsArr1.add(recordObj); DynamicObject warehouse = billentry.getDynamicObject("warehouse"); - shck = warehouse.getString("number") + "<>" + org.getString("number");//shck + shck = warehouse.getString("number")+"_"+org.getString("number");//shck } detail1.put("tableDBName", "formtable_main_97_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } @@ -946,12 +944,12 @@ public class FWImpl { for (DynamicObject payEntry : payEntries) { DynamicObject payname = payEntry.getDynamicObject("payname");//kxmc String kxmc = null; - if (payname != null) { + if(payname != null){ kxmc = payname.getString("name"); } String fkrq = null; Date paydate = payEntry.getDate("paydate");//fkrq - if (paydate != null) { + if(paydate != null){ fkrq = sdf.format(paydate); } BigDecimal fkbl = payEntry.getBigDecimal("payrate");//fkbl @@ -959,9 +957,9 @@ public class FWImpl { boolean sfyf = payEntry.getBoolean("isprepay");//fkje String pretimepoint = payEntry.getString("pretimepoint");//yfsd String yfsd = null; - if ("A".equals(pretimepoint)) { + if("A".equals(pretimepoint)){ yfsd = "采购合同"; - } else if ("B".equals(pretimepoint)) { + }else if("B".equals(pretimepoint)){ yfsd = "采购订单"; } BigDecimal glfkje = payEntry.getBigDecimal("joinpayamount");//glfkje @@ -974,25 +972,25 @@ public class FWImpl { p1.put("fieldValue", kxmc); JSONObject p2 = new JSONObject(); p2.put("fieldName", "fkbl"); - p2.put("fieldValue", fkbl != null && fkbl.compareTo(BigDecimal.ZERO) != 0 ? fkbl : 0); + p2.put("fieldValue", fkbl!=null&&fkbl.compareTo(BigDecimal.ZERO)!=0?fkbl:0); JSONObject p3 = new JSONObject(); p3.put("fieldName", "fkje"); - p3.put("fieldValue", fkje != null && fkje.compareTo(BigDecimal.ZERO) != 0 ? fkje : 0); + p3.put("fieldValue", fkje!=null&&fkje.compareTo(BigDecimal.ZERO)!=0?fkje:0); JSONObject p4 = new JSONObject(); p4.put("fieldName", "sfyf"); - p4.put("fieldValue", sfyf ? 0 : 1); + p4.put("fieldValue", sfyf?0:1); JSONObject p5 = new JSONObject(); p5.put("fieldName", "yfsd"); p5.put("fieldValue", yfsd); JSONObject p6 = new JSONObject(); p6.put("fieldName", "glfkje"); - p6.put("fieldValue", glfkje != null && glfkje.compareTo(BigDecimal.ZERO) != 0 ? glfkje : 0); + p6.put("fieldValue", glfkje!=null&&glfkje.compareTo(BigDecimal.ZERO)!=0?glfkje:0); JSONObject p7 = new JSONObject(); p7.put("fieldName", "yfje"); - p7.put("fieldValue", yfje_p != null && yfje_p.compareTo(BigDecimal.ZERO) != 0 ? yfje_p : 0); + p7.put("fieldValue", yfje_p!=null&&yfje_p.compareTo(BigDecimal.ZERO)!=0?yfje_p:0); JSONObject p8 = new JSONObject(); p8.put("fieldName", "bcjsje"); - p8.put("fieldValue", bcjsje != null && bcjsje.compareTo(BigDecimal.ZERO) != 0 ? bcjsje : 0); + p8.put("fieldValue", bcjsje!=null&&bcjsje.compareTo(BigDecimal.ZERO)!=0?bcjsje:0); JSONObject p9 = new JSONObject(); p9.put("fieldName", "fkd"); p9.put("fieldValue", fkd); @@ -1000,7 +998,7 @@ public class FWImpl { p10.put("fieldName", "fkrq"); p10.put("fieldValue", fkrq); - List plist = Arrays.asList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); + List plist = Arrays.asList(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(plist); JSONObject recordObj = new JSONObject(); @@ -1010,7 +1008,7 @@ public class FWImpl { } detail12.put("tableDBName", "formtable_main_97_dt2"); detail12.put("workflowRequestTableRecords", recordsArr2); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail12.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -1065,34 +1063,34 @@ public class FWImpl { m15.put("fieldValue", xfxx); JSONObject m16 = new JSONObject(); m16.put("fieldName", "zkqjshj"); - m16.put("fieldValue", zkqjshj != null && zkqjshj.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj : 0); + m16.put("fieldValue", zkqjshj!=null&&zkqjshj.compareTo(BigDecimal.ZERO)!=0?zkqjshj:0); JSONObject m17 = new JSONObject(); m17.put("fieldName", "yhzkje"); - m17.put("fieldValue", yhzkje != null && yhzkje.compareTo(BigDecimal.ZERO) != 0 ? yhzkje : 0); + m17.put("fieldValue", yhzkje!=null&&yhzkje.compareTo(BigDecimal.ZERO)!=0?yhzkje:0); JSONObject m18 = new JSONObject(); m18.put("fieldName", "zkhjshj"); - m18.put("fieldValue", zkhjshj != null && zkhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj : 0); + m18.put("fieldValue", zkhjshj!=null&&zkhjshj.compareTo(BigDecimal.ZERO)!=0?zkhjshj:0); JSONObject m19 = new JSONObject(); m19.put("fieldName", "zkhflhjshj"); - m19.put("fieldValue", zkhflhjshj != null && zkhflhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhflhjshj : 0); + m19.put("fieldValue", zkhflhjshj!=null&&zkhflhjshj.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj:0); JSONObject m20 = new JSONObject(); m20.put("fieldName", "yyfje"); - m20.put("fieldValue", yyfje != null && yyfje.compareTo(BigDecimal.ZERO) != 0 ? yyfje : 0); + m20.put("fieldValue", yyfje!=null&&yyfje.compareTo(BigDecimal.ZERO)!=0?yyfje:0); JSONObject m21 = new JSONObject(); m21.put("fieldName", "yfje"); - m21.put("fieldValue", yfje != null && yfje.compareTo(BigDecimal.ZERO) != 0 ? yfje : 0); + m21.put("fieldValue", yfje!=null&&yfje.compareTo(BigDecimal.ZERO)!=0?yfje:0); JSONObject m22 = new JSONObject(); m22.put("fieldName", "zflhzkje"); - m22.put("fieldValue", zflhzkje != null && zflhzkje.compareTo(BigDecimal.ZERO) != 0 ? zflhzkje : 0); + m22.put("fieldValue", zflhzkje!=null&&zflhzkje.compareTo(BigDecimal.ZERO)!=0?zflhzkje:0); JSONObject m23 = new JSONObject(); m23.put("fieldName", "lswdhzl"); - m23.put("fieldValue", lswdhzl != null && lswdhzl.compareTo(BigDecimal.ZERO) != 0 ? lswdhzl : 0); + m23.put("fieldValue", lswdhzl!=null&&lswdhzl.compareTo(BigDecimal.ZERO)!=0?lswdhzl:0); JSONObject m24 = new JSONObject(); m24.put("fieldName", "lswdhze"); - m24.put("fieldValue", lswdhze != null && lswdhze.compareTo(BigDecimal.ZERO) != 0 ? lswdhze : 0); + m24.put("fieldValue", lswdhze!=null&&lswdhze.compareTo(BigDecimal.ZERO)!=0?lswdhze:0); JSONObject m25 = new JSONObject(); m25.put("fieldName", "ddje"); - m25.put("fieldValue", ddje != null && ddje.compareTo(BigDecimal.ZERO) != 0 ? ddje : 0); + m25.put("fieldValue", ddje!=null&&ddje.compareTo(BigDecimal.ZERO)!=0?ddje:0); JSONObject m26 = new JSONObject(); m26.put("fieldName", "dhgys"); m26.put("fieldValue", dhgys); @@ -1106,8 +1104,8 @@ public class FWImpl { m29.put("fieldName", "khlxdz"); m29.put("fieldValue", khlxdz); - List mlist = 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, m26, m27, m28, m29); + List mlist = 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,m26,m27,m28,m29); JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist); String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD"); @@ -1129,10 +1127,10 @@ public class FWImpl { String bm = null; String deptNumber = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ sqr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -1146,44 +1144,44 @@ public class FWImpl { String biztypeNumber = biztype.getString("number"); int ywlxrk = 1; String ywlxxsm = "其他入库"; - if ("350".equals(biztypeNumber)) { + if("350".equals(biztypeNumber)){ ywlxrk = 0; ywlxxsm = "盘盈入库"; - } else if ("354".equals(biztypeNumber)) { + }else if("354".equals(biztypeNumber)){ ywlxxsm = "其他入库"; - } else if ("605".equals(biztypeNumber)) { + }else if("605".equals(biztypeNumber)){ ywlxrk = 2; ywlxxsm = "调拨入库"; - } else if ("606".equals(biztypeNumber)) { + }else if("606".equals(biztypeNumber)){ ywlxrk = 3; ywlxxsm = "赠品入库"; - } else if ("607".equals(biztypeNumber)) { + }else if("607".equals(biztypeNumber)){ ywlxrk = 4; ywlxxsm = "礼品入库"; - } else if ("608".equals(biztypeNumber)) { + }else if("608".equals(biztypeNumber)){ ywlxrk = 5; ywlxxsm = "展会领用入库"; - } else if ("609".equals(biztypeNumber)) { + }else if("609".equals(biztypeNumber)){ ywlxrk = 6; ywlxxsm = "拍照领用入库"; - } else if ("610".equals(biztypeNumber)) { + }else if("610".equals(biztypeNumber)){ ywlxrk = 7; ywlxxsm = "换货入库"; - } else if ("611".equals(biztypeNumber)) { + }else if("611".equals(biztypeNumber)){ ywlxrk = 8; ywlxxsm = "错货入库"; } String jsr = null; DynamicObject tqq9_jsr = bill.getDynamicObject("tqq9_user"); - if (tqq9_jsr != null) { + if(tqq9_jsr != null){ jsr = FWUtils.getFwUserIdByKdUserNumber(tqq9_jsr.getString("number"), deptNumber); } String kgy = null; DynamicObject tqq9_operator = bill.getDynamicObject("operator"); - if (tqq9_operator != null) { + if(tqq9_operator != null){ tqq9_operator = BusinessDataServiceHelper.loadSingle(tqq9_operator.getPkValue(), "bd_operator"); DynamicObject user = tqq9_operator.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ kgy = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -1194,19 +1192,19 @@ public class FWImpl { String dpdh = bill.getString("tqq9_dpdh"); String szkf = null; DynamicObject tqq9_sskf = bill.getDynamicObject("tqq9_sskf"); - if (tqq9_sskf != null) { + if(tqq9_sskf != null){ tqq9_sskf = BusinessDataServiceHelper.loadSingle(tqq9_sskf.getPkValue(), "bd_operator"); DynamicObject user = tqq9_sskf.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szkf = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } String szxs = null; DynamicObject tqq9_ssxs = bill.getDynamicObject("tqq9_ssxs"); - if (tqq9_ssxs != null) { + if(tqq9_ssxs != null){ tqq9_ssxs = BusinessDataServiceHelper.loadSingle(tqq9_ssxs.getPkValue(), "bd_operator"); DynamicObject user = tqq9_ssxs.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szxs = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -1215,10 +1213,10 @@ public class FWImpl { String khfptt = bill.getString("tqq9_khfptt"); DynamicObject tqq9_sscg = bill.getDynamicObject("tqq9_sscg"); String szcg = null; - if (tqq9_sscg != null) { + if(tqq9_sscg != null){ tqq9_sscg = BusinessDataServiceHelper.loadSingle(tqq9_sscg.getPkValue(), "bd_operator"); DynamicObject user = tqq9_sscg.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szcg = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -1237,12 +1235,12 @@ public class FWImpl { String ggxh = masterid.getString("modelnum"); DynamicObject tqq9_brand = masterid.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String jldw = null; DynamicObject unit = billentry.getDynamicObject("unit"); - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } BigDecimal sl = billentry.getBigDecimal("qty"); @@ -1250,7 +1248,7 @@ public class FWImpl { BigDecimal je = billentry.getBigDecimal("tqq9_amount"); int sfzp = 1; boolean ispresent = billentry.getBoolean("tqq9_zp"); - if (ispresent) { + if(ispresent){ sfzp = 0; } @@ -1271,18 +1269,18 @@ public class FWImpl { e4.put("fieldValue", jldw); JSONObject e5 = new JSONObject(); e5.put("fieldName", "sl"); - e5.put("fieldValue", sl); + e5.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "bhsdj"); - e6.put("fieldValue", bhsdj); + e6.put("fieldValue", bhsdj!=null&&bhsdj.compareTo(BigDecimal.ZERO)!=0?bhsdj:0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "je"); - e7.put("fieldValue", je); + e7.put("fieldValue", je!=null&&je.compareTo(BigDecimal.ZERO)!=0?je:0); JSONObject e15 = new JSONObject(); e15.put("fieldName", "sfzp"); e15.put("fieldValue", sfzp); - List elist = Arrays.asList(e1, e12, e2, e3, e4, e5, e6, e7,//e8,e9,e10,e11,e13,e14 + List elist = Arrays.asList(e1,e12,e2,e3,e4,e5,e6,e7,//e8,e9,e10,e11,e13,e14 e15); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -1294,13 +1292,13 @@ public class FWImpl { //入库仓库 DynamicObject warehouse = billentry.getDynamicObject("warehouse"); - if (warehouse != null) { - rkck = warehouse.getString("number") + "<>" + orgNumber; + if(warehouse != null){ + rkck = warehouse.getString("number")+"_"+orgNumber; } } detail1.put("tableDBName", "formtable_main_110_dt2"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -1348,7 +1346,7 @@ public class FWImpl { m16.put("fieldValue", sqyybz); JSONObject m17 = new JSONObject(); m17.put("fieldName", "hzje"); - m17.put("fieldValue", hzje); + m17.put("fieldValue", hzje!=null&&hzje.compareTo(BigDecimal.ZERO)!=0?hzje:0); JSONObject m18 = new JSONObject(); m18.put("fieldName", "shdh"); m18.put("fieldValue", shdh); @@ -1380,12 +1378,12 @@ public class FWImpl { m27.put("fieldName", "szcg"); m27.put("fieldValue", szcg); - List mlist = new ArrayList<>(Arrays.asList(m1, m2, m3, m4, m5, m6, m7, m8, m9, m13, m14, m15, m16, m17, m18, m19, m20, m21, - m22, m23, m24, m25, m26, m27)); - if (ywlxrk == 2) { + List mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4,m5,m6,m7,m8,m9,m13,m14,m15,m16,m17,m18,m19,m20,m21, + m22,m23,m24,m25,m26,m27)); + if (ywlxrk == 2){ int dblx = 0; String tqq9_dblx = bill.getString("tqq9_dblxqtrksq"); - if ("B".equals(tqq9_dblx)) { + if("B".equals(tqq9_dblx)){ dblx = 1; } JSONObject m10 = new JSONObject(); @@ -1393,15 +1391,15 @@ public class FWImpl { m10.put("fieldValue", dblx); int dbfl = 0; String tqq9_dbrk = bill.getString("tqq9_dbrk"); - if ("B".equals(tqq9_dbrk)) { + if("B".equals(tqq9_dbrk)){ dbfl = 1; - } else if ("C".equals(tqq9_dbrk)) { + }else if("C".equals(tqq9_dbrk)){ dbfl = 2; - } else if ("F".equals(tqq9_dbrk)) { + }else if("F".equals(tqq9_dbrk)){ dbfl = 4; - } else if ("G".equals(tqq9_dbrk)) { + }else if("G".equals(tqq9_dbrk)){ dbfl = 5; - } else if ("QT".equals(tqq9_dbrk)) { + }else if("QT".equals(tqq9_dbrk)){ dbfl = 6; } JSONObject m11 = new JSONObject(); @@ -1431,10 +1429,10 @@ public class FWImpl { String bm = null; String deptNumber = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ sqr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -1448,47 +1446,47 @@ public class FWImpl { String biztypeNumber = biztype.getString("number"); int ywlxck = 1; String ywlxxsm = "其他出库"; - if ("351".equals(biztypeNumber)) { + if("351".equals(biztypeNumber)){ ywlxck = 0; ywlxxsm = "盘亏出库"; - } else if ("355".equals(biztypeNumber)) { + }else if("355".equals(biztypeNumber)){ ywlxxsm = "其他出库"; - } else if ("612".equals(biztypeNumber)) { + }else if("612".equals(biztypeNumber)){ ywlxck = 2; ywlxxsm = "调拨出库"; - } else if ("613".equals(biztypeNumber)) { + }else if("613".equals(biztypeNumber)){ ywlxck = 3; ywlxxsm = "礼品领用"; - } else if ("614".equals(biztypeNumber)) { + }else if("614".equals(biztypeNumber)){ ywlxck = 4; ywlxxsm = "展会领用"; - } else if ("615".equals(biztypeNumber)) { + }else if("615".equals(biztypeNumber)){ ywlxck = 5; ywlxxsm = "拍照领用"; - } else if ("616".equals(biztypeNumber)) { + }else if("616".equals(biztypeNumber)){ ywlxck = 6; ywlxxsm = "样品领用"; - } else if ("617".equals(biztypeNumber)) { + }else if("617".equals(biztypeNumber)){ ywlxck = 7; ywlxxsm = "报损出库"; } String drzz = ywgz; DynamicObject tqq9_drck2 = bill.getDynamicObject("tqq9_drck2"); - if (tqq9_drck2 != null) { + if(tqq9_drck2 != null){ String number = tqq9_drck2.getString("number"); drzz = FWUtils.getFwOrgNumberByKdOrgNumber(number); } String jsr = null; DynamicObject tqq9_jsr = bill.getDynamicObject("tqq9_user"); - if (tqq9_jsr != null) { + if(tqq9_jsr != null){ jsr = FWUtils.getFwUserIdByKdUserNumber(tqq9_jsr.getString("number"), deptNumber); } String kgy = null; DynamicObject operator = bill.getDynamicObject("tqq9_operator"); - if (operator != null) { + if(operator != null){ operator = BusinessDataServiceHelper.loadSingle(operator.getPkValue(), "bd_operator"); DynamicObject user = operator.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ kgy = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -1496,30 +1494,30 @@ public class FWImpl { BigDecimal hzje = bill.getBigDecimal("tqq9_hzje"); String shdh = null; DynamicObject tqq9_returnapply = bill.getDynamicObject("tqq9_returnapply"); - if (tqq9_returnapply != null) { + if(tqq9_returnapply != null){ shdh = tqq9_returnapply.getString("billno"); } String dyxsddh = null; DynamicObject tqq9_saleorderbill = bill.getDynamicObject("tqq9_saleorderbill"); - if (tqq9_saleorderbill != null) { + if(tqq9_saleorderbill != null){ dyxsddh = tqq9_saleorderbill.getString("billno"); } String dpdh = bill.getString("tqq9_dpdh"); String szkf = null; DynamicObject tqq9_sskf = bill.getDynamicObject("tqq9_sskf"); - if (tqq9_sskf != null) { + if(tqq9_sskf != null){ tqq9_sskf = BusinessDataServiceHelper.loadSingle(tqq9_sskf.getPkValue(), "bd_operator"); DynamicObject user = tqq9_sskf.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szkf = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } String szxs = null; DynamicObject tqq9_ssxs = bill.getDynamicObject("tqq9_ssxs"); - if (tqq9_ssxs != null) { + if(tqq9_ssxs != null){ tqq9_ssxs = BusinessDataServiceHelper.loadSingle(tqq9_ssxs.getPkValue(), "bd_operator"); DynamicObject user = tqq9_ssxs.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szxs = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -1527,7 +1525,7 @@ public class FWImpl { String wtyy = bill.getString("tqq9_wtyy"); DynamicObject tqq9_kufptt = bill.getDynamicObject("tqq9_kufptt"); String khfptt = null; - if (tqq9_kufptt != null) { + if(tqq9_kufptt != null){ khfptt = tqq9_kufptt.getString("number"); } String ckck = null; @@ -1544,12 +1542,12 @@ public class FWImpl { String ggxh = masterid.getString("modelnum"); DynamicObject tqq9_brand = masterid.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String jldw = null; DynamicObject unit = billentry.getDynamicObject("tqq9_unit"); - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } BigDecimal sl = billentry.getBigDecimal("tqq9_qty"); @@ -1557,22 +1555,22 @@ public class FWImpl { BigDecimal je = billentry.getBigDecimal("tqq9_amount"); String scrq = null; Date producedate = billentry.getDate("tqq9_producedate"); - if (producedate != null) { + if(producedate != null){ scrq = sdf.format(producedate); } String yxjzsj = null; Date expirydate = billentry.getDate("tqq9_expirydate"); - if (expirydate != null) { + if(expirydate != null){ yxjzsj = sdf.format(expirydate); } String drph = null; DynamicObject lot = billentry.getDynamicObject("tqq9_lot"); - if (lot != null) { + if(lot != null){ drph = lot.getString("number"); } String zczh = null; DynamicObject tqq9_zczh = billentry.getDynamicObject("tqq9_zczh"); - if (tqq9_zczh != null) { + if(tqq9_zczh != null){ zczh = tqq9_zczh.getString("number"); } String xkzh = billentry.getString("tqq9_licenseno"); @@ -1597,10 +1595,10 @@ public class FWImpl { e5.put("fieldValue", sl); JSONObject e6 = new JSONObject(); e6.put("fieldName", "bhsdj"); - e6.put("fieldValue", bhsdj); + e6.put("fieldValue", bhsdj!=null&&bhsdj.compareTo(BigDecimal.ZERO)!=0?bhsdj:0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "je"); - e7.put("fieldValue", je); + e7.put("fieldValue", je!=null&&je.compareTo(BigDecimal.ZERO)!=0?je:0); JSONObject e8 = new JSONObject(); e8.put("fieldName", "scrq"); e8.put("fieldValue", scrq); @@ -1620,7 +1618,7 @@ public class FWImpl { e14.put("fieldName", "xkzh"); e14.put("fieldValue", xkzh); - List elist = Arrays.asList(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14); + List elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -1631,13 +1629,13 @@ public class FWImpl { //出库仓库 DynamicObject warehouse = billentry.getDynamicObject("tqq9_dcck"); - if (warehouse != null) { - ckck = warehouse.getString("number") + "_" + orgNumber; + if(warehouse != null){ + ckck = warehouse.getString("number")+"_"+orgNumber; } } detail1.put("tableDBName", "formtable_main_110_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -1688,7 +1686,7 @@ public class FWImpl { m16.put("fieldValue", sqyybz); JSONObject m17 = new JSONObject(); m17.put("fieldName", "hzje"); - m17.put("fieldValue", hzje); + m17.put("fieldValue", hzje!=null&&hzje.compareTo(BigDecimal.ZERO)!=0?hzje:0); JSONObject m18 = new JSONObject(); m18.put("fieldName", "shdh"); m18.put("fieldValue", shdh); @@ -1720,46 +1718,46 @@ public class FWImpl { JSONObject m30 = new JSONObject(); DynamicObject tqq9_sscg = bill.getDynamicObject("tqq9_sscg"); String szcg = null; - if (tqq9_sscg != null) { + if(tqq9_sscg != null){ tqq9_sscg = BusinessDataServiceHelper.loadSingle(tqq9_sscg.getPkValue(), "bd_operator"); DynamicObject user = tqq9_sscg.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ szcg = FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } m30.put("fieldName", "szcg"); m30.put("fieldValue", szcg); - List mlist = new ArrayList<>(Arrays.asList(m1, m2, m3, m4, - m5, m6, m7, m8, m9, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m30)); - if (ywlxck == 2) { + List mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4, + m5,m6,m7,m8,m9,m12,m13,m14,m15,m16,m17,m18,m19,m20,m21,m22,m23,m24,m25,m26,m30)); + if (ywlxck == 2){ int dblx = 0; String tqq9_dblx = bill.getString("tqq9_dblx"); - if ("B".equals(tqq9_dblx)) { + if("B".equals(tqq9_dblx)){ dblx = 1; } int dbfl = 0; String tqq9_dbck = bill.getString("tqq9_dbckfl"); - if ("B".equals(tqq9_dbck)) { + if("B".equals(tqq9_dbck)){ dbfl = 1; - } else if ("C".equals(tqq9_dbck)) { + }else if("C".equals(tqq9_dbck)){ dbfl = 2; - } else if ("F".equals(tqq9_dbck)) { + }else if("F".equals(tqq9_dbck)){ dbfl = 4; - } else if ("G".equals(tqq9_dbck)) { + }else if("G".equals(tqq9_dbck)){ dbfl = 5; - } else if ("QT".equals(tqq9_dbck)) { + }else if("QT".equals(tqq9_dbck)){ dbfl = 6; } int shlx = 0; String tqq9_shlx = bill.getString("tqq9_shlx"); - if ("B".equals(tqq9_shlx)) { + if("B".equals(tqq9_shlx)){ shlx = 1; - } else if ("C".equals(tqq9_shlx)) { + }else if("C".equals(tqq9_shlx)){ shlx = 3; - } else if ("D".equals(tqq9_shlx)) { + }else if("D".equals(tqq9_shlx)){ shlx = 4; - } else if ("E".equals(tqq9_shlx)) { + }else if("E".equals(tqq9_shlx)){ shlx = 5; } JSONObject m10 = new JSONObject(); @@ -1775,18 +1773,18 @@ public class FWImpl { mlist.add(m10); mlist.add(m11); mlist.add(m29); - } else if (ywlxck == 0) { + }else if(ywlxck == 0){ //盘亏出库 int pkyy = 0; String tqq9_pkyy = bill.getString("tqq9_pkfl"); - if ("B".equals(tqq9_pkyy)) { + if("B".equals(tqq9_pkyy)){ pkyy = 1; - } else if ("C".equals(tqq9_pkyy)) { + }else if("C".equals(tqq9_pkyy)){ pkyy = 2; } String pkzrr = null; DynamicObject tqq9_zrr = bill.getDynamicObject("tqq9_pkzrr"); - if (tqq9_zrr != null) { + if(tqq9_zrr != null){ pkzrr = FWUtils.getFwUserIdByKdUserNumber(tqq9_zrr.getString("number"), deptNumber); } JSONObject m27 = new JSONObject(); @@ -1797,25 +1795,25 @@ public class FWImpl { m28.put("fieldValue", pkzrr); mlist.add(m27); mlist.add(m28); - } else if (ywlxck == 7) { + }else if(ywlxck == 7){ //报损出库 int bsckfl = 8; String tqq9_bsck = bill.getString("tqq9_bsckfl"); - if ("A".equals(tqq9_bsck)) { + if("A".equals(tqq9_bsck)){ bsckfl = 0; - } else if ("B".equals(tqq9_bsck)) { + }else if("B".equals(tqq9_bsck)){ bsckfl = 1; - } else if ("C".equals(tqq9_bsck)) { + }else if("C".equals(tqq9_bsck)){ bsckfl = 2; - } else if ("D".equals(tqq9_bsck)) { + }else if("D".equals(tqq9_bsck)){ bsckfl = 3; - } else if ("E".equals(tqq9_bsck)) { + }else if("E".equals(tqq9_bsck)){ bsckfl = 4; - } else if ("F".equals(tqq9_bsck)) { + }else if("F".equals(tqq9_bsck)){ bsckfl = 5; - } else if ("G".equals(tqq9_bsck)) { + }else if("G".equals(tqq9_bsck)){ bsckfl = 6; - } else if ("H".equals(tqq9_bsck)) { + }else if("H".equals(tqq9_bsck)){ bsckfl = 7; } JSONObject m29 = new JSONObject(); @@ -1828,14 +1826,14 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCRKD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, sqr); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid,sqr); } /** * 付款申请推送泛微 */ - public static String pushFwPayApply(DynamicObject bill) { + public static String pushFwPayApply(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid");//泛微流程ID String billno = bill.getString("billno"); @@ -1844,16 +1842,16 @@ public class FWImpl { String cjbm = null; String deptNumber = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } String cjrq = null; Date applydate = bill.getDate("applydate"); - if (applydate != null) { + if(applydate != null){ cjrq = sdf.format(applydate); } DynamicObject settleorg = bill.getDynamicObject("settleorg"); @@ -1862,7 +1860,7 @@ public class FWImpl { DynamicObject billtype = bill.getDynamicObject("billtype"); String billtypenumber = billtype.getString("number"); int djlx = 0; - if ("ap_payapply_oth_BT_S".equals(billtypenumber)) { + if("ap_payapply_oth_BT_S".equals(billtypenumber)){ djlx = 1; } DynamicObject payorg = bill.getDynamicObject("payorg"); @@ -1871,15 +1869,15 @@ public class FWImpl { String qksy = bill.getString("applycause"); int sfdpyf = 1; boolean isprepayinvoice = bill.getBoolean("isprepayinvoice"); - if (isprepayinvoice) { + if(isprepayinvoice){ sfdpyf = 0; } BigDecimal sqje = bill.getBigDecimal("applyamount"); int fklx = 0; String tqq9_fklx = bill.getString("tqq9_fklx"); - if ("B".equals(tqq9_fklx)) { + if("B".equals(tqq9_fklx)){ fklx = 1; - } else if ("C".equals(tqq9_fklx)) { + }else if("C".equals(tqq9_fklx)){ fklx = 2; } String wlzh = null; @@ -1887,13 +1885,13 @@ public class FWImpl { String qwfkr = null; int fktj = 0; DynamicObject tqq9_fktj = bill.getDynamicObject("tqq9_fktj"); - if (tqq9_fktj != null) { + if(tqq9_fktj != null){ String number = tqq9_fktj.getString("number"); - if ("002".equals(number)) { + if("002".equals(number)){ fktj = 1; - } else if ("001".equals(number)) { + }else if("001".equals(number)){ fktj = 2; - } else if ("004".equals(number)) { + }else if("004".equals(number)){ fktj = 3; } } @@ -1908,14 +1906,14 @@ public class FWImpl { BigDecimal qpje = bill.getBigDecimal("tqq9_qpje"); Date tqq9_qpsj = bill.getDate("tqq9_qpsj"); String yjdpsj = null; - if (tqq9_qpsj != null) { + if(tqq9_qpsj != null){ yjdpsj = sdf.format(tqq9_qpsj); } BigDecimal qhje = bill.getBigDecimal("tqq9_qhje"); String yjdhsj = null; Date tqq9_qhrq = bill.getDate("tqq9_qhrq"); - if (tqq9_qhrq != null) { + if(tqq9_qhrq != null){ yjdhsj = sdf.format(tqq9_qhrq); } String cc3gyxlbhyy = bill.getString("tqq9_rccsgyxlbh"); @@ -1928,7 +1926,7 @@ public class FWImpl { String cgddh = entry.getString("e_corebillno"); String fyxm = null; DynamicObject e_expenseitem = entry.getDynamicObject("e_expenseitem"); - if (e_expenseitem != null) { + if(e_expenseitem != null){ e_expenseitem = BusinessDataServiceHelper.loadSingle(e_expenseitem.getPkValue(), "er_expenseitemedit", "id,name,number"); fyxm = e_expenseitem.getString("name"); } @@ -1939,35 +1937,35 @@ public class FWImpl { BigDecimal zbzfje_e = entry.getBigDecimal("tqq9_zbzf"); BigDecimal yfje = entry.getBigDecimal("e_paidamt"); DynamicObject e_asstact = entry.getDynamicObject("e_asstact"); - if (e_asstact != null) { + if(e_asstact != null){ skgys = e_asstact.getString("number"); } wlzh = entry.getString("e_assacct"); DynamicObject e_bebank = entry.getDynamicObject("e_bebank"); - if (e_bebank != null) { + if(e_bebank != null){ wlyh = e_bebank.getString("name"); } Date e_expaydate = entry.getDate("e_expaydate"); - if (e_expaydate != null) { + if(e_expaydate != null){ qwfkr = sdf.format(e_expaydate); } DynamicObject e_settlementtype = entry.getDynamicObject("e_settlementtype"); - if (e_settlementtype != null) { + if(e_settlementtype != null){ String number = e_settlementtype.getString("number"); - if ("JSFS01".equals(number)) { + if("JSFS01".equals(number)){ jsfs = 0; - } else if ("JSFS04".equals(number)) { + }else if("JSFS04".equals(number)){ jsfs = 1; - } else if ("JSFS08".equals(number) || "JSFS16_S".equals(number)) { + }else if("JSFS08".equals(number) || "JSFS16_S".equals(number)){ jsfs = 2; - } else if ("JSFS09".equals(number) || "JSFS12".equals(number)) { + }else if("JSFS09".equals(number) || "JSFS12".equals(number)){ jsfs = 3; - } else if ("LC001".equals(number)) { + }else if("LC001".equals(number)){ jsfs = 4; } } Date e_duedate = entry.getDate("e_duedate"); - if (e_duedate != null) { + if(e_duedate !=null){ dqr = sdf.format(e_duedate); } @@ -1979,24 +1977,24 @@ public class FWImpl { e2.put("fieldValue", fyxm); JSONObject e3 = new JSONObject(); e3.put("fieldName", "bcsjzfje"); - e3.put("fieldValue", bcsjzfje_e == null || bcsjzfje_e.compareTo(BigDecimal.ZERO) == 0 ? 0 : bcsjzfje_e); + e3.put("fieldValue", bcsjzfje_e==null||bcsjzfje_e.compareTo(BigDecimal.ZERO)==0?0:bcsjzfje_e); JSONObject e4 = new JSONObject(); e4.put("fieldName", "cgddyfje"); - e4.put("fieldValue", cgddyfje == null || cgddyfje.compareTo(BigDecimal.ZERO) == 0 ? 0 : cgddyfje); + e4.put("fieldValue", cgddyfje==null||cgddyfje.compareTo(BigDecimal.ZERO)==0?0:cgddyfje); JSONObject e5 = new JSONObject(); e5.put("fieldName", "xfsyje"); - e5.put("fieldValue", xfsyje == null || xfsyje.compareTo(BigDecimal.ZERO) == 0 ? 0 : xfsyje); + e5.put("fieldValue", xfsyje==null||xfsyje.compareTo(BigDecimal.ZERO)==0?0:xfsyje); JSONObject e6 = new JSONObject(); e6.put("fieldName", "hfsyje"); - e6.put("fieldValue", hfsyje == null || hfsyje.compareTo(BigDecimal.ZERO) == 0 ? 0 : hfsyje); + e6.put("fieldValue", hfsyje==null||hfsyje.compareTo(BigDecimal.ZERO)==0?0:hfsyje); JSONObject e7 = new JSONObject(); e7.put("fieldName", "zbzfje"); - e7.put("fieldValue", zbzfje_e == null || zbzfje_e.compareTo(BigDecimal.ZERO) == 0 ? 0 : zbzfje_e); + e7.put("fieldValue", zbzfje_e==null||zbzfje_e.compareTo(BigDecimal.ZERO)==0?0:zbzfje_e); JSONObject e8 = new JSONObject(); e8.put("fieldName", "yfje"); - e8.put("fieldValue", yfje == null || yfje.compareTo(BigDecimal.ZERO) == 0 ? 0 : yfje); + e8.put("fieldValue", yfje==null||yfje.compareTo(BigDecimal.ZERO)==0?0:yfje); - List elist = Arrays.asList(e1, e2, e3, e4, e5, e6, e7, e8); + List elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -2007,7 +2005,7 @@ public class FWImpl { } detail1.put("tableDBName", "formtable_main_100_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -2052,7 +2050,7 @@ public class FWImpl { m12.put("fieldValue", sfdpyf); JSONObject m13 = new JSONObject(); m13.put("fieldName", "sqje"); - m13.put("fieldValue", sqje == null || sqje.compareTo(BigDecimal.ZERO) == 0 ? 0 : sqje); + m13.put("fieldValue", sqje==null||sqje.compareTo(BigDecimal.ZERO)==0?0:sqje); JSONObject m14 = new JSONObject(); m14.put("fieldName", "fklx"); m14.put("fieldValue", fklx); @@ -2076,37 +2074,37 @@ public class FWImpl { m20.put("fieldValue", dqr); JSONObject m21 = new JSONObject(); m21.put("fieldName", "bcsjzfje"); - m21.put("fieldValue", bcsjzfje == null || bcsjzfje.compareTo(BigDecimal.ZERO) == 0 ? 0 : bcsjzfje); + m21.put("fieldValue", bcsjzfje==null||bcsjzfje.compareTo(BigDecimal.ZERO)==0?0:bcsjzfje); JSONObject m22 = new JSONObject(); m22.put("fieldName", "cgddyfze"); - m22.put("fieldValue", cgddyfze == null || cgddyfze.compareTo(BigDecimal.ZERO) == 0 ? 0 : cgddyfze); + m22.put("fieldValue", cgddyfze==null||cgddyfze.compareTo(BigDecimal.ZERO)==0?0:cgddyfze); JSONObject m23 = new JSONObject(); m23.put("fieldName", "ljyfzje"); - m23.put("fieldValue", ljyfzje == null || ljyfzje.compareTo(BigDecimal.ZERO) == 0 ? 0 : ljyfzje); + m23.put("fieldValue", ljyfzje==null||ljyfzje.compareTo(BigDecimal.ZERO)==0?0:ljyfzje); JSONObject m24 = new JSONObject(); m24.put("fieldName", "hfsyzje"); - m24.put("fieldValue", hfsyzje == null || hfsyzje.compareTo(BigDecimal.ZERO) == 0 ? 0 : hfsyzje); + m24.put("fieldValue", hfsyzje==null||hfsyzje.compareTo(BigDecimal.ZERO)==0?0:hfsyzje); JSONObject m25 = new JSONObject(); m25.put("fieldName", "xfsyzje"); - m25.put("fieldValue", xfsyzje == null || xfsyzje.compareTo(BigDecimal.ZERO) == 0 ? 0 : xfsyzje); + m25.put("fieldValue", xfsyzje==null||xfsyzje.compareTo(BigDecimal.ZERO)==0?0:xfsyzje); JSONObject m26 = new JSONObject(); m26.put("fieldName", "zbzfje"); - m26.put("fieldValue", zbzfje == null || zbzfje.compareTo(BigDecimal.ZERO) == 0 ? 0 : zbzfje); + m26.put("fieldValue", zbzfje==null||zbzfje.compareTo(BigDecimal.ZERO)==0?0:zbzfje); JSONObject m27 = new JSONObject(); m27.put("fieldName", "qpje"); - m27.put("fieldValue", qpje == null || qpje.compareTo(BigDecimal.ZERO) == 0 ? 0 : qpje); + m27.put("fieldValue", qpje==null||qpje.compareTo(BigDecimal.ZERO)==0?0:qpje); JSONObject m28 = new JSONObject(); m28.put("fieldName", "yjdpsj"); m28.put("fieldValue", yjdpsj); JSONObject m29 = new JSONObject(); m29.put("fieldName", "qhje"); - m29.put("fieldValue", qhje == null || qhje.compareTo(BigDecimal.ZERO) == 0 ? 0 : qhje); + m29.put("fieldValue", qhje==null||qhje.compareTo(BigDecimal.ZERO)==0?0:qhje); JSONObject m30 = new JSONObject(); m30.put("fieldName", "yjdhsj"); m30.put("fieldValue", yjdhsj); - 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, m26, m27, m28, m29, m30)); + 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,m26,m27,m28,m29,m30)); // 附件 List fjList = new ArrayList<>(); List> attachments = AttachmentServiceHelper.getAttachments("ap_payapply", bill.getPkValue(), "attachmentpanel"); @@ -2122,7 +2120,7 @@ public class FWImpl { fjList.add(fj); } - if (fjList.size() > 0) { + if(fjList.size() > 0){ JSONObject fjObj = new JSONObject(); fjObj.put("fieldName", "fj"); fjObj.put("fieldValue", fjList); @@ -2141,7 +2139,7 @@ public class FWImpl { /** * 采购订单变更单推送泛微 */ - public static String pushFwPurChange(DynamicObject bill) { + public static String pushFwPurChange(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid");//泛微流程ID String ycgddh = bill.getString("billno"); @@ -2151,16 +2149,16 @@ public class FWImpl { String cjbm = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); String deptNumber = null; - if (tqq9_dept != null) { + if(tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } String cjrq = null; Date changebizdate = bill.getDate("changebizdate"); - if (changebizdate != null) { + if(changebizdate != null){ cjrq = sdf.format(changebizdate); } DynamicObject org = bill.getDynamicObject("org"); @@ -2169,91 +2167,91 @@ public class FWImpl { String cglx = bill.getString("tqq9_cglx"); int cgyt = 0; String tqq9_cgyt = bill.getString("tqq9_cgyt"); - if ("CGT001".equals(tqq9_cgyt)) { + if("CGT001".equals(tqq9_cgyt)){ cgyt = 1; } String yjfhsj = null; Date tqq9_datefield = bill.getDate("tqq9_datefield"); - if (tqq9_datefield != null) { + if(tqq9_datefield != null){ yjfhsj = sdf.format(tqq9_datefield); } int fktj = 0; DynamicObject paycondition = bill.getDynamicObject("paycondition"); - if (paycondition != null) { + if(paycondition != null){ String number = paycondition.getString("number"); - if ("002".equals(number)) { + if("002".equals(number)){ fktj = 1; - } else if ("001".equals(number)) { + }else if("001".equals(number)){ fktj = 2; - } else if ("004".equals(number)) { + }else if("004".equals(number)){ fktj = 3; } } int jsfs = 0; DynamicObject settletype = bill.getDynamicObject("settletype"); - if (settletype != null) { + if(settletype != null){ String number = settletype.getString("number"); - if ("JSFS04".equals(number)) { + if("JSFS04".equals(number)){ jsfs = 1; - } else if ("JSFS08".equals(number) || "JSFS16_S".equals(number)) { + }else if("JSFS08".equals(number) || "JSFS16_S".equals(number)){ jsfs = 2; - } else if ("JSFS09".equals(number) || "JSFS12".equals(number)) { + }else if("JSFS09".equals(number) || "JSFS12".equals(number)){ jsfs = 3; - } else if ("LC001".equals(number)) { + }else if("LC001".equals(number)){ jsfs = 4; } } boolean tqq9_sfsyhf = bill.getBoolean("tqq9_sfsyhf");//货返 String hfxx = ""; - if (tqq9_sfsyhf) { + if(tqq9_sfsyhf){ hfxx = "货返信息:"; String tqq9_hshfsygs = bill.getString("tqq9_hshfsygs"); - if ("A".equals(tqq9_hshfsygs)) { + if("A".equals(tqq9_hshfsygs)){ //本年 hfxx = hfxx + "含税货返使用归属为本年,"; - } else { + }else{ //上年 hfxx = hfxx + "含税货返使用归属为上年,"; } BigDecimal tqq9_hshfsyje = bill.getBigDecimal("tqq9_hshfsyje"); - hfxx = hfxx + "含税货返使用金额" + tqq9_hshfsyje + "元,"; + hfxx = hfxx + "含税货返使用金额"+tqq9_hshfsyje+"元,"; BigDecimal tqq9_hshfzje = bill.getBigDecimal("tqq9_hshfzje"); - hfxx = hfxx + "含税货返总金额" + tqq9_hshfzje + "元,"; + hfxx = hfxx + "含税货返总金额"+tqq9_hshfzje+"元,"; BigDecimal tqq9_hshfkyje = bill.getBigDecimal("tqq9_hshfkyje"); - hfxx = hfxx + "含税货返可用金额" + tqq9_hshfkyje + "元,"; + hfxx = hfxx + "含税货返可用金额"+tqq9_hshfkyje+"元,"; DynamicObject tqq9_hshfsysl = bill.getDynamicObject("tqq9_hshfsysl"); String taxRateStr = "0"; - if (tqq9_hshfsysl != null) { + if(tqq9_hshfsysl != null){ String number = tqq9_hshfsysl.getString("number"); taxRateStr = number.substring(1); } - hfxx = hfxx + "含税货返使用税率" + taxRateStr + "%。"; + hfxx = hfxx + "含税货返使用税率"+taxRateStr+"%。"; } boolean tqq9_sfsyxf = bill.getBoolean("tqq9_sfsyxf");//现返 String xfxx = ""; - if (tqq9_sfsyxf) { + if(tqq9_sfsyxf){ xfxx = "现返信息:"; String tqq9_hsxfsygs = bill.getString("tqq9_hsxfsygs"); - if ("A".equals(tqq9_hsxfsygs)) { + if("A".equals(tqq9_hsxfsygs)){ //本年 xfxx = xfxx + "含税现返使用归属为本年,"; - } else { + }else{ //上年 xfxx = xfxx + "含税现返使用归属为本年,"; } BigDecimal tqq9_hsxfsyje = bill.getBigDecimal("tqq9_hsxfsyje"); - xfxx = xfxx + "含税现返使用金额" + tqq9_hsxfsyje + "元,"; + xfxx = xfxx + "含税现返使用金额"+tqq9_hsxfsyje+"元,"; BigDecimal tqq9_hsxfzje = bill.getBigDecimal("tqq9_hsxfzje"); - xfxx = xfxx + "含税现返总金额" + tqq9_hsxfzje + "元,"; + xfxx = xfxx + "含税现返总金额"+tqq9_hsxfzje+"元,"; BigDecimal tqq9_hsxfkyje = bill.getBigDecimal("tqq9_hsxfkyje"); - xfxx = xfxx + "含税现返可用金额" + tqq9_hsxfkyje + "元,"; + xfxx = xfxx + "含税现返可用金额"+tqq9_hsxfkyje+"元,"; DynamicObject tqq9_hsxfsysl = bill.getDynamicObject("tqq9_hsxfsysl"); String taxRateStr = "0"; - if (tqq9_hsxfsysl != null) { + if(tqq9_hsxfsysl != null){ String number = tqq9_hsxfsysl.getString("number"); taxRateStr = number.substring(1); } - xfxx = xfxx + "含税现返使用税率" + taxRateStr + "%。"; + xfxx = xfxx + "含税现返使用税率"+taxRateStr+"%。"; } BigDecimal zkqjshj = bill.getBigDecimal("tqq9_totalamount"); BigDecimal yhzkje = bill.getBigDecimal("tqq9_discountamount"); @@ -2268,7 +2266,7 @@ public class FWImpl { String bgyy = bill.getString("changereason"); String dhgys = null; DynamicObject supplier = bill.getDynamicObject("supplier"); - if (supplier != null) { + if(supplier != null){ dhgys = supplier.getString("number"); } String khlxr = bill.getString("tqq9_khlxr"); @@ -2287,13 +2285,13 @@ public class FWImpl { masterid = BusinessDataServiceHelper.loadSingle(masterid.getPkValue(), masterid.getDynamicObjectType().getName()); DynamicObject tqq9_brand = billentry.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String ggxh = masterid.getString("modelnum"); DynamicObject unit = billentry.getDynamicObject("unit"); String jldw = null; - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } String wlmc = masterid.getString("number"); @@ -2313,7 +2311,7 @@ public class FWImpl { String bz = billentry.getString("entrycomment"); boolean ispresent = billentry.getBoolean("ispresent"); int sfzp = 0; - if (ispresent) { + if(ispresent){ sfzp = 1; } @@ -2331,37 +2329,37 @@ public class FWImpl { e4.put("fieldValue", jldw); JSONObject e5 = new JSONObject(); e5.put("fieldName", "sl"); - e5.put("fieldValue", sl != null && sl.compareTo(BigDecimal.ZERO) != 0 ? sl : 0); + e5.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "hsdj"); - e6.put("fieldValue", hsdj != null && hsdj.compareTo(BigDecimal.ZERO) != 0 ? hsdj : 0); + e6.put("fieldValue", hsdj!=null&&hsdj.compareTo(BigDecimal.ZERO)!=0?hsdj:0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "tax_rate"); - e7.put("fieldValue", tax_rate != null && tax_rate.compareTo(BigDecimal.ZERO) != 0 ? tax_rate : 0); + e7.put("fieldValue", tax_rate!=null&&tax_rate.compareTo(BigDecimal.ZERO)!=0?tax_rate:0); JSONObject e8 = new JSONObject(); e8.put("fieldName", "zkqjshj"); - e8.put("fieldValue", zkqjshj_e != null && zkqjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj_e : 0); + e8.put("fieldValue", zkqjshj_e!=null&&zkqjshj_e.compareTo(BigDecimal.ZERO)!=0?zkqjshj_e:0); JSONObject e9 = new JSONObject(); e9.put("fieldName", "yhzkje"); - e9.put("fieldValue", yhzkje_e != null && yhzkje_e.compareTo(BigDecimal.ZERO) != 0 ? yhzkje_e : 0); + e9.put("fieldValue", yhzkje_e!=null&&yhzkje_e.compareTo(BigDecimal.ZERO)!=0?yhzkje_e:0); JSONObject e10 = new JSONObject(); e10.put("fieldName", "zkhjshj"); - e10.put("fieldValue", zkhjshj_e != null && zkhjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj_e : 0); + e10.put("fieldValue", zkhjshj_e!=null&&zkhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhjshj_e:0); JSONObject e11 = new JSONObject(); e11.put("fieldName", "hfsyje"); - e11.put("fieldValue", hfsyje != null && hfsyje.compareTo(BigDecimal.ZERO) != 0 ? hfsyje : 0); + e11.put("fieldValue", hfsyje!=null&&hfsyje.compareTo(BigDecimal.ZERO)!=0?hfsyje:0); JSONObject e12 = new JSONObject(); e12.put("fieldName", "xfsyje"); - e12.put("fieldValue", xfsyje != null && xfsyje.compareTo(BigDecimal.ZERO) != 0 ? xfsyje : 0); + e12.put("fieldValue", xfsyje!=null&&xfsyje.compareTo(BigDecimal.ZERO)!=0?xfsyje:0); JSONObject e13 = new JSONObject(); e13.put("fieldName", "zkhflhjshj"); - e13.put("fieldValue", zkhflhjshj_e != null && zkhflhjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkhflhjshj_e : 0); + e13.put("fieldValue", zkhflhjshj_e!=null&&zkhflhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj_e:0); JSONObject e14 = new JSONObject(); e14.put("fieldName", "cb"); - e14.put("fieldValue", cb != null && cb.compareTo(BigDecimal.ZERO) != 0 ? cb : 0); + e14.put("fieldValue", cb!=null&&cb.compareTo(BigDecimal.ZERO)!=0?cb:0); JSONObject e15 = new JSONObject(); e15.put("fieldName", "yjxssjy"); - e15.put("fieldValue", yjxssjy != null && yjxssjy.compareTo(BigDecimal.ZERO) != 0 ? yjxssjy : 0); + e15.put("fieldValue", yjxssjy!=null&&yjxssjy.compareTo(BigDecimal.ZERO)!=0?yjxssjy:0); JSONObject e16 = new JSONObject(); e16.put("fieldName", "bz"); e16.put("fieldValue", bz); @@ -2373,12 +2371,12 @@ public class FWImpl { e18.put("fieldValue", sfzp); JSONObject e19 = new JSONObject(); e19.put("fieldName", "sc83zsj"); - e19.put("fieldValue", sc83zsj != null && sc83zsj.compareTo(BigDecimal.ZERO) != 0 ? sc83zsj : 0); + e19.put("fieldValue", sc83zsj != null && sc83zsj.compareTo(BigDecimal.ZERO) != 0?sc83zsj:0); JSONObject e20 = new JSONObject(); e20.put("fieldName", "jshj"); - e20.put("fieldValue", jshj != null && jshj.compareTo(BigDecimal.ZERO) != 0 ? jshj : 0); + e20.put("fieldValue", jshj!=null&&jshj.compareTo(BigDecimal.ZERO)!=0?jshj:0); - List elist = Arrays.asList(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20); + List elist = Arrays.asList(e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -2389,11 +2387,11 @@ public class FWImpl { recordsArr1.add(recordObj); DynamicObject warehouse = billentry.getDynamicObject("warehouse"); - shck = warehouse.getString("number") + "_" + orgnumber;//shck + shck = warehouse.getString("number")+"_"+orgnumber;//shck } detail1.put("tableDBName", "formtable_main_98_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } @@ -2405,26 +2403,26 @@ public class FWImpl { for (DynamicObject purEntry : purEntries) { String kxmc = null; DynamicObject payname = purEntry.getDynamicObject("payname"); - if (payname != null) { + if(payname != null){ kxmc = payname.getString("name"); } String fkrq = null; Date paydate = purEntry.getDate("paydate"); - if (paydate != null) { + if(paydate != null){ fkrq = sdf.format(paydate); } BigDecimal fkbl = purEntry.getBigDecimal("payrate"); BigDecimal fkje = purEntry.getBigDecimal("payamount"); int sfyf = 1; boolean isprepay = purEntry.getBoolean("isprepay"); - if (isprepay) { + if(isprepay){ sfyf = 0; } String yfsd = null; String pretimepoint = purEntry.getString("pretimepoint"); - if ("A".equals(pretimepoint)) { + if("A".equals(pretimepoint)){ yfsd = "采购合同"; - } else if ("B".equals(pretimepoint)) { + }else if("B".equals(pretimepoint)){ yfsd = "采购订单"; } @@ -2438,10 +2436,10 @@ public class FWImpl { p1.put("fieldValue", kxmc); JSONObject p2 = new JSONObject(); p2.put("fieldName", "fkbl"); - p2.put("fieldValue", fkbl != null && fkbl.compareTo(BigDecimal.ZERO) != 0 ? fkbl : 0); + p2.put("fieldValue", fkbl!= null && fkbl.compareTo(BigDecimal.ZERO) != 0?fkbl:0); JSONObject p3 = new JSONObject(); p3.put("fieldName", "fkje"); - p3.put("fieldValue", fkje != null && fkje.compareTo(BigDecimal.ZERO) != 0 ? fkje : 0); + p3.put("fieldValue", fkje!= null && fkje.compareTo(BigDecimal.ZERO) != 0?fkje:0); JSONObject p4 = new JSONObject(); p4.put("fieldName", "sfyf"); p4.put("fieldValue", sfyf); @@ -2450,13 +2448,13 @@ public class FWImpl { p5.put("fieldValue", yfsd); JSONObject p6 = new JSONObject(); p6.put("fieldName", "glfkje"); - p6.put("fieldValue", glfkje != null && glfkje.compareTo(BigDecimal.ZERO) != 0 ? glfkje : 0); + p6.put("fieldValue", glfkje!= null && glfkje.compareTo(BigDecimal.ZERO) != 0?glfkje:0); JSONObject p7 = new JSONObject(); p7.put("fieldName", "yfje"); - p7.put("fieldValue", yfje_p != null && yfje_p.compareTo(BigDecimal.ZERO) != 0 ? yfje_p : 0); + p7.put("fieldValue", yfje_p!= null && yfje_p.compareTo(BigDecimal.ZERO) != 0?yfje_p:0); JSONObject p8 = new JSONObject(); p8.put("fieldName", "bcjsje"); - p8.put("fieldValue", bcjsje != null && bcjsje.compareTo(BigDecimal.ZERO) != 0 ? bcjsje : 0); + p8.put("fieldValue", bcjsje!= null && bcjsje.compareTo(BigDecimal.ZERO) != 0?bcjsje:0); JSONObject p9 = new JSONObject(); p9.put("fieldName", "fkd"); p9.put("fieldValue", "FKD234124"); @@ -2464,7 +2462,7 @@ public class FWImpl { p10.put("fieldName", "fkrq"); p10.put("fieldValue", fkrq); - List plist = Arrays.asList(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); + List plist = Arrays.asList(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(plist); JSONObject recordObj = new JSONObject(); @@ -2474,7 +2472,7 @@ public class FWImpl { } detail12.put("tableDBName", "formtable_main_98_dt2"); detail12.put("workflowRequestTableRecords", recordsArr2); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail12.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -2527,34 +2525,34 @@ public class FWImpl { m14.put("fieldValue", xfxx); JSONObject m15 = new JSONObject(); m15.put("fieldName", "zkqjshj"); - m15.put("fieldValue", zkqjshj != null && zkqjshj.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj : 0); + m15.put("fieldValue", zkqjshj!=null&&zkqjshj.compareTo(BigDecimal.ZERO)!=0?zkqjshj:0); JSONObject m16 = new JSONObject(); m16.put("fieldName", "yhzkje"); - m16.put("fieldValue", yhzkje != null && yhzkje.compareTo(BigDecimal.ZERO) != 0 ? yhzkje : 0); + m16.put("fieldValue", yhzkje!=null&&yhzkje.compareTo(BigDecimal.ZERO)!=0?yhzkje:0); JSONObject m17 = new JSONObject(); m17.put("fieldName", "zkhjshj"); - m17.put("fieldValue", zkhjshj != null && zkhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj : 0); + m17.put("fieldValue", zkhjshj!=null&&zkhjshj.compareTo(BigDecimal.ZERO)!=0?zkhjshj:0); JSONObject m18 = new JSONObject(); m18.put("fieldName", "zkhflhjshj"); - m18.put("fieldValue", zkhflhjshj != null && zkhflhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhflhjshj : 0); + m18.put("fieldValue", zkhflhjshj!=null&&zkhflhjshj.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj:0); JSONObject m19 = new JSONObject(); m19.put("fieldName", "yyfje"); - m19.put("fieldValue", yyfje != null && yyfje.compareTo(BigDecimal.ZERO) != 0 ? yyfje : 0); + m19.put("fieldValue", yyfje!=null&&yyfje.compareTo(BigDecimal.ZERO)!=0?yyfje:0); JSONObject m20 = new JSONObject(); m20.put("fieldName", "yfje"); - m20.put("fieldValue", yfje != null && yfje.compareTo(BigDecimal.ZERO) != 0 ? yfje : 0); + m20.put("fieldValue", yfje!=null&&yfje.compareTo(BigDecimal.ZERO)!=0?yfje:0); JSONObject m21 = new JSONObject(); m21.put("fieldName", "zflhzkje"); - m21.put("fieldValue", zflhzkje == null || zflhzkje.compareTo(BigDecimal.ZERO) == 0 ? 0 : zflhzkje); + m21.put("fieldValue", zflhzkje==null||zflhzkje.compareTo(BigDecimal.ZERO)==0?0:zflhzkje); JSONObject m22 = new JSONObject(); m22.put("fieldName", "lswdhzl"); - m22.put("fieldValue", lswdhzl == null || lswdhzl.compareTo(BigDecimal.ZERO) == 0 ? 0 : lswdhzl); + m22.put("fieldValue", lswdhzl==null||lswdhzl.compareTo(BigDecimal.ZERO)==0?0:lswdhzl); JSONObject m23 = new JSONObject(); m23.put("fieldName", "lswdhze"); - m23.put("fieldValue", lswdhze == null || lswdhze.compareTo(BigDecimal.ZERO) == 0 ? 0 : lswdhze); + m23.put("fieldValue", lswdhze==null||lswdhze.compareTo(BigDecimal.ZERO)==0?0:lswdhze); JSONObject m24 = new JSONObject(); m24.put("fieldName", "ddje"); - m24.put("fieldValue", ddje == null || ddje.compareTo(BigDecimal.ZERO) == 0 ? 0 : ddje); + m24.put("fieldValue", ddje==null||ddje.compareTo(BigDecimal.ZERO)==0?0:ddje); JSONObject m25 = new JSONObject(); m25.put("fieldName", "ycgddh"); m25.put("fieldValue", ycgddh); @@ -2577,8 +2575,8 @@ public class FWImpl { m31.put("fieldName", "shck"); m31.put("fieldValue", shck); - 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, m26, m27, m28, m29, m30, m31)); + 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,m26,m27,m28,m29,m30,m31)); JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist); String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_BGCGD"); @@ -2592,7 +2590,7 @@ public class FWImpl { /** * 采购退货申请推送泛微 */ - public static String pushFwPurRefund(DynamicObject bill) { + public static String pushFwPurRefund(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String billno = bill.getString("billno"); String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid"); @@ -2600,10 +2598,10 @@ public class FWImpl { String cjr = null; String cjbm = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ String deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -2616,19 +2614,19 @@ public class FWImpl { DynamicObject biztype = bill.getDynamicObject("biztype"); String biztypenumber = biztype.getString("number"); int ywlx = 0; - if ("1102".equals(biztypenumber)) { + if("1102".equals(biztypenumber)){ ywlx = 1; - } else if ("1104".equals(biztypenumber)) { + }else if("1104".equals(biztypenumber)){ ywlx = 2; } int sfxykhzsqd = 1; boolean tqq9_sfkhp = bill.getBoolean("tqq9_sfkhp"); - if (tqq9_sfkhp) { + if(tqq9_sfkhp){ sfxykhzsqd = 0; } String fplb = null; DynamicObject invoicebiztype = bill.getDynamicObject("invoicebiztype"); - if (invoicebiztype != null) { + if(invoicebiztype != null){ fplb = invoicebiztype.getString("name"); } BigDecimal se = bill.getBigDecimal("totaltaxamount"); @@ -2638,7 +2636,7 @@ public class FWImpl { BigDecimal thslhz = bill.getBigDecimal("tqq9_allqty"); String dhgys = null; DynamicObject supplier = bill.getDynamicObject("supplier"); - if (supplier != null) { + if(supplier != null){ dhgys = supplier.getString("number"); } @@ -2654,13 +2652,13 @@ public class FWImpl { String wlbm = masterid.getString("number"); DynamicObject tqq9_brand = billentry.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String ggxh = masterid.getString("modelnum"); DynamicObject unit = billentry.getDynamicObject("unit"); String jldw = null; - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } BigDecimal thsl = billentry.getBigDecimal("qty"); @@ -2685,18 +2683,18 @@ public class FWImpl { e4.put("fieldValue", jldw); JSONObject e5 = new JSONObject(); e5.put("fieldName", "thsl"); - e5.put("fieldValue", thsl != null && thsl.compareTo(BigDecimal.ZERO) != 0 ? thsl : 0); + e5.put("fieldValue", thsl!=null&&thsl.compareTo(BigDecimal.ZERO)!=0?thsl:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "hsdj"); - e6.put("fieldValue", hsdj != null && hsdj.compareTo(BigDecimal.ZERO) != 0 ? hsdj : 0); + e6.put("fieldValue", hsdj!=null&&hsdj.compareTo(BigDecimal.ZERO)!=0?hsdj:0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "yhzkje"); - e7.put("fieldValue", yhzkje != null && yhzkje.compareTo(BigDecimal.ZERO) != 0 ? yhzkje : 0); + e7.put("fieldValue", yhzkje!=null&&yhzkje.compareTo(BigDecimal.ZERO)!=0?yhzkje:0); JSONObject e8 = new JSONObject(); e8.put("fieldName", "zkhjshj"); - e8.put("fieldValue", zkhjshj_e != null && zkhjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj_e : 0); + e8.put("fieldValue", zkhjshj_e!=null&&zkhjshj_e.compareTo(BigDecimal.ZERO)!=0?zkhjshj_e:0); - List elist = Arrays.asList(e0, e1, e2, e3, e4, e5, e6, e7, e8); + List elist = Arrays.asList(e0,e1,e2,e3,e4,e5,e6,e7,e8); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -2707,7 +2705,7 @@ public class FWImpl { } detail1.put("tableDBName", "formtable_main_99_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -2746,19 +2744,19 @@ public class FWImpl { m10.put("fieldValue", fplb); JSONObject m11 = new JSONObject(); m11.put("fieldName", "se"); - m11.put("fieldValue", se != null && se.compareTo(BigDecimal.ZERO) != 0 ? se : 0); + m11.put("fieldValue", se!=null&&se.compareTo(BigDecimal.ZERO)!=0?se:0); JSONObject m12 = new JSONObject(); m12.put("fieldName", "zkhjshj"); - m12.put("fieldValue", zkhjshj != null && zkhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj : 0); + m12.put("fieldValue", zkhjshj!=null&&zkhjshj.compareTo(BigDecimal.ZERO)!=0?zkhjshj:0); JSONObject m13 = new JSONObject(); m13.put("fieldName", "sjtkje"); - m13.put("fieldValue", sjtkje != null && sjtkje.compareTo(BigDecimal.ZERO) != 0 ? sjtkje : 0); + m13.put("fieldValue", sjtkje!=null&&sjtkje.compareTo(BigDecimal.ZERO)!=0?sjtkje:0); JSONObject m14 = new JSONObject(); m14.put("fieldName", "bz"); m14.put("fieldValue", bz); JSONObject m15 = new JSONObject(); m15.put("fieldName", "thslhz"); - m15.put("fieldValue", thslhz != null && thslhz.compareTo(BigDecimal.ZERO) != 0 ? thslhz : 0); + m15.put("fieldValue", thslhz!=null&&thslhz.compareTo(BigDecimal.ZERO)!=0?thslhz:0); JSONObject m16 = new JSONObject(); m16.put("fieldName", "dhgys"); m16.put("fieldValue", dhgys); @@ -2766,8 +2764,8 @@ public class FWImpl { m17.put("fieldName", "cgddh"); m17.put("fieldValue", cgddh); - List mlist = new ArrayList<>(Arrays.asList(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, - m11, m12, m13, m14, m15, m16, m17)); + List mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10, + m11,m12,m13,m14,m15,m16,m17)); JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist); String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_CGTHSQ"); @@ -2781,11 +2779,10 @@ public class FWImpl { /** * 采购合同推送泛微 - * * @param bill * @return */ - public static String pushFwPurconm(DynamicObject bill) { + public static String pushFwPurconm(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String billno = bill.getString("billno"); String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid"); @@ -2793,10 +2790,10 @@ public class FWImpl { String cjr = null; String cjbm = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ String deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -2809,48 +2806,48 @@ public class FWImpl { int htlx = 0; DynamicObject type = bill.getDynamicObject("type"); String typeNumber = type.getString("number"); - if ("FLHT".equals(typeNumber)) { + if("FLHT".equals(typeNumber)){ htlx = 1; - } else if ("KJFLHT".equals(typeNumber)) { + }else if("KJFLHT".equals(typeNumber)){ htlx = 2; } int htmb = 0; String tqq9_htmb = bill.getString("tqq9_htmb"); - if ("FLCMB".equals(tqq9_htmb)) { + if("FLCMB".equals(tqq9_htmb)){ htmb = 1; } int ywms = 0; String bizmode = bill.getString("bizmode"); - if ("B".equals(bizmode)) { + if ("B".equals(bizmode)){ ywms = 1; - } else if ("C".equals(bizmode)) { + }else if ("C".equals(bizmode)){ ywms = 2; } String htksrq = null; Date biztimebegin = bill.getDate("biztimebegin"); - if (biztimebegin != null) { + if(biztimebegin != null){ htksrq = sdf.format(biztimebegin); } String htjsrq = null; Date biztimeend = bill.getDate("biztimeend"); - if (biztimeend != null) { + if(biztimeend != null){ htjsrq = sdf.format(biztimeend); } int htzt = 0; DynamicObject contparties = bill.getDynamicObject("contparties"); String contpartiesNumber = contparties.getString("number"); - if ("02".equals(contpartiesNumber)) { + if("02".equals(contpartiesNumber)){ htzt = 1; - } else if ("03".equals(contpartiesNumber)) { + }else if("03".equals(contpartiesNumber)){ htzt = 2; } int fktj = 0; String tqq9_jsfs = bill.getString("tqq9_jsfs"); - if ("kdfh".equals(tqq9_jsfs)) { + if("kdfh".equals(tqq9_jsfs)){ fktj = 1; - } else if ("yfhf".equals(tqq9_jsfs)) { + }else if("yfhf".equals(tqq9_jsfs)){ fktj = 2; - } else if ("ymjz".equals(tqq9_jsfs)) { + }else if("ymjz".equals(tqq9_jsfs)){ fktj = 3; } int zq = bill.getInt("tqq9_zq"); @@ -2861,7 +2858,7 @@ public class FWImpl { DynamicObject tqq9_brand = BusinessDataServiceHelper.loadSingle(id, "tqq9_brand", "id,name,number"); pp = pp + "," + tqq9_brand.getString("name"); } - if (StringUtils.isNotBlank(pp)) { + if(StringUtils.isNotBlank(pp)){ pp = pp.substring(1); } @@ -2869,7 +2866,7 @@ public class FWImpl { String dhlxr = null; String dhlxrdh = null; DynamicObject providerlinkman = bill.getDynamicObject("providerlinkman"); - if (providerlinkman != null) { + if(providerlinkman != null){ providerlinkman = BusinessDataServiceHelper.loadSingle(providerlinkman.getPkValue(), providerlinkman.getDynamicObjectType().getName(), "contactperson,id,phone,mobile"); dhlxr = providerlinkman.getString("contactperson"); dhlxrdh = providerlinkman.getString("phone"); @@ -2877,12 +2874,12 @@ public class FWImpl { String dhlxdz = bill.getString("provideraddress"); String dhgys = null; DynamicObject supplier = bill.getDynamicObject("supplier"); - if (supplier != null) { + if(supplier != null){ dhgys = supplier.getString("number"); } String dsf = null; DynamicObject partc = bill.getDynamicObject("partc"); - if (partc != null) { + if(partc != null){ dsf = partc.getString("number"); } @@ -2893,23 +2890,23 @@ public class FWImpl { JSONArray recordsArr2 = new JSONArray(); QFilter f1 = new QFilter("tqq9_conm_purcontract.id", "=", bill.getPkValue()); QFilter f2 = new QFilter("enable", "=", "1"); - DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1, f2}); + DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1,f2}); for (DynamicObject rule : ruleArr) { rule = BusinessDataServiceHelper.loadSingle(rule.getPkValue(), "tqq9_pur_rebate"); String flgzdjh = rule.getString("number"); String tqq9_rulestype = rule.getString("tqq9_rulestype"); int gzlx = 0; - if ("1".equals(tqq9_rulestype)) { + if("1".equals(tqq9_rulestype)){ gzlx = 1; } String flkssj = null; Date tqq9_startdate = rule.getDate("tqq9_startdate"); - if (tqq9_startdate != null) { + if(tqq9_startdate != null){ flkssj = sdf.format(tqq9_startdate); } String fljssj = null; Date tqq9_enddate = rule.getDate("tqq9_enddate"); - if (tqq9_enddate != null) { + if(tqq9_enddate != null){ fljssj = sdf.format(tqq9_enddate); } BigDecimal ygbl = rule.getBigDecimal("tqq9_estimatepro"); @@ -2921,7 +2918,7 @@ public class FWImpl { DynamicObject tqq9_brand = BusinessDataServiceHelper.loadSingle(id, "tqq9_brand", "id,name,number"); flpp = flpp + "," + tqq9_brand.getString("name"); } - if (StringUtils.isNotBlank(flpp)) { + if(StringUtils.isNotBlank(flpp)){ flpp = flpp.substring(1); } String flsp = ""; @@ -2931,7 +2928,7 @@ public class FWImpl { rebategoods = BusinessDataServiceHelper.loadSingle(id, "bd_material", "id,name,number"); flsp = flsp + "," + rebategoods.getString("number"); } - if (StringUtils.isNotBlank(flsp)) { + if(StringUtils.isNotBlank(flsp)){ flsp = flsp.substring(1); } String zdcgddbh = ""; @@ -2941,7 +2938,7 @@ public class FWImpl { purchaseorder = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); zdcgddbh = zdcgddbh + "," + purchaseorder.getString("billno"); } - if (StringUtils.isNotBlank(zdcgddbh)) { + if(StringUtils.isNotBlank(zdcgddbh)){ zdcgddbh = zdcgddbh.substring(1); } String pccgddbh = ""; @@ -2951,7 +2948,7 @@ public class FWImpl { exclupur = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); pccgddbh = pccgddbh + "," + exclupur.getString("billno"); } - if (StringUtils.isNotBlank(pccgddbh)) { + if(StringUtils.isNotBlank(pccgddbh)){ pccgddbh = pccgddbh.substring(1); } String pcsjdbpcddbh = ""; @@ -2961,67 +2958,67 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); pcsjdbpcddbh = pcsjdbpcddbh + "," + exclunopur.getString("billno"); } - if (StringUtils.isNotBlank(pcsjdbpcddbh)) { + if(StringUtils.isNotBlank(pcsjdbpcddbh)){ pcsjdbpcddbh = pcsjdbpcddbh.substring(1); } int pchjs = 0; String tqq9_excludnum = rule.getString("tqq9_excludnum"); - if ("1".equals(tqq9_excludnum)) { + if ("1".equals(tqq9_excludnum)){ pchjs = 1; } String pckssj = null; Date tqq9_startexcludate = rule.getDate("tqq9_startexcludate"); - if (tqq9_startexcludate != null) { + if(tqq9_startexcludate != null){ pckssj = sdf.format(tqq9_startexcludate); } String pcjssj = null; Date tqq9_endexcludate = rule.getDate("tqq9_endexcludate"); - if (tqq9_endexcludate != null) { + if(tqq9_endexcludate != null){ pcjssj = sdf.format(tqq9_endexcludate); } int flzt = 0; String tqq9_rebatesub = rule.getString("tqq9_rebatesub"); - if ("1".equals(tqq9_rebatesub)) { + if ("1".equals(tqq9_rebatesub)){ flzt = 1; } int gzlc = 1; boolean tqq9_guangzhoulici = rule.getBoolean("tqq9_guangzhoulici"); - if (tqq9_guangzhoulici) { + if(tqq9_guangzhoulici){ gzlc = 0; } BigDecimal gzlcbl = rule.getBigDecimal("tqq9_gzlcbl"); int shlc = 1; boolean tqq9_shanghailici = rule.getBoolean("tqq9_shanghailici"); - if (tqq9_shanghailici) { + if(tqq9_shanghailici){ shlc = 0; } BigDecimal shlcbl = rule.getBigDecimal("tqq9_shlcbl"); int bjlc = 1; boolean tqq9_beijinglichi = rule.getBoolean("tqq9_beijinglichi"); - if (tqq9_beijinglichi) { + if(tqq9_beijinglichi){ bjlc = 0; } BigDecimal bjlcbl = rule.getBigDecimal("tqq9_bjlcbl"); int sfhs = 1; boolean tqq9_istax = rule.getBoolean("tqq9_istax"); - if (tqq9_istax) { + if (tqq9_istax){ sfhs = 0; } int fljstl = 0; String tqq9_rebatesettlespe = rule.getString("tqq9_rebatesettlespe"); - if ("1".equals(tqq9_rebatesettlespe)) { + if ("1".equals(tqq9_rebatesettlespe)){ fljstl = 1; } int jsjezb = 0; String tqq9_cal_amt = rule.getString("tqq9_cal_amt"); - if ("1".equals(tqq9_cal_amt)) { + if("1".equals(tqq9_cal_amt)){ jsjezb = 1; - } else if ("2".equals(tqq9_cal_amt)) { + }else if("2".equals(tqq9_cal_amt)){ jsjezb = 2; } int jscgzb = 0; String tqq9_calc_procurement = rule.getString("tqq9_calc_procurement"); - if ("1".equals(tqq9_calc_procurement)) { + if("1".equals(tqq9_calc_procurement)){ jscgzb = 1; } BigDecimal flje = rule.getBigDecimal("tqq9_rebateamount"); @@ -3032,7 +3029,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "bd_supplier", "id,name,number"); flgys = flgys + "," + exclunopur.getString("number"); } - if (StringUtils.isNotBlank(flgys)) { + if(StringUtils.isNotBlank(flgys)){ flgys = flgys.substring(1); } @@ -3048,15 +3045,15 @@ public class FWImpl { e0.put("fieldValue", flgzdjh); JSONObject e1 = new JSONObject(); e1.put("fieldName", "ksjsjsbbh"); - e1.put("fieldValue", ksjsjsbbh != null && ksjsjsbbh.compareTo(BigDecimal.ZERO) != 0 ? ksjsjsbbh : 0); + e1.put("fieldValue", ksjsjsbbh!=null&&ksjsjsbbh.compareTo(BigDecimal.ZERO)!=0?ksjsjsbbh:0); JSONObject e2 = new JSONObject(); e2.put("fieldName", "jsjsjsbbh"); - e2.put("fieldValue", jsjsjsbbh != null && jsjsjsbbh.compareTo(BigDecimal.ZERO) != 0 ? jsjsjsbbh : 0); + e2.put("fieldValue", jsjsjsbbh!=null&&jsjsjsbbh.compareTo(BigDecimal.ZERO)!=0?jsjsjsbbh:0); JSONObject e3 = new JSONObject(); e3.put("fieldName", "bl"); - e3.put("fieldValue", bl != null && bl.compareTo(BigDecimal.ZERO) != 0 ? bl : 0); + e3.put("fieldValue", bl!=null&&bl.compareTo(BigDecimal.ZERO)!=0?bl:0); - List elist = Arrays.asList(e0, e1, e2, e3); + List elist = Arrays.asList(e0,e1,e2,e3); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -3067,6 +3064,7 @@ public class FWImpl { } + JSONObject e0 = new JSONObject(); e0.put("fieldName", "flgzdjh"); e0.put("fieldValue", flgzdjh); @@ -3081,10 +3079,10 @@ public class FWImpl { e3.put("fieldValue", fljssj); JSONObject e4 = new JSONObject(); e4.put("fieldName", "ygbl"); - e4.put("fieldValue", ygbl != null && ygbl.compareTo(BigDecimal.ZERO) != 0 ? ygbl : 0); + e4.put("fieldValue", ygbl!=null&&ygbl.compareTo(BigDecimal.ZERO)!=0?ygbl:0); JSONObject e5 = new JSONObject(); e5.put("fieldName", "mbcgje"); - e5.put("fieldValue", mbcgje != null && mbcgje.compareTo(BigDecimal.ZERO) != 0 ? mbcgje : 0); + e5.put("fieldValue", mbcgje!=null&&mbcgje.compareTo(BigDecimal.ZERO)!=0?mbcgje:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "flpp"); e6.put("fieldValue", flpp); @@ -3117,19 +3115,19 @@ public class FWImpl { e15.put("fieldValue", gzlc); JSONObject e16 = new JSONObject(); e16.put("fieldName", "gzlcbl"); - e16.put("fieldValue", gzlcbl != null && gzlcbl.compareTo(BigDecimal.ZERO) != 0 ? gzlcbl : 0); + e16.put("fieldValue", gzlcbl!=null&&gzlcbl.compareTo(BigDecimal.ZERO)!=0?gzlcbl:0); JSONObject e17 = new JSONObject(); e17.put("fieldName", "shlc"); e17.put("fieldValue", shlc); JSONObject e18 = new JSONObject(); e18.put("fieldName", "shlcbl"); - e18.put("fieldValue", shlcbl != null && shlcbl.compareTo(BigDecimal.ZERO) != 0 ? shlcbl : 0); + e18.put("fieldValue", shlcbl!=null&&shlcbl.compareTo(BigDecimal.ZERO)!=0?shlcbl:0); JSONObject e19 = new JSONObject(); e19.put("fieldName", "bjlc"); e19.put("fieldValue", bjlc); JSONObject e20 = new JSONObject(); e20.put("fieldName", "bjlcbl"); - e20.put("fieldValue", bjlcbl != null && bjlcbl.compareTo(BigDecimal.ZERO) != 0 ? bjlcbl : 0); + e20.put("fieldValue", bjlcbl!=null&&bjlcbl.compareTo(BigDecimal.ZERO)!=0?bjlcbl:0); JSONObject e21 = new JSONObject(); e21.put("fieldName", "sfhs"); e21.put("fieldValue", sfhs); @@ -3144,13 +3142,13 @@ public class FWImpl { e24.put("fieldValue", jscgzb); JSONObject e28 = new JSONObject(); e28.put("fieldName", "flje"); - e28.put("fieldValue", flje != null && flje.compareTo(BigDecimal.ZERO) != 0 ? flje : 0); + e28.put("fieldValue", flje!=null&&flje.compareTo(BigDecimal.ZERO)!=0?flje:0); JSONObject e29 = new JSONObject(); e29.put("fieldName", "flgys"); e29.put("fieldValue", flgys); - List elist = Arrays.asList(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 - , e19, e20, e21, e22, e23, e24, e28, e29); + List elist = Arrays.asList(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18 + ,e19,e20,e21,e22,e23,e24,e28,e29); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -3161,12 +3159,12 @@ public class FWImpl { } detail1.put("tableDBName", "formtable_main_101_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } detail2.put("tableDBName", "formtable_main_101_dt2"); detail2.put("workflowRequestTableRecords", recordsArr2); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail2.put("deleteAll", "1"); } @@ -3245,8 +3243,8 @@ public class FWImpl { m23.put("fieldName", "dsf"); m23.put("fieldValue", dsf); - 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)); + 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)); JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist); @@ -3261,17 +3259,16 @@ public class FWImpl { /** * 采购合同变更单 - * * @param bill * @return */ - public static String pushFwPurconmChange(DynamicObject bill) { + public static String pushFwPurconmChange(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String tqq9_bglx = bill.getString("tqq9_bglx"); int bglx = 0; - if ("B".equals(tqq9_bglx)) { + if("B".equals(tqq9_bglx)){ bglx = 1; - } else if ("C".equals(tqq9_bglx)) { + }else if("C".equals(tqq9_bglx)){ bglx = 2; } String bgyy = bill.getString("changereason"); @@ -3281,11 +3278,19 @@ public class FWImpl { DynamicObject creator = bill.getDynamicObject("creator"); String cjr = null; String cjbm = null; - DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), "bos_user"); + DynamicObjectCollection entryentity = creator.getDynamicObjectCollection("entryentity"); + DynamicObject tqq9_dept = null; + for (DynamicObject dynamicObject : entryentity) { + boolean ispartjob = dynamicObject.getBoolean("ispartjob"); + if (!ispartjob) { + tqq9_dept = dynamicObject.getDynamicObject("dpt"); + } + } + if(tqq9_dept != null){ String deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -3298,48 +3303,48 @@ public class FWImpl { int htlx = 0; DynamicObject type = bill.getDynamicObject("type"); String typeNumber = type.getString("number"); - if ("FLHT".equals(typeNumber)) { + if("FLHT".equals(typeNumber)){ htlx = 1; - } else if ("KJFLHT".equals(typeNumber)) { + }else if("KJFLHT".equals(typeNumber)){ htlx = 2; } int htmb = 0; String tqq9_htmb = bill.getString("tqq9_htmb"); - if ("FLCMB".equals(tqq9_htmb)) { + if("FLCMB".equals(tqq9_htmb)){ htmb = 1; } int ywms = 0; String bizmode = bill.getString("bizmode"); - if ("B".equals(bizmode)) { + if ("B".equals(bizmode)){ ywms = 1; - } else if ("C".equals(bizmode)) { + }else if ("C".equals(bizmode)){ ywms = 2; } String htksrq = null; Date biztimebegin = bill.getDate("biztimebegin"); - if (biztimebegin != null) { + if(biztimebegin != null){ htksrq = sdf.format(biztimebegin); } String htjsrq = null; Date biztimeend = bill.getDate("biztimeend"); - if (biztimeend != null) { + if(biztimeend != null){ htjsrq = sdf.format(biztimeend); } int htzt = 0; DynamicObject contparties = bill.getDynamicObject("contparties"); String contpartiesNumber = contparties.getString("number"); - if ("02".equals(contpartiesNumber)) { + if("02".equals(contpartiesNumber)){ htzt = 1; - } else if ("03".equals(contpartiesNumber)) { + }else if("03".equals(contpartiesNumber)){ htzt = 2; } int fktj = 0; String tqq9_jsfs = bill.getString("tqq9_jsfs"); - if ("kdfh".equals(tqq9_jsfs)) { + if("kdfh".equals(tqq9_jsfs)){ fktj = 1; - } else if ("yfhf".equals(tqq9_jsfs)) { + }else if("yfhf".equals(tqq9_jsfs)){ fktj = 2; - } else if ("ymjz".equals(tqq9_jsfs)) { + }else if("ymjz".equals(tqq9_jsfs)){ fktj = 3; } int zq = bill.getInt("tqq9_zq"); @@ -3350,7 +3355,7 @@ public class FWImpl { DynamicObject tqq9_brand = BusinessDataServiceHelper.loadSingle(id, "tqq9_brand", "id,name,number"); pp = pp + "," + tqq9_brand.getString("name"); } - if (StringUtils.isNotBlank(pp)) { + if(StringUtils.isNotBlank(pp)){ pp = pp.substring(1); } @@ -3358,7 +3363,7 @@ public class FWImpl { String dhlxr = null; String dhlxrdh = null; DynamicObject providerlinkman = bill.getDynamicObject("providerlinkman"); - if (providerlinkman != null) { + if(providerlinkman != null){ providerlinkman = BusinessDataServiceHelper.loadSingle(providerlinkman.getPkValue(), providerlinkman.getDynamicObjectType().getName()); dhlxr = providerlinkman.getString("contactperson"); dhlxrdh = providerlinkman.getString("phone"); @@ -3366,12 +3371,12 @@ public class FWImpl { String dhlxdz = bill.getString("provideraddress"); String dhgys = null; DynamicObject supplier = bill.getDynamicObject("supplier"); - if (supplier != null) { + if(supplier != null){ dhgys = supplier.getString("number"); } String dsf = null; DynamicObject partc = bill.getDynamicObject("partc"); - if (partc != null) { + if(partc != null){ dsf = partc.getString("number"); } @@ -3382,23 +3387,23 @@ public class FWImpl { JSONArray recordsArr2 = new JSONArray(); QFilter f1 = new QFilter("tqq9_conm_purcontract.number", "=", bill.getString("billno")); QFilter f2 = new QFilter("enable", "=", "1"); - DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1, f2}); + DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1,f2}); for (DynamicObject rule : ruleArr) { rule = BusinessDataServiceHelper.loadSingle(rule.getPkValue(), "tqq9_pur_rebate"); String flgzdjh = rule.getString("number"); String tqq9_rulestype = rule.getString("tqq9_rulestype"); int gzlx = 0; - if ("1".equals(tqq9_rulestype)) { + if("1".equals(tqq9_rulestype)){ gzlx = 1; } String flkssj = null; Date tqq9_startdate = rule.getDate("tqq9_startdate"); - if (tqq9_startdate != null) { + if(tqq9_startdate != null){ flkssj = sdf.format(tqq9_startdate); } String fljssj = null; Date tqq9_enddate = rule.getDate("tqq9_enddate"); - if (tqq9_enddate != null) { + if(tqq9_enddate != null){ fljssj = sdf.format(tqq9_enddate); } BigDecimal ygbl = rule.getBigDecimal("tqq9_estimatepro"); @@ -3410,7 +3415,7 @@ public class FWImpl { DynamicObject tqq9_brand = BusinessDataServiceHelper.loadSingle(id, "tqq9_brand", "id,name,number"); flpp = flpp + "," + tqq9_brand.getString("name"); } - if (StringUtils.isNotBlank(flpp)) { + if(StringUtils.isNotBlank(flpp)){ flpp = flpp.substring(1); } String flsp = ""; @@ -3420,7 +3425,7 @@ public class FWImpl { rebategoods = BusinessDataServiceHelper.loadSingle(id, "bd_material", "id,name,number"); flsp = flsp + "," + rebategoods.getString("number"); } - if (StringUtils.isNotBlank(flsp)) { + if(StringUtils.isNotBlank(flsp)){ flsp = flsp.substring(1); } String zdcgddbh = ""; @@ -3430,7 +3435,7 @@ public class FWImpl { purchaseorder = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); zdcgddbh = zdcgddbh + "," + purchaseorder.getString("billno"); } - if (StringUtils.isNotBlank(zdcgddbh)) { + if(StringUtils.isNotBlank(zdcgddbh)){ zdcgddbh = zdcgddbh.substring(1); } String pccgddbh = ""; @@ -3440,7 +3445,7 @@ public class FWImpl { exclupur = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); pccgddbh = pccgddbh + "," + exclupur.getString("billno"); } - if (StringUtils.isNotBlank(pccgddbh)) { + if(StringUtils.isNotBlank(pccgddbh)){ pccgddbh = pccgddbh.substring(1); } String pcsjdbpcddbh = ""; @@ -3450,67 +3455,67 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "pm_purorderbill", "id,name,billno"); pcsjdbpcddbh = pcsjdbpcddbh + "," + exclunopur.getString("billno"); } - if (StringUtils.isNotBlank(pcsjdbpcddbh)) { + if(StringUtils.isNotBlank(pcsjdbpcddbh)){ pcsjdbpcddbh = pcsjdbpcddbh.substring(1); } int pchjs = 0; String tqq9_excludnum = rule.getString("tqq9_excludnum"); - if ("1".equals(tqq9_excludnum)) { + if ("1".equals(tqq9_excludnum)){ pchjs = 1; } String pckssj = null; Date tqq9_startexcludate = rule.getDate("tqq9_startexcludate"); - if (tqq9_startexcludate != null) { + if(tqq9_startexcludate != null){ pckssj = sdf.format(tqq9_startexcludate); } String pcjssj = null; Date tqq9_endexcludate = rule.getDate("tqq9_endexcludate"); - if (tqq9_endexcludate != null) { + if(tqq9_endexcludate != null){ pcjssj = sdf.format(tqq9_endexcludate); } int flzt = 0; String tqq9_rebatesub = rule.getString("tqq9_rebatesub"); - if ("1".equals(tqq9_rebatesub)) { + if ("1".equals(tqq9_rebatesub)){ flzt = 1; } int gzlc = 1; boolean tqq9_guangzhoulici = rule.getBoolean("tqq9_guangzhoulici"); - if (tqq9_guangzhoulici) { + if(tqq9_guangzhoulici){ gzlc = 0; } BigDecimal gzlcbl = rule.getBigDecimal("tqq9_gzlcbl"); int shlc = 1; boolean tqq9_shanghailici = rule.getBoolean("tqq9_shanghailici"); - if (tqq9_shanghailici) { + if(tqq9_shanghailici){ shlc = 0; } BigDecimal shlcbl = rule.getBigDecimal("tqq9_shlcbl"); int bjlc = 1; boolean tqq9_beijinglichi = rule.getBoolean("tqq9_beijinglichi"); - if (tqq9_beijinglichi) { + if(tqq9_beijinglichi){ bjlc = 0; } BigDecimal bjlcbl = rule.getBigDecimal("tqq9_bjlcbl"); int sfhs = 1; boolean tqq9_istax = rule.getBoolean("tqq9_istax"); - if (tqq9_istax) { + if (tqq9_istax){ sfhs = 0; } int fljstl = 0; String tqq9_rebatesettlespe = rule.getString("tqq9_rebatesettlespe"); - if ("1".equals(tqq9_rebatesettlespe)) { + if ("1".equals(tqq9_rebatesettlespe)){ fljstl = 1; } int jsjezb = 0; String tqq9_cal_amt = rule.getString("tqq9_cal_amt"); - if ("1".equals(tqq9_cal_amt)) { + if("1".equals(tqq9_cal_amt)){ jsjezb = 1; - } else if ("2".equals(tqq9_cal_amt)) { + }else if("2".equals(tqq9_cal_amt)){ jsjezb = 2; } int jscgzb = 0; String tqq9_calc_procurement = rule.getString("tqq9_calc_procurement"); - if ("1".equals(tqq9_calc_procurement)) { + if("1".equals(tqq9_calc_procurement)){ jscgzb = 1; } BigDecimal flje = rule.getBigDecimal("tqq9_rebateamount"); @@ -3521,7 +3526,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "bd_supplier", "id,name,number"); flgys = flgys + "," + exclunopur.getString("number"); } - if (StringUtils.isNotBlank(flgys)) { + if(StringUtils.isNotBlank(flgys)){ flgys = flgys.substring(1); } @@ -3536,15 +3541,15 @@ public class FWImpl { e0.put("fieldValue", flgzdjh); JSONObject e1 = new JSONObject(); e1.put("fieldName", "ksjsjsbbh"); - e1.put("fieldValue", ksjsjsbbh != null && ksjsjsbbh.compareTo(BigDecimal.ZERO) != 0 ? ksjsjsbbh : 0); + e1.put("fieldValue", ksjsjsbbh!=null&&ksjsjsbbh.compareTo(BigDecimal.ZERO)!=0?ksjsjsbbh:0); JSONObject e2 = new JSONObject(); e2.put("fieldName", "jsjsjsbbh"); - e2.put("fieldValue", jsjsjsbbh != null && jsjsjsbbh.compareTo(BigDecimal.ZERO) != 0 ? jsjsjsbbh : 0); + e2.put("fieldValue", jsjsjsbbh!=null&&jsjsjsbbh.compareTo(BigDecimal.ZERO)!=0?jsjsjsbbh:0); JSONObject e3 = new JSONObject(); e3.put("fieldName", "bl"); - e3.put("fieldValue", bl != null && bl.compareTo(BigDecimal.ZERO) != 0 ? bl : 0); + e3.put("fieldValue", bl!=null&&bl.compareTo(BigDecimal.ZERO)!=0?bl:0); - List elist = Arrays.asList(e0, e1, e2, e3); + List elist = Arrays.asList(e0,e1,e2,e3); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -3568,10 +3573,10 @@ public class FWImpl { e3.put("fieldValue", fljssj); JSONObject e4 = new JSONObject(); e4.put("fieldName", "ygbl"); - e4.put("fieldValue", ygbl != null && ygbl.compareTo(BigDecimal.ZERO) != 0 ? ygbl : 0); + e4.put("fieldValue", ygbl!=null&&ygbl.compareTo(BigDecimal.ZERO)!=0?ygbl:0); JSONObject e5 = new JSONObject(); e5.put("fieldName", "mbcgje"); - e5.put("fieldValue", mbcgje != null && mbcgje.compareTo(BigDecimal.ZERO) != 0 ? mbcgje : 0); + e5.put("fieldValue", mbcgje!=null&&mbcgje.compareTo(BigDecimal.ZERO)!=0?mbcgje:0); JSONObject e6 = new JSONObject(); e6.put("fieldName", "flpp"); e6.put("fieldValue", flpp); @@ -3604,19 +3609,19 @@ public class FWImpl { e15.put("fieldValue", gzlc); JSONObject e16 = new JSONObject(); e16.put("fieldName", "gzlcbl"); - e16.put("fieldValue", gzlcbl != null && gzlcbl.compareTo(BigDecimal.ZERO) != 0 ? gzlcbl : 0); + e16.put("fieldValue", gzlcbl!=null&&gzlcbl.compareTo(BigDecimal.ZERO)!=0?gzlcbl:0); JSONObject e17 = new JSONObject(); e17.put("fieldName", "shlc"); e17.put("fieldValue", shlc); JSONObject e18 = new JSONObject(); e18.put("fieldName", "shlcbl"); - e18.put("fieldValue", shlcbl != null && shlcbl.compareTo(BigDecimal.ZERO) != 0 ? shlcbl : 0); + e18.put("fieldValue", shlcbl!=null&&shlcbl.compareTo(BigDecimal.ZERO)!=0?shlcbl:0); JSONObject e19 = new JSONObject(); e19.put("fieldName", "bjlc"); e19.put("fieldValue", bjlc); JSONObject e20 = new JSONObject(); e20.put("fieldName", "bjlcbl"); - e20.put("fieldValue", bjlcbl != null && bjlcbl.compareTo(BigDecimal.ZERO) != 0 ? bjlcbl : 0); + e20.put("fieldValue", bjlcbl!=null&&bjlcbl.compareTo(BigDecimal.ZERO)!=0?bjlcbl:0); JSONObject e21 = new JSONObject(); e21.put("fieldName", "sfhs"); e21.put("fieldValue", sfhs); @@ -3631,13 +3636,13 @@ public class FWImpl { e24.put("fieldValue", jscgzb); JSONObject e28 = new JSONObject(); e28.put("fieldName", "flje"); - e28.put("fieldValue", flje != null && flje.compareTo(BigDecimal.ZERO) != 0 ? flje : 0); + e28.put("fieldValue", flje!=null&&flje.compareTo(BigDecimal.ZERO)!=0?flje:0); JSONObject e29 = new JSONObject(); e29.put("fieldName", "flgys"); e29.put("fieldValue", flgys); - List elist = Arrays.asList(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 - , e19, e20, e21, e22, e23, e24, e28, e29); + List elist = Arrays.asList(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18 + ,e19,e20,e21,e22,e23,e24,e28,e29); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -3648,13 +3653,13 @@ public class FWImpl { } detail1.put("tableDBName", "formtable_main_102_dt1"); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail1.put("deleteAll", "1"); } detail2.put("tableDBName", "formtable_main_102_dt2"); detail2.put("workflowRequestTableRecords", recordsArr2); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail2.put("deleteAll", "1"); } @@ -3739,8 +3744,8 @@ public class FWImpl { m23.put("fieldName", "dsf"); m23.put("fieldValue", dsf); - List mlist = new ArrayList<>(Arrays.asList(ma, mb, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, - m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23)); + List mlist = new ArrayList<>(Arrays.asList(ma,mb,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10, + m11,m12,m13,m14,m15,m16,m17,m18,m19,m20,m21,m22,m23)); // 附件 List fjList = new ArrayList<>(); @@ -3756,7 +3761,7 @@ public class FWImpl { fjList.add(fj); } - if (fjList.size() > 0) { + if(fjList.size() > 0){ JSONObject fjObj = new JSONObject(); fjObj.put("fieldName", "bcxysc"); fjObj.put("fieldValue", fjList); @@ -3788,7 +3793,7 @@ public class FWImpl { if (tqq9_dept != null) { String deptNumber = tqq9_dept.getString("number"); bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ sqr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -4106,11 +4111,18 @@ public class FWImpl { String sqr = null;//申请人 String bm = null;//部门 String deptNumber = null; - DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept");//创建部门 + DynamicObjectCollection entryentity = creator.getDynamicObjectCollection("entryentity"); + DynamicObject tqq9_dept = null;//创建部门 + for (DynamicObject dynamicObject : entryentity) { + boolean ispartjob = dynamicObject.getBoolean("ispartjob"); + if (!ispartjob) { + tqq9_dept = dynamicObject.getDynamicObject("dpt"); + } + } if (tqq9_dept != null) { deptNumber = tqq9_dept.getString("number"); bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ sqr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -4266,7 +4278,7 @@ public class FWImpl { String ck = null; DynamicObject warehouse = entry.getDynamicObject("warehouse");//仓库 if (null != warehouse) { - ck = warehouse.getString("number") + "<>" + orgNumber; + ck = warehouse.getString("number")+"_"+orgNumber; } JSONObject e1 = new JSONObject(); @@ -4431,7 +4443,7 @@ public class FWImpl { if (tqq9_dept != null) { deptNumber = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -4466,7 +4478,7 @@ public class FWImpl { JSONObject detail1 = new JSONObject(); JSONArray recordsArr1 = new JSONArray(); - DynamicObjectCollection entries = bill.getDynamicObjectCollection("billentry"); + DynamicObjectCollection entries = bill.getDynamicObjectCollection("billentry"); for (DynamicObject entry : entries) { //规格型号 String ggxh = null; @@ -4490,7 +4502,7 @@ public class FWImpl { //生产日期 String scrq = null; Date producedate = entry.getDate("producedate"); - if (producedate != null) { + if(producedate != null){ scrq = sdf.format(producedate); } @@ -4521,7 +4533,7 @@ public class FWImpl { //责任承担方 int zrcdf = 0; String tqq9_asstacttype = entry.getString("tqq9_asstacttype"); - if (StringUtils.equals("bos_user", tqq9_asstacttype)) { + if (StringUtils.equals("bos_user", tqq9_asstacttype)){ zrcdf = 1; } @@ -4647,11 +4659,10 @@ public class FWImpl { /** * 新增供应商推送泛微 - * * @param bill * @return */ - public static String pushFwSupplier(DynamicObject bill) { + public static String pushFwSupplier(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String gysmc = bill.getString("name"); String gysbh = bill.getString("number"); @@ -4659,10 +4670,10 @@ public class FWImpl { String cjbm = null; String cjr = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if(tqq9_dept != null){ String number = tqq9_dept.getString("number"); cjbm = FWUtils.getFwOrgNumberByKdOrgNumber(number); - if (creator != null) { + if(creator != null){ cjr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), tqq9_dept.getString("number")); } } @@ -4674,125 +4685,125 @@ public class FWImpl { String ywgz = FWUtils.getFwOrgNumberByKdOrgNumber(orgNumber); int gysfl = 0; String tqq9_combofield5_gysfl = bill.getString("tqq9_combofield5_gysfl"); - if ("02".equals(tqq9_combofield5_gysfl)) { + if ("02".equals(tqq9_combofield5_gysfl)){ gysfl = 1; } String cjlx = ""; String tqq9_mulcombofield = bill.getString("tqq9_mulcombofield"); - if (StringUtils.isNotBlank(tqq9_mulcombofield)) { - if (tqq9_mulcombofield.contains("A")) { + if(StringUtils.isNotBlank(tqq9_mulcombofield)){ + if(tqq9_mulcombofield.contains("A")){ cjlx = cjlx + "," + "0"; } - if (tqq9_mulcombofield.contains("B")) { + if(tqq9_mulcombofield.contains("B")){ cjlx = cjlx + "," + "1"; } - if (StringUtils.isNotBlank(cjlx)) { + if(StringUtils.isNotBlank(cjlx)){ cjlx = cjlx.substring(1); } } String gysqyzz = ""; String tqq9_mulcombofield1 = bill.getString("tqq9_mulcombofield1"); - if (StringUtils.isNotBlank(tqq9_mulcombofield1)) { - if (tqq9_mulcombofield1.contains("A")) { + if(StringUtils.isNotBlank(tqq9_mulcombofield1)){ + if(tqq9_mulcombofield1.contains("A")){ gysqyzz = gysqyzz + "," + "0"; } - if (tqq9_mulcombofield1.contains("B")) { + if(tqq9_mulcombofield1.contains("B")){ gysqyzz = gysqyzz + "," + "1"; } - if (tqq9_mulcombofield1.contains("C")) { + if(tqq9_mulcombofield1.contains("C")){ gysqyzz = gysqyzz + "," + "2"; } - if (StringUtils.isNotBlank(gysqyzz)) { + if(StringUtils.isNotBlank(gysqyzz)){ gysqyzz = gysqyzz.substring(1); } } int oazt = 0; int sfnbgys = 1; boolean chkisinternalcompany = bill.getBoolean("chkisinternalcompany"); - if (chkisinternalcompany) { + if (chkisinternalcompany){ sfnbgys = 0; } String nbywdy = null; DynamicObject internal_company = bill.getDynamicObject("internal_company"); - if (internal_company != null) { + if(internal_company != null){ nbywdy = internal_company.getString("name"); } int sfylqx = 1; boolean tqq9_sfylqx = bill.getBoolean("tqq9_sfylqx"); - if (tqq9_sfylqx) { + if(tqq9_sfylqx){ sfylqx = 0; } int sfcggys = 1; boolean tqq9_ispur = bill.getBoolean("tqq9_ispur"); - if (tqq9_ispur) { + if (tqq9_ispur){ sfcggys = 0; } int zzsyzxyxts = bill.getInt("tqq9_minvaliddays"); int sfyyyzz = 1; boolean tqq9_gysyyzz = bill.getBoolean("tqq9_gysyyzz"); - if (tqq9_gysyyzz) { + if(tqq9_gysyyzz){ sfyyyzz = 0; } int sfyylqxscxkz = 1; boolean tqq9_gysylqxscxkz = bill.getBoolean("tqq9_gysylqxscxkz"); - if (tqq9_gysylqxscxkz) { + if(tqq9_gysylqxscxkz){ sfyylqxscxkz = 0; } int sfyylqxjyxkz = 1; boolean tqq9_gysylqxjyxkz = bill.getBoolean("tqq9_gysylqxjyxkz"); - if (tqq9_gysylqxjyxkz) { + if(tqq9_gysylqxjyxkz){ sfyylqxjyxkz = 0; } int sfydelylqxjybapz = 1; boolean tqq9_gysdelylqxjybapz = bill.getBoolean("tqq9_gysdelylqxjybapz"); - if (tqq9_gysdelylqxjybapz) { + if(tqq9_gysdelylqxjybapz){ sfydelylqxjybapz = 0; } int sfyyljgzhxkz = 1; boolean tqq9_gysyljgzxxkz = bill.getBoolean("tqq9_gysyljgzxxkz"); - if (tqq9_gysyljgzxxkz) { + if(tqq9_gysyljgzxxkz){ sfyyljgzhxkz = 0; } int sfyhzpxkz = 1; boolean tqq9_gyshzpxkz = bill.getBoolean("tqq9_gyshzpxkz"); - if (tqq9_gyshzpxkz) { + if(tqq9_gyshzpxkz){ sfyhzpxkz = 0; } int sfyzlbzs = 1; boolean tqq9_gyszlbzs = bill.getBoolean("tqq9_gyszlbzs"); - if (tqq9_gyszlbzs) { + if(tqq9_gyszlbzs){ sfyzlbzs = 0; } int sfyfrwtsqs = 1; boolean tqq9_gysfrwtsqs = bill.getBoolean("tqq9_gysfrwtsqs"); - if (tqq9_gysfrwtsqs) { + if(tqq9_gysfrwtsqs){ sfyfrwtsqs = 0; } String bz = bill.getString("tqq9_bzgys"); - String tyshxydm = bill.getString("tqq9_textfield33"); + String tyshxydm = bill.getString("societycreditcode"); String yyzzbh = bill.getString("tqq9_textfield13"); String fddbr = bill.getString("tqq9_textfield210"); String clrq = null; Date tqq9_datefield51 = bill.getDate("tqq9_datefield51"); - if (tqq9_datefield51 != null) { + if(tqq9_datefield51 != null){ clrq = sdf.format(tqq9_datefield51); } String qsrq = null; Date tqq9_yyzzqsrq1 = bill.getDate("tqq9_yyzzqsrq1"); - if (tqq9_yyzzqsrq1 != null) { + if(tqq9_yyzzqsrq1 != null){ qsrq = sdf.format(tqq9_yyzzqsrq1); } String sxrq = null; Date tqq9_datefield91 = bill.getDate("tqq9_datefield91"); - if (tqq9_datefield91 != null) { + if(tqq9_datefield91 != null){ sxrq = sdf.format(tqq9_datefield91); } String zczb = bill.getString("tqq9_textfield3_zczb1"); String zs = bill.getString("tqq9_textfield4_zs1"); int ylxs = 1; boolean tqq9_yyzzsfylxs1 = bill.getBoolean("tqq9_yyzzsfylxs1"); - if (tqq9_yyzzsfylxs1) { + if (tqq9_yyzzsfylxs1){ ylxs = 0; } String ylqxscxkzbh = bill.getString("tqq9_textfield18"); @@ -4803,12 +4814,12 @@ public class FWImpl { String scdz2 = bill.getString("tqq9_textfield21"); String qsrq2 = null; Date tqq9_datefield = bill.getDate("tqq9_datefield"); - if (tqq9_datefield != null) { + if(tqq9_datefield != null){ qsrq2 = sdf.format(tqq9_datefield); } String sxrq2 = null; Date tqq9_datefield1 = bill.getDate("tqq9_datefield1"); - if (tqq9_datefield1 != null) { + if(tqq9_datefield1 != null){ sxrq2 = sdf.format(tqq9_datefield1); } String scfwelcpfl = ""; @@ -4818,7 +4829,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwelcpfl = scfwelcpfl + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwelcpfl)) { + if(StringUtils.isNotBlank(scfwelcpfl)){ scfwelcpfl = scfwelcpfl.substring(1); } String scfwslcpfl = ""; @@ -4828,7 +4839,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwslcpfl = scfwslcpfl + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwslcpfl)) { + if(StringUtils.isNotBlank(scfwslcpfl)){ scfwslcpfl = scfwslcpfl.substring(1); } String ylqxjyxkzbh = bill.getString("tqq9_textfield16"); @@ -4841,12 +4852,12 @@ public class FWImpl { String qyfzr111 = bill.getString("tqq9_textfield7"); String qsrq111 = null; Date tqq9_datefield20 = bill.getDate("tqq9_datefield20"); - if (tqq9_datefield20 != null) { + if(tqq9_datefield20 != null){ qsrq111 = sdf.format(tqq9_datefield20); } String sxrq111 = null; Date tqq9_datefield21 = bill.getDate("tqq9_datefield21"); - if (tqq9_datefield21 != null) { + if(tqq9_datefield21 != null){ sxrq111 = sdf.format(tqq9_datefield21); } String scfwslcpfl111 = ""; @@ -4856,7 +4867,7 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwslcpfl111 = scfwslcpfl111 + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwslcpfl111)) { + if(StringUtils.isNotBlank(scfwslcpfl111)){ scfwslcpfl111 = scfwslcpfl111.substring(1); } String delylqxjybah = bill.getString("tqq9_textfield26"); @@ -4874,12 +4885,12 @@ public class FWImpl { exclunopur = BusinessDataServiceHelper.loadSingle(id, "tqq9_reggoodstype", "id,name,number"); scfwelcpfl4 = scfwelcpfl4 + "," + exclunopur.getString("name"); } - if (StringUtils.isNotBlank(scfwelcpfl4)) { + if(StringUtils.isNotBlank(scfwelcpfl4)){ scfwelcpfl4 = scfwelcpfl4.substring(1); } String barq = null; Date tqq9_datefield4 = bill.getDate("tqq9_datefield4"); - if (tqq9_datefield4 != null) { + if(tqq9_datefield4 != null){ barq = sdf.format(tqq9_datefield4); } String yljgmc = bill.getString("tqq9_textfield29"); @@ -4890,30 +4901,30 @@ public class FWImpl { String zlxm5 = bill.getString("tqq9_textfield12"); String qsrq5 = null; Date tqq9_datefield6 = bill.getDate("tqq9_datefield6"); - if (tqq9_datefield6 != null) { + if(tqq9_datefield6 != null){ qsrq5 = sdf.format(tqq9_datefield6); } String sxrq5 = null; Date tqq9_datefield22 = bill.getDate("tqq9_datefield22"); - if (tqq9_datefield22 != null) { + if(tqq9_datefield22 != null){ sxrq5 = sdf.format(tqq9_datefield22); } String xkzh = bill.getString("tqq9_textxkzh"); String xkzbfrq = null; Date tqq9_licensestartdate = bill.getDate("tqq9_licensestartdate"); - if (tqq9_licensestartdate != null) { + if(tqq9_licensestartdate != null){ xkzbfrq = sdf.format(tqq9_licensestartdate); } String xkzjzrq = null; Date tqq9_licenseenddate = bill.getDate("tqq9_licenseenddate"); - if (tqq9_licenseenddate != null) { + if(tqq9_licenseenddate != null){ xkzjzrq = sdf.format(tqq9_licenseenddate); } int syyxts = bill.getInt("tqq9_integerfield"); String qymc6 = bill.getString("tqq9_qymc"); String zlbzxyyxqz = null; Date tqq9_zlbzxyyxqz = bill.getDate("tqq9_zlbzxyyxqz"); - if (tqq9_zlbzxyyxqz != null) { + if(tqq9_zlbzxyyxqz != null){ zlbzxyyxqz = sdf.format(tqq9_zlbzxyyxqz); } int syyxts5 = bill.getInt("tqq9_validdays_zlbz"); @@ -4921,12 +4932,12 @@ public class FWImpl { String sfzh = bill.getString("tqq9_sfz"); String qyrq6 = null; Date tqq9_qyrq = bill.getDate("tqq9_qyrq"); - if (tqq9_qyrq != null) { + if(tqq9_qyrq != null){ qyrq6 = sdf.format(tqq9_qyrq); } String tyrq6 = null; Date tqq9_datefield7 = bill.getDate("tqq9_datefield7"); - if (tqq9_datefield7 != null) { + if(tqq9_datefield7 != null){ tyrq6 = sdf.format(tqq9_datefield7); } String sqcpx = bill.getString("tqq9_textfield37"); @@ -4935,17 +4946,17 @@ public class FWImpl { int syyxts6 = bill.getInt("tqq9_validdays_frsq"); String qylx = null; String tqq9_combofield31 = bill.getString("tqq9_combofield31"); - if ("A".equals(tqq9_combofield31)) { + if("A".equals(tqq9_combofield31)){ qylx = "0"; - } else if ("B".equals(tqq9_combofield31)) { + }else if("B".equals(tqq9_combofield31)){ qylx = "1"; - } else if ("C".equals(tqq9_combofield31)) { + }else if("C".equals(tqq9_combofield31)){ qylx = "2"; - } else if ("D".equals(tqq9_combofield31)) { + }else if("D".equals(tqq9_combofield31)){ qylx = "3"; - } else if ("E".equals(tqq9_combofield31)) { + }else if("E".equals(tqq9_combofield31)){ qylx = "4"; - } else if ("F".equals(tqq9_combofield31)) { + }else if("F".equals(tqq9_combofield31)){ qylx = "5"; } @@ -4961,7 +4972,7 @@ public class FWImpl { String yx = linkman.getString("email"); int sfmr = 1; boolean isdefault_linkman = linkman.getBoolean("isdefault_linkman"); - if (isdefault_linkman) { + if(isdefault_linkman){ sfmr = 0; } @@ -4984,7 +4995,7 @@ public class FWImpl { e6.put("fieldName", "sfmr"); e6.put("fieldValue", sfmr); - List elist = Arrays.asList(e1, e2, e3, e4, e5, e6); + List elist = Arrays.asList(e1,e2,e3,e4,e5,e6); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -5003,18 +5014,18 @@ public class FWImpl { String skfmc = bankEntry.getString("accountname"); String khyh = null; DynamicObject bank = bankEntry.getDynamicObject("bank"); - if (bank != null) { + if(bank != null){ khyh = bank.getString("name"); } String yhzh = bankEntry.getString("bankaccount"); int sfmr = 1; boolean isdefault_bank = bankEntry.getBoolean("isdefault_bank"); - if (isdefault_bank) { + if(isdefault_bank){ sfmr = 0; } String bze = null; DynamicObject currency = bankEntry.getDynamicObject("currency"); - if (currency != null) { + if(currency != null){ bze = currency.getString("number"); } @@ -5034,7 +5045,7 @@ public class FWImpl { p5.put("fieldName", "bz"); p5.put("fieldValue", bze); - List plist = Arrays.asList(p1, p2, p3, p4, p5); + List plist = Arrays.asList(p1,p2,p3,p4,p5); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(plist); JSONObject recordObj = new JSONObject(); @@ -5142,7 +5153,7 @@ public class FWImpl { m43.put("fieldValue", sxrq); JSONObject m44 = new JSONObject(); m44.put("fieldName", "zczb"); - m44.put("fieldValue", zczb); + m44.put("fieldValue", StringUtils.isNotBlank(zczb)?zczb:0); JSONObject m45 = new JSONObject(); m45.put("fieldName", "zs"); m45.put("fieldValue", zs); @@ -5318,11 +5329,11 @@ public class FWImpl { m105.put("fieldName", "qylx"); m105.put("fieldValue", qylx); - List mlist = new ArrayList<>(Arrays.asList(m1, m2, m3, m4, m5, 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, m104, m105)); + List mlist = new ArrayList<>(Arrays.asList(m1,m2,m3,m4,m5,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,m104,m105)); // 附件 List fjList = new ArrayList<>(); List> attachments = AttachmentServiceHelper.getAttachments("bd_supplier", bill.getPkValue(), "tqq9_attachmentpanelap"); @@ -5337,7 +5348,7 @@ public class FWImpl { fjList.add(fj); } - if (fjList.size() > 0) { + if(fjList.size() > 0){ JSONObject fjObj = new JSONObject(); fjObj.put("fieldName", "htfj"); fjObj.put("fieldValue", fjList); @@ -5353,7 +5364,7 @@ public class FWImpl { String tableName_2 = "formtable_main_103_dt2"; String requestid = bill.getString("tqq9_fwrequestid"); boolean tqq9_issuccess = bill.getBoolean("tqq9_issuccess"); - if (tqq9_issuccess) { + if(tqq9_issuccess){ requestName = "变更供应商流程"; tableName_1 = "formtable_main_105_dt1"; tableName_2 = "formtable_main_105_dt2"; @@ -5364,12 +5375,12 @@ public class FWImpl { // 组装明细数据 detail1.put("tableDBName", tableName_1); detail1.put("workflowRequestTableRecords", recordsArr1); - if (StringUtils.isNotBlank(requestid)) { + if(StringUtils.isNotBlank(requestid)){ detail1.put("deleteAll", "1"); } detail12.put("tableDBName", tableName_2); detail12.put("workflowRequestTableRecords", recordsArr2); - if (StringUtils.isNotBlank(requestid)) { + if(StringUtils.isNotBlank(requestid)){ detail12.put("deleteAll", "1"); } JSONArray detailRootArr = new JSONArray(); @@ -5384,21 +5395,20 @@ public class FWImpl { /** * 物料提交推送泛微 - * * @param bill * @return */ - public static String pushFwMaterial(DynamicObject bill) { + public static String pushFwMaterial(DynamicObject bill){ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); DynamicObject creator = bill.getDynamicObject("creator"); String sqr = null; String bm = null; String deptNumber = null; DynamicObject tqq9_dept = bill.getDynamicObject("tqq9_dept"); - if (tqq9_dept != null) { + if (tqq9_dept != null){ deptNumber = tqq9_dept.getString("number"); bm = FWUtils.getFwOrgNumberByKdOrgNumber(deptNumber); - if (creator != null) { + if(creator != null){ sqr = FWUtils.getFwUserIdByKdUserNumber(creator.getString("number"), deptNumber); } } @@ -5417,7 +5427,7 @@ public class FWImpl { long id = shcg.getLong("fbasedataid.id"); shcg = BusinessDataServiceHelper.loadSingle(id, "bd_operator", "id,name,number,operatorid"); DynamicObject user = shcg.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ zhcg = zhcg + "," + FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -5426,7 +5436,7 @@ public class FWImpl { long id = bjcg.getLong("fbasedataid.id"); bjcg = BusinessDataServiceHelper.loadSingle(id, "bd_operator", "id,name,number,operatorid"); DynamicObject user = bjcg.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ zhcg = zhcg + "," + FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } @@ -5435,152 +5445,152 @@ public class FWImpl { long id = gzcg.getLong("fbasedataid.id"); gzcg = BusinessDataServiceHelper.loadSingle(id, "bd_operator", "id,name,number,operatorid"); DynamicObject user = gzcg.getDynamicObject("operatorid"); - if (user != null) { + if(user != null){ zhcg = zhcg + "," + FWUtils.getFwUserIdByKdUserNumber(user.getString("number"), deptNumber); } } - if (StringUtils.isNotBlank(zhcg)) { + if(StringUtils.isNotBlank(zhcg)){ zhcg = zhcg.substring(1); } String ywfzr = ""; DynamicObject tqq9_ywfzr21 = bill.getDynamicObject("tqq9_ywfzr21"); - if (tqq9_ywfzr21 != null) { + if(tqq9_ywfzr21 != null){ String fwuserid = FWUtils.getFwUserIdByKdUserNumber(tqq9_ywfzr21.getString("number"), deptNumber); - if (StringUtils.isNotBlank(fwuserid)) { + if(StringUtils.isNotBlank(fwuserid)){ ywfzr += "," + fwuserid; } } DynamicObject tqq9_ywfzr2 = bill.getDynamicObject("tqq9_ywfzr2"); - if (tqq9_ywfzr2 != null) { + if(tqq9_ywfzr2 != null){ String fwuserid = FWUtils.getFwUserIdByKdUserNumber(tqq9_ywfzr2.getString("number"), deptNumber); - if (StringUtils.isNotBlank(fwuserid)) { + if(StringUtils.isNotBlank(fwuserid)){ ywfzr += "," + fwuserid; } } DynamicObject tqq9_ywfzr3 = bill.getDynamicObject("tqq9_ywfzr3"); - if (tqq9_ywfzr3 != null) { + if(tqq9_ywfzr3 != null){ String fwuserid = FWUtils.getFwUserIdByKdUserNumber(tqq9_ywfzr3.getString("number"), deptNumber); - if (StringUtils.isNotBlank(fwuserid)) { + if(StringUtils.isNotBlank(fwuserid)){ ywfzr += "," + fwuserid; } } - if (StringUtils.isNotBlank(ywfzr)) { + if(StringUtils.isNotBlank(ywfzr)){ ywfzr = ywfzr.substring(1); } String zcspmc = bill.getString("tqq9_zccpmc"); String bzgg = bill.getString("tqq9_bzgg"); String pp = null; DynamicObject tqq9_brand = bill.getDynamicObject("tqq9_brand"); - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String ys = bill.getString("tqq9_ys1"); String ylfl = null; String tqq9_ylfl = bill.getString("tqq9_ylfl"); - if ("一类".equals(tqq9_ylfl)) { + if("一类".equals(tqq9_ylfl)){ ylfl = "0"; - } else if ("二类".equals(tqq9_ylfl)) { + }else if("二类".equals(tqq9_ylfl)){ ylfl = "1"; - } else if ("三类".equals(tqq9_ylfl)) { + }else if("三类".equals(tqq9_ylfl)){ ylfl = "2"; - } else if ("三类重点监管".equals(tqq9_ylfl)) { + }else if("三类重点监管".equals(tqq9_ylfl)){ ylfl = "3"; - } else if ("非医消毒".equals(tqq9_ylfl)) { + }else if("非医消毒".equals(tqq9_ylfl)){ ylfl = "4"; - } else if ("非医非消毒".equals(tqq9_ylfl)) { + }else if("非医非消毒".equals(tqq9_ylfl)){ ylfl = "5"; - } else if ("牙膏".equals(tqq9_ylfl)) { + }else if("牙膏".equals(tqq9_ylfl)){ ylfl = "6"; } String spdj = null; String tqq9_spdj = bill.getString("tqq9_spdj"); - if ("A".equals(tqq9_spdj)) { + if("A".equals(tqq9_spdj)){ spdj = "0"; - } else if ("B".equals(tqq9_spdj)) { + }else if("B".equals(tqq9_spdj)){ spdj = "1"; - } else if ("C".equals(tqq9_spdj)) { + }else if("C".equals(tqq9_spdj)){ spdj = "2"; - } else if ("D".equals(tqq9_spdj)) { + }else if("D".equals(tqq9_spdj)){ spdj = "3"; - } else if ("E".equals(tqq9_spdj)) { + }else if("E".equals(tqq9_spdj)){ spdj = "4"; - } else if ("NO".equals(tqq9_spdj)) { + }else if("NO".equals(tqq9_spdj)){ spdj = "5"; } String ccystj = null; String tqq9_ccystj = bill.getString("tqq9_ccystj"); - if ("0".equals(tqq9_ccystj)) { + if("0".equals(tqq9_ccystj)){ ccystj = "0"; - } else if ("3".equals(tqq9_ccystj)) { + }else if("3".equals(tqq9_ccystj)){ ccystj = "1"; - } else if ("1".equals(tqq9_ccystj)) { + }else if("1".equals(tqq9_ccystj)){ ccystj = "2"; } BigDecimal xxs = null; DynamicObject taxrate = bill.getDynamicObject("taxrate"); - if (taxrate != null) { + if(taxrate != null){ taxrate = BusinessDataServiceHelper.loadSingle(taxrate.getPkValue(), "bd_taxrate", "id,name,number,taxrate"); xxs = taxrate.getBigDecimal("taxrate"); } String ylflml = null; DynamicObject tqq9_ylflml = bill.getDynamicObject("tqq9_ylflml"); - if (tqq9_ylflml != null) { + if(tqq9_ylflml != null){ ylflml = tqq9_ylflml.getString("name"); } String sfqysnmgl = "1"; boolean tqq9_sfqysnmgl = bill.getBoolean("tqq9_sfqysnmgl"); - if (tqq9_sfqysnmgl) { + if(tqq9_sfqysnmgl){ sfqysnmgl = "0"; } String spfl = null; DynamicObject tqq9_skutype = bill.getDynamicObject("tqq9_skutype"); - if (tqq9_skutype != null) { + if(tqq9_skutype != null){ spfl = tqq9_skutype.getString("name"); } String ylpfzlpczlp = null; String tqq9_combofield_spflii = bill.getString("tqq9_combofield_spflii"); - if ("ylp".equals(tqq9_combofield_spflii)) { + if ("ylp".equals(tqq9_combofield_spflii)){ ylpfzlpczlp = "0"; - } else if ("fzlp".equals(tqq9_combofield_spflii)) { + }else if ("fzlp".equals(tqq9_combofield_spflii)){ ylpfzlpczlp = "1"; - } else if ("czlp".equals(tqq9_combofield_spflii)) { + }else if ("czlp".equals(tqq9_combofield_spflii)){ ylpfzlpczlp = "2"; } String djtp = null; String tqq9_combofield_spfliii = bill.getString("tqq9_combofield_spfliii"); - if ("dj".equals(tqq9_combofield_spfliii)) { + if ("dj".equals(tqq9_combofield_spfliii)){ djtp = "0"; - } else if ("tp".equals(tqq9_combofield_spfliii)) { + }else if ("tp".equals(tqq9_combofield_spfliii)){ djtp = "1"; } String spytfl = null; String tqq9_spfliii = bill.getString("tqq9_spfliii"); - if ("lp".equals(tqq9_spfliii)) { + if("lp".equals(tqq9_spfliii)){ spytfl = "0"; - } else if ("zp".equals(tqq9_spfliii)) { + }else if ("zp".equals(tqq9_spfliii)){ spytfl = "1"; - } else if ("hc".equals(tqq9_spfliii)) { + }else if ("hc".equals(tqq9_spfliii)){ spytfl = "2"; - } else if ("sb".equals(tqq9_spfliii)) { + }else if ("sb".equals(tqq9_spfliii)){ spytfl = "3"; } String wllx = null; String materialtype = bill.getString("materialtype"); - if ("1".equals(materialtype)) { + if("1".equals(materialtype)){ wllx = "物资"; - } else if ("7".equals(materialtype)) { + }else if ("7".equals(materialtype)){ wllx = "费用"; - } else if ("8".equals(materialtype)) { + }else if ("8".equals(materialtype)){ wllx = "资产"; - } else if ("9".equals(materialtype)) { + }else if ("9".equals(materialtype)){ wllx = "服务"; - } else if ("3".equals(materialtype)) { + }else if ("3".equals(materialtype)){ wllx = "套件"; - } else if ("2".equals(materialtype)) { + }else if ("2".equals(materialtype)){ wllx = "虚拟件"; - } else if ("4".equals(materialtype)) { + }else if ("4".equals(materialtype)){ wllx = "可配置件"; - } else if ("5".equals(materialtype)) { + }else if ("5".equals(materialtype)){ wllx = "特征件"; } String ywzxdx = ""; @@ -5589,23 +5599,23 @@ public class FWImpl { long id = attribute.getLong("fbasedataid.id"); attribute = BusinessDataServiceHelper.loadSingle(id, "bd_serviceattribute", "id,name,number,operatorid"); String number = attribute.getString("number"); - if (number.contains("1001")) { + if(number.contains("1001")){ ywzxdx = ywzxdx + ",0"; - } else if (number.equals("2001")) { + }else if (number.equals("2001")){ ywzxdx = ywzxdx + ",1"; - } else if (number.equals("2002")) { + }else if (number.equals("2002")){ ywzxdx = ywzxdx + ",2"; - } else if (number.equals("2003")) { + }else if (number.equals("2003")){ ywzxdx = ywzxdx + ",3"; } } - if (StringUtils.isNotBlank(ywzxdx)) { + if(StringUtils.isNotBlank(ywzxdx)){ ywzxdx = ywzxdx.substring(1); } String ym = bill.getString("tqq9_ym"); String ssbm = null; DynamicObject tqq9_ssbm = bill.getDynamicObject("tqq9_ssbm"); - if (tqq9_ssbm != null) { + if(tqq9_ssbm != null){ ssbm = tqq9_ssbm.getString("name"); } String ybbm = bill.getString("tqq9_ybbm"); @@ -5613,19 +5623,19 @@ public class FWImpl { String uidm = bill.getString("tqq9_udi"); String cd = null; DynamicObject tqq9_wlcd1 = bill.getDynamicObject("tqq9_wlcd1"); - if (tqq9_wlcd1 != null) { + if(tqq9_wlcd1 != null){ cd = tqq9_wlcd1.getString("name"); } String cjbm = bill.getString("tqq9_cjbm"); String scxkzh = bill.getString("tqq9_scxkzh"); String scxkzgqr = null; Date tqq9_datefield = bill.getDate("tqq9_datefield"); - if (tqq9_datefield != null) { + if(tqq9_datefield != null){ scxkzgqr = sdf.format(tqq9_datefield); } String sccs = null; DynamicObject tqq9_sccs = bill.getDynamicObject("tqq9_sccs"); - if (tqq9_sccs != null) { + if(tqq9_sccs != null){ sccs = tqq9_sccs.getString("name"); } String sccslxfs = bill.getString("tqq9_sccslxfs"); @@ -5634,13 +5644,13 @@ public class FWImpl { String zczh = bill.getString("tqq9_zczh"); String tjdw = null; DynamicObject volumnunit = bill.getDynamicObject("volumnunit"); - if (volumnunit != null) { + if(volumnunit != null){ tjdw = volumnunit.getString("name"); } BigDecimal tj = bill.getBigDecimal("volume"); String ccdw = null; DynamicObject lengthunit = bill.getDynamicObject("lengthunit"); - if (lengthunit != null) { + if(lengthunit != null){ ccdw = lengthunit.getString("name"); } BigDecimal kd = bill.getBigDecimal("width"); @@ -5704,7 +5714,7 @@ public class FWImpl { m18.put("fieldValue", ccystj); JSONObject m19 = new JSONObject(); m19.put("fieldName", "xxs"); - m19.put("fieldValue", xxs != null && xxs.compareTo(BigDecimal.ZERO) != 0 ? xxs : 0); + m19.put("fieldValue", xxs!=null&&xxs.compareTo(BigDecimal.ZERO)!=0?xxs:0); JSONObject m21 = new JSONObject(); m21.put("fieldName", "ylflml"); m21.put("fieldValue", ylflml); @@ -5776,33 +5786,33 @@ public class FWImpl { m45.put("fieldValue", tjdw); JSONObject m46 = new JSONObject(); m46.put("fieldName", "tj"); - m46.put("fieldValue", tj != null && tj.compareTo(BigDecimal.ZERO) != 0 ? tj : 0); + m46.put("fieldValue", tj!=null&&tj.compareTo(BigDecimal.ZERO)!=0?tj:0); JSONObject m47 = new JSONObject(); m47.put("fieldName", "ccdw"); m47.put("fieldValue", ccdw); JSONObject m48 = new JSONObject(); m48.put("fieldName", "kd"); - m48.put("fieldValue", kd != null && kd.compareTo(BigDecimal.ZERO) != 0 ? kd : 0); + m48.put("fieldValue", kd!=null&&kd.compareTo(BigDecimal.ZERO)!=0?kd:0); JSONObject m49 = new JSONObject(); m49.put("fieldName", "cd2"); - m49.put("fieldValue", cd2 != null && cd2.compareTo(BigDecimal.ZERO) != 0 ? cd2 : 0); + m49.put("fieldValue", cd2!=null&&cd2.compareTo(BigDecimal.ZERO)!=0?cd2:0); JSONObject m51 = new JSONObject(); m51.put("fieldName", "gd"); - m51.put("fieldValue", gd != null && gd.compareTo(BigDecimal.ZERO) != 0 ? gd : 0); + m51.put("fieldValue", gd!=null&&gd.compareTo(BigDecimal.ZERO)!=0?gd:0); //区分新建审核与修改审批 String requestName = "新增物料流程"; String wfID = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZWL"); String requestid = bill.getString("tqq9_fwrequestid"); boolean tqq9_issuccess = bill.getBoolean("tqq9_issuccess"); - if (tqq9_issuccess) { + if(tqq9_issuccess){ requestName = "变更物料流程"; wfID = ConfigUtils.getThirdConfigByNumber("FW_WFID_WLBG"); requestid = bill.getString("tqq9_fwupdid"); } - List mlist = Arrays.asList(m1, m2, m3, m4, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m21, - m22, m23, m24, m25, m26, m27, m28, m29, m31, m32, m33, m34, m35, m36, m37, m38, m39, m41, m42, m43, m44, m45, m46, m47, m48, m49, m51); + List mlist = Arrays.asList(m1,m2,m3,m4,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18,m19,m21, + m22,m23,m24,m25,m26,m27,m28,m29,m31,m32,m33,m34,m35,m36,m37,m38,m39,m41,m42,m43,m44,m45,m46,m47,m48,m49,m51); JSONArray mainArr = new JSONArray(); mainArr.addAll(mlist); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); @@ -5814,7 +5824,7 @@ public class FWImpl { /** * 集中采购申请推送泛微 */ - public static String pushFwPurApply(DynamicObject bill) { + public static String pushFwPurApply(DynamicObject bill){ String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String lcbh = bill.getString("billno"); @@ -5841,7 +5851,7 @@ public class FWImpl { String jczz = ""; String tqq9_jczz = bill.getString("tqq9_jczz"); - if (StringUtils.isNotBlank(tqq9_jczz)) { + if(StringUtils.isNotBlank(tqq9_jczz)){ if (tqq9_jczz.contains("SHLC")) { jczz = jczz + ",0"; } @@ -5878,19 +5888,23 @@ public class FWImpl { if (tqq9_sup_sh != null) { cjgys_sh = tqq9_sup_sh.getString("number"); } - String gysqyzz_sh = null; + String gysqyzz_sh = ""; String tqq9_suparea_sh = bill.getString("tqq9_suparea_sh"); - if ("B".equals(tqq9_suparea_sh)) { - gysqyzz_sh = "0"; - } else if ("A".equals(tqq9_suparea_sh)) { - gysqyzz_sh = "1"; - } else if ("C".equals(tqq9_suparea_sh)) { - gysqyzz_sh = "2"; + if (tqq9_suparea_sh.contains("B")) { + gysqyzz_sh = gysqyzz_sh + ",0"; + }else if (tqq9_suparea_sh.contains("A")) { + gysqyzz_sh = gysqyzz_sh + ",1"; + }else if (tqq9_suparea_sh.contains("C")) { + gysqyzz_sh = gysqyzz_sh + ",2"; } + if(StringUtils.isNotBlank(gysqyzz_sh)){ + gysqyzz_sh = gysqyzz_sh.substring(1); + } + String shck_sh = null; DynamicObject tqq9_rewares_sh = bill.getDynamicObject("tqq9_rewares_sh"); if (tqq9_rewares_sh != null) { - shck_sh = tqq9_rewares_sh.getString("number") + "<>" + orgnumber; + shck_sh = tqq9_rewares_sh.getString("number")+"_SHLC"; } String fktj_sh = null; DynamicObject tqq9_paycondition_sh = bill.getDynamicObject("tqq9_paycondition_sh"); @@ -5939,22 +5953,22 @@ public class FWImpl { BigDecimal hshfkyje_sh = bill.getBigDecimal("tqq9_hshfkyje_sh"); BigDecimal hshfsysl_sh = BigDecimal.ZERO; DynamicObject tqq9_hshfsysl_sh = bill.getDynamicObject("tqq9_hshfsysl_sh"); - if (tqq9_hshfsysl_sh != null) { + if (tqq9_hshfsysl_sh != null){ tqq9_hshfsysl_sh = BusinessDataServiceHelper.loadSingle(tqq9_hshfsysl_sh.getPkValue(), tqq9_hshfsysl_sh.getDynamicObjectType().getName()); hshfsysl_sh = tqq9_hshfsysl_sh.getBigDecimal("taxrate"); } String xf_sh = null; boolean tqq9_sfsyxf_sh = bill.getBoolean("tqq9_sfsyxf_sh"); - if (tqq9_sfsyxf_sh) { + if(tqq9_sfsyxf_sh){ xf_sh = "0"; - } else { + }else { xf_sh = "1"; } String hsxfsygz_sh = null; boolean tqq9_hsxfsygs_sh = bill.getBoolean("tqq9_hsxfsygs_sh"); - if (tqq9_hsxfsygs_sh) { + if (tqq9_hsxfsygs_sh){ hsxfsygz_sh = "0"; - } else { + }else{ hsxfsygz_sh = "1"; } BigDecimal hsxfsyje_sh = bill.getBigDecimal("tqq9_hsxfsyje_sh"); @@ -5962,7 +5976,7 @@ public class FWImpl { BigDecimal hsxfkyje_sh = bill.getBigDecimal("tqq9_hsxfkyje_sh"); BigDecimal hsxfsysl_sh = BigDecimal.ZERO; DynamicObject tqq9_hsxfsysl_sh = bill.getDynamicObject("tqq9_hsxfsysl_sh"); - if (tqq9_hsxfsysl_sh != null) { + if (tqq9_hsxfsysl_sh != null){ tqq9_hsxfsysl_sh = BusinessDataServiceHelper.loadSingle(tqq9_hsxfsysl_sh.getPkValue(), tqq9_hsxfsysl_sh.getDynamicObjectType().getName()); hshfsysl_sh = tqq9_hsxfsysl_sh.getBigDecimal("taxrate"); } @@ -5972,19 +5986,22 @@ public class FWImpl { if (tqq9_sup_bj != null) { cjgys_bj = tqq9_sup_bj.getString("number"); } - String gysqyzz_bj = null; + String gysqyzz_bj = ""; String tqq9_suparea_bj = bill.getString("tqq9_suparea_bj"); - if ("B".equals(tqq9_suparea_bj)) { - gysqyzz_bj = "0"; - } else if ("A".equals(tqq9_suparea_bj)) { - gysqyzz_bj = "1"; - } else if ("C".equals(tqq9_suparea_bj)) { - gysqyzz_bj = "2"; + if (tqq9_suparea_bj.contains("B")) { + gysqyzz_bj = gysqyzz_bj + ",0"; + }else if (tqq9_suparea_bj.contains("A")) { + gysqyzz_bj = gysqyzz_bj + ",1"; + }else if (tqq9_suparea_bj.contains("C")) { + gysqyzz_bj = gysqyzz_bj + ",2"; + } + if(StringUtils.isNotBlank(gysqyzz_bj)){ + gysqyzz_bj = gysqyzz_bj.substring(1); } String shck_bj = null; DynamicObject tqq9_rewares_bj = bill.getDynamicObject("tqq9_rewares_bj"); if (tqq9_rewares_bj != null) { - shck_bj = tqq9_rewares_bj.getString("number") + "_" + orgnumber; + shck_bj = tqq9_rewares_bj.getString("number")+"_BJLC"; } String fktj_bj = null; DynamicObject tqq9_paycondition_bj = bill.getDynamicObject("tqq9_paycondition_bj"); @@ -6033,22 +6050,22 @@ public class FWImpl { BigDecimal hshfkyje_bj = bill.getBigDecimal("tqq9_hshfkyje_bj"); BigDecimal hshfsysl_bj = BigDecimal.ZERO; DynamicObject tqq9_hshfsysl_bj = bill.getDynamicObject("tqq9_hshfsysl_bj"); - if (tqq9_hshfsysl_bj != null) { + if (tqq9_hshfsysl_bj != null){ tqq9_hshfsysl_bj = BusinessDataServiceHelper.loadSingle(tqq9_hshfsysl_bj.getPkValue(), tqq9_hshfsysl_bj.getDynamicObjectType().getName()); hshfsysl_bj = tqq9_hshfsysl_bj.getBigDecimal("taxrate"); } String xf_bj = null; boolean tqq9_sfsyxf_bj = bill.getBoolean("tqq9_sfsyxf_bj"); - if (tqq9_sfsyxf_bj) { + if(tqq9_sfsyxf_bj){ xf_bj = "0"; - } else { + }else { xf_bj = "1"; } String hsxfsygz_bj = null; boolean tqq9_hsxfsygs_bj = bill.getBoolean("tqq9_hsxfsygs_bj"); - if (tqq9_hsxfsygs_bj) { + if (tqq9_hsxfsygs_bj){ hsxfsygz_bj = "0"; - } else { + }else{ hsxfsygz_bj = "1"; } BigDecimal hsxfsyje_bj = bill.getBigDecimal("tqq9_hsxfsyje_bj"); @@ -6056,7 +6073,7 @@ public class FWImpl { BigDecimal hsxfkyje_bj = bill.getBigDecimal("tqq9_hsxfkyje_bj"); BigDecimal hsxfsysl_bj = BigDecimal.ZERO; DynamicObject tqq9_hsxfsysl_bj = bill.getDynamicObject("tqq9_hsxfsysl_bj"); - if (tqq9_hsxfsysl_bj != null) { + if (tqq9_hsxfsysl_bj != null){ tqq9_hsxfsysl_bj = BusinessDataServiceHelper.loadSingle(tqq9_hsxfsysl_bj.getPkValue(), tqq9_hsxfsysl_bj.getDynamicObjectType().getName()); hsxfsysl_bj = tqq9_hsxfsysl_bj.getBigDecimal("taxrate"); } @@ -6066,19 +6083,22 @@ public class FWImpl { if (tqq9_sup_gz != null) { cjgys_gz = tqq9_sup_gz.getString("number"); } - String gysqyzz_gz = null; + String gysqyzz_gz = ""; String tqq9_suparea_gz = bill.getString("tqq9_suparea_gz"); - if ("B".equals(tqq9_suparea_gz)) { - gysqyzz_gz = "0"; - } else if ("A".equals(tqq9_suparea_gz)) { - gysqyzz_gz = "1"; - } else if ("C".equals(tqq9_suparea_gz)) { - gysqyzz_gz = "2"; + if (tqq9_suparea_gz.contains("B")) { + gysqyzz_gz = gysqyzz_gz + ",0"; + }else if (tqq9_suparea_gz.contains("A")) { + gysqyzz_gz = gysqyzz_gz + ",1"; + }else if (tqq9_suparea_gz.contains("C")) { + gysqyzz_gz = gysqyzz_gz + ",2"; + } + if(StringUtils.isNotBlank(gysqyzz_gz)){ + gysqyzz_gz = gysqyzz_gz.substring(1); } String shck_gz = null; DynamicObject tqq9_rewares_gz = bill.getDynamicObject("tqq9_rewares_gz"); if (tqq9_rewares_gz != null) { - shck_gz = tqq9_rewares_gz.getString("number") + "<>" + orgnumber; + shck_gz = tqq9_rewares_gz.getString("number")+"_GZLC"; } String fktj_gz = null; DynamicObject tqq9_paycondition_gz = bill.getDynamicObject("tqq9_paycondition_gz"); @@ -6127,22 +6147,22 @@ public class FWImpl { BigDecimal hshfkyje_gz = bill.getBigDecimal("tqq9_hshfkyje_gz"); BigDecimal hshfsysl_gz = BigDecimal.ZERO; DynamicObject tqq9_hshfsysl_gz = bill.getDynamicObject("tqq9_hshfsysl_gz"); - if (tqq9_hshfsysl_gz != null) { + if (tqq9_hshfsysl_gz != null){ tqq9_hshfsysl_gz = BusinessDataServiceHelper.loadSingle(tqq9_hshfsysl_gz.getPkValue(), tqq9_hshfsysl_bj.getDynamicObjectType().getName()); hshfsysl_gz = tqq9_hshfsysl_gz.getBigDecimal("taxrate"); } String xf_gz = null; boolean tqq9_sfsyxf_gz = bill.getBoolean("tqq9_sfsyxf_gz"); - if (tqq9_sfsyxf_gz) { + if(tqq9_sfsyxf_gz){ xf_gz = "0"; - } else { + }else { xf_gz = "1"; } String hsxfsygz_gz = null; boolean tqq9_hsxfsygs_gz = bill.getBoolean("tqq9_hsxfsygs_gz"); - if (tqq9_hsxfsygs_gz) { + if (tqq9_hsxfsygs_gz){ hsxfsygz_gz = "0"; - } else { + }else{ hsxfsygz_gz = "1"; } BigDecimal hsxfsyje_gz = bill.getBigDecimal("tqq9_hsxfsyje_gz"); @@ -6150,7 +6170,7 @@ public class FWImpl { BigDecimal hsxfkyje_gz = bill.getBigDecimal("tqq9_hsxfkyje_gz"); BigDecimal hsxfsysl_gz = BigDecimal.ZERO; DynamicObject tqq9_hsxfsysl_gz = bill.getDynamicObject("tqq9_hsxfsysl_gz"); - if (tqq9_hsxfsysl_gz != null) { + if (tqq9_hsxfsysl_gz != null){ tqq9_hsxfsysl_gz = BusinessDataServiceHelper.loadSingle(tqq9_hsxfsysl_gz.getPkValue(), tqq9_hsxfsysl_gz.getDynamicObjectType().getName()); hsxfsysl_gz = tqq9_hsxfsysl_gz.getBigDecimal("taxrate"); } @@ -6175,13 +6195,13 @@ public class FWImpl { String wlbm = masterid.getString("number"); DynamicObject tqq9_brand = masterid.getDynamicObject("tqq9_brand"); String pp = null; - if (tqq9_brand != null) { + if(tqq9_brand != null){ pp = tqq9_brand.getString("name"); } String ggxh = masterid.getString("modelnum"); DynamicObject unit = billentry.getDynamicObject("unit"); String jldw = null; - if (unit != null) { + if(unit != null){ jldw = unit.getString("name"); } BigDecimal sl = billentry.getBigDecimal("applyqty"); @@ -6200,7 +6220,7 @@ public class FWImpl { String shck = null; DynamicObject warehouse = billentry.getDynamicObject("warehouse"); if (warehouse != null) { - shck = warehouse.getString("number") + "_" + orgnumber; + shck = warehouse.getString("number")+"_"+orgnumber; } String gys = null; DynamicObject supplier = billentry.getDynamicObject("supplier"); @@ -6223,37 +6243,37 @@ public class FWImpl { e5.put("fieldValue", jldw); JSONObject e6 = new JSONObject(); e6.put("fieldName", "sl"); - e6.put("fieldValue", sl != null && sl.compareTo(BigDecimal.ZERO) != 0 ? sl.toBigInteger().intValue() : 0); + e6.put("fieldValue", sl!=null&&sl.compareTo(BigDecimal.ZERO)!=0?sl.toBigInteger().intValue():0); JSONObject e7 = new JSONObject(); e7.put("fieldName", "hsdj"); - e7.put("fieldValue", hsdj != null && hsdj.compareTo(BigDecimal.ZERO) != 0 ? hsdj : 0); + e7.put("fieldValue", hsdj!=null&&hsdj.compareTo(BigDecimal.ZERO)!=0?hsdj:0); JSONObject e8 = new JSONObject(); e8.put("fieldName", "tax_rate"); - e8.put("fieldValue", tax_rate != null && tax_rate.compareTo(BigDecimal.ZERO) != 0 ? tax_rate : 0); + e8.put("fieldValue", tax_rate!=null&&tax_rate.compareTo(BigDecimal.ZERO)!=0?tax_rate:0); JSONObject e9 = new JSONObject(); e9.put("fieldName", "zkqjshj"); - e9.put("fieldValue", zkqjshj_e != null && zkqjshj_e.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj_e : 0); + e9.put("fieldValue", zkqjshj_e!=null&&zkqjshj_e.compareTo(BigDecimal.ZERO)!=0?zkqjshj_e:0); JSONObject e10 = new JSONObject(); e10.put("fieldName", "yhzkje"); - e10.put("fieldValue", yhzkje != null && yhzkje.compareTo(BigDecimal.ZERO) != 0 ? yhzkje : 0); + e10.put("fieldValue", yhzkje!=null&&yhzkje.compareTo(BigDecimal.ZERO)!=0?yhzkje:0); JSONObject e11 = new JSONObject(); e11.put("fieldName", "zkhjshj"); - e11.put("fieldValue", zkhjshj != null && zkhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhjshj : 0); + e11.put("fieldValue", zkhjshj!=null&&zkhjshj.compareTo(BigDecimal.ZERO)!=0?zkhjshj:0); JSONObject e12 = new JSONObject(); e12.put("fieldName", "hfsyje"); - e12.put("fieldValue", hfsyje != null && hfsyje.compareTo(BigDecimal.ZERO) != 0 ? hfsyje : 0); + e12.put("fieldValue", hfsyje!=null&&hfsyje.compareTo(BigDecimal.ZERO)!=0?hfsyje:0); JSONObject e13 = new JSONObject(); e13.put("fieldName", "xfsyje"); - e13.put("fieldValue", xfsyje != null && xfsyje.compareTo(BigDecimal.ZERO) != 0 ? xfsyje : 0); + e13.put("fieldValue", xfsyje!=null&&xfsyje.compareTo(BigDecimal.ZERO)!=0?xfsyje:0); JSONObject e14 = new JSONObject(); e14.put("fieldName", "zkhflhjshj"); - e14.put("fieldValue", zkhflhjshj != null && zkhflhjshj.compareTo(BigDecimal.ZERO) != 0 ? zkhflhjshj : 0); + e14.put("fieldValue", zkhflhjshj!=null&&zkhflhjshj.compareTo(BigDecimal.ZERO)!=0?zkhflhjshj:0); JSONObject e15 = new JSONObject(); e15.put("fieldName", "cb"); - e15.put("fieldValue", cb != null && cb.compareTo(BigDecimal.ZERO) != 0 ? cb : 0); + e15.put("fieldValue", cb!=null&&cb.compareTo(BigDecimal.ZERO)!=0?cb:0); JSONObject e16 = new JSONObject(); e16.put("fieldName", "yjxssjy"); - e16.put("fieldValue", yjxssjy != null && yjxssjy.compareTo(BigDecimal.ZERO) != 0 ? yjxssjy : 0); + e16.put("fieldValue", yjxssjy!=null&&yjxssjy.compareTo(BigDecimal.ZERO)!=0?yjxssjy:0); JSONObject e17 = new JSONObject(); e17.put("fieldName", "bz"); e17.put("fieldValue", bz_e); @@ -6270,7 +6290,7 @@ public class FWImpl { e21.put("fieldName", "wlmc"); e21.put("fieldValue", wlmc); - List elist = Arrays.asList(e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21); + List elist = Arrays.asList(e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18,e19,e20,e21); JSONArray recordsArr = new JSONArray(); recordsArr.addAll(elist); @@ -6278,11 +6298,11 @@ public class FWImpl { recordObj.put("recordOrder", 0); recordObj.put("workflowRequestTableFields", recordsArr); - if ("SHLC".equals(orgNumber)) { + if("SHLC".equals(orgNumber)){ recordsArr_sh.add(recordObj); - } else if ("BJLC".equals(orgNumber)) { + }else if("BJLC".equals(orgNumber)){ recordsArr_bj.add(recordObj); - } else if ("GZLC".equals(orgNumber)) { + }else if("GZLC".equals(orgNumber)){ recordsArr_gz.add(recordObj); } } @@ -6294,7 +6314,7 @@ public class FWImpl { detail_gz.put("tableDBName", "formtable_main_119_dt3"); detail_gz.put("workflowRequestTableRecords", recordsArr_gz); - if (StringUtils.isNotBlank(tqq9_fwrequestid)) { + if(StringUtils.isNotBlank(tqq9_fwrequestid)){ detail_sh.put("deleteAll", "1"); detail_bj.put("deleteAll", "1"); detail_gz.put("deleteAll", "1"); @@ -6340,10 +6360,10 @@ public class FWImpl { m11.put("fieldValue", sfhs); JSONObject m12 = new JSONObject(); m12.put("fieldName", "zkqjshj"); - m12.put("fieldValue", zkqjshj != null && zkqjshj.compareTo(BigDecimal.ZERO) != 0 ? zkqjshj : 0); + m12.put("fieldValue", zkqjshj!=null&&zkqjshj.compareTo(BigDecimal.ZERO)!=0?zkqjshj:0); JSONObject m13 = new JSONObject(); m13.put("fieldName", "jshj"); - m13.put("fieldValue", jshj != null && jshj.compareTo(BigDecimal.ZERO) != 0 ? jshj : 0); + m13.put("fieldValue", jshj!=null&&jshj.compareTo(BigDecimal.ZERO)!=0?jshj:0); JSONObject m14 = new JSONObject(); m14.put("fieldName", "bz"); m14.put("fieldValue", bz); @@ -6364,13 +6384,13 @@ public class FWImpl { m19.put("fieldValue", jsfs_sh); JSONObject m20 = new JSONObject(); m20.put("fieldName", "yhje_sh"); - m20.put("fieldValue", yhje_sh != null && yhje_sh.compareTo(BigDecimal.ZERO) != 0 ? yhje_sh : 0); + m20.put("fieldValue", yhje_sh!=null&&yhje_sh.compareTo(BigDecimal.ZERO)!=0?yhje_sh:0); JSONObject m21 = new JSONObject(); m21.put("fieldName", "cgsl_sh"); - m21.put("fieldValue", cgsl_sh == null || cgsl_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : cgsl_sh.toBigInteger().intValue()); + m21.put("fieldValue", cgsl_sh==null||cgsl_sh.compareTo(BigDecimal.ZERO)==0?0:cgsl_sh.toBigInteger().intValue()); JSONObject m22 = new JSONObject(); m22.put("fieldName", "yfje_sh"); - m22.put("fieldValue", yfje_sh == null || yfje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : yfje_sh); + m22.put("fieldValue", yfje_sh==null||yfje_sh.compareTo(BigDecimal.ZERO)==0?0:yfje_sh); JSONObject m23 = new JSONObject(); m23.put("fieldName", "bz_sh"); m23.put("fieldValue", bz_sh); @@ -6382,16 +6402,16 @@ public class FWImpl { m25.put("fieldValue", hshfsygz_sh); JSONObject m26 = new JSONObject(); m26.put("fieldName", "hshfsyje_sh"); - m26.put("fieldValue", hshfsyje_sh == null || hshfsyje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsyje_sh); + m26.put("fieldValue", hshfsyje_sh==null||hshfsyje_sh.compareTo(BigDecimal.ZERO)==0?0:hshfsyje_sh); JSONObject m27 = new JSONObject(); m27.put("fieldName", "hshfzje_sh"); - m27.put("fieldValue", hshfzje_sh == null || hshfzje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfzje_sh); + m27.put("fieldValue", hshfzje_sh==null||hshfzje_sh.compareTo(BigDecimal.ZERO)==0?0:hshfzje_sh); JSONObject m28 = new JSONObject(); m28.put("fieldName", "hshfkyje_sh"); - m28.put("fieldValue", hshfkyje_sh == null || hshfkyje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfkyje_sh); + m28.put("fieldValue", hshfkyje_sh==null||hshfkyje_sh.compareTo(BigDecimal.ZERO)==0?0:hshfkyje_sh); JSONObject m29 = new JSONObject(); m29.put("fieldName", "hshfsysl_sh"); - m29.put("fieldValue", hshfsysl_sh == null || hshfsysl_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsysl_sh); + m29.put("fieldValue", hshfsysl_sh==null||hshfsysl_sh.compareTo(BigDecimal.ZERO)==0?0:hshfsysl_sh); JSONObject m30 = new JSONObject(); m30.put("fieldName", "xf_sh"); m30.put("fieldValue", xf_sh); @@ -6400,16 +6420,16 @@ public class FWImpl { m31.put("fieldValue", hsxfsygz_sh); JSONObject m32 = new JSONObject(); m32.put("fieldName", "hsxfsyje_sh"); - m32.put("fieldValue", hsxfsyje_sh == null || hsxfsyje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsyje_sh); + m32.put("fieldValue", hsxfsyje_sh==null||hsxfsyje_sh.compareTo(BigDecimal.ZERO)==0?0:hsxfsyje_sh); JSONObject m33 = new JSONObject(); m33.put("fieldName", "hsxfzje_sh"); - m33.put("fieldValue", hsxfzje_sh == null || hsxfzje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfzje_sh); + m33.put("fieldValue", hsxfzje_sh==null||hsxfzje_sh.compareTo(BigDecimal.ZERO)==0?0:hsxfzje_sh); JSONObject m34 = new JSONObject(); m34.put("fieldName", "hsxfkyje_sh"); - m34.put("fieldValue", hsxfkyje_sh == null || hsxfkyje_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfkyje_sh); + m34.put("fieldValue", hsxfkyje_sh==null||hsxfkyje_sh.compareTo(BigDecimal.ZERO)==0?0:hsxfkyje_sh); JSONObject m35 = new JSONObject(); m35.put("fieldName", "hsxfsysl_sh"); - m35.put("fieldValue", hsxfsysl_sh == null || hsxfsysl_sh.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsysl_sh); + m35.put("fieldValue", hsxfsysl_sh==null||hsxfsysl_sh.compareTo(BigDecimal.ZERO)==0?0:hsxfsysl_sh); JSONObject m36 = new JSONObject(); m36.put("fieldName", "cjgys_bj"); m36.put("fieldValue", cjgys_bj); @@ -6427,13 +6447,13 @@ public class FWImpl { m40.put("fieldValue", jsfs_bj); JSONObject m41 = new JSONObject(); m41.put("fieldName", "yhje_bj"); - m41.put("fieldValue", yhje_bj == null || yhje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : yhje_bj); + m41.put("fieldValue", yhje_bj==null||yhje_bj.compareTo(BigDecimal.ZERO)==0?0:yhje_bj); JSONObject m42 = new JSONObject(); m42.put("fieldName", "cgsl_bj"); - m42.put("fieldValue", cgsl_bj == null || cgsl_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : cgsl_bj.toBigInteger().intValue()); + m42.put("fieldValue", cgsl_bj==null||cgsl_bj.compareTo(BigDecimal.ZERO)==0?0:cgsl_bj.toBigInteger().intValue()); JSONObject m43 = new JSONObject(); m43.put("fieldName", "yfje_bj"); - m43.put("fieldValue", yfje_bj == null || yfje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : yfje_bj); + m43.put("fieldValue", yfje_bj==null||yfje_bj.compareTo(BigDecimal.ZERO)==0?0:yfje_bj); JSONObject m44 = new JSONObject(); m44.put("fieldName", "bz_bj"); m44.put("fieldValue", bz_bj); @@ -6445,16 +6465,16 @@ public class FWImpl { m46.put("fieldValue", hshfsygz_bj); JSONObject m47 = new JSONObject(); m47.put("fieldName", "hshfsyje_bj"); - m47.put("fieldValue", hshfsyje_bj == null || hshfsyje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsyje_bj); + m47.put("fieldValue", hshfsyje_bj==null||hshfsyje_bj.compareTo(BigDecimal.ZERO)==0?0:hshfsyje_bj); JSONObject m48 = new JSONObject(); m48.put("fieldName", "hshfzje_bj"); - m48.put("fieldValue", hshfzje_bj == null || hshfzje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfzje_bj); + m48.put("fieldValue", hshfzje_bj==null||hshfzje_bj.compareTo(BigDecimal.ZERO)==0?0:hshfzje_bj); JSONObject m49 = new JSONObject(); m49.put("fieldName", "hshfkyje_bj"); - m49.put("fieldValue", hshfkyje_bj == null || hshfkyje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfkyje_bj); + m49.put("fieldValue", hshfkyje_bj==null||hshfkyje_bj.compareTo(BigDecimal.ZERO)==0?0:hshfkyje_bj); JSONObject m50 = new JSONObject(); m50.put("fieldName", "hshfsysl_bj"); - m50.put("fieldValue", hshfsysl_bj == null || hshfsysl_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsysl_bj); + m50.put("fieldValue", hshfsysl_bj==null||hshfsysl_bj.compareTo(BigDecimal.ZERO)==0?0:hshfsysl_bj); JSONObject m51 = new JSONObject(); m51.put("fieldName", "xf_bj"); m51.put("fieldValue", xf_bj); @@ -6463,16 +6483,16 @@ public class FWImpl { m52.put("fieldValue", hsxfsygz_bj); JSONObject m53 = new JSONObject(); m53.put("fieldName", "hsxfsyje_bj"); - m53.put("fieldValue", hsxfsyje_bj == null || hsxfsyje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsyje_bj); + m53.put("fieldValue", hsxfsyje_bj==null||hsxfsyje_bj.compareTo(BigDecimal.ZERO)==0?0:hsxfsyje_bj); JSONObject m54 = new JSONObject(); m54.put("fieldName", "hsxfzje_bj"); - m54.put("fieldValue", hsxfzje_bj == null || hsxfzje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfzje_bj); + m54.put("fieldValue", hsxfzje_bj==null||hsxfzje_bj.compareTo(BigDecimal.ZERO)==0?0:hsxfzje_bj); JSONObject m55 = new JSONObject(); m55.put("fieldName", "hsxfkyje_bj"); - m55.put("fieldValue", hsxfkyje_bj == null || hsxfkyje_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfkyje_bj); + m55.put("fieldValue", hsxfkyje_bj==null||hsxfkyje_bj.compareTo(BigDecimal.ZERO)==0?0:hsxfkyje_bj); JSONObject m56 = new JSONObject(); m56.put("fieldName", "hsxfsysl_bj"); - m56.put("fieldValue", hsxfsysl_bj == null || hsxfsysl_bj.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsysl_bj); + m56.put("fieldValue", hsxfsysl_bj==null||hsxfsysl_bj.compareTo(BigDecimal.ZERO)==0?0:hsxfsysl_bj); JSONObject m57 = new JSONObject(); m57.put("fieldName", "cjgys_gz"); m57.put("fieldValue", cjgys_gz); @@ -6490,13 +6510,13 @@ public class FWImpl { m61.put("fieldValue", jsfs_gz); JSONObject m62 = new JSONObject(); m62.put("fieldName", "yhje_gz"); - m62.put("fieldValue", yhje_gz == null || yhje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : yhje_gz); + m62.put("fieldValue", yhje_gz==null||yhje_gz.compareTo(BigDecimal.ZERO)==0?0:yhje_gz); JSONObject m63 = new JSONObject(); m63.put("fieldName", "cgsl_gz"); - m63.put("fieldValue", cgsl_gz == null || cgsl_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : cgsl_gz.toBigInteger().intValue()); + m63.put("fieldValue", cgsl_gz==null||cgsl_gz.compareTo(BigDecimal.ZERO)==0?0:cgsl_gz.toBigInteger().intValue()); JSONObject m64 = new JSONObject(); m64.put("fieldName", "yfje_gz"); - m64.put("fieldValue", yfje_gz == null || yfje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : yfje_gz); + m64.put("fieldValue", yfje_gz==null||yfje_gz.compareTo(BigDecimal.ZERO)==0?0:yfje_gz); JSONObject m65 = new JSONObject(); m65.put("fieldName", "bz_gz"); m65.put("fieldValue", bz_gz); @@ -6508,16 +6528,16 @@ public class FWImpl { m67.put("fieldValue", hshfsygz_gz); JSONObject m68 = new JSONObject(); m68.put("fieldName", "hshfsyje_gz"); - m68.put("fieldValue", hshfsyje_gz == null || hshfsyje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsyje_gz); + m68.put("fieldValue", hshfsyje_gz==null||hshfsyje_gz.compareTo(BigDecimal.ZERO)==0?0:hshfsyje_gz); JSONObject m69 = new JSONObject(); m69.put("fieldName", "hshfzje_gz"); - m69.put("fieldValue", hshfzje_gz == null || hshfzje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfzje_gz); + m69.put("fieldValue", hshfzje_gz==null||hshfzje_gz.compareTo(BigDecimal.ZERO)==0?0:hshfzje_gz); JSONObject m70 = new JSONObject(); m70.put("fieldName", "hshfkyje_gz"); - m70.put("fieldValue", hshfkyje_gz == null || hshfkyje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfkyje_gz); + m70.put("fieldValue", hshfkyje_gz==null||hshfkyje_gz.compareTo(BigDecimal.ZERO)==0?0:hshfkyje_gz); JSONObject m71 = new JSONObject(); m71.put("fieldName", "hshfsysl_gz"); - m71.put("fieldValue", hshfsysl_gz == null || hshfsysl_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hshfsysl_gz); + m71.put("fieldValue", hshfsysl_gz==null||hshfsysl_gz.compareTo(BigDecimal.ZERO)==0?0:hshfsysl_gz); JSONObject m72 = new JSONObject(); m72.put("fieldName", "xf_gz"); m72.put("fieldValue", xf_gz); @@ -6526,25 +6546,25 @@ public class FWImpl { m73.put("fieldValue", hsxfsygz_gz); JSONObject m74 = new JSONObject(); m74.put("fieldName", "hsxfsyje_gz"); - m74.put("fieldValue", hsxfsyje_gz == null || hsxfsyje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsyje_gz); + m74.put("fieldValue", hsxfsyje_gz==null||hsxfsyje_gz.compareTo(BigDecimal.ZERO)==0?0:hsxfsyje_gz); JSONObject m75 = new JSONObject(); m75.put("fieldName", "hsxfzje_gz"); - m75.put("fieldValue", hsxfzje_gz == null || hsxfzje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfzje_gz); + m75.put("fieldValue", hsxfzje_gz==null||hsxfzje_gz.compareTo(BigDecimal.ZERO)==0?0:hsxfzje_gz); JSONObject m76 = new JSONObject(); m76.put("fieldName", "hsxfkyje_gz"); - m76.put("fieldValue", hsxfkyje_gz == null || hsxfkyje_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfkyje_gz); + m76.put("fieldValue", hsxfkyje_gz==null||hsxfkyje_gz.compareTo(BigDecimal.ZERO)==0?0:hsxfkyje_gz); JSONObject m77 = new JSONObject(); m77.put("fieldName", "hsxfsysl_gz"); - m77.put("fieldValue", hsxfsysl_gz == null || hsxfsysl_gz.compareTo(BigDecimal.ZERO) == 0 ? 0 : hsxfsysl_gz); + m77.put("fieldValue", hsxfsysl_gz==null||hsxfsysl_gz.compareTo(BigDecimal.ZERO)==0?0:hsxfsysl_gz); JSONObject m78 = new JSONObject(); m78.put("fieldName", "sqzz"); m78.put("fieldValue", "8"); 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, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, 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)); + 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,m26,m27,m28,m29,m30,m31,m32,m33,m34,m35,m36,m37,m38,m39,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)); JSONArray mainArr = new JSONArray(); // 附件 List fjList = new ArrayList<>(); @@ -6560,7 +6580,7 @@ public class FWImpl { fjList.add(fj); } - if (fjList.size() > 0) { + if(fjList.size() > 0){ JSONObject fjObj = new JSONObject(); fjObj.put("fieldName", "fjsc"); fjObj.put("fieldValue", fjList);