package cc.smtweb.system.bpm.web.sys.base.billType;

import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.system.bpm.web.engine.model.common.ModelSaveHandler;
import org.apache.commons.lang3.StringUtils;

/**
 * Created by Akmm at 2022-08-25 19:11
 */
public class BillTypeSaveHandler extends ModelSaveHandler<BillType> {
    @Override
    protected void checkValid() {
        super.checkValid();
        if (StringUtils.isEmpty(bean.getCode())) {
            throw new BizException("编码不能为空！");
        }

        bean.setId(Long.parseLong(bean.getCode()));
    }
}
