1.返利关闭调整

This commit is contained in:
龚豆豆 2025-11-24 17:51:17 +08:00
parent 329320fefa
commit 2bde310dea
5 changed files with 75 additions and 54 deletions

View File

@ -49,7 +49,8 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
super.propertyChanged(e);
String key = e.getProperty().getName();
if (StringUtils.equals("tqq9_registration", key)) {
StringBuilder stringBuilder = new StringBuilder();
StringBuilder stringBuilder_supno = new StringBuilder();
StringBuilder stringBuilder_supplier = new StringBuilder();
ChangeData[] changeSet = e.getChangeSet();
ChangeData changeData = changeSet[0];
int rowIndex = changeData.getRowIndex();
@ -58,19 +59,28 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
DynamicObject tqq9_registration = BusinessDataServiceHelper.loadSingle("tqq9_registration", new QFilter[]{new QFilter("id", QCP.equals, newValue.getLong("id"))});
DynamicObjectCollection tqq9_entry = tqq9_registration.getDynamicObjectCollection("tqq9_entry");
for (DynamicObject entry : tqq9_entry) {
String supno = entry.getString("tqq9_e_supno");
stringBuilder.append("#").append(supno);
String supno = entry.getString("tqq9_e_supno");//许可证
DynamicObject tqq9_e_supplier = entry.getDynamicObject("tqq9_e_supplier");//生产商
if (StringUtils.isNotBlank(supno)) {
stringBuilder_supno.append("#").append(supno);
}
if (tqq9_e_supplier!=null) {
stringBuilder_supplier.append("#").append(tqq9_e_supplier.getString("name"));
}
}
if (StringUtils.isNotBlank(stringBuilder.toString())) {
String substring = stringBuilder.substring(1);
if (StringUtils.isNotBlank(stringBuilder_supno.toString())) {
String substring = stringBuilder_supno.substring(1);
this.getModel().setValue("tqq9_licenseno", substring, rowIndex);
}
if (StringUtils.isNotBlank(stringBuilder_supplier.toString())) {
String substring = stringBuilder_supplier.substring(1);
this.getModel().setValue("tqq9_cs", substring, rowIndex);
}
}
// this.getView().updateView();
}
if (StringUtils.equals("tqq9_zczh", key)) {
StringBuilder stringBuilder = new StringBuilder();
StringBuilder stringBuilder_supno = new StringBuilder();
StringBuilder stringBuilder_supplier = new StringBuilder();
ChangeData[] changeSet = e.getChangeSet();
ChangeData changeData = changeSet[0];
int rowIndex = changeData.getRowIndex();
@ -79,17 +89,24 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
DynamicObject tqq9_registration = BusinessDataServiceHelper.loadSingle("tqq9_registration", new QFilter[]{new QFilter("id", QCP.equals, newValue.getLong("id"))});
DynamicObjectCollection tqq9_entry = tqq9_registration.getDynamicObjectCollection("tqq9_entry");
for (DynamicObject entry : tqq9_entry) {
String supno = entry.getString("tqq9_e_supno");
stringBuilder.append("#").append(supno);
String supno = entry.getString("tqq9_e_supno");//许可证
DynamicObject tqq9_e_supplier = entry.getDynamicObject("tqq9_e_supplier");//生产商
if (StringUtils.isNotBlank(supno)) {
stringBuilder_supno.append("#").append(supno);
}
if (tqq9_e_supplier!=null) {
stringBuilder_supplier.append("#").append(tqq9_e_supplier.getString("name"));
}
}
if (StringUtils.isNotBlank(stringBuilder.toString())) {
String substring = stringBuilder.substring(1);
if (StringUtils.isNotBlank(stringBuilder_supno.toString())) {
String substring = stringBuilder_supno.substring(1);
this.getModel().setValue("tqq9_licenseno", substring, rowIndex);
}
if (StringUtils.isNotBlank(stringBuilder_supplier.toString())) {
String substring = stringBuilder_supplier.substring(1);
this.getModel().setValue("tqq9_cs", substring, rowIndex);
}
}
// this.getView().updateView();
}
}
}

View File

@ -99,11 +99,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
String type = dataMap.get("type").toString();//类型
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
if (StringUtils.equals(type, "1.0")) {
if (StringUtils.equals(type, "0.0")) {
//货返
model.setValue("tqq9_hshfzje_sh", totalMoney);//含税货返总金额
model.setValue("tqq9_hshfkyje_sh", totalMoneyAvailable);//含税货返可用金额
} else if (StringUtils.equals(type, "0.0")) {
} else if (StringUtils.equals(type, "1.0")) {
//现返
model.setValue("tqq9_hsxfzje_sh", totalMoney);//含税现返总金额
model.setValue("tqq9_hsxfkyje_sh", totalMoneyAvailable);//含税现返可用金额
@ -187,11 +187,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
String type = dataMap.get("type").toString();//类型
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
if (StringUtils.equals(type, "1.0")) {
if (StringUtils.equals(type, "0.0")) {
//货返
model.setValue("tqq9_hshfzje_bj", totalMoney);//含税货返总金额
model.setValue("tqq9_hshfkyje_bj", totalMoneyAvailable);//含税货返可用金额
} else if (StringUtils.equals(type, "0.0")) {
} else if (StringUtils.equals(type, "1.0")) {
//现返
model.setValue("tqq9_hsxfzje_bj", totalMoney);//含税现返总金额
model.setValue("tqq9_hsxfkyje_bj", totalMoneyAvailable);//含税现返可用金额
@ -277,11 +277,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
String type = dataMap.get("type").toString();//类型
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
if (StringUtils.equals(type, "1.0")) {
if (StringUtils.equals(type, "0.0")) {
//货返
model.setValue("tqq9_hshfzje_gz", totalMoney);//含税货返总金额
model.setValue("tqq9_hshfkyje_gz", totalMoneyAvailable);//含税货返可用金额
} else if (StringUtils.equals(type, "0.0")) {
} else if (StringUtils.equals(type, "1.0")) {
//现返
model.setValue("tqq9_hsxfzje_gz", totalMoney);//含税现返总金额
model.setValue("tqq9_hsxfkyje_gz", totalMoneyAvailable);//含税现返可用金额

View File

@ -292,29 +292,31 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection(ENTRYENTITY);
DynamicObject dynamicObject = dynamicObjectCollection.get(rowIndex);
DynamicObject material = dynamicObject.getDynamicObject("material");
DynamicObject masterid = material.getDynamicObject("masterid");
DynamicObject bd_material = BusinessDataServiceHelper.loadSingle(masterid.getLong("id"), "bd_material");
DynamicObject org = dataEntity.getDynamicObject("org");
//上海
if (StringUtils.equals("SHLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_sh = bd_material.getBigDecimal("tqq9_maxprice_sh");
if (tqq9_maxprice_sh.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_sh, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_sh, rowIndex);
}
//北京
} else if (StringUtils.equals("BJLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_bj = bd_material.getBigDecimal("tqq9_maxprice_bj");
if (tqq9_maxprice_bj.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_bj, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_bj, rowIndex);
}
//广州
} else if (StringUtils.equals("GZLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_gz = bd_material.getBigDecimal("tqq9_maxprice_gz");
if (tqq9_maxprice_gz.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_gz, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_gz, rowIndex);
if (material != null) {
DynamicObject masterid = material.getDynamicObject("masterid");
DynamicObject bd_material = BusinessDataServiceHelper.loadSingle(masterid.getLong("id"), "bd_material");
DynamicObject org = dataEntity.getDynamicObject("org");
//上海
if (StringUtils.equals("SHLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_sh = bd_material.getBigDecimal("tqq9_maxprice_sh");
if (tqq9_maxprice_sh.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_sh, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_sh, rowIndex);
}
//北京
} else if (StringUtils.equals("BJLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_bj = bd_material.getBigDecimal("tqq9_maxprice_bj");
if (tqq9_maxprice_bj.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_bj, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_bj, rowIndex);
}
//广州
} else if (StringUtils.equals("GZLC", org.getString("number"))) {
BigDecimal tqq9_maxprice_gz = bd_material.getBigDecimal("tqq9_maxprice_gz");
if (tqq9_maxprice_gz.compareTo(BigDecimal.ZERO) > 0) {
getModel().setValue("priceandtax", tqq9_maxprice_gz, rowIndex);
getModel().setValue("tqq9_zgcgxj", tqq9_maxprice_gz, rowIndex);
}
}
}
}
@ -341,14 +343,14 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
String number = org.getString("number");
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
new QFilter[]{new QFilter("number", QCP.equals, number)});
if(org_fl==null){
if (org_fl == null) {
this.getView().showErrorNotification("组织选择错误");
}
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
HashMap<String, Object> queryMap = new HashMap<>();
String tqq9_ztsupplierid = newValue.getString("tqq9_ztsupplierid");
if(StringUtils.isBlank(tqq9_ztsupplierid)){
tqq9_ztsupplierid="0";
if (StringUtils.isBlank(tqq9_ztsupplierid)) {
tqq9_ztsupplierid = "0";
}
queryMap.put("supplierId", tqq9_ztsupplierid);
queryMap.put("companyId", orgid_fl);
@ -363,21 +365,21 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
String type = dataMap.get("type").toString();//类型
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
if (StringUtils.equals(type, "1.0")) {
if (StringUtils.equals(type, "0.0")) {
//货返
model.setValue("tqq9_hshfzje", totalMoney);//含税货返总金额
model.setValue("tqq9_hshfkyje", totalMoneyAvailable);//含税货返可用金额
} else if (StringUtils.equals(type, "0.0")) {
} else if (StringUtils.equals(type, "1.0")) {
//现返
model.setValue("tqq9_hsxfzje", totalMoney);//含税现返总金额
model.setValue("tqq9_hsxfkyje", totalMoneyAvailable);//含税现返可用金额
}
}
lcLogService.savelog("查询返利金额",URL,false,true, queryMap.toString(), bodyString);
lcLogService.savelog("查询返利金额", URL, false, true, queryMap.toString(), bodyString);
}
} catch (IOException ex) {
lcLogService.savelog("查询返利金额",URL,false,false, queryMap.toString(), "接口调用报错,无返回值");
throw new RuntimeException(ex+",请求返利系统失败");
lcLogService.savelog("查询返利金额", URL, false, false, queryMap.toString(), "接口调用报错,无返回值");
throw new RuntimeException(ex + ",请求返利系统失败");
}
getView().updateView();
}

View File

@ -58,7 +58,9 @@ public class PurOrderPushPurRefundConverPlugin extends AbstractConvertPlugIn imp
}
BigDecimal zero = BigDecimal.ZERO;
dynamicObjectCollection.clear();
if(im_purinblil!=null){
dynamicObjectCollection.clear();
}
if (im_purinblil != null) {
HashMap<String, ArrayList<BigDecimal>> map = new HashMap<>();
for (DynamicObject dynamicObject : im_purinblil) {

View File

@ -209,7 +209,7 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp
Boolean data = map.getBoolean("data");
if (data == null || !data) {
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, false, queryMap.toString(), bodyString);
this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败");
this.getOperationResult().setMessage("采购订单:" + billno + ",撤销占用金额失败");
} else {
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, true, queryMap.toString(), bodyString);
}