| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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)) { |
| | |
| | | } |
| | | } |
| | | //切割电缆配置项 |
| | | 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); |
| | | } |
| | |
| | | for (Map.Entry<String, List<SampleProductExportDto>> entry : entries) { |
| | | targetMap.put(entry.getKey(), entry.getValue()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 使用正则表达式去除字符串最后一个"-"及其后面的所有内容 |
| | | * @param str 待处理的字符串(允许为null) |
| | | * @return 处理后的字符串,null返回null,无"-"返回原字符串 |
| | | */ |
| | | public static String removeLastHyphenAndContent(String str) { |
| | | // 空值校验:避免NullPointerException |
| | | if (str == null || str.isEmpty()) { |
| | | return str; |
| | | } |
| | | // 正则表达式:匹配最后一个"-"及其后面的所有内容 |
| | | String regex = "-[^-]*$"; |
| | | // 替换匹配的内容为空字符串 |
| | | return str.replaceAll(regex, ""); |
| | | } |
| | | |
| | | /** |
| | |
| | | IfsPartPropsRecord ifsPartPropsRecord = ifsPartPropsRecordMapper.selectOne(Wrappers.<IfsPartPropsRecord>lambdaQuery() |
| | | .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId())); |
| | | 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()); |
| | |
| | | //查询检验单消息 |
| | | InsSampleUserVO insSampleUser = insSampleUserMapper.selectUserNameByOrderId(orderId); |
| | | if (Objects.nonNull(insSampleUser)) { |
| | | enterFactoryReport.setPartDesc(insSampleUser.getModel()); |
| | | enterFactoryReport.setPartDesc(removeLastHyphenAndContent(insSampleUser.getModel())); |
| | | enterFactoryReport.setInspector(insSampleUser.getInspector()); |
| | | enterFactoryReport.setInspectDate(insSampleUser.getInspectDate()); |
| | | } |