1.调整返利,提交前保存

This commit is contained in:
龚豆豆 2025-11-19 11:40:18 +08:00
parent 9a19b0914e
commit f4bd912c9a
3 changed files with 16 additions and 5 deletions

View File

@ -38,9 +38,7 @@ public class MaterialListPlugin extends AbstractListPlugin implements Plugin {
super.itemClick(evt);
String itemKey = evt.getItemKey();
List<String> buttonList = Arrays.asList("SHZTXS", "BJZTXS", "GZZTXS", "SHZTCG", "BJZTCG", "GZZTCG", "SHQYXS", "BJQYXS", "GZQYXS", "SHQYCG", "BJQYCG", "GZQYCG");
// String message="";
StringBuilder errorMsg = new StringBuilder();
if (buttonList.contains(itemKey)) {
IListView listview = (IListView) this.getView();
ListSelectedRowCollection selectedRows = listview.getSelectedRows();
@ -76,7 +74,6 @@ public class MaterialListPlugin extends AbstractListPlugin implements Plugin {
if (flag) {
material.set("tqq9_stopsale", tqq9_stopsale);
SaveServiceHelper.save(new DynamicObject[]{material});
}
}
} else if (itemKey.contains("QYXS")) {
@ -151,7 +148,6 @@ public class MaterialListPlugin extends AbstractListPlugin implements Plugin {
this.getView().showMessage("修改成功");
}
}
}
public static String addOrRemoveCity(String input, String city, boolean add) {

View File

@ -2,18 +2,23 @@ package tqq9.lc123.cloud.app.plugin.operate.pm;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import kd.bos.dataentity.OperateOption;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.dataentity.utils.StringUtils;
import kd.bos.entity.operate.result.OperationResult;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.AfterOperationArgs;
import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.operation.OperationServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
import kd.sdk.plugin.Plugin;
import tqq9.lc123.cloud.app.api.utils.Constants;
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;
@ -75,6 +80,16 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp
e.getFieldKeys().add("tqq9_payamount");
}
@Override
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
super.beforeExecuteOperationTransaction(e);
String operationKey = e.getOperationKey();
if (StringUtils.equals("submit", operationKey)) {
OperateOption option = this.getOption();
OperationResult sumbitResult = OperationServiceHelper.executeOperate(Constants.TYPE_SAVE, "pm_purorderbill", e.getDataEntities(), operateOption);
}
}
@Override
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
super.afterExecuteOperationTransaction(e);

View File

@ -180,8 +180,8 @@ public class RebateRuleOpPlugin extends AbstractOperationServicePlugIn implement
BigDecimal tqq9_proportion = dynamicObject.getBigDecimal("tqq9_proportion").setScale(2, RoundingMode.HALF_UP);
if (tqq9_excl_start_base.compareTo(BigDecimal.ZERO) > 0&&tqq9_proportion.compareTo(BigDecimal.ZERO) > 0&&tqq9_excl_end_base.compareTo(BigDecimal.ZERO) > 0) {
flList.add(tqq9_excl_start_base.toString());
flList.add(tqq9_proportion.toString());
flList.add(tqq9_excl_end_base.toString());
flList.add(tqq9_proportion.toString());
}
calculationProportionList.add(flList);
}