|
@@ -10,6 +10,7 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
import kd.bos.dataentity.metadata.IMetadata;
|
|
|
import kd.bos.dataentity.metadata.dynamicobject.DynamicObjectType;
|
|
|
import kd.bos.db.DB;
|
|
|
+import kd.bos.entity.operate.OperateOptionConst;
|
|
|
import kd.bos.entity.operate.result.OperateErrorInfo;
|
|
|
import kd.bos.entity.operate.result.OperationResult;
|
|
|
import kd.bos.entity.validate.ValidateResult;
|
|
@@ -350,11 +351,15 @@ public class MaterialAddNewApi {
|
|
|
}
|
|
|
//执行新增
|
|
|
if (real_add_entrys.length > 0) {
|
|
|
+ OperateOption option=OperateOption.create();
|
|
|
+ //传入自定义参数
|
|
|
+ //设置该操作已经验权,无需再次验权
|
|
|
+ option.setVariableValue(OperateOptionConst.ISHASRIGHT,"true");
|
|
|
OperationResult result_submit = OperationServiceHelper.executeOperate("submit", bizInfoFormId,
|
|
|
- real_add_entrys, OperateOption.create());
|
|
|
+ real_add_entrys, option);
|
|
|
if (result_submit.isSuccess()) {
|
|
|
OperationResult result_audit = OperationServiceHelper.executeOperate("audit", bizInfoFormId,
|
|
|
- real_add_entrys, OperateOption.create());
|
|
|
+ real_add_entrys, option);
|
|
|
if (!result_audit.isSuccess()) {
|
|
|
resultData.put("errors", bizInfoFormId+"审核失败");
|
|
|
}
|
|
@@ -480,13 +485,18 @@ public class MaterialAddNewApi {
|
|
|
if (real_update_entrys.length > 0) {
|
|
|
SaveServiceHelper.update(real_update_entrys);
|
|
|
}
|
|
|
+
|
|
|
+ OperateOption option=OperateOption.create();
|
|
|
+ //传入自定义参数
|
|
|
+ //设置该操作已经验权,无需再次验权
|
|
|
+ option.setVariableValue(OperateOptionConst.ISHASRIGHT,"true");
|
|
|
//执行新增
|
|
|
if (real_add_entrys.length > 0) {
|
|
|
OperationResult result_submit = OperationServiceHelper.executeOperate("submit", "pznm_materialzm",
|
|
|
- real_add_entrys, OperateOption.create());
|
|
|
+ real_add_entrys, option);
|
|
|
if (result_submit.isSuccess()) {
|
|
|
OperationResult result_audit = OperationServiceHelper.executeOperate("audit", "pznm_materialzm",
|
|
|
- real_add_entrys, OperateOption.create());
|
|
|
+ real_add_entrys, option);
|
|
|
if (!result_audit.isSuccess()) {
|
|
|
resultData.put("errors", "pznm_materialzm"+"审核失败");
|
|
|
}
|
|
@@ -499,11 +509,15 @@ public class MaterialAddNewApi {
|
|
|
}
|
|
|
|
|
|
private void doAddNew(Map resultData, DynamicObject material) {
|
|
|
+ OperateOption option=OperateOption.create();
|
|
|
+ //传入自定义参数
|
|
|
+ //设置该操作已经验权,无需再次验权
|
|
|
+ option.setVariableValue(OperateOptionConst.ISHASRIGHT,"true");
|
|
|
OperationResult result_submit = OperationServiceHelper.executeOperate("submit", "bd_customer",
|
|
|
- new DynamicObject[]{material}, OperateOption.create());
|
|
|
+ new DynamicObject[]{material}, option);
|
|
|
if (result_submit.isSuccess()) {
|
|
|
OperationResult result_audit = OperationServiceHelper.executeOperate("audit", "bd_customer",
|
|
|
- new DynamicObject[]{material}, OperateOption.create());
|
|
|
+ new DynamicObject[]{material}, option);
|
|
|
//执行客户对应组织分配
|
|
|
if (result_audit.isSuccess()) {//保存客户成功
|
|
|
resultData.put("errors", null);
|