package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx;

import cn.estsh.i3plus.ext.mes.api.base.IProdOrgExtService;
import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxCenterWorkingBoardService;
import cn.estsh.i3plus.ext.mes.pojo.bean.MesWorkCenterExt;
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtConstWords;
import cn.estsh.impp.framework.boot.util.SpringContextsUtil;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @Author : wangjie
 * @CreateDate : 2022-02-15
 * @Modify:
 **/
@Slf4j
public class JxCenterWorkingBoardProxyCenterService implements IJxCenterWorkingBoardService {

    private IProdOrgExtService prodOrgExtService;

    public JxCenterWorkingBoardProxyCenterService() {
        this.prodOrgExtService = (IProdOrgExtService) SpringContextsUtil.getBean("prodOrgExtService");
    }

    @Override
    public Map<String, Object> queryCenterWorkingBoardData(Map<String, Object> dataMap) {
        MesWorkCenterExt workCenterExtDb = prodOrgExtService.getWorkCenterExt((String) dataMap.get(MesExtConstWords.ORGANIZE_CODE), (String) dataMap.get(MesExtConstWords.WORK_CENTER_CODE));
        dataMap.put(MesWorkCenterExt.class.getSimpleName(), workCenterExtDb);
        return dataMap;
    }

}
