【泛微接口】返利规则
This commit is contained in:
parent
5535ad3a41
commit
482f16e4ad
|
|
@ -2888,6 +2888,8 @@ public class FWImpl {
|
||||||
//返利规则
|
//返利规则
|
||||||
JSONObject detail1 = new JSONObject();
|
JSONObject detail1 = new JSONObject();
|
||||||
JSONArray recordsArr1 = new JSONArray();
|
JSONArray recordsArr1 = new JSONArray();
|
||||||
|
JSONObject detail2 = new JSONObject();
|
||||||
|
JSONArray recordsArr2 = new JSONArray();
|
||||||
QFilter f1 = new QFilter("tqq9_conm_purcontract.id", "=", bill.getPkValue());
|
QFilter f1 = new QFilter("tqq9_conm_purcontract.id", "=", bill.getPkValue());
|
||||||
QFilter f2 = new QFilter("enable", "=", "1");
|
QFilter f2 = new QFilter("enable", "=", "1");
|
||||||
DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1,f2});
|
DynamicObject[] ruleArr = BusinessDataServiceHelper.load("tqq9_pur_rebate", "id", new QFilter[]{f1,f2});
|
||||||
|
|
@ -3021,9 +3023,6 @@ public class FWImpl {
|
||||||
if("1".equals(tqq9_calc_procurement)){
|
if("1".equals(tqq9_calc_procurement)){
|
||||||
jscgzb = 1;
|
jscgzb = 1;
|
||||||
}
|
}
|
||||||
BigDecimal ksjsjsbbh = rule.getBigDecimal("tqq9_excl_start_base");
|
|
||||||
BigDecimal jsjsjsbbh = rule.getBigDecimal("tqq9_excl_end_base");
|
|
||||||
BigDecimal bl = rule.getBigDecimal("tqq9_proportion");
|
|
||||||
BigDecimal flje = rule.getBigDecimal("tqq9_rebateamount");
|
BigDecimal flje = rule.getBigDecimal("tqq9_rebateamount");
|
||||||
String flgys = "";
|
String flgys = "";
|
||||||
DynamicObjectCollection tqq9_supplier = rule.getDynamicObjectCollection("tqq9_supplier");
|
DynamicObjectCollection tqq9_supplier = rule.getDynamicObjectCollection("tqq9_supplier");
|
||||||
|
|
@ -3035,6 +3034,39 @@ public class FWImpl {
|
||||||
if(StringUtils.isNotBlank(flgys)){
|
if(StringUtils.isNotBlank(flgys)){
|
||||||
flgys = flgys.substring(1);
|
flgys = flgys.substring(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DynamicObjectCollection entries = rule.getDynamicObjectCollection("tqq9_rebate_entry");
|
||||||
|
for (DynamicObject entry : entries) {
|
||||||
|
BigDecimal ksjsjsbbh = entry.getBigDecimal("tqq9_excl_start_base");
|
||||||
|
BigDecimal jsjsjsbbh = entry.getBigDecimal("tqq9_excl_end_base");
|
||||||
|
BigDecimal bl = entry.getBigDecimal("tqq9_proportion");
|
||||||
|
|
||||||
|
JSONObject e0 = new JSONObject();
|
||||||
|
e0.put("fieldName", "flgzdjh");
|
||||||
|
e0.put("fieldValue", flgzdjh);
|
||||||
|
JSONObject e1 = new JSONObject();
|
||||||
|
e1.put("fieldName", "ksjsjsbbh");
|
||||||
|
e1.put("fieldValue", ksjsjsbbh!=null&&ksjsjsbbh.compareTo(BigDecimal.ZERO)!=0?ksjsjsbbh:0);
|
||||||
|
JSONObject e2 = new JSONObject();
|
||||||
|
e2.put("fieldName", "jsjsjsbbh");
|
||||||
|
e2.put("fieldValue", jsjsjsbbh!=null&&jsjsjsbbh.compareTo(BigDecimal.ZERO)!=0?jsjsjsbbh:0);
|
||||||
|
JSONObject e3 = new JSONObject();
|
||||||
|
e3.put("fieldName", "bl");
|
||||||
|
e3.put("fieldValue", bl!=null&&bl.compareTo(BigDecimal.ZERO)!=0?bl:0);
|
||||||
|
|
||||||
|
List<JSONObject> elist = Arrays.asList(e0,e1,e2,e3);
|
||||||
|
JSONArray recordsArr = new JSONArray();
|
||||||
|
recordsArr.addAll(elist);
|
||||||
|
|
||||||
|
JSONObject recordObj = new JSONObject();
|
||||||
|
recordObj.put("recordOrder", 0);
|
||||||
|
recordObj.put("workflowRequestTableFields", recordsArr);
|
||||||
|
recordsArr2.add(recordObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject e0 = new JSONObject();
|
JSONObject e0 = new JSONObject();
|
||||||
e0.put("fieldName", "flgzdjh");
|
e0.put("fieldName", "flgzdjh");
|
||||||
e0.put("fieldValue", flgzdjh);
|
e0.put("fieldValue", flgzdjh);
|
||||||
|
|
@ -3110,15 +3142,6 @@ public class FWImpl {
|
||||||
JSONObject e24 = new JSONObject();
|
JSONObject e24 = new JSONObject();
|
||||||
e24.put("fieldName", "jscgzb");
|
e24.put("fieldName", "jscgzb");
|
||||||
e24.put("fieldValue", jscgzb);
|
e24.put("fieldValue", jscgzb);
|
||||||
JSONObject e25 = new JSONObject();
|
|
||||||
e25.put("fieldName", "ksjsjsbbh");
|
|
||||||
e25.put("fieldValue", ksjsjsbbh!=null&&ksjsjsbbh.compareTo(BigDecimal.ZERO)!=0?ksjsjsbbh:0);
|
|
||||||
JSONObject e26 = new JSONObject();
|
|
||||||
e26.put("fieldName", "jsjsjsbbh");
|
|
||||||
e26.put("fieldValue", jsjsjsbbh!=null&&jsjsjsbbh.compareTo(BigDecimal.ZERO)!=0?jsjsjsbbh:0);
|
|
||||||
JSONObject e27 = new JSONObject();
|
|
||||||
e27.put("fieldName", "bl");
|
|
||||||
e27.put("fieldValue", bl!=null&&bl.compareTo(BigDecimal.ZERO)!=0?bl:0);
|
|
||||||
JSONObject e28 = new JSONObject();
|
JSONObject e28 = new JSONObject();
|
||||||
e28.put("fieldName", "flje");
|
e28.put("fieldName", "flje");
|
||||||
e28.put("fieldValue", flje!=null&&flje.compareTo(BigDecimal.ZERO)!=0?flje:0);
|
e28.put("fieldValue", flje!=null&&flje.compareTo(BigDecimal.ZERO)!=0?flje:0);
|
||||||
|
|
@ -3127,7 +3150,7 @@ public class FWImpl {
|
||||||
e29.put("fieldValue", flgys);
|
e29.put("fieldValue", flgys);
|
||||||
|
|
||||||
List<JSONObject> elist = Arrays.asList(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18
|
List<JSONObject> elist = Arrays.asList(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15,e16,e17,e18
|
||||||
,e19,e20,e21,e22,e23,e24,e25,e26,e27,e28,e29);
|
,e19,e20,e21,e22,e23,e24,e28,e29);
|
||||||
JSONArray recordsArr = new JSONArray();
|
JSONArray recordsArr = new JSONArray();
|
||||||
recordsArr.addAll(elist);
|
recordsArr.addAll(elist);
|
||||||
|
|
||||||
|
|
@ -3141,8 +3164,15 @@ public class FWImpl {
|
||||||
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
||||||
detail1.put("deleteAll", "1");
|
detail1.put("deleteAll", "1");
|
||||||
}
|
}
|
||||||
|
detail2.put("tableDBName", "formtable_main_101_dt2");
|
||||||
|
detail2.put("workflowRequestTableRecords", recordsArr2);
|
||||||
|
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
||||||
|
detail2.put("deleteAll", "1");
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray detailRootArr = new JSONArray();
|
JSONArray detailRootArr = new JSONArray();
|
||||||
detailRootArr.add(detail1);
|
detailRootArr.add(detail1);
|
||||||
|
detailRootArr.add(detail2);
|
||||||
|
|
||||||
//构建主表数据
|
//构建主表数据
|
||||||
JSONObject m1 = new JSONObject();
|
JSONObject m1 = new JSONObject();
|
||||||
|
|
@ -3621,7 +3651,7 @@ public class FWImpl {
|
||||||
detail1.put("deleteAll", "1");
|
detail1.put("deleteAll", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
detail2.put("tableDBName", "formtable_main_101_dt2");
|
detail2.put("tableDBName", "formtable_main_102_dt2");
|
||||||
detail2.put("workflowRequestTableRecords", recordsArr2);
|
detail2.put("workflowRequestTableRecords", recordsArr2);
|
||||||
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
if(StringUtils.isNotBlank(tqq9_fwrequestid)){
|
||||||
detail2.put("deleteAll", "1");
|
detail2.put("deleteAll", "1");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue