|
|
|
|
|
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<OeeBxg> getOeeBxg() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeBxg();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取大径线OEE
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<OeeDj> getOeeDj() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeDj();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取小二线OEE
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<OeeXe> getOeeXe() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeXe();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取小一线OEE
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<OeeXy> getOeeXy() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeXy();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取中二线OEE
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<OeeZe> getOeeZe() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeZe();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取中一线OEE
|
|
|
|
|
|
*
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<OeeZy> getOeeZy() {
|
|
|
|
|
|
return simulationAnalysisMapper.getOeeZy();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取工序列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param tableCode
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<String> getProcessList(String tableCode) {
|
|
|
|
|
|
return simulationAnalysisMapper.getProcessList(tableCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取缓存数量时间
|
|
|
|
|
|
* @param process
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Object getBufferNum(String process) {
|
|
|
|
|
|
List<BufferVO> bufferNameList = simulationAnalysisMapper.getBufferName(process);
|
|
|
|
|
|
String tableCode = bufferNameList.get(0).getTableCode();
|
|
|
|
|
|
switch (tableCode) {
|
|
|
|
|
|
case "buffernum_bxg": {
|
|
|
|
|
|
List<BufferNumBxg> bufferNumBxgList = simulationAnalysisMapper.getBufferNumBxg(bufferNameList);
|
|
|
|
|
|
return bufferNumBxgList;
|
|
|
|
|
|
}
|
|
|
|
|
|
case "buffernum_dj": {
|
|
|
|
|
|
List<BufferNumDj> bufferNumDjList = simulationAnalysisMapper.getBufferNumDj(bufferNameList);
|
|
|
|
|
|
return bufferNumDjList;
|
|
|
|
|
|
}
|
|
|
|
|
|
case "buffernum_xe": {
|
|
|
|
|
|
List<BufferNumXe> bufferNumXeList = simulationAnalysisMapper.getBufferNumXe(bufferNameList);
|
|
|
|
|
|
return bufferNumXeList;
|
|
|
|
|
|
}
|
|
|
|
|
|
case "buffernum_xy": {
|
|
|
|
|
|
List<BufferNumXy> bufferNumXyList = simulationAnalysisMapper.getBufferNumXy(bufferNameList);
|
|
|
|
|
|
return bufferNumXyList;
|
|
|
|
|
|
}
|
|
|
|
|
|
case "buffernum_ze": {
|
|
|
|
|
|
List<BufferNumZe> bufferNumZeList = simulationAnalysisMapper.getBufferNumZe(bufferNameList);
|
|
|
|
|
|
return bufferNumZeList;
|
|
|
|
|
|
}
|
|
|
|
|
|
case "buffernum_zy": {
|
|
|
|
|
|
List<BufferNumZy> bufferNumZyList = simulationAnalysisMapper.getBufferNumZy(bufferNameList);
|
|
|
|
|
|
return bufferNumZyList;
|
|
|
|
|
|
}
|
|
|
|
|
|
default:
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|