| | |
| | | //添加要拦截的url |
| | | registry.addInterceptor(licenseCheckInterceptor) |
| | | // 拦截的路径 |
| | | .addPathPatterns("/**") |
| | | .addPathPatterns("/sys/login"); |
| | | // 放行的路径 |
| | | .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**", "/doc.html")//swagger |
| | | .excludePathPatterns("/base/license/**");//生成license和获取服务器硬件信息 |
| | | // .excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**", "/doc.html")//swagger |
| | | // .excludePathPatterns("/base/license/**");//生成license和获取服务器硬件信息 |
| | | } |
| | | } |
| | |
| | | private String alarmNo; |
| | | @Excel(name = "报警描述", width = 50) |
| | | private String alarmContent; |
| | | |
| | | private String driveType; |
| | | } |
| | |
| | | package org.jeecg.modules.mdc.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * label |
| | | */ |
| | | @ApiModelProperty("label") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String label; |
| | | /** |
| | | * value1 |
| | | */ |
| | | @ApiModelProperty("value1") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String value1; |
| | | /** |
| | | * value2 |
| | | */ |
| | | @ApiModelProperty("value2") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String value2; |
| | | |
| | | } |
| | |
| | | t2.equipment_name, |
| | | t1.collectTime, |
| | | t1.AlarmNo, |
| | | t1.AlarmContent |
| | | t1.AlarmContent, |
| | | t2.drive_type |
| | | FROM |
| | | EquipmentAlarm t1 LEFT JOIN mdc_equipment t2 ON t1.EquipmentID = t2.equipment_id |
| | | <where> |
| | |
| | | t2.equipment_name, |
| | | t1.collectTime, |
| | | t1.AlarmNo, |
| | | t1.AlarmContent |
| | | t1.AlarmContent, |
| | | t2.drive_type |
| | | FROM |
| | | EquipmentAlarm t1 LEFT JOIN mdc_equipment t2 ON t1.EquipmentID = t2.equipment_id |
| | | <where> |
| | |
| | | } |
| | | IPage<EquipmentAlarmDto> pageList = this.baseMapper.pageList(page, equipmentAlarmVo); |
| | | pageList.getRecords().forEach(item -> { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | if (StringUtils.isBlank(item.getAlarmContent())) { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, item.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, item.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | item.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | } |
| | | } |
| | | }); |
| | | return this.baseMapper.pageList(page, equipmentAlarmVo); |
| | | return pageList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | // Step.2 AutoPoi 导出Excel |
| | | ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); |
| | | List<EquipmentAlarmDto> equipmentAlarmDtos = this.baseMapper.list(equipmentAlarmVo); |
| | | if (equipmentAlarmDtos != null && !equipmentAlarmDtos.isEmpty()) { |
| | | for (EquipmentAlarmDto equipmentAlarmDto : equipmentAlarmDtos) { |
| | | if (StringUtils.isBlank(equipmentAlarmDto.getAlarmContent())) { |
| | | List<MdcAlarmInfo> mdcAlarmInfoList = mdcAlarmInfoService.list(new LambdaQueryWrapper<MdcAlarmInfo>().eq(MdcAlarmInfo::getAlarmCode, equipmentAlarmDto.getAlarmNo()).eq(MdcAlarmInfo::getDriveType, equipmentAlarmDto.getDriveType()).eq(MdcAlarmInfo::getIsUse, CommonConstant.STATUS_0)); |
| | | if (mdcAlarmInfoList != null && !mdcAlarmInfoList.isEmpty()) { |
| | | equipmentAlarmDto.setAlarmContent(mdcAlarmInfoList.get(0).getAlarmContent()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 导出文件名称 |
| | | mv.addObject(NormalExcelConstants.FILE_NAME, "设备报警列表"); |
| | | mv.addObject(NormalExcelConstants.CLASS, EquipmentAlarmDto.class); |
| | |
| | | } |
| | | map.put("value", value); |
| | | runData.add(map); |
| | | if ("spindlebeilv".equals(englishName)) { |
| | | if ("spindlebeilv".equals(englishName) || "Sfeed".equals(englishName)) { |
| | | result.put("spindlebeilv", value); |
| | | } |
| | | if ("feedbeilv".equals(englishName)) { |
| | | if ("feedbeilv".equals(englishName) || "Ffeed".equals(englishName)) { |
| | | result.put("feedbeilv", value); |
| | | } |
| | | if ("spindleload".equals(englishName)) { |
| | | result.put("spindleload", value); |
| | | } |
| | | if ("rapidfeed".equals(englishName)) { |
| | | if ("rapidfeed".equals(englishName) || "Rapidfeed".equals(englishName)) { |
| | | result.put("rapidfeed", value); |
| | | } |
| | | } |
| | |
| | | mdcOeeInfo.setOpenLong(mdcEquipmentStatisticalShiftInfo.getOpenLong()); |
| | | mdcOeeInfo.setCloseLong(mdcEquipmentStatisticalShiftInfo.getCloseLong()); |
| | | //获取设备生产计划 |
| | | mdcProductDayschedule = productDayScheduleList.stream().filter(productDayschedule -> productDayschedule.getOrderId().substring(8, 10).equals(id)).findAny().orElse(null); |
| | | mdcProductDayschedule = productDayScheduleList.stream().filter(productDayschedule -> productDayschedule.getOrderId().substring(productDayschedule.getOrderId().length() - 5, productDayschedule.getOrderId().length() - 3).equals(id)).findAny().orElse(null); |
| | | if (mdcProductDayschedule == null) { |
| | | continue; |
| | | } |
| | |
| | | package org.jeecg.modules.mdcJc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.mdc.mapper.MdcEquipmentMapper; |
| | | import org.jeecg.modules.mdc.util.DateUtils; |
| | | import org.jeecg.modules.mdcJc.entity.MdcProductDayschedule; |
| | | import org.jeecg.modules.mdcJc.entity.ProductDayschedule; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author Lius |
| | |
| | | |
| | | @Resource |
| | | private IClassMonthlyScheduleService classMonthlyScheduleService; |
| | | |
| | | @Resource |
| | | private MdcEquipmentMapper mdcEquipmentMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | this.removeBatchByIds(mdcListIds); |
| | | } |
| | | List<MdcProductDayschedule> mesC = new ArrayList<>(); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("5899-8026", "1818119280110690306"); |
| | | map.put("5899-8027", "1818119094416269313"); |
| | | map.put("5899-8060", "1818118942234337281"); |
| | | map.put("5899-8061", "1818119019862515714"); |
| | | for (ProductDayschedule c : list) { |
| | | MdcProductDayschedule mdc = new MdcProductDayschedule(); |
| | | BeanMapper.copy(c, mdc); |
| | | mesC.add(mdc); |
| | | if (map.containsKey(c.getEquipmentId())) { |
| | | List<String> productionIds = Arrays.asList(map.get(c.getEquipmentId()).split(",")); |
| | | List<String> equipmentList = mdcEquipmentMapper.queryIdsByProductions(productionIds); |
| | | if (equipmentList != null && !equipmentList.isEmpty()) { |
| | | for (String equipmentId : equipmentList) { |
| | | MdcProductDayschedule mdc = new MdcProductDayschedule(); |
| | | BeanMapper.copy(c, mdc); |
| | | mdc.setEquipmentId(equipmentId); |
| | | mesC.add(mdc); |
| | | } |
| | | } |
| | | } else { |
| | | MdcProductDayschedule mdc = new MdcProductDayschedule(); |
| | | BeanMapper.copy(c, mdc); |
| | | mesC.add(mdc); |
| | | } |
| | | } |
| | | boolean b = this.saveBatch(mesC); |
| | | return b; |
| | |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author Lius |
| | |
| | | BigDecimal processCount = mdcLargeScreenMapper.findYesterdayProcessCount(yesterday); |
| | | BigDecimal utilizationRate = BigDecimal.ZERO; |
| | | if (equipmentCount != null && processCount != null) { |
| | | utilizationRate = processCount.divide(new BigDecimal("86400").multiply(equipmentCount), 0, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP); |
| | | utilizationRate = processCount.divide(new BigDecimal("86400").multiply(equipmentCount), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(0, RoundingMode.HALF_UP); |
| | | } |
| | | yesterdayOverviewDto.setUtilizationRate(utilizationRate); |
| | | return yesterdayOverviewDto; |
| | |
| | | if (mdcProductDayschedule.getCompletionCount() != 0) { |
| | | todayProductionPassRateDto.setPassRate(new BigDecimal(mdcProductDayschedule.getQualifiedCount()).divide(new BigDecimal(mdcProductDayschedule.getCompletionCount()), 0, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP)); |
| | | } |
| | | result.add(todayProductionPassRateDto); |
| | | if (!(todayProductionPassRateDto.getPassRate().compareTo(BigDecimal.ZERO) == 0)) { |
| | | result.add(todayProductionPassRateDto); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | |
| | | */ |
| | | @Override |
| | | public List<ClazzCompletionCountDto> todayClazzCompletionCount() { |
| | | return mdcLargeScreenMapper.todayClazzCompletionCount(today); |
| | | List<ClazzCompletionCountDto> result = mdcLargeScreenMapper.todayClazzCompletionCount(today); |
| | | return result.stream().filter(clazzCompletionCountDto -> clazzCompletionCountDto.getCompletionCount() != 0).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |