package com.yem.wm.es.contactbook.op;

import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
import kd.bos.servicehelper.BusinessDataServiceHelper;

import static com.yem.wm.es.contactbook.op.ContactBookSubmitOp.updateShipping;

/**
 * @Description: TODO
 * @Date: 2024/7/25 20:27
 * @Created: by ZZSLL
 */

public class ContactBookUnAuditOp extends AbstractOperationServicePlugIn {

    @Override
    public void endOperationTransaction(EndOperationTransactionArgs e) {
        super.endOperationTransaction(e);
        DynamicObject[] entities = e.getDataEntities();
        for (DynamicObject entity : entities) {
            entity = BusinessDataServiceHelper.loadSingle(entity.getPkValue(), entity.getDynamicObjectType().getName());
            updateShipping(entity, "A");
        }
    }
}
