zhoushihao
2025-06-16 47b4800b9d7db9437334274837c61a8fd33b7ae1
1、创建任务查询:新增客户名称商品名称校验,新增配对总数
5个文件已修改
57 ■■■■ 已修改文件
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowAllFlowCardVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowBigStorageDetailsQueryVO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowAllFlowCardVO.java
@@ -28,6 +28,10 @@
     * 是否直通
     */
    private Boolean isThroughSlot;
    /**
     * 已配对总数量
     */
    private int pairTotalCount;
    /**
     * 流程卡数据
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/entity/vo/HollowBigStorageDetailsQueryVO.java
@@ -25,5 +25,13 @@
     * 厚度
     */
    private int thickness;
    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 产品名称
     */
    private String productName;
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassRelationInfoMapper.java
@@ -35,6 +35,6 @@
     * @param flowCardId
     * @return
     */
    OrderDetailsDTO queryProductNameByFlowCardId(@Param("flowCardId") String flowCardId);
    OrderDetailsDTO queryProductNameByFlowCardId(@Param("flowCardId") String flowCardId,@Param("productName") String productName,@Param("customerName") String customerName);
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -32,6 +32,7 @@
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -313,25 +314,33 @@
        }
        Map<String, List<HollowBigStorageCageDetails>> listMap = detailsList.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getFlowCardId));
        List<HollowAllFlowCardVO> resultList = new ArrayList<>();
        AtomicInteger pairTotalCount = new AtomicInteger();
        listMap.forEach((e, v) -> {
            HollowAllFlowCardVO hollowAllFlowCardVO = new HollowAllFlowCardVO();
            HollowBigStorageCageDetails cageDetails = v.get(0);
            //按照流程卡获取对应的产品名称
            OrderDetailsDTO orderDetails = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId());
            OrderDetailsDTO orderDetails = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId(), query.getProductName(), query.getCustomerName());
            if (null != orderDetails) {
                BeanUtils.copyProperties(orderDetails, hollowAllFlowCardVO);
                hollowAllFlowCardVO.setFlowCardId(e);
                if (cageDetails.getHollowSequence() == 0) {
                    hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE);
                } else {
                    hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE);
                }
                List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE);
                hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList);
                pairTotalCount.addAndGet(flowCardInfoList.get(0).getPairCount());
                resultList.add(hollowAllFlowCardVO);
            }
            hollowAllFlowCardVO.setFlowCardId(e);
            if (cageDetails.getHollowSequence() == 0) {
                hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE);
            } else {
                hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE);
            }
            List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE);
            hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList);
            resultList.add(hollowAllFlowCardVO);
        });
        if (CollectionUtil.isEmpty(resultList)) {
            return new ArrayList<>();
        }
        sortFlowCardIdList(resultList);
        resultList.get(0).setPairTotalCount(pairTotalCount.get());
        return resultList;
    }
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -132,11 +132,17 @@
    <select id="queryProductNameByFlowCardId" resultType="com.mes.hollow.entity.dto.OrderDetailsDTO">
        select t.product_name, t1.customer_name
        from sd.order_detail t
                 inner join sd.order t1 on t.order_id = t1.order_id
        inner join sd.order t1 on t.order_id = t1.order_id
        where (t.order_id, t.order_number) = (
            select min(order_id) as order_id, min(order_number) as order_number
            from pp.flow_card
            where process_id = #{flowCardId}
        select min(order_id) as order_id, min(order_number) as order_number
        from pp.flow_card
        where process_id = #{flowCardId}
        <if test="productName != null and productName != ''">
            and t.product_name like concat('%', #{productName}, '%')
        </if>
        <if test="customerName != null and customerName != ''">
            and t1.customer_name like concat('%', #{customerName}, '%')
        </if>
        )
        limit 1
    </select>