parent
e1aa939606
commit
44c67e65b4
|
@ -6,13 +6,18 @@ import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
||||||
|
import kd.bos.logging.Log;
|
||||||
|
import kd.bos.logging.LogFactory;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
import shkd.sys.sys.plugin.report.FinanceReportPlugin;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class BankSaveOP extends AbstractOperationServicePlugIn {
|
public class BankSaveOP extends AbstractOperationServicePlugIn {
|
||||||
|
private static final Log logger = LogFactory.getLog(BankSaveOP.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
||||||
|
@ -26,13 +31,21 @@ public class BankSaveOP extends AbstractOperationServicePlugIn {
|
||||||
|
|
||||||
|
|
||||||
if("banksave".equals(e.getOperationKey()) ) { //按钮操作编码
|
if("banksave".equals(e.getOperationKey()) ) { //按钮操作编码
|
||||||
|
logger.info("进入banksavef方法");
|
||||||
|
List<String> ids = Arrays.stream(dataEntities) // 将数组转换为 Stream
|
||||||
|
.map(entity -> (String) entity.get("billno")) // 提取每个元素的 id
|
||||||
|
.collect(Collectors.toList()); // 收集到 List 中
|
||||||
|
logger.info("入参:"+ids.toString());
|
||||||
if(dataEntities != null && dataEntities.length != 0) {
|
if(dataEntities != null && dataEntities.length != 0) {
|
||||||
|
|
||||||
for(int i = 0;i < dataEntities.length;i ++) {
|
for(int i = 0;i < dataEntities.length;i ++) {
|
||||||
|
|
||||||
DynamicObject dynamicObject = dataEntities[i];
|
DynamicObject dynamicObject = dataEntities[i];
|
||||||
dynamicObject.set("kdretflag", null); //数据赋值
|
try {
|
||||||
|
dynamicObject.set("kdretflag", null); //数据赋值
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.info("进入banksavef方法赋值失败");
|
||||||
|
}
|
||||||
|
|
||||||
if(dynamicObject != null) {
|
if(dynamicObject != null) {
|
||||||
//通过基础资料或单据标识 的id 获取数据
|
//通过基础资料或单据标识 的id 获取数据
|
||||||
|
|
Loading…
Reference in New Issue