package com.ipsplm.service.simulation.impl; import com.ipsplm.dao.simulation.SimulationAnalysisMapper; import com.ipsplm.entity.simulation.*; import com.ipsplm.entity.simulation.vo.BufferNumVO; import com.ipsplm.entity.simulation.vo.BufferVO; import com.ipsplm.entity.simulation.vo.PlantEquipmentUtilizationVO; import com.ipsplm.service.simulation.ISimulationAnalysisService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Collections; import java.util.List; /** * @Description 仿真分析实现类 * @Author lulicheng * @Date 2024-07-31 10:20 * @Version 1.0 */ @Service public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService { @Autowired private SimulationAnalysisMapper simulationAnalysisMapper; /** * 获取厂房设备利用率信息 * * @param flag * @return */ @Override public PlantEquipmentUtilizationVO getPlantEquipmentUtilization(Long flag) { return simulationAnalysisMapper.getPlantEquipmentUtilization(flag); } /** * 获取不锈钢OEE * * @return */ @Override public List getOeeBxg() { return simulationAnalysisMapper.getOeeBxg(); } /** * 获取大径线OEE * * @return */ @Override public List getOeeDj() { return simulationAnalysisMapper.getOeeDj(); } /** * 获取小二线OEE * * @return */ @Override public List getOeeXe() { return simulationAnalysisMapper.getOeeXe(); } /** * 获取小一线OEE * * @return */ @Override public List getOeeXy() { return simulationAnalysisMapper.getOeeXy(); } /** * 获取中二线OEE * * @return */ @Override public List getOeeZe() { return simulationAnalysisMapper.getOeeZe(); } /** * 获取中一线OEE * * @return */ @Override public List getOeeZy() { return simulationAnalysisMapper.getOeeZy(); } /** * 获取工序列表 * * @param tableCode * @return */ @Override public List getProcessList(String tableCode) { return simulationAnalysisMapper.getProcessList(tableCode); } /** * 获取缓存数量时间 * @param process * @return */ @Override public Object getBufferNum(String process) { List bufferNameList = simulationAnalysisMapper.getBufferName(process); String tableCode = bufferNameList.get(0).getTableCode(); switch (tableCode) { case "buffernum_bxg": { List bufferNumBxgList = simulationAnalysisMapper.getBufferNumBxg(bufferNameList); return bufferNumBxgList; } case "buffernum_dj": { List bufferNumDjList = simulationAnalysisMapper.getBufferNumDj(bufferNameList); return bufferNumDjList; } case "buffernum_xe": { List bufferNumXeList = simulationAnalysisMapper.getBufferNumXe(bufferNameList); return bufferNumXeList; } case "buffernum_xy": { List bufferNumXyList = simulationAnalysisMapper.getBufferNumXy(bufferNameList); return bufferNumXyList; } case "buffernum_ze": { List bufferNumZeList = simulationAnalysisMapper.getBufferNumZe(bufferNameList); return bufferNumZeList; } case "buffernum_zy": { List bufferNumZyList = simulationAnalysisMapper.getBufferNumZy(bufferNameList); return bufferNumZyList; } default: break; } return null; } }