廖井涛
2025-08-25 26fb1969f8e5ab081cb62afb72d54f6b912776d1
箱号判断条件修改
3个文件已修改
45 ■■■■■ 已修改文件
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedGoodsInventoryMapper.java
@@ -59,6 +59,8 @@
    Integer findDeliverydetailsum(String deliveryId,Integer deliveryDetailState);
    Integer findFinishedOperateLogQuantity(String orderId);
    Boolean updateInventory(@Param("flowCard") FlowCard flowCard,
                            @Param("storageRegion") String storageRegion,
                            @Param("remark") String remark, @Param("container") String container);
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -924,6 +924,11 @@
            Integer deliverysum = finishedGoodsInventoryMapper.findDeliveryQuantity(orderDetail.getDeliveryDetail().getDeliveryId());
            //获取已经出库的数量
            Integer deliverydetailsum = finishedGoodsInventoryMapper.findDeliverydetailsum(orderDetail.getDeliveryDetail().getDeliveryId(),0);
            Integer finishedOperateLogQuantitySum = finishedGoodsInventoryMapper.findFinishedOperateLogQuantity(orderDetail.getDeliveryDetail().getOrderId());
            if(finishedOperateLogQuantitySum==null){
                finishedOperateLogQuantitySum=0;
            }
            if(deliverydetailsum==null){
                deliverydetailsum=0;
            }
@@ -954,7 +959,7 @@
                        //修改订单表发货状态
                        finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),1);
                        //判断订单是否全部发货
                        if (ordersum==orderNumberdDeliverysum) {
                        if (ordersum==finishedOperateLogQuantitySum) {
                            //if (ordersum == (orderDeliveryQuantitySum + orderDetail.getWarehouseNum())) {
                            //修改订单表发货状态
                            finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),2);
north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -153,6 +153,9 @@
        <if test="boxNo != null and boxNo != ''">
            and trim(box_no) = trim(#{boxNo})
        </if>
        <if test="boxNo == null ">
            and box_no  is null
        </if>
    </update>
    <update id="updateInventoryquantityOut">
@@ -163,6 +166,9 @@
        <if test="boxNo != null and boxNo != ''">
            and trim(box_no) = trim(#{boxNo})
        </if>
        <if test="boxNo == null ">
            and box_no  is null
        </if>
    </update>
    <update id="updateInventoryInventoryInt">
@@ -172,7 +178,9 @@
        <if test="remarks != null and remarks != ''">
            and trim(box_no) = trim(#{remarks})
        </if>
        <if test="remarks == null ">
            and box_no  is null
        </if>
    </update>
    <update id="updateInventoryInventoryOut">
@@ -181,6 +189,9 @@
        where order_number=#{orderNumber}  and order_id=#{orderId}
        <if test="boxNo != null and boxNo != ''">
            and trim(box_no) = trim(#{boxNo})
        </if>
        <if test="boxNo == null ">
            and box_no  is null
        </if>
    </update>
@@ -309,6 +320,9 @@
        where order_number=#{orderNumber}  and order_id=#{orderId} and delivery_id=#{deliveryId}
        <if test="remarks != null and remarks != ''">
            and trim(box_no) = trim(#{remarks})
        </if>
        <if test="remarks == null ">
            and box_no  is null
        </if>
    </update>
@@ -488,6 +502,10 @@
        select ifnull(sum(quantity),0) from sd.`delivery_detail`  where delivery_id=#{deliveryId} and delivery_detail_state=#{deliveryDetailState}
    </select>
    <select id="findFinishedOperateLogQuantity"  >
        select sum(quantity) from mm.finished_operate_log  where operate_type='出库' and status='未审核' and order_id=#{orderId}
    </select>
    <update id="updateOrderWarehousingState">
        update sd.`order`
        set warehousing=#{state}
@@ -554,6 +572,9 @@
        <if test="container != null and container != ''">
            and box_no= #{container}
        </if>
        <if test="container == null ">
            and box_no  is null
        </if>
    </update>
@@ -564,6 +585,9 @@
        where order_number=#{finishedOperateLog.operationNumber}  and order_id=#{finishedOperateLog.orderId}
        <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''">
            and box_no=#{finishedOperateLog.remarks}
        </if>
        <if test="finishedOperateLog.remarks == null ">
            and box_no  is null
        </if>
    </update>
@@ -599,7 +623,9 @@
        <if test="boxNo != null and boxNo != ''">
            and box_no=#{boxNo}
        </if>
        <if test="boxNo == null ">
            and box_no  is null
        </if>
    </select>
@@ -609,6 +635,9 @@
        where order_number = #{orderNumber} and order_id=#{orderId}
        <if test="container != null and container != ''">
            and box_no=#{container}
        </if>
        <if test="container == null ">
            and box_no  is null
        </if>
    </select>
@@ -1073,6 +1102,9 @@
        <if test="boxNo != null and boxNo != ''">
            and  box_no=trim(#{boxNo})
        </if>
        <if test="boxNo == null ">
            and  box_no is null
        </if>
    </select>
    <select id="getSelectDeliveryDetailDeliveryId"  resultMap="selectDelivery">