change - 2022-12-11修改

master
wenjy 2 years ago
parent 3246c05a8e
commit eaba61ac9b

@ -115,6 +115,17 @@ public class AbsorbDeviceMesController {
public KBAdsorbDeviceinfo getdeviceState() { public KBAdsorbDeviceinfo getdeviceState() {
KBAdsorbDeviceinfo deviceinfos = null; KBAdsorbDeviceinfo deviceinfos = null;
deviceinfos = KBAdsorbDeviceinfoService.getAdsorbDeviceinfo(); deviceinfos = KBAdsorbDeviceinfoService.getAdsorbDeviceinfo();
if(deviceinfos == null){
deviceinfos = new KBAdsorbDeviceinfo();
deviceinfos.setDevicePower("0");
deviceinfos.setDeviceEnergy("0");
deviceinfos.setDeviceTakt("0");
deviceinfos.setDeviceStatus("异常");
deviceinfos.setOpenTime("0");
deviceinfos.setRunTime("0");
deviceinfos.setCount(0);
deviceinfos.setLossTime("0");
}
return deviceinfos; return deviceinfos;
} }

@ -131,13 +131,6 @@ public class UShellMesController {
EchartsDTO echarts = new EchartsDTO(); EchartsDTO echarts = new EchartsDTO();
List<String> xAxisInfo = new ArrayList<String>(); List<String> xAxisInfo = new ArrayList<String>();
List<Long> seriesInfo = new ArrayList<Long>(); List<Long> seriesInfo = new ArrayList<Long>();
/*List<ImosIoStoreBinDetial> infoList = iMosIoStoreBinDetialRepository.findByMaterialState("1");
List<ImosIoStoreBinDetial> inventoryInfo = infoList.stream().filter(s->s.getStoreCode().contains("U00")).collect(Collectors.toList());
Map<String,Long> map = inventoryInfo.stream().collect(Collectors.groupingBy(ImosIoStoreBinDetial::getMaterialName,Collectors.counting()));
for (String key : map.keySet()) {
xAxisInfo.add(key);
seriesInfo.add(map.get(key));
}*/
List<OrderInfo> orderInfos = imosPrPlanService.getUhullInventoryInfo(); List<OrderInfo> orderInfos = imosPrPlanService.getUhullInventoryInfo();
orderInfos.forEach(x->{ orderInfos.forEach(x->{
@ -158,13 +151,6 @@ public class UShellMesController {
EchartsDTO echarts = new EchartsDTO(); EchartsDTO echarts = new EchartsDTO();
List<String> xAxisInfo = new ArrayList<String>(); List<String> xAxisInfo = new ArrayList<String>();
List<Long> seriesInfo = new ArrayList<Long>(); List<Long> seriesInfo = new ArrayList<Long>();
/*List<ImosIoStoreBinDetial> infoList = iMosIoStoreBinDetialRepository.findByMaterialState("1");
List<ImosIoStoreBinDetial> inventoryInfo = infoList.stream().filter(s->s.getStoreCode().equals("L001")).collect(Collectors.toList());
Map<String,Long> map = inventoryInfo.stream().collect(Collectors.groupingBy(ImosIoStoreBinDetial::getMaterialName,Collectors.counting()));
for (String key : map.keySet()) {
xAxisInfo.add(key);
seriesInfo.add(map.get(key));
}*/
List<OrderInfo> orderInfos = imosPrPlanService.getLinerInventoryInfo(); List<OrderInfo> orderInfos = imosPrPlanService.getLinerInventoryInfo();
orderInfos.forEach(x->{ orderInfos.forEach(x->{

@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口正式端口8012 # 服务器的HTTP端口正式端口8012
port: 8012 port: 8013
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
@ -138,4 +138,4 @@ swagger:
# 是否开启swagger # 是否开启swagger
enabled: true enabled: true
in_id: 1 in_id: 2

@ -735,6 +735,7 @@
const stopDurationElement = document.getElementById("stop-duration") const stopDurationElement = document.getElementById("stop-duration")
const lossElement = document.getElementById("loss-duration") const lossElement = document.getElementById("loss-duration")
const deviceTaktElement = document.getElementById("deviceTakt-duration") const deviceTaktElement = document.getElementById("deviceTakt-duration")
const malfunctionElement = document.getElementById("status-card_failure")
const productionYesterdayElement = document.getElementById("production-yesterday") const productionYesterdayElement = document.getElementById("production-yesterday")
const energyConsumptionYesterdayElement = document.getElementById("energy-consumption-yesterday") const energyConsumptionYesterdayElement = document.getElementById("energy-consumption-yesterday")
@ -749,12 +750,13 @@
autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => { autoUpdate("/system/AbsorbDeviceMes/deviceState", INTERVAL, data => {
setStatus(data.deviceStatus) setStatus(data.deviceStatus)
energyConsumptionElement.innerText = data.deviceEnergy energyConsumptionElement.innerText = test(data.deviceEnergy,100)
powerElement.innerText = data.devicePower powerElement.innerText = test(data.devicePower,1000)
runDurationElement.innerText = data.runTime runDurationElement.innerText = data.runTime
stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2) stopDurationElement.innerText = (data.openTime - data.runTime).toFixed(2)
lossElement.innerText = (data.openTime - data.runTime).toFixed(2) lossElement.innerText = data.lossTime
deviceTaktElement.innerText = data.deviceTakt deviceTaktElement.innerText = data.deviceTakt
malfunctionElement.innerText = data.count
}) })
autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => { autoUpdate("/system/AbsorbDeviceMes/DeviceOEE", INTERVAL, data => {
@ -1485,6 +1487,11 @@
fontAdjust() fontAdjust()
} }
const test = (number,flag) =>{
var info = Math.floor(number / flag);
return info.toFixed(2);
}
window.onresize = resize window.onresize = resize
$(() => { $(() => {
resize() resize()

@ -30,4 +30,8 @@ public class KBAdsorbDeviceinfo {
private String runTime; private String runTime;
private Date collectTime; private Date collectTime;
private int count;
private String lossTime;
} }

@ -258,5 +258,7 @@ public class ScadaFoamParameter extends BaseEntity
@Excel(name = "发泡机状态") @Excel(name = "发泡机状态")
private int deviceStatus; private int deviceStatus;
private String deviceId;
private String value; private String value;
} }

@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ScadaFoamParameterMapper; import com.ruoyi.system.mapper.ScadaFoamParameterMapper;
import com.ruoyi.system.domain.ScadaFoamParameter; import com.ruoyi.system.domain.ScadaFoamParameter;
@ -24,6 +25,9 @@ public class ScadaFoamParameterServiceImpl implements IScadaFoamParameterService
@Autowired @Autowired
private ScadaFoamParameterMapper scadaFoamParameterMapper; private ScadaFoamParameterMapper scadaFoamParameterMapper;
@Value("${in_id}")
private int in_id;
/** /**
* *
* *
@ -46,6 +50,11 @@ public class ScadaFoamParameterServiceImpl implements IScadaFoamParameterService
@DataSource(value = DataSourceType.MASTER) @DataSource(value = DataSourceType.MASTER)
public List<ScadaFoamParameter> selectScadaFoamParameterList(ScadaFoamParameter scadaFoamParameter) public List<ScadaFoamParameter> selectScadaFoamParameterList(ScadaFoamParameter scadaFoamParameter)
{ {
if(in_id==1){
scadaFoamParameter.setDeviceId("HF202009857");
}else {
scadaFoamParameter.setDeviceId("HF202009859");
}
return scadaFoamParameterMapper.selectScadaFoamParameterList(scadaFoamParameter); return scadaFoamParameterMapper.selectScadaFoamParameterList(scadaFoamParameter);
} }

@ -28,11 +28,12 @@
</select> </select>
<select id="selectScadaAdsorbDeviceOEE" resultType="String"> <select id="selectScadaAdsorbDeviceOEE" resultType="String">
select OEE -- select OEE
from (select * -- from (select *
from SCADA_XF_DEVICEINFO_1 -- from SCADA_XF_DEVICEINFO_1
order by CREATETIME desc) -- order by CREATETIME desc)
where rownum = 1 -- where rownum = 1
SELECT * FROM TABLE ( Adsorb_Device_OEE_Count_NEW(#{in_id}) )
</select> </select>
<select id="selectScadaAdsorbDeviceAlarmCount" resultType="String"> <select id="selectScadaAdsorbDeviceAlarmCount" resultType="String">

@ -63,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="collectTime" column="collect_time" /> <result property="collectTime" column="collect_time" />
<result property="foamMachine" column="foammachine" /> <result property="foamMachine" column="foammachine" />
<result property="deviceStatus" column="DEVICE_STATUS" /> <result property="deviceStatus" column="DEVICE_STATUS" />
<result property="deviceId" column="DEVICEID" />
<result property="value" column="value" /> <result property="value" column="value" />
</resultMap> </resultMap>
@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from scada_pramerter_fpj_value from scada_pramerter_fpj_value
<where> <where>
prametername like '%系统%O%温度' prametername like '%系统%O%温度'
<if test="deviceId != null and deviceId != null"> and DEVICEID = #{deviceId}</if>
<if test="params.beginCollectTime != null and params.endCollectTime != null"> and createtime between #{params.beginCollectTime} and #{params.endCollectTime}</if> <if test="params.beginCollectTime != null and params.endCollectTime != null"> and createtime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
</where> </where>
order by (CREATETIME - to_date('1970-01-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss')) * 86400000 asc order by (CREATETIME - to_date('1970-01-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss')) * 86400000 asc

Loading…
Cancel
Save