//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package nc.impl.pu.m23.maintain.action;

import nc.bs.mmpac.pmo.pac0002.bp.rule.saveBeforeCheckRule;
import nc.bs.mmpac.pmo.pac0002.flowbiz.PMOCommitFlowCheckRule;
import nc.bs.pu.m23.maintain.ArriveUpdateBP;
import nc.bs.pu.m23.plugin.ArriveActionPlugInPoint;
import nc.impl.pu.m23.maintain.rule.CheckBillDateRule;
import nc.impl.pubapp.pattern.rule.processer.AroundProcesser;
import nc.impl.pubapp.pattern.rule.processer.CompareAroundProcesser;
import nc.itf.pu.reference.ic.ATPServices;
import nc.vo.mmpac.pmo.pac0002.entity.PMOAggVO;
import nc.vo.pu.m21.entity.OrderVO;
import nc.vo.pu.m23.entity.ArriveVO;
import nc.vo.pu.m23.env.ArrivalUIToBSEnv;
import nc.vo.pu.m23.utils.ExtBillHasGrandsonDataUtils;
import nc.vo.scmpub.res.billtype.POBillType;

public class ArriveUpdateAction {
    public ArriveUpdateAction() {
    }

    public ArriveVO[] updateArrive(ArriveVO[] voArray, ArrivalUIToBSEnv env) {
        AroundProcesser<ArriveVO> processer = new AroundProcesser(ArriveActionPlugInPoint.ArriveUpdateAction);
        addBeforeRule(processer);
        processer.addBeforeRule(new CheckBillDateRule());
        processer.before(voArray);
        ExtBillHasGrandsonDataUtils<ArriveVO> tool = new ExtBillHasGrandsonDataUtils(voArray);
        ArriveVO[] originVOArray = (ArriveVO[])tool.getOriginBills();
        ArriveUpdateBP bp = new ArriveUpdateBP(env);
        ArriveVO[] ret = bp.updateArrive(voArray, originVOArray);

        processer.after(ret);
        return ret;
    }
    private void addBeforeRule(AroundProcesser<ArriveVO> processer) {
        processer.addBeforeFinalRule(new CheckBillDateRule());
    }
}
