| | |
| | | mdcBoardRateVo.setOpenRate(equipmentStatisticalInfo.getOpenLong().divide(new BigDecimal("864"), 2, RoundingMode.HALF_UP)); |
| | | } |
| | | if (equipmentStatisticalInfo.getOpenLong().compareTo(BigDecimal.ZERO) > 0) { |
| | | mdcBoardRateVo.setStartRate(equipmentStatisticalInfo.getProcessLong().multiply(new BigDecimal("100").divide(equipmentStatisticalInfo.getOpenLong(), 2, RoundingMode.HALF_UP))); |
| | | mdcBoardRateVo.setStartRate(equipmentStatisticalInfo.getProcessLong().multiply(new BigDecimal("100")).divide(equipmentStatisticalInfo.getOpenLong(), 2, RoundingMode.HALF_UP)); |
| | | } |
| | | statisticsMap.put(date, mdcBoardRateVo); |
| | | } |
| | |
| | | /** |
| | | * 合格率 |
| | | */ |
| | | private BigDecimal passRate = BigDecimal.ZERO; |
| | | private BigDecimal passRate = new BigDecimal("100"); |
| | | |
| | | public MdcBoardRateVo() { |
| | | } |
| | |
| | | |
| | | @Override |
| | | public BigDecimal findRateByMonth(String equipmentId, String month) { |
| | | BigDecimal rate = BigDecimal.ZERO; |
| | | BigDecimal rate = new BigDecimal("100"); |
| | | MesRcJobreport mesRcJobreport = this.baseMapper.findRateByMonth(equipmentId, month); |
| | | if (mesRcJobreport != null && mesRcJobreport.getQty().compareTo(BigDecimal.ZERO) > 0) { |
| | | rate = mesRcJobreport.getOkuqty().divide(mesRcJobreport.getQty(), 2, RoundingMode.HALF_UP); |
| | | rate = mesRcJobreport.getOkuqty().multiply(new BigDecimal("100")).divide(mesRcJobreport.getQty(), 2, RoundingMode.HALF_UP); |
| | | } |
| | | return rate; |
| | | } |
| | |
| | | } |
| | | sysUserDepartService.saveBatch(userDepartList); |
| | | } |
| | | |
| | | // 批量将产线和用户信息建立关联关系 |
| | | String productionIds = sysUserExcel.getProductionIds(); |
| | | if (StringUtils.isNotBlank(productionIds)) { |
| | | String userId = sysUserExcel.getId(); |
| | | String[] productionIdArray = productionIds.split(","); |
| | | List<MdcUserProduction> userProductionList = new ArrayList<>(productionIdArray.length); |
| | | for (String productionId : productionIdArray) { |
| | | userProductionList.add(new MdcUserProduction(userId, productionId)); |
| | | } |
| | | userProductionService.saveBatch(userProductionList); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | errorMessage.add("发生异常:" + e.getMessage()); |