public with sharing class HospitalPriceTriggerHandler extends Oly_TriggerHandler{

	private Map<Id, hospitalprice__c> newMap;
    private List<hospitalprice__c> newList;

    public HospitalPriceTriggerHandler() {
        this.newMap = (Map<Id, hospitalprice__c>) Trigger.newMap;
        this.newList = (List<hospitalprice__c>) Trigger.new;
    }

    protected override void beforeInsert() {
        setAph();
        //setUpProduct();
    }

	//beforeinsert的时候设置医院特价关系表中 经销商医院产品字段的值
    public void setAph() {
        if (Trigger.isInsert) {
        	for (hospitalprice__c hpc : newList) {
        		String a = hpc.hospital__c;
        		String p = hpc.account__c;
        		String h = hpc.product__c;
        		hpc.aph__c = a + p + h;
        	}
        }
    }
}