获取缓存数量

master
lulicheng 9 months ago
parent 278c749243
commit 0712da04ed

@ -93,4 +93,14 @@ public class SimulationAnalysisController {
public ResponseDTO getProcessList(@RequestParam String tableCode){
return ResponseDTO.ok(simulationAnalysisService.getProcessList(tableCode));
}
/**
*
* @param process
* @return
*/
@GetMapping("/get-buffer-num")
public ResponseDTO getBufferNum(@RequestParam String process){
return ResponseDTO.ok(simulationAnalysisService.getBufferNum(process));
}
}

@ -1,6 +1,7 @@
package com.ipsplm.dao.simulation;
import com.ipsplm.entity.simulation.*;
import com.ipsplm.entity.simulation.vo.BufferVO;
import com.ipsplm.entity.simulation.vo.PlantEquipmentUtilizationVO;
import org.apache.ibatis.annotations.Mapper;
@ -63,4 +64,53 @@ public interface SimulationAnalysisMapper {
* @return
*/
List<String> getProcessList(String tableCode);
/**
*
* @param process
* @return
*/
List<BufferVO> getBufferName(String process);
/**
*
* @param bufferNameList
* @return
*/
List<BufferNumBxg> getBufferNumBxg(List<BufferVO> bufferNameList);
/**
* 线
* @param bufferNameList
* @return
*/
List<BufferNumDj> getBufferNumDj(List<BufferVO> bufferNameList);
/**
* 线
* @param bufferNameList
* @return
*/
List<BufferNumXe> getBufferNumXe(List<BufferVO> bufferNameList);
/**
* 线
* @param bufferNameList
* @return
*/
List<BufferNumXy> getBufferNumXy(List<BufferVO> bufferNameList);
/**
* 线
* @param bufferNameList
* @return
*/
List<BufferNumZe> getBufferNumZe(List<BufferVO> bufferNameList);
/**
* 线
* @param bufferNameList
* @return
*/
List<BufferNumZy> getBufferNumZy(List<BufferVO> bufferNameList);
}

@ -0,0 +1,14 @@
package com.ipsplm.entity.simulation.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class BufferNumVO implements Serializable {
//x轴时间
private String xTime;
//y轴Buffer数量
private String bufferNum;
//缓冲描述
private String bufferName;
}

@ -0,0 +1,14 @@
package com.ipsplm.entity.simulation.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class BufferVO implements Serializable {
//表编号
private String tableCode;
//缓冲编号
private String bufferCode;
//缓冲名称
private String bufferName;
}

@ -61,4 +61,11 @@ public interface ISimulationAnalysisService {
* @return
*/
List<String> getProcessList(String tableCode);
/**
*
* @param process
* @return
*/
Object getBufferNum(String process);
}

@ -2,6 +2,8 @@ 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;
@ -20,8 +22,10 @@ import java.util.List;
public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService {
@Autowired
private SimulationAnalysisMapper simulationAnalysisMapper;
/**
*
*
* @param flag
* @return
*/
@ -32,6 +36,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* OEE
*
* @return
*/
@Override
@ -41,6 +46,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* 线OEE
*
* @return
*/
@Override
@ -50,6 +56,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* 线OEE
*
* @return
*/
@Override
@ -59,6 +66,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* 线OEE
*
* @return
*/
@Override
@ -68,6 +76,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* 线OEE
*
* @return
*/
@Override
@ -77,6 +86,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
* 线OEE
*
* @return
*/
@Override
@ -86,6 +96,7 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
/**
*
*
* @param tableCode
* @return
*/
@ -93,4 +104,44 @@ public class SimulationAnalysisServiceImpl implements ISimulationAnalysisService
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;
}
}

@ -73,4 +73,56 @@
<select id="getProcessList" resultType="java.lang.String">
select distinct process_des from process_buffer where table_code = #{tableCode}
</select>
<!-- 获取缓存信息-->
<select id="getBufferName" resultType="com.ipsplm.entity.simulation.vo.BufferVO">
select table_code,buffer,buffer_des from process_buffer where process_des = #{process}
</select>
<!-- 获取不锈钢缓存数量-->
<select id="getBufferNumBxg" resultType="com.ipsplm.entity.simulation.BufferNumBxg">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_bxg
</select>
<!-- 获取大径线缓存数量-->
<select id="getBufferNumDj" resultType="com.ipsplm.entity.simulation.BufferNumDj">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_dj
</select>
<!-- 获取小二线缓存数量-->
<select id="getBufferNumXe" resultType="com.ipsplm.entity.simulation.BufferNumXe">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_xe
</select>
<!-- 获取小一线缓存数量-->
<select id="getBufferNumXy" resultType="com.ipsplm.entity.simulation.BufferNumXy">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_xy
</select>
<!-- 获取中二线缓存数量-->
<select id="getBufferNumZe" resultType="com.ipsplm.entity.simulation.BufferNumZe">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_ze
</select>
<!-- 获取中一线缓存数量-->
<select id="getBufferNumZy" resultType="com.ipsplm.entity.simulation.BufferNumZy">
select record_time,
<foreach collection="bufferNameList" item="item" separator=",">
${item.bufferCode}
</foreach>
from buffernum_zy
</select>
</mapper>
Loading…
Cancel
Save