package com.kingdee.eas.custom.sendmessage.utils.impl;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.basedata.person.PersonInfo;
import com.kingdee.eas.custom.logs.MessageLogsInfo;
import com.kingdee.eas.custom.sendmessage.utils.TemplateStrategy;
import com.kingdee.util.StringUtils;

import java.util.LinkedHashMap;
import java.util.Map;

// 实现电子证明模板
public class ElectronicProofTemplate implements TemplateStrategy {
    @Override
    public LinkedHashMap<String,String> getTemplate(Context ctx, Map<String,Object> paramMap, MessageLogsInfo messageLogsInfo) throws BOSException {
        LinkedHashMap<String,String> param = new LinkedHashMap();
        PersonInfo personInfo = (PersonInfo) paramMap.get("personInfo");
        messageLogsInfo.setPerson(personInfo);
        param.put("name", personInfo.getName());
        param.put("urlPath", StringUtils.cnulls(paramMap.get("urlPath")));
        return param;
    }


}