|
@@ -87,7 +87,7 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
if (payeenamev == null || payeenamev.isEmpty()) {
|
|
if (payeenamev == null || payeenamev.isEmpty()) {
|
|
throw new KDBizException("收款处理付款人为空!");
|
|
throw new KDBizException("收款处理付款人为空!");
|
|
}
|
|
}
|
|
- if("cysgzmx".equals(controls)) {
|
|
|
|
|
|
+ if ("cysgzmx".equals(controls)) {
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
//历史数据清除
|
|
//历史数据清除
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
@@ -124,23 +124,45 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
this.getModel().setValue("nckd_cysgzbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cysgzbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cyscxbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cyscxbalance", settleamount, rowIndex);
|
|
//分录数据
|
|
//分录数据
|
|
- if(eMaterial!=null){this.getModel().setValue("nckd_materielfield", eMaterial, rowIndex);}
|
|
|
|
- if(eExpenseitem!=null){this.getModel().setValue("nckd_cysfyxm", eExpenseitem, rowIndex);}
|
|
|
|
- if(settleorg!=null){this.getModel().setValue("nckd_cyssection", settleorg, rowIndex);}
|
|
|
|
- if(eActamt!=null){this.getModel().setValue("nckd_cyssfje", eActamt, rowIndex);}
|
|
|
|
- if(costcenter!=null){this.getModel().setValue("nckd_costcenter", costcenter, rowIndex);}
|
|
|
|
- if(productline!=null){this.getModel().setValue("nckd_productline", productline, rowIndex);}
|
|
|
|
- if(eDiscountamt!=null){this.getModel().setValue("nckd_e_discountamt", eDiscountamt, rowIndex);}
|
|
|
|
- if(project!=null){this.getModel().setValue("nckd_project", project, rowIndex);}
|
|
|
|
- if(eFundflowitem!=null){this.getModel().setValue("nckd_e_fundflowitem", eFundflowitem, rowIndex);}
|
|
|
|
- if(contractnumber!=null){this.getModel().setValue("nckd_contractnumber", contractnumber, rowIndex);}
|
|
|
|
|
|
+ if (eMaterial != null) {
|
|
|
|
+ this.getModel().setValue("nckd_materielfield", eMaterial, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (eExpenseitem != null) {
|
|
|
|
+ this.getModel().setValue("nckd_cysfyxm", eExpenseitem, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (settleorg != null) {
|
|
|
|
+ this.getModel().setValue("nckd_cyssection", settleorg, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (eActamt != null) {
|
|
|
|
+ this.getModel().setValue("nckd_cyssfje", eActamt, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (costcenter != null) {
|
|
|
|
+ this.getModel().setValue("nckd_costcenter", costcenter, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (productline != null) {
|
|
|
|
+ this.getModel().setValue("nckd_productline", productline, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (eDiscountamt != null) {
|
|
|
|
+ this.getModel().setValue("nckd_e_discountamt", eDiscountamt, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (project != null) {
|
|
|
|
+ this.getModel().setValue("nckd_project", project, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (eFundflowitem != null) {
|
|
|
|
+ this.getModel().setValue("nckd_e_fundflowitem", eFundflowitem, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (contractnumber != null) {
|
|
|
|
+ this.getModel().setValue("nckd_contractnumber", contractnumber, rowIndex);
|
|
|
|
+ }
|
|
//将选中的数据放到缓存中
|
|
//将选中的数据放到缓存中
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
obj.put("nckd_cysnumber", billno);
|
|
obj.put("nckd_cysnumber", billno);
|
|
obj.put("nckd_cysdata", bizdate);
|
|
obj.put("nckd_cysdata", bizdate);
|
|
- if(eExpenseitem!=null){
|
|
|
|
|
|
+ if (eExpenseitem != null) {
|
|
obj.put("nckd_cysfyxm", eExpenseitem.getString("number"));
|
|
obj.put("nckd_cysfyxm", eExpenseitem.getString("number"));
|
|
- }else { obj.put("nckd_cysfyxm", "");}
|
|
|
|
|
|
+ } else {
|
|
|
|
+ obj.put("nckd_cysfyxm", "");
|
|
|
|
+ }
|
|
obj.put("nckd_cysgzbalance", settleamount);
|
|
obj.put("nckd_cysgzbalance", settleamount);
|
|
obj.put("controls", controls);
|
|
obj.put("controls", controls);
|
|
obj.put("billtype", billtype);
|
|
obj.put("billtype", billtype);
|
|
@@ -152,7 +174,7 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
String pageId = this.getView().getPageId();
|
|
String pageId = this.getView().getPageId();
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
this.getPageCache().put(pageId, listStr);
|
|
this.getPageCache().put(pageId, listStr);
|
|
- }else if("cyfgzmx".equals(controls)){
|
|
|
|
|
|
+ } else if ("cyfgzmx".equals(controls)) {
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
//历史数据清除
|
|
//历史数据清除
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
@@ -186,13 +208,21 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
this.getModel().setValue("nckd_cyfgzbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cyfgzbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cyfcxbalance", settleamount, rowIndex);
|
|
this.getModel().setValue("nckd_cyfcxbalance", settleamount, rowIndex);
|
|
//分录字段
|
|
//分录字段
|
|
- if(material!=null){this.getModel().setValue("nckd_materielfield",material , rowIndex);}
|
|
|
|
|
|
+ if (material != null) {
|
|
|
|
+ this.getModel().setValue("nckd_materielfield", material, rowIndex);
|
|
|
|
+ }
|
|
this.getModel().setValue("nckd_spectype", spectype, rowIndex);
|
|
this.getModel().setValue("nckd_spectype", spectype, rowIndex);
|
|
- if(expenseitem!=null){this.getModel().setValue("nckd_expenseitem",expenseitem , rowIndex);}
|
|
|
|
- if(measureunit!=null){this.getModel().setValue("nckd_measureunit",measureunit , rowIndex);}
|
|
|
|
- this.getModel().setValue("nckd_quantity",quantity , rowIndex);
|
|
|
|
- this.getModel().setValue("nckd_price",price , rowIndex);
|
|
|
|
- if(taxrateid!=null){this.getModel().setValue("nckd_taxrateid",taxrateid , rowIndex);}
|
|
|
|
|
|
+ if (expenseitem != null) {
|
|
|
|
+ this.getModel().setValue("nckd_expenseitem", expenseitem, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ if (measureunit != null) {
|
|
|
|
+ this.getModel().setValue("nckd_measureunit", measureunit, rowIndex);
|
|
|
|
+ }
|
|
|
|
+ this.getModel().setValue("nckd_quantity", quantity, rowIndex);
|
|
|
|
+ this.getModel().setValue("nckd_price", price, rowIndex);
|
|
|
|
+ if (taxrateid != null) {
|
|
|
|
+ this.getModel().setValue("nckd_taxrateid", taxrateid, rowIndex);
|
|
|
|
+ }
|
|
this.getModel().setValue("nckd_discountmode", discountmode, rowIndex);
|
|
this.getModel().setValue("nckd_discountmode", discountmode, rowIndex);
|
|
//将选中的数据放到缓存中
|
|
//将选中的数据放到缓存中
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
@@ -200,20 +230,21 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
obj.put("nckd_cyfwldw", "");
|
|
obj.put("nckd_cyfwldw", "");
|
|
obj.put("nckd_cyfdata", bizdate);
|
|
obj.put("nckd_cyfdata", bizdate);
|
|
obj.put("nckd_cyfgzbalance", settleamount);
|
|
obj.put("nckd_cyfgzbalance", settleamount);
|
|
- if(expenseitem!=null){
|
|
|
|
|
|
+ if (expenseitem != null) {
|
|
obj.put("nckd_cyffyxm", expenseitem.getString("number"));
|
|
obj.put("nckd_cyffyxm", expenseitem.getString("number"));
|
|
- }else { obj.put("nckd_cyffyxm", "");}
|
|
|
|
|
|
+ } else {
|
|
|
|
+ obj.put("nckd_cyffyxm", "");
|
|
|
|
+ }
|
|
obj.put("controls", controls);
|
|
obj.put("controls", controls);
|
|
obj.put("billtype", billtype);
|
|
obj.put("billtype", billtype);
|
|
resdate.add(obj);
|
|
resdate.add(obj);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
String pageId = this.getView().getPageId();
|
|
String pageId = this.getView().getPageId();
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
this.getPageCache().put(pageId, listStr);
|
|
this.getPageCache().put(pageId, listStr);
|
|
- }else if ("pzht".equals(controls)) {
|
|
|
|
|
|
+ } else if ("pzht".equals(controls)) {
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
List<JSONObject> resdate = new ArrayList<>();
|
|
//历史数据清除
|
|
//历史数据清除
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
this.getModel().deleteEntryData("nckd_entryentity");
|
|
@@ -221,12 +252,12 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
QFilter nckd_orgamountFilter = new QFilter("org.number", QCP.equals, payeenamev);
|
|
QFilter nckd_orgamountFilter = new QFilter("org.number", QCP.equals, payeenamev);
|
|
nckd_orgamountFilter.and("status", QCP.equals, "C");
|
|
nckd_orgamountFilter.and("status", QCP.equals, "C");
|
|
nckd_orgamountFilter.and("nckd_amountfield1", QCP.large_than, new BigDecimal(0));
|
|
nckd_orgamountFilter.and("nckd_amountfield1", QCP.large_than, new BigDecimal(0));
|
|
- nckd_orgamountFilter.and("nckd_amountfield1", QCP.is_notnull,"");
|
|
|
|
|
|
+ nckd_orgamountFilter.and("nckd_amountfield1", QCP.is_notnull, "");
|
|
DynamicObject[] fa_lease_contract = BusinessDataServiceHelper.load("fa_lease_contract", "id", new QFilter[]{nckd_orgamountFilter});
|
|
DynamicObject[] fa_lease_contract = BusinessDataServiceHelper.load("fa_lease_contract", "id", new QFilter[]{nckd_orgamountFilter});
|
|
for (int c = 0; c < fa_lease_contract.length; c++) {
|
|
for (int c = 0; c < fa_lease_contract.length; c++) {
|
|
//当前单头
|
|
//当前单头
|
|
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(fa_lease_contract[c].getPkValue(), fa_lease_contract[c].getDynamicObjectType().getName());
|
|
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(fa_lease_contract[c].getPkValue(), fa_lease_contract[c].getDynamicObjectType().getName());
|
|
- //核算组织
|
|
|
|
|
|
+ //核算组织
|
|
DynamicObject org = dynamicObject.getDynamicObject("org");
|
|
DynamicObject org = dynamicObject.getDynamicObject("org");
|
|
//合同号
|
|
//合同号
|
|
String number = dynamicObject.getString("number");
|
|
String number = dynamicObject.getString("number");
|
|
@@ -264,13 +295,69 @@ public class BusinessProcessingPlugin extends AbstractFormPlugin implements Plug
|
|
obj.put("billtype", billtype);
|
|
obj.put("billtype", billtype);
|
|
resdate.add(obj);
|
|
resdate.add(obj);
|
|
}
|
|
}
|
|
-
|
|
|
|
String pageId = this.getView().getPageId();
|
|
String pageId = this.getView().getPageId();
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
String listStr = SerializationUtils.toJsonString(resdate);
|
|
this.getPageCache().put(pageId, listStr);
|
|
this.getPageCache().put(pageId, listStr);
|
|
|
|
+ } else if ("skskzh".equals(controls)) {
|
|
|
|
+ List<JSONObject> resdate = new ArrayList<>();
|
|
|
|
+ //历史数据清除
|
|
|
|
+ this.getModel().deleteEntryData("nckd_entryentity");
|
|
|
|
+ //构建查询供应商参数
|
|
|
|
+ QFilter nckd_orgamountFilter = new QFilter("number", QCP.equals, payeenamev);
|
|
|
|
+ DynamicObject[] fa_lease_contract = BusinessDataServiceHelper.load("bd_supplier", "id", new QFilter[]{nckd_orgamountFilter});
|
|
|
|
+ for (int c = 0; c < fa_lease_contract.length; c++) {
|
|
|
|
+ //当前单头
|
|
|
|
+ DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(fa_lease_contract[c].getPkValue(), fa_lease_contract[c].getDynamicObjectType().getName());
|
|
|
|
+ for (DynamicObject entryentity : dynamicObject.getDynamicObjectCollection("entry_bank")) {
|
|
|
|
+ String bankaccount = entryentity.getString("bankaccount");
|
|
|
|
+ String accountname = entryentity.getString("accountname");
|
|
|
|
+ int rowIndex = this.getModel().createNewEntryRow("nckd_entryentity");
|
|
|
|
+ //赋值给新增分录
|
|
|
|
+ this.getModel().setValue("nckd_bankaccount", bankaccount, rowIndex);
|
|
|
|
+ this.getModel().setValue("nckd_accountname", accountname, rowIndex);
|
|
|
|
+ //将选中的数据放到缓存中
|
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
|
+ obj.put("nckd_bankaccount", bankaccount);
|
|
|
|
+ obj.put("nckd_accountname", accountname);
|
|
|
|
+ obj.put("controls", controls);
|
|
|
|
+ obj.put("billtype", billtype);
|
|
|
|
+ resdate.add(obj);
|
|
|
|
+ }
|
|
|
|
+ String pageId = this.getView().getPageId();
|
|
|
|
+ String listStr = SerializationUtils.toJsonString(resdate);
|
|
|
|
+ this.getPageCache().put(pageId, listStr);
|
|
|
|
+ }
|
|
|
|
+ }else if ("fkfkzh".equals(controls)) {
|
|
|
|
+ List<JSONObject> resdate = new ArrayList<>();
|
|
|
|
+ //历史数据清除
|
|
|
|
+ this.getModel().deleteEntryData("nckd_entryentity");
|
|
|
|
+ //构建查询供应商参数
|
|
|
|
+ QFilter nckd_orgamountFilter = new QFilter("number", QCP.equals, payeenamev);
|
|
|
|
+ DynamicObject[] fa_lease_contract = BusinessDataServiceHelper.load("bd_supplier", "id", new QFilter[]{nckd_orgamountFilter});
|
|
|
|
+ for (int c = 0; c < fa_lease_contract.length; c++) {
|
|
|
|
+ //当前单头
|
|
|
|
+ DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(fa_lease_contract[c].getPkValue(), fa_lease_contract[c].getDynamicObjectType().getName());
|
|
|
|
+ for (DynamicObject entryentity : dynamicObject.getDynamicObjectCollection("entry_bank")) {
|
|
|
|
+ String bankaccount = entryentity.getString("bankaccount");
|
|
|
|
+ String accountname = entryentity.getString("accountname");
|
|
|
|
+ int rowIndex = this.getModel().createNewEntryRow("nckd_entryentity");
|
|
|
|
+ //赋值给新增分录
|
|
|
|
+ this.getModel().setValue("nckd_bankaccount", bankaccount, rowIndex);
|
|
|
|
+ this.getModel().setValue("nckd_accountname", accountname, rowIndex);
|
|
|
|
+ //将选中的数据放到缓存中
|
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
|
+ obj.put("nckd_bankaccount", bankaccount);
|
|
|
|
+ obj.put("nckd_accountname", accountname);
|
|
|
|
+ obj.put("controls", controls);
|
|
|
|
+ obj.put("billtype", billtype);
|
|
|
|
+ resdate.add(obj);
|
|
|
|
+ }
|
|
|
|
+ String pageId = this.getView().getPageId();
|
|
|
|
+ String listStr = SerializationUtils.toJsonString(resdate);
|
|
|
|
+ this.getPageCache().put(pageId, listStr);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|