Merge branch 'zjw'
This commit is contained in:
commit
5d07d0d34b
@ -67,15 +67,17 @@ public class EquipDashboardServiceImpl implements EquipDashboardService{
|
|||||||
vo.setAlarmNum(alarmNum);
|
vo.setAlarmNum(alarmNum);
|
||||||
|
|
||||||
if(Objects.nonNull(equipInfoDO.getRunStatus()) && equipInfoDO.getRunStatus() != 2) {
|
if(Objects.nonNull(equipInfoDO.getRunStatus()) && equipInfoDO.getRunStatus() != 2) {
|
||||||
//获取工作数据、
|
//获取工作数据
|
||||||
Map<String, Object> latestDataMap = dataQueryApi.getLatestFanucData(vo.getEquipId());
|
Map<String, Object> latestDataMap = dataQueryApi.getLatestFanucData(vo.getEquipId());
|
||||||
Map<String, Object> oldestDataMap = dataQueryApi.getOldestFanucData(vo.getEquipId());
|
Map<String, Object> oldestDataMap = dataQueryApi.getOldestFanucData(vo.getEquipId());
|
||||||
if (CollUtil.isNotEmpty(latestDataMap) && CollUtil.isNotEmpty(oldestDataMap)) {
|
if (CollUtil.isNotEmpty(latestDataMap) && CollUtil.isNotEmpty(oldestDataMap)) {
|
||||||
vo.setPowerTime(Double.parseDouble(latestDataMap.get("power_time").toString()) / 60.0);
|
vo.setPowerTime(Double.parseDouble(latestDataMap.get("power_time").toString()) / 60.0);
|
||||||
vo.setWorkTime(Double.parseDouble(latestDataMap.get("work_time").toString()) / 60.0);
|
vo.setWorkTime(Double.parseDouble(latestDataMap.get("work_time").toString()) / 60.0);
|
||||||
vo.setProcessNum((int) Double.parseDouble(latestDataMap.get("process_num").toString()));
|
vo.setProcessNum((int) Double.parseDouble(latestDataMap.get("process_num").toString()));
|
||||||
vo.setTodayWorkTime((Double.parseDouble(latestDataMap.get("work_time").toString()) - Double.parseDouble(oldestDataMap.get("work_time").toString())) / 60.0);
|
double todayWorkTime = (Double.parseDouble(latestDataMap.get("work_time").toString()) - Double.parseDouble(oldestDataMap.get("work_time").toString())) / 60.0;
|
||||||
vo.setTodayProcessNum((int) (Double.parseDouble(latestDataMap.get("process_num").toString()) - Double.parseDouble(oldestDataMap.get("process_num").toString())));
|
int todayProcessNum = (int) (Double.parseDouble(latestDataMap.get("process_num").toString()) - Double.parseDouble(oldestDataMap.get("process_num").toString()));
|
||||||
|
vo.setTodayWorkTime(todayWorkTime < 0 ? Double.parseDouble(latestDataMap.get("work_time").toString()) : todayWorkTime);
|
||||||
|
vo.setTodayProcessNum(todayProcessNum < 0 ? (int) Double.parseDouble(latestDataMap.get("process_num").toString()) : todayProcessNum);
|
||||||
vo.setTodayEfficiency(vo.getTodayProcessNum() / vo.getTodayWorkTime());
|
vo.setTodayEfficiency(vo.getTodayProcessNum() / vo.getTodayWorkTime());
|
||||||
}
|
}
|
||||||
}else{//维修状态
|
}else{//维修状态
|
||||||
|
@ -316,7 +316,7 @@
|
|||||||
<!--新增网关采集卡信息-->
|
<!--新增网关采集卡信息-->
|
||||||
<GatewayCardForm
|
<GatewayCardForm
|
||||||
ref="cardFormRef"
|
ref="cardFormRef"
|
||||||
@success="getList"
|
@success="getCardList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user