wujianwei
2025-09-09 77556842bbe4f4c55513a50fb51f8a5622018f4a
service/src/main/resources/mapper/cwgl/PendingSettlementBusinessMapper.xml
@@ -532,7 +532,7 @@
        </foreach>
    </update>
    <update id="updeteCwData">
        update pending_settlement_business set IS_SYNC = 1
        update tms_shipment set IS_SYNC = 1
        where ID in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
@@ -540,18 +540,24 @@
    </update>
    <update id="updatePendingSettlementBusinessIsCreate">
        UPDATE pending_settlement_business
        SET is_create = 1 ,bill_id = #{id},bill_name = #{billName},related_bill_status = 1
        SET
        is_create = 1,
        bill_id = #{id},
        bill_name = #{billName},
        related_bill_status = 1
        WHERE dispatch_no IN
        <foreach item="item" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
    </update>
    <update id="updatePendingSettlementBusinessByBillId">
          UPDATE pending_settlement_business set bill_name = #{billName}
          where bill_id = #{id}
            UPDATE pending_settlement_business p
            JOIN estimated_receivable e ON p.dispatch_no = e.dispatch_no
            SET
            p.bill_name = #{billName},
            e.related_bill_name = #{billName}
            WHERE p.bill_id = #{id}
    </update>
    <update id="updateEstimatedReceivableBillStatus">
        UPDATE pending_settlement_business
@@ -573,8 +579,15 @@
        </foreach>
    </delete>
    <delete id="cancelRelevancy">
         UPDATE pending_settlement_business set bill_id = null ,bill_name = null,is_create = 0,related_bill_status = 0
         where id = #{id}
       UPDATE pending_settlement_business p
LEFT JOIN estimated_receivable e ON p.dispatch_no = e.dispatch_no
SET
    p.bill_id = NULL,
    p.bill_name = NULL,
    p.is_create = 0,
    p.related_bill_status = 0,
    e.related_bill_name = NULL
    WHERE p.id = #{id}
    </delete>
</mapper>