|
|
@@ -1,9 +1,12 @@
|
|
|
package nckd.jxccl.sit.hcsi.opplugin.web.tp;
|
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
+import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
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.entity.plugin.args.BeginOperationTransactionArgs;
|
|
|
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
import kd.swc.hsbp.business.servicehelper.SWCDataServiceHelper;
|
|
|
@@ -28,6 +31,39 @@ public class SinsurTempDataOpPlugin extends AbstractOperationServicePlugIn imple
|
|
|
super.onPreparePropertys(e);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void beginOperationTransaction(BeginOperationTransactionArgs e) {
|
|
|
+ super.beginOperationTransaction(e);
|
|
|
+ String key = e.getOperationKey();
|
|
|
+ switch(key) {
|
|
|
+ case "submit":
|
|
|
+ doUpper(e);
|
|
|
+ break;
|
|
|
+ case "save":
|
|
|
+ doUpper(e);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对应列转换成大写
|
|
|
+ * @param e
|
|
|
+ */
|
|
|
+ private void doUpper(BeginOperationTransactionArgs e) {
|
|
|
+ DynamicObject[] bills = e.getDataEntities();
|
|
|
+ for (DynamicObject bill : bills) {
|
|
|
+ DynamicObjectCollection entryCols = bill.getDynamicObjectCollection("nckd_sinsurtplentry");
|
|
|
+ for(DynamicObject entry : entryCols) {
|
|
|
+ entry.set("nckd_matchcolumn", entry.getString("nckd_matchcolumn").toUpperCase());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onAddValidators(AddValidatorsEventArgs e) {
|
|
|
+ super.onAddValidators(e);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void endOperationTransaction(EndOperationTransactionArgs e) {
|
|
|
super.endOperationTransaction(e);
|