2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package tqq9.lc123.cloud.app.plugin.operate.sys;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import com.alibaba.fastjson.JSONObject;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import com.fasterxml.jackson.databind.ObjectMapper;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import com.google.gson.Gson;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.entity.DynamicObject;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.entity.DynamicObjectCollection;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.dataentity.utils.StringUtils;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.plugin.PreparePropertysEventArgs;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import kd.bos.entity.plugin.args.AfterOperationArgs;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								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.sdk.plugin.Plugin;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.plugin.operate.pm.PurOrderBillRebatePlugin;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import tqq9.lc123.cloud.app.plugin.utils.HttpRequestUtils;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import java.io.IOException;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import java.math.BigDecimal;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import java.util.ArrayList;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import java.util.Date;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import java.util.HashMap;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import java.util.List;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/**
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * 返利规则操作插件
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								public class RebateRuleOpPlugin extends AbstractOperationServicePlugIn implements Plugin {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private final static Log logger = LogFactory.getLog(PurOrderBillRebatePlugin.class);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//    private final static HashMap<String, String> tokenMap = new HashMap<String, String>() {{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								//        put("Authorization", "Bearer b96dad1eb4f84c41bae651162aeacdd3");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								//    }};
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    private static String Push_URL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    private static String FLXT_TOKEN;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    static {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        DynamicObject url = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                new QFilter[]{new QFilter("number", QCP.equals, "FLXT_CreatRule_Url")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        Push_URL = url != null ? url.getString("name") : null;
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        DynamicObject token = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                new QFilter[]{new QFilter("number", QCP.equals, "FLXT_TOKEN")});
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        FLXT_TOKEN = token != null ? token.getString("name") : null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    @Override
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    public void onPreparePropertys(PreparePropertysEventArgs e) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        super.onPreparePropertys(e);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("name");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rulestype");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_startdate");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_enddate");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_supplier");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_estimatepro");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_targetamount");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rebatebrand");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rebategoods");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rebatesub");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_guangzhoulici");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_shanghailici");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_beijinglichi");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_gzlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_shlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_bjlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_excl_start_base");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_excl_end_base");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_proportion");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_istax");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rebatesettlespe");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_cal_amt");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_calc_procurement");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_excludnum");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_startexcludate");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_endexcludate");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_exclunopur");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_exclupur");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_purchaseorder");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        e.getFieldKeys().add("tqq9_rebateamount");
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    @Override
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    public void afterExecuteOperationTransaction(AfterOperationArgs e) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        super.afterExecuteOperationTransaction(e);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        for (DynamicObject dataEntity : e.getDataEntities()) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//                    HashMap<String, Object> bodyMap = new HashMap<>();
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            HashMap<String, String> tokenMap = new HashMap<String, String>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tokenMap.put("Authorization", FLXT_TOKEN);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            JSONObject bodyMap = new JSONObject();
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            String name = dataEntity.getString("name");//规则名称
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String tqq9_rulestype = dataEntity.getString("tqq9_rulestype");//规则类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Integer type = Integer.valueOf(tqq9_rulestype);//规则类型
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Date tqq9_startdate = dataEntity.getDate("tqq9_startdate");//返利计算开始时间
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Date tqq9_enddate = dataEntity.getDate("tqq9_enddate");//返利计算结束时间
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            long startTime = tqq9_startdate.getTime();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String startTimeString = String.valueOf(startTime);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            long endTime = tqq9_enddate.getTime();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String tqq9_enddateString = String.valueOf(endTime);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection tqq9_supplier = dataEntity.getDynamicObjectCollection("tqq9_supplier");//返利供应商
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            StringBuilder supplierIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (DynamicObject dynamicObject : tqq9_supplier) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                supplierIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("id"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_estimatepro = dataEntity.getBigDecimal("tqq9_estimatepro");//预测比例
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_targetamount = dataEntity.getBigDecimal("tqq9_targetamount");//预测总金额
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection tqq9_rebatebrand = dataEntity.getDynamicObjectCollection("tqq9_rebatebrand");//返利品牌
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            StringBuilder rebatebrandIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (DynamicObject dynamicObject : tqq9_rebatebrand) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                rebatebrandIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("id"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DynamicObjectCollection tqq9_rebategoods = dataEntity.getDynamicObjectCollection("tqq9_rebategoods");//返利商品
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            StringBuilder rebategoodsIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tqq9_rebategoods.size() > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (DynamicObject dynamicObject : tqq9_rebategoods) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    rebategoodsIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("number"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String tqq9_rebatesub = dataEntity.getString("tqq9_rebatesub");//分配类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Integer distributeType = Integer.valueOf(tqq9_rebatesub);//分配类型
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            List<List<String>> List = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            ObjectMapper mapper = new ObjectMapper();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (StringUtils.equals("0", tqq9_rebatesub)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (dataEntity.getBoolean("tqq9_guangzhoulici")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> gzList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gzList.add("GZ_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(gzList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (dataEntity.getBoolean("tqq9_shanghailici")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> shList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    shList.add("SH_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(shList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (dataEntity.getBoolean("tqq9_beijinglichi")) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> bjList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    bjList.add("BJ_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(bjList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_gzlcbl = dataEntity.getBigDecimal("tqq9_gzlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_shlcbl = dataEntity.getBigDecimal("tqq9_shlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_bjlcbl = dataEntity.getBigDecimal("tqq9_bjlcbl");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_gzlcbl.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> gzList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gzList.add("GZ_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gzList.add(tqq9_gzlcbl.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(gzList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_shlcbl.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> shList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    shList.add("SH_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    shList.add(tqq9_shlcbl.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(shList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_bjlcbl.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List<String> bjList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    bjList.add("GZ_LC");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    bjList.add(tqq9_bjlcbl.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    List.add(bjList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String distributeCity = List.toString();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            List<List<String>> calculationProportionList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_excl_start_base = dataEntity.getBigDecimal("tqq9_excl_start_base");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_excl_end_base = dataEntity.getBigDecimal("tqq9_excl_end_base");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            BigDecimal tqq9_proportion = dataEntity.getBigDecimal("tqq9_proportion");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tqq9_excl_start_base.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                List<String> startList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                startList.add(tqq9_excl_start_base.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                calculationProportionList.add(startList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tqq9_proportion.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                List<String> proportionList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                proportionList.add(tqq9_proportion.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                calculationProportionList.add(proportionList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tqq9_excl_end_base.compareTo(BigDecimal.ZERO) > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                List<String> endList = new ArrayList<>();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                endList.add(tqq9_excl_end_base.toString());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                calculationProportionList.add(endList);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String calculationProportion = calculationProportionList.toString();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Integer isTax = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Boolean tqq9_istax = dataEntity.getBoolean("tqq9_istax");//是否含税
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tqq9_istax) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                isTax = 0;//是否含税
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            String tqq9_rebatesettlespe = dataEntity.getString("tqq9_rebatesettlespe");//返利结算特例
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Integer isSpecial = Integer.valueOf(tqq9_rebatesettlespe);//返利结算特例
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("ruleName", name);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("type", type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("startTime", startTimeString);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("endTime", tqq9_enddateString);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("supplierIds", (supplierIds.length() == 0) ? null : supplierIds.substring(1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("predictedProportion", tqq9_estimatepro);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("predictedAggregateMoney", tqq9_targetamount);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("brandIds", (rebatebrandIds.length() == 0) ? null : rebatebrandIds.substring(1));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("productIds", (rebategoodsIds.length() == 0) ? null : rebategoodsIds.substring(1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("distributeType", distributeType);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("distributeCity", distributeCity);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("isTax", isTax);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bodyMap.put("isSpecial", isSpecial);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (StringUtils.equals("0", tqq9_rulestype)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                String tqq9_cal_amt = dataEntity.getString("tqq9_cal_amt");//计算金额指标
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Integer calculationMoneyType = Integer.valueOf(tqq9_cal_amt);//计算金额指标
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String tqq9_calc_procurement = dataEntity.getString("tqq9_calc_procurement");//计算采购指标
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Integer calculationPurchaseType = Integer.valueOf(tqq9_calc_procurement);//计算采购指标
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String tqq9_excludnum = dataEntity.getString("tqq9_excludnum");//排除后基数
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Integer isInclude = Integer.valueOf(tqq9_excludnum);//计算采购指标
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Date tqq9_startexcludate = dataEntity.getDate("tqq9_startexcludate");//排除返利计算开始时间
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                String noStartTime = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                String noEndTime = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_startexcludate != null) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    noStartTime = String.valueOf(tqq9_startexcludate.getTime());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Date tqq9_endexcludate = dataEntity.getDate("tqq9_endexcludate");//排除返利计算结束时间
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_endexcludate != null) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    noEndTime = String.valueOf(tqq9_endexcludate.getTime());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Integer noStatus = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_startexcludate != null && tqq9_endexcludate != null) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    noStatus = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                DynamicObjectCollection tqq9_exclunopur = dataEntity.getDynamicObjectCollection("tqq9_exclunopur");//排除时间不排除订单
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                StringBuilder exclunopurIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_exclunopur.size() > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (DynamicObject dynamicObject : tqq9_exclunopur) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        exclunopurIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("billno"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                DynamicObjectCollection tqq9_exclupur = dataEntity.getDynamicObjectCollection( "tqq9_exclupur");//排除采购订单
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                StringBuilder exclupurIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_exclupur.size() > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (DynamicObject dynamicObject : tqq9_exclunopur) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        exclupurIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("billno"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("noOrderIds", (exclupurIds.length() == 0) ? null : exclupurIds.substring(1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("calculationMoneyType", calculationMoneyType);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("calculationPurchaseType", calculationPurchaseType);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("calculationProportion", calculationProportion);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("isInclude", isInclude);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("noStartTime", noStartTime);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("noEndTime", noEndTime);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("noTimeOrderIds", (exclunopurIds.length() == 0) ? null : exclunopurIds.substring(1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("noStatus", noStatus);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                DynamicObjectCollection tqq9_purchaseorder = dataEntity.getDynamicObjectCollection("tqq9_purchaseorder");//特殊订单
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                StringBuilder purchaseorderIds = new StringBuilder();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tqq9_purchaseorder.size() > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (DynamicObject dynamicObject : tqq9_purchaseorder) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        purchaseorderIds.append(",").append(dynamicObject.getDynamicObject("fbasedataid").getString("billno"));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                BigDecimal tqq9_rebateamount = dataEntity.getBigDecimal("tqq9_rebateamount");//返利金额
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("orderIds", (purchaseorderIds.length() == 0) ? null : purchaseorderIds.substring(1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                bodyMap.put("returnMoney", tqq9_rebateamount);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Gson gson = new Gson();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            try {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                String bodyString = HttpRequestUtils.postJson(Push_URL, bodyMap.toString(), tokenMap);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JSONObject map = gson.fromJson(bodyString, JSONObject.class);
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-20 09:24:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Integer data = map.getInteger("data");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (data == null) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-18 09:51:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    this.getOperationResult().setMessage("返利规则:" + name + ",审核时创建返利规则失败");
							 | 
						
					
						
							
								
									
										
										
										
											2025-10-13 07:47:05 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } catch (IOException ex) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                throw new RuntimeException(ex);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |