1.返利关闭调整
This commit is contained in:
parent
329320fefa
commit
2bde310dea
|
|
@ -49,7 +49,8 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
super.propertyChanged(e);
|
super.propertyChanged(e);
|
||||||
String key = e.getProperty().getName();
|
String key = e.getProperty().getName();
|
||||||
if (StringUtils.equals("tqq9_registration", key)) {
|
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[] changeSet = e.getChangeSet();
|
||||||
ChangeData changeData = changeSet[0];
|
ChangeData changeData = changeSet[0];
|
||||||
int rowIndex = changeData.getRowIndex();
|
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"))});
|
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");
|
DynamicObjectCollection tqq9_entry = tqq9_registration.getDynamicObjectCollection("tqq9_entry");
|
||||||
for (DynamicObject entry : tqq9_entry) {
|
for (DynamicObject entry : tqq9_entry) {
|
||||||
String supno = entry.getString("tqq9_e_supno");
|
String supno = entry.getString("tqq9_e_supno");//许可证
|
||||||
stringBuilder.append("#").append(supno);
|
DynamicObject tqq9_e_supplier = entry.getDynamicObject("tqq9_e_supplier");//生产商
|
||||||
|
if (StringUtils.isNotBlank(supno)) {
|
||||||
|
stringBuilder_supno.append("#").append(supno);
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(stringBuilder.toString())) {
|
if (tqq9_e_supplier!=null) {
|
||||||
String substring = stringBuilder.substring(1);
|
stringBuilder_supplier.append("#").append(tqq9_e_supplier.getString("name"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(stringBuilder_supno.toString())) {
|
||||||
|
String substring = stringBuilder_supno.substring(1);
|
||||||
this.getModel().setValue("tqq9_licenseno", substring, rowIndex);
|
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)) {
|
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[] changeSet = e.getChangeSet();
|
||||||
ChangeData changeData = changeSet[0];
|
ChangeData changeData = changeSet[0];
|
||||||
int rowIndex = changeData.getRowIndex();
|
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"))});
|
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");
|
DynamicObjectCollection tqq9_entry = tqq9_registration.getDynamicObjectCollection("tqq9_entry");
|
||||||
for (DynamicObject entry : tqq9_entry) {
|
for (DynamicObject entry : tqq9_entry) {
|
||||||
String supno = entry.getString("tqq9_e_supno");
|
String supno = entry.getString("tqq9_e_supno");//许可证
|
||||||
stringBuilder.append("#").append(supno);
|
DynamicObject tqq9_e_supplier = entry.getDynamicObject("tqq9_e_supplier");//生产商
|
||||||
|
if (StringUtils.isNotBlank(supno)) {
|
||||||
|
stringBuilder_supno.append("#").append(supno);
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(stringBuilder.toString())) {
|
if (tqq9_e_supplier!=null) {
|
||||||
String substring = stringBuilder.substring(1);
|
stringBuilder_supplier.append("#").append(tqq9_e_supplier.getString("name"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(stringBuilder_supno.toString())) {
|
||||||
|
String substring = stringBuilder_supno.substring(1);
|
||||||
this.getModel().setValue("tqq9_licenseno", substring, rowIndex);
|
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();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -99,11 +99,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
String type = dataMap.get("type").toString();//类型
|
String type = dataMap.get("type").toString();//类型
|
||||||
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
||||||
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
|
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_hshfzje_sh", totalMoney);//含税货返总金额
|
||||||
model.setValue("tqq9_hshfkyje_sh", totalMoneyAvailable);//含税货返可用金额
|
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_hsxfzje_sh", totalMoney);//含税现返总金额
|
||||||
model.setValue("tqq9_hsxfkyje_sh", totalMoneyAvailable);//含税现返可用金额
|
model.setValue("tqq9_hsxfkyje_sh", totalMoneyAvailable);//含税现返可用金额
|
||||||
|
|
@ -187,11 +187,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
String type = dataMap.get("type").toString();//类型
|
String type = dataMap.get("type").toString();//类型
|
||||||
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
||||||
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
|
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_hshfzje_bj", totalMoney);//含税货返总金额
|
||||||
model.setValue("tqq9_hshfkyje_bj", totalMoneyAvailable);//含税货返可用金额
|
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_hsxfzje_bj", totalMoney);//含税现返总金额
|
||||||
model.setValue("tqq9_hsxfkyje_bj", totalMoneyAvailable);//含税现返可用金额
|
model.setValue("tqq9_hsxfkyje_bj", totalMoneyAvailable);//含税现返可用金额
|
||||||
|
|
@ -277,11 +277,11 @@ public class PurApplyBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
String type = dataMap.get("type").toString();//类型
|
String type = dataMap.get("type").toString();//类型
|
||||||
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
||||||
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
|
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_hshfzje_gz", totalMoney);//含税货返总金额
|
||||||
model.setValue("tqq9_hshfkyje_gz", totalMoneyAvailable);//含税货返可用金额
|
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_hsxfzje_gz", totalMoney);//含税现返总金额
|
||||||
model.setValue("tqq9_hsxfkyje_gz", totalMoneyAvailable);//含税现返可用金额
|
model.setValue("tqq9_hsxfkyje_gz", totalMoneyAvailable);//含税现返可用金额
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,7 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection(ENTRYENTITY);
|
DynamicObjectCollection dynamicObjectCollection = dataEntity.getDynamicObjectCollection(ENTRYENTITY);
|
||||||
DynamicObject dynamicObject = dynamicObjectCollection.get(rowIndex);
|
DynamicObject dynamicObject = dynamicObjectCollection.get(rowIndex);
|
||||||
DynamicObject material = dynamicObject.getDynamicObject("material");
|
DynamicObject material = dynamicObject.getDynamicObject("material");
|
||||||
|
if (material != null) {
|
||||||
DynamicObject masterid = material.getDynamicObject("masterid");
|
DynamicObject masterid = material.getDynamicObject("masterid");
|
||||||
DynamicObject bd_material = BusinessDataServiceHelper.loadSingle(masterid.getLong("id"), "bd_material");
|
DynamicObject bd_material = BusinessDataServiceHelper.loadSingle(masterid.getLong("id"), "bd_material");
|
||||||
DynamicObject org = dataEntity.getDynamicObject("org");
|
DynamicObject org = dataEntity.getDynamicObject("org");
|
||||||
|
|
@ -318,6 +319,7 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (StringUtils.equals("priceandtax", name)) {
|
if (StringUtils.equals("priceandtax", name)) {
|
||||||
ChangeData changeData = e.getChangeSet()[0];
|
ChangeData changeData = e.getChangeSet()[0];
|
||||||
int rowIndex = changeData.getRowIndex();
|
int rowIndex = changeData.getRowIndex();
|
||||||
|
|
@ -341,14 +343,14 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
String number = org.getString("number");
|
String number = org.getString("number");
|
||||||
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
DynamicObject org_fl = BusinessDataServiceHelper.loadSingle("tqq9_thirdconfig", "name",
|
||||||
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
new QFilter[]{new QFilter("number", QCP.equals, number)});
|
||||||
if(org_fl==null){
|
if (org_fl == null) {
|
||||||
this.getView().showErrorNotification("组织选择错误");
|
this.getView().showErrorNotification("组织选择错误");
|
||||||
}
|
}
|
||||||
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
String orgid_fl = org_fl != null ? org_fl.getString("name") : null;
|
||||||
HashMap<String, Object> queryMap = new HashMap<>();
|
HashMap<String, Object> queryMap = new HashMap<>();
|
||||||
String tqq9_ztsupplierid = newValue.getString("tqq9_ztsupplierid");
|
String tqq9_ztsupplierid = newValue.getString("tqq9_ztsupplierid");
|
||||||
if(StringUtils.isBlank(tqq9_ztsupplierid)){
|
if (StringUtils.isBlank(tqq9_ztsupplierid)) {
|
||||||
tqq9_ztsupplierid="0";
|
tqq9_ztsupplierid = "0";
|
||||||
}
|
}
|
||||||
queryMap.put("supplierId", tqq9_ztsupplierid);
|
queryMap.put("supplierId", tqq9_ztsupplierid);
|
||||||
queryMap.put("companyId", orgid_fl);
|
queryMap.put("companyId", orgid_fl);
|
||||||
|
|
@ -363,21 +365,21 @@ public class PuroderBillShareRefundPlugin extends AbstractBillPlugIn {
|
||||||
String type = dataMap.get("type").toString();//类型
|
String type = dataMap.get("type").toString();//类型
|
||||||
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
BigDecimal totalMoney = new BigDecimal((Double) dataMap.get("totalMoney"));//剩余总金额
|
||||||
BigDecimal totalMoneyAvailable = new BigDecimal((Double) dataMap.get("totalMoneyAvailable"));//可使用金额
|
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_hshfzje", totalMoney);//含税货返总金额
|
||||||
model.setValue("tqq9_hshfkyje", totalMoneyAvailable);//含税货返可用金额
|
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_hsxfzje", totalMoney);//含税现返总金额
|
||||||
model.setValue("tqq9_hsxfkyje", totalMoneyAvailable);//含税现返可用金额
|
model.setValue("tqq9_hsxfkyje", totalMoneyAvailable);//含税现返可用金额
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lcLogService.savelog("查询返利金额",URL,false,true, queryMap.toString(), bodyString);
|
lcLogService.savelog("查询返利金额", URL, false, true, queryMap.toString(), bodyString);
|
||||||
}
|
}
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
lcLogService.savelog("查询返利金额",URL,false,false, queryMap.toString(), "接口调用报错,无返回值");
|
lcLogService.savelog("查询返利金额", URL, false, false, queryMap.toString(), "接口调用报错,无返回值");
|
||||||
throw new RuntimeException(ex+",请求返利系统失败");
|
throw new RuntimeException(ex + ",请求返利系统失败");
|
||||||
}
|
}
|
||||||
getView().updateView();
|
getView().updateView();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ public class PurOrderPushPurRefundConverPlugin extends AbstractConvertPlugIn imp
|
||||||
|
|
||||||
}
|
}
|
||||||
BigDecimal zero = BigDecimal.ZERO;
|
BigDecimal zero = BigDecimal.ZERO;
|
||||||
|
if(im_purinblil!=null){
|
||||||
dynamicObjectCollection.clear();
|
dynamicObjectCollection.clear();
|
||||||
|
}
|
||||||
if (im_purinblil != null) {
|
if (im_purinblil != null) {
|
||||||
HashMap<String, ArrayList<BigDecimal>> map = new HashMap<>();
|
HashMap<String, ArrayList<BigDecimal>> map = new HashMap<>();
|
||||||
for (DynamicObject dynamicObject : im_purinblil) {
|
for (DynamicObject dynamicObject : im_purinblil) {
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ public class PurOrderBillRebatePlugin extends AbstractOperationServicePlugIn imp
|
||||||
Boolean data = map.getBoolean("data");
|
Boolean data = map.getBoolean("data");
|
||||||
if (data == null || !data) {
|
if (data == null || !data) {
|
||||||
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, false, queryMap.toString(), bodyString);
|
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, false, queryMap.toString(), bodyString);
|
||||||
this.getOperationResult().setMessage("采购订单:" + billno + ",删除时撤销占用金额失败");
|
this.getOperationResult().setMessage("采购订单:" + billno + ",撤销占用金额失败");
|
||||||
} else {
|
} else {
|
||||||
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, true, queryMap.toString(), bodyString);
|
lcLogService.savelog("FL-解锁返利金额", Cancel_URL, false, true, queryMap.toString(), bodyString);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue