| | |
| | | @Override |
| | | public void savesEquipmentMagnifications(String dateTime) { |
| | | List<MdcEquipmentMagnification> magnifications = new ArrayList<>(); |
| | | List<Equipment> equipmentList = equipmentService.list(); |
| | | Map<String,List<MdcDriveTypeParamConfig>> map = new HashMap<>(); |
| | | Date now = DateUtils.plusTime(DateUtils.getNow(), -1); |
| | | //主轴倍率 |
| | | //进给倍率 |
| | | /* Equipment e = equipmentService.getById("12345678"); |
| | |
| | | } catch (Exception ee) { |
| | | log.error("参数格式不对", ee); |
| | | } |
| | | |
| | | |
| | | } |
| | | List<Equipment> equipmentList = equipmentService.list(); |
| | | Map<String,List<MdcDriveTypeParamConfig>> map = new HashMap<>(); |
| | | Date now = DateUtils.plusTime(DateUtils.getNow(), -1); |
| | | for (Equipment equipment : equipmentList) { |
| | | Date start = null; |
| | | List<String> dates = new ArrayList<>(); |
| | | //查询最后一条记录 |
| | | if (StringUtils.isNotBlank(dateTime)) { |
| | | Date initDate = DateUtils.toDate(dateTime, "yyyyMMdd"); |
| | | String date = DateUtils.format(initDate,DateUtils.STR_DATE); |
| | | dates.add(date); |
| | | } else { |
| | | MdcEquipmentMagnification mdcMagnification = super.baseMapper.getMaxStaticsData(equipment.getEquipmentid()); |
| | | if (mdcMagnification == null) { |
| | | start = DateUtils.plusTime(DateUtils.getNow(), -20); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | List<String> dates = DateUtils.getDatesStringList(start,now); |
| | | dates = DateUtils.getDatesStringList(start,now); |
| | | } |
| | | |
| | | List<MdcDriveTypeParamConfig> list = new ArrayList<>(); |
| | | if (!map.containsKey(equipment.getDrivetype())) { |
| | | MdcDriveTypeParamConfig config1 = mdcDriveTypeParamConfigService.getEnglishName(spindlebeilv,equipment.getDrivetype()); |
| | |
| | | |
| | | private MdcEquipmentMagnificationDto setDataList(List<MdcEquipmentMagnificationDto> list,String date,String equipmentId,MdcEquipmentMagnificationDto mdcMagnificationDto) { |
| | | MdcEquipmentMagnificationDto result = new MdcEquipmentMagnificationDto(); |
| | | result.setTheDate(date); |
| | | if (list != null && list.size() > 0) { |
| | | for (MdcEquipmentMagnificationDto mdcEquipmentMagnificationDto : list) { |
| | | if (date.equals(mdcEquipmentMagnificationDto.getTheDate()) && mdcEquipmentMagnificationDto.getEquipmentId().equals(equipmentId)) { |