change - 2022-12-11修改

master
wenjy 2 years ago
parent 3246c05a8e
commit eaba61ac9b

@ -115,6 +115,17 @@ public class AbsorbDeviceMesController {
public KBAdsorbDeviceinfo getdeviceState() {
KBAdsorbDeviceinfo deviceinfos = null;
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;
}

@ -131,13 +131,6 @@ public class UShellMesController {
EchartsDTO echarts = new EchartsDTO();
List<String> xAxisInfo = new ArrayList<String>();
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();
orderInfos.forEach(x->{
@ -158,13 +151,6 @@ public class UShellMesController {
EchartsDTO echarts = new EchartsDTO();
List<String> xAxisInfo = new ArrayList<String>();
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();
orderInfos.forEach(x->{

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

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

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

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

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

@ -28,11 +28,12 @@
</select>
<select id="selectScadaAdsorbDeviceOEE" resultType="String">
select OEE
from (select *
from SCADA_XF_DEVICEINFO_1
order by CREATETIME desc)
where rownum = 1
-- select OEE
-- from (select *
-- from SCADA_XF_DEVICEINFO_1
-- order by CREATETIME desc)
-- where rownum = 1
SELECT * FROM TABLE ( Adsorb_Device_OEE_Count_NEW(#{in_id}) )
</select>
<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="foamMachine" column="foammachine" />
<result property="deviceStatus" column="DEVICE_STATUS" />
<result property="deviceId" column="DEVICEID" />
<result property="value" column="value" />
</resultMap>
@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from scada_pramerter_fpj_value
<where>
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>
</where>
order by (CREATETIME - to_date('1970-01-01 08:00:00', 'yyyy-mm-dd hh24:mi:ss')) * 86400000 asc

Loading…
Cancel
Save