package com.dgtly.sync.exception;

import com.dgtly.common.exception.base.BaseException;
import com.dgtly.sync.domain.MetaNipponOrgRelation;

public class NotFoundParentException extends BaseException {

    /**
     * 部门id
     */
    private MetaNipponOrgRelation metaNipponOrgRelation;


    /**
     * 错误信息
     */
    private String msg;

    public NotFoundParentException(MetaNipponOrgRelation metaNipponOrgRelation){
        super("sync","500",
                new Object[] { "部门id:"+metaNipponOrgRelation.getSobid(),
                        "父id:"+metaNipponOrgRelation.getSobid(),
                "packageId:"+metaNipponOrgRelation.getPackageId()},null);
        String str = "部门id："+metaNipponOrgRelation.getObjid()+"，父Id:"+
                metaNipponOrgRelation.getSobid()+"在packageId:"+metaNipponOrgRelation.getPackageId()+"次解析中，未找到相应父部门";
        this.msg = str;

    }

    @Override
    public String getMessage(){
        return this.msg;
    }


    public MetaNipponOrgRelation getMetaNipponOrgRelation() {
        return metaNipponOrgRelation;
    }
}
