zouyu
2026-05-09 e9e88eefcc8abd2b1e187d28c7666e80307e97cc
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -811,7 +811,7 @@
                )
                .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) {
@@ -1716,8 +1716,8 @@
            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());
                    }
                }
@@ -1745,22 +1745,6 @@
    }
    /**
     * 使用正则表达式去除字符串最后一个"-"及其后面的所有内容
     * @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, "");
    }
    /**
     * 小报告生成
     *
     * @param orderId
@@ -1781,7 +1765,7 @@
        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(StringUtils.equals(ifsPartPropsRecord.getOuterColor(),"/")?ifsPartPropsRecord.getInsulationColor():ifsPartPropsRecord.getOuterColor());
        }
@@ -1828,7 +1812,7 @@
            //查询检验单消息
            InsSampleUserVO insSampleUser = insSampleUserMapper.selectUserNameByOrderId(orderId);
            if (Objects.nonNull(insSampleUser)) {
                enterFactoryReport.setPartDesc(removeLastHyphenAndContent(insSampleUser.getModel()));
                enterFactoryReport.setPartDesc(insSampleUser.getModel());
                enterFactoryReport.setInspector(insSampleUser.getInspector());
                enterFactoryReport.setInspectDate(insSampleUser.getInspectDate());
            }