public without sharing class AssetworkflowHandler extends Oly_TriggerHandler {
    private Map<Id, Asset> newMap;
    private Map<Id, Asset> oldMap;
    private List<Asset> newList;
    private List<Asset> oldList;

    public AssetworkflowHandler() {
        this.newMap = (Map<Id, Asset>) Trigger.newMap;
        this.oldMap = (Map<Id, Asset>) Trigger.oldMap;
        this.newList = (List<Asset>) Trigger.new;
        this.oldList = (List<Asset>) Trigger.old;
    }
    protected override void beforeInsert() {
        workflowCodeadd();
    }
    protected override void beforeUpdate() {
        workflowCodeadd();        
    }
    // 202030920 gzw NFM110优化改造
    private void workflowCodeadd() {
        for(Asset nObj : newList) {
            //新逻辑保修期限对应
            if(nObj.New_logic_data__c) {
                nObj.Guarantee_period_for_products__c = nObj.Guarantee_period_formula__c;
            }
        }
    }
}