| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.system.vo.DictModel; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentDaySummary; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipmentMonitor; |
| | | import org.jeecg.modules.mdc.service.IEquipmentAlarmService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentDaySummaryService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentStatisticalInfoService; |
| | | import org.jeecg.modules.mdc.util.DateUtils; |
| | |
| | | @Resource |
| | | private IEquipmentAlarmService equipmentAlarmService; |
| | | |
| | | @Resource |
| | | private IMdcEquipmentDaySummaryService mdcEquipmentDaySummaryService; |
| | | |
| | | /** |
| | | * 设备状态情况 |
| | | * |
| | |
| | | @Override |
| | | public EquipmentStatusOverview equipmentStatusOverview(String productionId) { |
| | | EquipmentStatusOverview equipmentStatusOverview = new EquipmentStatusOverview(); |
| | | // 设备状态 |
| | | List<MdcEquipmentMonitor> equipmentMonitorList = mdcEquipmentService.getEquipmentMonitorList(productionId); |
| | | if (equipmentMonitorList != null && !equipmentMonitorList.isEmpty()) { |
| | | equipmentStatusOverview.setEquipmentCount(equipmentMonitorList.size()); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // mes产量 |
| | | MdcEquipmentDaySummary mdcEquipmentDaySummary = mdcEquipmentDaySummaryService.statisticsQty(productionId); |
| | | if (mdcEquipmentDaySummary != null) { |
| | | equipmentStatusOverview.setQualifiedQty(mdcEquipmentDaySummary.getQualifiedQty()); |
| | | equipmentStatusOverview.setPlanQty(mdcEquipmentDaySummary.getPlanQty()); |
| | | } |
| | | return equipmentStatusOverview; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 工段列表 |
| | | * @param productionId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MdcProduction> productionList(String productionId) { |
| | | return mdcProductionService.list(new LambdaQueryWrapper<MdcProduction>().eq(MdcProduction::getParentId, productionId).eq(MdcProduction::getDelFlag, CommonConstant.DEL_FLAG_0)); |
| | | } |
| | | |
| | | /** |
| | | * 创建子生产的月度利用率 DTO |
| | | */ |
| | | private UtilizationRateDto createUtilizationMonthDto(MdcProduction mdcProduction, List<String[]> dateLists) { |