| | |
| | | import com.ruoyi.basic.pojo.IfsInventoryQuantity; |
| | | import com.ruoyi.basic.pojo.StandardTemplate; |
| | | import com.ruoyi.basic.service.StandardTemplateService; |
| | | import com.ruoyi.basic.vo.IfsInventoryQuantityVO; |
| | | import com.ruoyi.common.constant.DictDataConstants; |
| | | import com.ruoyi.common.constant.InsOrderTypeConstants; |
| | | import com.ruoyi.common.constant.MenuJumpPathConstants; |
| | |
| | | if (Objects.nonNull(insOrder.getIfsInventoryId())) { |
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId()); |
| | | //过滤出不合格或未提交的单子 |
| | | count = ifsInventoryQuantityMapper.selectSplitOrderList(one.getPartNo(), one.getLineNo(), one.getReleaseNo(), one.getReceiptNo(), one.getOrderNo()) |
| | | .stream() |
| | | List<IfsInventoryQuantityVO> ifsInventoryQuantityVOS = ifsInventoryQuantityMapper.selectSplitOrderList(one.getPartNo(), one.getLineNo(), one.getReleaseNo(), one.getReceiptNo(), one.getOrderNo(), one.getContract()); |
| | | count = ifsInventoryQuantityVOS.stream() |
| | | .filter(f -> (Objects.nonNull(f.getInsOrderId()) && !Objects.equals(f.getInsOrderId(), orderId)) && (Objects.isNull(f.getInsResult()) || 0 == f.getInsResult())).count(); |
| | | } |
| | | map.put("errorMsg", collect); |
| | | map.put("unInsOrderCount", count); |
| | | map.put("unFinishCount", count); |
| | | return map; |
| | | } |
| | | |
| | |
| | | ) |
| | | .ne(InsProduct::getIsBinding, 1)); |
| | | insProducts.addAll(insProductMapper.selectFiberInsProduct(InsSampleIds, laboratory)); |
| | | if (insProducts.size() > 0) { |
| | | if (!insProducts.isEmpty()) { |
| | | String str = ""; |
| | | int count = 0; |
| | | for (InsProduct product : insProducts) { |
| | |
| | | List<String> lastValueList = new ArrayList<>(); |
| | | SampleProductExportDto dto = new SampleProductExportDto(); |
| | | BeanUtil.copyProperties(collect.get(s).get(0), dto); |
| | | Set<String> tellSet = new HashSet<>(); |
| | | List<String> tellSet = new ArrayList<>(); |
| | | for (int i = startIndex; i < endIndex; i++) { |
| | | String cableTag = cableTags.get(i); |
| | | for (SampleProductExportDto sDto : collect.get(s)) { |
| | | tellSet.add(sDto.getTell()); |
| | | if (sDto.getCableTag().equals(cableTag)) { |
| | | tellSet.add(sDto.getTell()); |
| | | lastValueList.add(sDto.getLastValue()); |
| | | } |
| | | } |
| | | } |
| | | //切割电缆配置项 |
| | | dto.setTell(String.join("\n", tellSet.stream().sorted(Comparator.naturalOrder()).collect(Collectors.toList()))); |
| | | dto.setTell(tellSet.stream().distinct().collect(Collectors.joining("\n"))); |
| | | dto.setLastValueList(lastValueList); |
| | | sampleProductExportDtos.add(dto); |
| | | } |
| | |
| | | IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId()); |
| | | //查询零件属性 |
| | | IfsPartPropsRecord ifsPartPropsRecord = ifsPartPropsRecordMapper.selectOne(Wrappers.<IfsPartPropsRecord>lambdaQuery() |
| | | .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId())); |
| | | .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId()).last("limit 1")); |
| | | if (Objects.nonNull(ifsPartPropsRecord)) { |
| | | enterFactoryReport.setOuterColor(ifsPartPropsRecord.getOuterColor()); |
| | | enterFactoryReport.setOuterColor(StringUtils.equals(ifsPartPropsRecord.getOuterColor(),"/")?ifsPartPropsRecord.getInsulationColor():ifsPartPropsRecord.getOuterColor()); |
| | | } |
| | | enterFactoryReport.setQtyArrived(ifsInventoryQuantity.getQtyArrived() == null ? "" : |
| | | ifsInventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + ifsInventoryQuantity.getBuyUnitMeas()); |
| | |
| | | } |
| | | |
| | | |
| | | private static int getDecimalPlaces(String str) { |
| | | // 查找小数点位置 |
| | | int decimalPointIndex = str.lastIndexOf('.'); |
| | | |
| | | if (decimalPointIndex == -1) { |
| | | // 如果没有小数点,返回0位小数 |
| | | return 0; |
| | | private static int getDecimalPlaces(String str) { |
| | | // 使用正则匹配所有带小数点的数字,取最大小数位数 |
| | | java.util.regex.Matcher matcher = Pattern.compile("\\d+\\.(\\d+)").matcher(str); |
| | | int maxDecimalPlaces = 0; |
| | | while (matcher.find()) { |
| | | int places = matcher.group(1).length(); |
| | | if (places > maxDecimalPlaces) { |
| | | maxDecimalPlaces = places; |
| | | } |
| | | } |
| | | |
| | | // 计算小数点后的位数 |
| | | return str.length() - decimalPointIndex - 1; |
| | | return maxDecimalPlaces; |
| | | } |
| | | |
| | | /** |