Compare commits
2 Commits
4aea6fc7c6
...
b44cf36cbb
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b44cf36cbb | ||
![]() |
959c38cc29 |
@ -1,14 +1,38 @@
|
||||
package com.yem.wm.es.declaredocx.op;
|
||||
|
||||
import com.yem.wm.es.declaredocx.validator.DeclareDocxSubmitValidator;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
public class DeclareDocxSubmitOp extends AbstractOperationServicePlugIn {
|
||||
|
||||
@Override
|
||||
public void onPreparePropertys(PreparePropertysEventArgs e) {
|
||||
super.onPreparePropertys(e);
|
||||
e.getFieldKeys().addAll(this.billEntityType.getAllFields().keySet());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAddValidators(AddValidatorsEventArgs e) {
|
||||
super.onAddValidators(e);
|
||||
e.addValidator(new DeclareDocxSubmitValidator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
DynamicObject[] eDataEntities = e.getDataEntities();
|
||||
for (DynamicObject eDataEntity : eDataEntities) {
|
||||
String yemQuotation = eDataEntity.getString("yem_quotation");
|
||||
if ("".equals(yemQuotation)) {
|
||||
eDataEntity.set("yem_quotation", "0");
|
||||
}
|
||||
}
|
||||
SaveServiceHelper.save(eDataEntities);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
package com.yem.wm.es.exportinvoice.op;
|
||||
|
||||
import com.yem.wm.es.exportinvoice.validator.ExportInvoiceSubmitValidator;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||
|
||||
import java.util.List;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
|
||||
/**
|
||||
* @author xwudd
|
||||
@ -24,5 +25,16 @@ public class ExportInvoiceSubmitOp extends AbstractOperationServicePlugIn {
|
||||
super.onAddValidators(e);
|
||||
e.addValidator(new ExportInvoiceSubmitValidator());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
||||
super.afterExecuteOperationTransaction(e);
|
||||
DynamicObject[] eDataEntities = e.getDataEntities();
|
||||
for (DynamicObject eDataEntity : eDataEntities) {
|
||||
String yemQuotation = eDataEntity.getString("yem_quotation");
|
||||
if ("".equals(yemQuotation)) {
|
||||
eDataEntity.set("yem_quotation", "0");
|
||||
}
|
||||
}
|
||||
SaveServiceHelper.save(eDataEntities);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user