|
|
@@ -7,6 +7,7 @@ import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
|
|
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
|
|
import kd.bos.entity.validate.AbstractValidator;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
+import nckd.jxccl.base.common.utils.ConvertUtil;
|
|
|
import nckd.jxccl.swc.mas.common.SubCoHeadServiceConstant;
|
|
|
|
|
|
import java.util.Date;
|
|
|
@@ -22,7 +23,8 @@ public class SubCoHeadServiceOpPlugin extends AbstractOperationServicePlugIn imp
|
|
|
|
|
|
@Override
|
|
|
public void onAddValidators(AddValidatorsEventArgs e) {
|
|
|
-
|
|
|
+ //通过“载入党政职务履历”
|
|
|
+ Boolean isLoad = ConvertUtil.toBoolean(this.getOption().getVariableValue("load", "false"));
|
|
|
e.addValidator(new AbstractValidator() {
|
|
|
|
|
|
@Override
|
|
|
@@ -31,12 +33,13 @@ public class SubCoHeadServiceOpPlugin extends AbstractOperationServicePlugIn imp
|
|
|
for (ExtendedDataEntity dataEntity : this.getDataEntities()) {
|
|
|
DynamicObject data = dataEntity.getDataEntity();
|
|
|
Date startDate = data.getDate(SubCoHeadServiceConstant.NCKD_STARTDATE);
|
|
|
- /*if(startDate == null){
|
|
|
- this.addWarningMessage(dataEntity,"");
|
|
|
+ if(startDate == null){
|
|
|
+ if(isLoad){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.addWarningMessage(dataEntity,"");
|
|
|
+ }
|
|
|
}
|
|
|
- for (int i = 0; i < 20;i++){
|
|
|
- this.addErrorMessage(dataEntity,"错误"+i);
|
|
|
- }*/
|
|
|
|
|
|
}
|
|
|
|