|
|
@@ -70,18 +70,12 @@ public class CancelContractAfterEffectOpPlugin extends AbstractOperationServiceP
|
|
|
|
|
|
DynamicObject[] dataEntites = e.getDataEntities();
|
|
|
List<DynamicObject> transferData = Arrays.stream(dataEntites).filter(data -> data.getBoolean(TransferApplyBillConstant.NCKD_ISTERMORIGCONT_KEY)).collect(Collectors.toList());
|
|
|
- List<DynamicObject> cancelConstractDyoList = new ArrayList<DynamicObject>();
|
|
|
+ List<DynamicObject> cancelContractDyoList = new ArrayList<DynamicObject>();
|
|
|
for (DynamicObject data : transferData) {
|
|
|
- cancelConstractDyoList.add(buildContract(data));
|
|
|
- }
|
|
|
-
|
|
|
- OperationResult operationResult;
|
|
|
- try {
|
|
|
- operationResult = SaveServiceHelper.saveOperate(TransferApplyBillConstant.HLCM_CONTRACTAPPLYCANCEL_ENTITY, cancelConstractDyoList.toArray(new DynamicObject[0]));
|
|
|
- } catch (KDException ex) {
|
|
|
- throw new KDBizException(new ErrorCode(ex.getErrorCode().getCode(), ex.getErrorCode().getMessage()), ex.getCause());
|
|
|
+ cancelContractDyoList.add(buildContract(data));
|
|
|
}
|
|
|
|
|
|
+ OperationResult operationResult = SaveServiceHelper.saveOperate(TransferApplyBillConstant.HLCM_CONTRACTAPPLYCANCEL_ENTITY, cancelContractDyoList.toArray(new DynamicObject[0]));
|
|
|
if (!operationResult.isSuccess()) {
|
|
|
List<String> errorMsgList = new ArrayList<String>();
|
|
|
for (IOperateInfo operateInfo : operationResult.getAllErrorOrValidateInfo()) {
|
|
|
@@ -314,6 +308,7 @@ public class CancelContractAfterEffectOpPlugin extends AbstractOperationServiceP
|
|
|
return currIdHisIdMap;
|
|
|
}
|
|
|
|
|
|
+ // from: kd.hr.hlcm.business.infrastructure.client.hbpm.impl.HbpmServiceImpl.filterEmpty
|
|
|
private void filterEmpty(List<Long> ids) {
|
|
|
log.info("before filter ids|{}", ids);
|
|
|
ids.removeIf((id) -> id == null || id == 0L);
|