diff --git a/lc123/cloud/app/api/controller/CasPaybillController.java b/lc123/cloud/app/api/controller/CasPaybillController.java index 796bacd..9e9cd4f 100644 --- a/lc123/cloud/app/api/controller/CasPaybillController.java +++ b/lc123/cloud/app/api/controller/CasPaybillController.java @@ -22,8 +22,9 @@ import tqq9.lc123.cloud.app.api.utils.ApiResultExt; import tqq9.lc123.cloud.app.api.utils.Constants; import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; /** @@ -50,14 +51,6 @@ public class CasPaybillController { ApiResultExt resultExt = new ApiResultExt(); List billnos = new ArrayList<>(); HashMap billStatusMap = new HashMap<>(); -// HashMap billIdMap = new HashMap<>(); -// Set validValues = new HashSet<>(); -// validValues.add("4"); -// validValues.add("5"); -// validValues.add("6"); -// validValues.add("7"); -// validValues.add("8"); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); // 目标日期格式 for (int i = 0; i < data.size(); i++) { HashMap dataMap = data.get(i); String billno = (String) dataMap.get("billno"); @@ -98,19 +91,10 @@ public class CasPaybillController { } cas_paybill.set("description", dataMap.get("description")); cas_paybill.set("tqq9_digital_receipt", dataMap.get("tqq9_digital_receipt")); + cas_paybill.set("tqq9_dzhdbh", dataMap.get("tqq9_dzhdbh")); resultBean.setId(cas_paybill.getString("id")); resultBean.setBillStatus(true); iserror = false; -// if(!validValues.contains((String)dataMap.get("billstatus"))){ -// ArrayList rowMsg = error.getRowMsg(); -// rowMsg.add("传入编号:" + billno + "的交易状态有误"); -// error.setRowMsg(rowMsg); -// error.setEntityKey(Constants.CAS_PAYBILL); -// error.setKeys(keys); -// resultBean.setId(""); -// resultBean.setBillStatus(false); -// index++; -// } } } if (iserror) { diff --git a/lc123/cloud/app/plugin/operate/ap/PayBillOperationPlugin.java b/lc123/cloud/app/plugin/operate/ap/PayBillOperationPlugin.java index 4e971d6..8f3daef 100644 --- a/lc123/cloud/app/plugin/operate/ap/PayBillOperationPlugin.java +++ b/lc123/cloud/app/plugin/operate/ap/PayBillOperationPlugin.java @@ -17,6 +17,8 @@ import kd.bos.orm.query.QFilter; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.operation.SaveServiceHelper; import kd.sdk.plugin.Plugin; +import tqq9.lc123.cloud.app.eip.iscb.LCLogService; +import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl; import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils; import java.io.IOException; @@ -174,6 +176,7 @@ public class PayBillOperationPlugin extends AbstractOperationServicePlugIn imple BigDecimal tqq9_hsxfsyje = pm_purorderbill.getBigDecimal("tqq9_hsxfsyje");//含税现返使用金额 String tqq9_hfid = pm_purorderbill.getString("tqq9_hfid");//货返id String tqq9_xfid = pm_purorderbill.getString("tqq9_xfid");//现返id + LCLogService lcLogService = new LCLogServiceImpl(); if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0 && actpayamt.compareTo(BigDecimal.ZERO) > 0) { BigDecimal notaxamount = tqq9_hshfsyje.multiply(oneHundred.divide(oneHundred.add(new BigDecimal(13)), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); BigDecimal taxamount = tqq9_hshfsyje.subtract(notaxamount);//税额 @@ -187,12 +190,15 @@ public class PayBillOperationPlugin extends AbstractOperationServicePlugIn imple HashMap map = gson.fromJson(bodyString, HashMap.class); Boolean data = (Boolean) map.get("data"); if (data == null || !data) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("付款单:" + billno + ",审核时扣除订单金额失败"); } else { pm_purorderbill.set("tqq9_isrebatecalculate", true); + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), bodyString); SaveServiceHelper.save(new DynamicObject[]{pm_purorderbill}); } } catch (IOException ex) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } //现返审核 @@ -209,12 +215,15 @@ public class PayBillOperationPlugin extends AbstractOperationServicePlugIn imple HashMap map = gson.fromJson(bodyString, HashMap.class); Boolean data = (Boolean) map.get("data"); if (data == null || !data) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("付款单:" + billno + ",审核时扣除订单金额失败"); } else { pm_purorderbill.set("tqq9_isrebatecalculate", true); + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), bodyString); SaveServiceHelper.save(new DynamicObject[]{pm_purorderbill}); } } catch (IOException ex) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } } diff --git a/lc123/cloud/app/plugin/operate/pm/PurOrderBillRebatePlugin.java b/lc123/cloud/app/plugin/operate/pm/PurOrderBillRebatePlugin.java index 67a7973..07263b9 100644 --- a/lc123/cloud/app/plugin/operate/pm/PurOrderBillRebatePlugin.java +++ b/lc123/cloud/app/plugin/operate/pm/PurOrderBillRebatePlugin.java @@ -14,6 +14,8 @@ import kd.bos.orm.query.QFilter; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.operation.SaveServiceHelper; import kd.sdk.plugin.Plugin; +import tqq9.lc123.cloud.app.eip.iscb.LCLogService; +import tqq9.lc123.cloud.app.eip.iscb.impl.LCLogServiceImpl; import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils; import java.io.IOException; @@ -80,6 +82,7 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp HashMap tokenMap = new HashMap(); tokenMap.put("Authorization", FLXT_TOKEN); BigDecimal oneHundred = new BigDecimal(100); + LCLogService lcLogService = new LCLogServiceImpl(); if (StringUtils.equals("save", operationKey)) { for (DynamicObject dataEntity : e.getDataEntities()) { String billno = dataEntity.getString("billno"); @@ -99,11 +102,9 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Integer xfid = null; if (StringUtils.isNotBlank(tqq9_hfid)) { hfid = Integer.valueOf(tqq9_hfid); - } if (StringUtils.isNotBlank(tqq9_xfid)) { xfid = Integer.valueOf(tqq9_xfid); - } //货返锁定 if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0 && !tqq9_hshfsyje.equals(tqq9_hshfsyje_old) && tqq9_hshfsyje_old.compareTo(BigDecimal.ZERO) == 0) { @@ -111,7 +112,6 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp BigDecimal taxrate = tqq9_hshfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); BigDecimal notaxamount = tqq9_hshfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); BigDecimal taxamount = tqq9_hshfsyje.subtract(notaxamount);//税额 -// HashMap bodyMap = new HashMap<>(); JSONObject bodyMap = new JSONObject(); bodyMap.put("supplierId", supplier.getString("tqq9_ztsupplierid")); bodyMap.put("companyId", orgid_fl); @@ -125,16 +125,17 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Object data = map.getInteger("data"); if (data != null) { dataEntity.set("tqq9_hfid", data.toString()); + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,true, bodyMap.toString(), bodyString); } else { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); } } catch (IOException ex) { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧) SaveServiceHelper.save(new DynamicObject[]{dataEntity}); - - } //现返锁定 if (tqq9_hsxfsyje.compareTo(BigDecimal.ZERO) > 0 && !tqq9_hsxfsyje.equals(tqq9_hsxfsyje_old) && tqq9_hsxfsyje_old.compareTo(BigDecimal.ZERO) == 0) { @@ -142,7 +143,6 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp BigDecimal taxrate = tqq9_hsxfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); BigDecimal notaxamount = tqq9_hsxfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); BigDecimal taxamount = tqq9_hsxfsyje.subtract(notaxamount);//税额 -// HashMap bodyMap = new HashMap<>(); JSONObject bodyMap = new JSONObject(); bodyMap.put("supplierId", supplier.getString("tqq9_ztsupplierid")); bodyMap.put("companyId", orgid_fl); @@ -156,10 +156,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Object data = map.getInteger("data"); if (data != null) { dataEntity.set("tqq9_xfid", data.toString()); + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,true, bodyMap.toString(), bodyString); } else { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); } } catch (IOException ex) { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧) @@ -182,16 +185,19 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); + }else{ + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,true, queryMap.toString(), bodyString); } } catch (IOException ex) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,true, queryMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0) { notaxamount = tqq9_hshfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); taxamount = tqq9_hshfsyje.subtract(notaxamount);//税额 -// HashMap bodyMap = new HashMap<>(); JSONObject bodyMap = new JSONObject(); bodyMap.put("supplierId", supplier.getString("tqq9_ztsupplierid")); bodyMap.put("companyId", orgid_fl); @@ -204,10 +210,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Object data = map.getInteger("data"); if (data != null) { dataEntity.set("tqq9_hfid", data.toString()); + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,true, bodyMap.toString(), bodyString); } else { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); } } catch (IOException ex) { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧) @@ -232,9 +241,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); + }else{ + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,true, queryMap.toString(), bodyString); } } catch (IOException ex) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } if (tqq9_hsxfsyje.compareTo(BigDecimal.ZERO) > 0) { @@ -253,10 +266,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Object data = map.getInteger("data"); if (data != null) { dataEntity.set("tqq9_xfid", data.toString()); + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,true, bodyMap.toString(), bodyString); } else { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); } } catch (IOException ex) { + lcLogService.savelog("FL-锁定返利金额",Create_URL,true,false, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧) @@ -265,152 +281,6 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp } } } -// else if (StringUtils.equals("submit", operationKey)) { -// for (DynamicObject dataEntity : e.getDataEntities()) { -// String billno = dataEntity.getString("billno"); -// DynamicObject supplier = dataEntity.getDynamicObject("supplier");//供应商 -// DynamicObject org = dataEntity.getDynamicObject("org");//组织 -// BigDecimal tqq9_hshfsyje = dataEntity.getBigDecimal("tqq9_hshfsyje").setScale(2, RoundingMode.HALF_UP);//含税货返使用金额 -// BigDecimal tqq9_hsxfsyje = dataEntity.getBigDecimal("tqq9_hsxfsyje").setScale(2, RoundingMode.HALF_UP);//含税现返使用金额 -// BigDecimal tqq9_hshfsyje_old = dataEntity.getBigDecimal("tqq9_hshfsyje_old").setScale(2, RoundingMode.HALF_UP);//含税货返使用金额(旧) -// BigDecimal tqq9_hsxfsyje_old = dataEntity.getBigDecimal("tqq9_hsxfsyje_old").setScale(2, RoundingMode.HALF_UP);//含税现返使用金额(旧) -// //货返锁定 -// if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0 && !tqq9_hshfsyje.equals(tqq9_hshfsyje_old) && tqq9_hshfsyje_old.compareTo(BigDecimal.ZERO) == 0) { -// DynamicObject tqq9_hshfsysl = dataEntity.getDynamicObject("tqq9_hshfsysl");//含税货返使用税率 -// BigDecimal taxrate = tqq9_hshfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); -// BigDecimal notaxamount = tqq9_hshfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); - -// BigDecimal taxamount = tqq9_hshfsyjesubtract(notaxamount);//税额 -// // HashMap bodyMap = new HashMap<>(); -// JSONObject bodyMap = new JSONObject(); -// bodyMap.put("supplierId", supplier.getString("tqq9_ztsupplierid")); -// bodyMap.put("companyId", orgid_fl); -// bodyMap.put("type", 0); -// bodyMap.put("money", tqq9_hshfsyje); -// bodyMap.put("taxAmount", taxamount); -// Gson gson = new Gson(); -// try { -// String bodyString = HttpRequestUtils.postJson(Create_URL, bodyMap.toString(), tokenMap); -// JSONObject map = gson.fromJson(bodyString, JSONObject.class); -// Object data = map.getInteger("data"); -// if (data != null) { -// dataEntity.set("tqq9_hfid", data.toString()); -// } else { -// this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); -// } -// } catch (IOException ex) { -// throw new RuntimeException(ex); -// } -// dataEntity.set("tqq9_hshfsyje_old", tqq9_hshfsyje);//含税货返使用金额(旧) -// SaveServiceHelper.save(new DynamicObject[]{dataEntity}); -// -// -// } -// //现返锁定 -// if (tqq9_hsxfsyje.compareTo(BigDecimal.ZERO) > 0 && !tqq9_hsxfsyje.equals(tqq9_hsxfsyje_old) && tqq9_hsxfsyje_old.compareTo(BigDecimal.ZERO) == 0) { -// DynamicObject tqq9_hsxfsysl = dataEntity.getDynamicObject("tqq9_hsxfsysl");//含税现返使用税率 -// BigDecimal taxrate = tqq9_hsxfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); -// BigDecimal notaxamount = tqq9_hsxfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); -// BigDecimal taxamount = tqq9_hsxfsyje.subtract(notaxamount);//税额 -//// HashMap bodyMap = new HashMap<>(); -// JSONObject bodyMap = new JSONObject(); -// bodyMap.put("supplierId", supplier.getString("tqq9_ztsupplierid")); -// bodyMap.put("companyId", orgid_fl); -// bodyMap.put("type", 1); -// bodyMap.put("money", tqq9_hsxfsyje); -// bodyMap.put("taxAmount", taxamount); -// Gson gson = new Gson(); -// try { -// String bodyString = HttpRequestUtils.postJson(Create_URL, bodyMap.toString(), tokenMap); -// JSONObject map = gson.fromJson(bodyString, JSONObject.class); -// Object data = map.getInteger("data"); -// if (data != null) { -// dataEntity.set("tqq9_xfid", data.toString()); -// } else { -// this.getOperationResult().setMessage("采购订单:" + billno + ",保存时占用金额失败"); -// } -// } catch (IOException ex) { -// throw new RuntimeException(ex); -// } -// dataEntity.set("tqq9_hsxfsyje_old", tqq9_hsxfsyje);//含税现返使用金额(旧) -// SaveServiceHelper.save(new DynamicObject[]{dataEntity}); -// } -// } -// -// } else if (StringUtils.equals("unsubmit", operationKey)) { -// //货返删除 -// for (DynamicObject dataEntity : e.getDataEntities()) { -// String billno = dataEntity.getString("billno"); -// BigDecimal tqq9_hshfsyje = dataEntity.getBigDecimal("tqq9_hshfsyje").setScale(2, RoundingMode.HALF_UP);//含税货返使用金额 -// BigDecimal tqq9_hsxfsyje = dataEntity.getBigDecimal("tqq9_hsxfsyje").setScale(2, RoundingMode.HALF_UP);//含税现返使用金额 -// String tqq9_hfid = dataEntity.getString("tqq9_hfid");//货返id -// String tqq9_xfid = dataEntity.getString("tqq9_xfid");//现返id -// Integer hfid = null; -// Integer xfid = null; -// if (StringUtils.isNotBlank(tqq9_hfid)) { -// hfid = Integer.valueOf(tqq9_hfid); -// -// } -// if (StringUtils.isNotBlank(tqq9_xfid)) { -// xfid = Integer.valueOf(tqq9_xfid); -// -// } -// if (StringUtils.isNotBlank(tqq9_hfid)) { -// hfid = Integer.valueOf(tqq9_hfid); -// -// } -// if (StringUtils.isNotBlank(tqq9_xfid)) { -// xfid = Integer.valueOf(tqq9_xfid); -// -// } -// if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0) { -// DynamicObject tqq9_hshfsysl = dataEntity.getDynamicObject("tqq9_hshfsysl");//含税货返使用税率 -// BigDecimal taxrate = tqq9_hshfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); -// BigDecimal notaxamount = tqq9_hshfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); -// BigDecimal taxamount = tqq9_hshfsyje.subtract(notaxamount);//税额 -//// HashMap bodyMap = new HashMap<>(); -// JSONObject bodyMap = new JSONObject(); -// bodyMap.put("id", hfid); -// bodyMap.put("money", tqq9_hshfsyje); -// bodyMap.put("taxAmount", taxamount); -// Gson gson = new Gson(); -// try { -// String bodyString = HttpRequestUtils.postJson(Cancel_URL, bodyMap.toString(), tokenMap); -// JSONObject map = gson.fromJson(bodyString, JSONObject.class); -// Boolean data = map.getBoolean("data"); -// if (data==null||!data)) { -// this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); -// } -// } catch (IOException ex) { -// throw new RuntimeException(ex); -// } -// -// } -// //现返删除 -// if (tqq9_hsxfsyje.compareTo(BigDecimal.ZERO) > 0) { -// DynamicObject tqq9_hsxfsysl = dataEntity.getDynamicObject("tqq9_hsxfsysl");//含税现返使用税率 -// BigDecimal taxrate = tqq9_hsxfsysl.getBigDecimal("taxrate").setScale(2, RoundingMode.HALF_UP); -// BigDecimal notaxamount = tqq9_hsxfsyje.multiply(oneHundred.divide(oneHundred.add(taxrate), 10, RoundingMode.HALF_UP)).setScale(2, RoundingMode.HALF_UP); -// BigDecimal taxamount = tqq9_hsxfsyje.subtract(notaxamount);//税额 -//// HashMap bodyMap = new HashMap<>(); -// JSONObject bodyMap = new JSONObject(); -// bodyMap.put("id", xfid); -// bodyMap.put("money", tqq9_hsxfsyje); -// bodyMap.put("taxAmount", taxamount); -// Gson gson = new Gson(); -// try { -// String bodyString = HttpRequestUtils.postJson(Cancel_URL, bodyMap.toString(), tokenMap); -// JSONObject map = gson.fromJson(bodyString, JSONObject.class); -// Boolean data = map.getBoolean("data"); -// if (data==null||!data)) { -// this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); -// } -// } catch (IOException ex) { -// throw new RuntimeException(ex); -// } -// } -// } -// } if (StringUtils.equals("delete", operationKey)) { //货返删除 for (DynamicObject dataEntity : e.getDataEntities()) { @@ -423,11 +293,9 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp Integer xfid = null; if (StringUtils.isNotBlank(tqq9_hfid)) { hfid = Integer.valueOf(tqq9_hfid); - } if (StringUtils.isNotBlank(tqq9_xfid)) { xfid = Integer.valueOf(tqq9_xfid); - } if (tqq9_hshfsyje.compareTo(BigDecimal.ZERO) > 0) { DynamicObject tqq9_hshfsysl = dataEntity.getDynamicObject("tqq9_hshfsysl");//含税货返使用税率 @@ -445,9 +313,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); + }else{ + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,true, queryMap.toString(), bodyString); } } catch (IOException ex) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } @@ -469,9 +341,13 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败"); + }else{ + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,true, queryMap.toString(), bodyString); } } catch (IOException ex) { + lcLogService.savelog("FL-解锁返利金额",Cancel_URL,false,false, queryMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } } @@ -511,12 +387,15 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",审核时扣除订单金额失败"); } else { dataEntity.set("tqq9_isrebatecalculate", true); + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), bodyString); SaveServiceHelper.save(new DynamicObject[]{dataEntity}); } } catch (IOException ex) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } } @@ -537,12 +416,15 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp JSONObject map = gson.fromJson(bodyString, JSONObject.class); Boolean data = map.getBoolean("data"); if (data == null || !data) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,false, bodyMap.toString(), bodyString); this.getOperationResult().setMessage("采购订单:" + billno + ",审核时扣除订单金额失败"); } else { dataEntity.set("tqq9_isrebatecalculate", true); + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), bodyString); SaveServiceHelper.save(new DynamicObject[]{dataEntity}); } } catch (IOException ex) { + lcLogService.savelog("FL-使用返利金额",Use_URL,false,true, bodyMap.toString(), "接口调用报错,errormessage:"+ex.getMessage()); throw new RuntimeException(ex); } }