diff --git a/src/main/java/com/yem/ia/intebilllogon/commom/CommonUtils.java b/src/main/java/com/yem/ia/intebilllogon/commom/CommonUtils.java index cc149454..acea71a0 100644 --- a/src/main/java/com/yem/ia/intebilllogon/commom/CommonUtils.java +++ b/src/main/java/com/yem/ia/intebilllogon/commom/CommonUtils.java @@ -301,25 +301,27 @@ public class CommonUtils { if (fileurl.contains("http://localhost:8080/ierp/")) { fileurl = fileurl.replace("http://localhost:8080/", "http://10.64.112.152:8022/"); } - if (yem_ispdf && filename.endsWith(".pdf")) { - String result = YunzhijiaUtils.uploadfile(fileurl, accessToken, (String) map.get("name")); - JSONObject json = JSONObject.parseObject(result); - Boolean success = json.getBoolean("success"); - if (success) { - JSONArray data = json.getJSONArray("data"); - for (int j = 0; j < data.size(); j++) { - JSONObject object = new JSONObject(); - JSONObject jsonObject = data.getJSONObject(j); - if (jsonObject != null) { + if (yem_ispdf) { + if (filename.endsWith(".pdf")) { + String result = YunzhijiaUtils.uploadfile(fileurl, accessToken, (String) map.get("name")); + JSONObject json = JSONObject.parseObject(result); + Boolean success = json.getBoolean("success"); + if (success) { + JSONArray data = json.getJSONArray("data"); + for (int j = 0; j < data.size(); j++) { + JSONObject object = new JSONObject(); + JSONObject jsonObject = data.getJSONObject(j); + if (jsonObject != null) { // object.put("fileName", jsonObject.getString("fileName")); - object.put("fileName", map.get("name").toString()); - object.put("fileId", jsonObject.getString("fileId")); - object.put("fileSize", jsonObject.getString("length")); - object.put("fileType", jsonObject.getString("fileType")); - object.put("fileExt", map.get("type").toString()); - jsonArray.add(object); - //创建ERP与云之家对照表 - Addattyunzhijia(formId, pkId, map, attachKey, jsonObject); + object.put("fileName", map.get("name").toString()); + object.put("fileId", jsonObject.getString("fileId")); + object.put("fileSize", jsonObject.getString("length")); + object.put("fileType", jsonObject.getString("fileType")); + object.put("fileExt", map.get("type").toString()); + jsonArray.add(object); + //创建ERP与云之家对照表 + Addattyunzhijia(formId, pkId, map, attachKey, jsonObject); + } } } } diff --git a/src/main/java/com/yem/wm/es/salescontrac/op/SalesContracSignatureOp.java b/src/main/java/com/yem/wm/es/salescontrac/op/SalesContracSignatureOp.java index a2d48970..1c99b88c 100644 --- a/src/main/java/com/yem/wm/es/salescontrac/op/SalesContracSignatureOp.java +++ b/src/main/java/com/yem/wm/es/salescontrac/op/SalesContracSignatureOp.java @@ -146,7 +146,7 @@ public class SalesContracSignatureOp extends AbstractOperationServicePlugIn { public JSONObject GetintebilllogonJson(Object pkid, DynamicObject dynamicObject) { JSONObject Object = new JSONObject(); QFilter qFilter = new QFilter("yem_isdisable", QCP.equals, false); - qFilter.and(new QFilter("billno", QCP.equals, "WXHT-YZJ")); + qFilter.and(new QFilter("billno", QCP.equals, "KJHT-GZSP")); DynamicObject yem_ia_intebilllogon = BusinessDataServiceHelper.loadSingle("yem_ia_intebilllogon", "id", qFilter.toArray()); if (yem_ia_intebilllogon != null) { long intebilllogonID = yem_ia_intebilllogon.getLong("id"); diff --git a/src/main/java/com/yem/wm/es/salesorder/from/SalesOrderZJEdit.java b/src/main/java/com/yem/wm/es/salesorder/from/SalesOrderZJEdit.java index dea85e87..ba8ae375 100644 --- a/src/main/java/com/yem/wm/es/salesorder/from/SalesOrderZJEdit.java +++ b/src/main/java/com/yem/wm/es/salesorder/from/SalesOrderZJEdit.java @@ -87,7 +87,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo OperationStatus status = fsp.getStatus(); String formId = fsp.getFormId(); String appId = fsp.getAppId(); - if (OperationStatus.ADDNEW == status&&appId.equals("yem_es")) { + if (OperationStatus.ADDNEW == status && appId.equals("yem_es")) { SplitContainer splitContainer = this.getControl("yem_splitcontainerap"); splitContainer.setCollapse("yem_splitpanelap1", true); QFilter qFilter = null; @@ -193,6 +193,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo String name = e.getProperty().getName(); ChangeData changeData = e.getChangeSet()[0]; Object oldValue = changeData.getOldValue(); + Object newValue = changeData.getNewValue(); int rowIndex = changeData.getRowIndex(); int ParentRow = changeData.getParentRowIndex(); DynamicObject dataEntity = model.getDataEntity(); @@ -526,10 +527,30 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo break; case "yem_tonsqty": case "yem_port": - case "yem_padexpense": + case "yem_shippingmethod": ClientUtils.calcInlandTransportationAmt(model, rowIndex);//计算内陆运费 ClientUtils.calculatePortAmt(model, rowIndex);//计算港杂费 break; + case "yem_padexpense": + DynamicObject padexpense = (DynamicObject) newValue; + if (padexpense != null) { + String number = padexpense.getString("number"); + //内陆运输费 + if ("FYXM0023.11".equals(number)) { + DynamicObjectCollection entryRows = this.getModel().getEntryEntity("yem_es_materialinfo"); + for(int i = 0;i