提交人:邹江涛

提交时间:2026年01月12日
提交内容:内部账户对账单代码调整
This commit is contained in:
root 2026-01-12 18:20:09 +08:00
parent f7cb5c36ec
commit 9a013c9e20
1 changed files with 85 additions and 28 deletions

View File

@ -184,7 +184,14 @@ public class JszxdzdListPlugin extends AbstractListPlugin implements Plugin {
} }
this.getView().showSuccessNotification("更新成功"); this.getView().showSuccessNotification("更新成功");
this.getView().invokeOperation("refresh"); this.getView().invokeOperation("refresh");
} else if ("shkd_confirmre".equals(itemKey)) { } else if ("shkd_confirmre".equals(itemKey) || "shkd_parentconfirmre".equals(itemKey)) {
// 获取勾选的单据ID
BillList billList = this.getControl("billlistap");
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if (CollectionUtils.isEmpty(selectedRows)) {
return;
}
String msg = "是否确认对账"; String msg = "是否确认对账";
// 详细消息 // 详细消息
// String detail = "消息体\r\nmessage body..."; // String detail = "消息体\r\nmessage body...";
@ -194,11 +201,25 @@ public class JszxdzdListPlugin extends AbstractListPlugin implements Plugin {
// 确认提示类型 // 确认提示类型
// Default:默认提示 Save:保存提交类提示 Delete:删除类提示 Wait:等待类提示 Fail:失败类提示 // Default:默认提示 Save:保存提交类提示 Delete:删除类提示 Wait:等待类提示 Fail:失败类提示
ConfirmTypes confirmTypes = ConfirmTypes.Default; ConfirmTypes confirmTypes = ConfirmTypes.Default;
// 确认框回调 新建 确认 回复 监听器对象
ConfirmCallBackListener confirmCallBackListener = new ConfirmCallBackListener("confirmre", this); ConfirmCallBackListener confirmCallBackListener;
if ("shkd_confirmre".equals(itemKey)) {
// 确认框回调 新建 确认 回复 监听器对象
confirmCallBackListener = new ConfirmCallBackListener("confirmre", this);
}else {
// 确认框回调 新建 确认 回复 监听器对象
confirmCallBackListener = new ConfirmCallBackListener("parentconfirmre", this);
}
// 显示弹窗 // 显示弹窗
this.getView().showConfirm(msg, options, confirmTypes, confirmCallBackListener); this.getView().showConfirm(msg, options, confirmTypes, confirmCallBackListener);
} else if ("shkd_cancelre".equals(itemKey)) { } else if ("shkd_cancelre".equals(itemKey) || "shkd_parentcancelre".equals(itemKey)) {
// 获取勾选的单据ID
BillList billList = this.getControl("billlistap");
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if (CollectionUtils.isEmpty(selectedRows)) {
return;
}
String msg = "是否取消对账"; String msg = "是否取消对账";
// 详细消息 // 详细消息
// String detail = "消息体\r\nmessage body..."; // String detail = "消息体\r\nmessage body...";
@ -209,8 +230,15 @@ public class JszxdzdListPlugin extends AbstractListPlugin implements Plugin {
// Default:默认提示 Save:保存提交类提示 Delete:删除类提示 Wait:等待类提示 Fail:失败类提示 // Default:默认提示 Save:保存提交类提示 Delete:删除类提示 Wait:等待类提示 Fail:失败类提示
ConfirmTypes confirmTypes = ConfirmTypes.Default; ConfirmTypes confirmTypes = ConfirmTypes.Default;
// 确认框回调 新建 确认 回复 监听器对象 ConfirmCallBackListener confirmCallBackListener;
ConfirmCallBackListener confirmCallBackListener = new ConfirmCallBackListener("cancelre", this); if ("shkd_cancelre".equals(itemKey)) {
// 确认框回调 新建 确认 回复 监听器对象
confirmCallBackListener = new ConfirmCallBackListener("cancelre", this);
}else {
// 确认框回调 新建 确认 回复 监听器对象
confirmCallBackListener = new ConfirmCallBackListener("parentcancelre", this);
}
// 显示弹窗 // 显示弹窗
this.getView().showConfirm(msg, options, confirmTypes, confirmCallBackListener); this.getView().showConfirm(msg, options, confirmTypes, confirmCallBackListener);
@ -228,44 +256,73 @@ public class JszxdzdListPlugin extends AbstractListPlugin implements Plugin {
// 获取勾选的单据ID // 获取勾选的单据ID
BillList billList = this.getControl("billlistap"); BillList billList = this.getControl("billlistap");
ListSelectedRowCollection selectedRows = billList.getSelectedRows(); ListSelectedRowCollection selectedRows = billList.getSelectedRows();
Set<Long> setIds = new HashSet<>();
if (CollectionUtils.isNotEmpty(selectedRows)) { if (CollectionUtils.isNotEmpty(selectedRows)) {
Set<Long> setIds = new HashSet<>();
for (ListSelectedRow selectedRow : selectedRows) { for (ListSelectedRow selectedRow : selectedRows) {
setIds.add(toLong(selectedRow.getPrimaryKeyValue())); setIds.add(toLong(selectedRow.getPrimaryKeyValue()));
} }
} else { List<Long> longs = new ArrayList<>(setIds);
this.getView().showTipNotification("请选择至少一条数据"); for (Long aLong : longs) {
return; DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId);
dynamicObject.set("shkd_sfyz", true);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
this.getView().invokeOperation("refresh");
} }
List<Long> longs = new ArrayList<>(setIds);
for (Long aLong : longs) {
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId);
dynamicObject.set("shkd_sfyz", true);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
this.getView().invokeOperation("refresh");
} else if (evt.getResult() == MessageBoxResult.Yes && "cancelre".equals(callBackId)) { } else if (evt.getResult() == MessageBoxResult.Yes && "cancelre".equals(callBackId)) {
String billFormId = ((IListView) this.getView()).getBillFormId(); String billFormId = ((IListView) this.getView()).getBillFormId();
// 获取勾选的单据ID // 获取勾选的单据ID
BillList billList = this.getControl("billlistap"); BillList billList = this.getControl("billlistap");
ListSelectedRowCollection selectedRows = billList.getSelectedRows(); ListSelectedRowCollection selectedRows = billList.getSelectedRows();
Set<Long> setIds = new HashSet<>();
if (CollectionUtils.isNotEmpty(selectedRows)) { if (CollectionUtils.isNotEmpty(selectedRows)) {
Set<Long> setIds = new HashSet<>();
for (ListSelectedRow selectedRow : selectedRows) { for (ListSelectedRow selectedRow : selectedRows) {
setIds.add(toLong(selectedRow.getPrimaryKeyValue())); setIds.add(toLong(selectedRow.getPrimaryKeyValue()));
} }
} else { List<Long> longs = new ArrayList<>(setIds);
this.getView().showTipNotification("请选择至少一条数据"); for (Long aLong : longs) {
return; DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId);
dynamicObject.set("shkd_sfyz", false);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
this.getView().invokeOperation("refresh");
} }
List<Long> longs = new ArrayList<>(setIds); } else if ( evt.getResult() == MessageBoxResult.Yes && "parentconfirmre".equals(callBackId)) {
for (Long aLong : longs) { String billFormId = ((IListView) this.getView()).getBillFormId();
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId); // 获取勾选的单据ID
dynamicObject.set("shkd_sfyz", false); BillList billList = this.getControl("billlistap");
SaveServiceHelper.save(new DynamicObject[]{dynamicObject}); ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if (CollectionUtils.isNotEmpty(selectedRows)) {
Set<Long> setIds = new HashSet<>();
for (ListSelectedRow selectedRow : selectedRows) {
setIds.add(toLong(selectedRow.getPrimaryKeyValue()));
}
List<Long> longs = new ArrayList<>(setIds);
for (Long aLong : longs) {
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId);
dynamicObject.set("shkd_parentsfyz", true);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
this.getView().invokeOperation("refresh");
}
} else if ( evt.getResult() == MessageBoxResult.Yes && "parentcancelre".equals(callBackId)) {
String billFormId = ((IListView) this.getView()).getBillFormId();
// 获取勾选的单据ID
BillList billList = this.getControl("billlistap");
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
if (CollectionUtils.isNotEmpty(selectedRows)) {
Set<Long> setIds = new HashSet<>();
for (ListSelectedRow selectedRow : selectedRows) {
setIds.add(toLong(selectedRow.getPrimaryKeyValue()));
}
List<Long> longs = new ArrayList<>(setIds);
for (Long aLong : longs) {
DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(aLong, billFormId);
dynamicObject.set("shkd_parentsfyz", false);
SaveServiceHelper.save(new DynamicObject[]{dynamicObject});
}
this.getView().invokeOperation("refresh");
} }
this.getView().invokeOperation("refresh");
} }
} }